@pie-lib/charting 7.0.4-next.29 → 7.0.4-next.30
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 +23 -0
- package/dist/actions-button.d.ts +26 -0
- package/dist/actions-button.js +84 -0
- package/dist/autosize-input.d.ts +10 -0
- package/dist/autosize-input.js +66 -0
- package/dist/axes.d.ts +84 -0
- package/dist/axes.js +376 -0
- package/dist/bars/bar.d.ts +47 -0
- package/dist/bars/bar.js +27 -0
- package/dist/bars/common/bars.d.ts +98 -0
- package/dist/bars/common/bars.js +174 -0
- package/dist/bars/common/correct-check-icon.d.ts +18 -0
- package/dist/bars/common/correct-check-icon.js +50 -0
- package/dist/bars/histogram.d.ts +47 -0
- package/dist/bars/histogram.js +28 -0
- package/dist/chart-setup.d.ts +29 -0
- package/dist/chart-setup.js +231 -0
- package/dist/chart-type.d.ts +32 -0
- package/dist/chart-type.js +68 -0
- package/dist/chart-types.d.ts +41 -0
- package/dist/chart-types.js +17 -0
- package/dist/chart.d.ts +88 -0
- package/dist/chart.js +250 -0
- package/dist/common/correctness-indicators.d.ts +70 -0
- package/dist/common/correctness-indicators.js +106 -0
- package/dist/common/drag-handle.d.ts +129 -0
- package/dist/common/drag-handle.js +120 -0
- package/dist/common/drag-icon.d.ts +23 -0
- package/dist/common/drag-icon.js +45 -0
- package/dist/common/styles.d.ts +23 -0
- package/dist/common/styles.js +17 -0
- package/dist/grid.d.ts +45 -0
- package/dist/grid.js +56 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +6 -0
- package/dist/key-legend.d.ts +19 -0
- package/dist/key-legend.js +46 -0
- package/dist/line/common/drag-handle.d.ts +120 -0
- package/dist/line/common/drag-handle.js +92 -0
- package/dist/line/common/line.d.ts +96 -0
- package/dist/line/common/line.js +114 -0
- package/dist/line/line-cross.d.ts +47 -0
- package/dist/line/line-cross.js +133 -0
- package/dist/line/line-dot.d.ts +47 -0
- package/dist/line/line-dot.js +101 -0
- package/dist/mark-label.d.ts +55 -0
- package/dist/mark-label.js +138 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js +101 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisBottom.js +46 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisLeft.js +47 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +63 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js +44 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/constants/orientation.js +9 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js +14 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +21 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +16 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +8 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickPosition.js +15 -0
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridColumns.js +79 -0
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridRows.js +79 -0
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +6 -0
- package/dist/node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js +50 -0
- package/dist/node_modules/.bun/@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js +18 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/align.js +6 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/base.js +6 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/clamp.js +6 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/constant.js +6 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/domain.js +6 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/exponent.js +6 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/interpolate.js +10 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/nice.js +37 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/padding.js +6 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/range.js +6 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/reverse.js +9 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/round.js +7 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/scaleOperator.js +58 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/unknown.js +6 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/zero.js +9 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/scales/band.js +9 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/scales/point.js +9 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/coerceNumber.js +10 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/createColorInterpolator.js +29 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js +9 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/isUtcScale.js +7 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/toString.js +6 -0
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Bar.js +29 -0
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Circle.js +29 -0
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js +47 -0
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/LinePath.js +50 -0
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/util/D3ShapeFactories.js +9 -0
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/util/setNumberOrNumberAccessor.js +6 -0
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js +53 -0
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js +57 -0
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/hooks/useText.js +91 -0
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/util/getStringWidth.js +21 -0
- package/dist/node_modules/.bun/@visx_vendor@3.12.0/node_modules/@visx/vendor/esm/d3-interpolate.js +8 -0
- package/dist/node_modules/.bun/@visx_vendor@3.12.0/node_modules/@visx/vendor/esm/d3-scale.js +8 -0
- package/dist/node_modules/.bun/@visx_vendor@3.12.0/node_modules/@visx/vendor/esm/d3-time.js +8 -0
- package/dist/node_modules/.bun/balanced-match@0.4.2/node_modules/balanced-match/index.js +32 -0
- package/dist/node_modules/.bun/balanced-match@1.0.2/node_modules/balanced-match/index.js +33 -0
- package/dist/node_modules/.bun/classnames@2.5.1/node_modules/classnames/index.js +32 -0
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +16 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Hash.js +21 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_ListCache.js +21 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Map.js +10 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_MapCache.js +21 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Symbol.js +9 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_assocIndexOf.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseGetTag.js +15 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseIsNative.js +16 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_coreJsData.js +9 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_freeGlobal.js +8 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getMapData.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getNative.js +15 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getRawTag.js +19 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getValue.js +11 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashClear.js +13 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashDelete.js +12 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashGet.js +18 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashHas.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashSet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isKeyable.js +12 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isMasked.js +16 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheClear.js +11 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheDelete.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheGet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheHas.js +13 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheSet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheClear.js +19 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheDelete.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheGet.js +13 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheHas.js +13 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheSet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_nativeCreate.js +9 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_objectToString.js +12 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_root.js +10 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_toSource.js +20 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/eq.js +11 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isFunction.js +16 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isObject.js +12 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/memoize.js +20 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/formula_evaluator.js +37 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/lexer.js +509 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/math_function.js +108 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix.js +31 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix_evaluator.js +45 -0
- package/dist/node_modules/.bun/reduce-css-calc@1.3.0/node_modules/reduce-css-calc/index.js +49 -0
- package/dist/node_modules/.bun/reduce-function-call@1.0.3/node_modules/reduce-function-call/index.js +34 -0
- package/dist/plot/common/plot.d.ts +103 -0
- package/dist/plot/common/plot.js +227 -0
- package/dist/plot/dot.d.ts +47 -0
- package/dist/plot/dot.js +62 -0
- package/dist/plot/line.d.ts +47 -0
- package/dist/plot/line.js +84 -0
- package/dist/tool-menu.d.ts +31 -0
- package/dist/utils.d.ts +39 -0
- package/dist/utils.js +101 -0
- package/package.json +39 -28
- package/CHANGELOG.json +0 -17
- package/CHANGELOG.md +0 -1116
- package/LICENSE.md +0 -5
- package/lib/actions-button.js +0 -145
- package/lib/actions-button.js.map +0 -1
- package/lib/axes.js +0 -643
- package/lib/axes.js.map +0 -1
- package/lib/bars/bar.js +0 -58
- package/lib/bars/bar.js.map +0 -1
- package/lib/bars/common/bars.js +0 -277
- package/lib/bars/common/bars.js.map +0 -1
- package/lib/bars/common/correct-check-icon.js +0 -54
- package/lib/bars/common/correct-check-icon.js.map +0 -1
- package/lib/bars/histogram.js +0 -59
- package/lib/bars/histogram.js.map +0 -1
- package/lib/chart-setup.js +0 -382
- package/lib/chart-setup.js.map +0 -1
- package/lib/chart-type.js +0 -80
- package/lib/chart-type.js.map +0 -1
- package/lib/chart-types.js +0 -22
- package/lib/chart-types.js.map +0 -1
- package/lib/chart.js +0 -384
- package/lib/chart.js.map +0 -1
- package/lib/common/correctness-indicators.js +0 -156
- package/lib/common/correctness-indicators.js.map +0 -1
- package/lib/common/drag-handle.js +0 -160
- package/lib/common/drag-handle.js.map +0 -1
- package/lib/common/drag-icon.js +0 -52
- package/lib/common/drag-icon.js.map +0 -1
- package/lib/common/styles.js +0 -22
- package/lib/common/styles.js.map +0 -1
- package/lib/grid.js +0 -112
- package/lib/grid.js.map +0 -1
- package/lib/index.js +0 -42
- package/lib/index.js.map +0 -1
- package/lib/key-legend.js +0 -87
- package/lib/key-legend.js.map +0 -1
- package/lib/line/common/drag-handle.js +0 -146
- package/lib/line/common/drag-handle.js.map +0 -1
- package/lib/line/common/line.js +0 -214
- package/lib/line/common/line.js.map +0 -1
- package/lib/line/line-cross.js +0 -214
- package/lib/line/line-cross.js.map +0 -1
- package/lib/line/line-dot.js +0 -158
- package/lib/line/line-dot.js.map +0 -1
- package/lib/mark-label.js +0 -237
- package/lib/mark-label.js.map +0 -1
- package/lib/plot/common/plot.js +0 -349
- package/lib/plot/common/plot.js.map +0 -1
- package/lib/plot/dot.js +0 -110
- package/lib/plot/dot.js.map +0 -1
- package/lib/plot/line.js +0 -140
- package/lib/plot/line.js.map +0 -1
- package/lib/tool-menu.js +0 -106
- package/lib/tool-menu.js.map +0 -1
- package/lib/utils.js +0 -189
- package/lib/utils.js.map +0 -1
- package/src/__tests__/actions-button.test.jsx +0 -280
- package/src/__tests__/axes.test.jsx +0 -667
- package/src/__tests__/chart-setup.test.jsx +0 -532
- package/src/__tests__/chart-type.test.jsx +0 -23
- package/src/__tests__/chart.test.jsx +0 -86
- package/src/__tests__/grid.test.jsx +0 -37
- package/src/__tests__/key-legend.test.jsx +0 -223
- package/src/__tests__/mark-label.test.jsx +0 -33
- package/src/__tests__/tool-menu.test.jsx +0 -522
- package/src/__tests__/utils.js +0 -36
- package/src/__tests__/utils.test.js +0 -100
- package/src/actions-button.jsx +0 -115
- package/src/axes.jsx +0 -594
- package/src/bars/__tests__/bar.test.jsx +0 -45
- package/src/bars/__tests__/histogram.test.jsx +0 -45
- package/src/bars/__tests__/utils.js +0 -30
- package/src/bars/bar.js +0 -28
- package/src/bars/common/__tests__/bars.test.jsx +0 -68
- package/src/bars/common/__tests__/utils.js +0 -30
- package/src/bars/common/bars.jsx +0 -249
- package/src/bars/common/correct-check-icon.jsx +0 -25
- package/src/bars/histogram.js +0 -28
- package/src/chart-setup.jsx +0 -356
- package/src/chart-type.js +0 -59
- package/src/chart-types.js +0 -8
- package/src/chart.jsx +0 -357
- package/src/common/__tests__/correctness-indicators.test.jsx +0 -720
- package/src/common/__tests__/drag-handle.test.jsx +0 -58
- package/src/common/__tests__/utils.js +0 -30
- package/src/common/correctness-indicators.jsx +0 -128
- package/src/common/drag-handle.jsx +0 -125
- package/src/common/drag-icon.jsx +0 -36
- package/src/common/styles.js +0 -19
- package/src/grid.jsx +0 -80
- package/src/index.js +0 -7
- package/src/key-legend.jsx +0 -77
- package/src/line/__tests__/line-cross.test.jsx +0 -463
- package/src/line/__tests__/line-dot.test.jsx +0 -41
- package/src/line/__tests__/utils.js +0 -36
- package/src/line/common/__tests__/drag-handle.test.jsx +0 -62
- package/src/line/common/__tests__/line.test.jsx +0 -79
- package/src/line/common/__tests__/utils.js +0 -30
- package/src/line/common/drag-handle.jsx +0 -114
- package/src/line/common/line.jsx +0 -171
- package/src/line/line-cross.js +0 -144
- package/src/line/line-dot.js +0 -111
- package/src/mark-label.jsx +0 -238
- package/src/plot/__tests__/dot.test.jsx +0 -344
- package/src/plot/__tests__/line.test.jsx +0 -375
- package/src/plot/__tests__/utils.js +0 -30
- package/src/plot/common/__tests__/plot.test.jsx +0 -69
- package/src/plot/common/__tests__/utils.js +0 -30
- package/src/plot/common/plot.jsx +0 -358
- package/src/plot/dot.js +0 -74
- package/src/plot/line.js +0 -98
- package/src/tool-menu.jsx +0 -85
- package/src/utils.js +0 -201
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { getAdjustedX as e, getScale as t } from "../utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import n from "prop-types";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
//#region src/common/drag-icon.tsx
|
|
6
|
+
var a = ({ width: n, scaleValue: a, color: o }) => /* @__PURE__ */ r("svg", {
|
|
7
|
+
x: e(n, a),
|
|
8
|
+
y: t(n)?.deltay,
|
|
9
|
+
color: o,
|
|
10
|
+
width: n,
|
|
11
|
+
height: n,
|
|
12
|
+
overflow: "visible",
|
|
13
|
+
viewBox: `0 0 ${n} ${n}`,
|
|
14
|
+
style: { overflow: "visible !important" },
|
|
15
|
+
children: /* @__PURE__ */ i("g", {
|
|
16
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
+
fill: "currentColor",
|
|
18
|
+
stroke: "currentColor",
|
|
19
|
+
transform: `scale(${a})`,
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ r("circle", {
|
|
22
|
+
cx: "28.5",
|
|
23
|
+
cy: "23.5",
|
|
24
|
+
r: "22",
|
|
25
|
+
fill: "white",
|
|
26
|
+
stroke: "currentColor"
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ r("path", {
|
|
29
|
+
d: "M33.5 21.25H23.4609C22.7578 21.25 22.4062 20.4297 22.9141 19.9219L27.9141 14.9219C28.2266 14.6094 28.7344 14.6094 29.0469 14.9219L34.0469 19.9219C34.5547 20.4297 34.2031 21.25 33.5 21.25Z",
|
|
30
|
+
fill: "currentColor"
|
|
31
|
+
}),
|
|
32
|
+
/* @__PURE__ */ r("path", {
|
|
33
|
+
d: "M23.5 25.75L33.5391 25.75C34.2422 25.75 34.5938 26.5703 34.0859 27.0781L29.0859 32.0781C28.7734 32.3906 28.2656 32.3906 27.9531 32.0781L22.9531 27.0781C22.4453 26.5703 22.7969 25.75 23.5 25.75Z",
|
|
34
|
+
fill: "currentColor"
|
|
35
|
+
})
|
|
36
|
+
]
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
a.propTypes = {
|
|
40
|
+
width: n.number.isRequired,
|
|
41
|
+
scaleValue: n.number.isRequired,
|
|
42
|
+
color: n.string
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { a as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/charting/src/common/styles.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const disabled: (key?: string) => {
|
|
10
|
+
[x: string]: string;
|
|
11
|
+
pointerEvents: string;
|
|
12
|
+
border: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const correct: (key?: string) => {
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
pointerEvents: string;
|
|
17
|
+
border: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const incorrect: (key?: string) => {
|
|
20
|
+
[x: string]: any;
|
|
21
|
+
pointerEvents: string;
|
|
22
|
+
border: string;
|
|
23
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { color as e } from "@pie-lib/render-ui";
|
|
2
|
+
//#region src/common/styles.ts
|
|
3
|
+
var t = (t = "fill") => ({
|
|
4
|
+
[t]: `var(--graph-disabled, ${e.disabled()})`,
|
|
5
|
+
pointerEvents: "none",
|
|
6
|
+
border: "none"
|
|
7
|
+
}), n = (t = "fill") => ({
|
|
8
|
+
[t]: e.correct(),
|
|
9
|
+
pointerEvents: "none",
|
|
10
|
+
border: `solid 1px ${e.correct()}`
|
|
11
|
+
}), r = (t = "fill") => ({
|
|
12
|
+
[t]: e.incorrect(),
|
|
13
|
+
pointerEvents: "none",
|
|
14
|
+
border: `solid 1px ${e.incorrect()}`
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { n as correct, t as disabled, r as incorrect };
|
package/dist/grid.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/charting/src/grid.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare class Grid extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
className: PropTypes.Requireable<string>;
|
|
14
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
15
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
16
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
17
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
+
}>>>;
|
|
19
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
20
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
21
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
22
|
+
}>>>;
|
|
23
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
24
|
+
min: PropTypes.Validator<number>;
|
|
25
|
+
max: PropTypes.Validator<number>;
|
|
26
|
+
step: PropTypes.Requireable<number>;
|
|
27
|
+
}>>>;
|
|
28
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
29
|
+
min: PropTypes.Validator<number>;
|
|
30
|
+
max: PropTypes.Validator<number>;
|
|
31
|
+
step: PropTypes.Requireable<number>;
|
|
32
|
+
}>>>;
|
|
33
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
34
|
+
width: PropTypes.Validator<number>;
|
|
35
|
+
height: PropTypes.Validator<number>;
|
|
36
|
+
}>>>;
|
|
37
|
+
}>>>;
|
|
38
|
+
xBand: PropTypes.Requireable<(...args: any[]) => any>;
|
|
39
|
+
columnTickValues: PropTypes.Requireable<any[]>;
|
|
40
|
+
rowTickValues: PropTypes.Requireable<any[]>;
|
|
41
|
+
};
|
|
42
|
+
static defaultProps: {};
|
|
43
|
+
render(): React.JSX.Element;
|
|
44
|
+
}
|
|
45
|
+
export default Grid;
|
package/dist/grid.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import e from "./node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridRows.js";
|
|
2
|
+
import t from "./node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridColumns.js";
|
|
3
|
+
import n from "react";
|
|
4
|
+
import r from "prop-types";
|
|
5
|
+
import { styled as i } from "@mui/material/styles";
|
|
6
|
+
import { types as a } from "@pie-lib/plot";
|
|
7
|
+
import { color as o } from "@pie-lib/render-ui";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
|
+
//#region src/grid.tsx
|
|
10
|
+
var l = i("g")(() => ({ stroke: o.primaryLight() })), u = class extends n.Component {
|
|
11
|
+
static propTypes = {
|
|
12
|
+
className: r.string,
|
|
13
|
+
graphProps: a.GraphPropsType.isRequired,
|
|
14
|
+
xBand: r.func,
|
|
15
|
+
columnTickValues: r.array,
|
|
16
|
+
rowTickValues: r.array
|
|
17
|
+
};
|
|
18
|
+
static defaultProps = {};
|
|
19
|
+
render() {
|
|
20
|
+
let { graphProps: n, xBand: r, rowTickValues: i, columnTickValues: a } = this.props, { scale: u = {}, size: d = {}, range: f = {} } = n || {}, { step: p = 0, labelStep: m = 0 } = f, h = p && m && p < m, g = (e, t) => {
|
|
21
|
+
let n = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, i = 10 ** Math.max(n, r);
|
|
22
|
+
return e * i % (t * i) / i;
|
|
23
|
+
}, { unlabeledLines: _, labeledLines: v } = (i || []).reduce((e, t) => (h && g(t, m) !== 0 ? e.unlabeledLines.push(t) : e.labeledLines.push(t), e), {
|
|
24
|
+
unlabeledLines: [],
|
|
25
|
+
labeledLines: []
|
|
26
|
+
});
|
|
27
|
+
return /* @__PURE__ */ c(l, { children: [
|
|
28
|
+
/* @__PURE__ */ s(e, {
|
|
29
|
+
scale: u.y,
|
|
30
|
+
width: d.width,
|
|
31
|
+
tickValues: _,
|
|
32
|
+
lineStyle: {
|
|
33
|
+
stroke: o.fadedPrimary(),
|
|
34
|
+
strokeWidth: 1
|
|
35
|
+
}
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ s(e, {
|
|
38
|
+
scale: u.y,
|
|
39
|
+
width: d.width,
|
|
40
|
+
tickValues: v,
|
|
41
|
+
lineStyle: {
|
|
42
|
+
stroke: _.length ? o.visualElementsColors.GRIDLINES_COLOR : o.fadedPrimary(),
|
|
43
|
+
strokeWidth: 1
|
|
44
|
+
}
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ s(t, {
|
|
47
|
+
scale: r,
|
|
48
|
+
height: d.height,
|
|
49
|
+
offset: r.bandwidth() / 2,
|
|
50
|
+
tickValues: a
|
|
51
|
+
})
|
|
52
|
+
] });
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
//#endregion
|
|
56
|
+
export { u as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/charting/src/index.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import Chart from './chart.js';
|
|
10
|
+
import chartTypes from './chart-types.js';
|
|
11
|
+
import ConfigureChartPanel from './chart-setup.js';
|
|
12
|
+
import ChartType from './chart-type.js';
|
|
13
|
+
import KeyLegend from './key-legend.js';
|
|
14
|
+
export { Chart, chartTypes, ChartType, ConfigureChartPanel, KeyLegend };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/charting/src/key-legend.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
declare const KeyLegend: {
|
|
12
|
+
({ language }: {
|
|
13
|
+
language: any;
|
|
14
|
+
}): React.JSX.Element;
|
|
15
|
+
propTypes: {
|
|
16
|
+
language: PropTypes.Requireable<string>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default KeyLegend;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import e from "prop-types";
|
|
3
|
+
import { styled as t } from "@mui/material/styles";
|
|
4
|
+
import { color as n } from "@pie-lib/render-ui";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
import a from "@mui/icons-material/Check";
|
|
7
|
+
import o from "@mui/icons-material/Close";
|
|
8
|
+
import s from "@pie-lib/translator";
|
|
9
|
+
//#region src/key-legend.tsx
|
|
10
|
+
var c = t("div")(({ theme: e }) => ({
|
|
11
|
+
backgroundColor: n.defaults.WHITE,
|
|
12
|
+
padding: e.spacing(2),
|
|
13
|
+
width: "355px",
|
|
14
|
+
boxShadow: "inset 0px 1px 5px 0px #9297A6",
|
|
15
|
+
display: "flex",
|
|
16
|
+
flexDirection: "column",
|
|
17
|
+
gap: "16px"
|
|
18
|
+
})), l = t("div")(() => ({
|
|
19
|
+
display: "flex",
|
|
20
|
+
alignItems: "center",
|
|
21
|
+
gap: "12px"
|
|
22
|
+
})), u = t("div")(({ theme: e }) => ({
|
|
23
|
+
fontSize: e.typography.h6.fontSize,
|
|
24
|
+
fontWeight: "700"
|
|
25
|
+
})), d = t("div")(() => ({ marginLeft: "2px" })), f = t(a)(({ theme: e }) => ({
|
|
26
|
+
backgroundColor: n.correct(),
|
|
27
|
+
borderRadius: e.spacing(2),
|
|
28
|
+
color: n.defaults.WHITE
|
|
29
|
+
})), p = t(o)(({ theme: e }) => ({
|
|
30
|
+
backgroundColor: n.incorrectWithIcon(),
|
|
31
|
+
borderRadius: e.spacing(2),
|
|
32
|
+
color: n.defaults.WHITE
|
|
33
|
+
})), m = t("div")(() => ({
|
|
34
|
+
marginLeft: "3px",
|
|
35
|
+
display: "flex",
|
|
36
|
+
alignItems: "center",
|
|
37
|
+
gap: "12px"
|
|
38
|
+
})), { translator: h } = s, g = ({ language: e }) => /* @__PURE__ */ i(c, { children: [
|
|
39
|
+
/* @__PURE__ */ r(u, { children: "Key" }),
|
|
40
|
+
/* @__PURE__ */ i(l, { children: [/* @__PURE__ */ r(p, {}), /* @__PURE__ */ r("div", { children: h.t("charting.keyLegend.incorrectAnswer", { lng: e }) })] }),
|
|
41
|
+
/* @__PURE__ */ i(l, { children: [/* @__PURE__ */ r(f, {}), /* @__PURE__ */ r("div", { children: h.t("charting.keyLegend.correctAnswer", { lng: e }) })] }),
|
|
42
|
+
/* @__PURE__ */ i(m, { children: [/* @__PURE__ */ r(f, { fontSize: "small" }), /* @__PURE__ */ r(d, { children: h.t("charting.keyLegend.correctKeyAnswer", { lng: e }) })] })
|
|
43
|
+
] });
|
|
44
|
+
g.propTypes = { language: e.string };
|
|
45
|
+
//#endregion
|
|
46
|
+
export { g as default };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/charting/src/line/common/drag-handle.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
declare class RawDragHandle extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
x: PropTypes.Validator<number>;
|
|
14
|
+
y: PropTypes.Validator<number>;
|
|
15
|
+
width: PropTypes.Requireable<number>;
|
|
16
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
17
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
18
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
19
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
20
|
+
}>>>;
|
|
21
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
22
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
23
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
24
|
+
}>>>;
|
|
25
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
26
|
+
min: PropTypes.Validator<number>;
|
|
27
|
+
max: PropTypes.Validator<number>;
|
|
28
|
+
step: PropTypes.Requireable<number>;
|
|
29
|
+
}>>>;
|
|
30
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
31
|
+
min: PropTypes.Validator<number>;
|
|
32
|
+
max: PropTypes.Validator<number>;
|
|
33
|
+
step: PropTypes.Requireable<number>;
|
|
34
|
+
}>>>;
|
|
35
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
36
|
+
width: PropTypes.Validator<number>;
|
|
37
|
+
height: PropTypes.Validator<number>;
|
|
38
|
+
}>>>;
|
|
39
|
+
}>>>;
|
|
40
|
+
className: PropTypes.Requireable<string>;
|
|
41
|
+
interactive: PropTypes.Requireable<boolean>;
|
|
42
|
+
CustomDraggableComponent: PropTypes.Requireable<(...args: any[]) => any>;
|
|
43
|
+
correctness: PropTypes.Requireable<PropTypes.InferProps<{
|
|
44
|
+
value: PropTypes.Requireable<string>;
|
|
45
|
+
label: PropTypes.Requireable<string>;
|
|
46
|
+
}>>;
|
|
47
|
+
};
|
|
48
|
+
render(): React.JSX.Element | null;
|
|
49
|
+
}
|
|
50
|
+
export declare const DragHandle: typeof RawDragHandle;
|
|
51
|
+
declare const DraggableHandle: {
|
|
52
|
+
new (props: any): {
|
|
53
|
+
grid: any;
|
|
54
|
+
onStart: any;
|
|
55
|
+
position: any;
|
|
56
|
+
tiny: any;
|
|
57
|
+
getScaledBounds: any;
|
|
58
|
+
getClientPoint: any;
|
|
59
|
+
skipDragOutsideOfBounds: any;
|
|
60
|
+
onDrag: any;
|
|
61
|
+
getDelta: any;
|
|
62
|
+
applyDelta: any;
|
|
63
|
+
onStop: any;
|
|
64
|
+
render(): React.JSX.Element;
|
|
65
|
+
context: unknown;
|
|
66
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
67
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
68
|
+
readonly props: Readonly<{}>;
|
|
69
|
+
state: Readonly<{}>;
|
|
70
|
+
refs: {
|
|
71
|
+
[key: string]: React.ReactInstance;
|
|
72
|
+
};
|
|
73
|
+
componentDidMount?(): void;
|
|
74
|
+
shouldComponentUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
75
|
+
componentWillUnmount?(): void;
|
|
76
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
77
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>): any;
|
|
78
|
+
componentDidUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
79
|
+
componentWillMount?(): void;
|
|
80
|
+
UNSAFE_componentWillMount?(): void;
|
|
81
|
+
componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
|
82
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
|
83
|
+
componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
84
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
85
|
+
};
|
|
86
|
+
propTypes: {
|
|
87
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
88
|
+
onDragStart: PropTypes.Requireable<(...args: any[]) => any>;
|
|
89
|
+
onDrag: PropTypes.Requireable<(...args: any[]) => any>;
|
|
90
|
+
onDragStop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
91
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
92
|
+
onMove: PropTypes.Requireable<(...args: any[]) => any>;
|
|
93
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
94
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
95
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
96
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
97
|
+
}>>>;
|
|
98
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
99
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
100
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
101
|
+
}>>>;
|
|
102
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
103
|
+
min: PropTypes.Validator<number>;
|
|
104
|
+
max: PropTypes.Validator<number>;
|
|
105
|
+
step: PropTypes.Requireable<number>;
|
|
106
|
+
}>>>;
|
|
107
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
108
|
+
min: PropTypes.Validator<number>;
|
|
109
|
+
max: PropTypes.Validator<number>;
|
|
110
|
+
step: PropTypes.Requireable<number>;
|
|
111
|
+
}>>>;
|
|
112
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
113
|
+
width: PropTypes.Validator<number>;
|
|
114
|
+
height: PropTypes.Validator<number>;
|
|
115
|
+
}>>>;
|
|
116
|
+
}>>>;
|
|
117
|
+
};
|
|
118
|
+
contextType?: React.Context<any> | undefined;
|
|
119
|
+
};
|
|
120
|
+
export default DraggableHandle;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import e from "../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
2
|
+
import { disabled as t } from "../../common/styles.js";
|
|
3
|
+
import n from "react";
|
|
4
|
+
import r from "prop-types";
|
|
5
|
+
import { styled as i } from "@mui/material/styles";
|
|
6
|
+
import { gridDraggable as a, types as o, utils as s } from "@pie-lib/plot";
|
|
7
|
+
import { color as c } from "@pie-lib/render-ui";
|
|
8
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
9
|
+
//#region src/line/common/drag-handle.tsx
|
|
10
|
+
var u = i("g")(({ theme: e }) => ({
|
|
11
|
+
color: "black",
|
|
12
|
+
"& .handle": {
|
|
13
|
+
transition: "fill 200ms linear, height 200ms linear",
|
|
14
|
+
"&.non-interactive": t("fill")
|
|
15
|
+
},
|
|
16
|
+
"& .transparentHandle": {
|
|
17
|
+
height: "20px",
|
|
18
|
+
fill: "transparent",
|
|
19
|
+
stroke: "transparent"
|
|
20
|
+
},
|
|
21
|
+
"& .line": {
|
|
22
|
+
stroke: c.defaults.TEXT,
|
|
23
|
+
transition: "fill 200ms linear, height 200ms linear",
|
|
24
|
+
"&.non-interactive": t("stroke")
|
|
25
|
+
},
|
|
26
|
+
"& .disabledPoint": {
|
|
27
|
+
fill: c.defaults.BLACK + " !important",
|
|
28
|
+
stroke: c.defaults.BLACK + " !important"
|
|
29
|
+
},
|
|
30
|
+
"& .correctIcon": { backgroundColor: c.correct() },
|
|
31
|
+
"& .incorrectIcon": { backgroundColor: c.incorrectWithIcon() },
|
|
32
|
+
"& .correctnessIcon": {
|
|
33
|
+
borderRadius: e.spacing(2),
|
|
34
|
+
color: c.defaults.WHITE,
|
|
35
|
+
fontSize: "16px",
|
|
36
|
+
width: "16px",
|
|
37
|
+
height: "16px",
|
|
38
|
+
padding: "2px",
|
|
39
|
+
border: `1px solid ${c.defaults.WHITE}`,
|
|
40
|
+
stroke: "initial",
|
|
41
|
+
boxSizing: "unset"
|
|
42
|
+
},
|
|
43
|
+
"& .smallIcon": {
|
|
44
|
+
fontSize: "10px",
|
|
45
|
+
width: "10px",
|
|
46
|
+
height: "10px"
|
|
47
|
+
}
|
|
48
|
+
})), d = class extends n.Component {
|
|
49
|
+
static propTypes = {
|
|
50
|
+
x: r.number.isRequired,
|
|
51
|
+
y: r.number.isRequired,
|
|
52
|
+
width: r.number,
|
|
53
|
+
graphProps: o.GraphPropsType.isRequired,
|
|
54
|
+
className: r.string,
|
|
55
|
+
interactive: r.bool,
|
|
56
|
+
CustomDraggableComponent: r.func,
|
|
57
|
+
correctness: r.shape({
|
|
58
|
+
value: r.string,
|
|
59
|
+
label: r.string
|
|
60
|
+
})
|
|
61
|
+
};
|
|
62
|
+
render() {
|
|
63
|
+
let { x: t, y: n, graphProps: r, className: i, interactive: a, CustomDraggableComponent: o, correctness: s, ...c } = this.props, { scale: d } = r;
|
|
64
|
+
return o ? /* @__PURE__ */ l(u, { children: /* @__PURE__ */ l(o, {
|
|
65
|
+
scale: d,
|
|
66
|
+
x: t,
|
|
67
|
+
y: n,
|
|
68
|
+
className: e(i, !a && "non-interactive"),
|
|
69
|
+
correctness: s,
|
|
70
|
+
interactive: a,
|
|
71
|
+
...c
|
|
72
|
+
}) }) : null;
|
|
73
|
+
}
|
|
74
|
+
}, f = a({
|
|
75
|
+
axis: "y",
|
|
76
|
+
fromDelta: (e, t) => (t.x = 0, s.point(e).add(s.point(t)).y),
|
|
77
|
+
bounds: (e, { domain: t, range: n }) => {
|
|
78
|
+
let r = {
|
|
79
|
+
left: 0,
|
|
80
|
+
top: e.y,
|
|
81
|
+
bottom: e.y,
|
|
82
|
+
right: 0
|
|
83
|
+
};
|
|
84
|
+
return s.bounds(r, t, n);
|
|
85
|
+
},
|
|
86
|
+
anchorPoint: (e) => ({
|
|
87
|
+
x: e.x,
|
|
88
|
+
y: e.y
|
|
89
|
+
})
|
|
90
|
+
})(d);
|
|
91
|
+
//#endregion
|
|
92
|
+
export { d as DragHandle, f as default };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/charting/src/line/common/line.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare class RawLine extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
14
|
+
value: PropTypes.Requireable<number>;
|
|
15
|
+
label: PropTypes.Requireable<string>;
|
|
16
|
+
xBand: PropTypes.Requireable<(...args: any[]) => any>;
|
|
17
|
+
index: PropTypes.Validator<number>;
|
|
18
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
19
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
20
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
21
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
22
|
+
}>>>;
|
|
23
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
24
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
25
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
26
|
+
}>>>;
|
|
27
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
28
|
+
min: PropTypes.Validator<number>;
|
|
29
|
+
max: PropTypes.Validator<number>;
|
|
30
|
+
step: PropTypes.Requireable<number>;
|
|
31
|
+
}>>>;
|
|
32
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
33
|
+
min: PropTypes.Validator<number>;
|
|
34
|
+
max: PropTypes.Validator<number>;
|
|
35
|
+
step: PropTypes.Requireable<number>;
|
|
36
|
+
}>>>;
|
|
37
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
38
|
+
width: PropTypes.Validator<number>;
|
|
39
|
+
height: PropTypes.Validator<number>;
|
|
40
|
+
}>>>;
|
|
41
|
+
}>>>;
|
|
42
|
+
defineChart: PropTypes.Requireable<boolean>;
|
|
43
|
+
data: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
44
|
+
label: PropTypes.Requireable<string>;
|
|
45
|
+
value: PropTypes.Requireable<number>;
|
|
46
|
+
}> | null | undefined)[]>;
|
|
47
|
+
CustomDraggableComponent: PropTypes.Requireable<(...args: any[]) => any>;
|
|
48
|
+
correctData: PropTypes.Requireable<any[]>;
|
|
49
|
+
};
|
|
50
|
+
static defaultProps: {
|
|
51
|
+
index: number;
|
|
52
|
+
};
|
|
53
|
+
constructor(props: any);
|
|
54
|
+
UNSAFE_componentWillReceiveProps(nextProps: any): void;
|
|
55
|
+
setDragValue: (line: any) => void;
|
|
56
|
+
dragStop: any;
|
|
57
|
+
dragValue: any;
|
|
58
|
+
render(): React.JSX.Element;
|
|
59
|
+
}
|
|
60
|
+
export declare class Line extends React.Component {
|
|
61
|
+
static propTypes: {
|
|
62
|
+
data: PropTypes.Requireable<any[]>;
|
|
63
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
64
|
+
xBand: PropTypes.Requireable<(...args: any[]) => any>;
|
|
65
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
66
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
67
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
68
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
69
|
+
}>>>;
|
|
70
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
71
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
72
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
73
|
+
}>>>;
|
|
74
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
75
|
+
min: PropTypes.Validator<number>;
|
|
76
|
+
max: PropTypes.Validator<number>;
|
|
77
|
+
step: PropTypes.Requireable<number>;
|
|
78
|
+
}>>>;
|
|
79
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
80
|
+
min: PropTypes.Validator<number>;
|
|
81
|
+
max: PropTypes.Validator<number>;
|
|
82
|
+
step: PropTypes.Requireable<number>;
|
|
83
|
+
}>>>;
|
|
84
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
85
|
+
width: PropTypes.Validator<number>;
|
|
86
|
+
height: PropTypes.Validator<number>;
|
|
87
|
+
}>>>;
|
|
88
|
+
}>>>;
|
|
89
|
+
CustomDraggableComponent: PropTypes.Requireable<(...args: any[]) => any>;
|
|
90
|
+
defineChart: PropTypes.Requireable<boolean>;
|
|
91
|
+
correctData: PropTypes.Requireable<any[]>;
|
|
92
|
+
};
|
|
93
|
+
changeLine: any;
|
|
94
|
+
render(): React.JSX.Element;
|
|
95
|
+
}
|
|
96
|
+
export default Line;
|