@crystaldesign/web-planner-logic 26.12.0-beta.27 → 26.12.0-beta.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/build/cjs/{DivaBoxPlanner-69dd68ba.js → DivaBoxPlanner-0f7e2078.js} +3 -3
- package/build/cjs/{DivaStandardPlanner-1e17ea12.js → DivaStandardPlanner-ebfa66c4.js} +2 -2
- package/build/cjs/{DoorPlanner-602a86f3.js → DoorPlanner-15cb0430.js} +2 -2
- package/build/cjs/{Host3DSignalR-09d9efe0.js → Host3DSignalR-5aede7a4.js} +2 -2
- package/build/cjs/{LiviqueWWSHandler-9497b33d.js → LiviqueWWSHandler-1f3f4217.js} +2 -2
- package/build/cjs/{PfisterWWSHandler-14686c6d.js → PfisterWWSHandler-185178ce.js} +2 -2
- package/build/cjs/{PlannerHandler2D-a22115ce.js → PlannerHandler2D-5a38f064.js} +5 -272
- package/build/cjs/{SeriousBasketHandler-acfb2f40.js → SeriousBasketHandler-e1ce56b0.js} +2 -2
- package/build/cjs/{ShelfPlanner-bd6038e1.js → ShelfPlanner-c7248511.js} +2 -2
- package/build/cjs/{StandardWWSHandler-bafafa71.js → StandardWWSHandler-e88dfbcf.js} +2 -2
- package/build/cjs/{index-cca37a97.js → index-0f7a7e3c.js} +696 -115
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-50d29c59.js → DivaBoxPlanner-3e72a31d.js} +3 -3
- package/build/esm/{DivaStandardPlanner-e1831308.js → DivaStandardPlanner-7afa7053.js} +2 -2
- package/build/esm/{DoorPlanner-598af141.js → DoorPlanner-531a001e.js} +2 -2
- package/build/esm/{Host3DSignalR-bc77d0ab.js → Host3DSignalR-61a6d882.js} +2 -2
- package/build/esm/{LiviqueWWSHandler-ace695dc.js → LiviqueWWSHandler-3c11a396.js} +2 -2
- package/build/esm/{PfisterWWSHandler-ebf67f99.js → PfisterWWSHandler-120f8933.js} +2 -2
- package/build/esm/{PlannerHandler2D-cb6781eb.js → PlannerHandler2D-91e383db.js} +3 -268
- package/build/esm/{SeriousBasketHandler-14961eb6.js → SeriousBasketHandler-070e3447.js} +2 -2
- package/build/esm/{ShelfPlanner-6f2b92a1.js → ShelfPlanner-29be7e07.js} +2 -2
- package/build/esm/{StandardWWSHandler-1c478a3c.js → StandardWWSHandler-359cb15b.js} +2 -2
- package/build/esm/{index-a201dfa2.js → index-16d95e66.js} +696 -116
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/interface/Planner/DockingPointDataType.d.ts +10 -0
- package/build/types/web-planner-logic/src/interface/Planner/DockingPointDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/SVGUtils.d.ts +8 -1
- package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/SVGUtils.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/Article/DivaCatalogArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts +7 -0
- package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/CatalogPlannerArticleData.d.ts +6 -0
- package/build/types/web-planner-logic/src/model/Articles/CatalogPlannerArticleData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/accessoryWithoutDocking.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/accessoryWithoutDocking.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/countDockingPoints.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/countDockingPoints.test.d.ts.map +1 -0
- package/package.json +3 -3
package/build/cjs/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
5
|
+
var index = require('./index-0f7a7e3c.js');
|
|
6
6
|
var planner2dCore = require('@crystaldesign/planner-2d-core');
|
|
7
7
|
require('@babel/runtime/helpers/slicedToArray');
|
|
8
8
|
require('@babel/runtime/helpers/asyncToGenerator');
|
|
@@ -3,13 +3,14 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
|
3
3
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
4
4
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
5
5
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
6
|
-
import { c as Vector2, V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-
|
|
6
|
+
import { c as Vector2, V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-16d95e66.js';
|
|
7
7
|
import DivaUtils, { DivaError, md5 } from '@crystaldesign/diva-utils';
|
|
8
8
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
9
9
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
10
|
-
import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-
|
|
10
|
+
import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-91e383db.js';
|
|
11
11
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
12
12
|
import 'axios';
|
|
13
|
+
import '@crystaldesign/planner-2d-core';
|
|
13
14
|
import '@crystaldesign/basket-model';
|
|
14
15
|
import '@babel/runtime/helpers/typeof';
|
|
15
16
|
import 'fast-xml-parser';
|
|
@@ -19,7 +20,6 @@ import '@babel/runtime/helpers/inherits';
|
|
|
19
20
|
import '@babel/runtime/helpers/wrapNativeSuper';
|
|
20
21
|
import '@crystaldesign/basket-handler';
|
|
21
22
|
import 'socket.io-client';
|
|
22
|
-
import '@crystaldesign/planner-2d-core';
|
|
23
23
|
import '@babel/runtime/helpers/get';
|
|
24
24
|
|
|
25
25
|
var LOG$3 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
@@ -4,10 +4,10 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
|
4
4
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
5
5
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
6
6
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
7
|
-
import { V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-
|
|
7
|
+
import { V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-16d95e66.js';
|
|
8
8
|
import DivaUtils, { DivaError, md5 } from '@crystaldesign/diva-utils';
|
|
9
9
|
import { computeDockedTransform } from '@crystaldesign/planner-2d-core';
|
|
10
|
-
import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-
|
|
10
|
+
import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-91e383db.js';
|
|
11
11
|
import '@babel/runtime/helpers/slicedToArray';
|
|
12
12
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
13
13
|
import 'axios';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
2
2
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
3
3
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
|
-
import './index-
|
|
4
|
+
import './index-16d95e66.js';
|
|
5
5
|
import DivaUtils from '@crystaldesign/diva-utils';
|
|
6
6
|
import '@babel/runtime/helpers/slicedToArray';
|
|
7
7
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
@@ -9,6 +9,7 @@ import '@babel/runtime/regenerator';
|
|
|
9
9
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
10
10
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
11
11
|
import 'axios';
|
|
12
|
+
import '@crystaldesign/planner-2d-core';
|
|
12
13
|
import '@crystaldesign/basket-model';
|
|
13
14
|
import '@babel/runtime/helpers/typeof';
|
|
14
15
|
import 'fast-xml-parser';
|
|
@@ -18,7 +19,6 @@ import '@babel/runtime/helpers/inherits';
|
|
|
18
19
|
import '@babel/runtime/helpers/wrapNativeSuper';
|
|
19
20
|
import '@crystaldesign/basket-handler';
|
|
20
21
|
import 'socket.io-client';
|
|
21
|
-
import '@crystaldesign/planner-2d-core';
|
|
22
22
|
|
|
23
23
|
var Door = /*#__PURE__*/function () {
|
|
24
24
|
function Door(type, basketId, index) {
|
|
@@ -3,7 +3,7 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
|
3
3
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
4
4
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
5
5
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
6
|
-
import { d as bootMark, R as Rendering, H as HQRenderScript } from './index-
|
|
6
|
+
import { d as bootMark, R as Rendering, H as HQRenderScript } from './index-16d95e66.js';
|
|
7
7
|
import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
|
|
8
8
|
import { HubConnectionBuilder, LogLevel } from '@microsoft/signalr';
|
|
9
9
|
import io from 'socket.io-client';
|
|
@@ -12,6 +12,7 @@ import '@babel/runtime/helpers/slicedToArray';
|
|
|
12
12
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
13
13
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
14
14
|
import 'axios';
|
|
15
|
+
import '@crystaldesign/planner-2d-core';
|
|
15
16
|
import '@crystaldesign/basket-model';
|
|
16
17
|
import '@babel/runtime/helpers/typeof';
|
|
17
18
|
import 'fast-xml-parser';
|
|
@@ -20,7 +21,6 @@ import '@babel/runtime/helpers/getPrototypeOf';
|
|
|
20
21
|
import '@babel/runtime/helpers/inherits';
|
|
21
22
|
import '@babel/runtime/helpers/wrapNativeSuper';
|
|
22
23
|
import '@crystaldesign/basket-handler';
|
|
23
|
-
import '@crystaldesign/planner-2d-core';
|
|
24
24
|
|
|
25
25
|
var LOG = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
26
26
|
var Host3DSignalR = /*#__PURE__*/function () {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
2
2
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
3
|
-
import './index-
|
|
3
|
+
import './index-16d95e66.js';
|
|
4
4
|
import '@babel/runtime/helpers/slicedToArray';
|
|
5
5
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
6
6
|
import '@babel/runtime/helpers/defineProperty';
|
|
@@ -9,6 +9,7 @@ import '@babel/runtime/helpers/objectWithoutProperties';
|
|
|
9
9
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
10
10
|
import 'axios';
|
|
11
11
|
import '@crystaldesign/diva-utils';
|
|
12
|
+
import '@crystaldesign/planner-2d-core';
|
|
12
13
|
import '@crystaldesign/basket-model';
|
|
13
14
|
import '@babel/runtime/helpers/typeof';
|
|
14
15
|
import 'fast-xml-parser';
|
|
@@ -18,7 +19,6 @@ import '@babel/runtime/helpers/inherits';
|
|
|
18
19
|
import '@babel/runtime/helpers/wrapNativeSuper';
|
|
19
20
|
import '@crystaldesign/basket-handler';
|
|
20
21
|
import 'socket.io-client';
|
|
21
|
-
import '@crystaldesign/planner-2d-core';
|
|
22
22
|
|
|
23
23
|
//Der in einem Set gemergte Optionsbaum
|
|
24
24
|
var LiviqueWWSHandler = /*#__PURE__*/function () {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
2
2
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
3
|
-
import { a as articleHandlerInstance } from './index-
|
|
3
|
+
import { a as articleHandlerInstance } from './index-16d95e66.js';
|
|
4
4
|
import { SAPOrderLineData } from '@crystaldesign/basket-model';
|
|
5
5
|
import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
|
|
6
6
|
import '@babel/runtime/helpers/slicedToArray';
|
|
@@ -10,6 +10,7 @@ import '@babel/runtime/regenerator';
|
|
|
10
10
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
11
11
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
12
12
|
import 'axios';
|
|
13
|
+
import '@crystaldesign/planner-2d-core';
|
|
13
14
|
import '@babel/runtime/helpers/typeof';
|
|
14
15
|
import 'fast-xml-parser';
|
|
15
16
|
import '@babel/runtime/helpers/possibleConstructorReturn';
|
|
@@ -18,7 +19,6 @@ import '@babel/runtime/helpers/inherits';
|
|
|
18
19
|
import '@babel/runtime/helpers/wrapNativeSuper';
|
|
19
20
|
import '@crystaldesign/basket-handler';
|
|
20
21
|
import 'socket.io-client';
|
|
21
|
-
import '@crystaldesign/planner-2d-core';
|
|
22
22
|
|
|
23
23
|
var LOG = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
24
24
|
//Der in einem Set gemergte Optionsbaum
|
|
@@ -3,278 +3,13 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
|
3
3
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
4
4
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
5
5
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
6
|
-
import { c as Vector2 } from './index-
|
|
7
|
-
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
8
|
-
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
9
|
-
import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
|
|
10
|
-
import { parseXml, serializeXml, removeMask, stretchArticleSvg, DockingPointHandler as DockingPointHandler$1, polygonEdgesIntersect, polygonInsidePolygon, getOlfGeometry, getOltGeometry, getRootSize, getMinBorder } from '@crystaldesign/planner-2d-core';
|
|
6
|
+
import { c as Vector2, S as SVGUtils } from './index-16d95e66.js';
|
|
11
7
|
import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
|
|
12
8
|
import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
|
|
13
9
|
import _get from '@babel/runtime/helpers/get';
|
|
14
10
|
import _inherits from '@babel/runtime/helpers/inherits';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
18
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
19
|
-
var LOG$1 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
20
|
-
var SVGUtils = /*#__PURE__*/function () {
|
|
21
|
-
function SVGUtils() {
|
|
22
|
-
_classCallCheck(this, SVGUtils);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* This function removes all VIF and OLF information from the SVG. This is used for displaying only the OLT information
|
|
26
|
-
* @param content The svg with OLF and OLT
|
|
27
|
-
* @returns SVG with only OLT information
|
|
28
|
-
*/
|
|
29
|
-
return _createClass(SVGUtils, [{
|
|
30
|
-
key: "removeOLFFromSvg",
|
|
31
|
-
value: function removeOLFFromSvg(content) {
|
|
32
|
-
var xmlDocument = parseXml(content);
|
|
33
|
-
var vifObjs = xmlDocument.evaluate("//*[starts-with(@id,'VIF')]", xmlDocument, null, 7, null);
|
|
34
|
-
if (vifObjs.snapshotLength > 0) {
|
|
35
|
-
for (var i = 0; i < vifObjs.snapshotLength; i++) {
|
|
36
|
-
var _parentElement;
|
|
37
|
-
(_parentElement = vifObjs.snapshotItem(i).parentElement) === null || _parentElement === void 0 || _parentElement.removeChild(vifObjs.snapshotItem(i));
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
var olfObjs = xmlDocument.evaluate("//*[starts-with(@id,'OLF')]", xmlDocument, null, 7, null);
|
|
41
|
-
if (olfObjs.snapshotLength > 0) {
|
|
42
|
-
for (var i = 0; i < olfObjs.snapshotLength; i++) {
|
|
43
|
-
var _parentElement2;
|
|
44
|
-
(_parentElement2 = olfObjs.snapshotItem(i).parentElement) === null || _parentElement2 === void 0 || _parentElement2.removeChild(olfObjs.snapshotItem(i));
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return serializeXml(xmlDocument);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* This function returns the DPs of an svg
|
|
52
|
-
* @param content The svg with OLF and OLT
|
|
53
|
-
* @returns SVG with only OLT information
|
|
54
|
-
*/
|
|
55
|
-
}, {
|
|
56
|
-
key: "getDPsInSVG",
|
|
57
|
-
value: function getDPsInSVG(content) {
|
|
58
|
-
var dockingpointsSvgLine = [];
|
|
59
|
-
var xmlDocument = parseXml(content);
|
|
60
|
-
var dpObjs = xmlDocument.evaluate("//*[starts-with(@id,'AV')]", xmlDocument, null, 7, null);
|
|
61
|
-
if (dpObjs.snapshotLength > 0) {
|
|
62
|
-
for (var i = 0; i < dpObjs.snapshotLength; i++) {
|
|
63
|
-
var obj = dpObjs.snapshotItem(i);
|
|
64
|
-
if ((obj === null || obj === void 0 ? void 0 : obj.nodeName) === 'line') {
|
|
65
|
-
dockingpointsSvgLine.push({
|
|
66
|
-
x1: Number(obj.getAttribute('x1')),
|
|
67
|
-
y1: Number(obj.getAttribute('y1')),
|
|
68
|
-
x2: Number(obj.getAttribute('x2')),
|
|
69
|
-
y2: Number(obj.getAttribute('y2')),
|
|
70
|
-
dockingName: obj.getAttribute('id'),
|
|
71
|
-
dockingType: obj.getAttribute('id').substring(0, 3)
|
|
72
|
-
});
|
|
73
|
-
} else {
|
|
74
|
-
throw new Error('nodename type: ' + obj.nodeName + ' not implemented');
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
dockingpointsSvgLine.sort(function (a, b) {
|
|
79
|
-
if (a.dockingType === 'AVL') return -1;
|
|
80
|
-
if (a.dockingType === 'AVR' && ['AVR', 'AVC', 'AVU', 'AVO', 'AVS', 'AVN'].includes(b.dockingType)) return -1;
|
|
81
|
-
return 0;
|
|
82
|
-
});
|
|
83
|
-
return dockingpointsSvgLine;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* This function returns the DPs of an svg
|
|
88
|
-
* @param content The svg with OLF and OLT
|
|
89
|
-
* @returns SVG with only OLT information
|
|
90
|
-
*/
|
|
91
|
-
}, {
|
|
92
|
-
key: "getPointOfPoligonById",
|
|
93
|
-
value: function getPointOfPoligonById(content, id) {
|
|
94
|
-
var points = [];
|
|
95
|
-
var xmlDocument = parseXml(content);
|
|
96
|
-
var dpObjs = xmlDocument.evaluate("//*[starts-with(@id,'" + id + "')]", xmlDocument, null, 7, null);
|
|
97
|
-
if (dpObjs.snapshotLength > 1 || dpObjs.snapshotLength == 0) return undefined;
|
|
98
|
-
for (var i = 0; i < dpObjs.snapshotLength; i++) {
|
|
99
|
-
var obj = dpObjs.snapshotItem(i);
|
|
100
|
-
if ((obj === null || obj === void 0 ? void 0 : obj.nodeName) === 'polygon') {
|
|
101
|
-
var pointsAsString = obj.getAttribute('points');
|
|
102
|
-
if (pointsAsString) {
|
|
103
|
-
var pointsFromString = pointsAsString.split(' ');
|
|
104
|
-
for (var j = 0; j < pointsFromString.length; j++) {
|
|
105
|
-
var xandY = pointsFromString[j].split(',');
|
|
106
|
-
if (xandY.length !== 2) continue;
|
|
107
|
-
points.push(new Vector2(Number(xandY[0]), Number(xandY[1])));
|
|
108
|
-
}
|
|
109
|
-
} else {
|
|
110
|
-
return undefined;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
return points;
|
|
115
|
-
}
|
|
116
|
-
}, {
|
|
117
|
-
key: "getBoundingBoxOfPoints",
|
|
118
|
-
value: function getBoundingBoxOfPoints(points) {
|
|
119
|
-
var xArr = points.map(function (c) {
|
|
120
|
-
return c.x;
|
|
121
|
-
});
|
|
122
|
-
var yArr = points.map(function (c) {
|
|
123
|
-
return c.y;
|
|
124
|
-
});
|
|
125
|
-
var minX = Math.min.apply(Math, _toConsumableArray(xArr));
|
|
126
|
-
var maxX = Math.max.apply(Math, _toConsumableArray(xArr));
|
|
127
|
-
var minY = Math.min.apply(Math, _toConsumableArray(yArr));
|
|
128
|
-
var maxY = Math.max.apply(Math, _toConsumableArray(yArr));
|
|
129
|
-
var width = maxX - minX;
|
|
130
|
-
var height = maxY - minY;
|
|
131
|
-
return {
|
|
132
|
-
width: width,
|
|
133
|
-
height: height,
|
|
134
|
-
minX: minX,
|
|
135
|
-
minY: minY
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Returns OLF geometry (minX, minY, width, height) from SVG - supports rect and polygon.
|
|
141
|
-
* Iterates through matches to find first rect/polygon (handles Illustrator group wrappers).
|
|
142
|
-
*/
|
|
143
|
-
}, {
|
|
144
|
-
key: "getOLFGeometryFromSvg",
|
|
145
|
-
value: function getOLFGeometryFromSvg(content) {
|
|
146
|
-
var xmlDocument = parseXml(content);
|
|
147
|
-
var olfObjs = xmlDocument.evaluate("//*[starts-with(@id,'OLF')]", xmlDocument, null, 7, null);
|
|
148
|
-
for (var i = 0; i < olfObjs.snapshotLength; i++) {
|
|
149
|
-
var obj = olfObjs.snapshotItem(i);
|
|
150
|
-
if ((obj === null || obj === void 0 ? void 0 : obj.nodeName) === 'rect') {
|
|
151
|
-
var _obj$getAttribute, _obj$getAttribute2, _obj$getAttribute3, _obj$getAttribute4;
|
|
152
|
-
var x = parseFloat((_obj$getAttribute = obj.getAttribute('x')) !== null && _obj$getAttribute !== void 0 ? _obj$getAttribute : '0');
|
|
153
|
-
var y = parseFloat((_obj$getAttribute2 = obj.getAttribute('y')) !== null && _obj$getAttribute2 !== void 0 ? _obj$getAttribute2 : '0');
|
|
154
|
-
var width = parseFloat((_obj$getAttribute3 = obj.getAttribute('width')) !== null && _obj$getAttribute3 !== void 0 ? _obj$getAttribute3 : '0');
|
|
155
|
-
var height = parseFloat((_obj$getAttribute4 = obj.getAttribute('height')) !== null && _obj$getAttribute4 !== void 0 ? _obj$getAttribute4 : '0');
|
|
156
|
-
return {
|
|
157
|
-
minX: x,
|
|
158
|
-
minY: y,
|
|
159
|
-
width: width,
|
|
160
|
-
height: height
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
if ((obj === null || obj === void 0 ? void 0 : obj.nodeName) === 'polygon') {
|
|
164
|
-
var pts = obj.getAttribute('points');
|
|
165
|
-
if (pts) {
|
|
166
|
-
var points = pts.split(/\s+/).reduce(function (acc, p) {
|
|
167
|
-
var _p$split = p.split(','),
|
|
168
|
-
_p$split2 = _slicedToArray(_p$split, 2),
|
|
169
|
-
x = _p$split2[0],
|
|
170
|
-
y = _p$split2[1];
|
|
171
|
-
if (x != null && y != null) acc.push(new Vector2(Number(x), Number(y)));
|
|
172
|
-
return acc;
|
|
173
|
-
}, []);
|
|
174
|
-
if (points.length) {
|
|
175
|
-
var bbox = this.getBoundingBoxOfPoints(points);
|
|
176
|
-
return {
|
|
177
|
-
minX: bbox.minX,
|
|
178
|
-
minY: bbox.minY,
|
|
179
|
-
width: bbox.width,
|
|
180
|
-
height: bbox.height
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
return undefined;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Returns OLT geometry (x, y, width, height) from SVG attributes - untransformed coords.
|
|
191
|
-
* Iterates through matches to find first rect/polygon (handles Illustrator group wrappers).
|
|
192
|
-
*/
|
|
193
|
-
}, {
|
|
194
|
-
key: "getOLTGeometryFromSvg",
|
|
195
|
-
value: function getOLTGeometryFromSvg(content) {
|
|
196
|
-
var xmlDocument = parseXml(content);
|
|
197
|
-
var oltObjs = xmlDocument.evaluate("//*[starts-with(@id,'OLT')]", xmlDocument, null, 7, null);
|
|
198
|
-
for (var i = 0; i < oltObjs.snapshotLength; i++) {
|
|
199
|
-
var obj = oltObjs.snapshotItem(i);
|
|
200
|
-
if ((obj === null || obj === void 0 ? void 0 : obj.nodeName) === 'rect') {
|
|
201
|
-
var _obj$getAttribute5, _obj$getAttribute6, _obj$getAttribute7, _obj$getAttribute8;
|
|
202
|
-
var x = parseFloat((_obj$getAttribute5 = obj.getAttribute('x')) !== null && _obj$getAttribute5 !== void 0 ? _obj$getAttribute5 : '0');
|
|
203
|
-
var y = parseFloat((_obj$getAttribute6 = obj.getAttribute('y')) !== null && _obj$getAttribute6 !== void 0 ? _obj$getAttribute6 : '0');
|
|
204
|
-
var width = parseFloat((_obj$getAttribute7 = obj.getAttribute('width')) !== null && _obj$getAttribute7 !== void 0 ? _obj$getAttribute7 : '0');
|
|
205
|
-
var height = parseFloat((_obj$getAttribute8 = obj.getAttribute('height')) !== null && _obj$getAttribute8 !== void 0 ? _obj$getAttribute8 : '0');
|
|
206
|
-
return {
|
|
207
|
-
x: x,
|
|
208
|
-
y: y,
|
|
209
|
-
width: width,
|
|
210
|
-
height: height
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
if ((obj === null || obj === void 0 ? void 0 : obj.nodeName) === 'polygon') {
|
|
214
|
-
var pts = obj.getAttribute('points');
|
|
215
|
-
if (pts) {
|
|
216
|
-
var points = pts.split(/\s+/).reduce(function (acc, p) {
|
|
217
|
-
var _p$split3 = p.split(','),
|
|
218
|
-
_p$split4 = _slicedToArray(_p$split3, 2),
|
|
219
|
-
x = _p$split4[0],
|
|
220
|
-
y = _p$split4[1];
|
|
221
|
-
if (x != null && y != null) acc.push(new Vector2(Number(x), Number(y)));
|
|
222
|
-
return acc;
|
|
223
|
-
}, []);
|
|
224
|
-
if (points.length) {
|
|
225
|
-
var bbox = this.getBoundingBoxOfPoints(points);
|
|
226
|
-
return {
|
|
227
|
-
x: bbox.minX,
|
|
228
|
-
y: bbox.minY,
|
|
229
|
-
width: bbox.width,
|
|
230
|
-
height: bbox.height
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
return undefined;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* This function looks if the svg has a Mask HTML element. If so it removes all masks from SVG
|
|
241
|
-
* @param content
|
|
242
|
-
*/
|
|
243
|
-
}, {
|
|
244
|
-
key: "removeMaskFromSvg",
|
|
245
|
-
value: function removeMaskFromSvg(content) {
|
|
246
|
-
return removeMask(content);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* Stretches the SVG to the target OLT size and passes the result to the callback.
|
|
251
|
-
* @param svgSourceUrl optional URL / path of the loaded SVG for diagnostics
|
|
252
|
-
*/
|
|
253
|
-
}, {
|
|
254
|
-
key: "ccCheckStretchAreas",
|
|
255
|
-
value: function ccCheckStretchAreas(content, newWidthCM, newHeightCM, useglobalSvgScale, svgMinBorderXVal, svgMinBorderYVal, callback, svgSourceUrl) {
|
|
256
|
-
var result = stretchArticleSvg(content, newWidthCM, newHeightCM, {
|
|
257
|
-
useGlobalScale: useglobalSvgScale,
|
|
258
|
-
minBorderX: svgMinBorderXVal,
|
|
259
|
-
minBorderY: svgMinBorderYVal
|
|
260
|
-
});
|
|
261
|
-
var _iterator = _createForOfIteratorHelper(result.warnings),
|
|
262
|
-
_step;
|
|
263
|
-
try {
|
|
264
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
265
|
-
var warning = _step.value;
|
|
266
|
-
LOG$1.warn('[SVGUtils] ccCheckStretchAreas: ' + warning + (svgSourceUrl ? ' (svg: ' + svgSourceUrl + ')' : ''));
|
|
267
|
-
}
|
|
268
|
-
} catch (err) {
|
|
269
|
-
_iterator.e(err);
|
|
270
|
-
} finally {
|
|
271
|
-
_iterator.f();
|
|
272
|
-
}
|
|
273
|
-
callback(result.svg);
|
|
274
|
-
return result.sizes;
|
|
275
|
-
}
|
|
276
|
-
}]);
|
|
277
|
-
}();
|
|
11
|
+
import { DockingPointHandler as DockingPointHandler$1, polygonEdgesIntersect, polygonInsidePolygon, getOlfGeometry, getOltGeometry, getRootSize, getMinBorder } from '@crystaldesign/planner-2d-core';
|
|
12
|
+
import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
|
|
278
13
|
|
|
279
14
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
280
15
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
2
2
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
3
3
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
|
-
import { s as summaryHandlerInstance } from './index-
|
|
4
|
+
import { s as summaryHandlerInstance } from './index-16d95e66.js';
|
|
5
5
|
import DivaUtils from '@crystaldesign/diva-utils';
|
|
6
6
|
import '@babel/runtime/helpers/slicedToArray';
|
|
7
7
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
@@ -9,6 +9,7 @@ import '@babel/runtime/regenerator';
|
|
|
9
9
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
10
10
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
11
11
|
import 'axios';
|
|
12
|
+
import '@crystaldesign/planner-2d-core';
|
|
12
13
|
import '@crystaldesign/basket-model';
|
|
13
14
|
import '@babel/runtime/helpers/typeof';
|
|
14
15
|
import 'fast-xml-parser';
|
|
@@ -18,7 +19,6 @@ import '@babel/runtime/helpers/inherits';
|
|
|
18
19
|
import '@babel/runtime/helpers/wrapNativeSuper';
|
|
19
20
|
import '@crystaldesign/basket-handler';
|
|
20
21
|
import 'socket.io-client';
|
|
21
|
-
import '@crystaldesign/planner-2d-core';
|
|
22
22
|
|
|
23
23
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
24
24
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -4,11 +4,12 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
|
4
4
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
5
5
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
6
6
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
7
|
-
import { G as Grid, a as articleHandlerInstance, b as setHandlerInstance } from './index-
|
|
7
|
+
import { G as Grid, a as articleHandlerInstance, b as setHandlerInstance } from './index-16d95e66.js';
|
|
8
8
|
import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
|
|
9
9
|
import '@babel/runtime/helpers/slicedToArray';
|
|
10
10
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
11
11
|
import 'axios';
|
|
12
|
+
import '@crystaldesign/planner-2d-core';
|
|
12
13
|
import '@crystaldesign/basket-model';
|
|
13
14
|
import '@babel/runtime/helpers/typeof';
|
|
14
15
|
import 'fast-xml-parser';
|
|
@@ -18,7 +19,6 @@ import '@babel/runtime/helpers/inherits';
|
|
|
18
19
|
import '@babel/runtime/helpers/wrapNativeSuper';
|
|
19
20
|
import '@crystaldesign/basket-handler';
|
|
20
21
|
import 'socket.io-client';
|
|
21
|
-
import '@crystaldesign/planner-2d-core';
|
|
22
22
|
|
|
23
23
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24
24
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
2
2
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
3
|
-
import './index-
|
|
3
|
+
import './index-16d95e66.js';
|
|
4
4
|
import '@babel/runtime/helpers/slicedToArray';
|
|
5
5
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
6
6
|
import '@babel/runtime/helpers/defineProperty';
|
|
@@ -9,6 +9,7 @@ import '@babel/runtime/helpers/objectWithoutProperties';
|
|
|
9
9
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
10
10
|
import 'axios';
|
|
11
11
|
import '@crystaldesign/diva-utils';
|
|
12
|
+
import '@crystaldesign/planner-2d-core';
|
|
12
13
|
import '@crystaldesign/basket-model';
|
|
13
14
|
import '@babel/runtime/helpers/typeof';
|
|
14
15
|
import 'fast-xml-parser';
|
|
@@ -18,7 +19,6 @@ import '@babel/runtime/helpers/inherits';
|
|
|
18
19
|
import '@babel/runtime/helpers/wrapNativeSuper';
|
|
19
20
|
import '@crystaldesign/basket-handler';
|
|
20
21
|
import 'socket.io-client';
|
|
21
|
-
import '@crystaldesign/planner-2d-core';
|
|
22
22
|
|
|
23
23
|
//Der in einem Set gemergte Optionsbaum
|
|
24
24
|
var StandardWWSHandler = /*#__PURE__*/function () {
|