@pie-lib/graphing-module 1.0.26 → 1.0.29
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 +37 -28
- package/module/manifest.json +4 -4
- package/package.json +1 -1
package/module/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {_dll_prop_types, _dll_lodash, _dll_react, _dll_material_ui__core_styles, _dll_material_ui__core, _dll_pie_lib__render_ui, _dll_react_dom, _dll_debug, _dll_classnames, _dll_material_ui__core_styles_color_manipulator} from "../../shared-module@^1.4.
|
|
1
|
+
import {_dll_prop_types, _dll_lodash, _dll_react, _dll_material_ui__core_styles, _dll_material_ui__core, _dll_pie_lib__render_ui, _dll_react_dom, _dll_debug, _dll_classnames, _dll_material_ui__core_styles_color_manipulator} from "../../shared-module@^1.4.8/module/index.js";
|
|
2
2
|
const PropTypes$C = _dll_prop_types;
|
|
3
3
|
const BaseDomainRangeType = {
|
|
4
4
|
min: PropTypes$C.number.isRequired,
|
|
@@ -8382,7 +8382,7 @@ const {head: head} = _dll_lodash;
|
|
|
8382
8382
|
const {tail: tail} = _dll_lodash;
|
|
8383
8383
|
const {isEqual: isEqual$6} = _dll_lodash;
|
|
8384
8384
|
const {isEmpty: isEmpty$4} = _dll_lodash;
|
|
8385
|
-
const {cloneDeep: cloneDeep$
|
|
8385
|
+
const {cloneDeep: cloneDeep$2} = _dll_lodash;
|
|
8386
8386
|
const bounds = bounds$2;
|
|
8387
8387
|
const point = point$4;
|
|
8388
8388
|
const getAngleDeg = () => 0;
|
|
@@ -8452,7 +8452,7 @@ const pointsToArea = (a, b) => {
|
|
|
8452
8452
|
};
|
|
8453
8453
|
};
|
|
8454
8454
|
const getRightestPoints = points => {
|
|
8455
|
-
const sortedPoints = cloneDeep$
|
|
8455
|
+
const sortedPoints = cloneDeep$2(points);
|
|
8456
8456
|
sortedPoints.sort((a, b) => b.x - a.x);
|
|
8457
8457
|
return {
|
|
8458
8458
|
a: sortedPoints[0],
|
|
@@ -8521,7 +8521,7 @@ const isDuplicatedMark = (mark, marks, oldMark) => {
|
|
|
8521
8521
|
const {from, to} = mark;
|
|
8522
8522
|
return equalPoints(from, m.from) && equalPoints(to, m.to) || equalPoints(from, m.to) && equalPoints(to, m.from) || type === 'line' && isSameLine(m, mark);
|
|
8523
8523
|
} else if (type === 'polygon') {
|
|
8524
|
-
return isEqual$6(sortPoints(cloneDeep$
|
|
8524
|
+
return isEqual$6(sortPoints(cloneDeep$2(mark.points)), sortPoints(cloneDeep$2(m.points)));
|
|
8525
8525
|
} else if (type === 'point') {
|
|
8526
8526
|
return equalPoints(m, mark);
|
|
8527
8527
|
}
|
|
@@ -9186,7 +9186,7 @@ Bg.__initStatic2();
|
|
|
9186
9186
|
const React$r = _dll_react;
|
|
9187
9187
|
const PropTypes$p = _dll_prop_types;
|
|
9188
9188
|
const {isEqual: isEqual$5} = _dll_lodash;
|
|
9189
|
-
const {cloneDeep: cloneDeep} = _dll_lodash;
|
|
9189
|
+
const {cloneDeep: cloneDeep$1} = _dll_lodash;
|
|
9190
9190
|
const debug$7 = _dll_debug;
|
|
9191
9191
|
const _jsxFileName$o = "/home/circleci/repo/packages/graphing/src/graph.jsx";
|
|
9192
9192
|
const log$7 = debug$7('pie-lib:graphing:graph');
|
|
@@ -9216,7 +9216,7 @@ const getMaskSize = size => ({
|
|
|
9216
9216
|
});
|
|
9217
9217
|
const removeBuildingToolIfCurrentToolDiffers = ({marks, currentTool}) => {
|
|
9218
9218
|
const buildingMark = marks.filter(m => m.building)[0];
|
|
9219
|
-
let newMarks = cloneDeep(marks);
|
|
9219
|
+
let newMarks = cloneDeep$1(marks);
|
|
9220
9220
|
if (buildingMark && currentTool && buildingMark.type !== currentTool.type) {
|
|
9221
9221
|
const index = newMarks.findIndex(m => isEqual$5(m, buildingMark));
|
|
9222
9222
|
if (index >= 0) {
|
|
@@ -9258,7 +9258,7 @@ class Graph extends React$r.Component {
|
|
|
9258
9258
|
__init3() {
|
|
9259
9259
|
this.changeMark = (oldMark, newMark) => {
|
|
9260
9260
|
const {onChangeMarks, marks} = this.props;
|
|
9261
|
-
let newMarks = cloneDeep(marks);
|
|
9261
|
+
let newMarks = cloneDeep$1(marks);
|
|
9262
9262
|
const index = newMarks.findIndex(m => isEqual$5(m, oldMark));
|
|
9263
9263
|
if (index >= 0 && !isDuplicatedMark(newMark, marks, oldMark)) {
|
|
9264
9264
|
newMarks.splice(index, 1, newMark);
|
|
@@ -9278,7 +9278,7 @@ class Graph extends React$r.Component {
|
|
|
9278
9278
|
__init5() {
|
|
9279
9279
|
this.updateMarks = (existing, update, addIfMissing = false) => {
|
|
9280
9280
|
const {onChangeMarks, marks} = this.props;
|
|
9281
|
-
let newMarks = cloneDeep(marks);
|
|
9281
|
+
let newMarks = cloneDeep$1(marks);
|
|
9282
9282
|
if (!update.building && isDuplicatedMark(update, marks)) {
|
|
9283
9283
|
return;
|
|
9284
9284
|
}
|
|
@@ -9409,7 +9409,8 @@ class Graph extends React$r.Component {
|
|
|
9409
9409
|
key: `${markType}-${index}-bg`,
|
|
9410
9410
|
mark: {
|
|
9411
9411
|
...m,
|
|
9412
|
-
disabled: true
|
|
9412
|
+
disabled: true,
|
|
9413
|
+
isBackground: true
|
|
9413
9414
|
},
|
|
9414
9415
|
labelNode: this.state.labelNode,
|
|
9415
9416
|
...common,
|
|
@@ -11732,6 +11733,10 @@ const styles$5 = theme => ({
|
|
|
11732
11733
|
color: color$9.primaryDark()
|
|
11733
11734
|
},
|
|
11734
11735
|
disabled: {
|
|
11736
|
+
border: `solid 1px ${color$9.primaryDark()}`,
|
|
11737
|
+
background: color$9.background()
|
|
11738
|
+
},
|
|
11739
|
+
disabledMark: {
|
|
11735
11740
|
border: `solid 1px ${color$9.disabled()}`,
|
|
11736
11741
|
background: color$9.background(),
|
|
11737
11742
|
color: color$9.disabled()
|
|
@@ -11821,14 +11826,14 @@ const MarkLabel = props => {
|
|
|
11821
11826
|
externalInputRef(r);
|
|
11822
11827
|
},
|
|
11823
11828
|
disabled: disabledInput,
|
|
11824
|
-
inputClassName: cn$1(classes.input,
|
|
11829
|
+
inputClassName: cn$1(classes.input, disabled && classes.disabled, mark.disabled && classes.disabledMark),
|
|
11825
11830
|
value: label,
|
|
11826
11831
|
style: style,
|
|
11827
11832
|
onChange: onChange,
|
|
11828
11833
|
__self: undefined,
|
|
11829
11834
|
__source: {
|
|
11830
11835
|
fileName: _jsxFileName$i,
|
|
11831
|
-
lineNumber:
|
|
11836
|
+
lineNumber: 107
|
|
11832
11837
|
}
|
|
11833
11838
|
});
|
|
11834
11839
|
};
|
|
@@ -12159,6 +12164,7 @@ const LinePath = withStyles$b(theme => ({
|
|
|
12159
12164
|
}))(RawLinePath);
|
|
12160
12165
|
const React$e = _dll_react;
|
|
12161
12166
|
const {isEqual: isEqual$2} = _dll_lodash;
|
|
12167
|
+
const {cloneDeep: cloneDeep} = _dll_lodash;
|
|
12162
12168
|
const {isEmpty: isEmpty$2} = _dll_lodash;
|
|
12163
12169
|
const PropTypes$e = _dll_prop_types;
|
|
12164
12170
|
const ReactDOM$2 = _dll_react_dom;
|
|
@@ -12282,22 +12288,25 @@ const lineToolComponent = Component => {
|
|
|
12282
12288
|
render() {
|
|
12283
12289
|
const {graphProps, onClick, labelNode, labelModeEnabled, coordinatesOnHover} = this.props;
|
|
12284
12290
|
const mark = this.state.mark ? this.state.mark : this.props.mark;
|
|
12285
|
-
|
|
12286
|
-
|
|
12291
|
+
const from = cloneDeep(mark.from);
|
|
12292
|
+
const to = cloneDeep(mark.to);
|
|
12293
|
+
const middle = cloneDeep(mark.middle);
|
|
12294
|
+
if (from && mark.isBackground) {
|
|
12295
|
+
from.disabled = true;
|
|
12287
12296
|
}
|
|
12288
|
-
if (
|
|
12289
|
-
|
|
12297
|
+
if (to && mark.isBackground) {
|
|
12298
|
+
to.disabled = true;
|
|
12290
12299
|
}
|
|
12291
|
-
if (
|
|
12292
|
-
|
|
12300
|
+
if (middle && mark.isBackground) {
|
|
12301
|
+
middle.disabled = true;
|
|
12293
12302
|
}
|
|
12294
12303
|
return React$e.createElement(Component, {
|
|
12295
12304
|
disabled: mark.disabled,
|
|
12296
12305
|
coordinatesOnHover: coordinatesOnHover,
|
|
12297
12306
|
correctness: mark.correctness,
|
|
12298
|
-
from:
|
|
12299
|
-
to:
|
|
12300
|
-
middle:
|
|
12307
|
+
from: from,
|
|
12308
|
+
to: to,
|
|
12309
|
+
middle: middle,
|
|
12301
12310
|
graphProps: graphProps,
|
|
12302
12311
|
onChange: this.changeMark,
|
|
12303
12312
|
changeMarkProps: this.changeMarkProps,
|
|
@@ -12309,7 +12318,7 @@ const lineToolComponent = Component => {
|
|
|
12309
12318
|
__self: this,
|
|
12310
12319
|
__source: {
|
|
12311
12320
|
fileName: _jsxFileName$e,
|
|
12312
|
-
lineNumber:
|
|
12321
|
+
lineNumber: 121
|
|
12313
12322
|
}
|
|
12314
12323
|
});
|
|
12315
12324
|
}
|
|
@@ -12497,7 +12506,7 @@ const lineBase = (Comp, opts) => {
|
|
|
12497
12506
|
__self: this,
|
|
12498
12507
|
__source: {
|
|
12499
12508
|
fileName: _jsxFileName$e,
|
|
12500
|
-
lineNumber:
|
|
12509
|
+
lineNumber: 295
|
|
12501
12510
|
}
|
|
12502
12511
|
}), labelNode);
|
|
12503
12512
|
}
|
|
@@ -12514,7 +12523,7 @@ const lineBase = (Comp, opts) => {
|
|
|
12514
12523
|
__self: this,
|
|
12515
12524
|
__source: {
|
|
12516
12525
|
fileName: _jsxFileName$e,
|
|
12517
|
-
lineNumber:
|
|
12526
|
+
lineNumber: 308
|
|
12518
12527
|
}
|
|
12519
12528
|
}), labelNode);
|
|
12520
12529
|
}
|
|
@@ -12531,7 +12540,7 @@ const lineBase = (Comp, opts) => {
|
|
|
12531
12540
|
__self: this,
|
|
12532
12541
|
__source: {
|
|
12533
12542
|
fileName: _jsxFileName$e,
|
|
12534
|
-
lineNumber:
|
|
12543
|
+
lineNumber: 321
|
|
12535
12544
|
}
|
|
12536
12545
|
}), labelNode);
|
|
12537
12546
|
}
|
|
@@ -12540,7 +12549,7 @@ const lineBase = (Comp, opts) => {
|
|
|
12540
12549
|
__self: this,
|
|
12541
12550
|
__source: {
|
|
12542
12551
|
fileName: _jsxFileName$e,
|
|
12543
|
-
lineNumber:
|
|
12552
|
+
lineNumber: 334
|
|
12544
12553
|
}
|
|
12545
12554
|
}, to && React$e.createElement(DraggableComp, {
|
|
12546
12555
|
from: from,
|
|
@@ -12552,7 +12561,7 @@ const lineBase = (Comp, opts) => {
|
|
|
12552
12561
|
__self: this,
|
|
12553
12562
|
__source: {
|
|
12554
12563
|
fileName: _jsxFileName$e,
|
|
12555
|
-
lineNumber:
|
|
12564
|
+
lineNumber: 336
|
|
12556
12565
|
}
|
|
12557
12566
|
}), lineLabelNode, React$e.createElement(FromPoint, {
|
|
12558
12567
|
x: from.x,
|
|
@@ -12565,7 +12574,7 @@ const lineBase = (Comp, opts) => {
|
|
|
12565
12574
|
__self: this,
|
|
12566
12575
|
__source: {
|
|
12567
12576
|
fileName: _jsxFileName$e,
|
|
12568
|
-
lineNumber:
|
|
12577
|
+
lineNumber: 347
|
|
12569
12578
|
}
|
|
12570
12579
|
}), fromLabelNode, to && React$e.createElement(ToPoint, {
|
|
12571
12580
|
x: to.x,
|
|
@@ -12579,7 +12588,7 @@ const lineBase = (Comp, opts) => {
|
|
|
12579
12588
|
__self: this,
|
|
12580
12589
|
__source: {
|
|
12581
12590
|
fileName: _jsxFileName$e,
|
|
12582
|
-
lineNumber:
|
|
12591
|
+
lineNumber: 359
|
|
12583
12592
|
}
|
|
12584
12593
|
}), toLabelNode);
|
|
12585
12594
|
}
|
package/module/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/graphing-module",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.29",
|
|
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.1.10"
|
|
14
14
|
},
|
|
15
15
|
"@pie-lib/graphing": {
|
|
16
|
-
"version": "2.4.
|
|
16
|
+
"version": "2.4.15"
|
|
17
17
|
},
|
|
18
18
|
"d3-scale": {
|
|
19
19
|
"version": "2.2.2"
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"version": "1.4.2"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
"hash": "
|
|
25
|
+
"hash": "741a0e77165aa9134e532428a8e5f77087753dd1"
|
|
26
26
|
},
|
|
27
27
|
"modules": [
|
|
28
28
|
{
|
|
29
29
|
"name": "@pie-lib/shared-module",
|
|
30
|
-
"version": "^1.4.
|
|
30
|
+
"version": "^1.4.8"
|
|
31
31
|
}
|
|
32
32
|
],
|
|
33
33
|
"isLocal": true
|