@crystaldesign/web-planner-logic 26.11.0-beta.5 → 26.11.0-beta.7
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-68cc1bd1.js → DivaBoxPlanner-02a2dbbf.js} +4 -4
- package/build/cjs/{DivaStandardPlanner-d44ae0e7.js → DivaStandardPlanner-150246c0.js} +8 -28
- package/build/cjs/{DoorPlanner-1719cbe1.js → DoorPlanner-ce630754.js} +2 -1
- package/build/cjs/{Host3DSignalR-a456221e.js → Host3DSignalR-b0b1fb8d.js} +2 -1
- package/build/cjs/{LiviqueWWSHandler-f2afb4eb.js → LiviqueWWSHandler-c11ea7d2.js} +2 -1
- package/build/cjs/{PfisterWWSHandler-8f522ab6.js → PfisterWWSHandler-3c723ecc.js} +2 -1
- package/build/cjs/PlannerHandler2D-6c0324be.js +544 -0
- package/build/cjs/{SeriousBasketHandler-b39f0556.js → SeriousBasketHandler-d1ae4006.js} +2 -1
- package/build/cjs/{ShelfPlanner-1dde2d7c.js → ShelfPlanner-04d98f4d.js} +2 -1
- package/build/cjs/{StandardWWSHandler-62ec343d.js → StandardWWSHandler-9b596caf.js} +2 -1
- package/build/cjs/{index-d63749e4.js → index-633196ab.js} +501 -650
- package/build/cjs/index.js +6 -2
- package/build/esm/{DivaBoxPlanner-a347ef5d.js → DivaBoxPlanner-fa9f6ec6.js} +4 -4
- package/build/esm/{DivaStandardPlanner-a8f0d722.js → DivaStandardPlanner-6c001048.js} +8 -28
- package/build/esm/{DoorPlanner-60c065e5.js → DoorPlanner-ef9165f9.js} +2 -1
- package/build/esm/{Host3DSignalR-0c7e84a7.js → Host3DSignalR-2dc8478a.js} +2 -1
- package/build/esm/{LiviqueWWSHandler-3df03404.js → LiviqueWWSHandler-b6e8bf5f.js} +2 -1
- package/build/esm/{PfisterWWSHandler-28b609ef.js → PfisterWWSHandler-54b3e0aa.js} +2 -1
- package/build/esm/PlannerHandler2D-0e61311d.js +526 -0
- package/build/esm/{SeriousBasketHandler-276a8035.js → SeriousBasketHandler-7b097870.js} +2 -1
- package/build/esm/{ShelfPlanner-7380b831.js → ShelfPlanner-f3e86534.js} +2 -1
- package/build/esm/{StandardWWSHandler-1d13f6a3.js → StandardWWSHandler-4b0caefd.js} +2 -1
- package/build/esm/{index-358c0a3c.js → index-6c8de812.js} +502 -650
- package/build/esm/index.js +2 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +9 -2
- 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/DockingPointHandler.d.ts +9 -114
- package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/DockingPointHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/PlannerHandler2D.d.ts +5 -7
- 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 +5 -6
- 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/DivaSet.d.ts +2 -2
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Planner/DockingPoint.d.ts +1 -44
- package/build/types/web-planner-logic/src/model/Planner/DockingPoint.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/parseSvgOltGeometry.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/parseSvgOltGeometry.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/stretchGoldenMaster.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/stretchGoldenMaster.test.d.ts.map +1 -0
- package/package.json +4 -5
- package/build/cjs/PlannerHandler2D-dbe1d858.js +0 -2470
- package/build/esm/PlannerHandler2D-f8657005.js +0 -2455
|
@@ -18,6 +18,7 @@ var _inherits = require('@babel/runtime/helpers/inherits');
|
|
|
18
18
|
var _wrapNativeSuper = require('@babel/runtime/helpers/wrapNativeSuper');
|
|
19
19
|
var BasketHandler = require('@crystaldesign/basket-handler');
|
|
20
20
|
var io = require('socket.io-client');
|
|
21
|
+
require('@crystaldesign/planner-2d-core');
|
|
21
22
|
|
|
22
23
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
23
24
|
|
|
@@ -20653,6 +20654,8 @@ function getCatalogPlanner(article, catalogArticle, catalogData) {
|
|
|
20653
20654
|
}
|
|
20654
20655
|
function initCatalogPlannerArticleView(catalogData, catPlanArticle, catalogProps, plannerPaletteViewInfo) {
|
|
20655
20656
|
var _catPlanArticle$filte, _catPlanArticle$group, _catPlanArticle$svgs;
|
|
20657
|
+
if (catPlanArticle.hideInPlannerStep) return;
|
|
20658
|
+
if (catalogProps.has3dModels && !catPlanArticle.modelName3D) return;
|
|
20656
20659
|
plannerPaletteViewInfo.catalogPlannerArticles.push({
|
|
20657
20660
|
articleCodex: catPlanArticle.codex,
|
|
20658
20661
|
avlFilter: catPlanArticle.avlFilter,
|
|
@@ -20671,7 +20674,7 @@ function initCatalogPlannerArticleView(catalogData, catPlanArticle, catalogProps
|
|
|
20671
20674
|
hasAVS: !!catPlanArticle.topAVS,
|
|
20672
20675
|
hasAVU: !!catPlanArticle.topAVU,
|
|
20673
20676
|
image: catPlanArticle.getImage(),
|
|
20674
|
-
is3DModell:
|
|
20677
|
+
is3DModell: !!catPlanArticle.modelName3D,
|
|
20675
20678
|
layer: catPlanArticle.topLayer,
|
|
20676
20679
|
price: catPlanArticle.basePrice,
|
|
20677
20680
|
svgSrc: (_catPlanArticle$svgs = catPlanArticle.svgs) === null || _catPlanArticle$svgs === void 0 || (_catPlanArticle$svgs = _catPlanArticle$svgs[0]) === null || _catPlanArticle$svgs === void 0 ? void 0 : _catPlanArticle$svgs.url,
|
|
@@ -29926,7 +29929,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
29926
29929
|
break;
|
|
29927
29930
|
}
|
|
29928
29931
|
_context.next = 4;
|
|
29929
|
-
return Promise.resolve().then(function () { return require('./ShelfPlanner-
|
|
29932
|
+
return Promise.resolve().then(function () { return require('./ShelfPlanner-04d98f4d.js'); });
|
|
29930
29933
|
case 4:
|
|
29931
29934
|
_yield$import = _context.sent;
|
|
29932
29935
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -38021,7 +38024,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
38021
38024
|
break;
|
|
38022
38025
|
}
|
|
38023
38026
|
_context5.next = 3;
|
|
38024
|
-
return Promise.resolve().then(function () { return require('./DoorPlanner-
|
|
38027
|
+
return Promise.resolve().then(function () { return require('./DoorPlanner-ce630754.js'); });
|
|
38025
38028
|
case 3:
|
|
38026
38029
|
_yield$import = _context5.sent;
|
|
38027
38030
|
DoorPlanner = _yield$import["default"];
|
|
@@ -42347,19 +42350,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
42347
42350
|
while (1) switch (_context45.prev = _context45.next) {
|
|
42348
42351
|
case 0:
|
|
42349
42352
|
urlToPlanning2D = undefined;
|
|
42350
|
-
|
|
42353
|
+
_context45.next = 3;
|
|
42354
|
+
return set.getPlanning2DAsJpg();
|
|
42355
|
+
case 3:
|
|
42356
|
+
planning2DAsJPGBase64 = _context45.sent;
|
|
42351
42357
|
if (!(planning2DAsJPGBase64 != undefined && planning2DAsJPGBase64 != '' && planning2DAsJPGBase64 != 'data:,')) {
|
|
42352
|
-
_context45.next =
|
|
42358
|
+
_context45.next = 9;
|
|
42353
42359
|
break;
|
|
42354
42360
|
}
|
|
42355
42361
|
fileName = this.getPendingUploadFileName(basketData, set.getSetId(), 'planning2D', 'jpg', variantId);
|
|
42356
|
-
_context45.next =
|
|
42362
|
+
_context45.next = 8;
|
|
42357
42363
|
return set.plannerHandler.saveSet2DImage(basketData, set.getSetId(), planning2DAsJPGBase64, fileName, variantId);
|
|
42358
|
-
case
|
|
42364
|
+
case 8:
|
|
42359
42365
|
urlToPlanning2D = _context45.sent;
|
|
42360
|
-
case
|
|
42366
|
+
case 9:
|
|
42361
42367
|
return _context45.abrupt("return", urlToPlanning2D);
|
|
42362
|
-
case
|
|
42368
|
+
case 10:
|
|
42363
42369
|
case "end":
|
|
42364
42370
|
return _context45.stop();
|
|
42365
42371
|
}
|
|
@@ -43602,7 +43608,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
43602
43608
|
break;
|
|
43603
43609
|
case 3:
|
|
43604
43610
|
_context12.next = 5;
|
|
43605
|
-
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-
|
|
43611
|
+
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-3c723ecc.js'); });
|
|
43606
43612
|
case 5:
|
|
43607
43613
|
_yield$import = _context12.sent;
|
|
43608
43614
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -43610,7 +43616,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
43610
43616
|
return _context12.abrupt("break", 27);
|
|
43611
43617
|
case 9:
|
|
43612
43618
|
_context12.next = 11;
|
|
43613
|
-
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-
|
|
43619
|
+
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-c11ea7d2.js'); });
|
|
43614
43620
|
case 11:
|
|
43615
43621
|
_yield$import2 = _context12.sent;
|
|
43616
43622
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -43618,7 +43624,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
43618
43624
|
return _context12.abrupt("break", 27);
|
|
43619
43625
|
case 15:
|
|
43620
43626
|
_context12.next = 17;
|
|
43621
|
-
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-
|
|
43627
|
+
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-d1ae4006.js'); });
|
|
43622
43628
|
case 17:
|
|
43623
43629
|
_yield$import3 = _context12.sent;
|
|
43624
43630
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -43626,7 +43632,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
43626
43632
|
return _context12.abrupt("break", 27);
|
|
43627
43633
|
case 21:
|
|
43628
43634
|
_context12.next = 23;
|
|
43629
|
-
return Promise.resolve().then(function () { return require('./StandardWWSHandler-
|
|
43635
|
+
return Promise.resolve().then(function () { return require('./StandardWWSHandler-9b596caf.js'); });
|
|
43630
43636
|
case 23:
|
|
43631
43637
|
_yield$import4 = _context12.sent;
|
|
43632
43638
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -45009,7 +45015,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
45009
45015
|
while (1) switch (_context3.prev = _context3.next) {
|
|
45010
45016
|
case 0:
|
|
45011
45017
|
_context3.next = 2;
|
|
45012
|
-
return Promise.resolve().then(function () { return require('./Host3DSignalR-
|
|
45018
|
+
return Promise.resolve().then(function () { return require('./Host3DSignalR-b0b1fb8d.js'); });
|
|
45013
45019
|
case 2:
|
|
45014
45020
|
_yield$import = _context3.sent;
|
|
45015
45021
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -46685,7 +46691,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
46685
46691
|
break;
|
|
46686
46692
|
case 8:
|
|
46687
46693
|
_context5.next = 10;
|
|
46688
|
-
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-
|
|
46694
|
+
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-150246c0.js'); });
|
|
46689
46695
|
case 10:
|
|
46690
46696
|
_yield$import = _context5.sent;
|
|
46691
46697
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -46696,7 +46702,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
46696
46702
|
return _context5.abrupt("break", 21);
|
|
46697
46703
|
case 15:
|
|
46698
46704
|
_context5.next = 17;
|
|
46699
|
-
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-
|
|
46705
|
+
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-02a2dbbf.js'); });
|
|
46700
46706
|
case 17:
|
|
46701
46707
|
_yield$import2 = _context5.sent;
|
|
46702
46708
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -47993,18 +47999,28 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47993
47999
|
LOG$2.debug('new HQRenderScript set');
|
|
47994
48000
|
(_this$setHQRenderScri = _this.setHQRenderScript) === null || _this$setHQRenderScri === void 0 || _this$setHQRenderScri.call(_this, hqRenderscript.HQRenderScript);
|
|
47995
48001
|
});
|
|
48002
|
+
/** The latest 2D-grid render; a capture must await it, otherwise it reads the canvas of the previous planning. */
|
|
48003
|
+
_defineProperty__default["default"](this, "pending2DRender", void 0);
|
|
47996
48004
|
_defineProperty__default["default"](this, "update2DGrid", function (set) {
|
|
47997
48005
|
if (!_this.getInitPlannerViewMode || _this.getInitPlannerViewMode() == 'No') return;
|
|
47998
48006
|
var boundingBox = setHandlerInstance.get2DViewPlannerBoundingBox(set);
|
|
47999
|
-
if (boundingBox)
|
|
48000
|
-
var _this$updatePlanner2D;
|
|
48001
|
-
(_this$updatePlanner2D = _this.updatePlanner2DGrid) === null || _this$updatePlanner2D === void 0 || _this$updatePlanner2D.call(_this, boundingBox);
|
|
48002
|
-
}
|
|
48007
|
+
if (boundingBox) _this.start2DRender(boundingBox);
|
|
48003
48008
|
});
|
|
48004
|
-
_defineProperty__default["default"](this, "getPlanning2DAsJpg", function () {
|
|
48009
|
+
_defineProperty__default["default"](this, "getPlanning2DAsJpg", /*#__PURE__*/_asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee() {
|
|
48005
48010
|
var _this$getCanvas2DAsJP;
|
|
48006
|
-
return (
|
|
48007
|
-
|
|
48011
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
48012
|
+
while (1) switch (_context.prev = _context.next) {
|
|
48013
|
+
case 0:
|
|
48014
|
+
_context.next = 2;
|
|
48015
|
+
return _this.pending2DRender;
|
|
48016
|
+
case 2:
|
|
48017
|
+
return _context.abrupt("return", (_this$getCanvas2DAsJP = _this.getCanvas2DAsJPG) === null || _this$getCanvas2DAsJP === void 0 ? void 0 : _this$getCanvas2DAsJP.call(_this));
|
|
48018
|
+
case 3:
|
|
48019
|
+
case "end":
|
|
48020
|
+
return _context.stop();
|
|
48021
|
+
}
|
|
48022
|
+
}, _callee);
|
|
48023
|
+
})));
|
|
48008
48024
|
/***********************************Functions in Logik called From View *************************************/
|
|
48009
48025
|
_defineProperty__default["default"](this, "onElementSelectionChanged", function (setId, elementId, oldTabgroupType) {
|
|
48010
48026
|
if (setId) {
|
|
@@ -48039,35 +48055,35 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48039
48055
|
* @param configStepKey unique indentifier for configStep
|
|
48040
48056
|
*/
|
|
48041
48057
|
_defineProperty__default["default"](this, "loadConfigItemsOfOptions", /*#__PURE__*/function () {
|
|
48042
|
-
var
|
|
48058
|
+
var _ref2 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(configStepKey, paletteId, isUpdate, visible) {
|
|
48043
48059
|
var _this$state2, _this$state3, _this$updateConfigIte;
|
|
48044
48060
|
var retValues;
|
|
48045
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
48046
|
-
while (1) switch (
|
|
48061
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
48062
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
48047
48063
|
case 0:
|
|
48048
|
-
|
|
48064
|
+
_context2.next = 2;
|
|
48049
48065
|
return setHandlerInstance.loadConfigItemsOfActSetByConfigStepKey(_this.actSet(), configStepKey, visible, !!((_this$state2 = _this.state) !== null && _this$state2 !== void 0 && _this$state2.hidePrices || (_this$state3 = _this.state) !== null && _this$state3 !== void 0 && _this$state3.hideConfigPricePreview));
|
|
48050
48066
|
case 2:
|
|
48051
|
-
retValues =
|
|
48067
|
+
retValues = _context2.sent;
|
|
48052
48068
|
(_this$updateConfigIte = _this.updateConfigItems) === null || _this$updateConfigIte === void 0 || _this$updateConfigIte.call(_this, configStepKey, retValues.configItems, retValues.selectedItems, retValues.actStepName, retValues.paletteType, retValues.filterType, paletteId, isUpdate, retValues.visible, retValues.stepInfo, retValues.isRenderedInAccessorieStep, retValues.isRenderedNotInSettingPalette, retValues.optionCodex, retValues.notTotallyMatichingOPVs, retValues.isMultiselect, retValues.groupsDefaultClosed, retValues.contentItemId, retValues.conceptFilter, retValues.contentItemTeaser, retValues.description);
|
|
48053
48069
|
case 4:
|
|
48054
48070
|
case "end":
|
|
48055
|
-
return
|
|
48071
|
+
return _context2.stop();
|
|
48056
48072
|
}
|
|
48057
|
-
},
|
|
48073
|
+
}, _callee2);
|
|
48058
48074
|
}));
|
|
48059
48075
|
return function (_x, _x2, _x3, _x4) {
|
|
48060
|
-
return
|
|
48076
|
+
return _ref2.apply(this, arguments);
|
|
48061
48077
|
};
|
|
48062
48078
|
}());
|
|
48063
48079
|
/**
|
|
48064
48080
|
* this function laods the summary Items
|
|
48065
48081
|
*/
|
|
48066
|
-
_defineProperty__default["default"](this, "loadSummaryItems", /*#__PURE__*/_asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
48082
|
+
_defineProperty__default["default"](this, "loadSummaryItems", /*#__PURE__*/_asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3() {
|
|
48067
48083
|
var _this$actions, _this$actions$toggleL, _this$updateSummaryIt, _this$actions2, _this$actions2$toggle;
|
|
48068
48084
|
var setPriceCurrency, setPriceFormat, summaryItems;
|
|
48069
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
48070
|
-
while (1) switch (
|
|
48085
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context3) {
|
|
48086
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
48071
48087
|
case 0:
|
|
48072
48088
|
setPriceCurrency = setHandlerInstance.getActSetPriceFormat(_this.actSet());
|
|
48073
48089
|
setPriceFormat = undefined;
|
|
@@ -48078,17 +48094,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48078
48094
|
}
|
|
48079
48095
|
//Do also pass the correct price format
|
|
48080
48096
|
(_this$actions = _this.actions) === null || _this$actions === void 0 || (_this$actions$toggleL = _this$actions.toggleLoading) === null || _this$actions$toggleL === void 0 || _this$actions$toggleL.call(_this$actions, 'SUMMARY');
|
|
48081
|
-
|
|
48097
|
+
_context3.next = 6;
|
|
48082
48098
|
return summaryHandlerInstance.getSummaryItems(_this.sets, _this.doConfigure.bind(_this));
|
|
48083
48099
|
case 6:
|
|
48084
|
-
summaryItems =
|
|
48100
|
+
summaryItems = _context3.sent;
|
|
48085
48101
|
(_this$updateSummaryIt = _this.updateSummaryItems) === null || _this$updateSummaryIt === void 0 || _this$updateSummaryIt.call(_this, summaryItems, setPriceFormat, summaryHandlerInstance.getSummaryStepWarning(_this.actSet(), summaryItems));
|
|
48086
48102
|
(_this$actions2 = _this.actions) === null || _this$actions2 === void 0 || (_this$actions2$toggle = _this$actions2.toggleLoading) === null || _this$actions2$toggle === void 0 || _this$actions2$toggle.call(_this$actions2, 'SUMMARY');
|
|
48087
48103
|
case 9:
|
|
48088
48104
|
case "end":
|
|
48089
|
-
return
|
|
48105
|
+
return _context3.stop();
|
|
48090
48106
|
}
|
|
48091
|
-
},
|
|
48107
|
+
}, _callee3);
|
|
48092
48108
|
})));
|
|
48093
48109
|
_defineProperty__default["default"](this, "loadStaticRoomList", function (dontUpdateView) {
|
|
48094
48110
|
var _this$updateStaticRoo2;
|
|
@@ -48119,41 +48135,41 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48119
48135
|
* @param parentElement ElementID of the parent element used for docking
|
|
48120
48136
|
*/
|
|
48121
48137
|
_defineProperty__default["default"](this, "addPlannerElement", /*#__PURE__*/function () {
|
|
48122
|
-
var
|
|
48138
|
+
var _ref4 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee4(elementCodex, initParams, dontUpdateView) {
|
|
48123
48139
|
var _this$actions3, _this$actions3$toggle, _this$actions6, _this$actions6$toggle, _this$updateViewPlann, _this$updateElementSe;
|
|
48124
48140
|
var set, newArticle, _this$actions4, _this$actions4$openMo, _this$i18n, _this$i18n2, _this$actions5, _this$actions5$toggle, baseArticle;
|
|
48125
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
48126
|
-
while (1) switch (
|
|
48141
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context4) {
|
|
48142
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
48127
48143
|
case 0:
|
|
48128
48144
|
set = _this.actSet();
|
|
48129
48145
|
(_this$actions3 = _this.actions) === null || _this$actions3 === void 0 || (_this$actions3$toggle = _this$actions3.toggleLoading) === null || _this$actions3$toggle === void 0 || _this$actions3$toggle.call(_this$actions3, 'plannElement' + elementCodex, false, true);
|
|
48130
|
-
|
|
48131
|
-
|
|
48146
|
+
_context4.prev = 2;
|
|
48147
|
+
_context4.next = 5;
|
|
48132
48148
|
return setHandlerInstance.addPlannerElement(set, elementCodex, initParams);
|
|
48133
48149
|
case 5:
|
|
48134
|
-
newArticle =
|
|
48135
|
-
|
|
48150
|
+
newArticle = _context4.sent;
|
|
48151
|
+
_context4.next = 13;
|
|
48136
48152
|
break;
|
|
48137
48153
|
case 8:
|
|
48138
|
-
|
|
48139
|
-
|
|
48154
|
+
_context4.prev = 8;
|
|
48155
|
+
_context4.t0 = _context4["catch"](2);
|
|
48140
48156
|
(_this$actions4 = _this.actions) === null || _this$actions4 === void 0 || (_this$actions4$openMo = _this$actions4.openModal) === null || _this$actions4$openMo === void 0 || _this$actions4$openMo.call(_this$actions4, {
|
|
48141
48157
|
accept: true,
|
|
48142
48158
|
title: (_this$i18n = _this.i18n()) === null || _this$i18n === void 0 ? void 0 : _this$i18n.t('Error'),
|
|
48143
|
-
text: (
|
|
48159
|
+
text: (_context4.t0 !== null && _context4.t0 !== void 0 && _context4.t0.message ? _context4.t0.message : (_this$i18n2 = _this.i18n()) === null || _this$i18n2 === void 0 ? void 0 : _this$i18n2.t('modal.errorcode')) + ':' + DivaUtils__default["default"].getCurrentTraceId() + ' ' + DivaUtils__default["default"].formatDate(new Date(), true, undefined, true)
|
|
48144
48160
|
});
|
|
48145
48161
|
(_this$actions5 = _this.actions) === null || _this$actions5 === void 0 || (_this$actions5$toggle = _this$actions5.toggleLoading) === null || _this$actions5$toggle === void 0 || _this$actions5$toggle.call(_this$actions5, 'plannElement' + elementCodex, false, false);
|
|
48146
|
-
throw new Error(
|
|
48162
|
+
throw new Error(_context4.t0);
|
|
48147
48163
|
case 13:
|
|
48148
48164
|
(_this$actions6 = _this.actions) === null || _this$actions6 === void 0 || (_this$actions6$toggle = _this$actions6.toggleLoading) === null || _this$actions6$toggle === void 0 || _this$actions6$toggle.call(_this$actions6, 'plannElement' + elementCodex, false, false);
|
|
48149
48165
|
if (!newArticle.toDeleteAfterInit) {
|
|
48150
|
-
|
|
48166
|
+
_context4.next = 18;
|
|
48151
48167
|
break;
|
|
48152
48168
|
}
|
|
48153
|
-
|
|
48169
|
+
_context4.next = 17;
|
|
48154
48170
|
return _this.deletePlannerElement(newArticle.setId, newArticle.elementId, true);
|
|
48155
48171
|
case 17:
|
|
48156
|
-
return
|
|
48172
|
+
return _context4.abrupt("return", newArticle.doNotDeleteAccWhenNotDocked ? 'AccessoireNotVisualized' : 'AccessorieNoFreeSpace');
|
|
48157
48173
|
case 18:
|
|
48158
48174
|
_this.updateConfigStructure();
|
|
48159
48175
|
(_this$updateViewPlann = _this.updateViewPlannerElements) === null || _this$updateViewPlann === void 0 || _this$updateViewPlann.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
@@ -48165,15 +48181,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48165
48181
|
if (!dontUpdateView) (_this$updateElementSe = _this.updateElementSelectionPlanner) === null || _this$updateElementSe === void 0 || _this$updateElementSe.call(_this, [baseArticle.setId], [baseArticle.elementId], true);
|
|
48166
48182
|
_this.checkMatchingProducts('onAdd');
|
|
48167
48183
|
_this.plannerChangeLog('onAddPlanner');
|
|
48168
|
-
return
|
|
48184
|
+
return _context4.abrupt("return", 'ElementAdded');
|
|
48169
48185
|
case 29:
|
|
48170
48186
|
case "end":
|
|
48171
|
-
return
|
|
48187
|
+
return _context4.stop();
|
|
48172
48188
|
}
|
|
48173
|
-
},
|
|
48189
|
+
}, _callee4, null, [[2, 8]]);
|
|
48174
48190
|
}));
|
|
48175
48191
|
return function (_x5, _x6, _x7) {
|
|
48176
|
-
return
|
|
48192
|
+
return _ref4.apply(this, arguments);
|
|
48177
48193
|
};
|
|
48178
48194
|
}());
|
|
48179
48195
|
/**
|
|
@@ -48183,27 +48199,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48183
48199
|
* @param articleCodex articleCodex of the new Element
|
|
48184
48200
|
*/
|
|
48185
48201
|
_defineProperty__default["default"](this, "switchPlannerElement", /*#__PURE__*/function () {
|
|
48186
|
-
var
|
|
48202
|
+
var _ref5 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee5(setId, elementId, articleCodex, initParams) {
|
|
48187
48203
|
var _this$actions7, _this$actions7$toggle, _this$actions8, _this$actions8$toggle, _this$updateViewPlann2, _this$updateElementSe2;
|
|
48188
48204
|
var set, variantValues, deletionResult, article;
|
|
48189
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
48190
|
-
while (1) switch (
|
|
48205
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context5) {
|
|
48206
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
48191
48207
|
case 0:
|
|
48192
48208
|
_this.setActSet(setId);
|
|
48193
48209
|
set = _this.actSet();
|
|
48194
48210
|
variantValues = setHandlerInstance.getVariantValuesOfElement(set, elementId);
|
|
48195
|
-
|
|
48211
|
+
_context5.next = 5;
|
|
48196
48212
|
return setHandlerInstance.deleteElementFromSetByElemId(set, elementId);
|
|
48197
48213
|
case 5:
|
|
48198
|
-
deletionResult =
|
|
48214
|
+
deletionResult = _context5.sent;
|
|
48199
48215
|
(_this$actions7 = _this.actions) === null || _this$actions7 === void 0 || (_this$actions7$toggle = _this$actions7.toggleLoading) === null || _this$actions7$toggle === void 0 || _this$actions7$toggle.call(_this$actions7, 'plannerswitch' + articleCodex, false, true);
|
|
48200
48216
|
initParams.oldPlannerTransform = deletionResult.oldTransform;
|
|
48201
48217
|
initParams.variantValues = _objectSpread$8(_objectSpread$8({}, variantValues), {}, _defineProperty__default["default"]({}, (!set.CatalogData.isIDMFormat ? 'OPT' : '') + 'PLANNERSWITCH', (!set.CatalogData.isIDMFormat ? 'OPV' : '') + articleCodex));
|
|
48202
|
-
|
|
48218
|
+
_context5.next = 11;
|
|
48203
48219
|
return setHandlerInstance.addPlannerElement(set, articleCodex, initParams);
|
|
48204
48220
|
case 11:
|
|
48205
|
-
article =
|
|
48206
|
-
|
|
48221
|
+
article = _context5.sent;
|
|
48222
|
+
_context5.next = 14;
|
|
48207
48223
|
return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, article.getValidValues(article.VariantValues, undefined, true), [article.basketId], undefined, 'initializing');
|
|
48208
48224
|
case 14:
|
|
48209
48225
|
(_this$actions8 = _this.actions) === null || _this$actions8 === void 0 || (_this$actions8$toggle = _this$actions8.toggleLoading) === null || _this$actions8$toggle === void 0 || _this$actions8$toggle.call(_this$actions8, 'plannerswitch' + articleCodex, false, false);
|
|
@@ -48218,29 +48234,29 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48218
48234
|
_this.plannerChangeLog('onSwitchPlanner');
|
|
48219
48235
|
case 24:
|
|
48220
48236
|
case "end":
|
|
48221
|
-
return
|
|
48237
|
+
return _context5.stop();
|
|
48222
48238
|
}
|
|
48223
|
-
},
|
|
48239
|
+
}, _callee5);
|
|
48224
48240
|
}));
|
|
48225
48241
|
return function (_x8, _x9, _x10, _x11) {
|
|
48226
|
-
return
|
|
48242
|
+
return _ref5.apply(this, arguments);
|
|
48227
48243
|
};
|
|
48228
48244
|
}());
|
|
48229
48245
|
_defineProperty__default["default"](this, "addAccessorieOnShelfPlanner", /*#__PURE__*/function () {
|
|
48230
|
-
var
|
|
48246
|
+
var _ref6 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey, partlistCodexToInit) {
|
|
48231
48247
|
var _this$actions9, _this$actions9$toggle, _this$actions10, _this$actions10$toggl;
|
|
48232
48248
|
var set, retVal, _this$updateViewPlann3;
|
|
48233
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
48234
|
-
while (1) switch (
|
|
48249
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context6) {
|
|
48250
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
48235
48251
|
case 0:
|
|
48236
48252
|
set = _this.actSet();
|
|
48237
48253
|
(_this$actions9 = _this.actions) === null || _this$actions9 === void 0 || (_this$actions9$toggle = _this$actions9.toggleLoading) === null || _this$actions9$toggle === void 0 || _this$actions9$toggle.call(_this$actions9, 'LoadingArticle', false, true);
|
|
48238
|
-
|
|
48254
|
+
_context6.next = 4;
|
|
48239
48255
|
return setHandlerInstance.addAccessorieOnShelfPlanner(set, gridIndex, cellIndex, parentBasketId, {
|
|
48240
48256
|
partlistCodexToInit: partlistCodexToInit
|
|
48241
48257
|
});
|
|
48242
48258
|
case 4:
|
|
48243
|
-
retVal =
|
|
48259
|
+
retVal = _context6.sent;
|
|
48244
48260
|
(_this$actions10 = _this.actions) === null || _this$actions10 === void 0 || (_this$actions10$toggl = _this$actions10.toggleLoading) === null || _this$actions10$toggl === void 0 || _this$actions10$toggl.call(_this$actions10, 'LoadingArticle', false, false);
|
|
48245
48261
|
if (retVal !== false) {
|
|
48246
48262
|
_this.loadShelfPlannerItems(paletteId, configStepKey, 'add_accessoire');
|
|
@@ -48252,29 +48268,29 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48252
48268
|
}
|
|
48253
48269
|
_this.checkMatchingProducts('onShelfAdd');
|
|
48254
48270
|
_this.plannerChangeLog('onAddPlanner');
|
|
48255
|
-
return
|
|
48271
|
+
return _context6.abrupt("return", retVal);
|
|
48256
48272
|
case 10:
|
|
48257
48273
|
case "end":
|
|
48258
|
-
return
|
|
48274
|
+
return _context6.stop();
|
|
48259
48275
|
}
|
|
48260
|
-
},
|
|
48276
|
+
}, _callee6);
|
|
48261
48277
|
}));
|
|
48262
48278
|
return function (_x12, _x13, _x14, _x15, _x16, _x17) {
|
|
48263
|
-
return
|
|
48279
|
+
return _ref6.apply(this, arguments);
|
|
48264
48280
|
};
|
|
48265
48281
|
}());
|
|
48266
48282
|
_defineProperty__default["default"](this, "moveShelfItem", /*#__PURE__*/function () {
|
|
48267
|
-
var
|
|
48283
|
+
var _ref7 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(paletteId, grid, initialIndex, finalIndex, configStepKey) {
|
|
48268
48284
|
var _this$updateViewPlann4;
|
|
48269
48285
|
var set, result, _this$updatePlannerMs, _this$i18n3;
|
|
48270
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
48271
|
-
while (1) switch (
|
|
48286
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context7) {
|
|
48287
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
48272
48288
|
case 0:
|
|
48273
48289
|
set = _this.actSet();
|
|
48274
|
-
|
|
48290
|
+
_context7.next = 3;
|
|
48275
48291
|
return setHandlerInstance.moveShelfItem(set, grid, initialIndex, finalIndex);
|
|
48276
48292
|
case 3:
|
|
48277
|
-
result =
|
|
48293
|
+
result = _context7.sent;
|
|
48278
48294
|
if (result == 'RESETTED_CELLS') {
|
|
48279
48295
|
(_this$updatePlannerMs = _this.updatePlannerMsgContainer) === null || _this$updatePlannerMs === void 0 || _this$updatePlannerMs.call(_this, 'COULD_NOT_MOVE_SHELVES', true, 'INFO', (_this$i18n3 = _this.i18n()) === null || _this$i18n3 === void 0 ? void 0 : _this$i18n3.t('configurator.move_resetted'), true);
|
|
48280
48296
|
}
|
|
@@ -48284,12 +48300,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48284
48300
|
_this.updatePlannerView('MOVE_SHELF_ITEM');
|
|
48285
48301
|
case 9:
|
|
48286
48302
|
case "end":
|
|
48287
|
-
return
|
|
48303
|
+
return _context7.stop();
|
|
48288
48304
|
}
|
|
48289
|
-
},
|
|
48305
|
+
}, _callee7);
|
|
48290
48306
|
}));
|
|
48291
48307
|
return function (_x18, _x19, _x20, _x21, _x22) {
|
|
48292
|
-
return
|
|
48308
|
+
return _ref7.apply(this, arguments);
|
|
48293
48309
|
};
|
|
48294
48310
|
}());
|
|
48295
48311
|
_defineProperty__default["default"](this, "moveDoors", function (movedDoor, targetDoor) {
|
|
@@ -48297,14 +48313,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48297
48313
|
_this.updatePlannerView('MOVE_DOORS');
|
|
48298
48314
|
});
|
|
48299
48315
|
_defineProperty__default["default"](this, "deleteAccessorieOnShelfPlanner", /*#__PURE__*/function () {
|
|
48300
|
-
var
|
|
48316
|
+
var _ref8 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey) {
|
|
48301
48317
|
var _this$updateViewPlann5;
|
|
48302
48318
|
var set;
|
|
48303
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
48304
|
-
while (1) switch (
|
|
48319
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
|
|
48320
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
48305
48321
|
case 0:
|
|
48306
48322
|
set = _this.actSet();
|
|
48307
|
-
|
|
48323
|
+
_context8.next = 3;
|
|
48308
48324
|
return setHandlerInstance.deleteAccessorieOnShelfPlanner(set, gridIndex, cellIndex, parentBasketId);
|
|
48309
48325
|
case 3:
|
|
48310
48326
|
_this.updateConfigStructure();
|
|
@@ -48317,12 +48333,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48317
48333
|
_this.plannerChangeLog('onDeletePlanner');
|
|
48318
48334
|
case 11:
|
|
48319
48335
|
case "end":
|
|
48320
|
-
return
|
|
48336
|
+
return _context8.stop();
|
|
48321
48337
|
}
|
|
48322
|
-
},
|
|
48338
|
+
}, _callee8);
|
|
48323
48339
|
}));
|
|
48324
48340
|
return function (_x23, _x24, _x25, _x26, _x27) {
|
|
48325
|
-
return
|
|
48341
|
+
return _ref8.apply(this, arguments);
|
|
48326
48342
|
};
|
|
48327
48343
|
}());
|
|
48328
48344
|
/**
|
|
@@ -48333,12 +48349,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48333
48349
|
* @param transState
|
|
48334
48350
|
*/
|
|
48335
48351
|
_defineProperty__default["default"](this, "updatePlannerTrans", /*#__PURE__*/function () {
|
|
48336
|
-
var
|
|
48352
|
+
var _ref9 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9(setId, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance) {
|
|
48337
48353
|
var _this$updateElementSe3;
|
|
48338
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
48339
|
-
while (1) switch (
|
|
48354
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context9) {
|
|
48355
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
48340
48356
|
case 0:
|
|
48341
|
-
|
|
48357
|
+
_context9.next = 2;
|
|
48342
48358
|
return setHandlerInstance.updatePlannerTrans(_this.actSet(), plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance);
|
|
48343
48359
|
case 2:
|
|
48344
48360
|
if (transState == 'END') {
|
|
@@ -48347,12 +48363,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48347
48363
|
}
|
|
48348
48364
|
case 3:
|
|
48349
48365
|
case "end":
|
|
48350
|
-
return
|
|
48366
|
+
return _context9.stop();
|
|
48351
48367
|
}
|
|
48352
|
-
},
|
|
48368
|
+
}, _callee9);
|
|
48353
48369
|
}));
|
|
48354
48370
|
return function (_x28, _x29, _x30, _x31, _x32, _x33, _x34) {
|
|
48355
|
-
return
|
|
48371
|
+
return _ref9.apply(this, arguments);
|
|
48356
48372
|
};
|
|
48357
48373
|
}());
|
|
48358
48374
|
/**
|
|
@@ -48371,18 +48387,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48371
48387
|
}
|
|
48372
48388
|
});
|
|
48373
48389
|
_defineProperty__default["default"](this, "updateAccessoireQuantity", /*#__PURE__*/function () {
|
|
48374
|
-
var
|
|
48390
|
+
var _ref10 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee10(accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle) {
|
|
48375
48391
|
var _this$actions11, _this$actions11$toggl, _this$actions12, _this$actions12$toggl;
|
|
48376
48392
|
var set, ret;
|
|
48377
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
48378
|
-
while (1) switch (
|
|
48393
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context10) {
|
|
48394
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
48379
48395
|
case 0:
|
|
48380
48396
|
set = _this.actSet();
|
|
48381
48397
|
(_this$actions11 = _this.actions) === null || _this$actions11 === void 0 || (_this$actions11$toggl = _this$actions11.toggleLoading) === null || _this$actions11$toggl === void 0 || _this$actions11$toggl.call(_this$actions11, 'LoadingArticles_' + accessoireItem.articleCodex, false, true);
|
|
48382
|
-
|
|
48398
|
+
_context10.next = 4;
|
|
48383
48399
|
return setHandlerInstance.updateAccessoireQuantity(set, accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle);
|
|
48384
48400
|
case 4:
|
|
48385
|
-
ret =
|
|
48401
|
+
ret = _context10.sent;
|
|
48386
48402
|
(_this$actions12 = _this.actions) === null || _this$actions12 === void 0 || (_this$actions12$toggl = _this$actions12.toggleLoading) === null || _this$actions12$toggl === void 0 || _this$actions12$toggl.call(_this$actions12, 'LoadingArticles_' + accessoireItem.articleCodex, false, false);
|
|
48387
48403
|
if (ret.somethingChanged) _this.updateConfigStructure();
|
|
48388
48404
|
_this.updatePlannerView('UPDATE_ACC_QUANTITY');
|
|
@@ -48392,25 +48408,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48392
48408
|
_this.plannerChangeLog('onUpdateAccessoireQuantity');
|
|
48393
48409
|
case 12:
|
|
48394
48410
|
case "end":
|
|
48395
|
-
return
|
|
48411
|
+
return _context10.stop();
|
|
48396
48412
|
}
|
|
48397
|
-
},
|
|
48413
|
+
}, _callee10);
|
|
48398
48414
|
}));
|
|
48399
48415
|
return function (_x35, _x36, _x37, _x38) {
|
|
48400
|
-
return
|
|
48416
|
+
return _ref10.apply(this, arguments);
|
|
48401
48417
|
};
|
|
48402
48418
|
}());
|
|
48403
48419
|
_defineProperty__default["default"](this, "deleteAccessoire", /*#__PURE__*/function () {
|
|
48404
|
-
var
|
|
48420
|
+
var _ref11 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(articleCodex, parentBasketId) {
|
|
48405
48421
|
var set, wasDeleted, _this$updateViewPlann6;
|
|
48406
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
48407
|
-
while (1) switch (
|
|
48422
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context11) {
|
|
48423
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
48408
48424
|
case 0:
|
|
48409
48425
|
set = _this.actSet();
|
|
48410
|
-
|
|
48426
|
+
_context11.next = 3;
|
|
48411
48427
|
return setHandlerInstance.deleteAccessoire(set, articleCodex, parentBasketId);
|
|
48412
48428
|
case 3:
|
|
48413
|
-
wasDeleted =
|
|
48429
|
+
wasDeleted = _context11.sent;
|
|
48414
48430
|
if (wasDeleted) {
|
|
48415
48431
|
_this.updateConfigStructure();
|
|
48416
48432
|
(_this$updateViewPlann6 = _this.updateViewPlannerElements) === null || _this$updateViewPlann6 === void 0 || _this$updateViewPlann6.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
@@ -48420,15 +48436,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48420
48436
|
}
|
|
48421
48437
|
_this.checkMatchingProducts('onAccessoireDelete');
|
|
48422
48438
|
_this.plannerChangeLog('onDeletePlanner');
|
|
48423
|
-
return
|
|
48439
|
+
return _context11.abrupt("return", wasDeleted);
|
|
48424
48440
|
case 8:
|
|
48425
48441
|
case "end":
|
|
48426
|
-
return
|
|
48442
|
+
return _context11.stop();
|
|
48427
48443
|
}
|
|
48428
|
-
},
|
|
48444
|
+
}, _callee11);
|
|
48429
48445
|
}));
|
|
48430
48446
|
return function (_x39, _x40) {
|
|
48431
|
-
return
|
|
48447
|
+
return _ref11.apply(this, arguments);
|
|
48432
48448
|
};
|
|
48433
48449
|
}());
|
|
48434
48450
|
_defineProperty__default["default"](this, "loadPaletteInfos", function (configStepKey, activeArticles, targetArticles) {
|
|
@@ -48450,13 +48466,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48450
48466
|
* @param configStepKey act ConfigStep
|
|
48451
48467
|
*/
|
|
48452
48468
|
_defineProperty__default["default"](this, "configSingleIsChanged", /*#__PURE__*/function () {
|
|
48453
|
-
var
|
|
48469
|
+
var _ref12 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12(doConfigSingle, configStepKey, groupedOptions, groupedArticles, optionCodex, tabGroupKey) {
|
|
48454
48470
|
var set;
|
|
48455
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
48456
|
-
while (1) switch (
|
|
48471
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context12) {
|
|
48472
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
48457
48473
|
case 0:
|
|
48458
48474
|
set = _this.actSet();
|
|
48459
|
-
|
|
48475
|
+
_context12.next = 3;
|
|
48460
48476
|
return setHandlerInstance.configSingleIsChanged(set, doConfigSingle, groupedOptions, groupedArticles);
|
|
48461
48477
|
case 3:
|
|
48462
48478
|
_this.updatePriceInView();
|
|
@@ -48466,15 +48482,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48466
48482
|
configStepKey = setHandlerInstance.getNewConfigStepKeyInOption(set, configStepKey, optionCodex, tabGroupKey);
|
|
48467
48483
|
_this.updatePlannerView('CONFIG_SINGLE_IS_CHANGED');
|
|
48468
48484
|
}
|
|
48469
|
-
return
|
|
48485
|
+
return _context12.abrupt("return", configStepKey);
|
|
48470
48486
|
case 7:
|
|
48471
48487
|
case "end":
|
|
48472
|
-
return
|
|
48488
|
+
return _context12.stop();
|
|
48473
48489
|
}
|
|
48474
|
-
},
|
|
48490
|
+
}, _callee12);
|
|
48475
48491
|
}));
|
|
48476
48492
|
return function (_x41, _x42, _x43, _x44, _x45, _x46) {
|
|
48477
|
-
return
|
|
48493
|
+
return _ref12.apply(this, arguments);
|
|
48478
48494
|
};
|
|
48479
48495
|
}());
|
|
48480
48496
|
/**
|
|
@@ -48488,23 +48504,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48488
48504
|
*/
|
|
48489
48505
|
//onConfigItemClick ist ein Click auf das Item der ConfigPalette um die OPV zu ändern
|
|
48490
48506
|
_defineProperty__default["default"](this, "doConfigure", /*#__PURE__*/function () {
|
|
48491
|
-
var
|
|
48507
|
+
var _ref13 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents, eventKey) {
|
|
48492
48508
|
var _this$actions13, _this$actions13$toggl, _this$actions14, _this$actions14$toggl;
|
|
48493
48509
|
var set, returnValues, structure, _returnValues$element, _this$updateViewPlann8, _this$updateElementSe4;
|
|
48494
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
48495
|
-
while (1) switch (
|
|
48510
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context13) {
|
|
48511
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
48496
48512
|
case 0:
|
|
48497
48513
|
set = _this.actSet();
|
|
48498
48514
|
(_this$actions13 = _this.actions) === null || _this$actions13 === void 0 || (_this$actions13$toggl = _this$actions13.toggleLoading) === null || _this$actions13$toggl === void 0 || _this$actions13$toggl.call(_this$actions13, 'doConfigure', false, true);
|
|
48499
|
-
|
|
48515
|
+
_context13.next = 4;
|
|
48500
48516
|
return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, myValues, targetArticles, undefined, 'FromViewClick');
|
|
48501
48517
|
case 4:
|
|
48502
|
-
returnValues =
|
|
48518
|
+
returnValues = _context13.sent;
|
|
48503
48519
|
(_this$actions14 = _this.actions) === null || _this$actions14 === void 0 || (_this$actions14$toggl = _this$actions14.toggleLoading) === null || _this$actions14$toggl === void 0 || _this$actions14$toggl.call(_this$actions14, 'doConfigure', false, false);
|
|
48504
48520
|
structure = setHandlerInstance.loadConfigStructureOfActSet(set, _this.getCurPlannerType());
|
|
48505
48521
|
_this.checkMatchingProducts('onConfig');
|
|
48506
48522
|
if (dontUpdatePlannerView) {
|
|
48507
|
-
|
|
48523
|
+
_context13.next = 18;
|
|
48508
48524
|
break;
|
|
48509
48525
|
}
|
|
48510
48526
|
_this.updateConfiguratorStructure(structure);
|
|
@@ -48518,80 +48534,80 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48518
48534
|
_this.updateViewButtonsDependigOnConfigStructure();
|
|
48519
48535
|
_this.updatePlannerView('DO_CONFIGURE', myValues);
|
|
48520
48536
|
_this.updateWebConfiguratorTitle();
|
|
48521
|
-
|
|
48537
|
+
_context13.next = 18;
|
|
48522
48538
|
return _this.getFreePlacesOnGrids(undefined, 'doConfigure');
|
|
48523
48539
|
case 18:
|
|
48524
48540
|
if (dontCallEvents) {
|
|
48525
|
-
|
|
48541
|
+
_context13.next = 21;
|
|
48526
48542
|
break;
|
|
48527
48543
|
}
|
|
48528
|
-
|
|
48544
|
+
_context13.next = 21;
|
|
48529
48545
|
return _this.fillBaksetforOnWebPlanerConfigChange(myValues, undefined, eventKey);
|
|
48530
48546
|
case 21:
|
|
48531
48547
|
_this.configuratorChangeLog('onConfigurationChange', myValues);
|
|
48532
48548
|
case 22:
|
|
48533
48549
|
case "end":
|
|
48534
|
-
return
|
|
48550
|
+
return _context13.stop();
|
|
48535
48551
|
}
|
|
48536
|
-
},
|
|
48552
|
+
}, _callee13);
|
|
48537
48553
|
}));
|
|
48538
48554
|
return function (_x47, _x48, _x49, _x50, _x51) {
|
|
48539
|
-
return
|
|
48555
|
+
return _ref13.apply(this, arguments);
|
|
48540
48556
|
};
|
|
48541
48557
|
}());
|
|
48542
48558
|
_defineProperty__default["default"](this, "fillBaksetforOnWebPlanerConfigChange", /*#__PURE__*/function () {
|
|
48543
|
-
var
|
|
48559
|
+
var _ref14 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(myValues, isInit, eventKey) {
|
|
48544
48560
|
var _myValues;
|
|
48545
48561
|
var set, articles, article;
|
|
48546
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
48547
|
-
while (1) switch (
|
|
48562
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context14) {
|
|
48563
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
48548
48564
|
case 0:
|
|
48549
48565
|
if (_this.eventIsManagedByClient('onWebPlanerConfigChange')) {
|
|
48550
|
-
|
|
48566
|
+
_context14.next = 2;
|
|
48551
48567
|
break;
|
|
48552
48568
|
}
|
|
48553
|
-
return
|
|
48569
|
+
return _context14.abrupt("return");
|
|
48554
48570
|
case 2:
|
|
48555
48571
|
set = _this.actSet();
|
|
48556
48572
|
if (set) {
|
|
48557
|
-
|
|
48573
|
+
_context14.next = 5;
|
|
48558
48574
|
break;
|
|
48559
48575
|
}
|
|
48560
|
-
return
|
|
48576
|
+
return _context14.abrupt("return");
|
|
48561
48577
|
case 5:
|
|
48562
48578
|
if (!(!myValues || eventKey !== null && eventKey !== void 0 && eventKey.endsWith('repairing'))) {
|
|
48563
|
-
|
|
48579
|
+
_context14.next = 11;
|
|
48564
48580
|
break;
|
|
48565
48581
|
}
|
|
48566
48582
|
//get first option of the first article
|
|
48567
48583
|
articles = set.getDivaArticles();
|
|
48568
48584
|
article = articles[Object.keys(articles)[0]];
|
|
48569
48585
|
if (article) {
|
|
48570
|
-
|
|
48586
|
+
_context14.next = 10;
|
|
48571
48587
|
break;
|
|
48572
48588
|
}
|
|
48573
|
-
return
|
|
48589
|
+
return _context14.abrupt("return");
|
|
48574
48590
|
case 10:
|
|
48575
48591
|
myValues = article === null || article === void 0 ? void 0 : article.VariantValuesWithoutEmptyFreetext;
|
|
48576
48592
|
case 11:
|
|
48577
|
-
|
|
48578
|
-
|
|
48579
|
-
|
|
48593
|
+
_context14.t0 = _this.divaBasketHandler;
|
|
48594
|
+
_context14.t1 = set;
|
|
48595
|
+
_context14.next = 15;
|
|
48580
48596
|
return setHandlerInstance.fillOrderLinesAndOrderSets(_this.sets, _this.divaBasketHandler, true, _this.doAllowSetPlanner(), _this.ReturnTo);
|
|
48581
48597
|
case 15:
|
|
48582
|
-
|
|
48583
|
-
|
|
48584
|
-
|
|
48585
|
-
|
|
48586
|
-
return
|
|
48598
|
+
_context14.t2 = _context14.sent;
|
|
48599
|
+
_context14.t3 = Object.keys((_myValues = myValues) !== null && _myValues !== void 0 ? _myValues : {});
|
|
48600
|
+
_context14.t4 = isInit;
|
|
48601
|
+
_context14.t5 = eventKey;
|
|
48602
|
+
return _context14.abrupt("return", _context14.t0.fillBaksetforOnWebPlanerConfigChange.call(_context14.t0, _context14.t1, _context14.t2, _context14.t3, _context14.t4, _context14.t5));
|
|
48587
48603
|
case 20:
|
|
48588
48604
|
case "end":
|
|
48589
|
-
return
|
|
48605
|
+
return _context14.stop();
|
|
48590
48606
|
}
|
|
48591
|
-
},
|
|
48607
|
+
}, _callee14);
|
|
48592
48608
|
}));
|
|
48593
48609
|
return function (_x52, _x53, _x54) {
|
|
48594
|
-
return
|
|
48610
|
+
return _ref14.apply(this, arguments);
|
|
48595
48611
|
};
|
|
48596
48612
|
}());
|
|
48597
48613
|
_defineProperty__default["default"](this, "getPosNr", function (basketId) {
|
|
@@ -48629,10 +48645,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48629
48645
|
return _createClass__default["default"](DivaWebPlanner, [{
|
|
48630
48646
|
key: "initialize",
|
|
48631
48647
|
value: function () {
|
|
48632
|
-
var _initialize = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
48648
|
+
var _initialize = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(cache) {
|
|
48633
48649
|
var viewReadyPromise, loadSuccessful, ret, set, _this$actions15, _this$i18n4, _this$i18n5, initializationId;
|
|
48634
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
48635
|
-
while (1) switch (
|
|
48650
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context15) {
|
|
48651
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
48636
48652
|
case 0:
|
|
48637
48653
|
this.api = new DivaApiHandler(this.plannerConfig, this.handler, cache);
|
|
48638
48654
|
this.api.setI18n(this.i18n);
|
|
@@ -48646,15 +48662,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48646
48662
|
warningTime: 2000,
|
|
48647
48663
|
errorTime: 4000
|
|
48648
48664
|
});
|
|
48649
|
-
|
|
48665
|
+
_context15.next = 8;
|
|
48650
48666
|
return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
|
|
48651
48667
|
case 8:
|
|
48652
48668
|
this.plannerHandler = new DivaPlannerHandler(false);
|
|
48653
48669
|
viewReadyPromise = this.initViewApiDependencies();
|
|
48654
|
-
|
|
48670
|
+
_context15.next = 12;
|
|
48655
48671
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
48656
48672
|
case 12:
|
|
48657
|
-
loadSuccessful =
|
|
48673
|
+
loadSuccessful = _context15.sent;
|
|
48658
48674
|
if (this.plannerConfig.configuratorSessionId) {
|
|
48659
48675
|
// ID forced from outside (Landingpage, PDP, Planung-ändern)
|
|
48660
48676
|
DivaUtils__default["default"].businessMetrics.setConfiguratorSessionId(this.plannerConfig.configuratorSessionId);
|
|
@@ -48666,14 +48682,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48666
48682
|
DivaUtils__default["default"].businessMetrics.setConfiguratorSessionId();
|
|
48667
48683
|
}
|
|
48668
48684
|
if (!loadSuccessful) {
|
|
48669
|
-
|
|
48685
|
+
_context15.next = 31;
|
|
48670
48686
|
break;
|
|
48671
48687
|
}
|
|
48672
|
-
|
|
48673
|
-
|
|
48688
|
+
_context15.prev = 15;
|
|
48689
|
+
_context15.next = 18;
|
|
48674
48690
|
return this.initializeSets(loadSuccessful, viewReadyPromise);
|
|
48675
48691
|
case 18:
|
|
48676
|
-
ret =
|
|
48692
|
+
ret = _context15.sent;
|
|
48677
48693
|
set = this.actSet();
|
|
48678
48694
|
if (ret && set && set.CatalogData.archived) {
|
|
48679
48695
|
if (this.i18n()) (_this$actions15 = this.actions) === null || _this$actions15 === void 0 || _this$actions15.openModal({
|
|
@@ -48682,15 +48698,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48682
48698
|
text: (_this$i18n5 = this.i18n()) === null || _this$i18n5 === void 0 ? void 0 : _this$i18n5.t('configurator.catalog_not_listed_text')
|
|
48683
48699
|
});
|
|
48684
48700
|
}
|
|
48685
|
-
return
|
|
48701
|
+
return _context15.abrupt("return", ret);
|
|
48686
48702
|
case 24:
|
|
48687
|
-
|
|
48688
|
-
|
|
48689
|
-
LOG$2.error(
|
|
48690
|
-
this.onError(
|
|
48691
|
-
return
|
|
48703
|
+
_context15.prev = 24;
|
|
48704
|
+
_context15.t0 = _context15["catch"](15);
|
|
48705
|
+
LOG$2.error(_context15.t0);
|
|
48706
|
+
this.onError(_context15.t0);
|
|
48707
|
+
return _context15.abrupt("return", false);
|
|
48692
48708
|
case 29:
|
|
48693
|
-
|
|
48709
|
+
_context15.next = 35;
|
|
48694
48710
|
break;
|
|
48695
48711
|
case 31:
|
|
48696
48712
|
this.onError();
|
|
@@ -48699,12 +48715,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48699
48715
|
LOG$2.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {
|
|
48700
48716
|
initializationId: initializationId
|
|
48701
48717
|
}, true);
|
|
48702
|
-
return
|
|
48718
|
+
return _context15.abrupt("return", false);
|
|
48703
48719
|
case 35:
|
|
48704
48720
|
case "end":
|
|
48705
|
-
return
|
|
48721
|
+
return _context15.stop();
|
|
48706
48722
|
}
|
|
48707
|
-
},
|
|
48723
|
+
}, _callee15, this, [[15, 24]]);
|
|
48708
48724
|
}));
|
|
48709
48725
|
function initialize(_x55) {
|
|
48710
48726
|
return _initialize.apply(this, arguments);
|
|
@@ -48714,50 +48730,50 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48714
48730
|
}, {
|
|
48715
48731
|
key: "initializeSets",
|
|
48716
48732
|
value: function () {
|
|
48717
|
-
var _initializeSets = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
48733
|
+
var _initializeSets = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(loadSuccessful, viewReadyPromise) {
|
|
48718
48734
|
var _this$actions17, _set$getDivaArticles, _catalogData$catalogM, _catalogData$catalogM2;
|
|
48719
48735
|
var _this$actions16, _this$actions16$toggl, initSetState, set, oldProductId, _result$customData$SA, _result$customData, _result$customData2, _result$customData$SA2, _result$customData3, _result$customData4, result, _this$actions18, catalogData, initializationId, initializationType;
|
|
48720
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
48721
|
-
while (1) switch (
|
|
48736
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context16) {
|
|
48737
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
48722
48738
|
case 0:
|
|
48723
48739
|
if (!(typeof loadSuccessful != 'boolean')) {
|
|
48724
|
-
|
|
48740
|
+
_context16.next = 9;
|
|
48725
48741
|
break;
|
|
48726
48742
|
}
|
|
48727
48743
|
if (!(loadSuccessful.type == 'ProductList')) {
|
|
48728
|
-
|
|
48744
|
+
_context16.next = 9;
|
|
48729
48745
|
break;
|
|
48730
48746
|
}
|
|
48731
|
-
|
|
48747
|
+
_context16.next = 4;
|
|
48732
48748
|
return viewReadyPromise;
|
|
48733
48749
|
case 4:
|
|
48734
|
-
|
|
48750
|
+
_context16.next = 6;
|
|
48735
48751
|
return this.initView();
|
|
48736
48752
|
case 6:
|
|
48737
48753
|
this.subscribeToWebPlannerEvents();
|
|
48738
48754
|
(_this$actions16 = this.actions) === null || _this$actions16 === void 0 || (_this$actions16$toggl = _this$actions16.toggleLoading) === null || _this$actions16$toggl === void 0 || _this$actions16$toggl.call(_this$actions16, 'Planner_Loading', false, false);
|
|
48739
|
-
return
|
|
48755
|
+
return _context16.abrupt("return", true);
|
|
48740
48756
|
case 9:
|
|
48741
48757
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
48742
48758
|
initSetState = this.getInitStateForSet();
|
|
48743
48759
|
this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
48744
|
-
|
|
48760
|
+
_context16.next = 14;
|
|
48745
48761
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
48746
48762
|
case 14:
|
|
48747
48763
|
set = this.actSet();
|
|
48748
48764
|
oldProductId = this.divaBasketHandler.actBasket.MatchingProductId || this.divaBasketHandler.actBasket.OrigProductId;
|
|
48749
48765
|
if (!(oldProductId && set && set !== null && set !== void 0 && set.api.doCheckForProductsPrice())) {
|
|
48750
|
-
|
|
48766
|
+
_context16.next = 27;
|
|
48751
48767
|
break;
|
|
48752
48768
|
}
|
|
48753
|
-
|
|
48769
|
+
_context16.next = 21;
|
|
48754
48770
|
return this.divaBasketHandler.getProduct(this.api, oldProductId);
|
|
48755
48771
|
case 21:
|
|
48756
|
-
result =
|
|
48772
|
+
result = _context16.sent;
|
|
48757
48773
|
if (result) productHandlerInstance.handleFountMatchingProducts(set, [result], set.setHash);
|
|
48758
48774
|
(_result$customData$SA = result === null || result === void 0 || (_result$customData = result.customData) === null || _result$customData === void 0 || (_result$customData = _result$customData.SAP) === null || _result$customData === void 0 ? void 0 : _result$customData.SAP_MARA_MATKL) !== null && _result$customData$SA !== void 0 ? _result$customData$SA : result === null || result === void 0 || (_result$customData2 = result.customData) === null || _result$customData2 === void 0 || (_result$customData2 = _result$customData2.SAP_MARA_MATKL) === null || _result$customData2 === void 0 ? void 0 : _result$customData2.value;
|
|
48759
48775
|
(_result$customData$SA2 = result === null || result === void 0 || (_result$customData3 = result.customData) === null || _result$customData3 === void 0 || (_result$customData3 = _result$customData3.SAP) === null || _result$customData3 === void 0 ? void 0 : _result$customData3.SAP_MARA_PRDHA) !== null && _result$customData$SA2 !== void 0 ? _result$customData$SA2 : result === null || result === void 0 || (_result$customData4 = result.customData) === null || _result$customData4 === void 0 || (_result$customData4 = _result$customData4.SAP_MARA_PRDHA) === null || _result$customData4 === void 0 ? void 0 : _result$customData4.value;
|
|
48760
|
-
|
|
48776
|
+
_context16.next = 28;
|
|
48761
48777
|
break;
|
|
48762
48778
|
case 27:
|
|
48763
48779
|
if (typeof loadSuccessful != 'boolean' && set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
@@ -48766,10 +48782,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48766
48782
|
}
|
|
48767
48783
|
}
|
|
48768
48784
|
case 28:
|
|
48769
|
-
|
|
48785
|
+
_context16.next = 30;
|
|
48770
48786
|
return viewReadyPromise;
|
|
48771
48787
|
case 30:
|
|
48772
|
-
|
|
48788
|
+
_context16.next = 32;
|
|
48773
48789
|
return this.initView();
|
|
48774
48790
|
case 32:
|
|
48775
48791
|
(_this$actions17 = this.actions) === null || _this$actions17 === void 0 || _this$actions17.onEvent({
|
|
@@ -48806,15 +48822,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48806
48822
|
}, false);
|
|
48807
48823
|
this.configuratorChangeLog('onConfigurationInit', undefined, true);
|
|
48808
48824
|
this.plannerChangeLog('onInitPlanner', true);
|
|
48809
|
-
|
|
48825
|
+
_context16.next = 43;
|
|
48810
48826
|
return this.fillBaksetforOnWebPlanerConfigChange(undefined, true);
|
|
48811
48827
|
case 43:
|
|
48812
|
-
return
|
|
48828
|
+
return _context16.abrupt("return", true);
|
|
48813
48829
|
case 44:
|
|
48814
48830
|
case "end":
|
|
48815
|
-
return
|
|
48831
|
+
return _context16.stop();
|
|
48816
48832
|
}
|
|
48817
|
-
},
|
|
48833
|
+
}, _callee16, this);
|
|
48818
48834
|
}));
|
|
48819
48835
|
function initializeSets(_x56, _x57) {
|
|
48820
48836
|
return _initializeSets.apply(this, arguments);
|
|
@@ -48975,24 +48991,24 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48975
48991
|
}, {
|
|
48976
48992
|
key: "initView",
|
|
48977
48993
|
value: (function () {
|
|
48978
|
-
var _initView = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
48994
|
+
var _initView = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee17() {
|
|
48979
48995
|
var _this$initConfigurato;
|
|
48980
48996
|
var set, plannerMode, _this$initConfigurato2, _this$initPlannerView, _this$initConfigurato3, _this$updateViewButto, _this$updateViewPlann9, _this$onBasketInitial;
|
|
48981
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
48982
|
-
while (1) switch (
|
|
48997
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee17$(_context17) {
|
|
48998
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
48983
48999
|
case 0:
|
|
48984
49000
|
set = this.actSet();
|
|
48985
49001
|
plannerMode = this.getPlannerMode();
|
|
48986
49002
|
(_this$initConfigurato = this.initConfiguratorMode) === null || _this$initConfigurato === void 0 || _this$initConfigurato.call(this, plannerMode);
|
|
48987
49003
|
if (!(plannerMode == 'ProductList')) {
|
|
48988
|
-
|
|
49004
|
+
_context17.next = 7;
|
|
48989
49005
|
break;
|
|
48990
49006
|
}
|
|
48991
49007
|
(_this$initConfigurato2 = this.initConfiguratorStructure) === null || _this$initConfigurato2 === void 0 || _this$initConfigurato2.call(this, setHandlerInstance.loadConfigStructureForOnlyProductsList());
|
|
48992
|
-
|
|
49008
|
+
_context17.next = 17;
|
|
48993
49009
|
break;
|
|
48994
49010
|
case 7:
|
|
48995
|
-
|
|
49011
|
+
_context17.next = 9;
|
|
48996
49012
|
return (_this$initPlannerView = this.initPlannerView) === null || _this$initPlannerView === void 0 ? void 0 : _this$initPlannerView.call(this);
|
|
48997
49013
|
case 9:
|
|
48998
49014
|
//first load the Configuratorstructure STARTCONFIG
|
|
@@ -49006,13 +49022,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49006
49022
|
(_this$onBasketInitial = this.onBasketInitialized) === null || _this$onBasketInitial === void 0 || _this$onBasketInitial.call(this);
|
|
49007
49023
|
this.checkMatchingProducts('onInit');
|
|
49008
49024
|
case 17:
|
|
49009
|
-
|
|
49025
|
+
_context17.next = 19;
|
|
49010
49026
|
return this.runInitMode(plannerMode);
|
|
49011
49027
|
case 19:
|
|
49012
49028
|
case "end":
|
|
49013
|
-
return
|
|
49029
|
+
return _context17.stop();
|
|
49014
49030
|
}
|
|
49015
|
-
},
|
|
49031
|
+
}, _callee17, this);
|
|
49016
49032
|
}));
|
|
49017
49033
|
function initView() {
|
|
49018
49034
|
return _initView.apply(this, arguments);
|
|
@@ -49033,25 +49049,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49033
49049
|
}, {
|
|
49034
49050
|
key: "runInitMode",
|
|
49035
49051
|
value: function () {
|
|
49036
|
-
var _runInitMode = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
49052
|
+
var _runInitMode = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee18(plannerMode) {
|
|
49037
49053
|
var _this$plannerConfig$i, _this$state5;
|
|
49038
49054
|
var doDefault, _this$navigateToTabGr2, _this$saveToBasketWra, configStepKey, _this$navigateToConfi, _this$actSet5, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
|
|
49039
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
49040
|
-
while (1) switch (
|
|
49055
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee18$(_context18) {
|
|
49056
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
49041
49057
|
case 0:
|
|
49042
49058
|
doDefault = true;
|
|
49043
49059
|
if (!['SHOW_PDF'].includes((_this$plannerConfig$i = this.plannerConfig.initMode) !== null && _this$plannerConfig$i !== void 0 ? _this$plannerConfig$i : '')) {
|
|
49044
|
-
|
|
49060
|
+
_context18.next = 9;
|
|
49045
49061
|
break;
|
|
49046
49062
|
}
|
|
49047
49063
|
if (this.plannerConfig.initMode == 'SHOW_PDF') this.ReturnTo = 'OPEN_PDF';
|
|
49048
49064
|
(_this$navigateToTabGr2 = this.navigateToTabGroup) === null || _this$navigateToTabGr2 === void 0 || _this$navigateToTabGr2.call(this, 'SUMMARY', undefined, true);
|
|
49049
49065
|
//TODO lea bug das hier ist nur ein temporäre lößung https://app.asana.com/0/1200869909950432/1200998848659806
|
|
49050
|
-
|
|
49066
|
+
_context18.next = 6;
|
|
49051
49067
|
return (_this$saveToBasketWra = this.saveToBasketWrapper) === null || _this$saveToBasketWra === void 0 ? void 0 : _this$saveToBasketWra.call(this);
|
|
49052
49068
|
case 6:
|
|
49053
49069
|
doDefault = false;
|
|
49054
|
-
|
|
49070
|
+
_context18.next = 10;
|
|
49055
49071
|
break;
|
|
49056
49072
|
case 9:
|
|
49057
49073
|
if (this.plannerConfig.initMode == 'OPENCONFIGTABGROUP' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER_ONLY_MOBILE' && (_this$state5 = this.state) !== null && _this$state5 !== void 0 && _this$state5.dimensions.isMobile) {
|
|
@@ -49075,9 +49091,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49075
49091
|
}
|
|
49076
49092
|
case 11:
|
|
49077
49093
|
case "end":
|
|
49078
|
-
return
|
|
49094
|
+
return _context18.stop();
|
|
49079
49095
|
}
|
|
49080
|
-
},
|
|
49096
|
+
}, _callee18, this);
|
|
49081
49097
|
}));
|
|
49082
49098
|
function runInitMode(_x58) {
|
|
49083
49099
|
return _runInitMode.apply(this, arguments);
|
|
@@ -49087,16 +49103,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49087
49103
|
}, {
|
|
49088
49104
|
key: "addSetToActPlanningByDivaNr",
|
|
49089
49105
|
value: function () {
|
|
49090
|
-
var _addSetToActPlanningByDivaNr = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
49106
|
+
var _addSetToActPlanningByDivaNr = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee19(divaNr) {
|
|
49091
49107
|
var _this$updateViewPlann10;
|
|
49092
49108
|
var set, orderSets, i, orderset, lastSetToInitialize, loadedSet, articlesKeys;
|
|
49093
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
49094
|
-
while (1) switch (
|
|
49109
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee19$(_context19) {
|
|
49110
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
49095
49111
|
case 0:
|
|
49096
49112
|
set = this.actSet();
|
|
49097
49113
|
this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
49098
49114
|
this.divaBasketHandler.setIgnoreInitObjectWhenInitializing();
|
|
49099
|
-
|
|
49115
|
+
_context19.next = 5;
|
|
49100
49116
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
49101
49117
|
case 5:
|
|
49102
49118
|
orderSets = this.divaBasketHandler.actBasket.OrderSets;
|
|
@@ -49104,30 +49120,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49104
49120
|
i = 0;
|
|
49105
49121
|
case 8:
|
|
49106
49122
|
if (!(i < orderSets.length)) {
|
|
49107
|
-
|
|
49123
|
+
_context19.next = 24;
|
|
49108
49124
|
break;
|
|
49109
49125
|
}
|
|
49110
49126
|
orderset = orderSets[i];
|
|
49111
49127
|
lastSetToInitialize = setHandlerInstance.getOrderSetShouldInitPlanner(orderSets, i);
|
|
49112
49128
|
loadedSet = setHandlerInstance.findLoadedSet(this.sets, orderset.CatalogCodex, orderset.AccountGUID);
|
|
49113
49129
|
if (!loadedSet) {
|
|
49114
|
-
|
|
49130
|
+
_context19.next = 18;
|
|
49115
49131
|
break;
|
|
49116
49132
|
}
|
|
49117
|
-
|
|
49133
|
+
_context19.next = 15;
|
|
49118
49134
|
return setHandlerInstance.addOrderSetArticlesToExistingSet(loadedSet, orderset, lastSetToInitialize);
|
|
49119
49135
|
case 15:
|
|
49120
49136
|
this.checkMatchingProducts('onAdd');
|
|
49121
|
-
|
|
49137
|
+
_context19.next = 20;
|
|
49122
49138
|
break;
|
|
49123
49139
|
case 18:
|
|
49124
|
-
|
|
49140
|
+
_context19.next = 20;
|
|
49125
49141
|
return setHandlerInstance.initSet(orderset, this.getInitStateForSet(), lastSetToInitialize);
|
|
49126
49142
|
case 20:
|
|
49127
49143
|
this.cleanUpEmptySets(true);
|
|
49128
49144
|
case 21:
|
|
49129
49145
|
i++;
|
|
49130
|
-
|
|
49146
|
+
_context19.next = 8;
|
|
49131
49147
|
break;
|
|
49132
49148
|
case 24:
|
|
49133
49149
|
this.divaBasketHandler.actBasket.OrderSets = [];
|
|
@@ -49139,9 +49155,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49139
49155
|
this.loadPaletteInfos(undefined, [articlesKeys[0]], articlesKeys);
|
|
49140
49156
|
case 31:
|
|
49141
49157
|
case "end":
|
|
49142
|
-
return
|
|
49158
|
+
return _context19.stop();
|
|
49143
49159
|
}
|
|
49144
|
-
},
|
|
49160
|
+
}, _callee19, this);
|
|
49145
49161
|
}));
|
|
49146
49162
|
function addSetToActPlanningByDivaNr(_x59) {
|
|
49147
49163
|
return _addSetToActPlanningByDivaNr.apply(this, arguments);
|
|
@@ -49176,26 +49192,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49176
49192
|
}, {
|
|
49177
49193
|
key: "setActSetCurConfigStepKey",
|
|
49178
49194
|
value: function () {
|
|
49179
|
-
var _setActSetCurConfigStepKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
49195
|
+
var _setActSetCurConfigStepKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee20(curConfigStepKey) {
|
|
49180
49196
|
var set;
|
|
49181
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
49182
|
-
while (1) switch (
|
|
49197
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee20$(_context20) {
|
|
49198
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
49183
49199
|
case 0:
|
|
49184
49200
|
set = this.actSet();
|
|
49185
49201
|
if (set) {
|
|
49186
|
-
|
|
49202
|
+
_context20.next = 3;
|
|
49187
49203
|
break;
|
|
49188
49204
|
}
|
|
49189
|
-
return
|
|
49205
|
+
return _context20.abrupt("return");
|
|
49190
49206
|
case 3:
|
|
49191
49207
|
set.ActConfigStepKey = curConfigStepKey;
|
|
49192
|
-
|
|
49208
|
+
_context20.next = 6;
|
|
49193
49209
|
return setHandlerInstance.updateNavigation(set);
|
|
49194
49210
|
case 6:
|
|
49195
49211
|
case "end":
|
|
49196
|
-
return
|
|
49212
|
+
return _context20.stop();
|
|
49197
49213
|
}
|
|
49198
|
-
},
|
|
49214
|
+
}, _callee20, this);
|
|
49199
49215
|
}));
|
|
49200
49216
|
function setActSetCurConfigStepKey(_x60) {
|
|
49201
49217
|
return _setActSetCurConfigStepKey.apply(this, arguments);
|
|
@@ -49290,7 +49306,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49290
49306
|
if (boundingBox) {
|
|
49291
49307
|
var _this$updateViewPlann11;
|
|
49292
49308
|
(_this$updateViewPlann11 = this.updateViewPlannerElements) === null || _this$updateViewPlann11 === void 0 || _this$updateViewPlann11.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
49293
|
-
this.
|
|
49309
|
+
this.start2DRender(boundingBox);
|
|
49294
49310
|
}
|
|
49295
49311
|
if (['3DImage', '3DCOMB'].includes(this.getInitPlannerViewMode())) {
|
|
49296
49312
|
var _this$getDoShow3DDime5;
|
|
@@ -49327,6 +49343,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49327
49343
|
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), renderSavingMode, (_this$getDoShow3DDime7 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime7 === void 0 ? void 0 : _this$getDoShow3DDime7.call(this), undefined, undefined, false);
|
|
49328
49344
|
}
|
|
49329
49345
|
}
|
|
49346
|
+
}, {
|
|
49347
|
+
key: "start2DRender",
|
|
49348
|
+
value:
|
|
49349
|
+
/**
|
|
49350
|
+
* Starts a 2D-grid render and remembers it for {@link getPlanning2DAsJpg}.
|
|
49351
|
+
* The rejection MUST be swallowed: the cached promise is awaited by every later capture, so one failed render would break every following save.
|
|
49352
|
+
*/
|
|
49353
|
+
function start2DRender(boundingBox) {
|
|
49354
|
+
var _this$updatePlanner2D;
|
|
49355
|
+
this.pending2DRender = Promise.resolve((_this$updatePlanner2D = this.updatePlanner2DGrid) === null || _this$updatePlanner2D === void 0 ? void 0 : _this$updatePlanner2D.call(this, boundingBox))["catch"](function (error) {
|
|
49356
|
+
LOG$2.error(error instanceof Error ? error : new Error('2D grid render failed: ' + String(error)));
|
|
49357
|
+
});
|
|
49358
|
+
}
|
|
49330
49359
|
}, {
|
|
49331
49360
|
key: "getAlternateRenderingsForSummary",
|
|
49332
49361
|
value: function getAlternateRenderingsForSummary() {
|
|
@@ -49387,17 +49416,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49387
49416
|
}, {
|
|
49388
49417
|
key: "deletePlannerElement",
|
|
49389
49418
|
value: function () {
|
|
49390
|
-
var _deletePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
49419
|
+
var _deletePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee21(setId, elementId, denyElementSelectionClear) {
|
|
49391
49420
|
var _this$updateViewPlann12;
|
|
49392
49421
|
var set, result, _this$updateElementSe5, _this$updateElementSe6;
|
|
49393
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
49394
|
-
while (1) switch (
|
|
49422
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee21$(_context21) {
|
|
49423
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
49395
49424
|
case 0:
|
|
49396
49425
|
set = this.sets[setId];
|
|
49397
|
-
|
|
49426
|
+
_context21.next = 3;
|
|
49398
49427
|
return setHandlerInstance.deleteElementFromSetByElemId(set, elementId, true);
|
|
49399
49428
|
case 3:
|
|
49400
|
-
result =
|
|
49429
|
+
result = _context21.sent;
|
|
49401
49430
|
this.updateConfigStructure();
|
|
49402
49431
|
(_this$updateViewPlann12 = this.updateViewPlannerElements) === null || _this$updateViewPlann12 === void 0 || _this$updateViewPlann12.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
49403
49432
|
this.updatePlannerView('DELETE_PLANNER_ELEMENT');
|
|
@@ -49408,15 +49437,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49408
49437
|
}
|
|
49409
49438
|
this.updatePriceInView();
|
|
49410
49439
|
this.checkMatchingProducts('onDelete');
|
|
49411
|
-
|
|
49440
|
+
_context21.next = 14;
|
|
49412
49441
|
return this.getFreePlacesOnGrids(undefined, 'deleteElement');
|
|
49413
49442
|
case 14:
|
|
49414
49443
|
this.plannerChangeLog('onDeletePlanner');
|
|
49415
49444
|
case 15:
|
|
49416
49445
|
case "end":
|
|
49417
|
-
return
|
|
49446
|
+
return _context21.stop();
|
|
49418
49447
|
}
|
|
49419
|
-
},
|
|
49448
|
+
}, _callee21, this);
|
|
49420
49449
|
}));
|
|
49421
49450
|
function deletePlannerElement(_x61, _x62, _x63) {
|
|
49422
49451
|
return _deletePlannerElement.apply(this, arguments);
|
|
@@ -49431,14 +49460,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49431
49460
|
}, {
|
|
49432
49461
|
key: "movePlannerElement",
|
|
49433
49462
|
value: (function () {
|
|
49434
|
-
var _movePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
49463
|
+
var _movePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee22(setId, elementId, curConfigKey, absoluteIndex) {
|
|
49435
49464
|
var _this$updateViewPlann13;
|
|
49436
49465
|
var set;
|
|
49437
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
49438
|
-
while (1) switch (
|
|
49466
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee22$(_context22) {
|
|
49467
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
49439
49468
|
case 0:
|
|
49440
49469
|
set = this.sets[setId];
|
|
49441
|
-
|
|
49470
|
+
_context22.next = 3;
|
|
49442
49471
|
return setHandlerInstance.movePlannerElement(set, elementId, absoluteIndex);
|
|
49443
49472
|
case 3:
|
|
49444
49473
|
this.updateConfigStructure();
|
|
@@ -49448,9 +49477,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49448
49477
|
this.updateViewButtonsDependigOnConfigStructure();
|
|
49449
49478
|
case 8:
|
|
49450
49479
|
case "end":
|
|
49451
|
-
return
|
|
49480
|
+
return _context22.stop();
|
|
49452
49481
|
}
|
|
49453
|
-
},
|
|
49482
|
+
}, _callee22, this);
|
|
49454
49483
|
}));
|
|
49455
49484
|
function movePlannerElement(_x64, _x65, _x66, _x67) {
|
|
49456
49485
|
return _movePlannerElement.apply(this, arguments);
|
|
@@ -49467,23 +49496,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49467
49496
|
}, {
|
|
49468
49497
|
key: "copyPlannerElement",
|
|
49469
49498
|
value: (function () {
|
|
49470
|
-
var _copyPlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
49499
|
+
var _copyPlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee23(setId, elementId, curConfigKey, copyInfo) {
|
|
49471
49500
|
var _this$updateViewPlann14;
|
|
49472
49501
|
var set, newSelectedArticle, newConfigStepKey, _this$updateElementSe7, baseArticle;
|
|
49473
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
49474
|
-
while (1) switch (
|
|
49502
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee23$(_context23) {
|
|
49503
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
49475
49504
|
case 0:
|
|
49476
49505
|
if (copyInfo) {
|
|
49477
|
-
|
|
49506
|
+
_context23.next = 2;
|
|
49478
49507
|
break;
|
|
49479
49508
|
}
|
|
49480
|
-
return
|
|
49509
|
+
return _context23.abrupt("return");
|
|
49481
49510
|
case 2:
|
|
49482
49511
|
set = this.sets[setId];
|
|
49483
|
-
|
|
49512
|
+
_context23.next = 5;
|
|
49484
49513
|
return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
|
|
49485
49514
|
case 5:
|
|
49486
|
-
newSelectedArticle =
|
|
49515
|
+
newSelectedArticle = _context23.sent;
|
|
49487
49516
|
this.updateConfigStructure();
|
|
49488
49517
|
(_this$updateViewPlann14 = this.updateViewPlannerElements) === null || _this$updateViewPlann14 === void 0 || _this$updateViewPlann14.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
49489
49518
|
this.updatePlannerView('COPY_PLANNER_ELEMENT');
|
|
@@ -49497,12 +49526,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49497
49526
|
(_this$updateElementSe7 = this.updateElementSelectionPlanner) === null || _this$updateElementSe7 === void 0 || _this$updateElementSe7.call(this, [baseArticle.setId], [baseArticle.elementId], true);
|
|
49498
49527
|
}
|
|
49499
49528
|
this.checkMatchingProducts('onCopy');
|
|
49500
|
-
return
|
|
49529
|
+
return _context23.abrupt("return", newConfigStepKey);
|
|
49501
49530
|
case 15:
|
|
49502
49531
|
case "end":
|
|
49503
|
-
return
|
|
49532
|
+
return _context23.stop();
|
|
49504
49533
|
}
|
|
49505
|
-
},
|
|
49534
|
+
}, _callee23, this);
|
|
49506
49535
|
}));
|
|
49507
49536
|
function copyPlannerElement(_x68, _x69, _x70, _x71) {
|
|
49508
49537
|
return _copyPlannerElement.apply(this, arguments);
|
|
@@ -49533,48 +49562,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49533
49562
|
}, {
|
|
49534
49563
|
key: "getFreePlacesOnGrids",
|
|
49535
49564
|
value: function () {
|
|
49536
|
-
var _getFreePlacesOnGrids = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
49565
|
+
var _getFreePlacesOnGrids = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee24(gridGroup, from) {
|
|
49537
49566
|
var _this$updateFreePlace;
|
|
49538
49567
|
var set, freeShelfGrids, plannedShelfGrids;
|
|
49539
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
49540
|
-
while (1) switch (
|
|
49568
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee24$(_context24) {
|
|
49569
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
49541
49570
|
case 0:
|
|
49542
49571
|
set = this.actSet();
|
|
49543
49572
|
if (set) {
|
|
49544
|
-
|
|
49573
|
+
_context24.next = 3;
|
|
49545
49574
|
break;
|
|
49546
49575
|
}
|
|
49547
49576
|
throw new Error('getFreePlacesOnGrids: act set is not defined!');
|
|
49548
49577
|
case 3:
|
|
49549
49578
|
if (!gridGroup) {
|
|
49550
|
-
|
|
49579
|
+
_context24.next = 9;
|
|
49551
49580
|
break;
|
|
49552
49581
|
}
|
|
49553
|
-
|
|
49582
|
+
_context24.next = 6;
|
|
49554
49583
|
return setHandlerInstance.getFreeShelfGrids(set, gridGroup);
|
|
49555
49584
|
case 6:
|
|
49556
|
-
|
|
49557
|
-
|
|
49585
|
+
_context24.t0 = _context24.sent;
|
|
49586
|
+
_context24.next = 10;
|
|
49558
49587
|
break;
|
|
49559
49588
|
case 9:
|
|
49560
|
-
|
|
49589
|
+
_context24.t0 = undefined;
|
|
49561
49590
|
case 10:
|
|
49562
|
-
freeShelfGrids =
|
|
49591
|
+
freeShelfGrids = _context24.t0;
|
|
49563
49592
|
plannedShelfGrids = setHandlerInstance.getPlannedShelfGrids(set);
|
|
49564
49593
|
LOG$2.debug('update free from: ' + from, 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
|
|
49565
49594
|
(_this$updateFreePlace = this.updateFreePlacesOnGrids) === null || _this$updateFreePlace === void 0 || _this$updateFreePlace.call(this, {
|
|
49566
49595
|
freeShelfGrids: freeShelfGrids,
|
|
49567
49596
|
plannedShelfGrids: plannedShelfGrids
|
|
49568
49597
|
});
|
|
49569
|
-
return
|
|
49598
|
+
return _context24.abrupt("return", {
|
|
49570
49599
|
freeShelfGrids: freeShelfGrids,
|
|
49571
49600
|
plannedShelfGrids: plannedShelfGrids
|
|
49572
49601
|
});
|
|
49573
49602
|
case 15:
|
|
49574
49603
|
case "end":
|
|
49575
|
-
return
|
|
49604
|
+
return _context24.stop();
|
|
49576
49605
|
}
|
|
49577
|
-
},
|
|
49606
|
+
}, _callee24, this);
|
|
49578
49607
|
}));
|
|
49579
49608
|
function getFreePlacesOnGrids(_x72, _x73) {
|
|
49580
49609
|
return _getFreePlacesOnGrids.apply(this, arguments);
|
|
@@ -49592,34 +49621,34 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49592
49621
|
}, {
|
|
49593
49622
|
key: "moveShelfItemToGrid",
|
|
49594
49623
|
value: function () {
|
|
49595
|
-
var _moveShelfItemToGrid = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
49624
|
+
var _moveShelfItemToGrid = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee25(accessoireBasketId, parentBasketId, gridName, cellIndex) {
|
|
49596
49625
|
var set, newGridId;
|
|
49597
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
49598
|
-
while (1) switch (
|
|
49626
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee25$(_context25) {
|
|
49627
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
49599
49628
|
case 0:
|
|
49600
49629
|
set = this.actSet();
|
|
49601
49630
|
if (set) {
|
|
49602
|
-
|
|
49631
|
+
_context25.next = 3;
|
|
49603
49632
|
break;
|
|
49604
49633
|
}
|
|
49605
|
-
return
|
|
49634
|
+
return _context25.abrupt("return");
|
|
49606
49635
|
case 3:
|
|
49607
|
-
|
|
49636
|
+
_context25.next = 5;
|
|
49608
49637
|
return setHandlerInstance.moveShelfItemToGrid(set, accessoireBasketId, parentBasketId, gridName, cellIndex);
|
|
49609
49638
|
case 5:
|
|
49610
|
-
newGridId =
|
|
49639
|
+
newGridId = _context25.sent;
|
|
49611
49640
|
this.updatePlannerView('MOVE_SHELF_ITEM');
|
|
49612
49641
|
if (!newGridId) {
|
|
49613
|
-
|
|
49642
|
+
_context25.next = 10;
|
|
49614
49643
|
break;
|
|
49615
49644
|
}
|
|
49616
|
-
|
|
49645
|
+
_context25.next = 10;
|
|
49617
49646
|
return this.getFreePlacesOnGrids(newGridId, 'move shelf');
|
|
49618
49647
|
case 10:
|
|
49619
49648
|
case "end":
|
|
49620
|
-
return
|
|
49649
|
+
return _context25.stop();
|
|
49621
49650
|
}
|
|
49622
|
-
},
|
|
49651
|
+
}, _callee25, this);
|
|
49623
49652
|
}));
|
|
49624
49653
|
function moveShelfItemToGrid(_x74, _x75, _x76, _x77) {
|
|
49625
49654
|
return _moveShelfItemToGrid.apply(this, arguments);
|
|
@@ -49643,25 +49672,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49643
49672
|
}, {
|
|
49644
49673
|
key: "resetArticle",
|
|
49645
49674
|
value: function () {
|
|
49646
|
-
var _resetArticle = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
49675
|
+
var _resetArticle = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee26(basketId) {
|
|
49647
49676
|
var set;
|
|
49648
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
49649
|
-
while (1) switch (
|
|
49677
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee26$(_context26) {
|
|
49678
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
49650
49679
|
case 0:
|
|
49651
49680
|
set = this.actSet();
|
|
49652
49681
|
if (set) {
|
|
49653
|
-
|
|
49682
|
+
_context26.next = 3;
|
|
49654
49683
|
break;
|
|
49655
49684
|
}
|
|
49656
|
-
return
|
|
49685
|
+
return _context26.abrupt("return");
|
|
49657
49686
|
case 3:
|
|
49658
|
-
|
|
49687
|
+
_context26.next = 5;
|
|
49659
49688
|
return setHandlerInstance.resetArticle(set, basketId);
|
|
49660
49689
|
case 5:
|
|
49661
49690
|
case "end":
|
|
49662
|
-
return
|
|
49691
|
+
return _context26.stop();
|
|
49663
49692
|
}
|
|
49664
|
-
},
|
|
49693
|
+
}, _callee26, this);
|
|
49665
49694
|
}));
|
|
49666
49695
|
function resetArticle(_x78) {
|
|
49667
49696
|
return _resetArticle.apply(this, arguments);
|
|
@@ -49693,10 +49722,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49693
49722
|
}, {
|
|
49694
49723
|
key: "checkMatchingProducts",
|
|
49695
49724
|
value: function () {
|
|
49696
|
-
var _checkMatchingProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
49725
|
+
var _checkMatchingProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee27(from) {
|
|
49697
49726
|
var set, _set$getMatchingProdu, _set$getMatchingOrigP, _set$getMatchingOrigP2, _set$getMatchingProdu2;
|
|
49698
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
49699
|
-
while (1) switch (
|
|
49727
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee27$(_context27) {
|
|
49728
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
49700
49729
|
case 0:
|
|
49701
49730
|
set = this.actSet();
|
|
49702
49731
|
if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
@@ -49710,18 +49739,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49710
49739
|
}
|
|
49711
49740
|
}
|
|
49712
49741
|
if (!(set !== null && set !== void 0 && set.api.doCheckForProductsMatch())) {
|
|
49713
|
-
|
|
49742
|
+
_context27.next = 6;
|
|
49714
49743
|
break;
|
|
49715
49744
|
}
|
|
49716
|
-
|
|
49745
|
+
_context27.next = 5;
|
|
49717
49746
|
return productHandlerInstance.updateProducts(this.setsAsArray, this.api, this.divaBasketHandler.divaWWSHandler, from);
|
|
49718
49747
|
case 5:
|
|
49719
49748
|
this.updatePriceInView();
|
|
49720
49749
|
case 6:
|
|
49721
49750
|
case "end":
|
|
49722
|
-
return
|
|
49751
|
+
return _context27.stop();
|
|
49723
49752
|
}
|
|
49724
|
-
},
|
|
49753
|
+
}, _callee27, this);
|
|
49725
49754
|
}));
|
|
49726
49755
|
function checkMatchingProducts(_x79) {
|
|
49727
49756
|
return _checkMatchingProducts.apply(this, arguments);
|
|
@@ -49800,7 +49829,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49800
49829
|
}, {
|
|
49801
49830
|
key: "saveToBasketWrapper",
|
|
49802
49831
|
value: function () {
|
|
49803
|
-
var _saveToBasketWrapper = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
49832
|
+
var _saveToBasketWrapper = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee28(event, repairOnly, returnToParam, hideLoading) {
|
|
49804
49833
|
var _this$actions28,
|
|
49805
49834
|
_this$actions28$toggl,
|
|
49806
49835
|
_this$actions29,
|
|
@@ -49809,8 +49838,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49809
49838
|
_this$actions33,
|
|
49810
49839
|
_this$i18n18;
|
|
49811
49840
|
var returnTo, finalEvent, result, _this$actions30, _this$i18n12, _this$i18n13, _this$actions31, _this$i18n14, _this$i18n15, _this$actions32, _this$i18n16, _this$i18n17, _this$updatePlannerMs2;
|
|
49812
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
49813
|
-
while (1) switch (
|
|
49841
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee28$(_context28) {
|
|
49842
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
49814
49843
|
case 0:
|
|
49815
49844
|
returnTo = returnToParam !== null && returnToParam !== void 0 ? returnToParam : this.getReturnTo(event);
|
|
49816
49845
|
finalEvent = {
|
|
@@ -49818,13 +49847,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49818
49847
|
saveBasket: true
|
|
49819
49848
|
};
|
|
49820
49849
|
if (!hideLoading) (_this$actions28 = this.actions) === null || _this$actions28 === void 0 || (_this$actions28$toggl = _this$actions28.toggleLoading) === null || _this$actions28$toggl === void 0 || _this$actions28$toggl.call(_this$actions28, 'Planner_Saving', false, true);
|
|
49821
|
-
|
|
49850
|
+
_context28.next = 5;
|
|
49822
49851
|
return this.saveToBasket(returnTo, finalEvent.event, repairOnly);
|
|
49823
49852
|
case 5:
|
|
49824
|
-
result =
|
|
49853
|
+
result = _context28.sent;
|
|
49825
49854
|
if (!hideLoading) (_this$actions29 = this.actions) === null || _this$actions29 === void 0 || (_this$actions29$toggl = _this$actions29.toggleLoading) === null || _this$actions29$toggl === void 0 || _this$actions29$toggl.call(_this$actions29, 'Planner_Saving', false, false);
|
|
49826
49855
|
if (!(result === 'canceled')) {
|
|
49827
|
-
|
|
49856
|
+
_context28.next = 11;
|
|
49828
49857
|
break;
|
|
49829
49858
|
}
|
|
49830
49859
|
LOG$2.error(new DivaUtils.DivaError('failed to save Basket'));
|
|
@@ -49832,10 +49861,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49832
49861
|
text: ((_this$i18n12 = this.i18n()) === null || _this$i18n12 === void 0 ? void 0 : _this$i18n12.t('modal.general_error')) + ' --- ' + DivaUtils__default["default"].formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils__default["default"].getCurrentTraceId() ? ((_this$i18n13 = this.i18n()) === null || _this$i18n13 === void 0 ? void 0 : _this$i18n13.t('modal.errorcode')) + ': ' + DivaUtils__default["default"].getCurrentTraceId() : '',
|
|
49833
49862
|
accept: true
|
|
49834
49863
|
});
|
|
49835
|
-
return
|
|
49864
|
+
return _context28.abrupt("return", result);
|
|
49836
49865
|
case 11:
|
|
49837
|
-
|
|
49838
|
-
|
|
49866
|
+
_context28.t0 = returnTo;
|
|
49867
|
+
_context28.next = _context28.t0 === 'OPEN_PDF' ? 14 : _context28.t0 === 'SAVE_BASKET_WITH_MODAL' ? 16 : _context28.t0 === 'OPEN_CONTACT_FORM' ? 17 : 17;
|
|
49839
49868
|
break;
|
|
49840
49869
|
case 14:
|
|
49841
49870
|
if (!this.getBasket().PDFDocumentURL) {
|
|
@@ -49855,7 +49884,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49855
49884
|
}
|
|
49856
49885
|
});
|
|
49857
49886
|
}
|
|
49858
|
-
return
|
|
49887
|
+
return _context28.abrupt("break", 17);
|
|
49859
49888
|
case 16:
|
|
49860
49889
|
(_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openModal({
|
|
49861
49890
|
text: (_this$i18n18 = this.i18n()) === null || _this$i18n18 === void 0 ? void 0 : _this$i18n18.t('modal.planning_saved'),
|
|
@@ -49863,18 +49892,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49863
49892
|
});
|
|
49864
49893
|
case 17:
|
|
49865
49894
|
if (!(result == 'noArticleToSave')) {
|
|
49866
|
-
|
|
49895
|
+
_context28.next = 20;
|
|
49867
49896
|
break;
|
|
49868
49897
|
}
|
|
49869
49898
|
(_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
|
|
49870
|
-
return
|
|
49899
|
+
return _context28.abrupt("return", 'canceled');
|
|
49871
49900
|
case 20:
|
|
49872
|
-
return
|
|
49901
|
+
return _context28.abrupt("return", result);
|
|
49873
49902
|
case 21:
|
|
49874
49903
|
case "end":
|
|
49875
|
-
return
|
|
49904
|
+
return _context28.stop();
|
|
49876
49905
|
}
|
|
49877
|
-
},
|
|
49906
|
+
}, _callee28, this);
|
|
49878
49907
|
}));
|
|
49879
49908
|
function saveToBasketWrapper(_x80, _x81, _x82, _x83) {
|
|
49880
49909
|
return _saveToBasketWrapper.apply(this, arguments);
|
|
@@ -49884,42 +49913,42 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49884
49913
|
}, {
|
|
49885
49914
|
key: "saveToBasket",
|
|
49886
49915
|
value: function () {
|
|
49887
|
-
var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
49916
|
+
var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(returnTo, event, repairOnly) {
|
|
49888
49917
|
var _returnTo, _returnTo2, _returnTo3, _this$actions34, _this$actions35, _this$divaBasketHandl2;
|
|
49889
49918
|
var set, actBasket, oldReturnTo, result, newDivaNr, _this$actSet10, arReady, _result, product;
|
|
49890
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
49891
|
-
while (1) switch (
|
|
49919
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee29$(_context29) {
|
|
49920
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
49892
49921
|
case 0:
|
|
49893
49922
|
set = this.actSet();
|
|
49894
49923
|
if (!setHandlerInstance.isNoArticleToSave(this.sets)) {
|
|
49895
|
-
|
|
49924
|
+
_context29.next = 3;
|
|
49896
49925
|
break;
|
|
49897
49926
|
}
|
|
49898
|
-
return
|
|
49927
|
+
return _context29.abrupt("return", 'noArticleToSave');
|
|
49899
49928
|
case 3:
|
|
49900
49929
|
actBasket = this.divaBasketHandler.actBasket;
|
|
49901
49930
|
if (!((_returnTo = returnTo) !== null && _returnTo !== void 0 && _returnTo.startsWith('FAVORITS') && favoritesHandlerInstance.FavoritesDefined(set))) {
|
|
49902
|
-
|
|
49931
|
+
_context29.next = 12;
|
|
49903
49932
|
break;
|
|
49904
49933
|
}
|
|
49905
49934
|
oldReturnTo = returnTo;
|
|
49906
49935
|
this.ReturnTo = returnTo.replace('FAVORITS_', '');
|
|
49907
|
-
|
|
49936
|
+
_context29.next = 9;
|
|
49908
49937
|
return this.handleFavorites('SAVE');
|
|
49909
49938
|
case 9:
|
|
49910
|
-
result =
|
|
49939
|
+
result = _context29.sent;
|
|
49911
49940
|
if (result === 'canceled') {
|
|
49912
49941
|
this.ReturnTo = oldReturnTo;
|
|
49913
49942
|
}
|
|
49914
|
-
return
|
|
49943
|
+
return _context29.abrupt("return", result);
|
|
49915
49944
|
case 12:
|
|
49916
|
-
|
|
49917
|
-
|
|
49918
|
-
|
|
49945
|
+
_context29.t0 = this.divaBasketHandler;
|
|
49946
|
+
_context29.t1 = this.divaBasketHandler.actDivaNr;
|
|
49947
|
+
_context29.next = 16;
|
|
49919
49948
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
|
|
49920
49949
|
case 16:
|
|
49921
|
-
|
|
49922
|
-
|
|
49950
|
+
_context29.t2 = _context29.sent;
|
|
49951
|
+
_context29.t0.setBasketData.call(_context29.t0, _context29.t1, _context29.t2);
|
|
49923
49952
|
if ((_returnTo2 = returnTo) !== null && _returnTo2 !== void 0 && _returnTo2.endsWith('OPEN_SELLER_BASKET')) {
|
|
49924
49953
|
this.ReturnTo = 'OPEN_SELLER_BASKET';
|
|
49925
49954
|
returnTo = this.ReturnTo;
|
|
@@ -49934,11 +49963,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49934
49963
|
this.divaBasketHandler.fillOrigConfigurations();
|
|
49935
49964
|
actBasket.Updated = Date.now();
|
|
49936
49965
|
if (!returnTo) {
|
|
49937
|
-
|
|
49966
|
+
_context29.next = 54;
|
|
49938
49967
|
break;
|
|
49939
49968
|
}
|
|
49940
|
-
|
|
49941
|
-
|
|
49969
|
+
_context29.t3 = returnTo;
|
|
49970
|
+
_context29.next = _context29.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 27 : _context29.t3 === 'OPEN_SELLER_BASKET' ? 29 : _context29.t3 === 'OPEN_PDF' ? 32 : _context29.t3 === 'SAVE_BASKET_WITH_MODAL' ? 32 : _context29.t3 === 'SAVE_BASKET' ? 32 : _context29.t3 === 'SAVE_BASKET_SYNC' ? 32 : _context29.t3 === 'SAVE_BASKET_ASYNC' ? 32 : 54;
|
|
49942
49971
|
break;
|
|
49943
49972
|
case 27:
|
|
49944
49973
|
(_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.openComponent({
|
|
@@ -49951,7 +49980,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49951
49980
|
basketData: actBasket
|
|
49952
49981
|
}
|
|
49953
49982
|
});
|
|
49954
|
-
return
|
|
49983
|
+
return _context29.abrupt("break", 54);
|
|
49955
49984
|
case 29:
|
|
49956
49985
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
49957
49986
|
actBasket.setDocumentVersion(actBasket.getDocumentVersion() + 1);
|
|
@@ -49966,26 +49995,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49966
49995
|
basketData: actBasket
|
|
49967
49996
|
}
|
|
49968
49997
|
});
|
|
49969
|
-
return
|
|
49998
|
+
return _context29.abrupt("break", 54);
|
|
49970
49999
|
case 32:
|
|
49971
50000
|
if (!(event == 'onSaveProduct')) {
|
|
49972
|
-
|
|
50001
|
+
_context29.next = 44;
|
|
49973
50002
|
break;
|
|
49974
50003
|
}
|
|
49975
|
-
|
|
50004
|
+
_context29.next = 35;
|
|
49976
50005
|
return setHandlerInstance.flushPendingUploadsViaMediaService(actBasket);
|
|
49977
50006
|
case 35:
|
|
49978
50007
|
//copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
|
|
49979
50008
|
actBasket = new basketModel.BasketData(JSON.parse(JSON.stringify(actBasket)));
|
|
49980
|
-
|
|
50009
|
+
_context29.next = 38;
|
|
49981
50010
|
return DivaUtils__default["default"].updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
|
|
49982
50011
|
case 38:
|
|
49983
|
-
|
|
50012
|
+
_context29.next = 40;
|
|
49984
50013
|
return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
|
|
49985
50014
|
case 40:
|
|
49986
|
-
newDivaNr =
|
|
50015
|
+
newDivaNr = _context29.sent;
|
|
49987
50016
|
actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
|
|
49988
|
-
|
|
50017
|
+
_context29.next = 53;
|
|
49989
50018
|
break;
|
|
49990
50019
|
case 44:
|
|
49991
50020
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
@@ -49995,30 +50024,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49995
50024
|
this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
|
|
49996
50025
|
actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
|
|
49997
50026
|
arReady = !!((_this$actSet10 = this.actSet()) !== null && _this$actSet10 !== void 0 && _this$actSet10.CatalogData.divaArReady);
|
|
49998
|
-
|
|
50027
|
+
_context29.next = 50;
|
|
49999
50028
|
return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo, arReady);
|
|
50000
50029
|
case 50:
|
|
50001
|
-
_result =
|
|
50030
|
+
_result = _context29.sent;
|
|
50002
50031
|
if (!(_result === 'ERROR_NO_BASKET_SAVED' || _result === 'ERROR_BASKET_AFTER_SAVE')) {
|
|
50003
|
-
|
|
50032
|
+
_context29.next = 53;
|
|
50004
50033
|
break;
|
|
50005
50034
|
}
|
|
50006
|
-
return
|
|
50035
|
+
return _context29.abrupt("return", 'canceled');
|
|
50007
50036
|
case 53:
|
|
50008
|
-
return
|
|
50037
|
+
return _context29.abrupt("break", 54);
|
|
50009
50038
|
case 54:
|
|
50010
50039
|
if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
|
|
50011
50040
|
actBasket = (_this$divaBasketHandl2 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl2 !== void 0 ? _this$divaBasketHandl2 : actBasket; //get pdf documenturl from saved basket
|
|
50012
|
-
|
|
50041
|
+
_context29.next = 58;
|
|
50013
50042
|
return this.addToBasket(actBasket, event);
|
|
50014
50043
|
case 58:
|
|
50015
|
-
product =
|
|
50016
|
-
return
|
|
50044
|
+
product = _context29.sent;
|
|
50045
|
+
return _context29.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
|
|
50017
50046
|
case 60:
|
|
50018
50047
|
case "end":
|
|
50019
|
-
return
|
|
50048
|
+
return _context29.stop();
|
|
50020
50049
|
}
|
|
50021
|
-
},
|
|
50050
|
+
}, _callee29, this);
|
|
50022
50051
|
}));
|
|
50023
50052
|
function saveToBasket(_x84, _x85, _x86) {
|
|
50024
50053
|
return _saveToBasket.apply(this, arguments);
|
|
@@ -50035,24 +50064,24 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50035
50064
|
}, {
|
|
50036
50065
|
key: "generateAiImageWithReferenceImages",
|
|
50037
50066
|
value: function () {
|
|
50038
|
-
var _generateAiImageWithReferenceImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
50067
|
+
var _generateAiImageWithReferenceImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30(data, leadKey) {
|
|
50039
50068
|
var _this$actSet11, _this$state6, _this$actSet12;
|
|
50040
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
50041
|
-
while (1) switch (
|
|
50069
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context30) {
|
|
50070
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
50042
50071
|
case 0:
|
|
50043
50072
|
(_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 || _this$actSet11.CatalogData.catalogCodex;
|
|
50044
|
-
|
|
50073
|
+
_context30.next = 3;
|
|
50045
50074
|
return this.api.generateAiImageWithReferenceImages(_objectSpread$8(_objectSpread$8({}, data), {}, {
|
|
50046
50075
|
userId: (_this$state6 = this.state) === null || _this$state6 === void 0 || (_this$state6 = _this$state6.user) === null || _this$state6 === void 0 ? void 0 : _this$state6._id,
|
|
50047
50076
|
catalogCodex: (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.CatalogData.catalogCodex
|
|
50048
50077
|
}), leadKey);
|
|
50049
50078
|
case 3:
|
|
50050
|
-
return
|
|
50079
|
+
return _context30.abrupt("return", _context30.sent);
|
|
50051
50080
|
case 4:
|
|
50052
50081
|
case "end":
|
|
50053
|
-
return
|
|
50082
|
+
return _context30.stop();
|
|
50054
50083
|
}
|
|
50055
|
-
},
|
|
50084
|
+
}, _callee30, this);
|
|
50056
50085
|
}));
|
|
50057
50086
|
function generateAiImageWithReferenceImages(_x87, _x88) {
|
|
50058
50087
|
return _generateAiImageWithReferenceImages.apply(this, arguments);
|
|
@@ -50062,25 +50091,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50062
50091
|
}, {
|
|
50063
50092
|
key: "getUsageLimits",
|
|
50064
50093
|
value: function () {
|
|
50065
|
-
var _getUsageLimits = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
50094
|
+
var _getUsageLimits = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31() {
|
|
50066
50095
|
var _localStorage$getItem, _localStorage;
|
|
50067
50096
|
var leadKey;
|
|
50068
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
50069
|
-
while (1) switch (
|
|
50097
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee31$(_context31) {
|
|
50098
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
50070
50099
|
case 0:
|
|
50071
50100
|
// Get lead key from localStorage if it exists (for anonymous users)
|
|
50072
50101
|
leadKey = (_localStorage$getItem = (_localStorage = localStorage) === null || _localStorage === void 0 ? void 0 : _localStorage.getItem('diva_lead_key')) !== null && _localStorage$getItem !== void 0 ? _localStorage$getItem : undefined;
|
|
50073
|
-
|
|
50102
|
+
_context31.next = 3;
|
|
50074
50103
|
return this.api.getUsageLimits(leadKey ? {
|
|
50075
50104
|
leadKey: leadKey
|
|
50076
50105
|
} : undefined);
|
|
50077
50106
|
case 3:
|
|
50078
|
-
return
|
|
50107
|
+
return _context31.abrupt("return", _context31.sent);
|
|
50079
50108
|
case 4:
|
|
50080
50109
|
case "end":
|
|
50081
|
-
return
|
|
50110
|
+
return _context31.stop();
|
|
50082
50111
|
}
|
|
50083
|
-
},
|
|
50112
|
+
}, _callee31, this);
|
|
50084
50113
|
}));
|
|
50085
50114
|
function getUsageLimits() {
|
|
50086
50115
|
return _getUsageLimits.apply(this, arguments);
|
|
@@ -50090,23 +50119,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50090
50119
|
}, {
|
|
50091
50120
|
key: "getAiRoomRenderings",
|
|
50092
50121
|
value: function () {
|
|
50093
|
-
var _getAiRoomRenderings = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
50122
|
+
var _getAiRoomRenderings = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee32() {
|
|
50094
50123
|
var _this$state7;
|
|
50095
50124
|
var organizationId, lang;
|
|
50096
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
50097
|
-
while (1) switch (
|
|
50125
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee32$(_context32) {
|
|
50126
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
50098
50127
|
case 0:
|
|
50099
50128
|
organizationId = (_this$state7 = this.state) === null || _this$state7 === void 0 ? void 0 : _this$state7.organization._id;
|
|
50100
50129
|
lang = this.api.getLanguage();
|
|
50101
|
-
|
|
50130
|
+
_context32.next = 4;
|
|
50102
50131
|
return this.api.getAiRoomRenderings(organizationId, lang !== null && lang !== void 0 ? lang : undefined);
|
|
50103
50132
|
case 4:
|
|
50104
|
-
return
|
|
50133
|
+
return _context32.abrupt("return", _context32.sent);
|
|
50105
50134
|
case 5:
|
|
50106
50135
|
case "end":
|
|
50107
|
-
return
|
|
50136
|
+
return _context32.stop();
|
|
50108
50137
|
}
|
|
50109
|
-
},
|
|
50138
|
+
}, _callee32, this);
|
|
50110
50139
|
}));
|
|
50111
50140
|
function getAiRoomRenderings() {
|
|
50112
50141
|
return _getAiRoomRenderings.apply(this, arguments);
|
|
@@ -50116,19 +50145,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50116
50145
|
}, {
|
|
50117
50146
|
key: "createLeadKey",
|
|
50118
50147
|
value: function () {
|
|
50119
|
-
var _createLeadKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
50120
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
50121
|
-
while (1) switch (
|
|
50148
|
+
var _createLeadKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee33(email) {
|
|
50149
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee33$(_context33) {
|
|
50150
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
50122
50151
|
case 0:
|
|
50123
|
-
|
|
50152
|
+
_context33.next = 2;
|
|
50124
50153
|
return this.api.createLeadKey(email);
|
|
50125
50154
|
case 2:
|
|
50126
|
-
return
|
|
50155
|
+
return _context33.abrupt("return", _context33.sent);
|
|
50127
50156
|
case 3:
|
|
50128
50157
|
case "end":
|
|
50129
|
-
return
|
|
50158
|
+
return _context33.stop();
|
|
50130
50159
|
}
|
|
50131
|
-
},
|
|
50160
|
+
}, _callee33, this);
|
|
50132
50161
|
}));
|
|
50133
50162
|
function createLeadKey(_x89) {
|
|
50134
50163
|
return _createLeadKey.apply(this, arguments);
|
|
@@ -50426,23 +50455,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50426
50455
|
}, {
|
|
50427
50456
|
key: "getBasketDataWithEkText",
|
|
50428
50457
|
value: function () {
|
|
50429
|
-
var _getBasketDataWithEkText = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
50430
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
50431
|
-
while (1) switch (
|
|
50458
|
+
var _getBasketDataWithEkText = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34() {
|
|
50459
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee34$(_context34) {
|
|
50460
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
50432
50461
|
case 0:
|
|
50433
|
-
|
|
50434
|
-
|
|
50435
|
-
|
|
50462
|
+
_context34.t0 = this.divaBasketHandler;
|
|
50463
|
+
_context34.t1 = this.divaBasketHandler.actDivaNr;
|
|
50464
|
+
_context34.next = 4;
|
|
50436
50465
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, true, this.doAllowSetPlanner(), this.ReturnTo);
|
|
50437
50466
|
case 4:
|
|
50438
|
-
|
|
50439
|
-
|
|
50440
|
-
return
|
|
50467
|
+
_context34.t2 = _context34.sent;
|
|
50468
|
+
_context34.t0.setBasketData.call(_context34.t0, _context34.t1, _context34.t2);
|
|
50469
|
+
return _context34.abrupt("return", this.divaBasketHandler.actBasket);
|
|
50441
50470
|
case 7:
|
|
50442
50471
|
case "end":
|
|
50443
|
-
return
|
|
50472
|
+
return _context34.stop();
|
|
50444
50473
|
}
|
|
50445
|
-
},
|
|
50474
|
+
}, _callee34, this);
|
|
50446
50475
|
}));
|
|
50447
50476
|
function getBasketDataWithEkText() {
|
|
50448
50477
|
return _getBasketDataWithEkText.apply(this, arguments);
|
|
@@ -50468,7 +50497,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50468
50497
|
}, {
|
|
50469
50498
|
key: "addToBasket",
|
|
50470
50499
|
value: function () {
|
|
50471
|
-
var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
50500
|
+
var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35(actBasket) {
|
|
50472
50501
|
var _this$actions36,
|
|
50473
50502
|
_this$actions37,
|
|
50474
50503
|
_this$actions38,
|
|
@@ -50487,44 +50516,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50487
50516
|
to,
|
|
50488
50517
|
variants,
|
|
50489
50518
|
products,
|
|
50490
|
-
|
|
50491
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
50492
|
-
while (1) switch (
|
|
50519
|
+
_args35 = arguments;
|
|
50520
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context35) {
|
|
50521
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
50493
50522
|
case 0:
|
|
50494
|
-
event =
|
|
50495
|
-
|
|
50496
|
-
|
|
50523
|
+
event = _args35.length > 1 && _args35[1] !== undefined ? _args35[1] : 'onAddToBasket';
|
|
50524
|
+
_context35.t0 = event;
|
|
50525
|
+
_context35.next = _context35.t0 === 'onWebPlanerPrint' ? 4 : _context35.t0 === 'onWebPlanerSave' ? 6 : _context35.t0 === 'onWebPlanerShare' ? 8 : _context35.t0 === 'onRequestConsulation' ? 10 : _context35.t0 === 'onSave' ? 12 : _context35.t0 === 'onSendEmail' ? 14 : _context35.t0 === 'onSaveProduct' ? 19 : _context35.t0 === 'dontSaveBasket' ? 26 : _context35.t0 === 'onAddToBasket' ? 26 : 28;
|
|
50497
50526
|
break;
|
|
50498
50527
|
case 4:
|
|
50499
50528
|
(_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
|
|
50500
50529
|
type: 'onWebPlanerPrint',
|
|
50501
50530
|
data: actBasket.getAsJson()
|
|
50502
50531
|
});
|
|
50503
|
-
return
|
|
50532
|
+
return _context35.abrupt("break", 30);
|
|
50504
50533
|
case 6:
|
|
50505
50534
|
(_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
|
|
50506
50535
|
type: 'onWebPlanerSave',
|
|
50507
50536
|
data: actBasket.getAsJson()
|
|
50508
50537
|
});
|
|
50509
|
-
return
|
|
50538
|
+
return _context35.abrupt("break", 30);
|
|
50510
50539
|
case 8:
|
|
50511
50540
|
(_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
|
|
50512
50541
|
type: 'onWebPlanerShare',
|
|
50513
50542
|
data: actBasket.getAsJson()
|
|
50514
50543
|
});
|
|
50515
|
-
return
|
|
50544
|
+
return _context35.abrupt("break", 30);
|
|
50516
50545
|
case 10:
|
|
50517
50546
|
(_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
|
|
50518
50547
|
type: 'onRequestConsulation',
|
|
50519
50548
|
data: actBasket.getAsJson()
|
|
50520
50549
|
});
|
|
50521
|
-
return
|
|
50550
|
+
return _context35.abrupt("break", 30);
|
|
50522
50551
|
case 12:
|
|
50523
50552
|
(_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
|
|
50524
50553
|
type: 'onSave',
|
|
50525
50554
|
data: actBasket.getAsJson()
|
|
50526
50555
|
});
|
|
50527
|
-
return
|
|
50556
|
+
return _context35.abrupt("break", 30);
|
|
50528
50557
|
case 14:
|
|
50529
50558
|
emailConfig = (_this$divaBasketHandl4 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : this.getEmailConfig(); //reset the emailConfig
|
|
50530
50559
|
this.divaBasketHandler.emailConfig = undefined;
|
|
@@ -50559,41 +50588,41 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50559
50588
|
type: 'onAddToBasket',
|
|
50560
50589
|
data: actBasket.getAsJson()
|
|
50561
50590
|
});
|
|
50562
|
-
return
|
|
50591
|
+
return _context35.abrupt("break", 30);
|
|
50563
50592
|
case 19:
|
|
50564
50593
|
this.actSet().CatalogData;
|
|
50565
|
-
|
|
50594
|
+
_context35.next = 22;
|
|
50566
50595
|
return this.api.saveAsProduct(this.sets, actBasket);
|
|
50567
50596
|
case 22:
|
|
50568
|
-
products =
|
|
50597
|
+
products = _context35.sent;
|
|
50569
50598
|
(_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
|
|
50570
50599
|
type: 'onAddToBasket',
|
|
50571
50600
|
data: actBasket.getAsJson()
|
|
50572
50601
|
});
|
|
50573
50602
|
if (!products) {
|
|
50574
|
-
|
|
50603
|
+
_context35.next = 26;
|
|
50575
50604
|
break;
|
|
50576
50605
|
}
|
|
50577
|
-
return
|
|
50606
|
+
return _context35.abrupt("return", products[0]);
|
|
50578
50607
|
case 26:
|
|
50579
50608
|
(_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
|
|
50580
50609
|
type: 'onAddToBasket',
|
|
50581
50610
|
data: actBasket.getAsJson()
|
|
50582
50611
|
});
|
|
50583
|
-
return
|
|
50612
|
+
return _context35.abrupt("break", 30);
|
|
50584
50613
|
case 28:
|
|
50585
50614
|
(_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
|
|
50586
50615
|
type: event,
|
|
50587
50616
|
data: actBasket.getAsJson()
|
|
50588
50617
|
});
|
|
50589
|
-
return
|
|
50618
|
+
return _context35.abrupt("break", 30);
|
|
50590
50619
|
case 30:
|
|
50591
|
-
return
|
|
50620
|
+
return _context35.abrupt("return");
|
|
50592
50621
|
case 31:
|
|
50593
50622
|
case "end":
|
|
50594
|
-
return
|
|
50623
|
+
return _context35.stop();
|
|
50595
50624
|
}
|
|
50596
|
-
},
|
|
50625
|
+
}, _callee35, this);
|
|
50597
50626
|
}));
|
|
50598
50627
|
function addToBasket(_x90) {
|
|
50599
50628
|
return _addToBasket.apply(this, arguments);
|
|
@@ -50650,26 +50679,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50650
50679
|
}, {
|
|
50651
50680
|
key: "getCurrentBasket",
|
|
50652
50681
|
value: function () {
|
|
50653
|
-
var _getCurrentBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
50682
|
+
var _getCurrentBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee36(event, force, returnTo, dontGoToSummary, hideLoading) {
|
|
50654
50683
|
var _this$actSet40, _this$divaBasketHandl5, _this$onClickAddToBas3;
|
|
50655
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
50656
|
-
while (1) switch (
|
|
50684
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee36$(_context36) {
|
|
50685
|
+
while (1) switch (_context36.prev = _context36.next) {
|
|
50657
50686
|
case 0:
|
|
50658
50687
|
if (!(this.divaBasketHandler.basketWasSavedWithCurrentDocVersion && ((_this$actSet40 = this.actSet()) === null || _this$actSet40 === void 0 ? void 0 : _this$actSet40.setHash) === ((_this$divaBasketHandl5 = this.divaBasketHandler.actBasket) === null || _this$divaBasketHandl5 === void 0 || (_this$divaBasketHandl5 = _this$divaBasketHandl5.OrderSets) === null || _this$divaBasketHandl5 === void 0 ? void 0 : _this$divaBasketHandl5[0].SetHash) && !(returnTo !== null && returnTo !== void 0 && returnTo.includes('OPEN')))) {
|
|
50659
|
-
|
|
50688
|
+
_context36.next = 2;
|
|
50660
50689
|
break;
|
|
50661
50690
|
}
|
|
50662
|
-
return
|
|
50691
|
+
return _context36.abrupt("return", 'BASKET_ALREADY_SAVED');
|
|
50663
50692
|
case 2:
|
|
50664
|
-
|
|
50693
|
+
_context36.next = 4;
|
|
50665
50694
|
return (_this$onClickAddToBas3 = this.onClickAddToBasket) === null || _this$onClickAddToBas3 === void 0 ? void 0 : _this$onClickAddToBas3.call(this, undefined, event, force, returnTo, dontGoToSummary, hideLoading);
|
|
50666
50695
|
case 4:
|
|
50667
|
-
return
|
|
50696
|
+
return _context36.abrupt("return", !!_context36.sent);
|
|
50668
50697
|
case 5:
|
|
50669
50698
|
case "end":
|
|
50670
|
-
return
|
|
50699
|
+
return _context36.stop();
|
|
50671
50700
|
}
|
|
50672
|
-
},
|
|
50701
|
+
}, _callee36, this);
|
|
50673
50702
|
}));
|
|
50674
50703
|
function getCurrentBasket(_x91, _x92, _x93, _x94, _x95) {
|
|
50675
50704
|
return _getCurrentBasket.apply(this, arguments);
|
|
@@ -50902,9 +50931,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50902
50931
|
key: "initApiForLogicOnly",
|
|
50903
50932
|
value: //just for testing purposes
|
|
50904
50933
|
function () {
|
|
50905
|
-
var _initApiForLogicOnly = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
50906
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
50907
|
-
while (1) switch (
|
|
50934
|
+
var _initApiForLogicOnly = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee37(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
|
|
50935
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee37$(_context37) {
|
|
50936
|
+
while (1) switch (_context37.prev = _context37.next) {
|
|
50908
50937
|
case 0:
|
|
50909
50938
|
//empty services
|
|
50910
50939
|
this.api = new DivaApiHandler(_objectSpread$8(_objectSpread$8({}, this.plannerConfig), {}, {
|
|
@@ -50917,16 +50946,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50917
50946
|
jwt: jwt,
|
|
50918
50947
|
apiKey: apiKey
|
|
50919
50948
|
}), handler);
|
|
50920
|
-
|
|
50949
|
+
_context37.next = 3;
|
|
50921
50950
|
return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
|
|
50922
50951
|
case 3:
|
|
50923
50952
|
this.plannerHandler = new DivaPlannerHandler(true);
|
|
50924
50953
|
if (this.strictArtifactGeneration) this.plannerHandler.setStrictArtifactGeneration(true);
|
|
50925
50954
|
case 5:
|
|
50926
50955
|
case "end":
|
|
50927
|
-
return
|
|
50956
|
+
return _context37.stop();
|
|
50928
50957
|
}
|
|
50929
|
-
},
|
|
50958
|
+
}, _callee37, this);
|
|
50930
50959
|
}));
|
|
50931
50960
|
function initApiForLogicOnly(_x96, _x97, _x98, _x99, _x100, _x101, _x102) {
|
|
50932
50961
|
return _initApiForLogicOnly.apply(this, arguments);
|
|
@@ -50941,16 +50970,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50941
50970
|
}, {
|
|
50942
50971
|
key: "loadBasket",
|
|
50943
50972
|
value: function () {
|
|
50944
|
-
var _loadBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
50945
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
50946
|
-
while (1) switch (
|
|
50973
|
+
var _loadBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee38() {
|
|
50974
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee38$(_context38) {
|
|
50975
|
+
while (1) switch (_context38.prev = _context38.next) {
|
|
50947
50976
|
case 0:
|
|
50948
|
-
return
|
|
50977
|
+
return _context38.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
|
|
50949
50978
|
case 1:
|
|
50950
50979
|
case "end":
|
|
50951
|
-
return
|
|
50980
|
+
return _context38.stop();
|
|
50952
50981
|
}
|
|
50953
|
-
},
|
|
50982
|
+
}, _callee38, this);
|
|
50954
50983
|
}));
|
|
50955
50984
|
function loadBasket() {
|
|
50956
50985
|
return _loadBasket.apply(this, arguments);
|
|
@@ -50965,39 +50994,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50965
50994
|
}, {
|
|
50966
50995
|
key: "initBasket",
|
|
50967
50996
|
value: function () {
|
|
50968
|
-
var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
50997
|
+
var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee39(init3D, ignoreFavorites) {
|
|
50969
50998
|
var initSetState, set, basket;
|
|
50970
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
50971
|
-
while (1) switch (
|
|
50999
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee39$(_context39) {
|
|
51000
|
+
while (1) switch (_context39.prev = _context39.next) {
|
|
50972
51001
|
case 0:
|
|
50973
51002
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
50974
51003
|
initSetState = this.getInitStateForSet(!init3D);
|
|
50975
|
-
|
|
51004
|
+
_context39.next = 4;
|
|
50976
51005
|
return this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
50977
51006
|
case 4:
|
|
50978
|
-
|
|
51007
|
+
_context39.next = 6;
|
|
50979
51008
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
50980
51009
|
case 6:
|
|
50981
51010
|
//TODO check if when basket gets repaired the product match gets called
|
|
50982
51011
|
set = this.actSet();
|
|
50983
51012
|
setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
|
|
50984
51013
|
if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
|
|
50985
|
-
|
|
51014
|
+
_context39.next = 11;
|
|
50986
51015
|
break;
|
|
50987
51016
|
}
|
|
50988
|
-
|
|
51017
|
+
_context39.next = 11;
|
|
50989
51018
|
return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
|
|
50990
51019
|
case 11:
|
|
50991
|
-
|
|
51020
|
+
_context39.next = 13;
|
|
50992
51021
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
|
|
50993
51022
|
case 13:
|
|
50994
|
-
basket =
|
|
50995
|
-
return
|
|
51023
|
+
basket = _context39.sent;
|
|
51024
|
+
return _context39.abrupt("return", basket);
|
|
50996
51025
|
case 15:
|
|
50997
51026
|
case "end":
|
|
50998
|
-
return
|
|
51027
|
+
return _context39.stop();
|
|
50999
51028
|
}
|
|
51000
|
-
},
|
|
51029
|
+
}, _callee39, this);
|
|
51001
51030
|
}));
|
|
51002
51031
|
function initBasket(_x103, _x104) {
|
|
51003
51032
|
return _initBasket.apply(this, arguments);
|
|
@@ -51036,21 +51065,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51036
51065
|
}, {
|
|
51037
51066
|
key: "getValidVariantsLength",
|
|
51038
51067
|
value: function () {
|
|
51039
|
-
var _getValidVariantsLength = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
51068
|
+
var _getValidVariantsLength = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee40() {
|
|
51040
51069
|
var set;
|
|
51041
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
51042
|
-
while (1) switch (
|
|
51070
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee40$(_context40) {
|
|
51071
|
+
while (1) switch (_context40.prev = _context40.next) {
|
|
51043
51072
|
case 0:
|
|
51044
51073
|
set = this.actSet();
|
|
51045
|
-
|
|
51074
|
+
_context40.next = 3;
|
|
51046
51075
|
return favoritesHandlerInstance.getValidVariants(set, true);
|
|
51047
51076
|
case 3:
|
|
51048
|
-
return
|
|
51077
|
+
return _context40.abrupt("return", _context40.sent.length);
|
|
51049
51078
|
case 4:
|
|
51050
51079
|
case "end":
|
|
51051
|
-
return
|
|
51080
|
+
return _context40.stop();
|
|
51052
51081
|
}
|
|
51053
|
-
},
|
|
51082
|
+
}, _callee40, this);
|
|
51054
51083
|
}));
|
|
51055
51084
|
function getValidVariantsLength() {
|
|
51056
51085
|
return _getValidVariantsLength.apply(this, arguments);
|
|
@@ -51060,44 +51089,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51060
51089
|
}, {
|
|
51061
51090
|
key: "handleFavorites",
|
|
51062
51091
|
value: function () {
|
|
51063
|
-
var _handleFavorites = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
51092
|
+
var _handleFavorites = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee41(mode) {
|
|
51064
51093
|
var _this5 = this;
|
|
51065
51094
|
var set, i;
|
|
51066
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
51067
|
-
while (1) switch (
|
|
51095
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee41$(_context41) {
|
|
51096
|
+
while (1) switch (_context41.prev = _context41.next) {
|
|
51068
51097
|
case 0:
|
|
51069
51098
|
set = this.actSet();
|
|
51070
51099
|
i = 0;
|
|
51071
51100
|
case 2:
|
|
51072
51101
|
if (!favoritesHandlerInstance.IsCalcForSummary) {
|
|
51073
|
-
|
|
51102
|
+
_context41.next = 11;
|
|
51074
51103
|
break;
|
|
51075
51104
|
}
|
|
51076
|
-
|
|
51105
|
+
_context41.next = 5;
|
|
51077
51106
|
return DivaUtils__default["default"].Sleep(200);
|
|
51078
51107
|
case 5:
|
|
51079
51108
|
i++;
|
|
51080
51109
|
if (!(i > 1000)) {
|
|
51081
|
-
|
|
51110
|
+
_context41.next = 9;
|
|
51082
51111
|
break;
|
|
51083
51112
|
}
|
|
51084
51113
|
LOG$2.error(new DivaUtils.DivaError('error on generating Variants of Summary'));
|
|
51085
|
-
return
|
|
51114
|
+
return _context41.abrupt("break", 11);
|
|
51086
51115
|
case 9:
|
|
51087
|
-
|
|
51116
|
+
_context41.next = 2;
|
|
51088
51117
|
break;
|
|
51089
51118
|
case 11:
|
|
51090
|
-
|
|
51119
|
+
_context41.next = 13;
|
|
51091
51120
|
return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
|
|
51092
51121
|
return _this5.update2DGrid(set);
|
|
51093
51122
|
}, this.actions);
|
|
51094
51123
|
case 13:
|
|
51095
|
-
return
|
|
51124
|
+
return _context41.abrupt("return", _context41.sent);
|
|
51096
51125
|
case 14:
|
|
51097
51126
|
case "end":
|
|
51098
|
-
return
|
|
51127
|
+
return _context41.stop();
|
|
51099
51128
|
}
|
|
51100
|
-
},
|
|
51129
|
+
}, _callee41, this);
|
|
51101
51130
|
}));
|
|
51102
51131
|
function handleFavorites(_x105) {
|
|
51103
51132
|
return _handleFavorites.apply(this, arguments);
|
|
@@ -51112,46 +51141,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51112
51141
|
}, {
|
|
51113
51142
|
key: "initSapOrderLinesFromBasket",
|
|
51114
51143
|
value: function () {
|
|
51115
|
-
var _initSapOrderLinesFromBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
51144
|
+
var _initSapOrderLinesFromBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee42(divaNr, init3D, onlyLoadOldBakset) {
|
|
51116
51145
|
var result, oldBasket, basket;
|
|
51117
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
51118
|
-
while (1) switch (
|
|
51146
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee42$(_context42) {
|
|
51147
|
+
while (1) switch (_context42.prev = _context42.next) {
|
|
51119
51148
|
case 0:
|
|
51120
51149
|
if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
51121
|
-
|
|
51150
|
+
_context42.next = 3;
|
|
51122
51151
|
return this.loadBasket();
|
|
51123
51152
|
case 3:
|
|
51124
|
-
result =
|
|
51153
|
+
result = _context42.sent;
|
|
51125
51154
|
if (!onlyLoadOldBakset) {
|
|
51126
|
-
|
|
51155
|
+
_context42.next = 6;
|
|
51127
51156
|
break;
|
|
51128
51157
|
}
|
|
51129
|
-
return
|
|
51158
|
+
return _context42.abrupt("return", {
|
|
51130
51159
|
oldBasket: new basketModel.BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
|
|
51131
51160
|
cache: {}
|
|
51132
51161
|
});
|
|
51133
51162
|
case 6:
|
|
51134
51163
|
if (!(result === false)) {
|
|
51135
|
-
|
|
51164
|
+
_context42.next = 8;
|
|
51136
51165
|
break;
|
|
51137
51166
|
}
|
|
51138
51167
|
throw new Error('Could not load basket! ' + divaNr);
|
|
51139
51168
|
case 8:
|
|
51140
51169
|
oldBasket = new basketModel.BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
|
|
51141
|
-
|
|
51170
|
+
_context42.next = 11;
|
|
51142
51171
|
return this.initBasket(init3D);
|
|
51143
51172
|
case 11:
|
|
51144
|
-
basket =
|
|
51145
|
-
return
|
|
51173
|
+
basket = _context42.sent;
|
|
51174
|
+
return _context42.abrupt("return", {
|
|
51146
51175
|
basket: basket,
|
|
51147
51176
|
oldBasket: oldBasket,
|
|
51148
51177
|
cache: this.api.getJsonDataCache()
|
|
51149
51178
|
});
|
|
51150
51179
|
case 13:
|
|
51151
51180
|
case "end":
|
|
51152
|
-
return
|
|
51181
|
+
return _context42.stop();
|
|
51153
51182
|
}
|
|
51154
|
-
},
|
|
51183
|
+
}, _callee42, this);
|
|
51155
51184
|
}));
|
|
51156
51185
|
function initSapOrderLinesFromBasket(_x106, _x107, _x108) {
|
|
51157
51186
|
return _initSapOrderLinesFromBasket.apply(this, arguments);
|
|
@@ -51407,183 +51436,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51407
51436
|
}]);
|
|
51408
51437
|
}();
|
|
51409
51438
|
|
|
51410
|
-
var DockingPoint = /*#__PURE__*/function () {
|
|
51411
|
-
function DockingPoint(elementId, type, name, localPos, rotDeg, layer, plannerconfig, filter) {
|
|
51412
|
-
_classCallCheck__default["default"](this, DockingPoint);
|
|
51413
|
-
_defineProperty__default["default"](this, "dockingPoint", void 0);
|
|
51414
|
-
_defineProperty__default["default"](this, "layer", void 0);
|
|
51415
|
-
_defineProperty__default["default"](this, "isDisabled", void 0);
|
|
51416
|
-
//this is used to disable a docking point temporarily
|
|
51417
|
-
_defineProperty__default["default"](this, "plannerconfig", void 0);
|
|
51418
|
-
this.plannerconfig = plannerconfig;
|
|
51419
|
-
|
|
51420
|
-
//Check for number backwardscompatible with _ (e.g. AVC_2)
|
|
51421
|
-
var splittedAV = name.split('_');
|
|
51422
|
-
this.isDisabled = false;
|
|
51423
|
-
var number = -1;
|
|
51424
|
-
if (splittedAV.length >= 2) {
|
|
51425
|
-
for (var i = 1; i < splittedAV.length; i++) {
|
|
51426
|
-
var part = parseInt(splittedAV[i]);
|
|
51427
|
-
if (!isNaN(part)) {
|
|
51428
|
-
number = part;
|
|
51429
|
-
break;
|
|
51430
|
-
}
|
|
51431
|
-
}
|
|
51432
|
-
} else if (name.length > 3) {
|
|
51433
|
-
//Check for number IDM Standard without _ (e.g. AVC2)
|
|
51434
|
-
var _part = parseInt(name.substring(3));
|
|
51435
|
-
if (!isNaN(_part)) {
|
|
51436
|
-
number = _part;
|
|
51437
|
-
}
|
|
51438
|
-
}
|
|
51439
|
-
this.dockingPoint = {
|
|
51440
|
-
dpId: type + '_' + name,
|
|
51441
|
-
elementId: elementId,
|
|
51442
|
-
type: type,
|
|
51443
|
-
name: name,
|
|
51444
|
-
ignoreLayer: type == 'AVR' || type == 'AVL' || name.indexOf('_IL') >= 0,
|
|
51445
|
-
localWorldPos: localPos,
|
|
51446
|
-
rotDeg: rotDeg,
|
|
51447
|
-
isDocking: false,
|
|
51448
|
-
dpFilter: filter
|
|
51449
|
-
};
|
|
51450
|
-
if (number >= 0) {
|
|
51451
|
-
this.dockingPoint.number = number;
|
|
51452
|
-
}
|
|
51453
|
-
this.layer = layer;
|
|
51454
|
-
}
|
|
51455
|
-
|
|
51456
|
-
/**
|
|
51457
|
-
* Creates a clone of the current dockingPoint
|
|
51458
|
-
*/
|
|
51459
|
-
return _createClass__default["default"](DockingPoint, [{
|
|
51460
|
-
key: "clone",
|
|
51461
|
-
value: function clone() {
|
|
51462
|
-
var dpClone = new DockingPoint(this.dockingPoint.elementId, this.dockingPoint.type, this.dockingPoint.name, this.dockingPoint.localWorldPos, this.dockingPoint.rotDeg, this.layer, this.plannerconfig, this.dockingPoint.dpFilter);
|
|
51463
|
-
dpClone.dockingPoint.dpId = this.dockingPoint.dpId;
|
|
51464
|
-
dpClone.dockingPoint.ignoreLayer = this.dockingPoint.ignoreLayer;
|
|
51465
|
-
dpClone.dockingPoint.isDocking = this.dockingPoint.isDocking;
|
|
51466
|
-
dpClone.dockingPoint.number = this.dockingPoint.number;
|
|
51467
|
-
dpClone.dockingPoint.onDP = this.dockingPoint.onDP;
|
|
51468
|
-
dpClone.dockingPoint.onElementId = this.dockingPoint.onElementId;
|
|
51469
|
-
return dpClone;
|
|
51470
|
-
}
|
|
51471
|
-
}, {
|
|
51472
|
-
key: "ElementId",
|
|
51473
|
-
get: function get() {
|
|
51474
|
-
return this.dockingPoint.elementId;
|
|
51475
|
-
}
|
|
51476
|
-
}, {
|
|
51477
|
-
key: "Name",
|
|
51478
|
-
get: function get() {
|
|
51479
|
-
return this.dockingPoint.name;
|
|
51480
|
-
}
|
|
51481
|
-
}, {
|
|
51482
|
-
key: "LocalWorldPos",
|
|
51483
|
-
get: function get() {
|
|
51484
|
-
return this.dockingPoint.localWorldPos;
|
|
51485
|
-
}
|
|
51486
|
-
}, {
|
|
51487
|
-
key: "RotDeg",
|
|
51488
|
-
get: function get() {
|
|
51489
|
-
return this.dockingPoint.rotDeg;
|
|
51490
|
-
}
|
|
51491
|
-
}, {
|
|
51492
|
-
key: "Type",
|
|
51493
|
-
get: function get() {
|
|
51494
|
-
return this.dockingPoint.type;
|
|
51495
|
-
}
|
|
51496
|
-
}, {
|
|
51497
|
-
key: "IsDocking",
|
|
51498
|
-
get: function get() {
|
|
51499
|
-
return this.dockingPoint.isDocking;
|
|
51500
|
-
}
|
|
51501
|
-
}, {
|
|
51502
|
-
key: "Layer",
|
|
51503
|
-
get: function get() {
|
|
51504
|
-
return this.layer;
|
|
51505
|
-
}
|
|
51506
|
-
}, {
|
|
51507
|
-
key: "IgnoreLayer",
|
|
51508
|
-
get: function get() {
|
|
51509
|
-
return this.dockingPoint.ignoreLayer;
|
|
51510
|
-
}
|
|
51511
|
-
}, {
|
|
51512
|
-
key: "HasNumber",
|
|
51513
|
-
get: function get() {
|
|
51514
|
-
return this.dockingPoint.number == undefined ? false : true;
|
|
51515
|
-
}
|
|
51516
|
-
}, {
|
|
51517
|
-
key: "Number",
|
|
51518
|
-
get: function get() {
|
|
51519
|
-
return this.dockingPoint.number;
|
|
51520
|
-
}
|
|
51521
|
-
}, {
|
|
51522
|
-
key: "PlannerConfig",
|
|
51523
|
-
get: function get() {
|
|
51524
|
-
return this.plannerconfig;
|
|
51525
|
-
}
|
|
51526
|
-
}, {
|
|
51527
|
-
key: "IsDisabled",
|
|
51528
|
-
get: function get() {
|
|
51529
|
-
return this.isDisabled;
|
|
51530
|
-
}
|
|
51531
|
-
}, {
|
|
51532
|
-
key: "DPFilter",
|
|
51533
|
-
get: function get() {
|
|
51534
|
-
return this.dockingPoint.dpFilter;
|
|
51535
|
-
}
|
|
51536
|
-
/**
|
|
51537
|
-
* This function is called when the dockingPoint is docked to another dockingPoint
|
|
51538
|
-
* @param refDockingPoint The reference dockingpoint, this is docked to
|
|
51539
|
-
* @param refElementId The elementId of the reference DockingPoint
|
|
51540
|
-
*/
|
|
51541
|
-
}, {
|
|
51542
|
-
key: "doDock",
|
|
51543
|
-
value: function doDock(refDockingPoint, refElementId) {
|
|
51544
|
-
this.dockingPoint.isDocking = true;
|
|
51545
|
-
this.dockingPoint.onDP = refDockingPoint;
|
|
51546
|
-
this.dockingPoint.onElementId = refElementId;
|
|
51547
|
-
}
|
|
51548
|
-
|
|
51549
|
-
/**
|
|
51550
|
-
* This function is called when the dockingpoint should be undocked
|
|
51551
|
-
*/
|
|
51552
|
-
}, {
|
|
51553
|
-
key: "undock",
|
|
51554
|
-
value: function undock() {
|
|
51555
|
-
this.dockingPoint.isDocking = false;
|
|
51556
|
-
this.dockingPoint.onDP = undefined;
|
|
51557
|
-
this.dockingPoint.onElementId = undefined;
|
|
51558
|
-
}
|
|
51559
|
-
|
|
51560
|
-
/**
|
|
51561
|
-
* This function is used to disable the dp temporarily. It is ignored in the planer
|
|
51562
|
-
* @param doDisable
|
|
51563
|
-
*/
|
|
51564
|
-
}, {
|
|
51565
|
-
key: "disableDP",
|
|
51566
|
-
value: function disableDP(doDisable) {
|
|
51567
|
-
this.isDisabled = doDisable;
|
|
51568
|
-
}
|
|
51569
|
-
}, {
|
|
51570
|
-
key: "OnDP",
|
|
51571
|
-
get: function get() {
|
|
51572
|
-
return this.dockingPoint.onDP;
|
|
51573
|
-
}
|
|
51574
|
-
}, {
|
|
51575
|
-
key: "OnElementId",
|
|
51576
|
-
get: function get() {
|
|
51577
|
-
return this.dockingPoint.onElementId;
|
|
51578
|
-
}
|
|
51579
|
-
}, {
|
|
51580
|
-
key: "DpId",
|
|
51581
|
-
get: function get() {
|
|
51582
|
-
return this.dockingPoint.dpId;
|
|
51583
|
-
}
|
|
51584
|
-
}]);
|
|
51585
|
-
}();
|
|
51586
|
-
|
|
51587
51439
|
function ownKeys$7(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; }
|
|
51588
51440
|
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
51589
51441
|
function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(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; } } }; }
|
|
@@ -72025,7 +71877,6 @@ exports.DivaArticle = DivaArticle;
|
|
|
72025
71877
|
exports.DivaBasketHandler = DivaBasketHandler;
|
|
72026
71878
|
exports.DivaCatalogData = DivaCatalogData;
|
|
72027
71879
|
exports.DivaWebPlanner = DivaWebPlanner;
|
|
72028
|
-
exports.DockingPoint = DockingPoint;
|
|
72029
71880
|
exports.Grid = Grid;
|
|
72030
71881
|
exports.HQRenderScript = HQRenderScript;
|
|
72031
71882
|
exports.JsonDataCache = JsonDataCache;
|