@crystaldesign/web-planner-logic 26.12.0-beta.9 → 26.13.0-beta.1
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-fe9a6f30.js → DivaBoxPlanner-5e930cef.js} +3 -3
- package/build/cjs/{DivaStandardPlanner-cec12683.js → DivaStandardPlanner-9b10f74c.js} +13 -9
- package/build/cjs/{DoorPlanner-4cd5b7af.js → DoorPlanner-3c74f8e1.js} +2 -2
- package/build/cjs/{Host3DSignalR-2d2aff4d.js → Host3DSignalR-2ba0c49a.js} +2 -2
- package/build/cjs/{LiviqueWWSHandler-390f5a87.js → LiviqueWWSHandler-a4230440.js} +2 -2
- package/build/cjs/{PfisterWWSHandler-a0415f81.js → PfisterWWSHandler-2d41405a.js} +2 -2
- package/build/cjs/{PlannerHandler2D-125c6e26.js → PlannerHandler2D-97dff60d.js} +32 -287
- package/build/cjs/{SeriousBasketHandler-63bda08b.js → SeriousBasketHandler-a5c22844.js} +7 -25
- package/build/cjs/{ShelfPlanner-364467bf.js → ShelfPlanner-b30f8c39.js} +105 -77
- package/build/cjs/{StandardWWSHandler-42a1b294.js → StandardWWSHandler-40c2a2e8.js} +2 -2
- package/build/cjs/{index-de644684.js → index-70f9ba19.js} +2722 -1696
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-b273b119.js → DivaBoxPlanner-87010599.js} +3 -3
- package/build/esm/{DivaStandardPlanner-3f121fa7.js → DivaStandardPlanner-f5f47d3b.js} +13 -9
- package/build/esm/{DoorPlanner-39f70636.js → DoorPlanner-fb5b9eb2.js} +2 -2
- package/build/esm/{Host3DSignalR-04417d51.js → Host3DSignalR-d316eb88.js} +2 -2
- package/build/esm/{LiviqueWWSHandler-63115663.js → LiviqueWWSHandler-2a135ba1.js} +2 -2
- package/build/esm/{PfisterWWSHandler-649e67e3.js → PfisterWWSHandler-e7d55634.js} +2 -2
- package/build/esm/PlannerHandler2D-288e724b.js +273 -0
- package/build/esm/{SeriousBasketHandler-023d626c.js → SeriousBasketHandler-60cbf854.js} +7 -25
- package/build/esm/{ShelfPlanner-dff465f0.js → ShelfPlanner-f3a02665.js} +105 -77
- package/build/esm/{StandardWWSHandler-44506b3a.js → StandardWWSHandler-eb1ba4cf.js} +2 -2
- package/build/esm/{index-111ce9ad.js → index-9eba9def.js} +2722 -1697
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/headless/headlessSession.d.ts +20 -0
- package/build/types/web-planner-logic/src/headless/headlessSession.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/AccessoireItemType.d.ts +4 -0
- package/build/types/web-planner-logic/src/interface/Articles/AccessoireItemType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/ConfiguratorStructureDataType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/ConfiguratorStructureDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts +4 -0
- package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/IDM/PriceFeatureGroup.d.ts +1 -21
- package/build/types/web-planner-logic/src/interface/IDM/PriceFeatureGroup.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +5 -5
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +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/interface/Planner/PlannerDataType.d.ts +2 -0
- package/build/types/web-planner-logic/src/interface/Planner/PlannerDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts +8 -2
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +1 -0
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +7 -2
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +10 -3
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts +7 -8
- package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/mandatoryAccessories.d.ts +4 -0
- package/build/types/web-planner-logic/src/logic/Article/mandatoryAccessories.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Article/measureUnit.d.ts +5 -0
- package/build/types/web-planner-logic/src/logic/Article/measureUnit.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts +2 -2
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.d.ts +0 -8
- package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts +5 -2
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts +9 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts +6 -3
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.d.ts +7 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/PlannerHandler2D.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/SVGUtils.d.ts +13 -2
- 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 +2 -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/CatalogArticleData.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 +16 -1
- 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/Catalog/CatalogData.d.ts +1 -0
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/DivaCatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/IDMCatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts +4 -4
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts +2 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts +4 -4
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts +4 -1
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts +5 -2
- package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Properties/propertySchemaRegistry.d.ts +3 -3
- package/build/types/web-planner-logic/src/model/Properties/propertySchemaRegistry.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Properties/propertyValueCodec.d.ts +7 -2
- package/build/types/web-planner-logic/src/model/Properties/propertyValueCodec.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/accessorySvgSwapDocking.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/accessorySvgSwapDocking.test.d.ts.map +1 -0
- 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/build/types/web-planner-logic/src/test/idmMeasureUnit.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/idmMeasureUnit.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/propertyValueCodec.test.d.ts +1 -1
- package/build/types/web-planner-logic/src/test/propertyValueCodec.test.d.ts.map +1 -1
- package/package.json +3 -3
- package/build/esm/PlannerHandler2D-15b3d672.js +0 -526
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-70f9ba19.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-9eba9def.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-288e724b.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-9eba9def.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-288e724b.js';
|
|
11
11
|
import '@babel/runtime/helpers/slicedToArray';
|
|
12
12
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
13
13
|
import 'axios';
|
|
@@ -878,21 +878,25 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
878
878
|
return a.WorldPosCorner.x < b.WorldPosCorner.x ? 1 : 0;
|
|
879
879
|
});
|
|
880
880
|
var groupElements = [];
|
|
881
|
+
var removeFromElementsToAdd = function removeFromElementsToAdd(elementId) {
|
|
882
|
+
var index = elementsToAdd.indexOf(elementId);
|
|
883
|
+
if (index >= 0) elementsToAdd.splice(index, 1);
|
|
884
|
+
};
|
|
881
885
|
|
|
882
886
|
//Create groups for all chains
|
|
883
887
|
for (var i = 0; i < startChainElements.length; i++) {
|
|
884
888
|
var startChainElement = startChainElements[i];
|
|
885
889
|
var group = [];
|
|
886
|
-
|
|
890
|
+
removeFromElementsToAdd(startChainElement.getElementId());
|
|
887
891
|
var groupIsFinished = false;
|
|
888
892
|
var curElementInGroup = startChainElement;
|
|
889
893
|
while (!groupIsFinished) {
|
|
890
894
|
group.push(curElementInGroup.getElementId());
|
|
891
|
-
|
|
895
|
+
removeFromElementsToAdd(curElementInGroup.getElementId());
|
|
892
896
|
var accsOfElement = this.getAccessoiresRecursive(curElementInGroup.getElementId());
|
|
893
897
|
for (var j = 0; j < accsOfElement.length; j++) {
|
|
894
898
|
group.push(accsOfElement[j]);
|
|
895
|
-
|
|
899
|
+
removeFromElementsToAdd(accsOfElement[j]);
|
|
896
900
|
}
|
|
897
901
|
var AVRElements = this.getNeighborElements(curElementInGroup.getElementId(), 'AVR');
|
|
898
902
|
if (!AVRElements || AVRElements.length == 0) groupIsFinished = true;else curElementInGroup = this.plannerElements.get(AVRElements[0]);
|
|
@@ -1014,7 +1018,7 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
1014
1018
|
key: "extendPlanner",
|
|
1015
1019
|
value: (function () {
|
|
1016
1020
|
var _extendPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(setPlanData, globalBoundingBox) {
|
|
1017
|
-
var planData, jsonElements, elementsSortedbyPosNr, accElements, oldElementidMapping, i, _saveElementArticleCo, _jsonElement$Accessoi, jsonElement, catalogArticle, plannerElement, data, elementsForDockingExtend, row, curElement, DPsInfo, j, dpInfo, sourceDP, targetElement, targetDP;
|
|
1021
|
+
var planData, jsonElements, elementsSortedbyPosNr, accElements, oldElementidMapping, i, _this$set$getArticleB, _this$set$getArticleB2, _saveElementArticleCo, _jsonElement$Accessoi, jsonElement, catalogArticle, plannerElement, data, elementsForDockingExtend, row, curElement, DPsInfo, j, dpInfo, sourceDP, targetElement, targetDP;
|
|
1018
1022
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
1019
1023
|
while (1) switch (_context5.prev = _context5.next) {
|
|
1020
1024
|
case 0:
|
|
@@ -1035,7 +1039,7 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
1035
1039
|
}
|
|
1036
1040
|
_context5.prev = 8;
|
|
1037
1041
|
jsonElement = jsonElements[i];
|
|
1038
|
-
catalogArticle = this.set.CatalogData.getCatalogArticleByArticleCodex((_saveElementArticleCo = saveElementArticleCodex(jsonElement)) !== null && _saveElementArticleCo !== void 0 ? _saveElementArticleCo : '');
|
|
1042
|
+
catalogArticle = (_this$set$getArticleB = (_this$set$getArticleB2 = this.set.getArticleByBasketId(jsonElement.basketID)) === null || _this$set$getArticleB2 === void 0 ? void 0 : _this$set$getArticleB2.catalogArticle) !== null && _this$set$getArticleB !== void 0 ? _this$set$getArticleB : this.set.CatalogData.getCatalogArticleByArticleCodex((_saveElementArticleCo = saveElementArticleCodex(jsonElement)) !== null && _saveElementArticleCo !== void 0 ? _saveElementArticleCo : '');
|
|
1039
1043
|
if (!(!catalogArticle && (_jsonElement$Accessoi = jsonElement.AccessoireInitParams) !== null && _jsonElement$Accessoi !== void 0 && _jsonElement$Accessoi.RelatedToBasketID && !this.set.getSetState.onlyRunLogic)) {
|
|
1040
1044
|
_context5.next = 14;
|
|
1041
1045
|
break;
|
|
@@ -1125,7 +1129,7 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
1125
1129
|
key: "initPlanner",
|
|
1126
1130
|
value: function () {
|
|
1127
1131
|
var _initPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(setPlanData) {
|
|
1128
|
-
var planData, _planData$set, jsonElements, elementsSortedbyPosNr, accElements, i, _saveElementArticleCo2, _jsonElement$Accessoi2, jsonElement, catalogArticle, elementID, plannerElement, data, onlyOneBaseElement, elementsForDocking, row, _jsonElement, hasSavedPos, element, DPsInfo, j, dpInfo, sourceElement, sourceDP, targetElement, targetDP, alreadyDocked, docked, _elementsForDocking$i, elementId, _planData$Sets, _legacySet$Elements, legacySet, _jsonElements, _elementsSortedbyPosNr, _accElements, _saveElementArticleCo3, _jsonElement2$Accesso, _jsonElement2, _catalogArticle, basketID, _elementId, _plannerElement, _data, centerWorldPos, parentPosNr, accPosNr, elementsForDockingV1, _row, _DPsInfo, _dpInfo, _this$plannerElements, targetElementId, dpType, curElement, _targetElement, anchorElement;
|
|
1132
|
+
var planData, _planData$set, jsonElements, elementsSortedbyPosNr, accElements, i, _this$set$getArticleB3, _this$set$getArticleB4, _saveElementArticleCo2, _jsonElement$Accessoi2, jsonElement, catalogArticle, elementID, plannerElement, data, onlyOneBaseElement, elementsForDocking, row, _jsonElement, hasSavedPos, element, DPsInfo, j, dpInfo, sourceElement, sourceDP, targetElement, targetDP, alreadyDocked, docked, _elementsForDocking$i, elementId, _planData$Sets, _legacySet$Elements, legacySet, _jsonElements, _elementsSortedbyPosNr, _accElements, _saveElementArticleCo3, _jsonElement2$Accesso, _jsonElement2, _catalogArticle, basketID, _elementId, _plannerElement, _data, centerWorldPos, parentPosNr, accPosNr, elementsForDockingV1, _row, _DPsInfo, _dpInfo, _this$plannerElements, targetElementId, dpType, curElement, _targetElement, anchorElement;
|
|
1129
1133
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
1130
1134
|
while (1) switch (_context6.prev = _context6.next) {
|
|
1131
1135
|
case 0:
|
|
@@ -1152,7 +1156,7 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
1152
1156
|
}
|
|
1153
1157
|
_context6.prev = 10;
|
|
1154
1158
|
jsonElement = jsonElements[i];
|
|
1155
|
-
catalogArticle = this.set.CatalogData.getCatalogArticleByArticleCodex((_saveElementArticleCo2 = saveElementArticleCodex(jsonElement)) !== null && _saveElementArticleCo2 !== void 0 ? _saveElementArticleCo2 : '');
|
|
1159
|
+
catalogArticle = (_this$set$getArticleB3 = (_this$set$getArticleB4 = this.set.getArticleByBasketId(jsonElement.basketID)) === null || _this$set$getArticleB4 === void 0 ? void 0 : _this$set$getArticleB4.catalogArticle) !== null && _this$set$getArticleB3 !== void 0 ? _this$set$getArticleB3 : this.set.CatalogData.getCatalogArticleByArticleCodex((_saveElementArticleCo2 = saveElementArticleCodex(jsonElement)) !== null && _saveElementArticleCo2 !== void 0 ? _saveElementArticleCo2 : '');
|
|
1156
1160
|
if (!(!catalogArticle && (_jsonElement$Accessoi2 = jsonElement.AccessoireInitParams) !== null && _jsonElement$Accessoi2 !== void 0 && _jsonElement$Accessoi2.RelatedToBasketID && !this.set.getSetState.onlyRunLogic)) {
|
|
1157
1161
|
_context6.next = 16;
|
|
1158
1162
|
break;
|
|
@@ -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-9eba9def.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-9eba9def.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-9eba9def.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-9eba9def.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
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
2
|
+
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
3
|
+
import _createClass from '@babel/runtime/helpers/createClass';
|
|
4
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
5
|
+
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
6
|
+
import { c as Vector2, S as SVGUtils } from './index-9eba9def.js';
|
|
7
|
+
import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
|
|
8
|
+
import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
|
|
9
|
+
import _get from '@babel/runtime/helpers/get';
|
|
10
|
+
import _inherits from '@babel/runtime/helpers/inherits';
|
|
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';
|
|
13
|
+
|
|
14
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
15
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
16
|
+
function _superPropGet(t, e, o, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), e, o); return 2 & r && "function" == typeof p ? function (t) { return p.apply(o, t); } : p; }
|
|
17
|
+
|
|
18
|
+
/** Legacy minBorder parameter shape still used by this package's callers. */
|
|
19
|
+
/** Docking point handler that additionally accepts the legacy minBorder shape. */
|
|
20
|
+
var DockingPointHandler = /*#__PURE__*/function (_CoreDockingPointHand) {
|
|
21
|
+
function DockingPointHandler() {
|
|
22
|
+
_classCallCheck(this, DockingPointHandler);
|
|
23
|
+
return _callSuper(this, DockingPointHandler, arguments);
|
|
24
|
+
}
|
|
25
|
+
_inherits(DockingPointHandler, _CoreDockingPointHand);
|
|
26
|
+
return _createClass(DockingPointHandler, [{
|
|
27
|
+
key: "initDockingPointsFromSvg",
|
|
28
|
+
value: function initDockingPointsFromSvg(plannerElement, dockingVectors, minBorder, plannerConfig) {
|
|
29
|
+
var normalized = 'minX' in minBorder ? minBorder : {
|
|
30
|
+
minX: minBorder.svgMinXVal,
|
|
31
|
+
minY: minBorder.svgMinYVal
|
|
32
|
+
};
|
|
33
|
+
_superPropGet(DockingPointHandler, "initDockingPointsFromSvg", this, 3)([plannerElement, dockingVectors, normalized, plannerConfig]);
|
|
34
|
+
}
|
|
35
|
+
}]);
|
|
36
|
+
}(DockingPointHandler$1);
|
|
37
|
+
var dockingPointHandlerInst = new DockingPointHandler();
|
|
38
|
+
|
|
39
|
+
var LOG = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Loads and parses the article SVGs of planner elements and computes element collisions.
|
|
43
|
+
* Runs headless; the fabric shapes for the visible 2D canvas are built by the render layer from SvgData.
|
|
44
|
+
*/
|
|
45
|
+
var PlannerHandler2D = /*#__PURE__*/function () {
|
|
46
|
+
function PlannerHandler2D() {
|
|
47
|
+
_classCallCheck(this, PlannerHandler2D);
|
|
48
|
+
_defineProperty(this, "svgUtils", void 0);
|
|
49
|
+
this.svgUtils = new SVGUtils();
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* This function computes the collision between two elements.
|
|
53
|
+
* First it computes the collision with the bounding box. Only if these collide - we compute the collision between the OLF Polygons
|
|
54
|
+
* @param element1
|
|
55
|
+
* @param element2
|
|
56
|
+
*/
|
|
57
|
+
return _createClass(PlannerHandler2D, [{
|
|
58
|
+
key: "checkCollision",
|
|
59
|
+
value: function checkCollision(element1, element2, checkCollisionForDifferentLayers) {
|
|
60
|
+
DivaUtils.startSpanOfApm('PlannerHandler2D checkCollision');
|
|
61
|
+
if (element1.Layer != element2.Layer && (!checkCollisionForDifferentLayers.includes(Number(element1.Layer)) || !checkCollisionForDifferentLayers.includes(Number(element2.Layer)))) {
|
|
62
|
+
DivaUtils.endSpanOfApm('PlannerHandler2D checkCollision');
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
var bboxPoints1 = element1.getWorld2DBBoxOutline();
|
|
66
|
+
var bboxPoints2 = element2.getWorld2DBBoxOutline();
|
|
67
|
+
if (polygonEdgesIntersect(bboxPoints1, bboxPoints2)) {
|
|
68
|
+
if (!element1.HasOLTPolygon && !element1.HasOLFPolygon) {
|
|
69
|
+
LOG.error(new DivaError('checkCollision PlannerHandler2D - The element with id: ' + element1.getElementId() + ' has no OLT AND no OLF', {
|
|
70
|
+
code: 'WC_0012'
|
|
71
|
+
}));
|
|
72
|
+
DivaUtils.endSpanOfApm('PlannerHandler2D checkCollision');
|
|
73
|
+
return false;
|
|
74
|
+
} else if (!element2.HasOLTPolygon && !element2.HasOLFPolygon) {
|
|
75
|
+
LOG.error(new DivaError('checkCollision PlannerHandler2D - The element with id: ' + element2.getElementId() + ' has no OLT AND no OLF', {
|
|
76
|
+
code: 'WC_0012'
|
|
77
|
+
}));
|
|
78
|
+
DivaUtils.endSpanOfApm('PlannerHandler2D checkCollision');
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
var detailPolygon1 = element1.HasOLFPolygon ? element1.getOLFPolygonWorldPos() : element1.getOLTPolygonWorldPos();
|
|
82
|
+
var detailPolygon2 = element2.HasOLFPolygon ? element2.getOLFPolygonWorldPos() : element2.getOLTPolygonWorldPos();
|
|
83
|
+
DivaUtils.endSpanOfApm('PlannerHandler2D checkCollision');
|
|
84
|
+
return polygonEdgesIntersect(detailPolygon1, detailPolygon2);
|
|
85
|
+
} else {
|
|
86
|
+
DivaUtils.endSpanOfApm('PlannerHandler2D checkCollision');
|
|
87
|
+
return polygonInsidePolygon(bboxPoints1, bboxPoints2); //wenn sie sich nicht überschneiden untersuche, ob ein Polygon genau innerhalb des anderen liegt
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}, {
|
|
91
|
+
key: "parseSvg",
|
|
92
|
+
value: function parseSvg(plannerElement, svgXml, minBorderSVG, plannerconfig, sizes) {
|
|
93
|
+
var _oltGeo$width, _oltGeo$height;
|
|
94
|
+
svgXml = this.svgUtils.removeMaskFromSvg(svgXml); //Correct mask attributes
|
|
95
|
+
dockingPointHandlerInst.initDockingPointsFromSvg(plannerElement, this.svgUtils.getDPsInSVG(svgXml), minBorderSVG, plannerconfig);
|
|
96
|
+
var oltPoints = this.svgUtils.getPointOfPoligonById(svgXml, 'OLT');
|
|
97
|
+
if (!(oltPoints !== null && oltPoints !== void 0 && oltPoints.length)) {
|
|
98
|
+
LOG.warn('no olt fount in svg for element' + plannerElement.ArticleCodex + ' with id ' + plannerElement.getElementId());
|
|
99
|
+
}
|
|
100
|
+
plannerElement.OLTPolygon = oltPoints;
|
|
101
|
+
var olf = this.svgUtils.getPointOfPoligonById(svgXml, 'OLF');
|
|
102
|
+
var olfGeo = getOlfGeometry(svgXml);
|
|
103
|
+
if (olf !== null && olf !== void 0 && olf.length) {
|
|
104
|
+
var _olfGeo$width, _olfGeo$height;
|
|
105
|
+
var olfBBox = this.svgUtils.getBoundingBoxOfPoints(olf);
|
|
106
|
+
// Prefer getOlfGeometry for dims - single source of truth, handles split(/\s+/) correctly
|
|
107
|
+
var olfW = (_olfGeo$width = olfGeo === null || olfGeo === void 0 ? void 0 : olfGeo.width) !== null && _olfGeo$width !== void 0 ? _olfGeo$width : olfBBox.width;
|
|
108
|
+
var olfD = (_olfGeo$height = olfGeo === null || olfGeo === void 0 ? void 0 : olfGeo.height) !== null && _olfGeo$height !== void 0 ? _olfGeo$height : olfBBox.height;
|
|
109
|
+
plannerElement.setupOLF(olf, olfW, olfD);
|
|
110
|
+
} else {
|
|
111
|
+
if (olfGeo) {
|
|
112
|
+
var olfRectPoints = [new Vector2(olfGeo.minX, olfGeo.minY), new Vector2(olfGeo.minX + olfGeo.width, olfGeo.minY), new Vector2(olfGeo.minX + olfGeo.width, olfGeo.minY + olfGeo.height), new Vector2(olfGeo.minX, olfGeo.minY + olfGeo.height)];
|
|
113
|
+
plannerElement.setupOLF(olfRectPoints, olfGeo.width, olfGeo.height);
|
|
114
|
+
} else if (sizes !== null && sizes !== void 0 && sizes.heightOLF, sizes !== null && sizes !== void 0 && sizes.widthOLF) {
|
|
115
|
+
plannerElement.setupOLF(olf, sizes === null || sizes === void 0 ? void 0 : sizes.widthOLF, sizes === null || sizes === void 0 ? void 0 : sizes.heightOLF);
|
|
116
|
+
} else {
|
|
117
|
+
plannerElement.clearOLF();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Assign unconditionally: parseSvg re-runs per measure change, so keeping the previous SVG's OLT box would offset docked neighbours.
|
|
122
|
+
var oltGeo = getOltGeometry(svgXml);
|
|
123
|
+
plannerElement.OLTWidth = (_oltGeo$width = oltGeo === null || oltGeo === void 0 ? void 0 : oltGeo.width) !== null && _oltGeo$width !== void 0 ? _oltGeo$width : 0;
|
|
124
|
+
plannerElement.OLTDepth = (_oltGeo$height = oltGeo === null || oltGeo === void 0 ? void 0 : oltGeo.height) !== null && _oltGeo$height !== void 0 ? _oltGeo$height : 0;
|
|
125
|
+
plannerElement.OLTLeft = oltGeo && olfGeo ? oltGeo.x - olfGeo.minX : 0;
|
|
126
|
+
plannerElement.OLTTop = oltGeo && olfGeo ? oltGeo.y - olfGeo.minY : 0;
|
|
127
|
+
if (plannerElement.DoSetWidthFromSVG || plannerElement.DoSetDepthFromSVG) {
|
|
128
|
+
// The ROOT size, not the ink bounds: an article whose drawing does not fill its canvas must still report the canvas size.
|
|
129
|
+
var rootSize = getRootSize(svgXml);
|
|
130
|
+
if (plannerElement.DoSetWidthFromSVG && rootSize !== null && rootSize !== void 0 && rootSize.width) plannerElement.WidthFromSVG = rootSize.width / DivaUtils.UnitRecalc;
|
|
131
|
+
// since the svg is always top down perspective height in 2D represents depth in 2D planner and 3D
|
|
132
|
+
if (plannerElement.DoSetDepthFromSVG && rootSize !== null && rootSize !== void 0 && rootSize.height) plannerElement.DepthFromSVG = rootSize.height / DivaUtils.UnitRecalc;
|
|
133
|
+
}
|
|
134
|
+
plannerElement.SvgData = svgXml;
|
|
135
|
+
// Clearing marks the shapes stale - the render layer rebuilds them from SvgData.
|
|
136
|
+
plannerElement.cleanShapeOLF2D();
|
|
137
|
+
plannerElement.cleanShapeOLT2D();
|
|
138
|
+
}
|
|
139
|
+
}, {
|
|
140
|
+
key: "getMinBorderSVG",
|
|
141
|
+
value: function getMinBorderSVG(svgXml) {
|
|
142
|
+
var minBorder = getMinBorder(svgXml);
|
|
143
|
+
return {
|
|
144
|
+
svgMinXVal: minBorder.minX,
|
|
145
|
+
svgMinYVal: minBorder.minY
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
/*
|
|
149
|
+
This function is used to load the SVG of the element and set everything up.
|
|
150
|
+
*/
|
|
151
|
+
}, {
|
|
152
|
+
key: "loadSVG",
|
|
153
|
+
value: (function () {
|
|
154
|
+
var _loadSVG = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(plannerElement, set) {
|
|
155
|
+
var _plannerElement$Heigh,
|
|
156
|
+
_this = this;
|
|
157
|
+
var svgFile, svgContentXML, svgContent, result, svgNewWidth, svgNewDepth, sizes, doStretch, minBoderSVG, svgSourceUrl, correctedContent;
|
|
158
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
159
|
+
while (1) switch (_context.prev = _context.next) {
|
|
160
|
+
case 0:
|
|
161
|
+
svgFile = plannerElement.SvgFileName;
|
|
162
|
+
if (svgFile) {
|
|
163
|
+
_context.next = 3;
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
return _context.abrupt("return", false);
|
|
167
|
+
case 3:
|
|
168
|
+
if (!set.CatalogData.isIDMFormat) {
|
|
169
|
+
_context.next = 9;
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
_context.next = 6;
|
|
173
|
+
return set.api.fetchData(svgFile, {
|
|
174
|
+
method: 'GET',
|
|
175
|
+
config: {},
|
|
176
|
+
data: {}
|
|
177
|
+
});
|
|
178
|
+
case 6:
|
|
179
|
+
svgContentXML = _context.sent;
|
|
180
|
+
_context.next = 16;
|
|
181
|
+
break;
|
|
182
|
+
case 9:
|
|
183
|
+
_context.next = 11;
|
|
184
|
+
return set.api.getDataCache(this.getSVGUrl(svgFile, set.CatalogData.mediaUrl), undefined, set.CatalogData.accountSessionGuid);
|
|
185
|
+
case 11:
|
|
186
|
+
result = _context.sent;
|
|
187
|
+
if (!result.Error) {
|
|
188
|
+
_context.next = 14;
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
throw new Error(result.Error);
|
|
192
|
+
case 14:
|
|
193
|
+
if (result.Result.toLowerCase() == 'success') {
|
|
194
|
+
svgContent = result.Content;
|
|
195
|
+
}
|
|
196
|
+
svgContentXML = DivaUtils.decodeBase64(svgContent);
|
|
197
|
+
case 16:
|
|
198
|
+
if (!svgContentXML) {
|
|
199
|
+
LOG.error(new DivaError('Fehler beim laden des SVGs ', {
|
|
200
|
+
code: 'WC_0009',
|
|
201
|
+
custom: {
|
|
202
|
+
svgFile: svgFile
|
|
203
|
+
}
|
|
204
|
+
}));
|
|
205
|
+
}
|
|
206
|
+
plannerElement.svgBefore = svgContentXML;
|
|
207
|
+
// a size the element derived from its svg is no measure: that axis keeps the drawing - stretching its OLT to the
|
|
208
|
+
// canvas size would inflate an accessory whose canvas has a margin for its AV lines
|
|
209
|
+
svgNewWidth = plannerElement.DoSetWidthFromSVG ? undefined : plannerElement.Width;
|
|
210
|
+
svgNewDepth = plannerElement.DoSetDepthFromSVG ? undefined : plannerElement.Depth;
|
|
211
|
+
//fix for "kissen" that didnt had a depth but do have a height https://app.asana.com/0/1201426433314773/1201432109700389
|
|
212
|
+
if (svgNewDepth == undefined && svgNewWidth != undefined && ((_plannerElement$Heigh = plannerElement.Height) !== null && _plannerElement$Heigh !== void 0 ? _plannerElement$Heigh : -1) > 0) svgNewDepth = plannerElement.Height;
|
|
213
|
+
|
|
214
|
+
// outside IDM only both measures stretch, as before - one measure would distort a globally scaled Diva svg
|
|
215
|
+
doStretch = set.CatalogData.isIDMFormat ? svgNewWidth != undefined || svgNewDepth != undefined : svgNewWidth != undefined && svgNewDepth != undefined;
|
|
216
|
+
if (!doStretch) {
|
|
217
|
+
_context.next = 32;
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
minBoderSVG = this.getMinBorderSVG(svgContentXML);
|
|
221
|
+
svgSourceUrl = set.CatalogData.isIDMFormat ? svgFile : "".concat(set.CatalogData.mediaUrl, "pln_").concat(svgFile);
|
|
222
|
+
correctedContent = '';
|
|
223
|
+
_context.next = 28;
|
|
224
|
+
return new Promise(function (resolve, reject) {
|
|
225
|
+
var _svgNewDepth;
|
|
226
|
+
sizes = _this.svgUtils.ccCheckStretchAreas(svgContentXML, svgNewWidth !== null && svgNewWidth !== void 0 ? svgNewWidth : 0, (_svgNewDepth = svgNewDepth) !== null && _svgNewDepth !== void 0 ? _svgNewDepth : 0, set.CatalogData.useGlobalSVGScale, minBoderSVG.svgMinXVal, minBoderSVG.svgMinYVal, function (_correctedContent) {
|
|
227
|
+
correctedContent = _correctedContent;
|
|
228
|
+
resolve();
|
|
229
|
+
}, svgSourceUrl,
|
|
230
|
+
// parseSvg derives a kept axis afterwards from the stretched svg's canvas
|
|
231
|
+
{
|
|
232
|
+
width: svgNewWidth == undefined,
|
|
233
|
+
depth: svgNewDepth == undefined
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
case 28:
|
|
237
|
+
plannerElement.svgAfter = correctedContent;
|
|
238
|
+
this.parseSvg(plannerElement, correctedContent, minBoderSVG, set.CatalogData.getPlannerConfig(), sizes);
|
|
239
|
+
_context.next = 34;
|
|
240
|
+
break;
|
|
241
|
+
case 32:
|
|
242
|
+
plannerElement.svgAfter = svgContentXML;
|
|
243
|
+
this.parseSvg(plannerElement, svgContentXML, {
|
|
244
|
+
svgMinXVal: 0,
|
|
245
|
+
svgMinYVal: 0
|
|
246
|
+
}, set.CatalogData.getPlannerConfig());
|
|
247
|
+
case 34:
|
|
248
|
+
return _context.abrupt("return", true);
|
|
249
|
+
case 35:
|
|
250
|
+
case "end":
|
|
251
|
+
return _context.stop();
|
|
252
|
+
}
|
|
253
|
+
}, _callee, this);
|
|
254
|
+
}));
|
|
255
|
+
function loadSVG(_x, _x2) {
|
|
256
|
+
return _loadSVG.apply(this, arguments);
|
|
257
|
+
}
|
|
258
|
+
return loadSVG;
|
|
259
|
+
}())
|
|
260
|
+
}, {
|
|
261
|
+
key: "getSVGUrl",
|
|
262
|
+
value: function getSVGUrl(svgFile, mediaUrl) {
|
|
263
|
+
var url = mediaUrl + 'pln_' + svgFile;
|
|
264
|
+
//Split url
|
|
265
|
+
var index = url.indexOf('/files/');
|
|
266
|
+
url = url.substring(index);
|
|
267
|
+
return 'function=GetFileAsString' + '&fileUrl=' + encodeURIComponent(url);
|
|
268
|
+
}
|
|
269
|
+
}]);
|
|
270
|
+
}();
|
|
271
|
+
var handler2D = new PlannerHandler2D();
|
|
272
|
+
|
|
273
|
+
export { dockingPointHandlerInst as d, handler2D as h };
|
|
@@ -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-9eba9def.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; } }
|
|
@@ -70,7 +70,7 @@ var StandardWWSHandler = /*#__PURE__*/function () {
|
|
|
70
70
|
var posNr = 1;
|
|
71
71
|
for (var iKey in articles) {
|
|
72
72
|
var article = articles[iKey];
|
|
73
|
-
var partlistArticles =
|
|
73
|
+
var partlistArticles = summaryHandlerInstance.getPartlistComponents(article);
|
|
74
74
|
var partlistArticlesWithTabGroup = [];
|
|
75
75
|
groupedPartlistArticles.push({
|
|
76
76
|
article: article,
|
|
@@ -163,7 +163,7 @@ var StandardWWSHandler = /*#__PURE__*/function () {
|
|
|
163
163
|
var _item$FormattedOption, _item$FormattedOption2, _this$getFormattedOpt;
|
|
164
164
|
return item.Name == partListArticle.name && item.ArticleNr == partListArticle.configArticleCodex && ((_item$FormattedOption = item.FormattedOptions) === null || _item$FormattedOption === void 0 ? void 0 : _item$FormattedOption[0]) && ((_item$FormattedOption2 = item.FormattedOptions) === null || _item$FormattedOption2 === void 0 ? void 0 : _item$FormattedOption2[0].Title) == ((_this$getFormattedOpt = _this.getFormattedOptions(partListArticle, optionArticle, [], '', usedOptionCodexes)) === null || _this$getFormattedOpt === void 0 ? void 0 : _this$getFormattedOpt[0].Title);
|
|
165
165
|
});
|
|
166
|
-
var unitPrice =
|
|
166
|
+
var unitPrice = summaryHandlerInstance.getPartlistUnitPrice(partListArticle);
|
|
167
167
|
if (fountEntry) {
|
|
168
168
|
fountEntry.Quantity = fountEntry.Quantity + partListArticle.quantity;
|
|
169
169
|
fountEntry.FormattedPrice = DivaUtils.formatPrice(unitPrice * fountEntry.Quantity);
|
|
@@ -251,26 +251,6 @@ var StandardWWSHandler = /*#__PURE__*/function () {
|
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
/**
|
|
255
|
-
* Components at any partlist depth. Articles that only bundle further components without a price of their own (IDM
|
|
256
|
-
* "Hülsen") are left out, also when the current configuration loads none of their components (e.g. no mattress chosen):
|
|
257
|
-
* an empty Hülse is not a part. A partlist parent with a price of its own stays a part, so its price is not lost.
|
|
258
|
-
*/
|
|
259
|
-
}, {
|
|
260
|
-
key: "getPartlistComponents",
|
|
261
|
-
value: function getPartlistComponents(article) {
|
|
262
|
-
return Object.values(article.getRecursivePartlistArticles()).filter(function (partlistArticle) {
|
|
263
|
-
return !partlistArticle.hasPartlistArticle || partlistArticle.mainPrice > 0;
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
/** Unit price of a part: a partlist parent contributes only its own price, its components are listed themselves. */
|
|
268
|
-
}, {
|
|
269
|
-
key: "unitPrice",
|
|
270
|
-
value: function unitPrice(partListArticle) {
|
|
271
|
-
return partListArticle.hasPartlistArticle ? partListArticle.mainPrice : partListArticle.price;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
254
|
/**
|
|
275
255
|
* The first emitted option flagged with IS_MAIN_COLOR is the main color of the part list; without one, the first emitted
|
|
276
256
|
* OPTBE_BOX option (API2 fallback) is. Decided after all lines exist, so only options that really appear can be chosen.
|
|
@@ -363,11 +343,13 @@ var StandardWWSHandler = /*#__PURE__*/function () {
|
|
|
363
343
|
colorCodices.push(coloCodex);
|
|
364
344
|
//IDM has no group name on the value itself: there the Bezugsgruppe is its own feature, merged into this one only for the view
|
|
365
345
|
var groupName = (_optionState$val$grou = (_optionState$val = optionState.val) === null || _optionState$val === void 0 ? void 0 : _optionState$val.groupName) !== null && _optionState$val$grou !== void 0 ? _optionState$val$grou : (_article$getMergesToO = article.getMergesToOPGParentOps(optionState.optionCodex)) === null || _article$getMergesToO === void 0 ? void 0 : _article$getMergesToO.valName;
|
|
346
|
+
// API2 carries the fabric number as VCodex; IDM values have none, there the option key is the fabric number ("0_227_1" → "0-227-1")
|
|
347
|
+
var codex = optionState.vCodex && optionState.vCodex !== optionState.valName ? optionState.vCodex : article.CatalogData.isIDMFormat ? summaryHandlerInstance.getDisplayCodex(optionState) : '';
|
|
366
348
|
var formattedOption = {
|
|
367
349
|
PosNr: finalPosNr,
|
|
368
350
|
Text: (groupName ? groupName + ' ' : '') + optionState.valName,
|
|
369
351
|
Title: optionState.optionOrigName,
|
|
370
|
-
Codex:
|
|
352
|
+
Codex: codex,
|
|
371
353
|
IsMainColor: false
|
|
372
354
|
};
|
|
373
355
|
formattedOptions.push(formattedOption);
|