@pie-lib/charting 7.0.4-next.32 → 7.0.4-next.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.js +2 -5
- package/dist/actions-button.js +8 -8
- package/dist/axes.js +35 -35
- package/dist/bars/common/bars.js +13 -13
- package/dist/chart-setup.js +19 -19
- package/dist/common/correctness-indicators.js +18 -18
- package/dist/common/drag-handle.js +20 -20
- package/dist/grid.js +11 -11
- package/dist/key-legend.js +12 -12
- package/dist/line/common/drag-handle.js +12 -12
- package/dist/line/common/line.js +10 -10
- package/dist/line/line-cross.js +19 -19
- package/dist/line/line-dot.js +10 -10
- package/dist/mark-label.js +8 -8
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/Axis.js +67 -0
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/AxisBottom.js +29 -0
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/AxisLeft.js +30 -0
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +66 -0
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/Ticks.js +39 -0
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/constants/orientation.js +9 -0
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/createPoint.js +14 -0
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +13 -0
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +16 -0
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +8 -0
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getTickPosition.js +14 -0
- package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/GridColumns.js +46 -0
- package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/GridRows.js +46 -0
- package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +6 -0
- package/dist/node_modules/.bun/@visx_group@4.0.0_d84c32d47042070f/node_modules/@visx/group/esm/Group.js +17 -0
- package/dist/node_modules/.bun/@visx_point@4.0.0/node_modules/@visx/point/esm/Point.js +20 -0
- package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/operators/align.js +1 -1
- package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/operators/base.js +1 -1
- package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/operators/clamp.js +1 -1
- package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/operators/constant.js +1 -1
- package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/operators/domain.js +1 -1
- package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/operators/exponent.js +1 -1
- package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/operators/interpolate.js +2 -2
- package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/operators/nice.js +7 -7
- package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/operators/padding.js +1 -1
- package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/operators/range.js +1 -1
- package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/operators/reverse.js +9 -0
- package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/operators/round.js +2 -2
- package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/operators/scaleOperator.js +3 -5
- package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/operators/unknown.js +1 -1
- package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/operators/zero.js +9 -0
- package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/scales/band.js +2 -2
- package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/scales/point.js +2 -2
- package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/utils/coerceNumber.js +2 -2
- package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/utils/createColorInterpolator.js +3 -3
- package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/getTicks.js +7 -0
- package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/utils/isUtcScale.js +1 -1
- package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/toString.js +6 -0
- package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Bar.js +15 -0
- package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Circle.js +15 -0
- package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Line.js +27 -0
- package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/LinePath.js +24 -0
- package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/util/D3ShapeFactories.js +9 -0
- package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/util/setNumberOrNumberAccessor.js +6 -0
- package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/Text.js +27 -0
- package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/hooks/useText.js +68 -0
- package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/util/getStringWidth.js +19 -0
- package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/util/memoize.js +13 -0
- package/dist/node_modules/.bun/{@visx_vendor@3.12.0 → @visx_vendor@4.0.0}/node_modules/@visx/vendor/esm/d3-interpolate.js +1 -1
- package/dist/node_modules/.bun/{@visx_vendor@3.12.0 → @visx_vendor@4.0.0}/node_modules/@visx/vendor/esm/d3-scale.js +1 -1
- package/dist/node_modules/.bun/@visx_vendor@4.0.0/node_modules/@visx/vendor/esm/d3-shape.js +8 -0
- package/dist/node_modules/.bun/{@visx_vendor@3.12.0 → @visx_vendor@4.0.0}/node_modules/@visx/vendor/esm/d3-time.js +1 -1
- package/dist/plot/common/plot.js +23 -23
- package/dist/plot/dot.js +8 -8
- package/dist/plot/line.js +10 -10
- package/dist/utils.js +2 -2
- package/package.json +11 -11
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js +0 -101
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisBottom.js +0 -46
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisLeft.js +0 -47
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +0 -63
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js +0 -44
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/constants/orientation.js +0 -9
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js +0 -14
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +0 -21
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +0 -16
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +0 -8
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickPosition.js +0 -15
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridColumns.js +0 -79
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridRows.js +0 -79
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +0 -6
- package/dist/node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js +0 -50
- package/dist/node_modules/.bun/@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js +0 -18
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/reverse.js +0 -9
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/zero.js +0 -9
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js +0 -9
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/toString.js +0 -6
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Bar.js +0 -29
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Circle.js +0 -29
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js +0 -47
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/LinePath.js +0 -50
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/util/D3ShapeFactories.js +0 -9
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/util/setNumberOrNumberAccessor.js +0 -6
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js +0 -53
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js +0 -57
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/hooks/useText.js +0 -91
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/util/getStringWidth.js +0 -21
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Hash.js +0 -21
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_ListCache.js +0 -21
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Map.js +0 -10
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_MapCache.js +0 -21
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Symbol.js +0 -9
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_assocIndexOf.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseGetTag.js +0 -15
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseIsNative.js +0 -16
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_coreJsData.js +0 -9
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_freeGlobal.js +0 -8
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getMapData.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getNative.js +0 -15
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getRawTag.js +0 -19
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getValue.js +0 -11
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashClear.js +0 -13
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashDelete.js +0 -12
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashGet.js +0 -18
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashHas.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashSet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isKeyable.js +0 -12
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isMasked.js +0 -16
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheClear.js +0 -11
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheDelete.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheGet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheHas.js +0 -13
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheSet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheClear.js +0 -19
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheDelete.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheGet.js +0 -13
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheHas.js +0 -13
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheSet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_nativeCreate.js +0 -9
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_objectToString.js +0 -12
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_root.js +0 -10
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_toSource.js +0 -20
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/eq.js +0 -11
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isFunction.js +0 -16
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isObject.js +0 -12
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/memoize.js +0 -20
|
@@ -15,9 +15,6 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
15
15
|
}, l = (e, t, n) => (c(e, t, "default"), n && c(n, t, "default")), u = (n, r, a) => (a = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule ? t(a, "default", {
|
|
16
16
|
value: n,
|
|
17
17
|
enumerable: !0
|
|
18
|
-
}) : a, n))
|
|
19
|
-
if (typeof require < "u") return require.apply(this, arguments);
|
|
20
|
-
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
21
|
-
});
|
|
18
|
+
}) : a, n));
|
|
22
19
|
//#endregion
|
|
23
|
-
export { o as __commonJSMin, s as __exportAll, l as __reExport,
|
|
20
|
+
export { o as __commonJSMin, s as __exportAll, l as __reExport, u as __toESM };
|
package/dist/actions-button.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import e from "react";
|
|
2
2
|
import t from "prop-types";
|
|
3
3
|
import { styled as n } from "@mui/material/styles";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { color as a } from "@pie-lib/render-ui";
|
|
6
6
|
import o from "@mui/material/Button";
|
|
7
7
|
import s from "@mui/material/Popover";
|
|
8
8
|
import c from "@mui/material/Paper";
|
|
@@ -11,7 +11,7 @@ import l from "@pie-lib/translator";
|
|
|
11
11
|
var { translator: u } = l, d = n("div")(() => ({ alignSelf: "flex-end" })), f = n("div")(({ theme: e }) => ({
|
|
12
12
|
cursor: "pointer",
|
|
13
13
|
fontSize: e.typography.fontSize,
|
|
14
|
-
color:
|
|
14
|
+
color: a.tertiary(),
|
|
15
15
|
padding: e.spacing(1)
|
|
16
16
|
})), p = n(c)(({ theme: e }) => ({
|
|
17
17
|
padding: e.spacing(1),
|
|
@@ -21,7 +21,7 @@ var { translator: u } = l, d = n("div")(() => ({ alignSelf: "flex-end" })), f =
|
|
|
21
21
|
"& button": {
|
|
22
22
|
textTransform: "none",
|
|
23
23
|
fontSize: e.typography.fontSize,
|
|
24
|
-
color:
|
|
24
|
+
color: a.text(),
|
|
25
25
|
justifyContent: "flex-start"
|
|
26
26
|
}
|
|
27
27
|
})), m = class extends e.Component {
|
|
@@ -53,12 +53,12 @@ var { translator: u } = l, d = n("div")(() => ({ alignSelf: "flex-end" })), f =
|
|
|
53
53
|
};
|
|
54
54
|
render() {
|
|
55
55
|
let { categories: e, language: t } = this.props, { actionsAnchorEl: n } = this.state;
|
|
56
|
-
return /* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */ i(d, { children: [/* @__PURE__ */ r(f, {
|
|
57
57
|
role: "button",
|
|
58
58
|
tabIndex: 0,
|
|
59
59
|
onClick: this.handleActionsClick,
|
|
60
60
|
children: "Actions"
|
|
61
|
-
}), /* @__PURE__ */
|
|
61
|
+
}), /* @__PURE__ */ r(s, {
|
|
62
62
|
open: !!n,
|
|
63
63
|
anchorEl: n,
|
|
64
64
|
onClose: this.handleActionsClose,
|
|
@@ -70,10 +70,10 @@ var { translator: u } = l, d = n("div")(() => ({ alignSelf: "flex-end" })), f =
|
|
|
70
70
|
vertical: "top",
|
|
71
71
|
horizontal: "left"
|
|
72
72
|
},
|
|
73
|
-
children: /* @__PURE__ */
|
|
73
|
+
children: /* @__PURE__ */ i(p, { children: [/* @__PURE__ */ i(o, {
|
|
74
74
|
onClick: () => this.handleAddCategory(),
|
|
75
75
|
children: ["+ ", u.t("charting.add", { lng: t })]
|
|
76
|
-
}), e.length > 0 && e.map((e, n) => e.deletable && !e.correctness && /* @__PURE__ */
|
|
76
|
+
}), e.length > 0 && e.map((e, n) => e.deletable && !e.correctness && /* @__PURE__ */ r(o, {
|
|
77
77
|
onClick: () => this.handleDeleteCategory(n),
|
|
78
78
|
children: `${u.t("charting.delete", { lng: t })} <${e.label || u.t("charting.newLabel", { lng: t })}>`
|
|
79
79
|
}, n))] })
|
package/dist/axes.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "./node_modules/.bun/@visx_axis@
|
|
2
|
-
import t from "./node_modules/.bun/@visx_axis@
|
|
1
|
+
import e from "./node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/AxisLeft.js";
|
|
2
|
+
import t from "./node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/AxisBottom.js";
|
|
3
3
|
import { TickCorrectnessIndicator as n } from "./common/correctness-indicators.js";
|
|
4
4
|
import { bandKey as r, getRotateAngle as i, getTickValues as a } from "./utils.js";
|
|
5
5
|
import { MarkLabel as o } from "./mark-label.js";
|
|
@@ -8,8 +8,8 @@ import c from "prop-types";
|
|
|
8
8
|
import { styled as l } from "@mui/material/styles";
|
|
9
9
|
import { types as u } from "@pie-lib/plot";
|
|
10
10
|
import { AlertDialog as d } from "@pie-lib/config-ui";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
12
|
+
import { color as m } from "@pie-lib/render-ui";
|
|
13
13
|
import h from "@mui/material/Checkbox";
|
|
14
14
|
import { renderMath as g } from "@pie-element/shared-math-rendering-mathjax";
|
|
15
15
|
//#region src/axes.tsx
|
|
@@ -28,15 +28,15 @@ function b(e) {
|
|
|
28
28
|
var x = l("text")(({ theme: e }) => ({
|
|
29
29
|
fontSize: e.typography.fontSize - 2,
|
|
30
30
|
fill: e.palette.error.main
|
|
31
|
-
})), S = l(h)(() => ({ color: `${
|
|
31
|
+
})), S = l(h)(() => ({ color: `${m.tertiary()} !important` })), C = l("g")(({ theme: e }) => ({
|
|
32
32
|
"& .vx-axis-line": {
|
|
33
|
-
stroke:
|
|
33
|
+
stroke: m.visualElementsColors.AXIS_LINE_COLOR,
|
|
34
34
|
strokeWidth: 2
|
|
35
35
|
},
|
|
36
36
|
"& .vx-axis-tick": {
|
|
37
|
-
fill:
|
|
37
|
+
fill: m.visualElementsColors.AXIS_TICK_COLOR,
|
|
38
38
|
"& line": {
|
|
39
|
-
stroke:
|
|
39
|
+
stroke: m.visualElementsColors.AXIS_TICK_COLOR,
|
|
40
40
|
strokeWidth: 2
|
|
41
41
|
},
|
|
42
42
|
fontFamily: e.typography.body1?.fontFamily,
|
|
@@ -45,14 +45,14 @@ var x = l("text")(({ theme: e }) => ({
|
|
|
45
45
|
}
|
|
46
46
|
})), w = (e) => ({
|
|
47
47
|
borderRadius: e.spacing(2),
|
|
48
|
-
color:
|
|
48
|
+
color: m.defaults.WHITE,
|
|
49
49
|
fontSize: "16px",
|
|
50
50
|
width: "16px",
|
|
51
51
|
height: "16px",
|
|
52
52
|
padding: "2px",
|
|
53
|
-
border: `1px solid ${
|
|
53
|
+
border: `1px solid ${m.defaults.WHITE}`,
|
|
54
54
|
boxSizing: "unset"
|
|
55
|
-
}), T = { backgroundColor:
|
|
55
|
+
}), T = { backgroundColor: m.incorrectWithIcon() }, E = { backgroundColor: m.correct() }, D = class extends s.Component {
|
|
56
56
|
static propTypes = {
|
|
57
57
|
defineChart: c.bool,
|
|
58
58
|
error: c.any
|
|
@@ -112,15 +112,15 @@ var x = l("text")(({ theme: e }) => ({
|
|
|
112
112
|
return n;
|
|
113
113
|
};
|
|
114
114
|
render() {
|
|
115
|
-
let { categories: e, xBand: t, bandWidth: i, barWidth: a, rotate: s, top: c, graphProps: l, defineChart: u, chartingOptions:
|
|
115
|
+
let { categories: e, xBand: t, bandWidth: i, barWidth: a, rotate: s, top: c, graphProps: l, defineChart: u, chartingOptions: m, x: h, y: g, formattedValue: _, changeInteractiveEnabled: v, changeEditableEnabled: y, error: b, autoFocus: C, hiddenLabelRef: D, showCorrectness: O } = this.props;
|
|
116
116
|
if (!_) return null;
|
|
117
117
|
let k = {
|
|
118
118
|
correctnessIcon: w,
|
|
119
119
|
incorrectIcon: T,
|
|
120
120
|
correctIcon: E
|
|
121
|
-
}, { dialog: A } = this.state, { changeEditable: j, changeInteractive: M } =
|
|
122
|
-
return /* @__PURE__ */
|
|
123
|
-
/* @__PURE__ */
|
|
121
|
+
}, { dialog: A } = this.state, { changeEditable: j, changeInteractive: M } = m || {}, N = parseInt(_.split("-")[0], 10), P = e[N], { editable: F, interactive: I, label: L, correctness: R } = P || {}, z = t(r({ label: L }, N)), B = (e || []).reduce((e, t) => (e && e.label ? e.label.length : 0) > (t && t.label ? t.label.length : 0) ? e : t, { label: "" }), V = b ? [...new Set(Object.values(b))].join(" ") : "";
|
|
122
|
+
return /* @__PURE__ */ p("g", { children: [
|
|
123
|
+
/* @__PURE__ */ p("foreignObject", {
|
|
124
124
|
x: i ? z : h - a / 2,
|
|
125
125
|
y: 18,
|
|
126
126
|
width: a,
|
|
@@ -129,14 +129,14 @@ var x = l("text")(({ theme: e }) => ({
|
|
|
129
129
|
pointerEvents: "none",
|
|
130
130
|
overflow: "visible"
|
|
131
131
|
},
|
|
132
|
-
children: [N === 0 && /* @__PURE__ */
|
|
132
|
+
children: [N === 0 && /* @__PURE__ */ f(o, {
|
|
133
133
|
isHiddenLabel: !0,
|
|
134
134
|
inputRef: D,
|
|
135
135
|
disabled: !0,
|
|
136
136
|
mark: B,
|
|
137
137
|
graphProps: l,
|
|
138
138
|
barWidth: a
|
|
139
|
-
}), /* @__PURE__ */
|
|
139
|
+
}), /* @__PURE__ */ f(o, {
|
|
140
140
|
autoFocus: u && C,
|
|
141
141
|
inputRef: (e) => this.input = e,
|
|
142
142
|
disabled: !u && !F,
|
|
@@ -148,23 +148,23 @@ var x = l("text")(({ theme: e }) => ({
|
|
|
148
148
|
correctness: R,
|
|
149
149
|
error: b && b[N],
|
|
150
150
|
limitCharacters: !0,
|
|
151
|
-
correctnessIndicator: O && R && /* @__PURE__ */
|
|
151
|
+
correctnessIndicator: O && R && /* @__PURE__ */ f(n, {
|
|
152
152
|
correctness: R,
|
|
153
153
|
interactive: I,
|
|
154
154
|
classes: k
|
|
155
155
|
})
|
|
156
156
|
})]
|
|
157
157
|
}),
|
|
158
|
-
b && N === 0 && /* @__PURE__ */
|
|
158
|
+
b && N === 0 && /* @__PURE__ */ f(x, {
|
|
159
159
|
y: g + 23,
|
|
160
160
|
height: 6,
|
|
161
161
|
textAnchor: "start",
|
|
162
162
|
children: V
|
|
163
163
|
}),
|
|
164
|
-
u && N === 0 && /* @__PURE__ */
|
|
164
|
+
u && N === 0 && /* @__PURE__ */ p("svg", {
|
|
165
165
|
x: -55,
|
|
166
166
|
style: { overflow: "visible" },
|
|
167
|
-
children: [v && /* @__PURE__ */
|
|
167
|
+
children: [v && /* @__PURE__ */ f("text", {
|
|
168
168
|
y: g + 90 + c,
|
|
169
169
|
width: a,
|
|
170
170
|
height: 4,
|
|
@@ -175,12 +175,12 @@ var x = l("text")(({ theme: e }) => ({
|
|
|
175
175
|
maxWidth: a,
|
|
176
176
|
display: "inline-block"
|
|
177
177
|
},
|
|
178
|
-
children: this.splitText(M?.authoringLabel, 20).map((e, t) => /* @__PURE__ */
|
|
178
|
+
children: this.splitText(M?.authoringLabel, 20).map((e, t) => /* @__PURE__ */ f("tspan", {
|
|
179
179
|
x: "0",
|
|
180
180
|
dy: `${t > 0 ? "1.2em" : ".6em"}`,
|
|
181
181
|
children: e
|
|
182
182
|
}, t))
|
|
183
|
-
}), y && /* @__PURE__ */
|
|
183
|
+
}), y && /* @__PURE__ */ f("text", {
|
|
184
184
|
y: g + 145 + c,
|
|
185
185
|
width: a,
|
|
186
186
|
height: 4,
|
|
@@ -191,14 +191,14 @@ var x = l("text")(({ theme: e }) => ({
|
|
|
191
191
|
maxWidth: a,
|
|
192
192
|
display: "inline-block"
|
|
193
193
|
},
|
|
194
|
-
children: this.splitText(j?.authoringLabel, 20).map((e, t) => /* @__PURE__ */
|
|
194
|
+
children: this.splitText(j?.authoringLabel, 20).map((e, t) => /* @__PURE__ */ f("tspan", {
|
|
195
195
|
x: "0",
|
|
196
196
|
dy: `${t > 0 ? "1.2em" : ".6em"}`,
|
|
197
197
|
children: e
|
|
198
198
|
}, t))
|
|
199
199
|
})]
|
|
200
200
|
}),
|
|
201
|
-
u && v && /* @__PURE__ */
|
|
201
|
+
u && v && /* @__PURE__ */ f("foreignObject", {
|
|
202
202
|
x: h - 24,
|
|
203
203
|
y: g + 80 + c,
|
|
204
204
|
width: a,
|
|
@@ -207,13 +207,13 @@ var x = l("text")(({ theme: e }) => ({
|
|
|
207
207
|
pointerEvents: "visible",
|
|
208
208
|
overflow: "visible"
|
|
209
209
|
},
|
|
210
|
-
children: /* @__PURE__ */
|
|
210
|
+
children: /* @__PURE__ */ f(S, {
|
|
211
211
|
style: { position: "fixed" },
|
|
212
212
|
checked: I,
|
|
213
213
|
onChange: (e) => this.changeInteractive(N, e.target.checked)
|
|
214
214
|
})
|
|
215
215
|
}),
|
|
216
|
-
u && y && /* @__PURE__ */
|
|
216
|
+
u && y && /* @__PURE__ */ f("foreignObject", {
|
|
217
217
|
x: h - 24,
|
|
218
218
|
y: g + 130 + c,
|
|
219
219
|
width: a,
|
|
@@ -222,13 +222,13 @@ var x = l("text")(({ theme: e }) => ({
|
|
|
222
222
|
pointerEvents: "visible",
|
|
223
223
|
overflow: "visible"
|
|
224
224
|
},
|
|
225
|
-
children: /* @__PURE__ */
|
|
225
|
+
children: /* @__PURE__ */ f(S, {
|
|
226
226
|
style: { position: "fixed" },
|
|
227
227
|
checked: F,
|
|
228
228
|
onChange: (e) => this.changeEditable(N, e.target.checked)
|
|
229
229
|
})
|
|
230
230
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ f("foreignObject", {
|
|
232
232
|
x: h - 24,
|
|
233
233
|
y: g + 100 + c,
|
|
234
234
|
width: a,
|
|
@@ -237,7 +237,7 @@ var x = l("text")(({ theme: e }) => ({
|
|
|
237
237
|
pointerEvents: "visible",
|
|
238
238
|
overflow: "visible"
|
|
239
239
|
},
|
|
240
|
-
children: /* @__PURE__ */
|
|
240
|
+
children: /* @__PURE__ */ f(d, {
|
|
241
241
|
open: A.open,
|
|
242
242
|
title: A.title,
|
|
243
243
|
text: A.text,
|
|
@@ -325,11 +325,11 @@ var O = class extends s.Component {
|
|
|
325
325
|
e.categories !== this.props.categories && (this._updateTimer && clearTimeout(this._updateTimer), this._updateTimer = setTimeout(() => this.measureHiddenLabel(), 50));
|
|
326
326
|
}
|
|
327
327
|
render() {
|
|
328
|
-
let { graphProps: n, xBand: r, leftAxis: o, onChange: s, onChangeCategory: c, categories: l = [], top: u, defineChart: d, chartingOptions:
|
|
328
|
+
let { graphProps: n, xBand: r, leftAxis: o, onChange: s, onChangeCategory: c, categories: l = [], top: u, defineChart: d, chartingOptions: m, changeInteractiveEnabled: h, changeEditableEnabled: g, theme: _, autoFocus: v, onAutoFocusUsed: y, error: b, showCorrectness: x } = this.props, { scale: S = {}, range: w = {}, domain: T = {}, size: E = {} } = n || {}, { height: O, width: k } = this.state, A = r && typeof r.rangeRound == "function" && r.rangeRound([0, E.width]), j = r && typeof r.bandwidth == "function" && r.bandwidth(), M = j || S.x && S.x(T.max) / l.length, N = a({
|
|
329
329
|
...w,
|
|
330
330
|
step: w.labelStep
|
|
331
331
|
}), P = i(_ && _.typography ? _.typography.fontSize : 14, O), F = k > M ? 25 : 0;
|
|
332
|
-
return /* @__PURE__ */
|
|
332
|
+
return /* @__PURE__ */ p(C, { children: [o && /* @__PURE__ */ f(e, {
|
|
333
333
|
scale: S.y,
|
|
334
334
|
tickLength: 10,
|
|
335
335
|
tickFormat: (e) => e,
|
|
@@ -338,13 +338,13 @@ var O = class extends s.Component {
|
|
|
338
338
|
dy: 4,
|
|
339
339
|
dx: -10 - (e.toLocaleString().length || 1) * 5
|
|
340
340
|
})
|
|
341
|
-
}), /* @__PURE__ */
|
|
341
|
+
}), /* @__PURE__ */ f(t, {
|
|
342
342
|
scale: A,
|
|
343
343
|
labelProps: { y: 60 + u },
|
|
344
344
|
top: S.y && S.y(w.min),
|
|
345
345
|
textLabelProps: () => ({ textAnchor: "middle" }),
|
|
346
346
|
tickFormat: (e) => e,
|
|
347
|
-
tickComponent: (e) => /* @__PURE__ */
|
|
347
|
+
tickComponent: (e) => /* @__PURE__ */ f(D, {
|
|
348
348
|
hiddenLabelRef: this.setHiddenLabelRef,
|
|
349
349
|
categories: l,
|
|
350
350
|
xBand: r,
|
|
@@ -353,7 +353,7 @@ var O = class extends s.Component {
|
|
|
353
353
|
rotate: P || F,
|
|
354
354
|
top: u,
|
|
355
355
|
defineChart: d,
|
|
356
|
-
chartingOptions:
|
|
356
|
+
chartingOptions: m,
|
|
357
357
|
autoFocus: v,
|
|
358
358
|
onAutoFocusUsed: y,
|
|
359
359
|
error: b,
|
package/dist/bars/common/bars.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../../node_modules/.bun/@visx_group@
|
|
2
|
-
import t from "../../node_modules/.bun/@visx_shape@
|
|
1
|
+
import e from "../../node_modules/.bun/@visx_group@4.0.0_d84c32d47042070f/node_modules/@visx/group/esm/Group.js";
|
|
2
|
+
import t from "../../node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Bar.js";
|
|
3
3
|
import { bandKey as n } from "../../utils.js";
|
|
4
4
|
import { D as r, DragHandle as i } from "../../common/drag-handle.js";
|
|
5
5
|
import { CorrectCheckIcon as a } from "./correct-check-icon.js";
|
|
@@ -8,8 +8,8 @@ import s from "prop-types";
|
|
|
8
8
|
import { styled as c } from "@mui/material/styles";
|
|
9
9
|
import l from "debug";
|
|
10
10
|
import { types as u } from "@pie-lib/plot";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
12
|
+
import { color as m } from "@pie-lib/render-ui";
|
|
13
13
|
//#region src/bars/common/bars.tsx
|
|
14
14
|
var h = l("pie-lib:chart:bars"), g = [
|
|
15
15
|
"#006699",
|
|
@@ -37,7 +37,7 @@ var h = l("pie-lib:chart:bars"), g = [
|
|
|
37
37
|
"#167A7A",
|
|
38
38
|
"#91862D",
|
|
39
39
|
"#894A65"
|
|
40
|
-
], v = (e, t, n, r, i) => e && t && i ? r[n % r.length] : e && i ?
|
|
40
|
+
], v = (e, t, n, r, i) => e && t && i ? r[n % r.length] : e && i ? m.visualElementsColors.ROLLOVER_FILL_BAR_COLOR : t || null, y = c(t)(() => ({ fill: m.defaults.TERTIARY })), b = class extends o.Component {
|
|
41
41
|
static propTypes = {
|
|
42
42
|
barColor: s.string,
|
|
43
43
|
onChangeCategory: s.func,
|
|
@@ -90,14 +90,14 @@ var h = l("pie-lib:chart:bars"), g = [
|
|
|
90
90
|
};
|
|
91
91
|
render() {
|
|
92
92
|
let { graphProps: e, value: t, label: o, xBand: s, index: c, interactive: l, correctness: u, barColor: h, defineChart: g, correctData: b } = this.props, { scale: x, range: S } = e, { dragValue: C, isHovered: w } = this.state, T = v(w, h, c, _, l && !u), E = Number.isFinite(C) ? C : t, D = s.bandwidth(), O = x.y(S.max - E), k = s(n({ label: o }, c)), A = S.max - E, j = S.max - A, M = b ? b.find((e) => e.label === o) : null, N = l ? r : i, P = !!h;
|
|
93
|
-
return /* @__PURE__ */
|
|
93
|
+
return /* @__PURE__ */ p("g", {
|
|
94
94
|
ref: (e) => this.gRef = e,
|
|
95
95
|
onMouseEnter: this.handleMouseEnter,
|
|
96
96
|
onMouseLeave: this.handleMouseLeave,
|
|
97
97
|
onTouchStart: this.handleMouseEnter,
|
|
98
98
|
onTouchEnd: this.handleMouseLeave,
|
|
99
99
|
children: [
|
|
100
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ f(y, {
|
|
101
101
|
x: k,
|
|
102
102
|
y: x.y(j),
|
|
103
103
|
width: D,
|
|
@@ -107,8 +107,8 @@ var h = l("pie-lib:chart:bars"), g = [
|
|
|
107
107
|
u && u.value === "incorrect" && (() => {
|
|
108
108
|
let e = parseFloat(M && M.value);
|
|
109
109
|
if (isNaN(e)) return null;
|
|
110
|
-
let t = x.y(S.max - e), n = O, r = Math.abs(t - n), i = x.y(e), o = t > n ?
|
|
111
|
-
return /* @__PURE__ */
|
|
110
|
+
let t = x.y(S.max - e), n = O, r = Math.abs(t - n), i = x.y(e), o = t > n ? m.borderGray() : m.defaults.WHITE, s = t > n ? i : i - r;
|
|
111
|
+
return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(y, {
|
|
112
112
|
x: k + 2,
|
|
113
113
|
y: s,
|
|
114
114
|
width: D - 4,
|
|
@@ -119,15 +119,15 @@ var h = l("pie-lib:chart:bars"), g = [
|
|
|
119
119
|
strokeDasharray: "5,2",
|
|
120
120
|
fill: "none"
|
|
121
121
|
}
|
|
122
|
-
}), /* @__PURE__ */
|
|
122
|
+
}), /* @__PURE__ */ f("foreignObject", {
|
|
123
123
|
x: k + D - (P ? 24 : 14),
|
|
124
124
|
y: i - 12,
|
|
125
125
|
width: 24,
|
|
126
126
|
height: 24,
|
|
127
|
-
children: /* @__PURE__ */
|
|
127
|
+
children: /* @__PURE__ */ f(a, { dashColor: o })
|
|
128
128
|
})] });
|
|
129
129
|
})(),
|
|
130
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ f(N, {
|
|
131
131
|
x: k,
|
|
132
132
|
y: E,
|
|
133
133
|
defineChart: g,
|
|
@@ -155,7 +155,7 @@ var h = l("pie-lib:chart:bars"), g = [
|
|
|
155
155
|
};
|
|
156
156
|
render() {
|
|
157
157
|
let { data: t, graphProps: n, xBand: r, onChangeCategory: i, defineChart: a, histogram: o, correctData: s } = this.props;
|
|
158
|
-
return /* @__PURE__ */
|
|
158
|
+
return /* @__PURE__ */ f(e, { children: (t || []).map((e, t) => /* @__PURE__ */ f(x, {
|
|
159
159
|
value: e.value,
|
|
160
160
|
interactive: a || e.interactive,
|
|
161
161
|
defineChart: a,
|
package/dist/chart-setup.js
CHANGED
|
@@ -3,8 +3,8 @@ import { useEffect as t, useState as n } from "react";
|
|
|
3
3
|
import r from "prop-types";
|
|
4
4
|
import { styled as i } from "@mui/material/styles";
|
|
5
5
|
import { AlertDialog as a, NumberTextFieldCustom as o } from "@pie-lib/config-ui";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
+
import { color as l } from "@pie-lib/render-ui";
|
|
8
8
|
import u from "@mui/material/Typography";
|
|
9
9
|
//#region src/chart-setup.tsx
|
|
10
10
|
var d = (e, t, n, r, i) => {
|
|
@@ -39,14 +39,14 @@ var d = (e, t, n, r, i) => {
|
|
|
39
39
|
justifyContent: "space-between",
|
|
40
40
|
alignItems: "center",
|
|
41
41
|
margin: `${e.spacing(3)} 0`
|
|
42
|
-
})), y = i(u)(() => ({ color:
|
|
43
|
-
let { model: i, onChange: o, chartDimensions:
|
|
42
|
+
})), y = i(u)(() => ({ color: l.disabled() })), b = (r) => {
|
|
43
|
+
let { model: i, onChange: o, chartDimensions: l, gridValues: b = {}, labelValues: x = {}, studentNewCategoryDefaultLabel: S = {}, availableChartTypes: C = {}, chartTypeLabel: w } = r, [T, E] = n({
|
|
44
44
|
open: !1,
|
|
45
45
|
title: "",
|
|
46
46
|
text: "",
|
|
47
47
|
onClose: null,
|
|
48
48
|
onConfirm: null
|
|
49
|
-
}), [D, O] = n(!1), [k, A] = n(""), [j, M] = n(0), { range: N = {}, correctAnswer: P, changeInteractiveEnabled: F, changeEditableEnabled: I } = i, L = i.graph, { showInConfigPanel: R, width: z, height: B } =
|
|
49
|
+
}), [D, O] = n(!1), [k, A] = n(""), [j, M] = n(0), { range: N = {}, correctAnswer: P, changeInteractiveEnabled: F, changeEditableEnabled: I } = i, L = i.graph, { showInConfigPanel: R, width: z, height: B } = l || {}, V = {
|
|
50
50
|
min: z?.min ? Math.max(50, z.min) : 50,
|
|
51
51
|
max: z?.max ? Math.min(700, z.max) : 700,
|
|
52
52
|
step: z?.step >= 1 ? Math.min(200, z.step) : 20
|
|
@@ -60,13 +60,13 @@ var d = (e, t, n, r, i) => {
|
|
|
60
60
|
}, W = x && x.range ? { customValues: x.range } : {
|
|
61
61
|
min: 0,
|
|
62
62
|
max: 1e4
|
|
63
|
-
}, G = /* @__PURE__ */
|
|
63
|
+
}, G = /* @__PURE__ */ c(h, { children: [/* @__PURE__ */ s(_, {
|
|
64
64
|
label: "Grid Interval",
|
|
65
65
|
value: N.step,
|
|
66
66
|
variant: "outlined",
|
|
67
67
|
onChange: (e, t) => $("step", t, e),
|
|
68
68
|
...U
|
|
69
|
-
}), /* @__PURE__ */
|
|
69
|
+
}), /* @__PURE__ */ s(_, {
|
|
70
70
|
label: "Label Interval",
|
|
71
71
|
value: N.labelStep,
|
|
72
72
|
variant: "outlined",
|
|
@@ -162,18 +162,18 @@ var d = (e, t, n, r, i) => {
|
|
|
162
162
|
chartType: e
|
|
163
163
|
});
|
|
164
164
|
};
|
|
165
|
-
return /* @__PURE__ */
|
|
166
|
-
/* @__PURE__ */
|
|
165
|
+
return /* @__PURE__ */ c(f, { children: [
|
|
166
|
+
/* @__PURE__ */ s(u, {
|
|
167
167
|
variant: "subtitle1",
|
|
168
168
|
children: "Configure Chart"
|
|
169
169
|
}),
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ c(p, { children: [
|
|
171
|
+
/* @__PURE__ */ c(h, { children: [/* @__PURE__ */ s(e, {
|
|
172
172
|
value: i.chartType,
|
|
173
173
|
onChange: (e) => ne(e.target.value),
|
|
174
174
|
availableChartTypes: C,
|
|
175
175
|
chartTypeLabel: w
|
|
176
|
-
}), /* @__PURE__ */
|
|
176
|
+
}), /* @__PURE__ */ s(_, {
|
|
177
177
|
label: "Max Value",
|
|
178
178
|
value: N.max,
|
|
179
179
|
min: X(i.chartType).min,
|
|
@@ -182,9 +182,9 @@ var d = (e, t, n, r, i) => {
|
|
|
182
182
|
onChange: (e, t) => $("max", t, e)
|
|
183
183
|
})] }),
|
|
184
184
|
!i.chartType.includes("Plot") && G,
|
|
185
|
-
R && /* @__PURE__ */
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
-
/* @__PURE__ */
|
|
185
|
+
R && /* @__PURE__ */ c(v, { children: [
|
|
186
|
+
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(u, { children: "Dimensions(px)" }) }),
|
|
187
|
+
/* @__PURE__ */ c(m, { children: [/* @__PURE__ */ s(g, {
|
|
188
188
|
label: "Width",
|
|
189
189
|
value: L.width,
|
|
190
190
|
min: V.min,
|
|
@@ -192,8 +192,8 @@ var d = (e, t, n, r, i) => {
|
|
|
192
192
|
step: V.step,
|
|
193
193
|
variant: "outlined",
|
|
194
194
|
onChange: (e, t) => Z("width", t)
|
|
195
|
-
}), /* @__PURE__ */
|
|
196
|
-
/* @__PURE__ */
|
|
195
|
+
}), /* @__PURE__ */ s(y, { children: "Min 50, Max 700" })] }),
|
|
196
|
+
/* @__PURE__ */ c(m, { children: [/* @__PURE__ */ s(g, {
|
|
197
197
|
label: "Height",
|
|
198
198
|
value: L.height,
|
|
199
199
|
min: H.min,
|
|
@@ -201,10 +201,10 @@ var d = (e, t, n, r, i) => {
|
|
|
201
201
|
step: H.step,
|
|
202
202
|
variant: "outlined",
|
|
203
203
|
onChange: (e, t) => Z("height", t)
|
|
204
|
-
}), /* @__PURE__ */
|
|
204
|
+
}), /* @__PURE__ */ s(y, { children: "Min 400, Max 700" })] })
|
|
205
205
|
] })
|
|
206
206
|
] }),
|
|
207
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ s(a, {
|
|
208
208
|
open: T.open,
|
|
209
209
|
title: T.title,
|
|
210
210
|
text: T.text,
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import e from "prop-types";
|
|
3
3
|
import { styled as t } from "@mui/material/styles";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { color as r } from "@pie-lib/render-ui";
|
|
6
6
|
import i from "@mui/icons-material/Check";
|
|
7
7
|
import a from "@mui/icons-material/Close";
|
|
8
8
|
//#region src/common/correctness-indicators.tsx
|
|
9
9
|
var o = t(i)(({ theme: e }) => ({
|
|
10
10
|
borderRadius: e.spacing(2),
|
|
11
|
-
color:
|
|
11
|
+
color: r.defaults.WHITE,
|
|
12
12
|
fontSize: "16px",
|
|
13
13
|
width: "16px",
|
|
14
14
|
height: "16px",
|
|
15
15
|
padding: "2px",
|
|
16
|
-
border: `1px solid ${
|
|
16
|
+
border: `1px solid ${r.defaults.WHITE}`,
|
|
17
17
|
stroke: "initial",
|
|
18
18
|
boxSizing: "unset",
|
|
19
|
-
backgroundColor:
|
|
19
|
+
backgroundColor: r.correct(),
|
|
20
20
|
display: "block",
|
|
21
21
|
"&.small": {
|
|
22
22
|
fontSize: "10px",
|
|
@@ -25,49 +25,49 @@ var o = t(i)(({ theme: e }) => ({
|
|
|
25
25
|
}
|
|
26
26
|
})), s = t(a)(({ theme: e }) => ({
|
|
27
27
|
borderRadius: e.spacing(2),
|
|
28
|
-
color:
|
|
28
|
+
color: r.defaults.WHITE,
|
|
29
29
|
fontSize: "16px",
|
|
30
30
|
width: "16px",
|
|
31
31
|
height: "16px",
|
|
32
32
|
padding: "2px",
|
|
33
|
-
border: `1px solid ${
|
|
33
|
+
border: `1px solid ${r.defaults.WHITE}`,
|
|
34
34
|
stroke: "initial",
|
|
35
35
|
boxSizing: "unset",
|
|
36
|
-
backgroundColor:
|
|
36
|
+
backgroundColor: r.incorrectWithIcon(),
|
|
37
37
|
display: "block",
|
|
38
38
|
"&.small": {
|
|
39
39
|
fontSize: "10px",
|
|
40
40
|
width: "10px",
|
|
41
41
|
height: "10px"
|
|
42
42
|
}
|
|
43
|
-
})), c = ({ scale: e, x: t, y:
|
|
43
|
+
})), c = ({ scale: e, x: t, y: r, correctness: i, interactive: a }) => {
|
|
44
44
|
if (!i || !a) return null;
|
|
45
|
-
let c = e ? e.x(t) : t, l = e ? e.y(
|
|
46
|
-
return /* @__PURE__ */
|
|
45
|
+
let c = e ? e.x(t) : t, l = e ? e.y(r) : r, u = i.value === "correct";
|
|
46
|
+
return /* @__PURE__ */ n("foreignObject", {
|
|
47
47
|
x: c - 11,
|
|
48
48
|
y: l - 11,
|
|
49
49
|
width: 22,
|
|
50
50
|
height: 22,
|
|
51
|
-
children:
|
|
51
|
+
children: n(u ? o : s, { title: i.label })
|
|
52
52
|
});
|
|
53
|
-
}, l = ({ scale: e, x: t, correctness:
|
|
54
|
-
if (
|
|
53
|
+
}, l = ({ scale: e, x: t, correctness: r, correctData: i, label: a }) => {
|
|
54
|
+
if (r && r.value === "incorrect") {
|
|
55
55
|
let s = parseFloat(i.find((e) => e.label === a)?.value);
|
|
56
56
|
if (isNaN(s)) return null;
|
|
57
57
|
let c = e.y(s) - 7.5;
|
|
58
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ n("foreignObject", {
|
|
59
59
|
x: e.x(t) - 7.5,
|
|
60
60
|
y: c,
|
|
61
61
|
width: 15,
|
|
62
62
|
height: 15,
|
|
63
|
-
children: /* @__PURE__ */
|
|
63
|
+
children: /* @__PURE__ */ n(o, {
|
|
64
64
|
className: "small",
|
|
65
|
-
title:
|
|
65
|
+
title: r.label
|
|
66
66
|
})
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
return null;
|
|
70
|
-
}, u = ({ correctness: e, interactive: t }) => !e || !t ? null : e.value === "correct" ? /* @__PURE__ */
|
|
70
|
+
}, u = ({ correctness: e, interactive: t }) => !e || !t ? null : e.value === "correct" ? /* @__PURE__ */ n(o, { title: e.label }) : /* @__PURE__ */ n(s, { title: e.label });
|
|
71
71
|
c.propTypes = {
|
|
72
72
|
scale: e.shape({
|
|
73
73
|
x: e.func,
|