@pie-lib/graphing 4.0.5-next.31 → 4.0.5-next.34
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 +1 -0
- package/CHANGELOG.md +1469 -0
- package/LICENSE.md +5 -0
- package/lib/axis/arrow.js +79 -0
- package/lib/axis/arrow.js.map +1 -0
- package/lib/axis/axes.js +329 -0
- package/lib/axis/axes.js.map +1 -0
- package/lib/axis/index.js +21 -0
- package/lib/axis/index.js.map +1 -0
- package/lib/bg.js +114 -0
- package/lib/bg.js.map +1 -0
- package/lib/container/actions.js +18 -0
- package/lib/container/actions.js.map +1 -0
- package/lib/container/index.js +127 -0
- package/lib/container/index.js.map +1 -0
- package/lib/container/marks.js +22 -0
- package/lib/container/marks.js.map +1 -0
- package/lib/container/middleware.js +19 -0
- package/lib/container/middleware.js.map +1 -0
- package/lib/container/reducer.js +18 -0
- package/lib/container/reducer.js.map +1 -0
- package/lib/coordinates-label.js +79 -0
- package/lib/coordinates-label.js.map +1 -0
- package/lib/graph-with-controls.js +294 -0
- package/lib/graph-with-controls.js.map +1 -0
- package/lib/graph.js +327 -0
- package/lib/graph.js.map +1 -0
- package/lib/grid-setup.js +414 -0
- package/lib/grid-setup.js.map +1 -0
- package/lib/grid.js +131 -0
- package/lib/grid.js.map +1 -0
- package/lib/index.js +47 -0
- package/lib/index.js.map +1 -0
- package/lib/key-legend.js +201 -0
- package/lib/key-legend.js.map +1 -0
- package/lib/label-svg-icon.js +50 -0
- package/lib/label-svg-icon.js.map +1 -0
- package/lib/labels.js +243 -0
- package/lib/labels.js.map +1 -0
- package/lib/mark-label.js +285 -0
- package/lib/mark-label.js.map +1 -0
- package/lib/toggle-bar.js +252 -0
- package/lib/toggle-bar.js.map +1 -0
- package/lib/tool-menu.js +78 -0
- package/lib/tool-menu.js.map +1 -0
- package/lib/tools/absolute/component.js +29 -0
- package/lib/tools/absolute/component.js.map +1 -0
- package/lib/tools/absolute/index.js +50 -0
- package/lib/tools/absolute/index.js.map +1 -0
- package/lib/tools/circle/bg-circle.js +123 -0
- package/lib/tools/circle/bg-circle.js.map +1 -0
- package/lib/tools/circle/component.js +321 -0
- package/lib/tools/circle/component.js.map +1 -0
- package/lib/tools/circle/index.js +41 -0
- package/lib/tools/circle/index.js.map +1 -0
- package/lib/tools/exponential/component.js +28 -0
- package/lib/tools/exponential/component.js.map +1 -0
- package/lib/tools/exponential/index.js +56 -0
- package/lib/tools/exponential/index.js.map +1 -0
- package/lib/tools/index.js +86 -0
- package/lib/tools/index.js.map +1 -0
- package/lib/tools/line/component.js +97 -0
- package/lib/tools/line/component.js.map +1 -0
- package/lib/tools/line/index.js +11 -0
- package/lib/tools/line/index.js.map +1 -0
- package/lib/tools/parabola/component.js +28 -0
- package/lib/tools/parabola/component.js.map +1 -0
- package/lib/tools/parabola/index.js +50 -0
- package/lib/tools/parabola/index.js.map +1 -0
- package/lib/tools/point/component.js +148 -0
- package/lib/tools/point/component.js.map +1 -0
- package/lib/tools/point/index.js +24 -0
- package/lib/tools/point/index.js.map +1 -0
- package/lib/tools/polygon/component.js +437 -0
- package/lib/tools/polygon/component.js.map +1 -0
- package/lib/tools/polygon/index.js +89 -0
- package/lib/tools/polygon/index.js.map +1 -0
- package/lib/tools/polygon/line.js +112 -0
- package/lib/tools/polygon/line.js.map +1 -0
- package/lib/tools/polygon/polygon.js +130 -0
- package/lib/tools/polygon/polygon.js.map +1 -0
- package/lib/tools/ray/component.js +95 -0
- package/lib/tools/ray/component.js.map +1 -0
- package/lib/tools/ray/index.js +11 -0
- package/lib/tools/ray/index.js.map +1 -0
- package/lib/tools/segment/component.js +71 -0
- package/lib/tools/segment/component.js.map +1 -0
- package/lib/tools/segment/index.js +11 -0
- package/lib/tools/segment/index.js.map +1 -0
- package/lib/tools/shared/arrow-head.js +111 -0
- package/lib/tools/shared/arrow-head.js.map +1 -0
- package/lib/tools/shared/icons/CorrectSVG.js +40 -0
- package/lib/tools/shared/icons/CorrectSVG.js.map +1 -0
- package/lib/tools/shared/icons/IncorrectSVG.js +40 -0
- package/lib/tools/shared/icons/IncorrectSVG.js.map +1 -0
- package/lib/tools/shared/icons/MissingSVG.js +39 -0
- package/lib/tools/shared/icons/MissingSVG.js.map +1 -0
- package/lib/tools/shared/line/index.js +550 -0
- package/lib/tools/shared/line/index.js.map +1 -0
- package/lib/tools/shared/line/line-path.js +118 -0
- package/lib/tools/shared/line/line-path.js.map +1 -0
- package/lib/tools/shared/line/with-root-edge.js +121 -0
- package/lib/tools/shared/line/with-root-edge.js.map +1 -0
- package/lib/tools/shared/point/arrow-point.js +72 -0
- package/lib/tools/shared/point/arrow-point.js.map +1 -0
- package/lib/tools/shared/point/arrow.js +67 -0
- package/lib/tools/shared/point/arrow.js.map +1 -0
- package/lib/tools/shared/point/base-point.js +157 -0
- package/lib/tools/shared/point/base-point.js.map +1 -0
- package/lib/tools/shared/point/index.js +68 -0
- package/lib/tools/shared/point/index.js.map +1 -0
- package/lib/tools/shared/styles.js +33 -0
- package/lib/tools/shared/styles.js.map +1 -0
- package/lib/tools/shared/types.js +16 -0
- package/lib/tools/shared/types.js.map +1 -0
- package/lib/tools/sine/component.js +40 -0
- package/lib/tools/sine/component.js.map +1 -0
- package/lib/tools/sine/index.js +50 -0
- package/lib/tools/sine/index.js.map +1 -0
- package/lib/tools/vector/component.js +68 -0
- package/lib/tools/vector/component.js.map +1 -0
- package/lib/tools/vector/index.js +11 -0
- package/lib/tools/vector/index.js.map +1 -0
- package/lib/undo-redo.js +86 -0
- package/lib/undo-redo.js.map +1 -0
- package/lib/use-debounce.js +25 -0
- package/lib/use-debounce.js.map +1 -0
- package/lib/utils.js +229 -0
- package/lib/utils.js.map +1 -0
- package/package.json +33 -45
- package/src/__tests__/bg.test.jsx +250 -0
- package/src/__tests__/coordinates-label.test.jsx +243 -0
- package/src/__tests__/graph-with-controls.test.jsx +198 -0
- package/src/__tests__/graph.test.jsx +721 -0
- package/src/__tests__/grid-setup.test.jsx +645 -0
- package/src/__tests__/grid.test.jsx +22 -0
- package/src/__tests__/key-legend.test.jsx +260 -0
- package/src/__tests__/label-svg-icon.test.jsx +278 -0
- package/src/__tests__/labels.test.jsx +55 -0
- package/src/__tests__/mark-label.test.jsx +63 -0
- package/src/__tests__/toggle-bar.test.jsx +146 -0
- package/src/__tests__/tool-menu.test.jsx +115 -0
- package/src/__tests__/undo-redo.test.jsx +24 -0
- package/src/__tests__/use-debounce.test.js +21 -0
- package/src/__tests__/utils.js +41 -0
- package/src/__tests__/utils.test.js +105 -0
- package/src/axis/__tests__/arrow.test.jsx +38 -0
- package/src/axis/__tests__/axes.test.jsx +216 -0
- package/src/axis/arrow.jsx +57 -0
- package/src/axis/axes.jsx +285 -0
- package/src/axis/index.js +3 -0
- package/src/bg.jsx +96 -0
- package/src/container/__tests__/actions.test.js +105 -0
- package/src/container/__tests__/index.test.jsx +319 -0
- package/src/container/__tests__/marks.test.js +172 -0
- package/src/container/__tests__/middleware.test.js +235 -0
- package/src/container/__tests__/reducer.test.js +324 -0
- package/src/container/actions.js +8 -0
- package/src/container/index.jsx +91 -0
- package/src/container/marks.js +14 -0
- package/src/container/middleware.js +7 -0
- package/src/container/reducer.js +5 -0
- package/src/coordinates-label.jsx +63 -0
- package/src/graph-with-controls.jsx +239 -0
- package/src/graph.jsx +303 -0
- package/src/grid-setup.jsx +432 -0
- package/src/grid.jsx +133 -0
- package/src/index.js +7 -0
- package/src/key-legend.jsx +142 -0
- package/src/label-svg-icon.jsx +39 -0
- package/src/labels.jsx +207 -0
- package/src/mark-label.jsx +244 -0
- package/src/toggle-bar.jsx +224 -0
- package/src/tool-menu.jsx +49 -0
- package/src/tools/absolute/__tests__/component.test.jsx +53 -0
- package/src/tools/absolute/component.jsx +23 -0
- package/src/tools/absolute/index.js +31 -0
- package/src/tools/circle/__tests__/bg-circle.test.jsx +26 -0
- package/src/tools/circle/__tests__/component.test.jsx +494 -0
- package/src/tools/circle/__tests__/index.test.js +480 -0
- package/src/tools/circle/bg-circle.jsx +81 -0
- package/src/tools/circle/component.jsx +264 -0
- package/src/tools/circle/index.js +25 -0
- package/src/tools/exponential/__tests__/component.test.jsx +53 -0
- package/src/tools/exponential/__tests__/index.test.js +729 -0
- package/src/tools/exponential/component.jsx +23 -0
- package/src/tools/exponential/index.js +39 -0
- package/src/tools/index.js +48 -0
- package/src/tools/line/__tests__/component.test.jsx +37 -0
- package/src/tools/line/component.jsx +93 -0
- package/src/tools/line/index.js +4 -0
- package/src/tools/parabola/__tests__/component.test.jsx +48 -0
- package/src/tools/parabola/__tests__/index.test.js +470 -0
- package/src/tools/parabola/component.jsx +23 -0
- package/src/tools/parabola/index.js +31 -0
- package/src/tools/point/__tests__/component.test.jsx +349 -0
- package/src/tools/point/__tests__/index.test.js +241 -0
- package/src/tools/point/component.jsx +126 -0
- package/src/tools/point/index.js +11 -0
- package/src/tools/polygon/__tests__/component.test.jsx +471 -0
- package/src/tools/polygon/__tests__/index.test.js +294 -0
- package/src/tools/polygon/__tests__/line.test.jsx +35 -0
- package/src/tools/polygon/__tests__/polygon.test.jsx +61 -0
- package/src/tools/polygon/component.jsx +409 -0
- package/src/tools/polygon/index.js +52 -0
- package/src/tools/polygon/line.jsx +74 -0
- package/src/tools/polygon/polygon.jsx +110 -0
- package/src/tools/ray/__tests__/component.test.jsx +29 -0
- package/src/tools/ray/component.jsx +92 -0
- package/src/tools/ray/index.js +4 -0
- package/src/tools/segment/__tests__/component.test.jsx +28 -0
- package/src/tools/segment/component.jsx +65 -0
- package/src/tools/segment/index.js +4 -0
- package/src/tools/shared/__tests__/arrow-head.test.jsx +31 -0
- package/src/tools/shared/arrow-head.jsx +102 -0
- package/src/tools/shared/icons/CorrectSVG.jsx +32 -0
- package/src/tools/shared/icons/IncorrectSVG.jsx +30 -0
- package/src/tools/shared/icons/MissingSVG.jsx +31 -0
- package/src/tools/shared/line/__tests__/index.test.jsx +109 -0
- package/src/tools/shared/line/__tests__/line-path.test.jsx +53 -0
- package/src/tools/shared/line/__tests__/with-root-edge.test.jsx +73 -0
- package/src/tools/shared/line/index.jsx +487 -0
- package/src/tools/shared/line/line-path.jsx +80 -0
- package/src/tools/shared/line/with-root-edge.jsx +97 -0
- package/src/tools/shared/point/__tests__/arrow-point.test.jsx +91 -0
- package/src/tools/shared/point/__tests__/base-point.test.jsx +87 -0
- package/src/tools/shared/point/arrow-point.jsx +46 -0
- package/src/tools/shared/point/arrow.jsx +37 -0
- package/src/tools/shared/point/base-point.jsx +121 -0
- package/src/tools/shared/point/index.jsx +54 -0
- package/src/tools/shared/styles.js +27 -0
- package/src/tools/shared/types.js +10 -0
- package/src/tools/sine/__tests__/component.test.jsx +51 -0
- package/src/tools/sine/component.jsx +32 -0
- package/src/tools/sine/index.js +33 -0
- package/src/tools/vector/__tests__/component.test.jsx +25 -0
- package/src/tools/vector/component.jsx +56 -0
- package/src/tools/vector/index.js +4 -0
- package/src/undo-redo.jsx +45 -0
- package/src/use-debounce.js +13 -0
- package/src/utils.js +224 -0
- package/dist/_virtual/_rolldown/runtime.js +0 -23
- package/dist/autosize-input.d.ts +0 -10
- package/dist/autosize-input.js +0 -66
- package/dist/axis/arrow.d.ts +0 -13
- package/dist/axis/arrow.js +0 -34
- package/dist/axis/axes.d.ts +0 -132
- package/dist/axis/axes.js +0 -214
- package/dist/axis/index.d.ts +0 -10
- package/dist/bg.d.ts +0 -51
- package/dist/bg.js +0 -44
- package/dist/container/actions.d.ts +0 -15
- package/dist/container/actions.js +0 -7
- package/dist/container/index.d.ts +0 -58
- package/dist/container/index.js +0 -48
- package/dist/container/marks.d.ts +0 -10
- package/dist/container/marks.js +0 -11
- package/dist/container/middleware.d.ts +0 -10
- package/dist/container/middleware.js +0 -4
- package/dist/container/reducer.d.ts +0 -14
- package/dist/container/reducer.js +0 -7
- package/dist/coordinates-label.d.ts +0 -50
- package/dist/coordinates-label.js +0 -46
- package/dist/graph-with-controls.d.ts +0 -88
- package/dist/graph-with-controls.js +0 -154
- package/dist/graph.d.ts +0 -126
- package/dist/graph.js +0 -209
- package/dist/grid-setup.d.ts +0 -27
- package/dist/grid-setup.js +0 -307
- package/dist/grid.d.ts +0 -43
- package/dist/grid.js +0 -59
- package/dist/index.d.ts +0 -15
- package/dist/index.js +0 -7
- package/dist/key-legend.d.ts +0 -21
- package/dist/key-legend.js +0 -231
- package/dist/label-svg-icon.d.ts +0 -18
- package/dist/label-svg-icon.js +0 -42
- package/dist/labels.d.ts +0 -37
- package/dist/labels.js +0 -152
- package/dist/mark-label.d.ts +0 -58
- package/dist/mark-label.js +0 -171
- 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/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_curve@3.12.0/node_modules/@visx/curve/esm/index.js +0 -2
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/Grid.js +0 -79
- 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/utils/coerceNumber.js +0 -10
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js +0 -9
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/toString.js +0 -6
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/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/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/invariant@2.2.4/node_modules/invariant/browser.js +0 -28
- 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/react-redux@9.3.0_9e2203c65d1d5fa1/node_modules/react-redux/dist/react-redux.js +0 -471
- 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/node_modules/.bun/redux-undo@1.1.0/node_modules/redux-undo/dist/redux-undo.js +0 -185
- package/dist/node_modules/.bun/redux@5.0.1/node_modules/redux/dist/redux.js +0 -198
- 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 +0 -53
- 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 +0 -51
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/with-selector.js +0 -10
- package/dist/toggle-bar.d.ts +0 -40
- package/dist/toggle-bar.js +0 -155
- package/dist/tool-menu.d.ts +0 -29
- package/dist/tool-menu.js +0 -41
- package/dist/tools/absolute/component.d.ts +0 -16
- package/dist/tools/absolute/component.js +0 -15
- package/dist/tools/absolute/index.d.ts +0 -20
- package/dist/tools/absolute/index.js +0 -32
- package/dist/tools/circle/bg-circle.d.ts +0 -116
- package/dist/tools/circle/bg-circle.js +0 -72
- package/dist/tools/circle/component.d.ts +0 -83
- package/dist/tools/circle/component.js +0 -195
- package/dist/tools/circle/index.d.ts +0 -20
- package/dist/tools/circle/index.js +0 -22
- package/dist/tools/exponential/component.d.ts +0 -16
- package/dist/tools/exponential/component.js +0 -14
- package/dist/tools/exponential/index.d.ts +0 -20
- package/dist/tools/exponential/index.js +0 -32
- package/dist/tools/index.d.ts +0 -27
- package/dist/tools/index.js +0 -55
- package/dist/tools/line/component.d.ts +0 -124
- package/dist/tools/line/component.js +0 -72
- package/dist/tools/line/index.d.ts +0 -13
- package/dist/tools/line/index.js +0 -6
- package/dist/tools/parabola/component.d.ts +0 -16
- package/dist/tools/parabola/component.js +0 -14
- package/dist/tools/parabola/index.d.ts +0 -20
- package/dist/tools/parabola/index.js +0 -32
- package/dist/tools/point/component.d.ts +0 -50
- package/dist/tools/point/component.js +0 -85
- package/dist/tools/point/index.d.ts +0 -15
- package/dist/tools/point/index.js +0 -13
- package/dist/tools/polygon/component.d.ts +0 -120
- package/dist/tools/polygon/component.js +0 -262
- package/dist/tools/polygon/index.d.ts +0 -19
- package/dist/tools/polygon/index.js +0 -55
- package/dist/tools/polygon/line.d.ts +0 -125
- package/dist/tools/polygon/line.js +0 -63
- package/dist/tools/polygon/polygon.d.ts +0 -122
- package/dist/tools/polygon/polygon.js +0 -74
- package/dist/tools/ray/component.d.ts +0 -101
- package/dist/tools/ray/component.js +0 -71
- package/dist/tools/ray/index.d.ts +0 -13
- package/dist/tools/ray/index.js +0 -6
- package/dist/tools/segment/component.d.ts +0 -100
- package/dist/tools/segment/component.js +0 -52
- package/dist/tools/segment/index.d.ts +0 -13
- package/dist/tools/segment/index.js +0 -6
- package/dist/tools/shared/arrow-head.d.ts +0 -51
- package/dist/tools/shared/arrow-head.js +0 -63
- package/dist/tools/shared/icons/CorrectSVG.d.ts +0 -26
- package/dist/tools/shared/icons/CorrectSVG.js +0 -29
- package/dist/tools/shared/icons/IncorrectSVG.d.ts +0 -26
- package/dist/tools/shared/icons/IncorrectSVG.js +0 -27
- package/dist/tools/shared/icons/MissingSVG.d.ts +0 -26
- package/dist/tools/shared/icons/MissingSVG.js +0 -28
- package/dist/tools/shared/line/index.d.ts +0 -245
- package/dist/tools/shared/line/index.js +0 -319
- package/dist/tools/shared/line/line-path.d.ts +0 -57
- package/dist/tools/shared/line/line-path.js +0 -71
- package/dist/tools/shared/line/with-root-edge.d.ts +0 -142
- package/dist/tools/shared/line/with-root-edge.js +0 -73
- package/dist/tools/shared/point/arrow-point.d.ts +0 -56
- package/dist/tools/shared/point/arrow-point.js +0 -41
- package/dist/tools/shared/point/arrow.d.ts +0 -45
- package/dist/tools/shared/point/arrow.js +0 -35
- package/dist/tools/shared/point/base-point.d.ts +0 -52
- package/dist/tools/shared/point/base-point.js +0 -103
- package/dist/tools/shared/point/index.d.ts +0 -216
- package/dist/tools/shared/point/index.js +0 -45
- package/dist/tools/shared/styles.d.ts +0 -29
- package/dist/tools/shared/styles.js +0 -20
- package/dist/tools/shared/types.d.ts +0 -21
- package/dist/tools/shared/types.js +0 -11
- package/dist/tools/sine/component.d.ts +0 -16
- package/dist/tools/sine/component.js +0 -22
- package/dist/tools/sine/index.d.ts +0 -20
- package/dist/tools/sine/index.js +0 -32
- package/dist/tools/vector/component.d.ts +0 -100
- package/dist/tools/vector/component.js +0 -44
- package/dist/tools/vector/index.d.ts +0 -13
- package/dist/tools/vector/index.js +0 -6
- package/dist/undo-redo.d.ts +0 -22
- package/dist/undo-redo.js +0 -47
- package/dist/use-debounce.d.ts +0 -9
- package/dist/use-debounce.js +0 -13
- package/dist/utils.d.ts +0 -61
- package/dist/utils.js +0 -75
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.changeMarks = exports.addMark = void 0;
|
|
7
|
+
var addMark = exports.addMark = function addMark() {
|
|
8
|
+
return {
|
|
9
|
+
type: 'ADD_MARK'
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
var changeMarks = exports.changeMarks = function changeMarks(marks) {
|
|
13
|
+
return {
|
|
14
|
+
type: 'CHANGE_MARKS',
|
|
15
|
+
marks: marks
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","names":["addMark","exports","type","changeMarks","marks"],"sources":["../../src/container/actions.js"],"sourcesContent":["export const addMark = () => ({\n type: 'ADD_MARK',\n});\n\nexport const changeMarks = (marks) => ({\n type: 'CHANGE_MARKS',\n marks,\n});\n"],"mappings":";;;;;;AAAO,IAAMA,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG,SAAVA,OAAOA,CAAA;EAAA,OAAU;IAC5BE,IAAI,EAAE;EACR,CAAC;AAAA,CAAC;AAEK,IAAMC,WAAW,GAAAF,OAAA,CAAAE,WAAA,GAAG,SAAdA,WAAWA,CAAIC,KAAK;EAAA,OAAM;IACrCF,IAAI,EAAE,cAAc;IACpBE,KAAK,EAALA;EACF,CAAC;AAAA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = exports.GraphContainer = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
+
var _reactRedux = require("react-redux");
|
|
17
|
+
var _react = _interopRequireDefault(require("react"));
|
|
18
|
+
var _redux = require("redux");
|
|
19
|
+
var _reducer = _interopRequireDefault(require("./reducer"));
|
|
20
|
+
var _actions = require("./actions");
|
|
21
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
22
|
+
var _lodashEs = require("lodash-es");
|
|
23
|
+
var _reduxUndo = require("redux-undo");
|
|
24
|
+
var _graphWithControls = _interopRequireDefault(require("../graph-with-controls"));
|
|
25
|
+
var _middleware = require("./middleware");
|
|
26
|
+
var _excluded = ["onChangeMarks", "marks"];
|
|
27
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
28
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
29
|
+
var mapStateToProps = function mapStateToProps(s) {
|
|
30
|
+
return {
|
|
31
|
+
marks: s.marks.present
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
|
|
35
|
+
return {
|
|
36
|
+
onChangeMarks: function onChangeMarks(m) {
|
|
37
|
+
return dispatch((0, _actions.changeMarks)(m));
|
|
38
|
+
},
|
|
39
|
+
onUndo: function onUndo() {
|
|
40
|
+
return dispatch(_reduxUndo.ActionCreators.undo());
|
|
41
|
+
},
|
|
42
|
+
onRedo: function onRedo() {
|
|
43
|
+
return dispatch(_reduxUndo.ActionCreators.redo());
|
|
44
|
+
},
|
|
45
|
+
onReset: function onReset() {
|
|
46
|
+
return dispatch((0, _actions.changeMarks)([]));
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
var GraphContainer = exports.GraphContainer = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_graphWithControls["default"]);
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The graph component entry point with undo/redo
|
|
54
|
+
* Redux is an implementation detail, hide it in the react component.
|
|
55
|
+
*/
|
|
56
|
+
var Root = /*#__PURE__*/function (_React$Component) {
|
|
57
|
+
function Root(props) {
|
|
58
|
+
var _this;
|
|
59
|
+
(0, _classCallCheck2["default"])(this, Root);
|
|
60
|
+
_this = _callSuper(this, Root, [props]);
|
|
61
|
+
(0, _defineProperty2["default"])(_this, "onStoreChange", function () {
|
|
62
|
+
var _this$props = _this.props,
|
|
63
|
+
marks = _this$props.marks,
|
|
64
|
+
onChangeMarks = _this$props.onChangeMarks;
|
|
65
|
+
var storeState = _this.store.getState();
|
|
66
|
+
if (!(0, _lodashEs.isEqual)(storeState.marks.present, marks)) {
|
|
67
|
+
onChangeMarks(storeState.marks.present);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
var r = (0, _reducer["default"])();
|
|
71
|
+
_this.store = (0, _redux.createStore)(r, {
|
|
72
|
+
marks: props.marks
|
|
73
|
+
}, (0, _redux.applyMiddleware)(_middleware.lastActionMiddleware));
|
|
74
|
+
_this.store.subscribe(_this.onStoreChange);
|
|
75
|
+
return _this;
|
|
76
|
+
}
|
|
77
|
+
(0, _inherits2["default"])(Root, _React$Component);
|
|
78
|
+
return (0, _createClass2["default"])(Root, [{
|
|
79
|
+
key: "componentDidUpdate",
|
|
80
|
+
value: function componentDidUpdate(prevProps) {
|
|
81
|
+
var marks = this.props.marks;
|
|
82
|
+
var storeState = this.store.getState();
|
|
83
|
+
if ((0, _lodashEs.isEqual)(storeState.marks.present, marks)) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (!(0, _lodashEs.isEqual)(prevProps.marks, marks)) {
|
|
87
|
+
// Don't dispatch marks that have correctness (evaluate mode marks) into the undo history.
|
|
88
|
+
// These marks are already handled in render() via the correctnessSet path and bypass the
|
|
89
|
+
// Redux store entirely. Dispatching them would pollute the undo history and cause the graph
|
|
90
|
+
// to show the correct answer when the user presses undo after returning to gather mode.
|
|
91
|
+
var hasCorrectness = marks && marks.find(function (m) {
|
|
92
|
+
return m.correctness;
|
|
93
|
+
});
|
|
94
|
+
if (!hasCorrectness) {
|
|
95
|
+
this.store.dispatch((0, _actions.changeMarks)(marks));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}, {
|
|
100
|
+
key: "render",
|
|
101
|
+
value: function render() {
|
|
102
|
+
// eslint-disable-next-line no-unused-vars
|
|
103
|
+
var _this$props2 = this.props,
|
|
104
|
+
onChangeMarks = _this$props2.onChangeMarks,
|
|
105
|
+
marks = _this$props2.marks,
|
|
106
|
+
rest = (0, _objectWithoutProperties2["default"])(_this$props2, _excluded);
|
|
107
|
+
var correctnessSet = marks && marks.find(function (m) {
|
|
108
|
+
return m.correctness;
|
|
109
|
+
});
|
|
110
|
+
if (correctnessSet) {
|
|
111
|
+
return /*#__PURE__*/_react["default"].createElement(_graphWithControls["default"], (0, _extends2["default"])({}, rest, {
|
|
112
|
+
marks: marks,
|
|
113
|
+
disabled: correctnessSet
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
116
|
+
return /*#__PURE__*/_react["default"].createElement(_reactRedux.Provider, {
|
|
117
|
+
store: this.store
|
|
118
|
+
}, /*#__PURE__*/_react["default"].createElement(GraphContainer, rest));
|
|
119
|
+
}
|
|
120
|
+
}]);
|
|
121
|
+
}(_react["default"].Component);
|
|
122
|
+
(0, _defineProperty2["default"])(Root, "propTypes", {
|
|
123
|
+
onChangeMarks: _propTypes["default"].func,
|
|
124
|
+
marks: _propTypes["default"].array
|
|
125
|
+
});
|
|
126
|
+
var _default = exports["default"] = Root;
|
|
127
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_reactRedux","require","_react","_interopRequireDefault","_redux","_reducer","_actions","_propTypes","_lodashEs","_reduxUndo","_graphWithControls","_middleware","_excluded","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct","Reflect","construct","constructor","apply","Boolean","prototype","valueOf","call","mapStateToProps","s","marks","present","mapDispatchToProps","dispatch","onChangeMarks","m","changeMarks","onUndo","ActionCreators","undo","onRedo","redo","onReset","GraphContainer","exports","connect","GraphWithControls","Root","_React$Component","props","_this","_classCallCheck2","_defineProperty2","_this$props","storeState","store","getState","isEqual","r","reducer","createStore","applyMiddleware","lastActionMiddleware","subscribe","onStoreChange","_inherits2","_createClass2","key","value","componentDidUpdate","prevProps","hasCorrectness","find","correctness","render","_this$props2","rest","_objectWithoutProperties2","correctnessSet","createElement","_extends2","disabled","Provider","React","Component","PropTypes","func","array","_default"],"sources":["../../src/container/index.jsx"],"sourcesContent":["import { connect, Provider } from 'react-redux';\nimport React from 'react';\nimport { applyMiddleware, createStore } from 'redux';\nimport reducer from './reducer';\nimport { changeMarks } from './actions';\nimport PropTypes from 'prop-types';\nimport { isEqual } from 'lodash-es';\nimport { ActionCreators } from 'redux-undo';\nimport GraphWithControls from '../graph-with-controls';\nimport { lastActionMiddleware } from './middleware';\n\nconst mapStateToProps = (s) => ({\n marks: s.marks.present,\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onChangeMarks: (m) => dispatch(changeMarks(m)),\n onUndo: () => dispatch(ActionCreators.undo()),\n onRedo: () => dispatch(ActionCreators.redo()),\n onReset: () => dispatch(changeMarks([])),\n});\n\nexport const GraphContainer = connect(mapStateToProps, mapDispatchToProps)(GraphWithControls);\n\n/**\n * The graph component entry point with undo/redo\n * Redux is an implementation detail, hide it in the react component.\n */\nclass Root extends React.Component {\n static propTypes = {\n onChangeMarks: PropTypes.func,\n marks: PropTypes.array,\n };\n\n constructor(props) {\n super(props);\n\n const r = reducer();\n this.store = createStore(r, { marks: props.marks }, applyMiddleware(lastActionMiddleware));\n\n this.store.subscribe(this.onStoreChange);\n }\n\n componentDidUpdate(prevProps) {\n const { marks } = this.props;\n const storeState = this.store.getState();\n\n if (isEqual(storeState.marks.present, marks)) {\n return;\n }\n\n if (!isEqual(prevProps.marks, marks)) {\n // Don't dispatch marks that have correctness (evaluate mode marks) into the undo history.\n // These marks are already handled in render() via the correctnessSet path and bypass the\n // Redux store entirely. Dispatching them would pollute the undo history and cause the graph\n // to show the correct answer when the user presses undo after returning to gather mode.\n const hasCorrectness = marks && marks.find((m) => m.correctness);\n\n if (!hasCorrectness) {\n this.store.dispatch(changeMarks(marks));\n }\n }\n }\n\n onStoreChange = () => {\n const { marks, onChangeMarks } = this.props;\n const storeState = this.store.getState();\n\n if (!isEqual(storeState.marks.present, marks)) {\n onChangeMarks(storeState.marks.present);\n }\n };\n\n render() {\n // eslint-disable-next-line no-unused-vars\n const { onChangeMarks, marks, ...rest } = this.props;\n const correctnessSet = marks && marks.find((m) => m.correctness);\n\n if (correctnessSet) {\n return <GraphWithControls {...rest} marks={marks} disabled={correctnessSet} />;\n }\n\n return (\n <Provider store={this.store}>\n <GraphContainer {...rest} />\n </Provider>\n );\n }\n}\n\nexport default Root;\n"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sB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AAE;QAClB,oBAAO5E,MAAA,YAAA6E,aAAA,CAACrE,kBAAA,WAAiB,MAAAsE,SAAA,iBAAKJ,IAAI;UAAE9C,KAAK,EAAEA,KAAM;UAACmD,QAAQ,EAAEH;QAAe,EAAE,CAAC;MAChF;MAEA,oBACE5E,MAAA,YAAA6E,aAAA,CAAC/E,WAAA,CAAAkF,QAAQ;QAAC3B,KAAK,EAAE,IAAI,CAACA;MAAM,gBAC1BrD,MAAA,YAAA6E,aAAA,CAACpC,cAAc,EAAKiC,IAAO,CACnB,CAAC;IAEf;EAAC;AAAA,EA3DgBO,iBAAK,CAACC,SAAS;AAAA,IAAAhC,gBAAA,aAA5BL,IAAI,eACW;EACjBb,aAAa,EAAEmD,qBAAS,CAACC,IAAI;EAC7BxD,KAAK,EAAEuD,qBAAS,CAACE;AACnB,CAAC;AAAA,IAAAC,QAAA,GAAA5C,OAAA,cA0DYG,IAAI","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var marks = function marks() {
|
|
8
|
+
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
9
|
+
var action = arguments.length > 1 ? arguments[1] : undefined;
|
|
10
|
+
switch (action.type) {
|
|
11
|
+
case 'CHANGE_MARKS':
|
|
12
|
+
if (Array.isArray(action.marks)) {
|
|
13
|
+
return action.marks;
|
|
14
|
+
} else {
|
|
15
|
+
throw new Error('marks must be an array');
|
|
16
|
+
}
|
|
17
|
+
default:
|
|
18
|
+
return state;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
var _default = exports["default"] = marks;
|
|
22
|
+
//# sourceMappingURL=marks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marks.js","names":["marks","state","arguments","length","undefined","action","type","Array","isArray","Error","_default","exports"],"sources":["../../src/container/marks.js"],"sourcesContent":["const marks = (state = [], action) => {\n switch (action.type) {\n case 'CHANGE_MARKS':\n if (Array.isArray(action.marks)) {\n return action.marks;\n } else {\n throw new Error('marks must be an array');\n }\n default:\n return state;\n }\n};\n\nexport default marks;\n"],"mappings":";;;;;;AAAA,IAAMA,KAAK,GAAG,SAARA,KAAKA,CAAA,EAA2B;EAAA,IAAvBC,KAAK,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,IAAEG,MAAM,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAC/B,QAAQC,MAAM,CAACC,IAAI;IACjB,KAAK,cAAc;MACjB,IAAIC,KAAK,CAACC,OAAO,CAACH,MAAM,CAACL,KAAK,CAAC,EAAE;QAC/B,OAAOK,MAAM,CAACL,KAAK;MACrB,CAAC,MAAM;QACL,MAAM,IAAIS,KAAK,CAAC,wBAAwB,CAAC;MAC3C;IACF;MACE,OAAOR,KAAK;EAChB;AACF,CAAC;AAAC,IAAAS,QAAA,GAAAC,OAAA,cAEaX,KAAK","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.lastActionMiddleware = exports.getLastAction = void 0;
|
|
7
|
+
var lastAction = null;
|
|
8
|
+
var getLastAction = exports.getLastAction = function getLastAction() {
|
|
9
|
+
return lastAction;
|
|
10
|
+
};
|
|
11
|
+
var lastActionMiddleware = exports.lastActionMiddleware = function lastActionMiddleware() {
|
|
12
|
+
return function (next) {
|
|
13
|
+
return function (action) {
|
|
14
|
+
lastAction = action;
|
|
15
|
+
return next(action);
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=middleware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.js","names":["lastAction","getLastAction","exports","lastActionMiddleware","next","action"],"sources":["../../src/container/middleware.js"],"sourcesContent":["let lastAction = null;\nexport const getLastAction = () => lastAction;\n\nexport const lastActionMiddleware = () => (next) => (action) => {\n lastAction = action;\n return next(action);\n};\n"],"mappings":";;;;;;AAAA,IAAIA,UAAU,GAAG,IAAI;AACd,IAAMC,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,SAAhBA,aAAaA,CAAA;EAAA,OAASD,UAAU;AAAA;AAEtC,IAAMG,oBAAoB,GAAAD,OAAA,CAAAC,oBAAA,GAAG,SAAvBA,oBAAoBA,CAAA;EAAA,OAAS,UAACC,IAAI;IAAA,OAAK,UAACC,MAAM,EAAK;MAC9DL,UAAU,GAAGK,MAAM;MACnB,OAAOD,IAAI,CAACC,MAAM,CAAC;IACrB,CAAC;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _redux = require("redux");
|
|
9
|
+
var _marks = _interopRequireDefault(require("./marks"));
|
|
10
|
+
var _reduxUndo = _interopRequireDefault(require("redux-undo"));
|
|
11
|
+
var _default = exports["default"] = function _default() {
|
|
12
|
+
return (0, _redux.combineReducers)({
|
|
13
|
+
marks: (0, _reduxUndo["default"])(_marks["default"], {
|
|
14
|
+
debug: false
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=reducer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reducer.js","names":["_redux","require","_marks","_interopRequireDefault","_reduxUndo","_default","exports","combineReducers","marks","undoable","debug"],"sources":["../../src/container/reducer.js"],"sourcesContent":["import { combineReducers } from 'redux';\nimport marks from './marks';\nimport undoable from 'redux-undo';\n\nexport default () => combineReducers({ marks: undoable(marks, { debug: false }) });\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAD,sBAAA,CAAAF,OAAA;AAAkC,IAAAI,QAAA,GAAAC,OAAA,cAEnB,SAAAD,SAAA;EAAA,OAAM,IAAAE,sBAAe,EAAC;IAAEC,KAAK,EAAE,IAAAC,qBAAQ,EAACD,iBAAK,EAAE;MAAEE,KAAK,EAAE;IAAM,CAAC;EAAE,CAAC,CAAC;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getLabelPosition = exports["default"] = exports.CoordinatesLabel = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
var _plot = require("@pie-lib/plot");
|
|
12
|
+
var _renderUi = require("@pie-lib/render-ui");
|
|
13
|
+
var _styles = require("@mui/material/styles");
|
|
14
|
+
var _InputBase = _interopRequireDefault(require("@mui/material/InputBase"));
|
|
15
|
+
var _utils = require("./utils");
|
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
+
var StyledInputBase = (0, _styles.styled)(_InputBase["default"])(function (_ref) {
|
|
19
|
+
var theme = _ref.theme;
|
|
20
|
+
return {
|
|
21
|
+
fontFamily: theme.typography.fontFamily,
|
|
22
|
+
fontSize: theme.typography.fontSize,
|
|
23
|
+
borderRadius: '8px',
|
|
24
|
+
background: theme.palette.common.white,
|
|
25
|
+
color: _renderUi.color.defaults.PRIMARY_DARK,
|
|
26
|
+
'& .MuiInputBase-input': {
|
|
27
|
+
padding: 0
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// eslint-disable-next-line react/prop-types
|
|
33
|
+
var getLabelPosition = exports.getLabelPosition = function getLabelPosition(graphProps, x, y, labelLength) {
|
|
34
|
+
var scale = graphProps.scale,
|
|
35
|
+
domain = graphProps.domain,
|
|
36
|
+
range = graphProps.range;
|
|
37
|
+
// treat corner cases for maximum and minimum
|
|
38
|
+
var topShift = y === range.min ? 16 : y === range.max ? 0 : 8;
|
|
39
|
+
var leftShift = 10;
|
|
40
|
+
var rightEdge = scale.x(x) + labelLength + leftShift;
|
|
41
|
+
if (rightEdge >= scale.x(domain.max)) {
|
|
42
|
+
return {
|
|
43
|
+
left: scale.x(x) - leftShift - labelLength,
|
|
44
|
+
top: scale.y(y) - topShift
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
left: scale.x(x) + leftShift,
|
|
49
|
+
top: scale.y(y) - topShift
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
var CoordinatesLabel = exports.CoordinatesLabel = function CoordinatesLabel(_ref2) {
|
|
53
|
+
var x = _ref2.x,
|
|
54
|
+
y = _ref2.y,
|
|
55
|
+
graphProps = _ref2.graphProps;
|
|
56
|
+
var label = "(".concat((0, _utils.roundNumber)(x), ", ").concat((0, _utils.roundNumber)(y), ")");
|
|
57
|
+
var labelLength = (label.length || 0) * 6;
|
|
58
|
+
var labelPosition = getLabelPosition(graphProps, x, y, labelLength);
|
|
59
|
+
var style = _objectSpread({
|
|
60
|
+
position: 'absolute',
|
|
61
|
+
pointerEvents: 'auto',
|
|
62
|
+
width: labelLength,
|
|
63
|
+
padding: 0
|
|
64
|
+
}, labelPosition);
|
|
65
|
+
return /*#__PURE__*/_react["default"].createElement(StyledInputBase, {
|
|
66
|
+
style: style,
|
|
67
|
+
value: label,
|
|
68
|
+
inputProps: {
|
|
69
|
+
ariaLabel: 'naked'
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
CoordinatesLabel.propTypes = {
|
|
74
|
+
graphProps: _plot.types.GraphPropsType,
|
|
75
|
+
x: _propTypes["default"].number,
|
|
76
|
+
y: _propTypes["default"].number
|
|
77
|
+
};
|
|
78
|
+
var _default = exports["default"] = CoordinatesLabel;
|
|
79
|
+
//# sourceMappingURL=coordinates-label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinates-label.js","names":["_react","_interopRequireDefault","require","_propTypes","_plot","_renderUi","_styles","_InputBase","_utils","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","StyledInputBase","styled","InputBase","_ref","theme","fontFamily","typography","fontSize","borderRadius","background","palette","common","white","color","defaults","PRIMARY_DARK","padding","getLabelPosition","exports","graphProps","x","y","labelLength","scale","domain","range","topShift","min","max","leftShift","rightEdge","left","top","CoordinatesLabel","_ref2","label","concat","roundNumber","labelPosition","style","position","pointerEvents","width","createElement","value","inputProps","ariaLabel","propTypes","types","GraphPropsType","PropTypes","number","_default"],"sources":["../src/coordinates-label.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { types } from '@pie-lib/plot';\nimport { color } from '@pie-lib/render-ui';\nimport { styled } from '@mui/material/styles';\nimport InputBase from '@mui/material/InputBase';\nimport { roundNumber } from './utils';\n\nconst StyledInputBase = styled(InputBase)(({ theme }) => ({\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.fontSize,\n borderRadius: '8px',\n background: theme.palette.common.white,\n color: color.defaults.PRIMARY_DARK,\n '& .MuiInputBase-input': {\n padding: 0,\n },\n}));\n\n// eslint-disable-next-line react/prop-types\nexport const getLabelPosition = (graphProps, x, y, labelLength) => {\n const { scale, domain, range } = graphProps;\n // treat corner cases for maximum and minimum\n const topShift = y === range.min ? 16 : y === range.max ? 0 : 8;\n const leftShift = 10;\n const rightEdge = scale.x(x) + labelLength + leftShift;\n\n if (rightEdge >= scale.x(domain.max)) {\n return {\n left: scale.x(x) - leftShift - labelLength,\n top: scale.y(y) - topShift,\n };\n }\n\n return {\n left: scale.x(x) + leftShift,\n top: scale.y(y) - topShift,\n };\n};\n\nexport const CoordinatesLabel = ({ x, y, graphProps }) => {\n const label = `(${roundNumber(x)}, ${roundNumber(y)})`;\n const labelLength = (label.length || 0) * 6;\n const labelPosition = getLabelPosition(graphProps, x, y, labelLength);\n\n const style = {\n position: 'absolute',\n pointerEvents: 'auto',\n width: labelLength,\n padding: 0,\n ...labelPosition,\n };\n\n return <StyledInputBase style={style} value={label} inputProps={{ ariaLabel: 'naked' }} />;\n};\n\nCoordinatesLabel.propTypes = {\n graphProps: types.GraphPropsType,\n x: PropTypes.number,\n y: PropTypes.number,\n};\n\nexport default CoordinatesLabel;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA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|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.toolIsAvailable = exports.setToolbarAvailability = exports.getAvailableTool = exports.filterByVisibleToolTypes = exports.filterByValidToolTypes = exports["default"] = exports.GraphWithControls = void 0;
|
|
9
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
12
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
+
var _react = _interopRequireDefault(require("react"));
|
|
16
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
+
var _styles = require("@mui/material/styles");
|
|
18
|
+
var _lodashEs = require("lodash-es");
|
|
19
|
+
var _renderUi = require("@pie-lib/render-ui");
|
|
20
|
+
var _toolMenu = _interopRequireDefault(require("./tool-menu"));
|
|
21
|
+
var _graph = _interopRequireWildcard(require("./graph"));
|
|
22
|
+
var _undoRedo = _interopRequireDefault(require("./undo-redo"));
|
|
23
|
+
var _tools = require("./tools");
|
|
24
|
+
var _material = require("@mui/material");
|
|
25
|
+
var _ExpandMore = _interopRequireDefault(require("@mui/icons-material/ExpandMore"));
|
|
26
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
27
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
28
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
29
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31
|
+
var StyledGraphContainer = (0, _styles.styled)('div')({
|
|
32
|
+
display: 'flex',
|
|
33
|
+
flexDirection: 'column',
|
|
34
|
+
width: 'min-content'
|
|
35
|
+
});
|
|
36
|
+
var StyledControls = (0, _styles.styled)('div')(function (_ref) {
|
|
37
|
+
var theme = _ref.theme;
|
|
38
|
+
return {
|
|
39
|
+
display: 'flex',
|
|
40
|
+
justifyContent: 'space-between',
|
|
41
|
+
padding: theme.spacing(1),
|
|
42
|
+
color: _renderUi.color.text(),
|
|
43
|
+
backgroundColor: _renderUi.color.primaryLight(),
|
|
44
|
+
'& button': {
|
|
45
|
+
fontSize: theme.typography.fontSize
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
var StyledAccordion = (0, _styles.styled)(_material.Accordion)({
|
|
50
|
+
backgroundColor: _renderUi.color.primaryLight(),
|
|
51
|
+
width: '100%'
|
|
52
|
+
});
|
|
53
|
+
var StyledAccordionSummary = (0, _styles.styled)(_material.AccordionSummary)(function (_ref2) {
|
|
54
|
+
var theme = _ref2.theme;
|
|
55
|
+
return {
|
|
56
|
+
padding: "0 ".concat(theme.spacing(1)),
|
|
57
|
+
minHeight: '32px !important',
|
|
58
|
+
'& .MuiAccordionSummary-content': {
|
|
59
|
+
margin: '4px 0 !important'
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
var StyledAccordionDetails = (0, _styles.styled)(_material.AccordionDetails)(function (_ref3) {
|
|
64
|
+
var theme = _ref3.theme;
|
|
65
|
+
return {
|
|
66
|
+
padding: 0,
|
|
67
|
+
marginTop: theme.spacing(1),
|
|
68
|
+
display: 'flex',
|
|
69
|
+
justifyContent: 'space-between'
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
var setToolbarAvailability = exports.setToolbarAvailability = function setToolbarAvailability(toolbarTools) {
|
|
73
|
+
return _tools.toolsArr.map(function (tA) {
|
|
74
|
+
return _objectSpread(_objectSpread({}, tA), {}, {
|
|
75
|
+
toolbar: !!toolbarTools.find(function (t) {
|
|
76
|
+
return t === tA.type;
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
}) || [];
|
|
80
|
+
};
|
|
81
|
+
var toolIsAvailable = exports.toolIsAvailable = function toolIsAvailable(tools, currentTool) {
|
|
82
|
+
return currentTool && tools && (tools.find(function (tool) {
|
|
83
|
+
return tool.type === currentTool.type;
|
|
84
|
+
}) || {}).toolbar;
|
|
85
|
+
};
|
|
86
|
+
var getAvailableTool = exports.getAvailableTool = function getAvailableTool(tools) {
|
|
87
|
+
return tools.find(function (tool) {
|
|
88
|
+
return tool.toolbar;
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
var filterByValidToolTypes = exports.filterByValidToolTypes = function filterByValidToolTypes(backgroundMarks) {
|
|
92
|
+
return backgroundMarks.filter(function (bM) {
|
|
93
|
+
return !!_tools.allTools.find(function (tool) {
|
|
94
|
+
return tool === bM.type;
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
var filterByVisibleToolTypes = exports.filterByVisibleToolTypes = function filterByVisibleToolTypes(toolbarTools, marks) {
|
|
99
|
+
return marks.filter(function (bM) {
|
|
100
|
+
return !!toolbarTools.find(function (tool) {
|
|
101
|
+
return tool === bM.type;
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
var getDefaultCurrentTool = function getDefaultCurrentTool(toolType) {
|
|
106
|
+
return _tools.toolsArr.find(function (tool) {
|
|
107
|
+
return tool.type === toolType;
|
|
108
|
+
}) || null;
|
|
109
|
+
};
|
|
110
|
+
var Collapsible = function Collapsible(_ref4) {
|
|
111
|
+
var children = _ref4.children,
|
|
112
|
+
title = _ref4.title;
|
|
113
|
+
return /*#__PURE__*/_react["default"].createElement(StyledAccordion, {
|
|
114
|
+
elevation: 0,
|
|
115
|
+
disableGutters: true,
|
|
116
|
+
square: true,
|
|
117
|
+
TransitionProps: {
|
|
118
|
+
timeout: {
|
|
119
|
+
enter: 225,
|
|
120
|
+
exit: 195
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}, /*#__PURE__*/_react["default"].createElement(StyledAccordionSummary, {
|
|
124
|
+
expandIcon: /*#__PURE__*/_react["default"].createElement(_ExpandMore["default"], null)
|
|
125
|
+
}, /*#__PURE__*/_react["default"].createElement(_material.Typography, {
|
|
126
|
+
variant: "subheading"
|
|
127
|
+
}, title)), /*#__PURE__*/_react["default"].createElement(StyledAccordionDetails, null, children));
|
|
128
|
+
};
|
|
129
|
+
Collapsible.propTypes = {
|
|
130
|
+
children: _propTypes["default"].array,
|
|
131
|
+
title: _propTypes["default"].string
|
|
132
|
+
};
|
|
133
|
+
var GraphWithControls = exports.GraphWithControls = /*#__PURE__*/function (_React$Component) {
|
|
134
|
+
function GraphWithControls(props) {
|
|
135
|
+
var _this;
|
|
136
|
+
(0, _classCallCheck2["default"])(this, GraphWithControls);
|
|
137
|
+
_this = _callSuper(this, GraphWithControls, [props]);
|
|
138
|
+
(0, _defineProperty2["default"])(_this, "changeCurrentTool", function (tool, tools) {
|
|
139
|
+
return _this.setState({
|
|
140
|
+
currentTool: tools.find(function (t) {
|
|
141
|
+
return t.type === tool;
|
|
142
|
+
}),
|
|
143
|
+
labelModeEnabled: tool === 'label'
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
_this.state = {
|
|
147
|
+
currentTool: getDefaultCurrentTool(props.defaultTool),
|
|
148
|
+
labelModeEnabled: false
|
|
149
|
+
};
|
|
150
|
+
return _this;
|
|
151
|
+
}
|
|
152
|
+
(0, _inherits2["default"])(GraphWithControls, _React$Component);
|
|
153
|
+
return (0, _createClass2["default"])(GraphWithControls, [{
|
|
154
|
+
key: "componentDidUpdate",
|
|
155
|
+
value: function componentDidUpdate(prevProps) {
|
|
156
|
+
var defaultTool = this.props.defaultTool;
|
|
157
|
+
if (prevProps.defaultTool !== defaultTool) {
|
|
158
|
+
var currentTool = getDefaultCurrentTool(defaultTool);
|
|
159
|
+
this.setState({
|
|
160
|
+
currentTool: currentTool
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}, {
|
|
165
|
+
key: "render",
|
|
166
|
+
value: function render() {
|
|
167
|
+
var _this2 = this;
|
|
168
|
+
var _this$state = this.state,
|
|
169
|
+
currentTool = _this$state.currentTool,
|
|
170
|
+
labelModeEnabled = _this$state.labelModeEnabled;
|
|
171
|
+
var _this$props = this.props,
|
|
172
|
+
axesSettings = _this$props.axesSettings,
|
|
173
|
+
className = _this$props.className,
|
|
174
|
+
coordinatesOnHover = _this$props.coordinatesOnHover,
|
|
175
|
+
collapsibleToolbar = _this$props.collapsibleToolbar,
|
|
176
|
+
collapsibleToolbarTitle = _this$props.collapsibleToolbarTitle,
|
|
177
|
+
disabled = _this$props.disabled,
|
|
178
|
+
disabledLabels = _this$props.disabledLabels,
|
|
179
|
+
disabledTitle = _this$props.disabledTitle,
|
|
180
|
+
domain = _this$props.domain,
|
|
181
|
+
draggableTools = _this$props.draggableTools,
|
|
182
|
+
labels = _this$props.labels,
|
|
183
|
+
labelsPlaceholders = _this$props.labelsPlaceholders,
|
|
184
|
+
onChangeLabels = _this$props.onChangeLabels,
|
|
185
|
+
onChangeMarks = _this$props.onChangeMarks,
|
|
186
|
+
onChangeTitle = _this$props.onChangeTitle,
|
|
187
|
+
onChangeTools = _this$props.onChangeTools,
|
|
188
|
+
onUndo = _this$props.onUndo,
|
|
189
|
+
onRedo = _this$props.onRedo,
|
|
190
|
+
onReset = _this$props.onReset,
|
|
191
|
+
range = _this$props.range,
|
|
192
|
+
size = _this$props.size,
|
|
193
|
+
showLabels = _this$props.showLabels,
|
|
194
|
+
showPixelGuides = _this$props.showPixelGuides,
|
|
195
|
+
showTitle = _this$props.showTitle,
|
|
196
|
+
title = _this$props.title,
|
|
197
|
+
titlePlaceholder = _this$props.titlePlaceholder,
|
|
198
|
+
language = _this$props.language,
|
|
199
|
+
removeIncompleteTool = _this$props.removeIncompleteTool,
|
|
200
|
+
limitLabeling = _this$props.limitLabeling;
|
|
201
|
+
var _this$props2 = this.props,
|
|
202
|
+
backgroundMarks = _this$props2.backgroundMarks,
|
|
203
|
+
marks = _this$props2.marks,
|
|
204
|
+
toolbarTools = _this$props2.toolbarTools;
|
|
205
|
+
|
|
206
|
+
// make sure only valid tool types are kept (string) and without duplicates
|
|
207
|
+
toolbarTools = (0, _lodashEs.uniq)(toolbarTools || []).filter(function (tT) {
|
|
208
|
+
return !!(0, _lodashEs.isString)(tT);
|
|
209
|
+
}) || [];
|
|
210
|
+
|
|
211
|
+
// keep only the backgroundMarks that have valid types
|
|
212
|
+
backgroundMarks = filterByValidToolTypes(backgroundMarks || []);
|
|
213
|
+
|
|
214
|
+
// keep only the marks that have types which appear in toolbar
|
|
215
|
+
marks = filterByVisibleToolTypes(toolbarTools, marks || []);
|
|
216
|
+
var tools = setToolbarAvailability(toolbarTools);
|
|
217
|
+
|
|
218
|
+
// set current tool if there's no current tool or if the existing one is no longer available
|
|
219
|
+
if (!currentTool || !toolIsAvailable(tools, currentTool)) {
|
|
220
|
+
currentTool = getAvailableTool(tools);
|
|
221
|
+
}
|
|
222
|
+
var graphActions = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_toolMenu["default"], {
|
|
223
|
+
currentToolType: currentTool && currentTool.type,
|
|
224
|
+
disabled: !!disabled,
|
|
225
|
+
draggableTools: draggableTools,
|
|
226
|
+
labelModeEnabled: labelModeEnabled,
|
|
227
|
+
onChange: function onChange(tool) {
|
|
228
|
+
return _this2.changeCurrentTool(tool, tools);
|
|
229
|
+
},
|
|
230
|
+
toolbarTools: toolbarTools,
|
|
231
|
+
onChangeTools: onChangeTools,
|
|
232
|
+
language: language
|
|
233
|
+
}), !disabled && /*#__PURE__*/_react["default"].createElement(_undoRedo["default"], {
|
|
234
|
+
onUndo: onUndo,
|
|
235
|
+
onRedo: onRedo,
|
|
236
|
+
onReset: onReset,
|
|
237
|
+
language: language
|
|
238
|
+
}));
|
|
239
|
+
return /*#__PURE__*/_react["default"].createElement(StyledGraphContainer, {
|
|
240
|
+
className: className
|
|
241
|
+
}, /*#__PURE__*/_react["default"].createElement(StyledControls, null, collapsibleToolbar ? /*#__PURE__*/_react["default"].createElement(Collapsible, {
|
|
242
|
+
title: collapsibleToolbarTitle
|
|
243
|
+
}, graphActions) : graphActions), /*#__PURE__*/_react["default"].createElement("div", {
|
|
244
|
+
ref: function ref(r) {
|
|
245
|
+
return _this2.labelNode = r;
|
|
246
|
+
}
|
|
247
|
+
}), /*#__PURE__*/_react["default"].createElement(_graph["default"], {
|
|
248
|
+
axesSettings: axesSettings,
|
|
249
|
+
backgroundMarks: backgroundMarks,
|
|
250
|
+
coordinatesOnHover: coordinatesOnHover,
|
|
251
|
+
currentTool: currentTool,
|
|
252
|
+
disabledLabels: disabledLabels,
|
|
253
|
+
disabledTitle: disabledTitle,
|
|
254
|
+
domain: domain,
|
|
255
|
+
labels: labels,
|
|
256
|
+
labelModeEnabled: labelModeEnabled,
|
|
257
|
+
labelsPlaceholders: labelsPlaceholders,
|
|
258
|
+
marks: marks,
|
|
259
|
+
onChangeMarks: !disabled ? onChangeMarks : undefined,
|
|
260
|
+
onChangeLabels: onChangeLabels,
|
|
261
|
+
onChangeTitle: onChangeTitle,
|
|
262
|
+
range: range,
|
|
263
|
+
size: size,
|
|
264
|
+
showLabels: showLabels,
|
|
265
|
+
showPixelGuides: showPixelGuides,
|
|
266
|
+
showTitle: showTitle,
|
|
267
|
+
title: title,
|
|
268
|
+
titlePlaceholder: titlePlaceholder,
|
|
269
|
+
tools: tools,
|
|
270
|
+
removeIncompleteTool: removeIncompleteTool,
|
|
271
|
+
limitLabeling: limitLabeling
|
|
272
|
+
}));
|
|
273
|
+
}
|
|
274
|
+
}]);
|
|
275
|
+
}(_react["default"].Component);
|
|
276
|
+
(0, _defineProperty2["default"])(GraphWithControls, "propTypes", _objectSpread(_objectSpread({}, _graph.graphPropTypes), {}, {
|
|
277
|
+
onUndo: _propTypes["default"].func,
|
|
278
|
+
onRedo: _propTypes["default"].func,
|
|
279
|
+
onReset: _propTypes["default"].func,
|
|
280
|
+
toolbarTools: _propTypes["default"].arrayOf(_propTypes["default"].string),
|
|
281
|
+
// array of tool types that have to be displayed in the toolbar, same shape as 'allTools'
|
|
282
|
+
language: _propTypes["default"].string
|
|
283
|
+
}));
|
|
284
|
+
(0, _defineProperty2["default"])(GraphWithControls, "defaultProps", {
|
|
285
|
+
collapsibleToolbar: false,
|
|
286
|
+
collapsibleToolbarTitle: '',
|
|
287
|
+
disabledLabels: false,
|
|
288
|
+
disabledTitle: false,
|
|
289
|
+
showLabels: true,
|
|
290
|
+
showTitle: true,
|
|
291
|
+
toolbarTools: []
|
|
292
|
+
});
|
|
293
|
+
var _default = exports["default"] = GraphWithControls;
|
|
294
|
+
//# sourceMappingURL=graph-with-controls.js.map
|