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:
parent
cae411eae7
commit
1c411e402e
19809 changed files with 1962608 additions and 97 deletions
49
frontend/node_modules/recharts/es6/container/ClipPathProvider.js
generated
vendored
Normal file
49
frontend/node_modules/recharts/es6/container/ClipPathProvider.js
generated
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
||||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
||||
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
||||
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
||||
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
||||
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
||||
import * as React from 'react';
|
||||
import { createContext, useContext, useState } from 'react';
|
||||
import { uniqueId } from '../util/DataUtils';
|
||||
import { usePlotArea } from '../hooks';
|
||||
var ClipPathIdContext = /*#__PURE__*/createContext(undefined);
|
||||
|
||||
/**
|
||||
* Generates a unique clip path ID for use in SVG elements,
|
||||
* and puts it in a context provider.
|
||||
*
|
||||
* To read the clip path ID, use the `useClipPathId` hook,
|
||||
* or render `<ClipPath>` component which will automatically use the ID from this context.
|
||||
*
|
||||
* @param props children - React children to be wrapped by the provider
|
||||
* @returns React Context Provider
|
||||
*/
|
||||
export var ClipPathProvider = _ref => {
|
||||
var children = _ref.children;
|
||||
var _useState = useState("".concat(uniqueId('recharts'), "-clip")),
|
||||
_useState2 = _slicedToArray(_useState, 1),
|
||||
clipPathId = _useState2[0];
|
||||
var plotArea = usePlotArea();
|
||||
if (plotArea == null) {
|
||||
return null;
|
||||
}
|
||||
var x = plotArea.x,
|
||||
y = plotArea.y,
|
||||
width = plotArea.width,
|
||||
height = plotArea.height;
|
||||
return /*#__PURE__*/React.createElement(ClipPathIdContext.Provider, {
|
||||
value: clipPathId
|
||||
}, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
||||
id: clipPathId
|
||||
}, /*#__PURE__*/React.createElement("rect", {
|
||||
x: x,
|
||||
y: y,
|
||||
height: height,
|
||||
width: width
|
||||
}))), children);
|
||||
};
|
||||
export var useClipPathId = () => {
|
||||
return useContext(ClipPathIdContext);
|
||||
};
|
||||
26
frontend/node_modules/recharts/es6/container/Layer.js
generated
vendored
Normal file
26
frontend/node_modules/recharts/es6/container/Layer.js
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
var _excluded = ["children", "className"];
|
||||
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
||||
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
||||
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
||||
import * as React from 'react';
|
||||
import { clsx } from 'clsx';
|
||||
import { svgPropertiesAndEvents } from '../util/svgPropertiesAndEvents';
|
||||
/**
|
||||
* Creates an SVG group element to group other SVG elements.
|
||||
*
|
||||
* Useful if you want to apply transformations or styles to a set of elements
|
||||
* without affecting other elements in the SVG.
|
||||
*
|
||||
* @link https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/g
|
||||
*/
|
||||
export var Layer = /*#__PURE__*/React.forwardRef((props, ref) => {
|
||||
var children = props.children,
|
||||
className = props.className,
|
||||
others = _objectWithoutProperties(props, _excluded);
|
||||
var layerClass = clsx('recharts-layer', className);
|
||||
return /*#__PURE__*/React.createElement("g", _extends({
|
||||
className: layerClass
|
||||
}, svgPropertiesAndEvents(others), {
|
||||
ref: ref
|
||||
}), children);
|
||||
});
|
||||
95
frontend/node_modules/recharts/es6/container/RootSurface.js
generated
vendored
Normal file
95
frontend/node_modules/recharts/es6/container/RootSurface.js
generated
vendored
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
var _excluded = ["children"];
|
||||
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
||||
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
||||
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
||||
import * as React from 'react';
|
||||
import { forwardRef } from 'react';
|
||||
import { useChartHeight, useChartWidth } from '../context/chartLayoutContext';
|
||||
import { useAccessibilityLayer } from '../context/accessibilityContext';
|
||||
import { useIsPanorama } from '../context/PanoramaContext';
|
||||
import { Surface } from './Surface';
|
||||
import { useAppSelector } from '../state/hooks';
|
||||
import { selectBrushDimensions } from '../state/selectors/brushSelectors';
|
||||
import { isPositiveNumber } from '../util/isWellBehavedNumber';
|
||||
import { AllZIndexPortals } from '../zIndex/ZIndexPortal';
|
||||
var FULL_WIDTH_AND_HEIGHT = {
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
/*
|
||||
* display: block is necessary here because the default for an SVG is display: inline,
|
||||
* which in some browsers (Chrome) adds a little bit of extra space above and below the SVG
|
||||
* to make space for the descender of letters like "g" and "y". This throws off the height calculation
|
||||
* and causes the container to grow indefinitely on each render with responsive=true.
|
||||
* Display: block removes that extra space.
|
||||
*
|
||||
* Interestingly, Firefox does not have this problem, but it doesn't hurt to add the style anyway.
|
||||
*/
|
||||
display: 'block'
|
||||
};
|
||||
var MainChartSurface = /*#__PURE__*/forwardRef((props, ref) => {
|
||||
var width = useChartWidth();
|
||||
var height = useChartHeight();
|
||||
var hasAccessibilityLayer = useAccessibilityLayer();
|
||||
if (!isPositiveNumber(width) || !isPositiveNumber(height)) {
|
||||
return null;
|
||||
}
|
||||
var children = props.children,
|
||||
otherAttributes = props.otherAttributes,
|
||||
title = props.title,
|
||||
desc = props.desc;
|
||||
var tabIndex, role;
|
||||
if (otherAttributes != null) {
|
||||
if (typeof otherAttributes.tabIndex === 'number') {
|
||||
tabIndex = otherAttributes.tabIndex;
|
||||
} else {
|
||||
tabIndex = hasAccessibilityLayer ? 0 : undefined;
|
||||
}
|
||||
if (typeof otherAttributes.role === 'string') {
|
||||
role = otherAttributes.role;
|
||||
} else {
|
||||
role = hasAccessibilityLayer ? 'application' : undefined;
|
||||
}
|
||||
}
|
||||
return /*#__PURE__*/React.createElement(Surface, _extends({}, otherAttributes, {
|
||||
title: title,
|
||||
desc: desc,
|
||||
role: role,
|
||||
tabIndex: tabIndex,
|
||||
width: width,
|
||||
height: height,
|
||||
style: FULL_WIDTH_AND_HEIGHT,
|
||||
ref: ref
|
||||
}), children);
|
||||
});
|
||||
var BrushPanoramaSurface = _ref => {
|
||||
var children = _ref.children;
|
||||
var brushDimensions = useAppSelector(selectBrushDimensions);
|
||||
if (!brushDimensions) {
|
||||
return null;
|
||||
}
|
||||
var width = brushDimensions.width,
|
||||
height = brushDimensions.height,
|
||||
y = brushDimensions.y,
|
||||
x = brushDimensions.x;
|
||||
return /*#__PURE__*/React.createElement(Surface, {
|
||||
width: width,
|
||||
height: height,
|
||||
x: x,
|
||||
y: y
|
||||
}, children);
|
||||
};
|
||||
export var RootSurface = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
||||
var children = _ref2.children,
|
||||
rest = _objectWithoutProperties(_ref2, _excluded);
|
||||
var isPanorama = useIsPanorama();
|
||||
if (isPanorama) {
|
||||
return /*#__PURE__*/React.createElement(BrushPanoramaSurface, null, /*#__PURE__*/React.createElement(AllZIndexPortals, {
|
||||
isPanorama: true
|
||||
}, children));
|
||||
}
|
||||
return /*#__PURE__*/React.createElement(MainChartSurface, _extends({
|
||||
ref: ref
|
||||
}, rest), /*#__PURE__*/React.createElement(AllZIndexPortals, {
|
||||
isPanorama: false
|
||||
}, children));
|
||||
});
|
||||
41
frontend/node_modules/recharts/es6/container/Surface.js
generated
vendored
Normal file
41
frontend/node_modules/recharts/es6/container/Surface.js
generated
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
var _excluded = ["children", "width", "height", "viewBox", "className", "style", "title", "desc"];
|
||||
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
||||
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
||||
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
||||
import * as React from 'react';
|
||||
import { forwardRef } from 'react';
|
||||
import { clsx } from 'clsx';
|
||||
import { svgPropertiesAndEvents } from '../util/svgPropertiesAndEvents';
|
||||
/**
|
||||
* Renders an SVG element.
|
||||
*
|
||||
* All charts already include a Surface component, so you would not normally use this directly.
|
||||
*
|
||||
* @link https://developer.mozilla.org/en-US/docs/Web/SVG/Element/svg
|
||||
*/
|
||||
export var Surface = /*#__PURE__*/forwardRef((props, ref) => {
|
||||
var children = props.children,
|
||||
width = props.width,
|
||||
height = props.height,
|
||||
viewBox = props.viewBox,
|
||||
className = props.className,
|
||||
style = props.style,
|
||||
title = props.title,
|
||||
desc = props.desc,
|
||||
others = _objectWithoutProperties(props, _excluded);
|
||||
var svgView = viewBox || {
|
||||
width,
|
||||
height,
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
var layerClass = clsx('recharts-surface', className);
|
||||
return /*#__PURE__*/React.createElement("svg", _extends({}, svgPropertiesAndEvents(others), {
|
||||
className: layerClass,
|
||||
width: width,
|
||||
height: height,
|
||||
style: style,
|
||||
viewBox: "".concat(svgView.x, " ").concat(svgView.y, " ").concat(svgView.width, " ").concat(svgView.height),
|
||||
ref: ref
|
||||
}), /*#__PURE__*/React.createElement("title", null, title), /*#__PURE__*/React.createElement("desc", null, desc), children);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue