@pie-lib/graphing-module 1.11.19 → 1.11.21
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/module/index.js +27 -36
- package/module/manifest.json +7 -7
- package/package.json +1 -1
package/module/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {_dll_prop_types, _dll_pie_lib__render_ui, _dll_material_ui__core_styles, _dll_react, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_material_ui__core, _dll_material_ui__core_styles_color_manipulator, _dll_material_ui__icons} from "../../shared-module@^1.6.
|
|
2
|
-
import {_dll_pie_lib__editable_html} from "../../editable-html-module@^3.6.
|
|
3
|
-
import {_dll_pie_lib__drag} from "../../drag-module@^2.1.
|
|
4
|
-
import {_dll_pie_lib__config_ui} from "../../config-module@^2.8.
|
|
1
|
+
import {_dll_prop_types, _dll_pie_lib__render_ui, _dll_material_ui__core_styles, _dll_react, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_material_ui__core, _dll_material_ui__core_styles_color_manipulator, _dll_material_ui__icons} from "../../shared-module@^1.6.19/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__editable_html} from "../../editable-html-module@^3.6.22/module/index.js";
|
|
3
|
+
import {_dll_pie_lib__drag} from "../../drag-module@^2.1.22/module/index.js";
|
|
4
|
+
import {_dll_pie_lib__config_ui} from "../../config-module@^2.8.6/module/index.js";
|
|
5
5
|
const PropTypes$E = _dll_prop_types;
|
|
6
6
|
const BaseDomainRangeType = {
|
|
7
7
|
min: PropTypes$E.number.isRequired,
|
|
@@ -2858,7 +2858,7 @@ Point$2.convert = function (a) {
|
|
|
2858
2858
|
const {range: range$2} = _dll_lodash;
|
|
2859
2859
|
const {head: head$1} = _dll_lodash;
|
|
2860
2860
|
const {tail: tail$1} = _dll_lodash;
|
|
2861
|
-
const {isEqual: isEqual$
|
|
2861
|
+
const {isEqual: isEqual$6} = _dll_lodash;
|
|
2862
2862
|
const xy$1 = (x, y) => ({
|
|
2863
2863
|
x,
|
|
2864
2864
|
y
|
|
@@ -2968,7 +2968,7 @@ const getDelta$1 = (from, to) => {
|
|
|
2968
2968
|
};
|
|
2969
2969
|
const bandKey$1 = (d, index) => `${index}-${d.label || '-'}`;
|
|
2970
2970
|
const isDomainRangeEqual$1 = (graphProps, nextGraphProps) => {
|
|
2971
|
-
return isEqual$
|
|
2971
|
+
return isEqual$6(graphProps.domain, nextGraphProps.domain) && isEqual$6(graphProps.range, nextGraphProps.range);
|
|
2972
2972
|
};
|
|
2973
2973
|
const findLongestWord$2 = label => {
|
|
2974
2974
|
let longestWord = (label || '').replace(/<[^>]+>/g, '').split(' ').sort((a, b) => b.length - a.length);
|
|
@@ -8602,7 +8602,7 @@ Arrow$2.defaultProps = {
|
|
|
8602
8602
|
var Arrow$3 = withStyles$k(style)(Arrow$2);
|
|
8603
8603
|
const {head: head} = _dll_lodash;
|
|
8604
8604
|
const {tail: tail} = _dll_lodash;
|
|
8605
|
-
const {isEqual: isEqual$
|
|
8605
|
+
const {isEqual: isEqual$5} = _dll_lodash;
|
|
8606
8606
|
const {isEmpty: isEmpty$4} = _dll_lodash;
|
|
8607
8607
|
const {cloneDeep: cloneDeep$2} = _dll_lodash;
|
|
8608
8608
|
const bounds = bounds$2;
|
|
@@ -8687,7 +8687,7 @@ const getMiddleOfTwoPoints = (a, b) => ({
|
|
|
8687
8687
|
});
|
|
8688
8688
|
const roundNumber = number => parseFloat(number.toFixed(4));
|
|
8689
8689
|
const sameAxes = (p1, p2) => p1 && p2 && (roundNumber(p1.x) === roundNumber(p2.x) || roundNumber(p1.y) === roundNumber(p2.y));
|
|
8690
|
-
const equalPoints = (p1, p2) => p1 && p2 && isEqual$
|
|
8690
|
+
const equalPoints = (p1, p2) => p1 && p2 && isEqual$5({
|
|
8691
8691
|
x: roundNumber(p1.x),
|
|
8692
8692
|
y: roundNumber(p1.y)
|
|
8693
8693
|
}, {
|
|
@@ -8731,7 +8731,7 @@ const isDuplicatedMark = (mark, marks, oldMark) => {
|
|
|
8731
8731
|
return false;
|
|
8732
8732
|
}
|
|
8733
8733
|
const filteredMarks = (marks || []).filter(m => m.type === type && !m.building);
|
|
8734
|
-
const index = filteredMarks.findIndex(m => isEqual$
|
|
8734
|
+
const index = filteredMarks.findIndex(m => isEqual$5(m, oldMark));
|
|
8735
8735
|
if (index !== -1) {
|
|
8736
8736
|
filteredMarks.splice(index, 1);
|
|
8737
8737
|
}
|
|
@@ -8743,7 +8743,7 @@ const isDuplicatedMark = (mark, marks, oldMark) => {
|
|
|
8743
8743
|
const {from, to} = mark;
|
|
8744
8744
|
return equalPoints(from, m.from) && equalPoints(to, m.to) || equalPoints(from, m.to) && equalPoints(to, m.from) || type === 'line' && isSameLine(m, mark);
|
|
8745
8745
|
} else if (type === 'polygon') {
|
|
8746
|
-
return isEqual$
|
|
8746
|
+
return isEqual$5(sortPoints(cloneDeep$2(mark.points)), sortPoints(cloneDeep$2(m.points)));
|
|
8747
8747
|
} else if (type === 'point') {
|
|
8748
8748
|
return equalPoints(m, mark);
|
|
8749
8749
|
}
|
|
@@ -9691,7 +9691,7 @@ Bg.__initStatic();
|
|
|
9691
9691
|
Bg.__initStatic2();
|
|
9692
9692
|
const React$s = _dll_react;
|
|
9693
9693
|
const PropTypes$q = _dll_prop_types;
|
|
9694
|
-
const {isEqual: isEqual$
|
|
9694
|
+
const {isEqual: isEqual$4} = _dll_lodash;
|
|
9695
9695
|
const {cloneDeep: cloneDeep$1} = _dll_lodash;
|
|
9696
9696
|
const debug$7 = _dll_debug;
|
|
9697
9697
|
const _jsxFileName$p = "/home/circleci/repo/packages/graphing/src/graph.jsx";
|
|
@@ -9733,7 +9733,7 @@ const removeBuildingToolIfCurrentToolDiffers = ({marks, currentTool}) => {
|
|
|
9733
9733
|
const buildingMark = marks.filter(m => m.building)[0];
|
|
9734
9734
|
let newMarks = cloneDeep$1(marks);
|
|
9735
9735
|
if (buildingMark && currentTool && buildingMark.type !== currentTool.type) {
|
|
9736
|
-
const index = newMarks.findIndex(m => isEqual$
|
|
9736
|
+
const index = newMarks.findIndex(m => isEqual$4(m, buildingMark));
|
|
9737
9737
|
if (index >= 0) {
|
|
9738
9738
|
newMarks.splice(index, 1);
|
|
9739
9739
|
}
|
|
@@ -9780,7 +9780,7 @@ class Graph extends React$s.Component {
|
|
|
9780
9780
|
this.changeMark = (oldMark, newMark) => {
|
|
9781
9781
|
const {onChangeMarks, marks} = this.props;
|
|
9782
9782
|
let newMarks = cloneDeep$1(marks);
|
|
9783
|
-
const index = newMarks.findIndex(m => isEqual$
|
|
9783
|
+
const index = newMarks.findIndex(m => isEqual$4(m, oldMark));
|
|
9784
9784
|
if (index >= 0 && !isDuplicatedMark(newMark, marks, oldMark)) {
|
|
9785
9785
|
newMarks.splice(index, 1, newMark);
|
|
9786
9786
|
onChangeMarks(newMarks);
|
|
@@ -9803,7 +9803,7 @@ class Graph extends React$s.Component {
|
|
|
9803
9803
|
if (!update.building && isDuplicatedMark(update, marks)) {
|
|
9804
9804
|
return;
|
|
9805
9805
|
}
|
|
9806
|
-
const index = newMarks.findIndex(m => isEqual$
|
|
9806
|
+
const index = newMarks.findIndex(m => isEqual$4(m, existing));
|
|
9807
9807
|
if (index >= 0) {
|
|
9808
9808
|
newMarks.splice(index, 1, update);
|
|
9809
9809
|
onChangeMarks(newMarks);
|
|
@@ -11674,7 +11674,7 @@ class RawBp extends React$n.Component {
|
|
|
11674
11674
|
};
|
|
11675
11675
|
}
|
|
11676
11676
|
render() {
|
|
11677
|
-
const {classes, className, coordinatesOnHover, x, y, disabled, correctness, graphProps, labelNode, ...rest} = this.props;
|
|
11677
|
+
const {classes, className, coordinatesOnHover, x, y, disabled, correctness, graphProps, labelNode, style, ...rest} = this.props;
|
|
11678
11678
|
const {showCoordinates} = this.state;
|
|
11679
11679
|
const {scale} = graphProps;
|
|
11680
11680
|
const r = thinnerShapesNeeded(graphProps) ? 5 : 7;
|
|
@@ -11697,7 +11697,7 @@ class RawBp extends React$n.Component {
|
|
|
11697
11697
|
__self: this,
|
|
11698
11698
|
__source: {
|
|
11699
11699
|
fileName: _jsxFileName$n,
|
|
11700
|
-
lineNumber:
|
|
11700
|
+
lineNumber: 49
|
|
11701
11701
|
}
|
|
11702
11702
|
}), React$n.createElement('g', {
|
|
11703
11703
|
className: classNames$e(classes.point, disabled && classes.disabled, classes[correctness], className),
|
|
@@ -11711,7 +11711,7 @@ class RawBp extends React$n.Component {
|
|
|
11711
11711
|
__self: this,
|
|
11712
11712
|
__source: {
|
|
11713
11713
|
fileName: _jsxFileName$n,
|
|
11714
|
-
lineNumber:
|
|
11714
|
+
lineNumber: 58
|
|
11715
11715
|
}
|
|
11716
11716
|
}, React$n.createElement('circle', {
|
|
11717
11717
|
...rest,
|
|
@@ -11721,7 +11721,7 @@ class RawBp extends React$n.Component {
|
|
|
11721
11721
|
__self: this,
|
|
11722
11722
|
__source: {
|
|
11723
11723
|
fileName: _jsxFileName$n,
|
|
11724
|
-
lineNumber:
|
|
11724
|
+
lineNumber: 64
|
|
11725
11725
|
}
|
|
11726
11726
|
}), labelNode && coordinatesOnHover && showCoordinates && ReactDOM$4.createPortal(React$n.createElement(CoordinatesLabel$1, {
|
|
11727
11727
|
graphProps: graphProps,
|
|
@@ -11730,7 +11730,7 @@ class RawBp extends React$n.Component {
|
|
|
11730
11730
|
__self: this,
|
|
11731
11731
|
__source: {
|
|
11732
11732
|
fileName: _jsxFileName$n,
|
|
11733
|
-
lineNumber:
|
|
11733
|
+
lineNumber: 68
|
|
11734
11734
|
}
|
|
11735
11735
|
}), labelNode)));
|
|
11736
11736
|
}
|
|
@@ -11739,7 +11739,7 @@ RawBp.__initStatic();
|
|
|
11739
11739
|
const React$m = _dll_react;
|
|
11740
11740
|
const PropTypes$m = _dll_prop_types;
|
|
11741
11741
|
const classNames$d = _dll_classnames;
|
|
11742
|
-
const {isEqual: isEqual$
|
|
11742
|
+
const {isEqual: isEqual$3} = _dll_lodash;
|
|
11743
11743
|
const _jsxFileName$m = "/home/circleci/repo/packages/graphing/src/tools/shared/point/arrow-point.jsx";
|
|
11744
11744
|
class RawArrow extends React$m.Component {
|
|
11745
11745
|
static __initStatic() {
|
|
@@ -11772,7 +11772,7 @@ class RawArrow extends React$m.Component {
|
|
|
11772
11772
|
const {scale} = graphProps;
|
|
11773
11773
|
const angle = getAngleDeg(from.x, from.y, to.x, to.y);
|
|
11774
11774
|
let points = '';
|
|
11775
|
-
if (isEqual$
|
|
11775
|
+
if (isEqual$3(from, to)) {
|
|
11776
11776
|
points = '0,0 0,0 0,0';
|
|
11777
11777
|
} else {
|
|
11778
11778
|
points = `0,0 ${arrowDimensions.vector},${arrowDimensions.vector * 2}
|
|
@@ -12407,7 +12407,7 @@ var MarkLabel$1 = withStyles$e(styles$6, {
|
|
|
12407
12407
|
})(MarkLabel);
|
|
12408
12408
|
const React$i = _dll_react;
|
|
12409
12409
|
const ReactDOM$3 = _dll_react_dom;
|
|
12410
|
-
const {isEqual: isEqual$
|
|
12410
|
+
const {isEqual: isEqual$2} = _dll_lodash;
|
|
12411
12411
|
const {isEmpty: isEmpty$3} = _dll_lodash;
|
|
12412
12412
|
const _jsxFileName$i = "/home/circleci/repo/packages/graphing/src/tools/point/component.jsx";
|
|
12413
12413
|
class Point extends React$i.Component {
|
|
@@ -12462,7 +12462,7 @@ class Point extends React$i.Component {
|
|
|
12462
12462
|
this.setState({
|
|
12463
12463
|
mark: undefined
|
|
12464
12464
|
}, () => {
|
|
12465
|
-
if (!isEqual$
|
|
12465
|
+
if (!isEqual$2(this.props.mark, mark)) {
|
|
12466
12466
|
onChange(this.props.mark, mark);
|
|
12467
12467
|
}
|
|
12468
12468
|
});
|
|
@@ -12730,7 +12730,7 @@ const LinePath = withStyles$c(theme => ({
|
|
|
12730
12730
|
}
|
|
12731
12731
|
}))(RawLinePath);
|
|
12732
12732
|
const React$f = _dll_react;
|
|
12733
|
-
const {isEqual: isEqual$
|
|
12733
|
+
const {isEqual: isEqual$1} = _dll_lodash;
|
|
12734
12734
|
const {cloneDeep: cloneDeep} = _dll_lodash;
|
|
12735
12735
|
const {isEmpty: isEmpty$2} = _dll_lodash;
|
|
12736
12736
|
const PropTypes$f = _dll_prop_types;
|
|
@@ -12798,7 +12798,7 @@ const lineToolComponent = Component => {
|
|
|
12798
12798
|
}, () => {
|
|
12799
12799
|
const {type} = update;
|
|
12800
12800
|
const shouldNotChange = type && (type === 'parabola' || type === 'sine') && sameAxes(update.from, update.to);
|
|
12801
|
-
if (!isEqual$
|
|
12801
|
+
if (!isEqual$1(mark, update) && !shouldNotChange) {
|
|
12802
12802
|
onChange(mark, update);
|
|
12803
12803
|
}
|
|
12804
12804
|
});
|
|
@@ -12847,7 +12847,7 @@ const lineToolComponent = Component => {
|
|
|
12847
12847
|
middle
|
|
12848
12848
|
};
|
|
12849
12849
|
}
|
|
12850
|
-
if (!isEqual$
|
|
12850
|
+
if (!isEqual$1(mark, update)) {
|
|
12851
12851
|
onChange(mark, update);
|
|
12852
12852
|
}
|
|
12853
12853
|
};
|
|
@@ -13814,7 +13814,6 @@ const PropTypes$a = _dll_prop_types;
|
|
|
13814
13814
|
const {withStyles: withStyles$8} = _dll_material_ui__core_styles;
|
|
13815
13815
|
const {chunk: chunk} = _dll_lodash;
|
|
13816
13816
|
const {initial: initial} = _dll_lodash;
|
|
13817
|
-
const {isEqual: isEqual$1} = _dll_lodash;
|
|
13818
13817
|
const {isEmpty: isEmpty} = _dll_lodash;
|
|
13819
13818
|
const debug$5 = _dll_debug;
|
|
13820
13819
|
const ReactDOM = _dll_react_dom;
|
|
@@ -14128,7 +14127,6 @@ class Component$6 extends React$a.Component {
|
|
|
14128
14127
|
Component$6.prototype.__init11.call(this);
|
|
14129
14128
|
Component$6.prototype.__init12.call(this);
|
|
14130
14129
|
Component$6.prototype.__init13.call(this);
|
|
14131
|
-
Component$6.prototype.__init14.call(this);
|
|
14132
14130
|
this.state = {};
|
|
14133
14131
|
}
|
|
14134
14132
|
__init8() {
|
|
@@ -14201,13 +14199,6 @@ class Component$6 extends React$a.Component {
|
|
|
14201
14199
|
});
|
|
14202
14200
|
};
|
|
14203
14201
|
}
|
|
14204
|
-
__init14() {
|
|
14205
|
-
this.shouldComponentUpdate = (nextProps, nextState) => {
|
|
14206
|
-
const {coordinatesOnHover, graphProps, mark} = this.props;
|
|
14207
|
-
const {graphProps: nextGraphProps} = nextProps;
|
|
14208
|
-
return !isDomainRangeEqual$1(graphProps, nextGraphProps) || !isEqual$1(mark, nextProps.mark) || !isEqual$1(this.state.mark, nextState.mark) || coordinatesOnHover !== nextProps.coordinatesOnHover;
|
|
14209
|
-
};
|
|
14210
|
-
}
|
|
14211
14202
|
render() {
|
|
14212
14203
|
const {coordinatesOnHover, mark, graphProps, onClick, isToolActive, labelNode, labelModeEnabled} = this.props;
|
|
14213
14204
|
const {mark: stateMark} = this.state;
|
|
@@ -14228,7 +14219,7 @@ class Component$6 extends React$a.Component {
|
|
|
14228
14219
|
__self: this,
|
|
14229
14220
|
__source: {
|
|
14230
14221
|
fileName: _jsxFileName$a,
|
|
14231
|
-
lineNumber:
|
|
14222
|
+
lineNumber: 356
|
|
14232
14223
|
}
|
|
14233
14224
|
});
|
|
14234
14225
|
}
|
package/module/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/graphing-module",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.21",
|
|
4
4
|
"mappings": {
|
|
5
5
|
"@pie-lib/plot": "_dll_pie_lib__plot",
|
|
6
6
|
"@pie-lib/graphing": "_dll_pie_lib__graphing",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"version": "2.6.13"
|
|
14
14
|
},
|
|
15
15
|
"@pie-lib/graphing": {
|
|
16
|
-
"version": "2.12.
|
|
16
|
+
"version": "2.12.26"
|
|
17
17
|
},
|
|
18
18
|
"d3-scale": {
|
|
19
19
|
"version": "2.2.2"
|
|
@@ -22,24 +22,24 @@
|
|
|
22
22
|
"version": "1.4.2"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
"hash": "
|
|
25
|
+
"hash": "f0c42dc9ec298c1a72863873385edf047e4ebca5"
|
|
26
26
|
},
|
|
27
27
|
"modules": [
|
|
28
28
|
{
|
|
29
29
|
"name": "@pie-lib/shared-module",
|
|
30
|
-
"version": "^1.6.
|
|
30
|
+
"version": "^1.6.19"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"name": "@pie-lib/editable-html-module",
|
|
34
|
-
"version": "^3.6.
|
|
34
|
+
"version": "^3.6.22"
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"name": "@pie-lib/drag-module",
|
|
38
|
-
"version": "^2.1.
|
|
38
|
+
"version": "^2.1.22"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"name": "@pie-lib/config-module",
|
|
42
|
-
"version": "^2.8.
|
|
42
|
+
"version": "^2.8.6"
|
|
43
43
|
}
|
|
44
44
|
],
|
|
45
45
|
"isLocal": true
|