@pie-lib/graphing-module 1.0.28 → 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 +29 -25
- 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
|
}
|
|
@@ -12164,6 +12164,7 @@ const LinePath = withStyles$b(theme => ({
|
|
|
12164
12164
|
}))(RawLinePath);
|
|
12165
12165
|
const React$e = _dll_react;
|
|
12166
12166
|
const {isEqual: isEqual$2} = _dll_lodash;
|
|
12167
|
+
const {cloneDeep: cloneDeep} = _dll_lodash;
|
|
12167
12168
|
const {isEmpty: isEmpty$2} = _dll_lodash;
|
|
12168
12169
|
const PropTypes$e = _dll_prop_types;
|
|
12169
12170
|
const ReactDOM$2 = _dll_react_dom;
|
|
@@ -12287,22 +12288,25 @@ const lineToolComponent = Component => {
|
|
|
12287
12288
|
render() {
|
|
12288
12289
|
const {graphProps, onClick, labelNode, labelModeEnabled, coordinatesOnHover} = this.props;
|
|
12289
12290
|
const mark = this.state.mark ? this.state.mark : this.props.mark;
|
|
12290
|
-
|
|
12291
|
-
|
|
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;
|
|
12292
12296
|
}
|
|
12293
|
-
if (
|
|
12294
|
-
|
|
12297
|
+
if (to && mark.isBackground) {
|
|
12298
|
+
to.disabled = true;
|
|
12295
12299
|
}
|
|
12296
|
-
if (
|
|
12297
|
-
|
|
12300
|
+
if (middle && mark.isBackground) {
|
|
12301
|
+
middle.disabled = true;
|
|
12298
12302
|
}
|
|
12299
12303
|
return React$e.createElement(Component, {
|
|
12300
12304
|
disabled: mark.disabled,
|
|
12301
12305
|
coordinatesOnHover: coordinatesOnHover,
|
|
12302
12306
|
correctness: mark.correctness,
|
|
12303
|
-
from:
|
|
12304
|
-
to:
|
|
12305
|
-
middle:
|
|
12307
|
+
from: from,
|
|
12308
|
+
to: to,
|
|
12309
|
+
middle: middle,
|
|
12306
12310
|
graphProps: graphProps,
|
|
12307
12311
|
onChange: this.changeMark,
|
|
12308
12312
|
changeMarkProps: this.changeMarkProps,
|
|
@@ -12314,7 +12318,7 @@ const lineToolComponent = Component => {
|
|
|
12314
12318
|
__self: this,
|
|
12315
12319
|
__source: {
|
|
12316
12320
|
fileName: _jsxFileName$e,
|
|
12317
|
-
lineNumber:
|
|
12321
|
+
lineNumber: 121
|
|
12318
12322
|
}
|
|
12319
12323
|
});
|
|
12320
12324
|
}
|
|
@@ -12502,7 +12506,7 @@ const lineBase = (Comp, opts) => {
|
|
|
12502
12506
|
__self: this,
|
|
12503
12507
|
__source: {
|
|
12504
12508
|
fileName: _jsxFileName$e,
|
|
12505
|
-
lineNumber:
|
|
12509
|
+
lineNumber: 295
|
|
12506
12510
|
}
|
|
12507
12511
|
}), labelNode);
|
|
12508
12512
|
}
|
|
@@ -12519,7 +12523,7 @@ const lineBase = (Comp, opts) => {
|
|
|
12519
12523
|
__self: this,
|
|
12520
12524
|
__source: {
|
|
12521
12525
|
fileName: _jsxFileName$e,
|
|
12522
|
-
lineNumber:
|
|
12526
|
+
lineNumber: 308
|
|
12523
12527
|
}
|
|
12524
12528
|
}), labelNode);
|
|
12525
12529
|
}
|
|
@@ -12536,7 +12540,7 @@ const lineBase = (Comp, opts) => {
|
|
|
12536
12540
|
__self: this,
|
|
12537
12541
|
__source: {
|
|
12538
12542
|
fileName: _jsxFileName$e,
|
|
12539
|
-
lineNumber:
|
|
12543
|
+
lineNumber: 321
|
|
12540
12544
|
}
|
|
12541
12545
|
}), labelNode);
|
|
12542
12546
|
}
|
|
@@ -12545,7 +12549,7 @@ const lineBase = (Comp, opts) => {
|
|
|
12545
12549
|
__self: this,
|
|
12546
12550
|
__source: {
|
|
12547
12551
|
fileName: _jsxFileName$e,
|
|
12548
|
-
lineNumber:
|
|
12552
|
+
lineNumber: 334
|
|
12549
12553
|
}
|
|
12550
12554
|
}, to && React$e.createElement(DraggableComp, {
|
|
12551
12555
|
from: from,
|
|
@@ -12557,7 +12561,7 @@ const lineBase = (Comp, opts) => {
|
|
|
12557
12561
|
__self: this,
|
|
12558
12562
|
__source: {
|
|
12559
12563
|
fileName: _jsxFileName$e,
|
|
12560
|
-
lineNumber:
|
|
12564
|
+
lineNumber: 336
|
|
12561
12565
|
}
|
|
12562
12566
|
}), lineLabelNode, React$e.createElement(FromPoint, {
|
|
12563
12567
|
x: from.x,
|
|
@@ -12570,7 +12574,7 @@ const lineBase = (Comp, opts) => {
|
|
|
12570
12574
|
__self: this,
|
|
12571
12575
|
__source: {
|
|
12572
12576
|
fileName: _jsxFileName$e,
|
|
12573
|
-
lineNumber:
|
|
12577
|
+
lineNumber: 347
|
|
12574
12578
|
}
|
|
12575
12579
|
}), fromLabelNode, to && React$e.createElement(ToPoint, {
|
|
12576
12580
|
x: to.x,
|
|
@@ -12584,7 +12588,7 @@ const lineBase = (Comp, opts) => {
|
|
|
12584
12588
|
__self: this,
|
|
12585
12589
|
__source: {
|
|
12586
12590
|
fileName: _jsxFileName$e,
|
|
12587
|
-
lineNumber:
|
|
12591
|
+
lineNumber: 359
|
|
12588
12592
|
}
|
|
12589
12593
|
}), toLabelNode);
|
|
12590
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
|