Add settings page for managing forecasting API key and URL via UI

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-20 14:37:36 +00:00
parent cae411eae7
commit 1c411e402e
19809 changed files with 1962608 additions and 97 deletions

View file

@ -0,0 +1,49 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getCursorPoints = getCursorPoints;
var _PolarUtils = require("../PolarUtils");
var _types = require("../types");
var _getRadialCursorPoints = require("./getRadialCursorPoints");
function getCursorPoints(layout, activeCoordinate, offset) {
if (layout === 'horizontal') {
return [{
x: activeCoordinate.x,
y: offset.top
}, {
x: activeCoordinate.x,
y: offset.top + offset.height
}];
}
if (layout === 'vertical') {
return [{
x: offset.left,
y: activeCoordinate.y
}, {
x: offset.left + offset.width,
y: activeCoordinate.y
}];
}
if ((0, _types.isPolarCoordinate)(activeCoordinate)) {
if (layout === 'centric') {
var cx = activeCoordinate.cx,
cy = activeCoordinate.cy,
innerRadius = activeCoordinate.innerRadius,
outerRadius = activeCoordinate.outerRadius,
angle = activeCoordinate.angle;
var innerPoint = (0, _PolarUtils.polarToCartesian)(cx, cy, innerRadius, angle);
var outerPoint = (0, _PolarUtils.polarToCartesian)(cx, cy, outerRadius, angle);
return [{
x: innerPoint.x,
y: innerPoint.y
}, {
x: outerPoint.x,
y: outerPoint.y
}];
}
return (0, _getRadialCursorPoints.getRadialCursorPoints)(activeCoordinate);
}
return undefined;
}

View file

@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getCursorRectangle = getCursorRectangle;
function getCursorRectangle(layout, activeCoordinate, offset, tooltipAxisBandSize) {
var halfSize = tooltipAxisBandSize / 2;
return {
stroke: 'none',
fill: '#ccc',
x: layout === 'horizontal' ? activeCoordinate.x - halfSize : offset.left + 0.5,
y: layout === 'horizontal' ? offset.top + 0.5 : activeCoordinate.y - halfSize,
width: layout === 'horizontal' ? tooltipAxisBandSize : offset.width - 1,
height: layout === 'horizontal' ? offset.height - 1 : tooltipAxisBandSize
};
}

View file

@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getRadialCursorPoints = getRadialCursorPoints;
var _PolarUtils = require("../PolarUtils");
/**
* Only applicable for radial layouts
* @param {Object} activeCoordinate ChartCoordinate
* @returns {Object} RadialCursorPoints
*/
function getRadialCursorPoints(activeCoordinate) {
var cx = activeCoordinate.cx,
cy = activeCoordinate.cy,
radius = activeCoordinate.radius,
startAngle = activeCoordinate.startAngle,
endAngle = activeCoordinate.endAngle;
var startPoint = (0, _PolarUtils.polarToCartesian)(cx, cy, radius, startAngle);
var endPoint = (0, _PolarUtils.polarToCartesian)(cx, cy, radius, endAngle);
return {
points: [startPoint, endPoint],
cx,
cy,
radius,
startAngle,
endAngle
};
}