@pie-lib/graphing 2.4.3-next.362 → 2.4.3-next.406

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.
Files changed (100) hide show
  1. package/lib/axis/arrow.js +15 -25
  2. package/lib/axis/arrow.js.map +1 -1
  3. package/lib/axis/axes.js +41 -73
  4. package/lib/axis/axes.js.map +1 -1
  5. package/lib/axis/index.js +1 -1
  6. package/lib/bg.js +20 -31
  7. package/lib/bg.js.map +1 -1
  8. package/lib/container/index.js +27 -41
  9. package/lib/container/index.js.map +1 -1
  10. package/lib/container/reducer.js +2 -2
  11. package/lib/container/reducer.js.map +1 -1
  12. package/lib/coordinates-label.js +5 -5
  13. package/lib/coordinates-label.js.map +1 -1
  14. package/lib/graph-with-controls.js +26 -37
  15. package/lib/graph-with-controls.js.map +1 -1
  16. package/lib/graph.js +43 -69
  17. package/lib/graph.js.map +1 -1
  18. package/lib/grid-setup.js +6 -6
  19. package/lib/grid-setup.js.map +1 -1
  20. package/lib/grid.js +28 -46
  21. package/lib/grid.js.map +1 -1
  22. package/lib/index.js +3 -3
  23. package/lib/index.js.map +1 -1
  24. package/lib/labels.js +22 -38
  25. package/lib/labels.js.map +1 -1
  26. package/lib/mark-label.js +10 -20
  27. package/lib/mark-label.js.map +1 -1
  28. package/lib/toggle-bar.js +22 -33
  29. package/lib/toggle-bar.js.map +1 -1
  30. package/lib/tool-menu.js +21 -32
  31. package/lib/tool-menu.js.map +1 -1
  32. package/lib/tools/circle/bg-circle.js +27 -38
  33. package/lib/tools/circle/bg-circle.js.map +1 -1
  34. package/lib/tools/circle/component.js +36 -54
  35. package/lib/tools/circle/component.js.map +1 -1
  36. package/lib/tools/circle/index.js +5 -5
  37. package/lib/tools/circle/index.js.map +1 -1
  38. package/lib/tools/line/component.js +11 -25
  39. package/lib/tools/line/component.js.map +1 -1
  40. package/lib/tools/line/index.js +2 -2
  41. package/lib/tools/line/index.js.map +1 -1
  42. package/lib/tools/parabola/component.js +2 -2
  43. package/lib/tools/parabola/component.js.map +1 -1
  44. package/lib/tools/parabola/index.js +5 -5
  45. package/lib/tools/parabola/index.js.map +1 -1
  46. package/lib/tools/point/component.js +30 -47
  47. package/lib/tools/point/component.js.map +1 -1
  48. package/lib/tools/point/index.js +5 -5
  49. package/lib/tools/point/index.js.map +1 -1
  50. package/lib/tools/polygon/component.js +59 -107
  51. package/lib/tools/polygon/component.js.map +1 -1
  52. package/lib/tools/polygon/index.js +9 -19
  53. package/lib/tools/polygon/index.js.map +1 -1
  54. package/lib/tools/polygon/line.js +28 -41
  55. package/lib/tools/polygon/line.js.map +1 -1
  56. package/lib/tools/polygon/polygon.js +28 -42
  57. package/lib/tools/polygon/polygon.js.map +1 -1
  58. package/lib/tools/ray/component.js +11 -25
  59. package/lib/tools/ray/component.js.map +1 -1
  60. package/lib/tools/ray/index.js +2 -2
  61. package/lib/tools/ray/index.js.map +1 -1
  62. package/lib/tools/segment/component.js +8 -11
  63. package/lib/tools/segment/component.js.map +1 -1
  64. package/lib/tools/segment/index.js +2 -2
  65. package/lib/tools/segment/index.js.map +1 -1
  66. package/lib/tools/shared/arrow-head.js +2 -2
  67. package/lib/tools/shared/arrow-head.js.map +1 -1
  68. package/lib/tools/shared/line/index.js +43 -66
  69. package/lib/tools/shared/line/index.js.map +1 -1
  70. package/lib/tools/shared/line/line-path.js +29 -42
  71. package/lib/tools/shared/line/line-path.js.map +1 -1
  72. package/lib/tools/shared/line/with-root-edge.js +12 -14
  73. package/lib/tools/shared/line/with-root-edge.js.map +1 -1
  74. package/lib/tools/shared/point/arrow-point.js +24 -39
  75. package/lib/tools/shared/point/arrow-point.js.map +1 -1
  76. package/lib/tools/shared/point/arrow.js +23 -37
  77. package/lib/tools/shared/point/arrow.js.map +1 -1
  78. package/lib/tools/shared/point/base-point.js +24 -38
  79. package/lib/tools/shared/point/base-point.js.map +1 -1
  80. package/lib/tools/shared/point/index.js +6 -6
  81. package/lib/tools/shared/point/index.js.map +1 -1
  82. package/lib/tools/shared/styles.js +7 -5
  83. package/lib/tools/shared/styles.js.map +1 -1
  84. package/lib/tools/shared/types.js +2 -2
  85. package/lib/tools/shared/types.js.map +1 -1
  86. package/lib/tools/sine/component.js +2 -2
  87. package/lib/tools/sine/component.js.map +1 -1
  88. package/lib/tools/sine/index.js +5 -5
  89. package/lib/tools/sine/index.js.map +1 -1
  90. package/lib/tools/vector/component.js +8 -11
  91. package/lib/tools/vector/component.js.map +1 -1
  92. package/lib/tools/vector/index.js +2 -2
  93. package/lib/tools/vector/index.js.map +1 -1
  94. package/lib/undo-redo.js +19 -31
  95. package/lib/undo-redo.js.map +1 -1
  96. package/lib/use-debounce.js +5 -13
  97. package/lib/use-debounce.js.map +1 -1
  98. package/lib/utils.js +2 -2
  99. package/lib/utils.js.map +1 -1
  100. package/package.json +3 -3
@@ -1,10 +1,18 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
8
  exports["default"] = exports.RayLine = void 0;
7
9
 
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
+
14
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
15
+
8
16
  var _line = require("../shared/line");
9
17
 
10
18
  var _react = _interopRequireDefault(require("react"));
@@ -22,27 +30,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
22
30
  var _utils = require("../../utils");
23
31
 
24
32
  var _excluded = ["graphProps", "from", "to", "classes", "disabled", "correctness", "className"];
25
-
26
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
-
28
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
29
-
30
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
31
-
32
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
33
-
34
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
35
-
36
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
37
-
38
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
39
-
40
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
41
-
42
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
43
-
44
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
45
-
46
33
  var markerId = (0, _arrowHead.genUid)();
47
34
 
48
35
  var rayStyles = function rayStyles(theme) {
@@ -66,8 +53,7 @@ var RayLine = function RayLine(props) {
66
53
  disabled = props.disabled,
67
54
  correctness = props.correctness,
68
55
  className = props.className,
69
- rest = _objectWithoutProperties(props, _excluded);
70
-
56
+ rest = (0, _objectWithoutProperties2["default"])(props, _excluded);
71
57
  var scale = graphProps.scale;
72
58
 
73
59
  var _getAdjustedGraphLimi = (0, _utils.getAdjustedGraphLimits)(graphProps),
@@ -75,7 +61,7 @@ var RayLine = function RayLine(props) {
75
61
  range = _getAdjustedGraphLimi.range;
76
62
 
77
63
  var _trig$edges = _plot.trig.edges(domain, range)(from, to),
78
- _trig$edges2 = _slicedToArray(_trig$edges, 1),
64
+ _trig$edges2 = (0, _slicedToArray2["default"])(_trig$edges, 1),
79
65
  aToB = _trig$edges2[0];
80
66
 
81
67
  var suffix = correctness || disabled && 'disabled' || 'enabled';
@@ -83,7 +69,7 @@ var RayLine = function RayLine(props) {
83
69
  size: (0, _utils.thinnerShapesNeeded)(graphProps) ? 4 : 5,
84
70
  id: "".concat(props.markerId || markerId, "-").concat(suffix),
85
71
  className: (0, _classnames["default"])(classes["".concat(suffix, "Arrow")])
86
- })), /*#__PURE__*/_react["default"].createElement("line", _extends({
72
+ })), /*#__PURE__*/_react["default"].createElement("line", (0, _extends2["default"])({
87
73
  x1: scale.x(from.x),
88
74
  y1: scale.y(from.y),
89
75
  x2: scale.x(aToB.x),
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","names":["markerId","genUid","rayStyles","theme","line","styles","enabledArrow","arrow","disabledArrow","disabled","correct","correctArrow","incorrect","incorrectArrow","RayLine","props","graphProps","from","to","classes","correctness","className","rest","scale","getAdjustedGraphLimits","domain","range","trig","edges","aToB","suffix","thinnerShapesNeeded","classNames","x","y","propTypes","PropTypes","object","string","bool","any","types","PointType","StyledRay","withStyles","Ray","lineBase","Component","lineToolComponent"],"sources":["../../../src/tools/ray/component.jsx"],"sourcesContent":["import { lineToolComponent, lineBase, styles } from '../shared/line';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { ArrowMarker, genUid } from '../shared/arrow-head';\nimport { trig, types } from '@pie-lib/plot';\nimport { withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport { thinnerShapesNeeded, getAdjustedGraphLimits } from '../../utils';\n\nconst markerId = genUid();\n\nconst rayStyles = theme => ({\n line: styles.line(theme),\n enabledArrow: styles.arrow(theme),\n disabledArrow: styles.disabledArrow(theme),\n disabled: styles.disabled(theme),\n correct: styles.correct(theme, 'stroke'),\n correctArrow: styles.correct(theme),\n incorrect: styles.incorrect(theme, 'stroke'),\n incorrectArrow: styles.incorrect(theme)\n});\n\nexport const RayLine = props => {\n const { graphProps, from, to, classes, disabled, correctness, className, ...rest } = props;\n const { scale } = graphProps;\n const { domain, range } = getAdjustedGraphLimits(graphProps);\n const [aToB] = trig.edges(domain, range)(from, to);\n const suffix = correctness || (disabled && 'disabled') || 'enabled';\n\n return (\n <g>\n <defs>\n <ArrowMarker\n size={thinnerShapesNeeded(graphProps) ? 4 : 5}\n id={`${props.markerId || markerId}-${suffix}`}\n className={classNames(classes[`${suffix}Arrow`])}\n />\n </defs>\n <line\n x1={scale.x(from.x)}\n y1={scale.y(from.y)}\n x2={scale.x(aToB.x)}\n y2={scale.y(aToB.y)}\n {...rest}\n className={classNames(\n classes.line,\n disabled && classes.disabled,\n classes[correctness],\n className\n )}\n markerEnd={`url(#${props.markerId || markerId}-${suffix})`}\n />\n </g>\n );\n};\n\nRayLine.propTypes = {\n classes: PropTypes.object,\n className: PropTypes.string,\n disabled: PropTypes.bool,\n correctness: PropTypes.string,\n graphProps: PropTypes.any,\n from: types.PointType,\n to: types.PointType,\n markerId: PropTypes.string\n};\n\nconst StyledRay = withStyles(rayStyles)(RayLine);\n\nconst Ray = lineBase(StyledRay);\nconst Component = lineToolComponent(Ray);\n\nexport default Component;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,QAAQ,GAAG,IAAAC,iBAAA,GAAjB;;AAEA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAAAC,KAAK;EAAA,OAAK;IAC1BC,IAAI,EAAEC,YAAA,CAAOD,IAAP,CAAYD,KAAZ,CADoB;IAE1BG,YAAY,EAAED,YAAA,CAAOE,KAAP,CAAaJ,KAAb,CAFY;IAG1BK,aAAa,EAAEH,YAAA,CAAOG,aAAP,CAAqBL,KAArB,CAHW;IAI1BM,QAAQ,EAAEJ,YAAA,CAAOI,QAAP,CAAgBN,KAAhB,CAJgB;IAK1BO,OAAO,EAAEL,YAAA,CAAOK,OAAP,CAAeP,KAAf,EAAsB,QAAtB,CALiB;IAM1BQ,YAAY,EAAEN,YAAA,CAAOK,OAAP,CAAeP,KAAf,CANY;IAO1BS,SAAS,EAAEP,YAAA,CAAOO,SAAP,CAAiBT,KAAjB,EAAwB,QAAxB,CAPe;IAQ1BU,cAAc,EAAER,YAAA,CAAOO,SAAP,CAAiBT,KAAjB;EARU,CAAL;AAAA,CAAvB;;AAWO,IAAMW,OAAO,GAAG,SAAVA,OAAU,CAAAC,KAAK,EAAI;EAC9B,IAAQC,UAAR,GAAqFD,KAArF,CAAQC,UAAR;EAAA,IAAoBC,IAApB,GAAqFF,KAArF,CAAoBE,IAApB;EAAA,IAA0BC,EAA1B,GAAqFH,KAArF,CAA0BG,EAA1B;EAAA,IAA8BC,OAA9B,GAAqFJ,KAArF,CAA8BI,OAA9B;EAAA,IAAuCV,QAAvC,GAAqFM,KAArF,CAAuCN,QAAvC;EAAA,IAAiDW,WAAjD,GAAqFL,KAArF,CAAiD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AA5B,cAAwC8B,MAAxC;EAZX,GARF,CADF;AAyBD,CAhCM;;;AAkCPhB,OAAO,CAACqB,SAAR,GAAoB;EAClBhB,OAAO,EAAEiB,qBAAA,CAAUC,MADD;EAElBhB,SAAS,EAAEe,qBAAA,CAAUE,MAFH;EAGlB7B,QAAQ,EAAE2B,qBAAA,CAAUG,IAHF;EAIlBnB,WAAW,EAAEgB,qBAAA,CAAUE,MAJL;EAKlBtB,UAAU,EAAEoB,qBAAA,CAAUI,GALJ;EAMlBvB,IAAI,EAAEwB,WAAA,CAAMC,SANM;EAOlBxB,EAAE,EAAEuB,WAAA,CAAMC,SAPQ;EAQlB1C,QAAQ,EAAEoC,qBAAA,CAAUE;AARF,CAApB;AAWA,IAAMK,SAAS,GAAG,IAAAC,kBAAA,EAAW1C,SAAX,EAAsBY,OAAtB,CAAlB;AAEA,IAAM+B,GAAG,GAAG,IAAAC,cAAA,EAASH,SAAT,CAAZ;AACA,IAAMI,SAAS,GAAG,IAAAC,uBAAA,EAAkBH,GAAlB,CAAlB;eAEeE,S"}
1
+ {"version":3,"file":"component.js","names":["markerId","genUid","rayStyles","theme","line","styles","enabledArrow","arrow","disabledArrow","disabled","correct","correctArrow","incorrect","incorrectArrow","RayLine","props","graphProps","from","to","classes","correctness","className","rest","scale","getAdjustedGraphLimits","domain","range","trig","edges","aToB","suffix","thinnerShapesNeeded","classNames","x","y","propTypes","PropTypes","object","string","bool","any","types","PointType","StyledRay","withStyles","Ray","lineBase","Component","lineToolComponent"],"sources":["../../../src/tools/ray/component.jsx"],"sourcesContent":["import { lineToolComponent, lineBase, styles } from '../shared/line';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { ArrowMarker, genUid } from '../shared/arrow-head';\nimport { trig, types } from '@pie-lib/plot';\nimport { withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport { thinnerShapesNeeded, getAdjustedGraphLimits } from '../../utils';\n\nconst markerId = genUid();\n\nconst rayStyles = theme => ({\n line: styles.line(theme),\n enabledArrow: styles.arrow(theme),\n disabledArrow: styles.disabledArrow(theme),\n disabled: styles.disabled(theme),\n correct: styles.correct(theme, 'stroke'),\n correctArrow: styles.correct(theme),\n incorrect: styles.incorrect(theme, 'stroke'),\n incorrectArrow: styles.incorrect(theme)\n});\n\nexport const RayLine = props => {\n const { graphProps, from, to, classes, disabled, correctness, className, ...rest } = props;\n const { scale } = graphProps;\n const { domain, range } = getAdjustedGraphLimits(graphProps);\n const [aToB] = trig.edges(domain, range)(from, to);\n const suffix = correctness || (disabled && 'disabled') || 'enabled';\n\n return (\n <g>\n <defs>\n <ArrowMarker\n size={thinnerShapesNeeded(graphProps) ? 4 : 5}\n id={`${props.markerId || markerId}-${suffix}`}\n className={classNames(classes[`${suffix}Arrow`])}\n />\n </defs>\n <line\n x1={scale.x(from.x)}\n y1={scale.y(from.y)}\n x2={scale.x(aToB.x)}\n y2={scale.y(aToB.y)}\n {...rest}\n className={classNames(\n classes.line,\n disabled && classes.disabled,\n classes[correctness],\n className\n )}\n markerEnd={`url(#${props.markerId || markerId}-${suffix})`}\n />\n </g>\n );\n};\n\nRayLine.propTypes = {\n classes: PropTypes.object,\n className: PropTypes.string,\n disabled: PropTypes.bool,\n correctness: PropTypes.string,\n graphProps: PropTypes.any,\n from: types.PointType,\n to: types.PointType,\n markerId: PropTypes.string\n};\n\nconst StyledRay = withStyles(rayStyles)(RayLine);\n\nconst Ray = lineBase(StyledRay);\nconst Component = lineToolComponent(Ray);\n\nexport default Component;\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;AAEA,IAAMA,QAAQ,GAAG,IAAAC,iBAAA,GAAjB;;AAEA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAAAC,KAAK;EAAA,OAAK;IAC1BC,IAAI,EAAEC,YAAA,CAAOD,IAAP,CAAYD,KAAZ,CADoB;IAE1BG,YAAY,EAAED,YAAA,CAAOE,KAAP,CAAaJ,KAAb,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,IAAMK,SAAS,GAAG,IAAAC,kBAAA,EAAW1C,SAAX,EAAsBY,OAAtB,CAAlB;AAEA,IAAM+B,GAAG,GAAG,IAAAC,cAAA,EAASH,SAAT,CAAZ;AACA,IAAMI,SAAS,GAAG,IAAAC,uBAAA,EAAkBH,GAAlB,CAAlB;eAEeE,S"}
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -9,8 +11,6 @@ var _component = _interopRequireDefault(require("./component"));
9
11
 
10
12
  var _line = require("../shared/line");
11
13
 
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
-
14
14
  var tool = (0, _line.lineTool)('ray', _component["default"]);
15
15
  exports.tool = tool;
16
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["tool","lineTool","Ray"],"sources":["../../../src/tools/ray/index.js"],"sourcesContent":["import Ray from './component';\nimport { lineTool } from '../shared/line';\n\nexport const tool = lineTool('ray', Ray);\n"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEO,IAAMA,IAAI,GAAG,IAAAC,cAAA,EAAS,KAAT,EAAgBC,qBAAhB,CAAb"}
1
+ {"version":3,"file":"index.js","names":["tool","lineTool","Ray"],"sources":["../../../src/tools/ray/index.js"],"sourcesContent":["import Ray from './component';\nimport { lineTool } from '../shared/line';\n\nexport const tool = lineTool('ray', Ray);\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEO,IAAMA,IAAI,GAAG,IAAAC,cAAA,EAAS,KAAT,EAAgBC,qBAAhB,CAAb"}
@@ -1,10 +1,16 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
8
  exports["default"] = exports.Line = void 0;
7
9
 
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
+
8
14
  var _line = require("../shared/line");
9
15
 
10
16
  var _react = _interopRequireDefault(require("react"));
@@ -19,14 +25,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
19
25
 
20
26
  var _excluded = ["className", "classes", "correctness", "disabled", "graphProps", "from", "to"];
21
27
 
22
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
-
24
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25
-
26
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
27
-
28
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
29
-
30
28
  var lineStyles = function lineStyles(theme) {
31
29
  return {
32
30
  line: _line.styles.line(theme),
@@ -44,10 +42,9 @@ var Line = function Line(props) {
44
42
  graphProps = props.graphProps,
45
43
  from = props.from,
46
44
  to = props.to,
47
- rest = _objectWithoutProperties(props, _excluded);
48
-
45
+ rest = (0, _objectWithoutProperties2["default"])(props, _excluded);
49
46
  var scale = graphProps.scale;
50
- return /*#__PURE__*/_react["default"].createElement("line", _extends({
47
+ return /*#__PURE__*/_react["default"].createElement("line", (0, _extends2["default"])({
51
48
  stroke: "green",
52
49
  strokeWidth: "6",
53
50
  x1: scale.x(from.x),
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","names":["lineStyles","theme","line","styles","disabled","correct","incorrect","Line","props","className","classes","correctness","graphProps","from","to","rest","scale","x","y","classNames","propTypes","PropTypes","string","object","bool","any","types","PointType","StyledLine","withStyles","Segment","lineBase","Component","lineToolComponent"],"sources":["../../../src/tools/segment/component.jsx"],"sourcesContent":["import { lineToolComponent, lineBase, styles } from '../shared/line';\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { types } from '@pie-lib/plot';\nimport { withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\n\nconst lineStyles = theme => ({\n line: styles.line(theme),\n disabled: styles.disabled(theme),\n correct: styles.correct(theme, 'stroke'),\n incorrect: styles.incorrect(theme, 'stroke')\n});\nexport const Line = props => {\n const { className, classes, correctness, disabled, graphProps, from, to, ...rest } = props;\n const { scale } = graphProps;\n\n return (\n <line\n stroke=\"green\"\n strokeWidth=\"6\"\n x1={scale.x(from.x)}\n y1={scale.y(from.y)}\n x2={scale.x(to.x)}\n y2={scale.y(to.y)}\n className={classNames(\n classes.line,\n disabled && classes.disabled,\n classes[correctness],\n className\n )}\n {...rest}\n />\n );\n};\n\nLine.propTypes = {\n className: PropTypes.string,\n classes: PropTypes.object,\n correctness: PropTypes.string,\n disabled: PropTypes.bool,\n graphProps: PropTypes.any,\n from: types.PointType,\n to: types.PointType\n};\n\nconst StyledLine = withStyles(lineStyles)(Line);\nconst Segment = lineBase(StyledLine);\nconst Component = lineToolComponent(Segment);\n\nexport default Component;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;;;AAEA,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAAAC,KAAK;EAAA,OAAK;IAC3BC,IAAI,EAAEC,YAAA,CAAOD,IAAP,CAAYD,K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MM,IAbN,EADF;AAiBD,CArBM;;;AAuBPR,IAAI,CAACa,SAAL,GAAiB;EACfX,SAAS,EAAEY,qBAAA,CAAUC,MADN;EAEfZ,OAAO,EAAEW,qBAAA,CAAUE,MAFJ;EAGfZ,WAAW,EAAEU,qBAAA,CAAUC,MAHR;EAIflB,QAAQ,EAAEiB,qBAAA,CAAUG,IAJL;EAKfZ,UAAU,EAAES,qBAAA,CAAUI,GALP;EAMfZ,IAAI,EAAEa,WAAA,CAAMC,SANG;EAOfb,EAAE,EAAEY,WAAA,CAAMC;AAPK,CAAjB;AAUA,IAAMC,UAAU,GAAG,IAAAC,kBAAA,EAAW7B,UAAX,EAAuBO,IAAvB,CAAnB;AACA,IAAMuB,OAAO,GAAG,IAAAC,cAAA,EAASH,UAAT,CAAhB;AACA,IAAMI,SAAS,GAAG,IAAAC,uBAAA,EAAkBH,OAAlB,CAAlB;eAEeE,S"}
1
+ {"version":3,"file":"component.js","names":["lineStyles","theme","line","styles","disabled","correct","incorrect","Line","props","className","classes","correctness","graphProps","from","to","rest","scale","x","y","classNames","propTypes","PropTypes","string","object","bool","any","types","PointType","StyledLine","withStyles","Segment","lineBase","Component","lineToolComponent"],"sources":["../../../src/tools/segment/component.jsx"],"sourcesContent":["import { lineToolComponent, lineBase, styles } from '../shared/line';\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { types } from '@pie-lib/plot';\nimport { withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\n\nconst lineStyles = theme => ({\n line: styles.line(theme),\n disabled: styles.disabled(theme),\n correct: styles.correct(theme, 'stroke'),\n incorrect: styles.incorrect(theme, 'stroke')\n});\nexport const Line = props => {\n const { className, classes, correctness, disabled, graphProps, from, to, ...rest } = props;\n const { scale } = graphProps;\n\n return (\n <line\n stroke=\"green\"\n strokeWidth=\"6\"\n x1={scale.x(from.x)}\n y1={scale.y(from.y)}\n x2={scale.x(to.x)}\n y2={scale.y(to.y)}\n className={classNames(\n classes.line,\n disabled && classes.disabled,\n classes[correctness],\n className\n )}\n {...rest}\n />\n );\n};\n\nLine.propTypes = {\n className: PropTypes.string,\n classes: PropTypes.object,\n correctness: PropTypes.string,\n disabled: PropTypes.bool,\n graphProps: PropTypes.any,\n from: types.PointType,\n to: types.PointType\n};\n\nconst StyledLine = withStyles(lineStyles)(Line);\nconst Segment = lineBase(StyledLine);\nconst Component = lineToolComponent(Segment);\n\nexport default Component;\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;;;AAEA,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAAAC,KAAK;EAAA,OAAK;IAC3BC,IAAI,EAAEC,YAAA,CAAOD,IAAP,CAAYD,KAAZ,CADqB;IAE3BG,QAAQ,EAAED,YAAA,CAAOC,QAAP,CAAgBH,KAAhB,CAFiB;IAG3BI,OAAO,EAAEF,YAAA,CAAOE,OAAP,CAAeJ,KAAf,EAAsB,QAAtB,CAHkB;IAI3BK,SAAS,EAAEH,YAAA,CAAOG,SAAP,CAAiBL,KAAjB,EAAwB,QAAxB;EAJgB,CAAL;AAAA,CAAxB;;AAMO,IAAMM,IAAI,GAAG,SAAPA,IAAO,CAAAC,KAAK,EAAI;EAC3B,IAAQC,SAAR,GAAqFD,KAArF,CAAQC,SAAR;EAAA,IAAmBC,OAAnB,GAAqFF,KAArF,CAAmBE,OAAnB;EAAA,IAA4BC,WAA5B,GAAqFH,KAArF,CAA4BG,WAA5B;EAAA,IAAyCP,QAAzC,GAAqFI,KAArF,CAAyCJ,QAAzC;EAAA,IAAmDQ,UAAnD,GAAqFJ,KAArF,CAAmDI,UAAnD;EAAA,IAA+DC,IAA/D,GAAqFL,KAArF,CAA+DK,IAA/D;EAAA,IAAqEC,EAArE,GAAqFN,KAArF,CAAqEM,EAArE;EAAA,IAA4EC,IAA5E,6CAAqFP,KAArF;EACA,IAAQQ,KAAR,GAAkBJ,UAAlB,CAAQI,KAAR;EAEA,oBACE;IACE,MAAM,EAAC,OADT;IAEE,WAAW,EAAC,GAFd;IAGE,EAAE,EAAEA,KAAK,CAACC,CAAN,CAAQJ,IAAI,CAACI,CAAb,CAHN;IAIE,EAAE,EAAED,KAAK,CAACE,CAAN,CAAQL,IAAI,CAACK,CAAb,CAJN;IAKE,EAAE,EAAEF,KAAK,CAACC,CAAN,CAAQH,EAAE,CAACG,CAAX,CALN;IAME,EAAE,EAAED,KAAK,CAACE,CAAN,CAAQJ,EAAE,CAACI,CAAX,CANN;IAOE,SAAS,EAAE,IAAAC,sBAAA,EACTT,OAAO,CAACR,IADC,EAETE,QAAQ,IAAIM,OAAO,CAACN,QAFX,EAGTM,OAAO,CAACC,WAAD,CAHE,EAITF,SAJS;EAPb,GAaMM,IAbN,EADF;AAiBD,CArBM;;;AAuBPR,IAAI,CAACa,SAAL,GAAiB;EACfX,SAAS,EAAEY,qBAAA,CAAUC,MADN;EAEfZ,OAAO,EAAEW,qBAAA,CAAUE,MAFJ;EAGfZ,WAAW,EAAEU,qBAAA,CAAUC,MAHR;EAIflB,QAAQ,EAAEiB,qBAAA,CAAUG,IAJL;EAKfZ,UAAU,EAAES,qBAAA,CAAUI,GALP;EAMfZ,IAAI,EAAEa,WAAA,CAAMC,SANG;EAOfb,EAAE,EAAEY,WAAA,CAAMC;AAPK,CAAjB;AAUA,IAAMC,UAAU,GAAG,IAAAC,kBAAA,EAAW7B,UAAX,EAAuBO,IAAvB,CAAnB;AACA,IAAMuB,OAAO,GAAG,IAAAC,cAAA,EAASH,UAAT,CAAhB;AACA,IAAMI,SAAS,GAAG,IAAAC,uBAAA,EAAkBH,OAAlB,CAAlB;eAEeE,S"}
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -9,8 +11,6 @@ var _component = _interopRequireDefault(require("./component"));
9
11
 
10
12
  var _line = require("../shared/line");
11
13
 
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
-
14
14
  var tool = (0, _line.lineTool)('segment', _component["default"]);
15
15
  exports.tool = tool;
16
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["tool","lineTool","Segment"],"sources":["../../../src/tools/segment/index.js"],"sourcesContent":["import Segment from './component';\nimport { lineTool } from '../shared/line';\n\nexport const tool = lineTool('segment', Segment);\n"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEO,IAAMA,IAAI,GAAG,IAAAC,cAAA,EAAS,SAAT,EAAoBC,qBAApB,CAAb"}
1
+ {"version":3,"file":"index.js","names":["tool","lineTool","Segment"],"sources":["../../../src/tools/segment/index.js"],"sourcesContent":["import Segment from './component';\nimport { lineTool } from '../shared/line';\n\nexport const tool = lineTool('segment', Segment);\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEO,IAAMA,IAAI,GAAG,IAAAC,cAAA,EAAS,SAAT,EAAoBC,qBAApB,CAAb"}
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -9,8 +11,6 @@ var _react = _interopRequireDefault(require("react"));
9
11
 
10
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
13
 
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
-
14
14
  var ArrowHead = function ArrowHead(_ref) {
15
15
  var size = _ref.size,
16
16
  transform = _ref.transform,
@@ -1 +1 @@
1
- {"version":3,"file":"arrow-head.js","names":["ArrowHead","size","transform","points","propTypes","PropTypes","string","number","defaultProps","genUid","v","Math","random","toFixed","ArrowMarker","id","className"],"sources":["../../../src/tools/shared/arrow-head.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nexport const ArrowHead = ({ size, transform, points }) => (\n <polygon points={points || `0,0 ${size},${size / 2} 0,${size}`} transform={transform} />\n);\nArrowHead.propTypes = {\n points: PropTypes.string,\n size: PropTypes.number,\n transform: PropTypes.string\n};\nArrowHead.defaultProps = {\n points: '',\n size: 10,\n transform: ''\n};\nexport const genUid = () => {\n const v = (Math.random() * 1000).toFixed(0);\n return `arrow-${v}`;\n};\nexport const ArrowMarker = ({ id, size, className }) => {\n return (\n <marker\n id={id}\n viewBox={`0 0 ${size} ${size}`}\n refX={size / 2}\n refY={size / 2}\n markerWidth={size}\n markerHeight={size}\n orient=\"auto-start-reverse\"\n className={className}\n >\n <ArrowHead size={size} />\n </marker>\n );\n};\nArrowMarker.propTypes = {\n id: PropTypes.string,\n size: PropTypes.number,\n className: PropTypes.string\n};\nArrowMarker.defaultProps = {\n size: 5\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEO,IAAMA,SAAS,GAAG,SAAZA,SAAY;EAAA,IAAGC,IAAH,QAAGA,IAAH;EAAA,IAASC,SAAT,QAASA,SAAT;EAAA,IAAoBC,MAApB,QAAoBA,MAApB;EAAA,oBACvB;IAAS,MAAM,EAAEA,MAAM,kBAAWF,IAAX,cAAmBA,IAAI,GAAG,CAA1B,gBAAiCA,IAAjC,CAAvB;IAAgE,SAAS,EAAEC;EAA3E,EADuB;AAAA,CAAlB;;;AAGPF,SAAS,CAACI,SAAV,GAAsB;EACpBD,MAAM,EAAEE,qBAAA,CAAUC,MADE;EAEpBL,IAAI,EAAEI,qBAAA,CAAUE,MAFI;EAGpBL,SAAS,EAAEG,qBAAA,CAAUC;AAHD,CAAtB;AAKAN,SAAS,CAACQ,YAAV,GAAyB;EACvBL,MAAM,EAAE,EADe;EAEvBF,IAAI,EAAE,EAFiB;EAGvBC,SAAS,EAAE;AAHY,CAAzB;;AAKO,IAAMO,MAAM,GAAG,SAATA,MAAS,GAAM;EAC1B,IAAMC,CAAC,GAAG,CAACC,IAAI,CAACC,MAAL,KAAgB,IAAjB,EAAuBC,OAAvB,CAA+B,CAA/B,CAAV;EACA,uBAAgBH,CAAhB;AACD,CAHM;;;;AAIA,IAAMI,WAAW,GAAG,SAAdA,WAAc,QAA6B;EAAA,IAA1BC,EAA0B,SAA1BA,EAA0B;EAAA,IAAtBd,IAAsB,SAAtBA,IAAsB;EAAA,IAAhBe,SAAgB,SAAhBA,SAAgB;EACtD,oBACE;IACE,EAAE,EAAED,EADN;IAEE,OAAO,gBAASd,IAAT,cAAiBA,IAAjB,CAFT;IAGE,IAAI,EAAEA,IAAI,GAAG,CAHf;IAIE,IAAI,EAAEA,IAAI,GAAG,CAJf;IAKE,WAAW,EAAEA,IALf;IAME,YAAY,EAAEA,IANhB;IAOE,MAAM,EAAC,oBAPT;IAQE,SAAS,EAAEe;EARb,gBAUE,gCAAC,SAAD;IAAW,IAAI,EAAEf;EAAjB,EAVF,CADF;AAcD,CAfM;;;AAgBPa,WAAW,CAACV,SAAZ,GAAwB;EACtBW,EAAE,EAAEV,qBAAA,CAAUC,MADQ;EAEtBL,IAAI,EAAEI,qBAAA,CAAUE,MAFM;EAGtBS,SAAS,EAAEX,qBAAA,CAAUC;AAHC,CAAxB;AAKAQ,WAAW,CAACN,YAAZ,GAA2B;EACzBP,IAAI,EAAE;AADmB,CAA3B"}
1
+ {"version":3,"file":"arrow-head.js","names":["ArrowHead","size","transform","points","propTypes","PropTypes","string","number","defaultProps","genUid","v","Math","random","toFixed","ArrowMarker","id","className"],"sources":["../../../src/tools/shared/arrow-head.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nexport const ArrowHead = ({ size, transform, points }) => (\n <polygon points={points || `0,0 ${size},${size / 2} 0,${size}`} transform={transform} />\n);\nArrowHead.propTypes = {\n points: PropTypes.string,\n size: PropTypes.number,\n transform: PropTypes.string\n};\nArrowHead.defaultProps = {\n points: '',\n size: 10,\n transform: ''\n};\nexport const genUid = () => {\n const v = (Math.random() * 1000).toFixed(0);\n return `arrow-${v}`;\n};\nexport const ArrowMarker = ({ id, size, className }) => {\n return (\n <marker\n id={id}\n viewBox={`0 0 ${size} ${size}`}\n refX={size / 2}\n refY={size / 2}\n markerWidth={size}\n markerHeight={size}\n orient=\"auto-start-reverse\"\n className={className}\n >\n <ArrowHead size={size} />\n </marker>\n );\n};\nArrowMarker.propTypes = {\n id: PropTypes.string,\n size: PropTypes.number,\n className: PropTypes.string\n};\nArrowMarker.defaultProps = {\n size: 5\n};\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEO,IAAMA,SAAS,GAAG,SAAZA,SAAY;EAAA,IAAGC,IAAH,QAAGA,IAAH;EAAA,IAASC,SAAT,QAASA,SAAT;EAAA,IAAoBC,MAApB,QAAoBA,MAApB;EAAA,oBACvB;IAAS,MAAM,EAAEA,MAAM,kBAAWF,IAAX,cAAmBA,IAAI,GAAG,CAA1B,gBAAiCA,IAAjC,CAAvB;IAAgE,SAAS,EAAEC;EAA3E,EADuB;AAAA,CAAlB;;;AAGPF,SAAS,CAACI,SAAV,GAAsB;EACpBD,MAAM,EAAEE,qBAAA,CAAUC,MADE;EAEpBL,IAAI,EAAEI,qBAAA,CAAUE,MAFI;EAGpBL,SAAS,EAAEG,qBAAA,CAAUC;AAHD,CAAtB;AAKAN,SAAS,CAACQ,YAAV,GAAyB;EACvBL,MAAM,EAAE,EADe;EAEvBF,IAAI,EAAE,EAFiB;EAGvBC,SAAS,EAAE;AAHY,CAAzB;;AAKO,IAAMO,MAAM,GAAG,SAATA,MAAS,GAAM;EAC1B,IAAMC,CAAC,GAAG,CAACC,IAAI,CAACC,MAAL,KAAgB,IAAjB,EAAuBC,OAAvB,CAA+B,CAA/B,CAAV;EACA,uBAAgBH,CAAhB;AACD,CAHM;;;;AAIA,IAAMI,WAAW,GAAG,SAAdA,WAAc,QAA6B;EAAA,IAA1BC,EAA0B,SAA1BA,EAA0B;EAAA,IAAtBd,IAAsB,SAAtBA,IAAsB;EAAA,IAAhBe,SAAgB,SAAhBA,SAAgB;EACtD,oBACE;IACE,EAAE,EAAED,EADN;IAEE,OAAO,gBAASd,IAAT,cAAiBA,IAAjB,CAFT;IAGE,IAAI,EAAEA,IAAI,GAAG,CAHf;IAIE,IAAI,EAAEA,IAAI,GAAG,CAJf;IAKE,WAAW,EAAEA,IALf;IAME,YAAY,EAAEA,IANhB;IAOE,MAAM,EAAC,oBAPT;IAQE,SAAS,EAAEe;EARb,gBAUE,gCAAC,SAAD;IAAW,IAAI,EAAEf;EAAjB,EAVF,CADF;AAcD,CAfM;;;AAgBPa,WAAW,CAACV,SAAZ,GAAwB;EACtBW,EAAE,EAAEV,qBAAA,CAAUC,MADQ;EAEtBL,IAAI,EAAEI,qBAAA,CAAUE,MAFM;EAGtBS,SAAS,EAAEX,qBAAA,CAAUC;AAHC,CAAxB;AAKAQ,WAAW,CAACN,YAAZ,GAA2B;EACzBP,IAAI,EAAE;AADmB,CAA3B"}
@@ -1,12 +1,28 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.styles = exports.lineToolComponent = exports.lineTool = exports.lineBase = void 0;
9
9
 
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
13
+
14
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
15
+
16
+ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
17
+
18
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
19
+
20
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
21
+
22
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
23
+
24
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
25
+
10
26
  var _react = _interopRequireDefault(require("react"));
11
27
 
12
28
  var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
@@ -31,35 +47,13 @@ var _renderUi = require("@pie-lib/render-ui");
31
47
 
32
48
  var _utils = require("../../../utils");
33
49
 
34
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
35
-
36
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
37
-
38
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
39
-
40
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
41
-
42
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
43
-
44
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
45
-
46
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
47
-
48
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
49
-
50
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
51
-
52
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
50
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
53
51
 
54
52
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
55
53
 
56
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
57
-
58
54
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
59
55
 
60
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
61
-
62
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
56
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
63
57
 
64
58
  var lineTool = function lineTool(type, Component) {
65
59
  return function () {
@@ -98,24 +92,21 @@ var lineToolComponent = function lineToolComponent(Component) {
98
92
  var _class;
99
93
 
100
94
  return _class = /*#__PURE__*/function (_React$Component) {
101
- _inherits(LineToolComponent, _React$Component);
95
+ (0, _inherits2["default"])(LineToolComponent, _React$Component);
102
96
 
103
97
  var _super = _createSuper(LineToolComponent);
104
98
 
105
99
  function LineToolComponent(props) {
106
100
  var _this;
107
101
 
108
- _classCallCheck(this, LineToolComponent);
109
-
102
+ (0, _classCallCheck2["default"])(this, LineToolComponent);
110
103
  _this = _super.call(this, props);
111
-
112
- _defineProperty(_assertThisInitialized(_this), "startDrag", function () {
104
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "startDrag", function () {
113
105
  return _this.setState({
114
106
  mark: _objectSpread({}, _this.props.mark)
115
107
  });
116
108
  });
117
-
118
- _defineProperty(_assertThisInitialized(_this), "stopDrag", function () {
109
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "stopDrag", function () {
119
110
  var _this$props = _this.props,
120
111
  onChange = _this$props.onChange,
121
112
  mark = _this$props.mark;
@@ -133,8 +124,7 @@ var lineToolComponent = function lineToolComponent(Component) {
133
124
  }
134
125
  });
135
126
  });
136
-
137
- _defineProperty(_assertThisInitialized(_this), "changeMark", function (_ref) {
127
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "changeMark", function (_ref) {
138
128
  var from = _ref.from,
139
129
  to = _ref.to,
140
130
  middle = _ref.middle;
@@ -154,8 +144,7 @@ var lineToolComponent = function lineToolComponent(Component) {
154
144
  mark: mark
155
145
  });
156
146
  });
157
-
158
- _defineProperty(_assertThisInitialized(_this), "changeMarkProps", function (_ref2) {
147
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "changeMarkProps", function (_ref2) {
159
148
  var from = _ref2.from,
160
149
  to = _ref2.to,
161
150
  middle = _ref2.middle;
@@ -187,12 +176,11 @@ var lineToolComponent = function lineToolComponent(Component) {
187
176
  onChange(mark, update);
188
177
  }
189
178
  });
190
-
191
179
  _this.state = {};
192
180
  return _this;
193
181
  }
194
182
 
195
- _createClass(LineToolComponent, [{
183
+ (0, _createClass2["default"])(LineToolComponent, [{
196
184
  key: "render",
197
185
  value: function render() {
198
186
  var _this$props3 = this.props,
@@ -237,9 +225,8 @@ var lineToolComponent = function lineToolComponent(Component) {
237
225
  });
238
226
  }
239
227
  }]);
240
-
241
228
  return LineToolComponent;
242
- }(_react["default"].Component), _defineProperty(_class, "propTypes", _objectSpread(_objectSpread({}, _plot.types.ToolPropTypeFields), {}, {
229
+ }(_react["default"].Component), (0, _defineProperty2["default"])(_class, "propTypes", _objectSpread(_objectSpread({}, _plot.types.ToolPropTypeFields), {}, {
243
230
  graphProps: _plot.types.GraphPropsType.isRequired
244
231
  })), _class;
245
232
  };
@@ -277,22 +264,21 @@ var lineBase = function lineBase(Comp, opts) {
277
264
  var ToPoint = opts && opts.to ? opts.to : _point.BasePoint;
278
265
 
279
266
  var LineBase = /*#__PURE__*/function (_React$Component2) {
280
- _inherits(LineBase, _React$Component2);
267
+ (0, _inherits2["default"])(LineBase, _React$Component2);
281
268
 
282
269
  var _super2 = _createSuper(LineBase);
283
270
 
284
271
  function LineBase() {
285
272
  var _this2;
286
273
 
287
- _classCallCheck(this, LineBase);
274
+ (0, _classCallCheck2["default"])(this, LineBase);
288
275
 
289
276
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
290
277
  args[_key] = arguments[_key];
291
278
  }
292
279
 
293
280
  _this2 = _super2.call.apply(_super2, [this].concat(args));
294
-
295
- _defineProperty(_assertThisInitialized(_this2), "onChangePoint", function (point) {
281
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "onChangePoint", function (point) {
296
282
  var _this2$props = _this2.props,
297
283
  middle = _this2$props.middle,
298
284
  onChange = _this2$props.onChange;
@@ -307,8 +293,7 @@ var lineBase = function lineBase(Comp, opts) {
307
293
  onChange(point);
308
294
  }
309
295
  });
310
-
311
- _defineProperty(_assertThisInitialized(_this2), "dragComp", function (_ref4) {
296
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "dragComp", function (_ref4) {
312
297
  var draggedFrom = _ref4.from,
313
298
  draggedTo = _ref4.to;
314
299
  var _this2$props2 = _this2.props,
@@ -336,8 +321,7 @@ var lineBase = function lineBase(Comp, opts) {
336
321
 
337
322
  onChange(updated);
338
323
  });
339
-
340
- _defineProperty(_assertThisInitialized(_this2), "dragFrom", function (draggedFrom) {
324
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "dragFrom", function (draggedFrom) {
341
325
  var _this2$props3 = _this2.props,
342
326
  from = _this2$props3.from,
343
327
  to = _this2$props3.to;
@@ -353,8 +337,7 @@ var lineBase = function lineBase(Comp, opts) {
353
337
  });
354
338
  }
355
339
  });
356
-
357
- _defineProperty(_assertThisInitialized(_this2), "dragTo", function (draggedTo) {
340
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "dragTo", function (draggedTo) {
358
341
  var _this2$props4 = _this2.props,
359
342
  from = _this2$props4.from,
360
343
  to = _this2$props4.to;
@@ -370,8 +353,7 @@ var lineBase = function lineBase(Comp, opts) {
370
353
  });
371
354
  }
372
355
  });
373
-
374
- _defineProperty(_assertThisInitialized(_this2), "labelChange", function (point, type) {
356
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "labelChange", function (point, type) {
375
357
  var changeMarkProps = _this2.props.changeMarkProps;
376
358
 
377
359
  var update = _objectSpread({}, point);
@@ -380,10 +362,9 @@ var lineBase = function lineBase(Comp, opts) {
380
362
  delete update.label;
381
363
  }
382
364
 
383
- changeMarkProps(_defineProperty({}, type, update));
365
+ changeMarkProps((0, _defineProperty2["default"])({}, type, update));
384
366
  });
385
-
386
- _defineProperty(_assertThisInitialized(_this2), "clickPoint", function (point, type) {
367
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "clickPoint", function (point, type) {
387
368
  var _this2$props5 = _this2.props,
388
369
  changeMarkProps = _this2$props5.changeMarkProps,
389
370
  from = _this2$props5.from,
@@ -393,7 +374,7 @@ var lineBase = function lineBase(Comp, opts) {
393
374
  point = _objectSpread(_objectSpread({}, point), (0, _utils.getMiddleOfTwoPoints)(from, to));
394
375
  }
395
376
 
396
- changeMarkProps(_defineProperty({
377
+ changeMarkProps((0, _defineProperty2["default"])({
397
378
  from: from,
398
379
  to: to
399
380
  }, type, _objectSpread({
@@ -404,13 +385,11 @@ var lineBase = function lineBase(Comp, opts) {
404
385
  _this2.input[type].focus();
405
386
  }
406
387
  });
407
-
408
- _defineProperty(_assertThisInitialized(_this2), "input", {});
409
-
388
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "input", {});
410
389
  return _this2;
411
390
  }
412
391
 
413
- _createClass(LineBase, [{
392
+ (0, _createClass2["default"])(LineBase, [{
414
393
  key: "render",
415
394
  value: function render() {
416
395
  var _this3 = this;
@@ -491,7 +470,7 @@ var lineBase = function lineBase(Comp, opts) {
491
470
  }
492
471
  }
493
472
 
494
- return /*#__PURE__*/_react["default"].createElement("g", null, to && /*#__PURE__*/_react["default"].createElement(DraggableComp, _extends({
473
+ return /*#__PURE__*/_react["default"].createElement("g", null, to && /*#__PURE__*/_react["default"].createElement(DraggableComp, (0, _extends2["default"])({
495
474
  from: from,
496
475
  to: to,
497
476
  middle: middle,
@@ -500,7 +479,7 @@ var lineBase = function lineBase(Comp, opts) {
500
479
  onClick: labelModeEnabled ? function () {
501
480
  return _this3.clickPoint(middle, 'middle');
502
481
  } : common.onClick
503
- })), lineLabelNode, /*#__PURE__*/_react["default"].createElement(FromPoint, _extends({
482
+ })), lineLabelNode, /*#__PURE__*/_react["default"].createElement(FromPoint, (0, _extends2["default"])({
504
483
  x: from.x,
505
484
  y: from.y,
506
485
  labelNode: labelNode,
@@ -510,7 +489,7 @@ var lineBase = function lineBase(Comp, opts) {
510
489
  onClick: labelModeEnabled ? function () {
511
490
  return _this3.clickPoint(from, 'from');
512
491
  } : common.onClick
513
- })), fromLabelNode, to && /*#__PURE__*/_react["default"].createElement(ToPoint, _extends({
492
+ })), fromLabelNode, to && /*#__PURE__*/_react["default"].createElement(ToPoint, (0, _extends2["default"])({
514
493
  x: to.x,
515
494
  y: to.y,
516
495
  angle: angle //angle + 45}
@@ -525,11 +504,10 @@ var lineBase = function lineBase(Comp, opts) {
525
504
  })), toLabelNode);
526
505
  }
527
506
  }]);
528
-
529
507
  return LineBase;
530
508
  }(_react["default"].Component);
531
509
 
532
- _defineProperty(LineBase, "propTypes", {
510
+ (0, _defineProperty2["default"])(LineBase, "propTypes", {
533
511
  coordinatesOnHover: _propTypes["default"].bool,
534
512
  graphProps: _plot.types.GraphPropsType,
535
513
  from: _plot.types.PointType,
@@ -545,7 +523,6 @@ var lineBase = function lineBase(Comp, opts) {
545
523
  labelModeEnabled: _propTypes["default"].bool,
546
524
  changeMarkProps: _propTypes["default"].func
547
525
  });
548
-
549
526
  return LineBase;
550
527
  };
551
528