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