@pie-lib/graphing-solution-set 4.0.4-next.3 → 4.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/autosize-input.d.ts +10 -0
- package/dist/autosize-input.js +66 -0
- package/dist/axis/arrow.d.ts +13 -0
- package/dist/axis/arrow.js +34 -0
- package/dist/axis/axes.d.ts +132 -0
- package/dist/axis/axes.js +214 -0
- package/dist/axis/index.d.ts +10 -0
- package/dist/bg.d.ts +51 -0
- package/dist/bg.js +44 -0
- package/dist/container/actions.d.ts +15 -0
- package/dist/container/actions.js +7 -0
- package/dist/container/index.d.ts +58 -0
- package/dist/container/index.js +48 -0
- package/dist/container/marks.d.ts +10 -0
- package/dist/container/marks.js +11 -0
- package/dist/container/middleware.d.ts +10 -0
- package/dist/container/middleware.js +4 -0
- package/dist/container/reducer.d.ts +14 -0
- package/dist/container/reducer.js +7 -0
- package/dist/coordinates-label.d.ts +50 -0
- package/dist/coordinates-label.js +46 -0
- package/dist/graph-with-controls.d.ts +85 -0
- package/dist/graph-with-controls.js +155 -0
- package/dist/graph.d.ts +119 -0
- package/dist/graph.js +221 -0
- package/dist/grid-setup.d.ts +27 -0
- package/dist/grid-setup.js +307 -0
- package/dist/grid.d.ts +43 -0
- package/dist/grid.js +59 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +6 -0
- package/dist/labels.d.ts +73 -0
- package/dist/labels.js +134 -0
- package/dist/mark-label.d.ts +50 -0
- package/dist/mark-label.js +84 -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/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/Grid.js +79 -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/utils/coerceNumber.js +10 -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/toString.js +6 -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/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/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/invariant@2.2.4/node_modules/invariant/browser.js +28 -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/react-redux@9.3.0_9e2203c65d1d5fa1/node_modules/react-redux/dist/react-redux.js +471 -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/node_modules/.bun/redux-undo@1.1.0/node_modules/redux-undo/dist/redux-undo.js +185 -0
- package/dist/node_modules/.bun/redux@5.0.1/node_modules/redux/dist/redux.js +198 -0
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +53 -0
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +51 -0
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/with-selector.js +10 -0
- package/dist/toggle-bar.d.ts +40 -0
- package/dist/tool-menu.d.ts +21 -0
- package/dist/tool-menu.js +188 -0
- package/dist/tools/index.d.ts +17 -0
- package/dist/tools/index.js +12 -0
- package/dist/tools/line/component.d.ts +113 -0
- package/dist/tools/line/component.js +58 -0
- package/dist/tools/line/index.d.ts +13 -0
- package/dist/tools/line/index.js +6 -0
- package/dist/tools/polygon/component.d.ts +117 -0
- package/dist/tools/polygon/component.js +194 -0
- package/dist/tools/polygon/index.d.ts +19 -0
- package/dist/tools/polygon/index.js +55 -0
- package/dist/tools/polygon/line.d.ts +125 -0
- package/dist/tools/polygon/polygon.d.ts +122 -0
- package/dist/tools/polygon/polygon.js +62 -0
- package/dist/tools/shared/arrow-head.d.ts +43 -0
- package/dist/tools/shared/arrow-head.js +37 -0
- package/dist/tools/shared/line/index.d.ts +240 -0
- package/dist/tools/shared/line/index.js +320 -0
- package/dist/tools/shared/line/line-path.d.ts +57 -0
- package/dist/tools/shared/line/with-root-edge.d.ts +143 -0
- package/dist/tools/shared/point/arrow-point.d.ts +57 -0
- package/dist/tools/shared/point/arrow-point.js +47 -0
- package/dist/tools/shared/point/arrow.d.ts +46 -0
- package/dist/tools/shared/point/arrow.js +36 -0
- package/dist/tools/shared/point/base-point.d.ts +50 -0
- package/dist/tools/shared/point/base-point.js +88 -0
- package/dist/tools/shared/point/index.d.ts +217 -0
- package/dist/tools/shared/point/index.js +51 -0
- package/dist/tools/shared/styles.d.ts +24 -0
- package/dist/tools/shared/styles.js +17 -0
- package/dist/tools/shared/types.d.ts +15 -0
- package/dist/tools/shared/types.js +10 -0
- package/dist/undo-redo.d.ts +20 -0
- package/dist/undo-redo.js +33 -0
- package/dist/use-debounce.d.ts +9 -0
- package/dist/use-debounce.js +13 -0
- package/dist/utils.d.ts +58 -0
- package/dist/utils.js +72 -0
- package/package.json +46 -34
- package/CHANGELOG.json +0 -1
- package/CHANGELOG.md +0 -449
- package/LICENSE.md +0 -5
- package/lib/axis/arrow.js +0 -79
- package/lib/axis/arrow.js.map +0 -1
- package/lib/axis/axes.js +0 -327
- package/lib/axis/axes.js.map +0 -1
- package/lib/axis/index.js +0 -21
- package/lib/axis/index.js.map +0 -1
- package/lib/bg.js +0 -114
- package/lib/bg.js.map +0 -1
- package/lib/container/actions.js +0 -18
- package/lib/container/actions.js.map +0 -1
- package/lib/container/index.js +0 -120
- package/lib/container/index.js.map +0 -1
- package/lib/container/marks.js +0 -22
- package/lib/container/marks.js.map +0 -1
- package/lib/container/middleware.js +0 -19
- package/lib/container/middleware.js.map +0 -1
- package/lib/container/reducer.js +0 -18
- package/lib/container/reducer.js.map +0 -1
- package/lib/coordinates-label.js +0 -77
- package/lib/coordinates-label.js.map +0 -1
- package/lib/graph-with-controls.js +0 -297
- package/lib/graph-with-controls.js.map +0 -1
- package/lib/graph.js +0 -353
- package/lib/graph.js.map +0 -1
- package/lib/grid-setup.js +0 -414
- package/lib/grid-setup.js.map +0 -1
- package/lib/grid.js +0 -131
- package/lib/grid.js.map +0 -1
- package/lib/index.js +0 -40
- package/lib/index.js.map +0 -1
- package/lib/labels.js +0 -199
- package/lib/labels.js.map +0 -1
- package/lib/mark-label.js +0 -159
- package/lib/mark-label.js.map +0 -1
- package/lib/toggle-bar.js +0 -248
- package/lib/toggle-bar.js.map +0 -1
- package/lib/tool-menu.js +0 -218
- package/lib/tool-menu.js.map +0 -1
- package/lib/tools/index.js +0 -24
- package/lib/tools/index.js.map +0 -1
- package/lib/tools/line/component.js +0 -92
- package/lib/tools/line/component.js.map +0 -1
- package/lib/tools/line/index.js +0 -11
- package/lib/tools/line/index.js.map +0 -1
- package/lib/tools/polygon/component.js +0 -358
- package/lib/tools/polygon/component.js.map +0 -1
- package/lib/tools/polygon/index.js +0 -89
- package/lib/tools/polygon/index.js.map +0 -1
- package/lib/tools/polygon/line.js +0 -114
- package/lib/tools/polygon/line.js.map +0 -1
- package/lib/tools/polygon/polygon.js +0 -128
- package/lib/tools/polygon/polygon.js.map +0 -1
- package/lib/tools/shared/arrow-head.js +0 -62
- package/lib/tools/shared/arrow-head.js.map +0 -1
- package/lib/tools/shared/line/index.js +0 -539
- package/lib/tools/shared/line/index.js.map +0 -1
- package/lib/tools/shared/line/line-path.js +0 -121
- package/lib/tools/shared/line/line-path.js.map +0 -1
- package/lib/tools/shared/line/with-root-edge.js +0 -121
- package/lib/tools/shared/line/with-root-edge.js.map +0 -1
- package/lib/tools/shared/point/arrow-point.js +0 -86
- package/lib/tools/shared/point/arrow-point.js.map +0 -1
- package/lib/tools/shared/point/arrow.js +0 -70
- package/lib/tools/shared/point/arrow.js.map +0 -1
- package/lib/tools/shared/point/base-point.js +0 -137
- package/lib/tools/shared/point/base-point.js.map +0 -1
- package/lib/tools/shared/point/index.js +0 -80
- package/lib/tools/shared/point/index.js.map +0 -1
- package/lib/tools/shared/styles.js +0 -26
- package/lib/tools/shared/styles.js.map +0 -1
- package/lib/tools/shared/types.js +0 -15
- package/lib/tools/shared/types.js.map +0 -1
- package/lib/undo-redo.js +0 -67
- package/lib/undo-redo.js.map +0 -1
- package/lib/use-debounce.js +0 -25
- package/lib/use-debounce.js.map +0 -1
- package/lib/utils.js +0 -235
- package/lib/utils.js.map +0 -1
- package/src/__tests__/bg.test.jsx +0 -250
- package/src/__tests__/coordinates-label.test.jsx +0 -243
- package/src/__tests__/graph-with-controls.test.jsx +0 -184
- package/src/__tests__/graph.test.jsx +0 -93
- package/src/__tests__/grid-setup.test.jsx +0 -645
- package/src/__tests__/grid.test.jsx +0 -23
- package/src/__tests__/labels.test.jsx +0 -41
- package/src/__tests__/mark-label.test.jsx +0 -66
- package/src/__tests__/toggle-bar.test.jsx +0 -106
- package/src/__tests__/tool-menu.test.jsx +0 -453
- package/src/__tests__/undo-redo.test.jsx +0 -26
- package/src/__tests__/use-debounce.test.js +0 -21
- package/src/__tests__/utils.js +0 -41
- package/src/__tests__/utils.test.js +0 -105
- package/src/axis/__tests__/arrow.test.jsx +0 -43
- package/src/axis/__tests__/axes.test.jsx +0 -182
- package/src/axis/arrow.jsx +0 -57
- package/src/axis/axes.jsx +0 -284
- package/src/axis/index.js +0 -3
- package/src/bg.jsx +0 -96
- package/src/container/__tests__/actions.test.js +0 -105
- package/src/container/__tests__/index.test.jsx +0 -227
- package/src/container/__tests__/marks.test.js +0 -172
- package/src/container/__tests__/middleware.test.js +0 -235
- package/src/container/__tests__/reducer.test.js +0 -324
- package/src/container/actions.js +0 -8
- package/src/container/index.jsx +0 -85
- package/src/container/marks.js +0 -14
- package/src/container/middleware.js +0 -7
- package/src/container/reducer.js +0 -5
- package/src/coordinates-label.jsx +0 -62
- package/src/graph-with-controls.jsx +0 -242
- package/src/graph.jsx +0 -333
- package/src/grid-setup.jsx +0 -432
- package/src/grid.jsx +0 -133
- package/src/index.js +0 -7
- package/src/labels.jsx +0 -173
- package/src/mark-label.jsx +0 -125
- package/src/toggle-bar.jsx +0 -221
- package/src/tool-menu.jsx +0 -235
- package/src/tools/index.js +0 -8
- package/src/tools/line/__tests__/component.test.jsx +0 -37
- package/src/tools/line/component.jsx +0 -77
- package/src/tools/line/index.js +0 -4
- package/src/tools/polygon/__tests__/component.test.jsx +0 -487
- package/src/tools/polygon/__tests__/index.test.js +0 -65
- package/src/tools/polygon/__tests__/line.test.jsx +0 -23
- package/src/tools/polygon/__tests__/polygon.test.jsx +0 -44
- package/src/tools/polygon/component.jsx +0 -324
- package/src/tools/polygon/index.js +0 -52
- package/src/tools/polygon/line.jsx +0 -80
- package/src/tools/polygon/polygon.jsx +0 -93
- package/src/tools/shared/__tests__/arrow-head.test.jsx +0 -33
- package/src/tools/shared/arrow-head.jsx +0 -46
- package/src/tools/shared/line/__tests__/index.test.jsx +0 -553
- package/src/tools/shared/line/__tests__/line-path.test.jsx +0 -56
- package/src/tools/shared/line/__tests__/with-root-edge.test.jsx +0 -488
- package/src/tools/shared/line/index.jsx +0 -471
- package/src/tools/shared/line/line-path.jsx +0 -85
- package/src/tools/shared/line/with-root-edge.jsx +0 -97
- package/src/tools/shared/point/__tests__/arrow-point.test.jsx +0 -91
- package/src/tools/shared/point/__tests__/arrow.test.jsx +0 -469
- package/src/tools/shared/point/__tests__/base-point.test.jsx +0 -87
- package/src/tools/shared/point/arrow-point.jsx +0 -60
- package/src/tools/shared/point/arrow.jsx +0 -40
- package/src/tools/shared/point/base-point.jsx +0 -113
- package/src/tools/shared/point/index.jsx +0 -58
- package/src/tools/shared/styles.js +0 -20
- package/src/tools/shared/types.js +0 -8
- package/src/undo-redo.jsx +0 -37
- package/src/use-debounce.js +0 -13
- package/src/utils.js +0 -230
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import t from "prop-types";
|
|
3
|
+
import { styled as n } from "@mui/material/styles";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { Button as a, Radio as o, Typography as s } from "@mui/material";
|
|
6
|
+
//#region src/tool-menu.tsx
|
|
7
|
+
var c = class extends e.Component {
|
|
8
|
+
static propTypes = {
|
|
9
|
+
gssLineData: t.object,
|
|
10
|
+
disabled: t.bool,
|
|
11
|
+
onChange: t.func
|
|
12
|
+
};
|
|
13
|
+
onChangeRadioValue = (e) => {
|
|
14
|
+
let { gssLineData: t, onChange: n } = this.props, r = t.selectedTool;
|
|
15
|
+
t.selectedTool = e.target.value, n(t, r);
|
|
16
|
+
};
|
|
17
|
+
lineTypeChange = (e, t) => {
|
|
18
|
+
let { gssLineData: n, onChange: r } = this.props, i = n.selectedTool;
|
|
19
|
+
n[`line${e}`].lineType = t, r(n, i);
|
|
20
|
+
};
|
|
21
|
+
render() {
|
|
22
|
+
let { gssLineData: e, disabled: t } = this.props;
|
|
23
|
+
return /* @__PURE__ */ r(l, { children: /* @__PURE__ */ i("div", {
|
|
24
|
+
className: "selectLineRadioGroup",
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ i("div", {
|
|
27
|
+
className: "radioFieldOuter",
|
|
28
|
+
children: [/* @__PURE__ */ i("div", {
|
|
29
|
+
className: "radioFieldInner",
|
|
30
|
+
children: [/* @__PURE__ */ r(o, {
|
|
31
|
+
name: "select-line-radio-buttons",
|
|
32
|
+
onChange: this.onChangeRadioValue,
|
|
33
|
+
value: "lineA",
|
|
34
|
+
disabled: !!t,
|
|
35
|
+
checked: e.selectedTool === "lineA",
|
|
36
|
+
className: "lineTypeRadio"
|
|
37
|
+
}), /* @__PURE__ */ r(s, {
|
|
38
|
+
className: "lineNameFont",
|
|
39
|
+
children: "Line A"
|
|
40
|
+
})]
|
|
41
|
+
}), /* @__PURE__ */ i("div", {
|
|
42
|
+
className: "radioFieldButtons",
|
|
43
|
+
children: [/* @__PURE__ */ i(a, {
|
|
44
|
+
size: "small",
|
|
45
|
+
variant: "contained",
|
|
46
|
+
color: e.lineA.lineType === "Solid" ? "primary" : "inherit",
|
|
47
|
+
disabled: !!t,
|
|
48
|
+
onClick: () => this.lineTypeChange("A", "Solid"),
|
|
49
|
+
className: e.lineA.lineType === "Solid" ? t ? "lineTypeButtonLeftSelectedDisabled" : "lineTypeButtonLeftSelected" : t ? "lineTypeButtonLeftUnSelectedDisabled" : "lineTypeButtonLeftUnSelected",
|
|
50
|
+
children: [e.lineA.lineType === "Solid" && "✔", " Solid"]
|
|
51
|
+
}), /* @__PURE__ */ i(a, {
|
|
52
|
+
size: "small",
|
|
53
|
+
variant: "contained",
|
|
54
|
+
color: e.lineA.lineType === "Dashed" ? "primary" : "inherit",
|
|
55
|
+
disabled: !!t,
|
|
56
|
+
onClick: () => this.lineTypeChange("A", "Dashed"),
|
|
57
|
+
className: e.lineA.lineType === "Dashed" ? t ? "lineTypeButtonRightSelectedDisabled" : "lineTypeButtonRightSelected" : t ? "lineTypeButtonRightUnSelectedDisabled" : "lineTypeButtonRightUnSelected",
|
|
58
|
+
children: [e.lineA.lineType === "Dashed" && "✔", " Dashed"]
|
|
59
|
+
})]
|
|
60
|
+
})]
|
|
61
|
+
}),
|
|
62
|
+
e.numberOfLines === 2 && /* @__PURE__ */ i("div", {
|
|
63
|
+
className: "radioFieldOuter",
|
|
64
|
+
children: [/* @__PURE__ */ i("div", {
|
|
65
|
+
className: "radioFieldInner",
|
|
66
|
+
children: [/* @__PURE__ */ r(o, {
|
|
67
|
+
name: "select-line-radio-buttons",
|
|
68
|
+
onChange: this.onChangeRadioValue,
|
|
69
|
+
value: "lineB",
|
|
70
|
+
disabled: !!t,
|
|
71
|
+
checked: e.selectedTool === "lineB",
|
|
72
|
+
className: "lineTypeRadio"
|
|
73
|
+
}), /* @__PURE__ */ r(s, {
|
|
74
|
+
className: "lineNameFont",
|
|
75
|
+
children: "Line B"
|
|
76
|
+
})]
|
|
77
|
+
}), /* @__PURE__ */ i("div", {
|
|
78
|
+
className: "radioFieldButtons",
|
|
79
|
+
children: [/* @__PURE__ */ i(a, {
|
|
80
|
+
size: "small",
|
|
81
|
+
variant: "contained",
|
|
82
|
+
color: e.lineB.lineType === "Solid" ? "primary" : "inherit",
|
|
83
|
+
disabled: !!t,
|
|
84
|
+
onClick: () => this.lineTypeChange("B", "Solid"),
|
|
85
|
+
className: e.lineB.lineType === "Solid" ? t ? "lineTypeButtonLeftSelectedDisabled" : "lineTypeButtonLeftSelected" : t ? "lineTypeButtonLeftUnSelectedDisabled" : "lineTypeButtonLeftUnSelected",
|
|
86
|
+
children: [e.lineB.lineType === "Solid" && "✔", " Solid"]
|
|
87
|
+
}), /* @__PURE__ */ i(a, {
|
|
88
|
+
size: "small",
|
|
89
|
+
variant: "contained",
|
|
90
|
+
color: e.lineB.lineType === "Dashed" ? "primary" : "inherit",
|
|
91
|
+
disabled: !!t,
|
|
92
|
+
onClick: () => this.lineTypeChange("B", "Dashed"),
|
|
93
|
+
className: e.lineB.lineType === "Dashed" ? t ? "lineTypeButtonRightSelectedDisabled" : "lineTypeButtonRightSelected" : t ? "lineTypeButtonRightUnSelectedDisabled" : "lineTypeButtonRightUnSelected",
|
|
94
|
+
children: [e.lineB.lineType === "Dashed" && "✔", " Dashed"]
|
|
95
|
+
})]
|
|
96
|
+
})]
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ r("div", {
|
|
99
|
+
className: "radioFieldOuter",
|
|
100
|
+
children: /* @__PURE__ */ i("div", {
|
|
101
|
+
className: "radioFieldInner",
|
|
102
|
+
children: [/* @__PURE__ */ r(o, {
|
|
103
|
+
name: "select-line-radio-buttons",
|
|
104
|
+
onChange: this.onChangeRadioValue,
|
|
105
|
+
value: "solutionSet",
|
|
106
|
+
disabled: !!t,
|
|
107
|
+
checked: e.selectedTool === "solutionSet",
|
|
108
|
+
className: "lineTypeRadio"
|
|
109
|
+
}), /* @__PURE__ */ r(s, {
|
|
110
|
+
className: "lineNameFont",
|
|
111
|
+
children: "Solution Set"
|
|
112
|
+
})]
|
|
113
|
+
})
|
|
114
|
+
})
|
|
115
|
+
]
|
|
116
|
+
}) });
|
|
117
|
+
}
|
|
118
|
+
}, l = n("div")(() => ({
|
|
119
|
+
"& .selectLineRadioGroup": {
|
|
120
|
+
display: "flex",
|
|
121
|
+
flexWrap: "wrap",
|
|
122
|
+
flexDirection: "row"
|
|
123
|
+
},
|
|
124
|
+
"& .radioFieldOuter": {
|
|
125
|
+
display: "flex",
|
|
126
|
+
flexWrap: "wrap",
|
|
127
|
+
flexDirection: "column"
|
|
128
|
+
},
|
|
129
|
+
"& .radioFieldInner": {
|
|
130
|
+
display: "flex",
|
|
131
|
+
flexWrap: "wrap",
|
|
132
|
+
flexDirection: "row",
|
|
133
|
+
alignItems: "center"
|
|
134
|
+
},
|
|
135
|
+
"& .radioFieldButtons": {
|
|
136
|
+
display: "flex",
|
|
137
|
+
flexWrap: "wrap",
|
|
138
|
+
flexDirection: "row",
|
|
139
|
+
padding: "0 .9rem"
|
|
140
|
+
},
|
|
141
|
+
"& .lineNameFont": {
|
|
142
|
+
fontWeight: "bold",
|
|
143
|
+
padding: "0 5px 0 0"
|
|
144
|
+
},
|
|
145
|
+
"& .lineTypeRadio": { color: "#000000 !important" },
|
|
146
|
+
"& .lineTypeButtonLeftSelected": {
|
|
147
|
+
textTransform: "none",
|
|
148
|
+
border: "1px solid #3E4EB1",
|
|
149
|
+
backgroundColor: "#3E4EB1 !important",
|
|
150
|
+
color: "#FFFFFF !important",
|
|
151
|
+
borderRadius: "4px 0 0 4px"
|
|
152
|
+
},
|
|
153
|
+
"& .lineTypeButtonLeftUnSelected": {
|
|
154
|
+
textTransform: "none",
|
|
155
|
+
border: "1px solid #3E4EB1",
|
|
156
|
+
backgroundColor: "#FFFFFF !important",
|
|
157
|
+
color: "#3E4EB1 !important",
|
|
158
|
+
borderRadius: "4px 0 0 4px"
|
|
159
|
+
},
|
|
160
|
+
"& .lineTypeButtonRightSelected": {
|
|
161
|
+
textTransform: "none",
|
|
162
|
+
border: "1px solid #3E4EB1",
|
|
163
|
+
backgroundColor: "#3E4EB1 !important",
|
|
164
|
+
color: "#FFFFFF !important",
|
|
165
|
+
borderRadius: "0 4px 4px 0"
|
|
166
|
+
},
|
|
167
|
+
"& .lineTypeButtonRightUnSelected": {
|
|
168
|
+
textTransform: "none",
|
|
169
|
+
border: "1px solid #3E4EB1",
|
|
170
|
+
backgroundColor: "#FFFFFF !important",
|
|
171
|
+
color: "#3E4EB1 !important",
|
|
172
|
+
borderRadius: "0 4px 4px 0"
|
|
173
|
+
},
|
|
174
|
+
"& .lineTypeButtonLeftSelectedDisabled, & .lineTypeButtonRightSelectedDisabled": {
|
|
175
|
+
backgroundColor: "#3E4EB1 !important",
|
|
176
|
+
color: "#FFFFFF !important",
|
|
177
|
+
cursor: "default",
|
|
178
|
+
pointerEvents: "none"
|
|
179
|
+
},
|
|
180
|
+
"& .lineTypeButtonLeftUnSelectedDisabled, & .lineTypeButtonRightUnSelectedDisabled": {
|
|
181
|
+
backgroundColor: "#FFFFFF !important",
|
|
182
|
+
color: "#3E4EB1 !important",
|
|
183
|
+
cursor: "default",
|
|
184
|
+
pointerEvents: "none"
|
|
185
|
+
}
|
|
186
|
+
}));
|
|
187
|
+
//#endregion
|
|
188
|
+
export { c as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing-solution-set/src/tools/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 { tool as polygon } from './polygon/index.js';
|
|
10
|
+
import { tool as line } from './line/index.js';
|
|
11
|
+
declare const allTools: string[];
|
|
12
|
+
declare const toolsArr: {
|
|
13
|
+
type: any;
|
|
14
|
+
Component: any;
|
|
15
|
+
addPoint: (point: any, mark: any) => any;
|
|
16
|
+
}[];
|
|
17
|
+
export { allTools, toolsArr, line, polygon };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { tool as t } from "./polygon/index.js";
|
|
3
|
+
import { tool as n } from "./line/index.js";
|
|
4
|
+
//#region src/tools/index.ts
|
|
5
|
+
var r = /* @__PURE__ */ e({
|
|
6
|
+
allTools: () => i,
|
|
7
|
+
line: () => n,
|
|
8
|
+
polygon: () => t,
|
|
9
|
+
toolsArr: () => a
|
|
10
|
+
}), i = ["line", "polygon"], a = [n(), t()];
|
|
11
|
+
//#endregion
|
|
12
|
+
export { i as allTools, a as toolsArr, r as tools_exports };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing-solution-set/src/tools/line/component.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 ArrowedLine: {
|
|
12
|
+
(props: any): React.JSX.Element;
|
|
13
|
+
propTypes: {
|
|
14
|
+
className: PropTypes.Requireable<string>;
|
|
15
|
+
fill: PropTypes.Requireable<string>;
|
|
16
|
+
correctness: PropTypes.Requireable<string>;
|
|
17
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
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
|
+
from: PropTypes.Requireable<PropTypes.InferProps<{
|
|
43
|
+
x: PropTypes.Validator<number>;
|
|
44
|
+
y: PropTypes.Validator<number>;
|
|
45
|
+
}>>;
|
|
46
|
+
to: PropTypes.Requireable<PropTypes.InferProps<{
|
|
47
|
+
x: PropTypes.Validator<number>;
|
|
48
|
+
y: PropTypes.Validator<number>;
|
|
49
|
+
}>>;
|
|
50
|
+
markerId: PropTypes.Requireable<string>;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
declare const Component: {
|
|
54
|
+
new (props: any): {
|
|
55
|
+
startDrag: () => void;
|
|
56
|
+
stopDrag: any;
|
|
57
|
+
changeMark: any;
|
|
58
|
+
changeMarkProps: any;
|
|
59
|
+
render(): React.JSX.Element;
|
|
60
|
+
context: unknown;
|
|
61
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
62
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
63
|
+
readonly props: Readonly<{}>;
|
|
64
|
+
state: Readonly<{}>;
|
|
65
|
+
refs: {
|
|
66
|
+
[key: string]: React.ReactInstance;
|
|
67
|
+
};
|
|
68
|
+
componentDidMount?(): void;
|
|
69
|
+
shouldComponentUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
70
|
+
componentWillUnmount?(): void;
|
|
71
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
72
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>): any;
|
|
73
|
+
componentDidUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
74
|
+
componentWillMount?(): void;
|
|
75
|
+
UNSAFE_componentWillMount?(): void;
|
|
76
|
+
componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
|
77
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
|
78
|
+
componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
79
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
80
|
+
};
|
|
81
|
+
propTypes: {
|
|
82
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
83
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
84
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
85
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
86
|
+
}>>>;
|
|
87
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
88
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
89
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
90
|
+
}>>>;
|
|
91
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
92
|
+
min: PropTypes.Validator<number>;
|
|
93
|
+
max: PropTypes.Validator<number>;
|
|
94
|
+
step: PropTypes.Requireable<number>;
|
|
95
|
+
}>>>;
|
|
96
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
97
|
+
min: PropTypes.Validator<number>;
|
|
98
|
+
max: PropTypes.Validator<number>;
|
|
99
|
+
step: PropTypes.Requireable<number>;
|
|
100
|
+
}>>>;
|
|
101
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
102
|
+
width: PropTypes.Validator<number>;
|
|
103
|
+
height: PropTypes.Validator<number>;
|
|
104
|
+
}>>>;
|
|
105
|
+
}>>>;
|
|
106
|
+
mark: PropTypes.Requireable<object>;
|
|
107
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
108
|
+
onDelete: PropTypes.Requireable<(...args: any[]) => any>;
|
|
109
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
110
|
+
};
|
|
111
|
+
contextType?: React.Context<any> | undefined;
|
|
112
|
+
};
|
|
113
|
+
export default Component;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { getAdjustedGraphLimits as e, thinnerShapesNeeded as t } from "../../utils.js";
|
|
2
|
+
import { ArrowMarker as n, genUid as r } from "../shared/arrow-head.js";
|
|
3
|
+
import { lineBase as i, lineToolComponent as a, styles as o } from "../shared/line/index.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import s from "prop-types";
|
|
6
|
+
import { trig as c, types as l } from "@pie-lib/plot";
|
|
7
|
+
import { styled as u } from "@mui/material/styles";
|
|
8
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
9
|
+
//#region src/tools/line/component.tsx
|
|
10
|
+
var p = u("line", { shouldForwardProp: (e) => ![
|
|
11
|
+
"fill",
|
|
12
|
+
"disabled",
|
|
13
|
+
"correctness"
|
|
14
|
+
].includes(e) })(({ theme: e, fill: t, disabled: n, correctness: r }) => ({
|
|
15
|
+
...t === "Solid" ? o.line(e) : o.dashedLine(e),
|
|
16
|
+
...n && o.disabled(e),
|
|
17
|
+
...r === "correct" && o.correct(e, "stroke"),
|
|
18
|
+
...r === "incorrect" && o.incorrect(e, "stroke"),
|
|
19
|
+
...r === "missing" && o.missing(e, "stroke")
|
|
20
|
+
})), m = u(n, { shouldForwardProp: (e) => !["suffix"].includes(e) })(({ theme: e, suffix: t }) => ({
|
|
21
|
+
...t === "enabled" && o.arrow(e),
|
|
22
|
+
...t === "disabled" && o.disabledArrow(e),
|
|
23
|
+
...t === "correct" && o.correct(e),
|
|
24
|
+
...t === "incorrect" && o.incorrect(e),
|
|
25
|
+
...t === "missing" && o.missing(e)
|
|
26
|
+
})), h = (n) => {
|
|
27
|
+
let i = r(), { className: a, correctness: o, disabled: s, graphProps: l, fill: u = "Solid", from: h, to: g, ..._ } = n, { scale: v } = l, { domain: y, range: b } = e(l), [x, S] = c.edges(y, b)(h, g), C = o || s && "disabled" || "enabled";
|
|
28
|
+
return /* @__PURE__ */ f("g", { children: [/* @__PURE__ */ d("defs", { children: /* @__PURE__ */ d(m, {
|
|
29
|
+
size: t(l) ? 4 : 5,
|
|
30
|
+
id: `${n.markerId || i}-${C}`,
|
|
31
|
+
suffix: C
|
|
32
|
+
}) }), /* @__PURE__ */ d(p, {
|
|
33
|
+
x1: v.x(x.x),
|
|
34
|
+
y1: v.y(x.y),
|
|
35
|
+
x2: v.x(S.x),
|
|
36
|
+
y2: v.y(S.y),
|
|
37
|
+
fill: u,
|
|
38
|
+
disabled: s,
|
|
39
|
+
correctness: o,
|
|
40
|
+
className: a,
|
|
41
|
+
markerEnd: `url(#${n.markerId || i}-${C})`,
|
|
42
|
+
markerStart: `url(#${n.markerId || i}-${C})`,
|
|
43
|
+
..._
|
|
44
|
+
})] });
|
|
45
|
+
};
|
|
46
|
+
h.propTypes = {
|
|
47
|
+
className: s.string,
|
|
48
|
+
fill: s.string,
|
|
49
|
+
correctness: s.string,
|
|
50
|
+
disabled: s.bool,
|
|
51
|
+
graphProps: l.GraphPropsType,
|
|
52
|
+
from: l.PointType,
|
|
53
|
+
to: l.PointType,
|
|
54
|
+
markerId: s.string
|
|
55
|
+
};
|
|
56
|
+
var g = a(i(h));
|
|
57
|
+
//#endregion
|
|
58
|
+
export { g as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing-solution-set/src/tools/line/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
|
+
export declare const tool: () => {
|
|
10
|
+
type: any;
|
|
11
|
+
Component: any;
|
|
12
|
+
addPoint: (point: any, mark: any) => any;
|
|
13
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing-solution-set/src/tools/polygon/component.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 buildLines: (points: any, closed: any) => {
|
|
12
|
+
from: unknown;
|
|
13
|
+
to: unknown;
|
|
14
|
+
}[];
|
|
15
|
+
export declare const swap: (arr: any, ...rest: any[]) => any[];
|
|
16
|
+
export declare class RawBaseComponent extends React.Component {
|
|
17
|
+
static propTypes: {
|
|
18
|
+
className: PropTypes.Requireable<string>;
|
|
19
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
20
|
+
correctness: PropTypes.Requireable<string>;
|
|
21
|
+
points: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
22
|
+
x: PropTypes.Validator<number>;
|
|
23
|
+
y: PropTypes.Validator<number>;
|
|
24
|
+
}> | null | undefined)[]>;
|
|
25
|
+
closed: PropTypes.Requireable<boolean>;
|
|
26
|
+
isSolution: PropTypes.Requireable<boolean>;
|
|
27
|
+
coordinatesOnHover: PropTypes.Requireable<boolean>;
|
|
28
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
29
|
+
onClosePolygon: PropTypes.Validator<(...args: any[]) => any>;
|
|
30
|
+
onDragStart: PropTypes.Requireable<(...args: any[]) => any>;
|
|
31
|
+
onDragStop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
32
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
34
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
35
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
36
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
37
|
+
}>>>;
|
|
38
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
39
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
40
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
41
|
+
}>>>;
|
|
42
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
43
|
+
min: PropTypes.Validator<number>;
|
|
44
|
+
max: PropTypes.Validator<number>;
|
|
45
|
+
step: PropTypes.Requireable<number>;
|
|
46
|
+
}>>>;
|
|
47
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
48
|
+
min: PropTypes.Validator<number>;
|
|
49
|
+
max: PropTypes.Validator<number>;
|
|
50
|
+
step: PropTypes.Requireable<number>;
|
|
51
|
+
}>>>;
|
|
52
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
53
|
+
width: PropTypes.Validator<number>;
|
|
54
|
+
height: PropTypes.Validator<number>;
|
|
55
|
+
}>>>;
|
|
56
|
+
}>>>;
|
|
57
|
+
isToolActive: PropTypes.Requireable<boolean>;
|
|
58
|
+
middle: PropTypes.Requireable<object>;
|
|
59
|
+
labelNode: PropTypes.Requireable<object>;
|
|
60
|
+
labelModeEnabled: PropTypes.Requireable<boolean>;
|
|
61
|
+
onChangeLabelProps: PropTypes.Requireable<(...args: any[]) => any>;
|
|
62
|
+
onChangeProps: PropTypes.Requireable<(...args: any[]) => any>;
|
|
63
|
+
};
|
|
64
|
+
static defaultProps: {
|
|
65
|
+
points: never[];
|
|
66
|
+
};
|
|
67
|
+
dragPoint: any;
|
|
68
|
+
dragLine: any;
|
|
69
|
+
dragPoly: any;
|
|
70
|
+
close: any;
|
|
71
|
+
labelChange: any;
|
|
72
|
+
clickPoint: any;
|
|
73
|
+
input: {};
|
|
74
|
+
render(): React.JSX.Element;
|
|
75
|
+
}
|
|
76
|
+
export declare const BaseComponent: typeof RawBaseComponent;
|
|
77
|
+
export default class Component extends React.Component {
|
|
78
|
+
static propTypes: {
|
|
79
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
80
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
81
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
82
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
83
|
+
}>>>;
|
|
84
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
85
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
86
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
87
|
+
}>>>;
|
|
88
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
89
|
+
min: PropTypes.Validator<number>;
|
|
90
|
+
max: PropTypes.Validator<number>;
|
|
91
|
+
step: PropTypes.Requireable<number>;
|
|
92
|
+
}>>>;
|
|
93
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
94
|
+
min: PropTypes.Validator<number>;
|
|
95
|
+
max: PropTypes.Validator<number>;
|
|
96
|
+
step: PropTypes.Requireable<number>;
|
|
97
|
+
}>>>;
|
|
98
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
99
|
+
width: PropTypes.Validator<number>;
|
|
100
|
+
height: PropTypes.Validator<number>;
|
|
101
|
+
}>>>;
|
|
102
|
+
}>>>;
|
|
103
|
+
mark: PropTypes.Requireable<any>;
|
|
104
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
105
|
+
onDragStart: PropTypes.Requireable<(...args: any[]) => any>;
|
|
106
|
+
onDragStop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
107
|
+
};
|
|
108
|
+
static defaultProps: {};
|
|
109
|
+
constructor(props: any);
|
|
110
|
+
change: any;
|
|
111
|
+
changeProps: any;
|
|
112
|
+
changeLabelProps: any;
|
|
113
|
+
closePolygon: any;
|
|
114
|
+
dragStart: () => void;
|
|
115
|
+
dragStop: any;
|
|
116
|
+
render(): React.JSX.Element;
|
|
117
|
+
}
|