@pie-lib/charting 7.0.4-next.31 → 7.0.4-next.36
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/CHANGELOG.json +17 -0
- package/CHANGELOG.md +1116 -0
- package/LICENSE.md +5 -0
- package/lib/actions-button.js +145 -0
- package/lib/actions-button.js.map +1 -0
- package/lib/axes.js +643 -0
- package/lib/axes.js.map +1 -0
- package/lib/bars/bar.js +58 -0
- package/lib/bars/bar.js.map +1 -0
- package/lib/bars/common/bars.js +277 -0
- package/lib/bars/common/bars.js.map +1 -0
- package/lib/bars/common/correct-check-icon.js +54 -0
- package/lib/bars/common/correct-check-icon.js.map +1 -0
- package/lib/bars/histogram.js +59 -0
- package/lib/bars/histogram.js.map +1 -0
- package/lib/chart-setup.js +382 -0
- package/lib/chart-setup.js.map +1 -0
- package/lib/chart-type.js +80 -0
- package/lib/chart-type.js.map +1 -0
- package/lib/chart-types.js +22 -0
- package/lib/chart-types.js.map +1 -0
- package/lib/chart.js +384 -0
- package/lib/chart.js.map +1 -0
- package/lib/common/correctness-indicators.js +156 -0
- package/lib/common/correctness-indicators.js.map +1 -0
- package/lib/common/drag-handle.js +160 -0
- package/lib/common/drag-handle.js.map +1 -0
- package/lib/common/drag-icon.js +52 -0
- package/lib/common/drag-icon.js.map +1 -0
- package/lib/common/styles.js +22 -0
- package/lib/common/styles.js.map +1 -0
- package/lib/grid.js +112 -0
- package/lib/grid.js.map +1 -0
- package/lib/index.js +42 -0
- package/lib/index.js.map +1 -0
- package/lib/key-legend.js +87 -0
- package/lib/key-legend.js.map +1 -0
- package/lib/line/common/drag-handle.js +146 -0
- package/lib/line/common/drag-handle.js.map +1 -0
- package/lib/line/common/line.js +214 -0
- package/lib/line/common/line.js.map +1 -0
- package/lib/line/line-cross.js +214 -0
- package/lib/line/line-cross.js.map +1 -0
- package/lib/line/line-dot.js +158 -0
- package/lib/line/line-dot.js.map +1 -0
- package/lib/mark-label.js +237 -0
- package/lib/mark-label.js.map +1 -0
- package/lib/plot/common/plot.js +349 -0
- package/lib/plot/common/plot.js.map +1 -0
- package/lib/plot/dot.js +110 -0
- package/lib/plot/dot.js.map +1 -0
- package/lib/plot/line.js +140 -0
- package/lib/plot/line.js.map +1 -0
- package/lib/tool-menu.js +106 -0
- package/lib/tool-menu.js.map +1 -0
- package/lib/utils.js +189 -0
- package/lib/utils.js.map +1 -0
- package/package.json +28 -39
- package/src/__tests__/actions-button.test.jsx +280 -0
- package/src/__tests__/axes.test.jsx +667 -0
- package/src/__tests__/chart-setup.test.jsx +532 -0
- package/src/__tests__/chart-type.test.jsx +23 -0
- package/src/__tests__/chart.test.jsx +86 -0
- package/src/__tests__/grid.test.jsx +37 -0
- package/src/__tests__/key-legend.test.jsx +223 -0
- package/src/__tests__/mark-label.test.jsx +33 -0
- package/src/__tests__/tool-menu.test.jsx +522 -0
- package/src/__tests__/utils.js +36 -0
- package/src/__tests__/utils.test.js +100 -0
- package/src/actions-button.jsx +115 -0
- package/src/axes.jsx +594 -0
- package/src/bars/__tests__/bar.test.jsx +45 -0
- package/src/bars/__tests__/histogram.test.jsx +45 -0
- package/src/bars/__tests__/utils.js +30 -0
- package/src/bars/bar.js +28 -0
- package/src/bars/common/__tests__/bars.test.jsx +68 -0
- package/src/bars/common/__tests__/utils.js +30 -0
- package/src/bars/common/bars.jsx +249 -0
- package/src/bars/common/correct-check-icon.jsx +25 -0
- package/src/bars/histogram.js +28 -0
- package/src/chart-setup.jsx +356 -0
- package/src/chart-type.js +59 -0
- package/src/chart-types.js +8 -0
- package/src/chart.jsx +357 -0
- package/src/common/__tests__/correctness-indicators.test.jsx +720 -0
- package/src/common/__tests__/drag-handle.test.jsx +58 -0
- package/src/common/__tests__/utils.js +30 -0
- package/src/common/correctness-indicators.jsx +128 -0
- package/src/common/drag-handle.jsx +125 -0
- package/src/common/drag-icon.jsx +36 -0
- package/src/common/styles.js +19 -0
- package/src/grid.jsx +80 -0
- package/src/index.js +7 -0
- package/src/key-legend.jsx +77 -0
- package/src/line/__tests__/line-cross.test.jsx +463 -0
- package/src/line/__tests__/line-dot.test.jsx +41 -0
- package/src/line/__tests__/utils.js +36 -0
- package/src/line/common/__tests__/drag-handle.test.jsx +62 -0
- package/src/line/common/__tests__/line.test.jsx +79 -0
- package/src/line/common/__tests__/utils.js +30 -0
- package/src/line/common/drag-handle.jsx +114 -0
- package/src/line/common/line.jsx +171 -0
- package/src/line/line-cross.js +144 -0
- package/src/line/line-dot.js +111 -0
- package/src/mark-label.jsx +238 -0
- package/src/plot/__tests__/dot.test.jsx +344 -0
- package/src/plot/__tests__/line.test.jsx +375 -0
- package/src/plot/__tests__/utils.js +30 -0
- package/src/plot/common/__tests__/plot.test.jsx +69 -0
- package/src/plot/common/__tests__/utils.js +30 -0
- package/src/plot/common/plot.jsx +358 -0
- package/src/plot/dot.js +74 -0
- package/src/plot/line.js +98 -0
- package/src/tool-menu.jsx +85 -0
- package/src/utils.js +201 -0
- package/dist/_virtual/_rolldown/runtime.js +0 -23
- package/dist/actions-button.d.ts +0 -26
- package/dist/actions-button.js +0 -84
- package/dist/autosize-input.d.ts +0 -10
- package/dist/autosize-input.js +0 -66
- package/dist/axes.d.ts +0 -84
- package/dist/axes.js +0 -376
- package/dist/bars/bar.d.ts +0 -47
- package/dist/bars/bar.js +0 -27
- package/dist/bars/common/bars.d.ts +0 -98
- package/dist/bars/common/bars.js +0 -174
- package/dist/bars/common/correct-check-icon.d.ts +0 -18
- package/dist/bars/common/correct-check-icon.js +0 -50
- package/dist/bars/histogram.d.ts +0 -47
- package/dist/bars/histogram.js +0 -28
- package/dist/chart-setup.d.ts +0 -29
- package/dist/chart-setup.js +0 -231
- package/dist/chart-type.d.ts +0 -32
- package/dist/chart-type.js +0 -68
- package/dist/chart-types.d.ts +0 -41
- package/dist/chart-types.js +0 -17
- package/dist/chart.d.ts +0 -88
- package/dist/chart.js +0 -250
- package/dist/common/correctness-indicators.d.ts +0 -70
- package/dist/common/correctness-indicators.js +0 -106
- package/dist/common/drag-handle.d.ts +0 -129
- package/dist/common/drag-handle.js +0 -120
- package/dist/common/drag-icon.d.ts +0 -23
- package/dist/common/drag-icon.js +0 -45
- package/dist/common/styles.d.ts +0 -23
- package/dist/common/styles.js +0 -17
- package/dist/grid.d.ts +0 -45
- package/dist/grid.js +0 -56
- package/dist/index.d.ts +0 -14
- package/dist/index.js +0 -6
- package/dist/key-legend.d.ts +0 -19
- package/dist/key-legend.js +0 -46
- package/dist/line/common/drag-handle.d.ts +0 -120
- package/dist/line/common/drag-handle.js +0 -92
- package/dist/line/common/line.d.ts +0 -96
- package/dist/line/common/line.js +0 -114
- package/dist/line/line-cross.d.ts +0 -47
- package/dist/line/line-cross.js +0 -133
- package/dist/line/line-dot.d.ts +0 -47
- package/dist/line/line-dot.js +0 -101
- package/dist/mark-label.d.ts +0 -55
- package/dist/mark-label.js +0 -138
- 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/align.js +0 -6
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/base.js +0 -6
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/clamp.js +0 -6
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/constant.js +0 -6
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/domain.js +0 -6
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/exponent.js +0 -6
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/interpolate.js +0 -10
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/nice.js +0 -37
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/padding.js +0 -6
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/range.js +0 -6
- 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/round.js +0 -7
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/scaleOperator.js +0 -58
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/unknown.js +0 -6
- 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/scales/band.js +0 -9
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/scales/point.js +0 -9
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/coerceNumber.js +0 -10
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/createColorInterpolator.js +0 -29
- 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/isUtcScale.js +0 -7
- 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/@visx_vendor@3.12.0/node_modules/@visx/vendor/esm/d3-interpolate.js +0 -8
- package/dist/node_modules/.bun/@visx_vendor@3.12.0/node_modules/@visx/vendor/esm/d3-scale.js +0 -8
- package/dist/node_modules/.bun/@visx_vendor@3.12.0/node_modules/@visx/vendor/esm/d3-time.js +0 -8
- package/dist/node_modules/.bun/balanced-match@0.4.2/node_modules/balanced-match/index.js +0 -32
- package/dist/node_modules/.bun/balanced-match@1.0.2/node_modules/balanced-match/index.js +0 -33
- package/dist/node_modules/.bun/classnames@2.5.1/node_modules/classnames/index.js +0 -32
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +0 -16
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_Hash.js +0 -21
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_ListCache.js +0 -21
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_Map.js +0 -10
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_MapCache.js +0 -21
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_Symbol.js +0 -9
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js +0 -14
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_baseGetTag.js +0 -15
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_baseIsNative.js +0 -16
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_coreJsData.js +0 -9
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_freeGlobal.js +0 -8
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getMapData.js +0 -14
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getNative.js +0 -15
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getRawTag.js +0 -19
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getValue.js +0 -11
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashClear.js +0 -13
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashDelete.js +0 -12
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashGet.js +0 -18
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashHas.js +0 -14
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashSet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_isKeyable.js +0 -12
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_isMasked.js +0 -16
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheClear.js +0 -11
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js +0 -14
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheGet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheHas.js +0 -13
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheSet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js +0 -19
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js +0 -14
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js +0 -13
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js +0 -13
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_nativeCreate.js +0 -9
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_objectToString.js +0 -12
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_root.js +0 -10
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_toSource.js +0 -20
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/eq.js +0 -11
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/isFunction.js +0 -16
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/isObject.js +0 -12
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/memoize.js +0 -20
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/formula_evaluator.js +0 -37
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/lexer.js +0 -509
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/math_function.js +0 -108
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix.js +0 -31
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix_evaluator.js +0 -45
- package/dist/node_modules/.bun/reduce-css-calc@1.3.0/node_modules/reduce-css-calc/index.js +0 -49
- package/dist/node_modules/.bun/reduce-function-call@1.0.3/node_modules/reduce-function-call/index.js +0 -34
- package/dist/plot/common/plot.d.ts +0 -103
- package/dist/plot/common/plot.js +0 -227
- package/dist/plot/dot.d.ts +0 -47
- package/dist/plot/dot.js +0 -62
- package/dist/plot/line.d.ts +0 -47
- package/dist/plot/line.js +0 -84
- package/dist/tool-menu.d.ts +0 -31
- package/dist/utils.d.ts +0 -39
- package/dist/utils.js +0 -101
|
@@ -1,92 +0,0 @@
|
|
|
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 };
|
|
@@ -1,96 +0,0 @@
|
|
|
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;
|
package/dist/line/common/line.js
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import e from "../../node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js";
|
|
2
|
-
import t from "../../node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/LinePath.js";
|
|
3
|
-
import n, { DragHandle as r } from "./drag-handle.js";
|
|
4
|
-
import i from "react";
|
|
5
|
-
import a from "prop-types";
|
|
6
|
-
import { styled as o } from "@mui/material/styles";
|
|
7
|
-
import { isEqual as s } from "@pie-element/shared-lodash";
|
|
8
|
-
import { types as c } from "@pie-lib/plot";
|
|
9
|
-
import { color as l } from "@pie-lib/render-ui";
|
|
10
|
-
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
11
|
-
//#region src/line/common/line.tsx
|
|
12
|
-
var f = (e, t) => {
|
|
13
|
-
let { max: n } = t || {}, r = e.length;
|
|
14
|
-
return !n || !r ? [] : e.map((e, t) => ({
|
|
15
|
-
...e,
|
|
16
|
-
x: r > 1 ? t * (n / (r - 1)) : .5,
|
|
17
|
-
y: e.value
|
|
18
|
-
}));
|
|
19
|
-
}, p = o(t)(() => ({
|
|
20
|
-
fill: "transparent",
|
|
21
|
-
stroke: l.defaults.TERTIARY,
|
|
22
|
-
strokeWidth: 3,
|
|
23
|
-
transition: "stroke 200ms ease-in, stroke-width 200ms ease-in"
|
|
24
|
-
})), m = o(class extends i.Component {
|
|
25
|
-
static propTypes = {
|
|
26
|
-
onChange: a.func,
|
|
27
|
-
value: a.number,
|
|
28
|
-
label: a.string,
|
|
29
|
-
xBand: a.func,
|
|
30
|
-
index: a.number.isRequired,
|
|
31
|
-
graphProps: c.GraphPropsType.isRequired,
|
|
32
|
-
defineChart: a.bool,
|
|
33
|
-
data: a.arrayOf(a.shape({
|
|
34
|
-
label: a.string,
|
|
35
|
-
value: a.number
|
|
36
|
-
})),
|
|
37
|
-
CustomDraggableComponent: a.func,
|
|
38
|
-
correctData: a.array
|
|
39
|
-
};
|
|
40
|
-
static defaultProps = { index: 0 };
|
|
41
|
-
constructor(e) {
|
|
42
|
-
super(e), this.state = {
|
|
43
|
-
dragValue: void 0,
|
|
44
|
-
line: f(e.data, e.graphProps.domain)
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
UNSAFE_componentWillReceiveProps(e) {
|
|
48
|
-
s(this.props.data, e.data) || this.setState({ line: f(e.data, e.graphProps.domain) });
|
|
49
|
-
}
|
|
50
|
-
setDragValue = (e) => this.setState({ line: e });
|
|
51
|
-
dragStop = (e) => {
|
|
52
|
-
let { onChange: t } = this.props;
|
|
53
|
-
this.setState({ dragging: !1 }, () => {
|
|
54
|
-
t(e, this.state.line[e]);
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
dragValue = (e, t, n) => {
|
|
58
|
-
let r = [...this.state.line];
|
|
59
|
-
r[e].dragValue = n, this.setDragValue(r);
|
|
60
|
-
};
|
|
61
|
-
render() {
|
|
62
|
-
let { graphProps: e, data: t, CustomDraggableComponent: a, defineChart: o, correctData: s } = this.props, { line: c, dragging: l } = this.state, { scale: m } = e, h = l ? c : f(t, e.domain);
|
|
63
|
-
return /* @__PURE__ */ d(i.Fragment, { children: [/* @__PURE__ */ u(p, {
|
|
64
|
-
data: h,
|
|
65
|
-
x: (e) => m.x(e.x),
|
|
66
|
-
y: (e) => m.y(e.dragValue === void 0 ? e.y : e.dragValue),
|
|
67
|
-
className: "line"
|
|
68
|
-
}), h && h.map((t, i) => {
|
|
69
|
-
let c = o || t.interactive;
|
|
70
|
-
return /* @__PURE__ */ u(c ? n : r, {
|
|
71
|
-
x: t.x,
|
|
72
|
-
y: t.dragValue === void 0 ? t.y : t.dragValue,
|
|
73
|
-
interactive: c,
|
|
74
|
-
r: 6,
|
|
75
|
-
onDragStart: () => this.setState({ dragging: !0 }),
|
|
76
|
-
onDrag: (e) => this.dragValue(i, t.dragValue === void 0 ? t.y : t.dragValue, e),
|
|
77
|
-
onDragStop: () => this.dragStop(i),
|
|
78
|
-
graphProps: e,
|
|
79
|
-
CustomDraggableComponent: a,
|
|
80
|
-
correctness: t.correctness,
|
|
81
|
-
correctData: s,
|
|
82
|
-
label: t.label
|
|
83
|
-
}, `point-${t.x}-${i}`);
|
|
84
|
-
})] });
|
|
85
|
-
}
|
|
86
|
-
})(() => ({ "& .line": {
|
|
87
|
-
fill: "transparent",
|
|
88
|
-
stroke: l.defaults.TERTIARY,
|
|
89
|
-
strokeWidth: 3,
|
|
90
|
-
transition: "stroke 200ms ease-in, stroke-width 200ms ease-in"
|
|
91
|
-
} })), h = class extends i.Component {
|
|
92
|
-
static propTypes = {
|
|
93
|
-
data: a.array,
|
|
94
|
-
onChange: a.func,
|
|
95
|
-
xBand: a.func,
|
|
96
|
-
graphProps: c.GraphPropsType.isRequired,
|
|
97
|
-
CustomDraggableComponent: a.func,
|
|
98
|
-
defineChart: a.bool,
|
|
99
|
-
correctData: a.array
|
|
100
|
-
};
|
|
101
|
-
changeLine = (e, t) => {
|
|
102
|
-
let { onChange: n } = this.props, r = [...this.props.data], { dragValue: i, value: a } = t;
|
|
103
|
-
r[e].value = i >= 0 ? i : a, n(r);
|
|
104
|
-
};
|
|
105
|
-
render() {
|
|
106
|
-
let t = this.props;
|
|
107
|
-
return /* @__PURE__ */ u(e, { children: /* @__PURE__ */ u(m, {
|
|
108
|
-
...t,
|
|
109
|
-
onChange: this.changeLine
|
|
110
|
-
}) });
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
//#endregion
|
|
114
|
-
export { h as default };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-lib/packages/charting/src/line/line-cross.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 React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
export declare class LineCross extends React.Component {
|
|
12
|
-
static propTypes: {
|
|
13
|
-
data: PropTypes.Requireable<any[]>;
|
|
14
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
-
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
16
|
-
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
17
|
-
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
-
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
19
|
-
}>>>;
|
|
20
|
-
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
21
|
-
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
22
|
-
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
23
|
-
}>>>;
|
|
24
|
-
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
25
|
-
min: PropTypes.Validator<number>;
|
|
26
|
-
max: PropTypes.Validator<number>;
|
|
27
|
-
step: PropTypes.Requireable<number>;
|
|
28
|
-
}>>>;
|
|
29
|
-
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
30
|
-
min: PropTypes.Validator<number>;
|
|
31
|
-
max: PropTypes.Validator<number>;
|
|
32
|
-
step: PropTypes.Requireable<number>;
|
|
33
|
-
}>>>;
|
|
34
|
-
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
35
|
-
width: PropTypes.Validator<number>;
|
|
36
|
-
height: PropTypes.Validator<number>;
|
|
37
|
-
}>>>;
|
|
38
|
-
}>>>;
|
|
39
|
-
};
|
|
40
|
-
render(): React.JSX.Element;
|
|
41
|
-
}
|
|
42
|
-
declare const _default: () => {
|
|
43
|
-
type: string;
|
|
44
|
-
Component: typeof LineCross;
|
|
45
|
-
name: string;
|
|
46
|
-
};
|
|
47
|
-
export default _default;
|
package/dist/line/line-cross.js
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import e from "../node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js";
|
|
2
|
-
import t from "../node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/LinePath.js";
|
|
3
|
-
import { CorrectnessIndicator as n, SmallCorrectPointIndicator as r } from "../common/correctness-indicators.js";
|
|
4
|
-
import { dataToXBand as i } from "../utils.js";
|
|
5
|
-
import a from "./common/line.js";
|
|
6
|
-
import o, { useState as s } from "react";
|
|
7
|
-
import c from "prop-types";
|
|
8
|
-
import { styled as l } from "@mui/material/styles";
|
|
9
|
-
import { types as u } from "@pie-lib/plot";
|
|
10
|
-
import { color as d } from "@pie-lib/render-ui";
|
|
11
|
-
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
12
|
-
//#region src/line/line-cross.tsx
|
|
13
|
-
var m = l(t)(() => ({
|
|
14
|
-
stroke: d.defaults.TEXT,
|
|
15
|
-
transition: "fill 200ms linear, height 200ms linear",
|
|
16
|
-
"&.non-interactive": { stroke: d.disabled?.() || "#ccc" }
|
|
17
|
-
})), h = l(e)(({ correctness: e, interactive: t }) => ({
|
|
18
|
-
stroke: d.defaults.TEXT,
|
|
19
|
-
transition: "fill 200ms linear, height 200ms linear",
|
|
20
|
-
...e && !t && {
|
|
21
|
-
fill: `${d.defaults.BLACK} !important`,
|
|
22
|
-
stroke: `${d.defaults.BLACK} !important`
|
|
23
|
-
},
|
|
24
|
-
"&.non-interactive": { stroke: d.disabled?.() || "#ccc" }
|
|
25
|
-
})), g = l("circle")(() => ({
|
|
26
|
-
height: "20px",
|
|
27
|
-
fill: "transparent",
|
|
28
|
-
stroke: "transparent"
|
|
29
|
-
})), _ = (e) => {
|
|
30
|
-
let { className: t, scale: i, x: a, y: o, r: c, correctness: l, interactive: u, correctData: _, label: v, ...y } = e, [b, x] = s(!1), S = c * 4, C = S / 2, w = i.x(a), T = i.y(o);
|
|
31
|
-
return /* @__PURE__ */ p(h, {
|
|
32
|
-
className: t,
|
|
33
|
-
correctness: l,
|
|
34
|
-
interactive: u,
|
|
35
|
-
children: [
|
|
36
|
-
/* @__PURE__ */ f(m, {
|
|
37
|
-
data: [{
|
|
38
|
-
x: i.x(a) - c,
|
|
39
|
-
y: i.y(o) + c
|
|
40
|
-
}, {
|
|
41
|
-
x: i.x(a) + c,
|
|
42
|
-
y: i.y(o) - c
|
|
43
|
-
}],
|
|
44
|
-
x: (e) => e.x,
|
|
45
|
-
y: (e) => e.y,
|
|
46
|
-
strokeWidth: 5,
|
|
47
|
-
style: { pointerEvents: "none" }
|
|
48
|
-
}, `point-${a}-${o}-1`),
|
|
49
|
-
/* @__PURE__ */ f(m, {
|
|
50
|
-
data: [{
|
|
51
|
-
x: i.x(a) - c,
|
|
52
|
-
y: i.y(o) - c
|
|
53
|
-
}, {
|
|
54
|
-
x: i.x(a) + c,
|
|
55
|
-
y: i.y(o) + c
|
|
56
|
-
}],
|
|
57
|
-
x: (e) => e.x,
|
|
58
|
-
y: (e) => e.y,
|
|
59
|
-
strokeWidth: 5,
|
|
60
|
-
style: { pointerEvents: "none" }
|
|
61
|
-
}, `point-${a}-${o}-2`),
|
|
62
|
-
b && /* @__PURE__ */ f("rect", {
|
|
63
|
-
x: w - C,
|
|
64
|
-
y: T - C,
|
|
65
|
-
width: S,
|
|
66
|
-
height: S,
|
|
67
|
-
stroke: d.defaults.BORDER_GRAY,
|
|
68
|
-
fill: "none",
|
|
69
|
-
strokeWidth: 2,
|
|
70
|
-
pointerEvents: "none"
|
|
71
|
-
}),
|
|
72
|
-
/* @__PURE__ */ f(g, {
|
|
73
|
-
cx: w,
|
|
74
|
-
cy: T,
|
|
75
|
-
r: c * 2,
|
|
76
|
-
onMouseEnter: () => x(!0),
|
|
77
|
-
onMouseLeave: () => x(!1),
|
|
78
|
-
...y
|
|
79
|
-
}),
|
|
80
|
-
/* @__PURE__ */ f(n, {
|
|
81
|
-
scale: i,
|
|
82
|
-
x: a,
|
|
83
|
-
y: o,
|
|
84
|
-
r: c,
|
|
85
|
-
correctness: l,
|
|
86
|
-
interactive: u
|
|
87
|
-
}),
|
|
88
|
-
/* @__PURE__ */ f(r, {
|
|
89
|
-
scale: i,
|
|
90
|
-
x: a,
|
|
91
|
-
r: c,
|
|
92
|
-
correctness: l,
|
|
93
|
-
correctData: _,
|
|
94
|
-
label: v
|
|
95
|
-
})
|
|
96
|
-
]
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
|
-
_.propTypes = {
|
|
100
|
-
scale: c.object,
|
|
101
|
-
x: c.number,
|
|
102
|
-
y: c.number,
|
|
103
|
-
r: c.number,
|
|
104
|
-
className: c.string,
|
|
105
|
-
correctness: c.shape({
|
|
106
|
-
value: c.string,
|
|
107
|
-
label: c.string
|
|
108
|
-
}),
|
|
109
|
-
interactive: c.bool,
|
|
110
|
-
correctData: c.array,
|
|
111
|
-
label: c.string
|
|
112
|
-
};
|
|
113
|
-
var v = class extends o.Component {
|
|
114
|
-
static propTypes = {
|
|
115
|
-
data: c.array,
|
|
116
|
-
onChange: c.func,
|
|
117
|
-
graphProps: u.GraphPropsType.isRequired
|
|
118
|
-
};
|
|
119
|
-
render() {
|
|
120
|
-
let e = this.props, { data: t, graphProps: n } = e, { scale: r = {}, size: o = {} } = n || {}, s = i(r.x, t, o.width, "lineCross");
|
|
121
|
-
return /* @__PURE__ */ f(a, {
|
|
122
|
-
...e,
|
|
123
|
-
xBand: s,
|
|
124
|
-
CustomDraggableComponent: _
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
}, y = () => ({
|
|
128
|
-
type: "lineCross",
|
|
129
|
-
Component: v,
|
|
130
|
-
name: "Line Cross"
|
|
131
|
-
});
|
|
132
|
-
//#endregion
|
|
133
|
-
export { y as default };
|
package/dist/line/line-dot.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-lib/packages/charting/src/line/line-dot.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 React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
export declare class LineDot extends React.Component {
|
|
12
|
-
static propTypes: {
|
|
13
|
-
data: PropTypes.Requireable<any[]>;
|
|
14
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
-
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
16
|
-
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
17
|
-
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
-
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
19
|
-
}>>>;
|
|
20
|
-
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
21
|
-
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
22
|
-
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
23
|
-
}>>>;
|
|
24
|
-
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
25
|
-
min: PropTypes.Validator<number>;
|
|
26
|
-
max: PropTypes.Validator<number>;
|
|
27
|
-
step: PropTypes.Requireable<number>;
|
|
28
|
-
}>>>;
|
|
29
|
-
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
30
|
-
min: PropTypes.Validator<number>;
|
|
31
|
-
max: PropTypes.Validator<number>;
|
|
32
|
-
step: PropTypes.Requireable<number>;
|
|
33
|
-
}>>>;
|
|
34
|
-
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
35
|
-
width: PropTypes.Validator<number>;
|
|
36
|
-
height: PropTypes.Validator<number>;
|
|
37
|
-
}>>>;
|
|
38
|
-
}>>>;
|
|
39
|
-
};
|
|
40
|
-
render(): React.JSX.Element;
|
|
41
|
-
}
|
|
42
|
-
declare const _default: () => {
|
|
43
|
-
type: string;
|
|
44
|
-
Component: typeof LineDot;
|
|
45
|
-
name: string;
|
|
46
|
-
};
|
|
47
|
-
export default _default;
|
package/dist/line/line-dot.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { CorrectnessIndicator as e, SmallCorrectPointIndicator as t } from "../common/correctness-indicators.js";
|
|
2
|
-
import { dataToXBand as n } from "../utils.js";
|
|
3
|
-
import r from "./common/line.js";
|
|
4
|
-
import i from "react";
|
|
5
|
-
import a from "prop-types";
|
|
6
|
-
import { styled as o } from "@mui/material/styles";
|
|
7
|
-
import { types as s } from "@pie-lib/plot";
|
|
8
|
-
import { color as c } from "@pie-lib/render-ui";
|
|
9
|
-
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
10
|
-
//#region src/line/line-dot.tsx
|
|
11
|
-
var d = o("circle")(() => ({})), f = o("circle")(() => ({
|
|
12
|
-
height: "20px",
|
|
13
|
-
fill: "transparent",
|
|
14
|
-
stroke: "none",
|
|
15
|
-
pointerEvents: "auto"
|
|
16
|
-
})), p = ({ scale: n, x: r, y: a, r: o, correctness: s, interactive: p, correctData: m, label: h, ...g }) => {
|
|
17
|
-
let [_, v] = i.useState(!1), y = !s && p;
|
|
18
|
-
return /* @__PURE__ */ u("g", {
|
|
19
|
-
onMouseEnter: () => v(!0),
|
|
20
|
-
onMouseLeave: () => v(!1),
|
|
21
|
-
onTouchStart: () => v(!0),
|
|
22
|
-
onTouchEnd: () => v(!1),
|
|
23
|
-
children: [
|
|
24
|
-
/* @__PURE__ */ l(f, {
|
|
25
|
-
cx: n.x(r),
|
|
26
|
-
cy: n.y(a),
|
|
27
|
-
r: o * 3,
|
|
28
|
-
onMouseEnter: () => v(!0),
|
|
29
|
-
onMouseLeave: () => v(!1),
|
|
30
|
-
...g
|
|
31
|
-
}),
|
|
32
|
-
/* @__PURE__ */ l(d, {
|
|
33
|
-
cx: n.x(r),
|
|
34
|
-
cy: n.y(a),
|
|
35
|
-
r: o,
|
|
36
|
-
correctness: s,
|
|
37
|
-
interactive: p,
|
|
38
|
-
...g
|
|
39
|
-
}),
|
|
40
|
-
/* @__PURE__ */ l(e, {
|
|
41
|
-
scale: n,
|
|
42
|
-
x: r,
|
|
43
|
-
y: a,
|
|
44
|
-
r: o,
|
|
45
|
-
correctness: s,
|
|
46
|
-
interactive: p
|
|
47
|
-
}),
|
|
48
|
-
/* @__PURE__ */ l(t, {
|
|
49
|
-
scale: n,
|
|
50
|
-
x: r,
|
|
51
|
-
r: o,
|
|
52
|
-
correctness: s,
|
|
53
|
-
correctData: m,
|
|
54
|
-
label: h
|
|
55
|
-
}),
|
|
56
|
-
_ && y && /* @__PURE__ */ l("rect", {
|
|
57
|
-
x: n.x(r) - o * 2,
|
|
58
|
-
y: n.y(a) - o * 2,
|
|
59
|
-
width: o * 4,
|
|
60
|
-
height: o * 4,
|
|
61
|
-
stroke: c.defaults.BORDER_GRAY,
|
|
62
|
-
strokeWidth: "1",
|
|
63
|
-
fill: "none"
|
|
64
|
-
})
|
|
65
|
-
]
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
p.propTypes = {
|
|
69
|
-
scale: a.object,
|
|
70
|
-
x: a.number,
|
|
71
|
-
y: a.number,
|
|
72
|
-
r: a.number,
|
|
73
|
-
correctness: a.shape({
|
|
74
|
-
value: a.string,
|
|
75
|
-
label: a.string
|
|
76
|
-
}),
|
|
77
|
-
interactive: a.bool,
|
|
78
|
-
correctData: a.array,
|
|
79
|
-
label: a.string
|
|
80
|
-
};
|
|
81
|
-
var m = class extends i.Component {
|
|
82
|
-
static propTypes = {
|
|
83
|
-
data: a.array,
|
|
84
|
-
onChange: a.func,
|
|
85
|
-
graphProps: s.GraphPropsType.isRequired
|
|
86
|
-
};
|
|
87
|
-
render() {
|
|
88
|
-
let e = this.props, { data: t, graphProps: i } = e, { scale: a = {}, size: o = {} } = i || {}, s = n(a.x, t, o.width, "lineDot");
|
|
89
|
-
return /* @__PURE__ */ l(r, {
|
|
90
|
-
...e,
|
|
91
|
-
xBand: s,
|
|
92
|
-
CustomDraggableComponent: p
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
}, h = () => ({
|
|
96
|
-
type: "lineDot",
|
|
97
|
-
Component: m,
|
|
98
|
-
name: "Line Dot"
|
|
99
|
-
});
|
|
100
|
-
//#endregion
|
|
101
|
-
export { h as default };
|
package/dist/mark-label.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-lib/packages/charting/src/mark-label.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 const MarkLabel: {
|
|
12
|
-
(props: any): React.JSX.Element;
|
|
13
|
-
propTypes: {
|
|
14
|
-
autoFocus: PropTypes.Requireable<boolean>;
|
|
15
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
16
|
-
error: PropTypes.Requireable<any>;
|
|
17
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
|
-
graphProps: PropTypes.Requireable<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
|
-
inputRef: PropTypes.Requireable<(...args: any[]) => any>;
|
|
43
|
-
mark: PropTypes.Requireable<object>;
|
|
44
|
-
barWidth: PropTypes.Requireable<number>;
|
|
45
|
-
rotate: PropTypes.Requireable<number>;
|
|
46
|
-
correctness: PropTypes.Requireable<PropTypes.InferProps<{
|
|
47
|
-
value: PropTypes.Requireable<string>;
|
|
48
|
-
label: PropTypes.Requireable<string>;
|
|
49
|
-
}>>;
|
|
50
|
-
isHiddenLabel: PropTypes.Requireable<boolean>;
|
|
51
|
-
limitCharacters: PropTypes.Requireable<boolean>;
|
|
52
|
-
correctnessIndicator: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
export default MarkLabel;
|