@crystaldesign/web-planner-logic 24.11.0 → 24.12.0-beta.10
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-6ef0bf4c.js → DivaBoxPlanner-815fbf90.js} +3 -3
- package/build/cjs/{DivaStandardPlanner-9974ac31.js → DivaStandardPlanner-ae253974.js} +17 -81
- package/build/cjs/{DoorPlanner-e01de0a3.js → DoorPlanner-5fc29017.js} +1 -1
- package/build/cjs/{Host3DSignalR-216db383.js → Host3DSignalR-dec9a0b8.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-8b720511.js → LiviqueWWSHandler-fbcd6772.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-50891028.js → PfisterWWSHandler-e607705c.js} +1 -1
- package/build/cjs/{PlannerHandler2D-1eed77a3.js → PlannerHandler2D-8acbb06c.js} +27 -37
- package/build/cjs/{ProductBasketHandler-b769b0a3.js → ProductBasketHandler-67c19e6d.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-f91fd16f.js → SeriousBasketHandler-e665dd62.js} +1 -1
- package/build/cjs/{ShelfPlanner-94f0d930.js → ShelfPlanner-1c1708c2.js} +1 -1
- package/build/cjs/{StandardWWSHandler-8e674518.js → StandardWWSHandler-26b802ca.js} +1 -1
- package/build/cjs/{index-891fd83f.js → index-6f5de64a.js} +385 -259
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-eea433d9.js → DivaBoxPlanner-0880d2b3.js} +3 -3
- package/build/esm/{DivaStandardPlanner-5d70e6cb.js → DivaStandardPlanner-562b5379.js} +17 -81
- package/build/esm/{DoorPlanner-2b5d3b18.js → DoorPlanner-9508f0e4.js} +1 -1
- package/build/esm/{Host3DSignalR-172f818d.js → Host3DSignalR-912df5a5.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-74a3155e.js → LiviqueWWSHandler-19bb2392.js} +1 -1
- package/build/esm/{PfisterWWSHandler-808e9166.js → PfisterWWSHandler-a3b013b1.js} +1 -1
- package/build/esm/{PlannerHandler2D-55713da4.js → PlannerHandler2D-7f7d2ddf.js} +27 -37
- package/build/esm/{ProductBasketHandler-dc89c0d9.js → ProductBasketHandler-b53ee156.js} +1 -1
- package/build/esm/{SeriousBasketHandler-ea077e19.js → SeriousBasketHandler-1cb21861.js} +1 -1
- package/build/esm/{ShelfPlanner-9d063406.js → ShelfPlanner-a813161d.js} +1 -1
- package/build/esm/{StandardWWSHandler-3838bdae.js → StandardWWSHandler-c05fd7ed.js} +1 -1
- package/build/esm/{index-7ddbc00f.js → index-67fdef39.js} +385 -259
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/index.d.ts +1 -1
- package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/CatalogPlannerArticleViewDataType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/Articles/CatalogPlannerArticleViewDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +3 -2
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +2 -2
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Planner/IDivaViewPlannerElement.d.ts +0 -2
- package/build/types/web-planner-logic/src/interface/Planner/IDivaViewPlannerElement.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Rules/NotificationRule.d.ts +15 -7
- package/build/types/web-planner-logic/src/interface/Rules/NotificationRule.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +7 -3
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +5 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts +9 -2
- package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.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/Rendering/PlannerHandler3D.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +2 -3
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +27 -6
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/CatalogArticleData.d.ts +1 -0
- package/build/types/web-planner-logic/src/model/Articles/CatalogArticleData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts +3 -2
- package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts +1 -3
- package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -16650,6 +16650,12 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
16650
16650
|
get: function get() {
|
|
16651
16651
|
return this.catalogArticle.hasPartlistArticle;
|
|
16652
16652
|
}
|
|
16653
|
+
}, {
|
|
16654
|
+
key: "possiblePartlistCodexes",
|
|
16655
|
+
get: function get() {
|
|
16656
|
+
var _this$catalogArticle$2;
|
|
16657
|
+
return (_this$catalogArticle$2 = this.catalogArticle.partListArticles) === null || _this$catalogArticle$2 === void 0 ? void 0 : _this$catalogArticle$2.join(';');
|
|
16658
|
+
}
|
|
16653
16659
|
}, {
|
|
16654
16660
|
key: "articleDecisions",
|
|
16655
16661
|
get: function get() {
|
|
@@ -16916,8 +16922,8 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
16916
16922
|
}, {
|
|
16917
16923
|
key: "metaDataView",
|
|
16918
16924
|
get: function get() {
|
|
16919
|
-
var _this$catalogArticle$
|
|
16920
|
-
return (_this$catalogArticle$
|
|
16925
|
+
var _this$catalogArticle$3;
|
|
16926
|
+
return (_this$catalogArticle$3 = this.catalogArticle.metaData) !== null && _this$catalogArticle$3 !== void 0 ? _this$catalogArticle$3 : [];
|
|
16921
16927
|
}
|
|
16922
16928
|
}, {
|
|
16923
16929
|
key: "getMergesToOPG",
|
|
@@ -18287,7 +18293,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18287
18293
|
DE: 'Achtung alle änderungen gehen verlohren... Bist du sicher?'
|
|
18288
18294
|
}
|
|
18289
18295
|
}],
|
|
18290
|
-
|
|
18296
|
+
warningRules: [],
|
|
18297
|
+
bannerRules: [],
|
|
18291
18298
|
summaryTabGroupPosition: undefined,
|
|
18292
18299
|
onConfigSingleDontGeneralize: false,
|
|
18293
18300
|
ignoreMaxPriceAsBP: false,
|
|
@@ -18592,7 +18599,9 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18592
18599
|
} else if (item.Codex == 'NOTIFICATIONS') {
|
|
18593
18600
|
_this.catalogData.notificationsRules = JSON.parse(item.Value);
|
|
18594
18601
|
} else if (item.Codex == 'WARNINGS') {
|
|
18595
|
-
_this.catalogData.
|
|
18602
|
+
_this.catalogData.warningRules = JSON.parse(item.Value);
|
|
18603
|
+
} else if (item.Codex == 'BANNER') {
|
|
18604
|
+
_this.catalogData.bannerRules = JSON.parse(item.Value);
|
|
18596
18605
|
} else if (item.Codex == 'IGNORE_MAX_PRICE_AS_BASEPRICE') {
|
|
18597
18606
|
_this.catalogData.ignoreMaxPriceAsBP = item.Value == '1';
|
|
18598
18607
|
} else if (item.Codex == 'DONT_USE_VCODEX_FOR_BASKET') {
|
|
@@ -18793,7 +18802,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18793
18802
|
is3DModell: catPlanArticle.modelName3D && catPlanArticle.modelName3D != '' ? true : false,
|
|
18794
18803
|
groupName: groupTitle,
|
|
18795
18804
|
metaData: this.catalogArticles[catPlanArticle.codex].metaDataView,
|
|
18796
|
-
contentItemId: this.catalogArticles[catPlanArticle.codex].contentItemId
|
|
18805
|
+
contentItemId: this.catalogArticles[catPlanArticle.codex].contentItemId,
|
|
18806
|
+
partlistcodexes: this.catalogArticles[catPlanArticle.codex].possiblePartlistCodexes
|
|
18797
18807
|
};
|
|
18798
18808
|
this.plannerPaletteViewInfo.catalogPlannerArticles.push(catPlanArtView);
|
|
18799
18809
|
}
|
|
@@ -18850,7 +18860,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18850
18860
|
is3DModell: catPlanArticle.modelName3D && catPlanArticle.modelName3D != '' ? true : false,
|
|
18851
18861
|
groupName: groupTitle,
|
|
18852
18862
|
metaData: this.catalogArticles[catPlanArticle.codex].metaDataView,
|
|
18853
|
-
contentItemId: this.catalogArticles[catPlanArticle.codex].contentItemId
|
|
18863
|
+
contentItemId: this.catalogArticles[catPlanArticle.codex].contentItemId,
|
|
18864
|
+
partlistcodexes: this.catalogArticles[catPlanArticle.codex].possiblePartlistCodexes
|
|
18854
18865
|
};
|
|
18855
18866
|
//nicht ausmultiplizierte Elemente
|
|
18856
18867
|
this.plannerPaletteViewInfo.catalogPlannerArticles.push(_catPlanArtView);
|
|
@@ -19458,9 +19469,14 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
19458
19469
|
return this.catalogData.notificationsRules;
|
|
19459
19470
|
}
|
|
19460
19471
|
}, {
|
|
19461
|
-
key: "
|
|
19472
|
+
key: "warningRules",
|
|
19473
|
+
get: function get() {
|
|
19474
|
+
return this.catalogData.warningRules;
|
|
19475
|
+
}
|
|
19476
|
+
}, {
|
|
19477
|
+
key: "bannerRules",
|
|
19462
19478
|
get: function get() {
|
|
19463
|
-
return this.catalogData.
|
|
19479
|
+
return this.catalogData.bannerRules;
|
|
19464
19480
|
}
|
|
19465
19481
|
}, {
|
|
19466
19482
|
key: "dontSaveAlternativeRenderings",
|
|
@@ -23543,7 +23559,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23543
23559
|
break;
|
|
23544
23560
|
}
|
|
23545
23561
|
_context.next = 4;
|
|
23546
|
-
return import('./ShelfPlanner-
|
|
23562
|
+
return import('./ShelfPlanner-a813161d.js');
|
|
23547
23563
|
case 4:
|
|
23548
23564
|
_yield$import = _context.sent;
|
|
23549
23565
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -25407,6 +25423,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25407
25423
|
}, {
|
|
25408
25424
|
key: "evalOpvsOnOpvsConstructionRules",
|
|
25409
25425
|
value: function evalOpvsOnOpvsConstructionRules(article) {
|
|
25426
|
+
var _article$CatalogData$;
|
|
25410
25427
|
var somethingChanged = false;
|
|
25411
25428
|
var previousRules = {};
|
|
25412
25429
|
if (article.updatedOPVbyOPVConstructionRules) {
|
|
@@ -25470,19 +25487,20 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25470
25487
|
}
|
|
25471
25488
|
}
|
|
25472
25489
|
}
|
|
25473
|
-
|
|
25474
|
-
|
|
25475
|
-
|
|
25476
|
-
var
|
|
25477
|
-
|
|
25478
|
-
|
|
25479
|
-
|
|
25480
|
-
|
|
25481
|
-
|
|
25490
|
+
if ((_article$CatalogData$ = article.CatalogData.warningRules) !== null && _article$CatalogData$ !== void 0 && _article$CatalogData$.length) {
|
|
25491
|
+
var notifications = this.checkNotificationRules(article.CatalogData.warningRules, _defineProperty({}, article.basketId, article), {});
|
|
25492
|
+
if (notifications !== null && notifications !== void 0 && notifications.length) {
|
|
25493
|
+
for (var _i3 = 0; _i3 < notifications.length; _i3++) {
|
|
25494
|
+
var _item = notifications[_i3];
|
|
25495
|
+
if (!_item.showAsWarning) continue;
|
|
25496
|
+
article.addUpdatedOPVbyOPVConstructionRules(_item.showAsWarning.option + ';' + _item.showAsWarning.optionValue, article.updateOPVConstruction('OPT' + _item.showAsWarning.option, 'OPV' + _item.showAsWarning.optionValue, {
|
|
25497
|
+
message: _item.message,
|
|
25498
|
+
type: _item.type == 'error' ? 'DISABLE' : 'WARNING'
|
|
25499
|
+
}));
|
|
25500
|
+
}
|
|
25501
|
+
somethingChanged = true;
|
|
25482
25502
|
}
|
|
25483
|
-
somethingChanged = true;
|
|
25484
25503
|
}
|
|
25485
|
-
|
|
25486
25504
|
//falls die vorherigen reglen anders sind wie die neuen, artiklekonfiguration neu laden
|
|
25487
25505
|
if (somethingChanged && JSON.stringify(previousRules) != JSON.stringify(article.updatedOPVbyOPVConstructionRules)) {
|
|
25488
25506
|
this.updateCfgValues(article, {}, {});
|
|
@@ -25498,7 +25516,6 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25498
25516
|
}, {
|
|
25499
25517
|
key: "checkNotificationRules",
|
|
25500
25518
|
value: function checkNotificationRules(toCheckRules, articles, visitedOptions, event) {
|
|
25501
|
-
if (!(toCheckRules !== null && toCheckRules !== void 0 && toCheckRules.length)) return;
|
|
25502
25519
|
var returnValue = [];
|
|
25503
25520
|
for (var i = 0; i < toCheckRules.length; i++) {
|
|
25504
25521
|
var entry = toCheckRules[i];
|
|
@@ -25506,27 +25523,12 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25506
25523
|
var ruleValid = false;
|
|
25507
25524
|
for (var j = 0; j < rules.length; j++) {
|
|
25508
25525
|
for (var basketId in articles) {
|
|
25509
|
-
var _rule$articles;
|
|
25510
25526
|
ruleValid = false;
|
|
25511
25527
|
var rule = rules[j];
|
|
25512
25528
|
var article = articles[basketId];
|
|
25513
|
-
if ((
|
|
25514
|
-
if (rule.variantValues && !this.objectIncudesObject(rule.variantValues, article.VariantValuesWithoutOPTandOPV)) continue;
|
|
25515
|
-
if (rule.visitedOptions && !this.arrayIncludesArray(rule.visitedOptions, visitedOptions[basketId])) continue;
|
|
25516
|
-
if (rule.jsFormula && !article.evalRule(DivaUtils.getRuleByFormula(rule.jsFormula))) continue;
|
|
25517
|
-
if (rule.sizes) console.error('size logic not jet implemented');
|
|
25529
|
+
if (!this.checkRule(rule, article, visitedOptions)) continue;
|
|
25518
25530
|
if ((event === null || event === void 0 ? void 0 : event.type) == 'config' && entry.type == 'notification') {
|
|
25519
|
-
|
|
25520
|
-
var checkOPT = (_entry$checkOnEvents = entry.checkOnEvents) !== null && _entry$checkOnEvents !== void 0 && _entry$checkOnEvents.option ? 'OPT' + ((_entry$checkOnEvents2 = entry.checkOnEvents) === null || _entry$checkOnEvents2 === void 0 ? void 0 : _entry$checkOnEvents2.option) : undefined;
|
|
25521
|
-
var checkOPV = (_entry$checkOnEvents3 = entry.checkOnEvents) !== null && _entry$checkOnEvents3 !== void 0 && _entry$checkOnEvents3.optionValue ? 'OPV' + ((_entry$checkOnEvents4 = entry.checkOnEvents) === null || _entry$checkOnEvents4 === void 0 ? void 0 : _entry$checkOnEvents4.optionValue) : undefined;
|
|
25522
|
-
if (checkOPT) {
|
|
25523
|
-
if (Array.isArray(checkOPT) && !checkOPT.includes(event.data.optionCodex)) continue;
|
|
25524
|
-
if (!Array.isArray(checkOPT) && checkOPT !== event.data.optionCodex) continue;
|
|
25525
|
-
}
|
|
25526
|
-
if (checkOPV) {
|
|
25527
|
-
if (Array.isArray(checkOPV) && !checkOPV.includes(event.data.optionValueCodex)) continue;
|
|
25528
|
-
if (!Array.isArray(checkOPV) && checkOPV !== event.data.optionValueCodex) continue;
|
|
25529
|
-
}
|
|
25531
|
+
if (!this.checkOnEvent(event.checkOnEvents, event.data)) continue;
|
|
25530
25532
|
}
|
|
25531
25533
|
ruleValid = true;
|
|
25532
25534
|
break;
|
|
@@ -25542,6 +25544,35 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25542
25544
|
}
|
|
25543
25545
|
return returnValue;
|
|
25544
25546
|
}
|
|
25547
|
+
}, {
|
|
25548
|
+
key: "checkRule",
|
|
25549
|
+
value: function checkRule(rule, article, visitedOptions) {
|
|
25550
|
+
var _rule$articles;
|
|
25551
|
+
if ((_rule$articles = rule.articles) !== null && _rule$articles !== void 0 && _rule$articles.length && !rule.articles.includes(article.articleCodex)) return false;
|
|
25552
|
+
if (rule.variantValues && !this.objectIncudesObject(rule.variantValues, article.VariantValuesWithoutOPTandOPV)) return false;
|
|
25553
|
+
if (rule.visitedOptions && !this.arrayIncludesArray(rule.visitedOptions, visitedOptions[article.basketId])) return false;
|
|
25554
|
+
if (rule.jsFormula && !article.evalRule(DivaUtils.getRuleByFormula(rule.jsFormula))) return false;
|
|
25555
|
+
if (rule.sizes) {
|
|
25556
|
+
console.error('size logic not jet implemented');
|
|
25557
|
+
return false;
|
|
25558
|
+
}
|
|
25559
|
+
return true;
|
|
25560
|
+
}
|
|
25561
|
+
}, {
|
|
25562
|
+
key: "checkOnEvent",
|
|
25563
|
+
value: function checkOnEvent(event, data) {
|
|
25564
|
+
var checkOPT = event !== null && event !== void 0 && event.option ? 'OPT' + (event === null || event === void 0 ? void 0 : event.option) : undefined;
|
|
25565
|
+
var checkOPV = event !== null && event !== void 0 && event.optionValue ? 'OPV' + (event === null || event === void 0 ? void 0 : event.optionValue) : undefined;
|
|
25566
|
+
if (checkOPT) {
|
|
25567
|
+
if (Array.isArray(checkOPT) && !checkOPT.includes(data.optionCodex)) return false;
|
|
25568
|
+
if (!Array.isArray(checkOPT) && checkOPT !== data.optionCodex) return false;
|
|
25569
|
+
}
|
|
25570
|
+
if (checkOPV) {
|
|
25571
|
+
if (Array.isArray(checkOPV) && !checkOPV.includes(data.optionValueCodex)) return false;
|
|
25572
|
+
if (!Array.isArray(checkOPV) && checkOPV !== data.optionValueCodex) return false;
|
|
25573
|
+
}
|
|
25574
|
+
return true;
|
|
25575
|
+
}
|
|
25545
25576
|
}, {
|
|
25546
25577
|
key: "objectIncudesObject",
|
|
25547
25578
|
value: function objectIncudesObject(smallerObject, biggerObject) {
|
|
@@ -27004,14 +27035,9 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27004
27035
|
return _ref.apply(this, arguments);
|
|
27005
27036
|
};
|
|
27006
27037
|
}());
|
|
27007
|
-
_defineProperty(this, "setPosNr", function (elementId, posNr
|
|
27038
|
+
_defineProperty(this, "setPosNr", function (elementId, posNr) {
|
|
27008
27039
|
var article = _this.getArticleByElementId(elementId);
|
|
27009
|
-
if (article)
|
|
27010
|
-
article.posNr = posNr;
|
|
27011
|
-
if (accNr != undefined) {
|
|
27012
|
-
article.posNr = Number(posNr + '.' + (accNr < 10 ? '0' : '') + accNr.toString());
|
|
27013
|
-
}
|
|
27014
|
-
}
|
|
27040
|
+
if (article) article.posNr = posNr;
|
|
27015
27041
|
_this.sortDivaArticlesByArticlePosNr();
|
|
27016
27042
|
});
|
|
27017
27043
|
_defineProperty(this, "setElementId", function (basketID, elementId) {
|
|
@@ -27262,54 +27288,56 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27262
27288
|
}, {
|
|
27263
27289
|
key: "giveAccNewPosNrByBasketId",
|
|
27264
27290
|
value: function giveAccNewPosNrByBasketId(BasketIdParent) {
|
|
27265
|
-
var curNum = this.
|
|
27291
|
+
var curNum = this.giveAccPosNrByBasketId(BasketIdParent);
|
|
27266
27292
|
this.givePartlistAccPosNrByBasketId(BasketIdParent, curNum);
|
|
27267
27293
|
this.sortDivaArticlesByArticlePosNr();
|
|
27268
27294
|
}
|
|
27269
27295
|
}, {
|
|
27270
|
-
key: "
|
|
27271
|
-
value: function
|
|
27296
|
+
key: "giveAccPosNrByBasketId",
|
|
27297
|
+
value: function giveAccPosNrByBasketId(basketId) {
|
|
27298
|
+
var curNum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
27272
27299
|
var allAccs = [];
|
|
27273
27300
|
var articles = this.getDivaArticles();
|
|
27274
|
-
|
|
27275
|
-
|
|
27276
|
-
var
|
|
27301
|
+
var article = articles[basketId];
|
|
27302
|
+
if (!article) throw new Error('article ' + basketId + ' does not exist');
|
|
27303
|
+
var myParentArticle = article.getBaseParent();
|
|
27304
|
+
var _this$getSplitPlanned = this.getSplitPlannedAccessoiresOfBasketId(basketId),
|
|
27277
27305
|
notPlannedAcc = _this$getSplitPlanned.notPlannedAcc,
|
|
27278
27306
|
plannedAcc = _this$getSplitPlanned.plannedAcc;
|
|
27279
|
-
|
|
27280
|
-
|
|
27281
|
-
|
|
27307
|
+
for (var key in plannedAcc) {
|
|
27308
|
+
allAccs.push(plannedAcc[key]);
|
|
27309
|
+
}
|
|
27310
|
+
for (var _key3 in notPlannedAcc) {
|
|
27311
|
+
allAccs.push(notPlannedAcc[_key3]);
|
|
27282
27312
|
}
|
|
27283
27313
|
for (var i = 0; i < allAccs.length; i++) {
|
|
27314
|
+
var accessoire = allAccs[i];
|
|
27284
27315
|
curNum++;
|
|
27285
|
-
|
|
27286
|
-
if (
|
|
27287
|
-
curNum = this.
|
|
27316
|
+
accessoire.posNr = Number(parseFloat((myParentArticle.posNr + curNum / 100).toString()).toFixed(2));
|
|
27317
|
+
if (accessoire.shelfAccessoires || Object.keys(accessoire.accessoires).length !== 0) {
|
|
27318
|
+
curNum = this.giveAccPosNrByBasketId(accessoire.basketId, curNum);
|
|
27319
|
+
}
|
|
27320
|
+
if (accessoire.hasPartlistArticle) {
|
|
27321
|
+
curNum = this.givePartlistAccPosNrByBasketId(accessoire.basketId, curNum);
|
|
27288
27322
|
}
|
|
27289
|
-
}
|
|
27290
|
-
for (var _key3 in plannedAcc) {
|
|
27291
|
-
curNum = this.giveNotPlannedAccPosNrByBasketId(BasketIdParent, _key3, curNum);
|
|
27292
27323
|
}
|
|
27293
27324
|
return curNum;
|
|
27294
27325
|
}
|
|
27295
27326
|
}, {
|
|
27296
27327
|
key: "givePartlistAccPosNrByBasketId",
|
|
27297
|
-
value: function givePartlistAccPosNrByBasketId(
|
|
27298
|
-
var
|
|
27299
|
-
if (!
|
|
27300
|
-
var
|
|
27301
|
-
var
|
|
27302
|
-
|
|
27303
|
-
|
|
27304
|
-
var
|
|
27305
|
-
if (
|
|
27306
|
-
|
|
27307
|
-
|
|
27308
|
-
if (accessoire.hasPartlistArticle && accessoire.isPartListArticle && !accessoire.partlistArticleVisibleInTree) continue;
|
|
27309
|
-
curNum++;
|
|
27310
|
-
accessoire.posNr = Number(parseFloat((myParentArticle.posNr + curNum / 100).toString()).toFixed(2));
|
|
27311
|
-
}
|
|
27328
|
+
value: function givePartlistAccPosNrByBasketId(basketId, curNum) {
|
|
27329
|
+
var article = this.getArticleByBasketId(basketId);
|
|
27330
|
+
if (!article) return curNum;
|
|
27331
|
+
var baseParent = article.getBaseParent();
|
|
27332
|
+
var partlistArticles = this.getPartlistArticlesOfArticle(article);
|
|
27333
|
+
for (var j = 0; j < ((_partlistArticles$len = partlistArticles === null || partlistArticles === void 0 ? void 0 : partlistArticles.length) !== null && _partlistArticles$len !== void 0 ? _partlistArticles$len : 0); j++) {
|
|
27334
|
+
var _partlistArticles$len;
|
|
27335
|
+
var accessoire = partlistArticles[j];
|
|
27336
|
+
if (accessoire.hasPartlistArticle && accessoire.isPartListArticle && !accessoire.partlistArticleVisibleInTree) continue;
|
|
27337
|
+
curNum++;
|
|
27338
|
+
accessoire.posNr = Number(parseFloat((baseParent.posNr + curNum / 100).toString()).toFixed(2));
|
|
27312
27339
|
}
|
|
27340
|
+
return curNum;
|
|
27313
27341
|
}
|
|
27314
27342
|
}, {
|
|
27315
27343
|
key: "getAccessoiresOfBasketId",
|
|
@@ -27341,11 +27369,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27341
27369
|
notPlannedAcc: notPlannedAcc
|
|
27342
27370
|
};
|
|
27343
27371
|
}
|
|
27344
|
-
}, {
|
|
27345
|
-
key: "getStartingPosNr",
|
|
27346
|
-
value: function getStartingPosNr(basketid) {
|
|
27347
|
-
return this.getAccessoiresOfArticleRecursive(basketid, 'onlyPlanner').length;
|
|
27348
|
-
}
|
|
27349
27372
|
}, {
|
|
27350
27373
|
key: "getAccessoiresOfBasketIdAsArray",
|
|
27351
27374
|
value: function getAccessoiresOfBasketIdAsArray(basketId, filter) {
|
|
@@ -27666,7 +27689,9 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27666
27689
|
value: function getArticleByBasketId(basketId) {
|
|
27667
27690
|
if (this.divaArticles[basketId]) return this.divaArticles[basketId];
|
|
27668
27691
|
for (var key in this.divaArticles) {
|
|
27669
|
-
|
|
27692
|
+
var article = this.divaArticles[key];
|
|
27693
|
+
var plArticles = article.getRecursivePartlistArticles();
|
|
27694
|
+
if (plArticles[basketId]) return plArticles[basketId];
|
|
27670
27695
|
}
|
|
27671
27696
|
return undefined;
|
|
27672
27697
|
}
|
|
@@ -28064,7 +28089,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28064
28089
|
break;
|
|
28065
28090
|
}
|
|
28066
28091
|
_context4.next = 3;
|
|
28067
|
-
return import('./DoorPlanner-
|
|
28092
|
+
return import('./DoorPlanner-9508f0e4.js');
|
|
28068
28093
|
case 3:
|
|
28069
28094
|
_yield$import = _context4.sent;
|
|
28070
28095
|
DoorPlanner = _yield$import["default"];
|
|
@@ -30328,46 +30353,49 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30328
30353
|
value: function () {
|
|
30329
30354
|
var _saveConfigVariantsInBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(set, basket, variant, repairOnly) {
|
|
30330
30355
|
var _hQRenderScript, _basket$OrderSets$set, _basket$OrderSets$set2;
|
|
30331
|
-
var setindex, setImage, urlToPlanning2D, hQRenderScript, plannerData, promises, _yield$Promise$all, _yield$Promise$all2, i, optionsSorted, variantValues, _i3, opt, key, targetArticle, configVariant;
|
|
30356
|
+
var setindex, setImage, dimensions, urlToPlanning2D, hQRenderScript, plannerData, promises, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, i, optionsSorted, variantValues, _i3, opt, key, targetArticle, configVariant;
|
|
30332
30357
|
return _regeneratorRuntime.wrap(function _callee5$(_context6) {
|
|
30333
30358
|
while (1) switch (_context6.prev = _context6.next) {
|
|
30334
30359
|
case 0:
|
|
30335
30360
|
setindex = -1;
|
|
30336
30361
|
setImage = undefined;
|
|
30362
|
+
dimensions = {};
|
|
30337
30363
|
urlToPlanning2D = undefined;
|
|
30338
30364
|
hQRenderScript = undefined;
|
|
30339
30365
|
plannerData = set.plannerHandler.savePlanner(set.getSetId());
|
|
30340
30366
|
if (repairOnly) {
|
|
30341
|
-
_context6.next =
|
|
30367
|
+
_context6.next = 17;
|
|
30342
30368
|
break;
|
|
30343
30369
|
}
|
|
30344
30370
|
promises = [setHandlerInstance.getSetImage(set, true), setHandlerInstance.get2DSetImage(set), setHandlerInstance.getHQRenderScript(set, basket.DivaNr)];
|
|
30345
|
-
_context6.next =
|
|
30371
|
+
_context6.next = 10;
|
|
30346
30372
|
return Promise.all(promises);
|
|
30347
|
-
case
|
|
30373
|
+
case 10:
|
|
30348
30374
|
_yield$Promise$all = _context6.sent;
|
|
30349
30375
|
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
|
|
30350
|
-
|
|
30376
|
+
_yield$Promise$all2$ = _yield$Promise$all2[0];
|
|
30377
|
+
setImage = _yield$Promise$all2$.url;
|
|
30378
|
+
dimensions = _yield$Promise$all2$.dimensions;
|
|
30351
30379
|
urlToPlanning2D = _yield$Promise$all2[1];
|
|
30352
30380
|
hQRenderScript = _yield$Promise$all2[2];
|
|
30353
|
-
case
|
|
30381
|
+
case 17:
|
|
30354
30382
|
i = 0;
|
|
30355
|
-
case
|
|
30383
|
+
case 18:
|
|
30356
30384
|
if (!(i < basket.OrderSets.length)) {
|
|
30357
|
-
_context6.next =
|
|
30385
|
+
_context6.next = 25;
|
|
30358
30386
|
break;
|
|
30359
30387
|
}
|
|
30360
30388
|
if (!(set.getSetId() == basket.OrderSets[i].SetID)) {
|
|
30361
|
-
_context6.next =
|
|
30389
|
+
_context6.next = 22;
|
|
30362
30390
|
break;
|
|
30363
30391
|
}
|
|
30364
30392
|
setindex = i;
|
|
30365
|
-
return _context6.abrupt("break",
|
|
30366
|
-
case
|
|
30393
|
+
return _context6.abrupt("break", 25);
|
|
30394
|
+
case 22:
|
|
30367
30395
|
i++;
|
|
30368
|
-
_context6.next =
|
|
30396
|
+
_context6.next = 18;
|
|
30369
30397
|
break;
|
|
30370
|
-
case
|
|
30398
|
+
case 25:
|
|
30371
30399
|
if (!basket.OrderSets[setindex].ConfigVariants) basket.OrderSets[setindex].ConfigVariants = [];
|
|
30372
30400
|
optionsSorted = set.CatalogData.getOptionsPosition();
|
|
30373
30401
|
variantValues = {};
|
|
@@ -30378,9 +30406,9 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30378
30406
|
if (targetArticle[opt] && !variantValues[opt]) variantValues[opt] = targetArticle[opt];
|
|
30379
30407
|
}
|
|
30380
30408
|
}
|
|
30381
|
-
configVariant = new ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils.encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$a(_objectSpread$a({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils.encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils.stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
|
|
30409
|
+
configVariant = new ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils.encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$a(_objectSpread$a({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils.encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set, dimensions), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils.stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
|
|
30382
30410
|
set.basketConfigVariants.push(configVariant);
|
|
30383
|
-
case
|
|
30411
|
+
case 31:
|
|
30384
30412
|
case "end":
|
|
30385
30413
|
return _context6.stop();
|
|
30386
30414
|
}
|
|
@@ -32782,7 +32810,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32782
32810
|
*/
|
|
32783
32811
|
}, {
|
|
32784
32812
|
key: "update3DPlannerView",
|
|
32785
|
-
value: function update3DPlannerView(doRequestRendering, doRequestHqRenderScript, set, renderSize, planner3DGridEnabled, mediaServiceSaveMode, doShow3DDimensionLines, alternateRenderInfo, viewpoint) {
|
|
32813
|
+
value: function update3DPlannerView(doRequestRendering, doRequestHqRenderScript, set, renderSize, planner3DGridEnabled, mediaServiceSaveMode, doShow3DDimensionLines, alternateRenderInfo, viewpoint, useLatestViewpoint) {
|
|
32786
32814
|
var _set$plannerHandler, _set$getAlternateRend2;
|
|
32787
32815
|
var width = renderSize.imgWidth;
|
|
32788
32816
|
var height = renderSize.imgHeight;
|
|
@@ -32793,7 +32821,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32793
32821
|
planner3DGridEnabled: planner3DGridEnabled,
|
|
32794
32822
|
mediaServiceSaveMode: mediaServiceSaveMode,
|
|
32795
32823
|
doShow3DDimensionLines: !!doShow3DDimensionLines
|
|
32796
|
-
}, viewpoint);
|
|
32824
|
+
}, viewpoint, useLatestViewpoint);
|
|
32797
32825
|
}
|
|
32798
32826
|
}, {
|
|
32799
32827
|
key: "getPlannerPaletteViewInfo",
|
|
@@ -33085,33 +33113,37 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33085
33113
|
key: "variantsEvaluator",
|
|
33086
33114
|
value: (function () {
|
|
33087
33115
|
var _variantsEvaluator = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(set, configItems, configStepKey, paletteType) {
|
|
33088
|
-
var _set$WebConfig, _set$
|
|
33089
|
-
var
|
|
33116
|
+
var _set$WebConfig, _set$ViewConfig, _configItems$;
|
|
33117
|
+
var opt, checkForProductsInStock, calcVariantsForPricePreview, previewType, _set$CatalogData$show, targetArticles, startTime, variants, endTime;
|
|
33090
33118
|
return _regeneratorRuntime.wrap(function _callee23$(_context25) {
|
|
33091
33119
|
while (1) switch (_context25.prev = _context25.next) {
|
|
33092
33120
|
case 0:
|
|
33121
|
+
opt = set.CatalogData.getOption(configItems[0].op);
|
|
33122
|
+
if (opt) {
|
|
33123
|
+
_context25.next = 3;
|
|
33124
|
+
break;
|
|
33125
|
+
}
|
|
33126
|
+
return _context25.abrupt("return", configItems);
|
|
33127
|
+
case 3:
|
|
33128
|
+
checkForProductsInStock = ((_set$WebConfig = set.WebConfig) === null || _set$WebConfig === void 0 ? void 0 : _set$WebConfig.checkForProductsInStock) && !(opt !== null && opt !== void 0 && opt.isDescribingState);
|
|
33093
33129
|
calcVariantsForPricePreview = false;
|
|
33094
|
-
checkForProductsInStock = ((_set$WebConfig = set.WebConfig) === null || _set$WebConfig === void 0 ? void 0 : _set$WebConfig.checkForProductsInStock) && !((_set$CatalogData$getO = set.CatalogData.getOption(configItems[0].op)) !== null && _set$CatalogData$getO !== void 0 && _set$CatalogData$getO.isDescribingState);
|
|
33095
33130
|
previewType = (_set$ViewConfig = set.ViewConfig) === null || _set$ViewConfig === void 0 ? void 0 : _set$ViewConfig.pricePreview;
|
|
33096
33131
|
if (previewType) {
|
|
33097
|
-
calcVariantsForPricePreview = !set.dontCalcPricePreviewDueToPerformanceIssues;
|
|
33098
|
-
if (calcVariantsForPricePreview && (_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length) {
|
|
33099
|
-
calcVariantsForPricePreview = !!configItems[0] && set.CatalogData.showPricePreviewOnlyOnOptions.includes(configItems[0].op);
|
|
33100
|
-
}
|
|
33132
|
+
calcVariantsForPricePreview = !set.dontCalcPricePreviewDueToPerformanceIssues && !opt.showOnSeparatTabgroup && (!((_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length) || set.CatalogData.showPricePreviewOnlyOnOptions.includes(opt.codex));
|
|
33101
33133
|
}
|
|
33102
33134
|
if (set.PlannerMode === 'BoxPlanner') calcVariantsForPricePreview = false;
|
|
33103
33135
|
if (paletteType == 'GAL' && ((_configItems$ = configItems[0]) === null || _configItems$ === void 0 ? void 0 : _configItems$.groupName) === undefined || paletteType == 'TEXTBOX' || paletteType == 'NUMBERBOX' || paletteType == 'RANGE') {
|
|
33104
33136
|
calcVariantsForPricePreview = false;
|
|
33105
33137
|
}
|
|
33106
33138
|
if (!(checkForProductsInStock || calcVariantsForPricePreview)) {
|
|
33107
|
-
_context25.next =
|
|
33139
|
+
_context25.next = 19;
|
|
33108
33140
|
break;
|
|
33109
33141
|
}
|
|
33110
33142
|
targetArticles = set.configTree.getTargetArticles(configStepKey);
|
|
33111
33143
|
startTime = new Date();
|
|
33112
|
-
_context25.next =
|
|
33144
|
+
_context25.next = 14;
|
|
33113
33145
|
return this.calcVariants(set, configItems, targetArticles);
|
|
33114
|
-
case
|
|
33146
|
+
case 14:
|
|
33115
33147
|
variants = _context25.sent;
|
|
33116
33148
|
endTime = new Date();
|
|
33117
33149
|
if (endTime.getTime() - startTime.getTime() > 1000) set.dontCalcPricePreviewDueToPerformanceIssues = true;
|
|
@@ -33121,9 +33153,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33121
33153
|
if (checkForProductsInStock) {
|
|
33122
33154
|
configItems = productHandlerInstance.checkProductInStock(configItems, variants, set.getDivaArticles(), targetArticles);
|
|
33123
33155
|
}
|
|
33124
|
-
case
|
|
33156
|
+
case 19:
|
|
33125
33157
|
return _context25.abrupt("return", configItems);
|
|
33126
|
-
case
|
|
33158
|
+
case 20:
|
|
33127
33159
|
case "end":
|
|
33128
33160
|
return _context25.stop();
|
|
33129
33161
|
}
|
|
@@ -33138,21 +33170,31 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33138
33170
|
key: "calcVariants",
|
|
33139
33171
|
value: function () {
|
|
33140
33172
|
var _calcVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(set, configItems, targetArticles) {
|
|
33141
|
-
var variantInfo,
|
|
33173
|
+
var variantInfo, articles, origConfigs, i, item, variantValues, doUseConfigs, targetIndex, origConfig, key, _targetIndex;
|
|
33142
33174
|
return _regeneratorRuntime.wrap(function _callee24$(_context26) {
|
|
33143
33175
|
while (1) switch (_context26.prev = _context26.next) {
|
|
33144
33176
|
case 0:
|
|
33145
33177
|
variantInfo = [];
|
|
33146
|
-
|
|
33178
|
+
articles = set.getDivaArticles();
|
|
33179
|
+
origConfigs = targetArticles.map(function (basketId) {
|
|
33180
|
+
return articles[basketId].VariantValues;
|
|
33181
|
+
});
|
|
33147
33182
|
i = 0;
|
|
33148
|
-
case
|
|
33183
|
+
case 4:
|
|
33149
33184
|
if (!(i < configItems.length)) {
|
|
33150
|
-
_context26.next =
|
|
33185
|
+
_context26.next = 23;
|
|
33151
33186
|
break;
|
|
33152
33187
|
}
|
|
33153
33188
|
item = configItems[i];
|
|
33154
33189
|
variantValues = {};
|
|
33155
33190
|
doUseConfigs = false;
|
|
33191
|
+
targetIndex = 0;
|
|
33192
|
+
case 9:
|
|
33193
|
+
if (!(targetIndex < origConfigs.length)) {
|
|
33194
|
+
_context26.next = 19;
|
|
33195
|
+
break;
|
|
33196
|
+
}
|
|
33197
|
+
origConfig = origConfigs[targetIndex];
|
|
33156
33198
|
for (key in origConfig) {
|
|
33157
33199
|
if (key == item.op || key == item.idmOpgOptionCodex) {
|
|
33158
33200
|
doUseConfigs = true;
|
|
@@ -33160,24 +33202,38 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33160
33202
|
}
|
|
33161
33203
|
variantValues[item.op] = item.codex;
|
|
33162
33204
|
if (item.idmOpgOptionCodex) variantValues[item.idmOpgOptionCodex] = item.idmOpgValCodex;
|
|
33163
|
-
_context26.next =
|
|
33164
|
-
return this.updateArticlesOptionStatesOfActSet(set, variantValues, targetArticles, true, 'calcVariant');
|
|
33165
|
-
case
|
|
33205
|
+
_context26.next = 16;
|
|
33206
|
+
return this.updateArticlesOptionStatesOfActSet(set, variantValues, [targetArticles[targetIndex]], true, 'calcVariant');
|
|
33207
|
+
case 16:
|
|
33208
|
+
targetIndex++;
|
|
33209
|
+
_context26.next = 9;
|
|
33210
|
+
break;
|
|
33211
|
+
case 19:
|
|
33166
33212
|
variantInfo.push({
|
|
33167
33213
|
price: set.getSetPrice(),
|
|
33168
33214
|
variants: set.getGeneralVariantValues(targetArticles),
|
|
33169
33215
|
opt: item.op
|
|
33170
33216
|
});
|
|
33171
|
-
case
|
|
33217
|
+
case 20:
|
|
33172
33218
|
i++;
|
|
33173
|
-
_context26.next =
|
|
33219
|
+
_context26.next = 4;
|
|
33174
33220
|
break;
|
|
33175
|
-
case
|
|
33176
|
-
|
|
33177
|
-
|
|
33178
|
-
|
|
33221
|
+
case 23:
|
|
33222
|
+
_targetIndex = 0;
|
|
33223
|
+
case 24:
|
|
33224
|
+
if (!(_targetIndex < origConfigs.length)) {
|
|
33225
|
+
_context26.next = 30;
|
|
33226
|
+
break;
|
|
33227
|
+
}
|
|
33228
|
+
_context26.next = 27;
|
|
33229
|
+
return this.updateArticlesOptionStatesOfActSet(set, origConfigs[_targetIndex], [targetArticles[_targetIndex]], true);
|
|
33230
|
+
case 27:
|
|
33231
|
+
_targetIndex++;
|
|
33232
|
+
_context26.next = 24;
|
|
33233
|
+
break;
|
|
33234
|
+
case 30:
|
|
33179
33235
|
return _context26.abrupt("return", variantInfo);
|
|
33180
|
-
case
|
|
33236
|
+
case 31:
|
|
33181
33237
|
case "end":
|
|
33182
33238
|
return _context26.stop();
|
|
33183
33239
|
}
|
|
@@ -33386,6 +33442,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33386
33442
|
_loop3();
|
|
33387
33443
|
}
|
|
33388
33444
|
}
|
|
33445
|
+
}, {
|
|
33446
|
+
key: "checkBannerRules",
|
|
33447
|
+
value: function checkBannerRules(set, visitedOptions, event) {
|
|
33448
|
+
var bannerRules = set.CatalogData.bannerRules;
|
|
33449
|
+
if (!bannerRules) return;
|
|
33450
|
+
var rules = articleHandlerInstance.checkNotificationRules(bannerRules, set.getDivaArticles(), visitedOptions, event);
|
|
33451
|
+
return rules === null || rules === void 0 ? void 0 : rules[0];
|
|
33452
|
+
}
|
|
33389
33453
|
}, {
|
|
33390
33454
|
key: "checkNotificationRules",
|
|
33391
33455
|
value: function checkNotificationRules(set, targetArticles, visitedOptions, event) {
|
|
@@ -33874,7 +33938,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33874
33938
|
value: function () {
|
|
33875
33939
|
var _getOrderSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(set, catalogData, posNr, divaNr, repairOnly, returnTo) {
|
|
33876
33940
|
var _hqRenderScript, _set$basketConfigVari2, _set$basketConfigVari3;
|
|
33877
|
-
var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, alternateSetImages, hqRenderScript, promise3D, promise2D, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, promiseHQRenderScript, _yield$Promise$all3, _yield$Promise$all4, plannerWarnings, bruttoPrice;
|
|
33941
|
+
var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, alternateSetImages, hqRenderScript, dimensions, promise3D, promise2D, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, promiseHQRenderScript, _yield$Promise$all3, _yield$Promise$all4, plannerWarnings, bruttoPrice;
|
|
33878
33942
|
return _regeneratorRuntime.wrap(function _callee29$(_context31) {
|
|
33879
33943
|
while (1) switch (_context31.prev = _context31.next) {
|
|
33880
33944
|
case 0:
|
|
@@ -33886,8 +33950,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33886
33950
|
urlToPlanning2D = undefined;
|
|
33887
33951
|
alternateSetImages = undefined;
|
|
33888
33952
|
hqRenderScript = undefined;
|
|
33953
|
+
dimensions = {};
|
|
33889
33954
|
if (dontGenerateImages) {
|
|
33890
|
-
_context31.next =
|
|
33955
|
+
_context31.next = 28;
|
|
33891
33956
|
break;
|
|
33892
33957
|
}
|
|
33893
33958
|
promise3D = this.getSetImage(set, typeof window === 'undefined');
|
|
@@ -33895,22 +33960,24 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33895
33960
|
if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
|
|
33896
33961
|
promise3DAlternate = this.getAlternateSetImages(set);
|
|
33897
33962
|
}
|
|
33898
|
-
_context31.next =
|
|
33963
|
+
_context31.next = 15;
|
|
33899
33964
|
return Promise.all([promise3D, promise2D, promise3DAlternate]);
|
|
33900
|
-
case
|
|
33965
|
+
case 15:
|
|
33901
33966
|
_yield$Promise$all = _context31.sent;
|
|
33902
33967
|
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
|
|
33903
|
-
|
|
33968
|
+
_yield$Promise$all2$ = _yield$Promise$all2[0];
|
|
33969
|
+
setImage = _yield$Promise$all2$.url;
|
|
33970
|
+
dimensions = _yield$Promise$all2$.dimensions;
|
|
33904
33971
|
urlToPlanning2D = _yield$Promise$all2[1];
|
|
33905
33972
|
alternateSetImages = _yield$Promise$all2[2];
|
|
33906
33973
|
promiseHQRenderScript = this.getHQRenderScript(set, divaNr);
|
|
33907
|
-
_context31.next =
|
|
33974
|
+
_context31.next = 25;
|
|
33908
33975
|
return Promise.all([promiseHQRenderScript]);
|
|
33909
|
-
case
|
|
33976
|
+
case 25:
|
|
33910
33977
|
_yield$Promise$all3 = _context31.sent;
|
|
33911
33978
|
_yield$Promise$all4 = _slicedToArray(_yield$Promise$all3, 1);
|
|
33912
33979
|
hqRenderScript = _yield$Promise$all4[0];
|
|
33913
|
-
case
|
|
33980
|
+
case 28:
|
|
33914
33981
|
LOG$8.startTransaction({
|
|
33915
33982
|
event: 'FillBakset',
|
|
33916
33983
|
eventId: 'FILL_BASKET',
|
|
@@ -33942,7 +34009,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33942
34009
|
OfflineData: catalogData.offlineData,
|
|
33943
34010
|
SetArticleNr: set.SetArticleNr ? set.SetArticleNr : catalogData.retailArticleNr,
|
|
33944
34011
|
SetArticleNrPrefix: set.SetArticleNrPrefix,
|
|
33945
|
-
BBox: this.getBBoxObject(set),
|
|
34012
|
+
BBox: this.getBBoxObject(set, dimensions),
|
|
33946
34013
|
SetVariantBasketDatas: set.getVariantBasketData(),
|
|
33947
34014
|
SetImage: setImage,
|
|
33948
34015
|
//Add url string of current rendering.
|
|
@@ -33976,7 +34043,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33976
34043
|
MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
|
|
33977
34044
|
});
|
|
33978
34045
|
return _context31.abrupt("return", orderSet);
|
|
33979
|
-
case
|
|
34046
|
+
case 35:
|
|
33980
34047
|
case "end":
|
|
33981
34048
|
return _context31.stop();
|
|
33982
34049
|
}
|
|
@@ -33996,14 +34063,13 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33996
34063
|
key: "getSetImage",
|
|
33997
34064
|
value: (function () {
|
|
33998
34065
|
var _getSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(set, overwriteLastSavedRendering) {
|
|
33999
|
-
var
|
|
34066
|
+
var is3D, _yield$set$plannerHan, dimensions, url;
|
|
34000
34067
|
return _regeneratorRuntime.wrap(function _callee30$(_context32) {
|
|
34001
34068
|
while (1) switch (_context32.prev = _context32.next) {
|
|
34002
34069
|
case 0:
|
|
34003
|
-
|
|
34004
|
-
is3D = ['3DImage', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
34070
|
+
is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
34005
34071
|
if (!is3D) {
|
|
34006
|
-
_context32.next =
|
|
34072
|
+
_context32.next = 12;
|
|
34007
34073
|
break;
|
|
34008
34074
|
}
|
|
34009
34075
|
LOG$8.startTransaction({
|
|
@@ -34011,17 +34077,29 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34011
34077
|
message: 'render 3D Image',
|
|
34012
34078
|
eventId: 'RENDER_3D_IMAGE'
|
|
34013
34079
|
});
|
|
34014
|
-
_context32.next =
|
|
34080
|
+
_context32.next = 5;
|
|
34015
34081
|
return set.plannerHandler.saveSetImage(overwriteLastSavedRendering);
|
|
34016
|
-
case
|
|
34017
|
-
_context32.next =
|
|
34082
|
+
case 5:
|
|
34083
|
+
_context32.next = 7;
|
|
34018
34084
|
return set.plannerHandler.getSetImageAsUrl(set.getSetId());
|
|
34019
|
-
case
|
|
34020
|
-
|
|
34085
|
+
case 7:
|
|
34086
|
+
_yield$set$plannerHan = _context32.sent;
|
|
34087
|
+
dimensions = _yield$set$plannerHan.dimensions;
|
|
34088
|
+
url = _yield$set$plannerHan.url;
|
|
34021
34089
|
LOG$8.successTransaction('RENDER_3D_IMAGE');
|
|
34022
|
-
|
|
34023
|
-
|
|
34024
|
-
|
|
34090
|
+
return _context32.abrupt("return", {
|
|
34091
|
+
dimensions: dimensions,
|
|
34092
|
+
url: url
|
|
34093
|
+
});
|
|
34094
|
+
case 12:
|
|
34095
|
+
return _context32.abrupt("return", {
|
|
34096
|
+
dimensions: {
|
|
34097
|
+
w: undefined,
|
|
34098
|
+
h: undefined,
|
|
34099
|
+
d: undefined
|
|
34100
|
+
}
|
|
34101
|
+
});
|
|
34102
|
+
case 13:
|
|
34025
34103
|
case "end":
|
|
34026
34104
|
return _context32.stop();
|
|
34027
34105
|
}
|
|
@@ -34041,7 +34119,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34041
34119
|
while (1) switch (_context33.prev = _context33.next) {
|
|
34042
34120
|
case 0:
|
|
34043
34121
|
//if not 3d
|
|
34044
|
-
is3D = ['3DImage', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
34122
|
+
is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
34045
34123
|
if (is3D) {
|
|
34046
34124
|
_context33.next = 3;
|
|
34047
34125
|
break;
|
|
@@ -34097,7 +34175,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34097
34175
|
message: 'render 3D alternative Image',
|
|
34098
34176
|
eventId: 'RENDER_3D_ALTERNATIVE_IMAGE'
|
|
34099
34177
|
});
|
|
34100
|
-
is2D = !['3DImage', 'BoxPlanner'].includes(set.getPlannerMode());
|
|
34178
|
+
is2D = !['3DImage', '3DCOMB', 'BoxPlanner'].includes(set.getPlannerMode());
|
|
34101
34179
|
if (!(is2D || set.onlyRunLogic)) {
|
|
34102
34180
|
_context34.next = 4;
|
|
34103
34181
|
break;
|
|
@@ -34164,14 +34242,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34164
34242
|
}()
|
|
34165
34243
|
}, {
|
|
34166
34244
|
key: "getBBoxObject",
|
|
34167
|
-
value: function getBBoxObject(set) {
|
|
34245
|
+
value: function getBBoxObject(set, dimensions) {
|
|
34246
|
+
var _dimensions$w, _dimensions$d, _dimensions$h, _set$api$getI18n$t, _set$api$getI18n, _set$api$getI18n$t2, _set$api$getI18n$t3, _set$api$getI18n2, _set$api$getI18n2$t, _set$api$getI18n$t4, _set$api$getI18n3, _set$api$getI18n3$t;
|
|
34168
34247
|
var bbox = set.plannerHandler.getSetBoundingBox(set.getSetId());
|
|
34169
|
-
|
|
34170
|
-
X: bbox.width,
|
|
34171
|
-
Y: bbox.depth,
|
|
34172
|
-
Z: bbox.height
|
|
34173
|
-
Info: bbox.width + 'cm x ' + bbox.depth + 'cm'
|
|
34248
|
+
var dim = {
|
|
34249
|
+
X: (_dimensions$w = dimensions === null || dimensions === void 0 ? void 0 : dimensions.w) !== null && _dimensions$w !== void 0 ? _dimensions$w : bbox.width,
|
|
34250
|
+
Y: (_dimensions$d = dimensions === null || dimensions === void 0 ? void 0 : dimensions.d) !== null && _dimensions$d !== void 0 ? _dimensions$d : bbox.depth,
|
|
34251
|
+
Z: (_dimensions$h = dimensions === null || dimensions === void 0 ? void 0 : dimensions.h) !== null && _dimensions$h !== void 0 ? _dimensions$h : bbox.height
|
|
34174
34252
|
};
|
|
34253
|
+
return _objectSpread$8(_objectSpread$8({}, dim), {}, {
|
|
34254
|
+
Info: ((_set$api$getI18n$t = (_set$api$getI18n = set.api.getI18n()) === null || _set$api$getI18n === void 0 || (_set$api$getI18n$t2 = _set$api$getI18n.t) === null || _set$api$getI18n$t2 === void 0 ? void 0 : _set$api$getI18n$t2.call(_set$api$getI18n, 'utils.width_first_letter', 'B')) !== null && _set$api$getI18n$t !== void 0 ? _set$api$getI18n$t : 'B') + ': ' + dim.X + ' cm x ' + ((_set$api$getI18n$t3 = (_set$api$getI18n2 = set.api.getI18n()) === null || _set$api$getI18n2 === void 0 || (_set$api$getI18n2$t = _set$api$getI18n2.t) === null || _set$api$getI18n2$t === void 0 ? void 0 : _set$api$getI18n2$t.call(_set$api$getI18n2, 'utils.depth_first_letter', 'T')) !== null && _set$api$getI18n$t3 !== void 0 ? _set$api$getI18n$t3 : 'T') + ': ' + dim.Y + ' cm' + (dim.Z ? ' x ' + ((_set$api$getI18n$t4 = (_set$api$getI18n3 = set.api.getI18n()) === null || _set$api$getI18n3 === void 0 || (_set$api$getI18n3$t = _set$api$getI18n3.t) === null || _set$api$getI18n3$t === void 0 ? void 0 : _set$api$getI18n3$t.call(_set$api$getI18n3, 'utils.height_first_letter', 'H')) !== null && _set$api$getI18n$t4 !== void 0 ? _set$api$getI18n$t4 : 'H') + ': ' + dim.X + ' cm' : '')
|
|
34255
|
+
});
|
|
34175
34256
|
}
|
|
34176
34257
|
}, {
|
|
34177
34258
|
key: "loadProductsOfSets",
|
|
@@ -34898,7 +34979,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34898
34979
|
case 9:
|
|
34899
34980
|
_context7.prev = 9;
|
|
34900
34981
|
_context7.t0 = _context7["catch"](0);
|
|
34901
|
-
LOG$7.error(new DivaError('
|
|
34982
|
+
LOG$7.error(new DivaError('ProductId cannot be found in Database', {
|
|
34902
34983
|
code: 'WC_0004',
|
|
34903
34984
|
custom: {
|
|
34904
34985
|
divaNr: divaNr
|
|
@@ -34924,30 +35005,44 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34924
35005
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
34925
35006
|
while (1) switch (_context8.prev = _context8.next) {
|
|
34926
35007
|
case 0:
|
|
34927
|
-
_context8.
|
|
35008
|
+
_context8.prev = 0;
|
|
35009
|
+
_context8.next = 3;
|
|
34928
35010
|
return api.getDataCache(api.getProductBasketUrl(key, productId), undefined, undefined, 'catalog', 'POST', {
|
|
34929
35011
|
fields: fields !== null && fields !== void 0 && fields.length ? fields : undefined
|
|
34930
35012
|
});
|
|
34931
|
-
case
|
|
35013
|
+
case 3:
|
|
34932
35014
|
variantData = _context8.sent;
|
|
34933
35015
|
if (!(variantData.Error || !variantData.basket)) {
|
|
34934
|
-
_context8.next =
|
|
35016
|
+
_context8.next = 9;
|
|
34935
35017
|
break;
|
|
34936
35018
|
}
|
|
34937
|
-
LOG$7.error(new DivaError('ProductId
|
|
35019
|
+
LOG$7.error(new DivaError('ProductId cannot be found in Database', {
|
|
34938
35020
|
code: 'WC_0005',
|
|
34939
35021
|
custom: {
|
|
34940
35022
|
productId: productId
|
|
34941
35023
|
}
|
|
34942
35024
|
}));
|
|
34943
35025
|
return _context8.abrupt("return", false);
|
|
34944
|
-
case 8:
|
|
34945
|
-
return _context8.abrupt("return", this.initBasket(api, variantData.basket.DivaNr, variantData, undefined, productId));
|
|
34946
35026
|
case 9:
|
|
35027
|
+
return _context8.abrupt("return", this.initBasket(api, variantData.basket.DivaNr, variantData, undefined, productId));
|
|
35028
|
+
case 10:
|
|
35029
|
+
_context8.next = 16;
|
|
35030
|
+
break;
|
|
35031
|
+
case 12:
|
|
35032
|
+
_context8.prev = 12;
|
|
35033
|
+
_context8.t0 = _context8["catch"](0);
|
|
35034
|
+
LOG$7.error(new DivaError('Error while fetching product data', {
|
|
35035
|
+
code: 'WC_0005',
|
|
35036
|
+
custom: {
|
|
35037
|
+
productId: productId
|
|
35038
|
+
}
|
|
35039
|
+
}));
|
|
35040
|
+
return _context8.abrupt("return", false);
|
|
35041
|
+
case 16:
|
|
34947
35042
|
case "end":
|
|
34948
35043
|
return _context8.stop();
|
|
34949
35044
|
}
|
|
34950
|
-
}, _callee8, this);
|
|
35045
|
+
}, _callee8, this, [[0, 12]]);
|
|
34951
35046
|
}));
|
|
34952
35047
|
function loadBasketByCustomProductId(_x17, _x18, _x19, _x20) {
|
|
34953
35048
|
return _loadBasketByCustomProductId.apply(this, arguments);
|
|
@@ -35280,7 +35375,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35280
35375
|
break;
|
|
35281
35376
|
case 3:
|
|
35282
35377
|
_context13.next = 5;
|
|
35283
|
-
return import('./PfisterWWSHandler-
|
|
35378
|
+
return import('./PfisterWWSHandler-a3b013b1.js');
|
|
35284
35379
|
case 5:
|
|
35285
35380
|
_yield$import = _context13.sent;
|
|
35286
35381
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -35288,7 +35383,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35288
35383
|
return _context13.abrupt("break", 33);
|
|
35289
35384
|
case 9:
|
|
35290
35385
|
_context13.next = 11;
|
|
35291
|
-
return import('./LiviqueWWSHandler-
|
|
35386
|
+
return import('./LiviqueWWSHandler-19bb2392.js');
|
|
35292
35387
|
case 11:
|
|
35293
35388
|
_yield$import2 = _context13.sent;
|
|
35294
35389
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -35296,7 +35391,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35296
35391
|
return _context13.abrupt("break", 33);
|
|
35297
35392
|
case 15:
|
|
35298
35393
|
_context13.next = 17;
|
|
35299
|
-
return import('./SeriousBasketHandler-
|
|
35394
|
+
return import('./SeriousBasketHandler-1cb21861.js');
|
|
35300
35395
|
case 17:
|
|
35301
35396
|
_yield$import3 = _context13.sent;
|
|
35302
35397
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -35304,7 +35399,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35304
35399
|
return _context13.abrupt("break", 33);
|
|
35305
35400
|
case 21:
|
|
35306
35401
|
_context13.next = 23;
|
|
35307
|
-
return import('./ProductBasketHandler-
|
|
35402
|
+
return import('./ProductBasketHandler-b53ee156.js');
|
|
35308
35403
|
case 23:
|
|
35309
35404
|
_yield$import4 = _context13.sent;
|
|
35310
35405
|
ProductWWSHandler = _yield$import4["default"];
|
|
@@ -35312,7 +35407,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35312
35407
|
return _context13.abrupt("break", 33);
|
|
35313
35408
|
case 27:
|
|
35314
35409
|
_context13.next = 29;
|
|
35315
|
-
return import('./StandardWWSHandler-
|
|
35410
|
+
return import('./StandardWWSHandler-c05fd7ed.js');
|
|
35316
35411
|
case 29:
|
|
35317
35412
|
_yield$import5 = _context13.sent;
|
|
35318
35413
|
StandardWWSHandler = _yield$import5["default"];
|
|
@@ -36697,7 +36792,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36697
36792
|
while (1) switch (_context3.prev = _context3.next) {
|
|
36698
36793
|
case 0:
|
|
36699
36794
|
_context3.next = 2;
|
|
36700
|
-
return import('./Host3DSignalR-
|
|
36795
|
+
return import('./Host3DSignalR-912df5a5.js');
|
|
36701
36796
|
case 2:
|
|
36702
36797
|
_yield$import = _context3.sent;
|
|
36703
36798
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -37142,13 +37237,15 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37142
37237
|
* @param catalogCodex The CatalogCodex in the planning
|
|
37143
37238
|
* @param catalogGUID The CatalogGUID in the planning
|
|
37144
37239
|
* @param forceReloadPlanning Force reload whole planning even if only viewPoint has changed. This is used when for example no 3D Render Client has loaded the current planning
|
|
37240
|
+
* @param camera The RTV Camera Information for Unity/RTV KOMBI
|
|
37241
|
+
* @param useLatestCamera should the latest camera be used ? default yes when requesting the start viewpoint via the configurator button not
|
|
37145
37242
|
*/
|
|
37146
37243
|
}, {
|
|
37147
37244
|
key: "request3D",
|
|
37148
37245
|
value: (function () {
|
|
37149
37246
|
var _request3D = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(params) {
|
|
37150
37247
|
var _params$renderRequest, _params$renderRequest2, _params$renderRequest3, _params$renderRequest4, _params$renderRequest5, _params$renderRequest6, _this$viewPointHandle;
|
|
37151
|
-
var room, newRenderSize, doReloadWholePlanning, planningHash, requestRenderingFrom3DHost, requestHqRenderScriptFrom3DHost, rendering, renderHash, viewPointName, functionType,
|
|
37248
|
+
var room, newRenderSize, doReloadWholePlanning, camera, planningHash, requestRenderingFrom3DHost, requestHqRenderScriptFrom3DHost, rendering, renderHash, viewPointName, functionType, sizeInfo, _rendering, fullscreenRendering, renderingInCacheFound, _this$connectionHandl6, _plannerMeasureDigits, returnRequest;
|
|
37152
37249
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
37153
37250
|
while (1) switch (_context7.prev = _context7.next) {
|
|
37154
37251
|
case 0:
|
|
@@ -37174,7 +37271,8 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37174
37271
|
//Check if viewPoint is changed based on alternateRendering
|
|
37175
37272
|
//Do check if viewpoint has to be changed
|
|
37176
37273
|
if (params.alternateRenderInfo && (params.alternateRenderInfo.overwrittenViewPointName || params.alternateRenderInfo.viewPointName)) this.handleStaticVP(params.alternateRenderInfo.overwrittenViewPointName ? params.alternateRenderInfo.overwrittenViewPointName : params.alternateRenderInfo.viewPointName);
|
|
37177
|
-
|
|
37274
|
+
camera = params.camera ? params.camera : params.useLatestCamera ? this.latestCamera : undefined;
|
|
37275
|
+
planningHash = md5(JSON.stringify(params.planningData) + JSON.stringify(camera));
|
|
37178
37276
|
if (planningHash == this.lastFramePlanningHash) doReloadWholePlanning = false;
|
|
37179
37277
|
if (params.forceReloadPlanning || (_this$viewPointHandle = this.viewPointHandler.getCurRoomlistVP()) !== null && _this$viewPointHandle !== void 0 && _this$viewPointHandle.isStatic) doReloadWholePlanning = true;
|
|
37180
37278
|
this.lastFramePlanningHash = planningHash;
|
|
@@ -37182,7 +37280,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37182
37280
|
requestHqRenderScriptFrom3DHost = false;
|
|
37183
37281
|
if (params.doRequestHqRenderScript) {
|
|
37184
37282
|
rendering = this.hqRenderScriptCache.get(planningHash);
|
|
37185
|
-
if (rendering) {
|
|
37283
|
+
if (rendering && !params.useLatestCamera) {
|
|
37186
37284
|
LOG$4.debug('Get HQRenderScript from cache');
|
|
37187
37285
|
this.lastSavedHQRenderScript = JSON.parse(rendering.HQRenderScript);
|
|
37188
37286
|
this.updatePlannerHqRenderScriptInView(rendering);
|
|
@@ -37203,7 +37301,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37203
37301
|
if (params.doRequestRendering) {
|
|
37204
37302
|
viewPointName = this.viewPointHandler.getCurViewPointToRender();
|
|
37205
37303
|
sizeInfo = params.renderRequestInfos.width + ':' + params.renderRequestInfos.height;
|
|
37206
|
-
renderHash = md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify(
|
|
37304
|
+
renderHash = md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify(camera));
|
|
37207
37305
|
this.lastRequestedRenderHash = renderHash;
|
|
37208
37306
|
LOG$4.debug('Request New Rendering with hash ' + renderHash + '; and planningHash: ' + planningHash, 'PlannerHandler3D');
|
|
37209
37307
|
if (this.checkIsRenderingCached(renderHash, params.renderRequestInfos.planner3DGridEnabled, params.renderRequestInfos.mediaServiceSaveMode)) {
|
|
@@ -37236,7 +37334,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37236
37334
|
}
|
|
37237
37335
|
}
|
|
37238
37336
|
if (!(requestHqRenderScriptFrom3DHost || requestRenderingFrom3DHost)) {
|
|
37239
|
-
_context7.next =
|
|
37337
|
+
_context7.next = 32;
|
|
37240
37338
|
break;
|
|
37241
37339
|
}
|
|
37242
37340
|
if (params.catalogData.lang) params.planningData.SCE.Lang = params.catalogData.lang;
|
|
@@ -37263,20 +37361,20 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37263
37361
|
viewPointInfo: this.viewPointHandler.getCurRoomlistVP(),
|
|
37264
37362
|
alternateRenderingsExist: params.alternateRenderingsExist,
|
|
37265
37363
|
alternateRenderInfo: params.alternateRenderInfo,
|
|
37266
|
-
camera:
|
|
37267
|
-
forceUseCam: !!
|
|
37364
|
+
camera: camera,
|
|
37365
|
+
forceUseCam: !!camera
|
|
37268
37366
|
} : undefined
|
|
37269
37367
|
});
|
|
37270
37368
|
if (params.camera) this.latestCamera = params.camera;
|
|
37271
37369
|
if (!(returnRequest === undefined || requestHqRenderScriptFrom3DHost && returnRequest.hqRenderScript == undefined || requestRenderingFrom3DHost && returnRequest.rendering == undefined)) {
|
|
37272
|
-
_context7.next =
|
|
37370
|
+
_context7.next = 30;
|
|
37273
37371
|
break;
|
|
37274
37372
|
}
|
|
37275
37373
|
LOG$4.error(new DivaError('Error requesting the 3D from host. RequestHqRenderScript: ' + requestHqRenderScriptFrom3DHost + '; RequestRendering: ' + requestRenderingFrom3DHost, {
|
|
37276
37374
|
code: 'WC_0013'
|
|
37277
37375
|
}));
|
|
37278
37376
|
return _context7.abrupt("return");
|
|
37279
|
-
case
|
|
37377
|
+
case 30:
|
|
37280
37378
|
if (requestHqRenderScriptFrom3DHost) {
|
|
37281
37379
|
if (this.waitForHQRenderScript.has(planningHash)) this.waitForHQRenderScript["delete"](planningHash);
|
|
37282
37380
|
this.waitForHQRenderScript.set(planningHash, returnRequest.hqRenderScript);
|
|
@@ -37288,12 +37386,12 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37288
37386
|
if (returnRequest.rendering.getIsAlternateRendering()) this.addAlternateRenderingToSavedAlternateRenderings(returnRequest.rendering);else this.lastSavedRendering = returnRequest.rendering;
|
|
37289
37387
|
}
|
|
37290
37388
|
}
|
|
37291
|
-
case
|
|
37389
|
+
case 32:
|
|
37292
37390
|
return _context7.abrupt("return", {
|
|
37293
37391
|
planningHash: planningHash,
|
|
37294
37392
|
renderHash: renderHash
|
|
37295
37393
|
});
|
|
37296
|
-
case
|
|
37394
|
+
case 33:
|
|
37297
37395
|
case "end":
|
|
37298
37396
|
return _context7.stop();
|
|
37299
37397
|
}
|
|
@@ -38246,7 +38344,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38246
38344
|
break;
|
|
38247
38345
|
case 8:
|
|
38248
38346
|
_context4.next = 10;
|
|
38249
|
-
return import('./DivaStandardPlanner-
|
|
38347
|
+
return import('./DivaStandardPlanner-562b5379.js');
|
|
38250
38348
|
case 10:
|
|
38251
38349
|
_yield$import = _context4.sent;
|
|
38252
38350
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -38257,7 +38355,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38257
38355
|
return _context4.abrupt("break", 21);
|
|
38258
38356
|
case 15:
|
|
38259
38357
|
_context4.next = 17;
|
|
38260
|
-
return import('./DivaBoxPlanner-
|
|
38358
|
+
return import('./DivaBoxPlanner-0880d2b3.js');
|
|
38261
38359
|
case 17:
|
|
38262
38360
|
_yield$import2 = _context4.sent;
|
|
38263
38361
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -38400,7 +38498,14 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38400
38498
|
case 2:
|
|
38401
38499
|
rendering = _context6.sent;
|
|
38402
38500
|
LOG$2.debug('SAVE SET IMAGE DIM3D width: ' + (rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().w) + ', height: ' + (rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().h) + ', depth: ' + (rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().d));
|
|
38403
|
-
return _context6.abrupt("return",
|
|
38501
|
+
return _context6.abrupt("return", {
|
|
38502
|
+
url: rendering === null || rendering === void 0 ? void 0 : rendering.UrlToSavedRendering,
|
|
38503
|
+
dimensions: {
|
|
38504
|
+
w: rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().w,
|
|
38505
|
+
h: rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().h,
|
|
38506
|
+
d: rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().d
|
|
38507
|
+
}
|
|
38508
|
+
});
|
|
38404
38509
|
case 5:
|
|
38405
38510
|
case "end":
|
|
38406
38511
|
return _context6.stop();
|
|
@@ -38985,7 +39090,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38985
39090
|
planner3DGridEnabled: false,
|
|
38986
39091
|
mediaServiceSaveMode: 'STREAM',
|
|
38987
39092
|
doShow3DDimensionLines: !!doShow3DDimensionLines
|
|
38988
|
-
});
|
|
39093
|
+
}, undefined, true);
|
|
38989
39094
|
} else {
|
|
38990
39095
|
this.handler3D.handle3DVisualizationChanged(mode, params);
|
|
38991
39096
|
}
|
|
@@ -39018,7 +39123,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39018
39123
|
}, {
|
|
39019
39124
|
key: "request3D",
|
|
39020
39125
|
value: function () {
|
|
39021
|
-
var _request3D = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(doRequestRendering, doRequestHqRenderScript, alternateRenderingsExist, alternateRenderInfo, forceReloadPlanning, renderRequestInfos, viewpoint) {
|
|
39126
|
+
var _request3D = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(doRequestRendering, doRequestHqRenderScript, alternateRenderingsExist, alternateRenderInfo, forceReloadPlanning, renderRequestInfos, viewpoint, useLatestCamera) {
|
|
39022
39127
|
var _this3 = this;
|
|
39023
39128
|
var plannerData, loadedCatData, plannerExists, savedSetId;
|
|
39024
39129
|
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
@@ -39089,7 +39194,8 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39089
39194
|
forceReloadPlanning: forceReloadPlanning,
|
|
39090
39195
|
alternateRenderInfo: alternateRenderInfo,
|
|
39091
39196
|
alternateRenderingsExist: alternateRenderingsExist,
|
|
39092
|
-
camera: viewpoint
|
|
39197
|
+
camera: viewpoint,
|
|
39198
|
+
useLatestCamera: useLatestCamera
|
|
39093
39199
|
});
|
|
39094
39200
|
case 18:
|
|
39095
39201
|
return _context16.abrupt("return", _context16.sent);
|
|
@@ -39101,7 +39207,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39101
39207
|
}
|
|
39102
39208
|
}, _callee16, this);
|
|
39103
39209
|
}));
|
|
39104
|
-
function request3D(_x33, _x34, _x35, _x36, _x37, _x38, _x39) {
|
|
39210
|
+
function request3D(_x33, _x34, _x35, _x36, _x37, _x38, _x39, _x40) {
|
|
39105
39211
|
return _request3D.apply(this, arguments);
|
|
39106
39212
|
}
|
|
39107
39213
|
return request3D;
|
|
@@ -39780,19 +39886,22 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39780
39886
|
//onConfigItemClick ist ein Click auf das Item der ConfigPalette um die OPV zu ändern
|
|
39781
39887
|
_defineProperty(this, "doConfigure", /*#__PURE__*/function () {
|
|
39782
39888
|
var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents) {
|
|
39889
|
+
var _this$actions13, _this$actions13$toggl, _this$actions14, _this$actions14$toggl;
|
|
39783
39890
|
var set, returnValues, structure, _returnValues$element, _this$updateViewPlann8, _this$updateElementSe4;
|
|
39784
39891
|
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
39785
39892
|
while (1) switch (_context11.prev = _context11.next) {
|
|
39786
39893
|
case 0:
|
|
39787
39894
|
set = _this.actSet();
|
|
39788
|
-
|
|
39895
|
+
(_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);
|
|
39896
|
+
_context11.next = 4;
|
|
39789
39897
|
return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, myValues, targetArticles, undefined, 'FromViewClick');
|
|
39790
|
-
case
|
|
39898
|
+
case 4:
|
|
39791
39899
|
returnValues = _context11.sent;
|
|
39900
|
+
(_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);
|
|
39792
39901
|
structure = setHandlerInstance.loadConfigStructureOfActSet(set, _this.getCurPlannerType());
|
|
39793
39902
|
_this.checkVariantData();
|
|
39794
39903
|
if (dontUpdatePlannerView) {
|
|
39795
|
-
_context11.next =
|
|
39904
|
+
_context11.next = 18;
|
|
39796
39905
|
break;
|
|
39797
39906
|
}
|
|
39798
39907
|
_this.updateConfiguratorStructure(structure);
|
|
@@ -39806,16 +39915,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39806
39915
|
_this.updateViewButtonsDependigOnConfigStructure();
|
|
39807
39916
|
_this.updatePlannerView('DO_CONFIGURE', myValues);
|
|
39808
39917
|
_this.updateWebConfiguratorTitle();
|
|
39809
|
-
_context11.next =
|
|
39918
|
+
_context11.next = 18;
|
|
39810
39919
|
return _this.getFreePlacesOnGrids(undefined, 'doConfigure');
|
|
39811
|
-
case
|
|
39920
|
+
case 18:
|
|
39812
39921
|
if (dontCallEvents) {
|
|
39813
|
-
_context11.next =
|
|
39922
|
+
_context11.next = 21;
|
|
39814
39923
|
break;
|
|
39815
39924
|
}
|
|
39816
|
-
_context11.next =
|
|
39925
|
+
_context11.next = 21;
|
|
39817
39926
|
return _this.fillBaksetforOnWebPlanerConfigChange(myValues);
|
|
39818
|
-
case
|
|
39927
|
+
case 21:
|
|
39819
39928
|
case "end":
|
|
39820
39929
|
return _context11.stop();
|
|
39821
39930
|
}
|
|
@@ -39879,6 +39988,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39879
39988
|
return _ref12.apply(this, arguments);
|
|
39880
39989
|
};
|
|
39881
39990
|
}());
|
|
39991
|
+
_defineProperty(this, "getPosNr", function (basketId) {
|
|
39992
|
+
var _set$getArticleByBask;
|
|
39993
|
+
var set = _this.actSet();
|
|
39994
|
+
if (!set) throw new Error('set undefined');
|
|
39995
|
+
return (_set$getArticleByBask = set.getArticleByBasketId(basketId)) === null || _set$getArticleByBask === void 0 ? void 0 : _set$getArticleByBask.posNr;
|
|
39996
|
+
});
|
|
39882
39997
|
_defineProperty(this, "getReturnTo", function (event) {
|
|
39883
39998
|
var returnTo = _this.ReturnTo;
|
|
39884
39999
|
if (returnTo == undefined) {
|
|
@@ -39909,7 +40024,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39909
40024
|
key: "initialize",
|
|
39910
40025
|
value: function () {
|
|
39911
40026
|
var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13() {
|
|
39912
|
-
var viewReadyPromise, loadSuccessful, _initSetState$api$web, _this$
|
|
40027
|
+
var viewReadyPromise, loadSuccessful, _initSetState$api$web, _this$actions16, _set$getDivaArticles, _set$getSetPrice, _this$actions15, _this$actions15$toggl, initSetState, set, products, result, _this$actions17, basket, catalogData;
|
|
39913
40028
|
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
39914
40029
|
while (1) switch (_context13.prev = _context13.next) {
|
|
39915
40030
|
case 0:
|
|
@@ -39953,7 +40068,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39953
40068
|
return this.initView();
|
|
39954
40069
|
case 20:
|
|
39955
40070
|
this.subscribeToWebPlannerEvents();
|
|
39956
|
-
(_this$
|
|
40071
|
+
(_this$actions15 = this.actions) === null || _this$actions15 === void 0 || (_this$actions15$toggl = _this$actions15.toggleLoading) === null || _this$actions15$toggl === void 0 || _this$actions15$toggl.call(_this$actions15, 'Planner_Loading', false, false);
|
|
39957
40072
|
return _context13.abrupt("return", true);
|
|
39958
40073
|
case 23:
|
|
39959
40074
|
//TODO: get prices of matching product with more than one element
|
|
@@ -40003,11 +40118,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40003
40118
|
_context13.next = 44;
|
|
40004
40119
|
return this.initView();
|
|
40005
40120
|
case 44:
|
|
40006
|
-
(_this$
|
|
40121
|
+
(_this$actions16 = this.actions) === null || _this$actions16 === void 0 || _this$actions16.onEvent({
|
|
40007
40122
|
type: 'onConfiguratorReady'
|
|
40008
40123
|
});
|
|
40009
40124
|
if (Object.keys((_set$getDivaArticles = set === null || set === void 0 ? void 0 : set.getDivaArticles()) !== null && _set$getDivaArticles !== void 0 ? _set$getDivaArticles : {}).length) {
|
|
40010
|
-
(_this$
|
|
40125
|
+
(_this$actions17 = this.actions) === null || _this$actions17 === void 0 || _this$actions17.onEvent({
|
|
40011
40126
|
type: 'onArticleInitialized'
|
|
40012
40127
|
});
|
|
40013
40128
|
}
|
|
@@ -40102,11 +40217,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40102
40217
|
}, {
|
|
40103
40218
|
key: "onInitializationError",
|
|
40104
40219
|
value: function onInitializationError() {
|
|
40105
|
-
var _this$state2, _this$
|
|
40220
|
+
var _this$state2, _this$actions19, _this$actions19$toggl;
|
|
40106
40221
|
var onErrorHandling = this.api.onErrorHandling();
|
|
40107
40222
|
if ((_this$state2 = this.state) !== null && _this$state2 !== void 0 && _this$state2.isFullscreenComponent) {
|
|
40108
|
-
var _this$
|
|
40109
|
-
(_this$
|
|
40223
|
+
var _this$actions18;
|
|
40224
|
+
(_this$actions18 = this.actions) === null || _this$actions18 === void 0 || _this$actions18.closeComponentInFullscreen();
|
|
40110
40225
|
return;
|
|
40111
40226
|
}
|
|
40112
40227
|
if (onErrorHandling) {
|
|
@@ -40147,7 +40262,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40147
40262
|
});
|
|
40148
40263
|
}
|
|
40149
40264
|
}
|
|
40150
|
-
(_this$
|
|
40265
|
+
(_this$actions19 = this.actions) === null || _this$actions19 === void 0 || (_this$actions19$toggl = _this$actions19.toggleLoading) === null || _this$actions19$toggl === void 0 || _this$actions19$toggl.call(_this$actions19, 'Planner_Loading', false, false);
|
|
40151
40266
|
}
|
|
40152
40267
|
}, {
|
|
40153
40268
|
key: "getDivaArticles",
|
|
@@ -40480,7 +40595,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40480
40595
|
}, {
|
|
40481
40596
|
key: "updatePlannerView",
|
|
40482
40597
|
value: function updatePlannerView(callingFrom, onDoConfigureValues, viewpoint) {
|
|
40483
|
-
var _this$getCurrentAlter, _set$getAlternateRend, _this$getDoShow3DDime2, _this$getDoShow3DDime3;
|
|
40598
|
+
var _this$getCurrentAlter, _set$getAlternateRend, _this$getDoShow3DDime2, _this$getDoShow3DDime3, _this$getDoShow3DDime4;
|
|
40484
40599
|
var set = this.actSet();
|
|
40485
40600
|
if (!set) return;
|
|
40486
40601
|
var alternateRenderInfo = (_this$getCurrentAlter = this.getCurrentAlternativRendering) === null || _this$getCurrentAlter === void 0 || (_this$getCurrentAlter = _this$getCurrentAlter.call(this)) === null || _this$getCurrentAlter === void 0 ? void 0 : _this$getCurrentAlter[0];
|
|
@@ -40515,24 +40630,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40515
40630
|
//delete me if you see this
|
|
40516
40631
|
LOG$1.debug('lvl 1: ', this.getCurPlannerViewMode());
|
|
40517
40632
|
switch (this.getCurPlannerViewMode()) {
|
|
40633
|
+
case '3DCOMB':
|
|
40634
|
+
setHandlerInstance.update3DPlannerView(true, true, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime2 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime2 === void 0 ? void 0 : _this$getDoShow3DDime2.call(this), alternateRenderInfo, viewpoint, callingFrom != 'HANDLE_3D_VIS_CHANGED');
|
|
40635
|
+
break;
|
|
40518
40636
|
case 'RTViewer':
|
|
40519
40637
|
//Request HQRenderscript + rendering
|
|
40520
40638
|
//Request new Rendering
|
|
40521
|
-
setHandlerInstance.update3DPlannerView(true, true, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$
|
|
40639
|
+
setHandlerInstance.update3DPlannerView(true, true, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime3 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime3 === void 0 ? void 0 : _this$getDoShow3DDime3.call(this), alternateRenderInfo, viewpoint);
|
|
40522
40640
|
break;
|
|
40523
40641
|
case '3DImage':
|
|
40524
40642
|
//Request new Rendering
|
|
40525
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$
|
|
40643
|
+
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime4 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime4 === void 0 ? void 0 : _this$getDoShow3DDime4.call(this), alternateRenderInfo);
|
|
40526
40644
|
break;
|
|
40527
40645
|
case '2DGrid':
|
|
40528
40646
|
var boundingBox = setHandlerInstance.get2DViewPlannerBoundingBox(set);
|
|
40529
40647
|
if (boundingBox) {
|
|
40530
40648
|
this.updatePlanner2DGrid(boundingBox);
|
|
40531
40649
|
}
|
|
40532
|
-
if (['3DImage'].includes(this.getInitPlannerViewMode())) {
|
|
40533
|
-
var _this$
|
|
40650
|
+
if (['3DImage', '3DCOMB'].includes(this.getInitPlannerViewMode())) {
|
|
40651
|
+
var _this$getDoShow3DDime5;
|
|
40534
40652
|
//update 3D image always even if you are in the 2DGrid mode
|
|
40535
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$
|
|
40653
|
+
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime5 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime5 === void 0 ? void 0 : _this$getDoShow3DDime5.call(this), alternateRenderInfo);
|
|
40536
40654
|
}
|
|
40537
40655
|
break;
|
|
40538
40656
|
}
|
|
@@ -40550,18 +40668,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40550
40668
|
value: function forceUpdatePlannerView(renderSavingMode, doLoadAllAlternateRenderings) {
|
|
40551
40669
|
var set = this.actSet();
|
|
40552
40670
|
this.update2DGrid(set);
|
|
40553
|
-
if (['3DImage', 'BoxPlanner'].includes(this.getInitPlannerViewMode())) {
|
|
40554
|
-
var _this$
|
|
40671
|
+
if (['3DImage', '3DCOMB', 'BoxPlanner'].includes(this.getInitPlannerViewMode())) {
|
|
40672
|
+
var _this$getDoShow3DDime7;
|
|
40555
40673
|
if (doLoadAllAlternateRenderings) {
|
|
40556
40674
|
var alternateRenderings = set.CatalogData.alternateRenderingsForSummary;
|
|
40557
40675
|
for (var i = 0; i < alternateRenderings.length; i++) {
|
|
40558
40676
|
if (alternateRenderings[i].hideOptionsIn3DImage && alternateRenderings[i].hideOptionsIn3DImage.length > 0) {
|
|
40559
|
-
var _this$
|
|
40560
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), false, renderSavingMode, (_this$
|
|
40677
|
+
var _this$getDoShow3DDime6;
|
|
40678
|
+
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), false, renderSavingMode, (_this$getDoShow3DDime6 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime6 === void 0 ? void 0 : _this$getDoShow3DDime6.call(this), alternateRenderings[i]);
|
|
40561
40679
|
}
|
|
40562
40680
|
}
|
|
40563
40681
|
}
|
|
40564
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), false, renderSavingMode, (_this$
|
|
40682
|
+
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), false, renderSavingMode, (_this$getDoShow3DDime7 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime7 === void 0 ? void 0 : _this$getDoShow3DDime7.call(this));
|
|
40565
40683
|
}
|
|
40566
40684
|
}
|
|
40567
40685
|
}, {
|
|
@@ -40858,8 +40976,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40858
40976
|
}, {
|
|
40859
40977
|
key: "changeOnFavorites",
|
|
40860
40978
|
value: function changeOnFavorites(opt, opvs, targetArticles, remove) {
|
|
40861
|
-
var _this$
|
|
40862
|
-
favoritesHandlerInstance.changeOnFavorites(this.actSet(), opt, opvs, targetArticles, remove, (_this$
|
|
40979
|
+
var _this$actions20;
|
|
40980
|
+
favoritesHandlerInstance.changeOnFavorites(this.actSet(), opt, opvs, targetArticles, remove, (_this$actions20 = this.actions) === null || _this$actions20 === void 0 ? void 0 : _this$actions20.openModal);
|
|
40863
40981
|
}
|
|
40864
40982
|
}, {
|
|
40865
40983
|
key: "setDifferentOptions",
|
|
@@ -40906,25 +41024,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40906
41024
|
}, {
|
|
40907
41025
|
key: "callEvent",
|
|
40908
41026
|
value: function callEvent(event, param) {
|
|
40909
|
-
var _this$
|
|
41027
|
+
var _this$actions21, _this$actions22, _this$actions23, _this$actions24;
|
|
40910
41028
|
switch (event) {
|
|
40911
41029
|
case 'onFullscreenClose':
|
|
40912
|
-
(_this$
|
|
41030
|
+
(_this$actions21 = this.actions) === null || _this$actions21 === void 0 || _this$actions21.onEvent({
|
|
40913
41031
|
type: 'onFullscreenClose'
|
|
40914
41032
|
});
|
|
40915
41033
|
break;
|
|
40916
41034
|
case 'onWebPlanerClose':
|
|
40917
|
-
(_this$
|
|
41035
|
+
(_this$actions22 = this.actions) === null || _this$actions22 === void 0 || _this$actions22.onEvent({
|
|
40918
41036
|
type: 'onWebPlanerClose'
|
|
40919
41037
|
});
|
|
40920
41038
|
break;
|
|
40921
41039
|
case 'onWebPlanerHelp':
|
|
40922
|
-
(_this$
|
|
41040
|
+
(_this$actions23 = this.actions) === null || _this$actions23 === void 0 || _this$actions23.onEvent({
|
|
40923
41041
|
type: 'onWebPlanerHelp'
|
|
40924
41042
|
});
|
|
40925
41043
|
break;
|
|
40926
41044
|
case 'onWebPlanerZoomClick':
|
|
40927
|
-
(_this$
|
|
41045
|
+
(_this$actions24 = this.actions) === null || _this$actions24 === void 0 || _this$actions24.onEvent({
|
|
40928
41046
|
type: 'onWebPlanerZoomClick',
|
|
40929
41047
|
data: param
|
|
40930
41048
|
});
|
|
@@ -40935,14 +41053,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40935
41053
|
key: "saveToBasketWrapper",
|
|
40936
41054
|
value: function () {
|
|
40937
41055
|
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(event, repairOnly, force) {
|
|
40938
|
-
var _this$
|
|
40939
|
-
_this$
|
|
40940
|
-
_this$
|
|
40941
|
-
_this$
|
|
41056
|
+
var _this$actions25,
|
|
41057
|
+
_this$actions25$toggl,
|
|
41058
|
+
_this$actions26,
|
|
41059
|
+
_this$actions26$toggl,
|
|
40942
41060
|
_this2 = this,
|
|
40943
|
-
_this$
|
|
41061
|
+
_this$actions30,
|
|
40944
41062
|
_this$i18n14;
|
|
40945
|
-
var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product, _result, result, _this$
|
|
41063
|
+
var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product, _result, result, _this$actions27, _this$i18n8, _this$i18n9, _this$actions28, _this$i18n10, _this$i18n11, _this$actions29, _this$i18n12, _this$i18n13, _this$updatePlannerMs2, _this$actions31, _this$i18n15;
|
|
40946
41064
|
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
40947
41065
|
while (1) switch (_context26.prev = _context26.next) {
|
|
40948
41066
|
case 0:
|
|
@@ -40976,18 +41094,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40976
41094
|
case 15:
|
|
40977
41095
|
returnTo = finalEvent == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
|
|
40978
41096
|
case 16:
|
|
40979
|
-
(_this$
|
|
41097
|
+
(_this$actions25 = this.actions) === null || _this$actions25 === void 0 || (_this$actions25$toggl = _this$actions25.toggleLoading) === null || _this$actions25$toggl === void 0 || _this$actions25$toggl.call(_this$actions25, 'Planner_Saving', false, true);
|
|
40980
41098
|
_context26.next = 19;
|
|
40981
41099
|
return this.saveToBasket(finalEvent, repairOnly, force);
|
|
40982
41100
|
case 19:
|
|
40983
41101
|
result = _context26.sent;
|
|
40984
|
-
(_this$
|
|
41102
|
+
(_this$actions26 = this.actions) === null || _this$actions26 === void 0 || (_this$actions26$toggl = _this$actions26.toggleLoading) === null || _this$actions26$toggl === void 0 || _this$actions26$toggl.call(_this$actions26, 'Planner_Saving', false, false);
|
|
40985
41103
|
if (!(result === 'canceled')) {
|
|
40986
41104
|
_context26.next = 25;
|
|
40987
41105
|
break;
|
|
40988
41106
|
}
|
|
40989
41107
|
LOG$1.error(new DivaError('failed to save Basket'));
|
|
40990
|
-
(_this$
|
|
41108
|
+
(_this$actions27 = this.actions) === null || _this$actions27 === void 0 || _this$actions27.openModal({
|
|
40991
41109
|
text: ((_this$i18n8 = this.i18n()) === null || _this$i18n8 === void 0 ? void 0 : _this$i18n8.t('modal.general_error')) + ' --- ' + DivaUtils.formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils.getCurrentTraceId() ? ((_this$i18n9 = this.i18n()) === null || _this$i18n9 === void 0 ? void 0 : _this$i18n9.t('modal.errorcode')) + ': ' + DivaUtils.getCurrentTraceId() : '',
|
|
40992
41110
|
accept: true
|
|
40993
41111
|
});
|
|
@@ -41001,12 +41119,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41001
41119
|
LOG$1.error(new DivaError('PDF url is missing in basket', {
|
|
41002
41120
|
code: 'WC_0010'
|
|
41003
41121
|
}));
|
|
41004
|
-
(_this$
|
|
41122
|
+
(_this$actions28 = this.actions) === null || _this$actions28 === void 0 || _this$actions28.openModal({
|
|
41005
41123
|
text: ((_this$i18n10 = this.i18n()) === null || _this$i18n10 === void 0 ? void 0 : _this$i18n10.t('modal.general_error')) + ' --- ' + DivaUtils.formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils.getCurrentTraceId() ? ((_this$i18n11 = this.i18n()) === null || _this$i18n11 === void 0 ? void 0 : _this$i18n11.t('modal.errorcode')) + ': ' + DivaUtils.getCurrentTraceId() : '',
|
|
41006
41124
|
accept: true
|
|
41007
41125
|
});
|
|
41008
41126
|
} else {
|
|
41009
|
-
(_this$
|
|
41127
|
+
(_this$actions29 = this.actions) === null || _this$actions29 === void 0 || _this$actions29.openModal({
|
|
41010
41128
|
text: (_this$i18n12 = this.i18n()) === null || _this$i18n12 === void 0 ? void 0 : _this$i18n12.t(this.divaBasketHandler.actBasket.Status === 'ORDER' ? 'modal.open_order_pdf_now' : 'modal.open_leaflet_pdf_now'),
|
|
41011
41129
|
accept: (_this$i18n13 = this.i18n()) === null || _this$i18n13 === void 0 ? void 0 : _this$i18n13.t('modals.open_now'),
|
|
41012
41130
|
callback: function callback() {
|
|
@@ -41016,7 +41134,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41016
41134
|
}
|
|
41017
41135
|
return _context26.abrupt("break", 31);
|
|
41018
41136
|
case 30:
|
|
41019
|
-
(_this$
|
|
41137
|
+
(_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.openModal({
|
|
41020
41138
|
text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
|
|
41021
41139
|
accept: true
|
|
41022
41140
|
});
|
|
@@ -41032,7 +41150,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41032
41150
|
_context26.next = 37;
|
|
41033
41151
|
break;
|
|
41034
41152
|
}
|
|
41035
|
-
(_this$
|
|
41153
|
+
(_this$actions31 = this.actions) === null || _this$actions31 === void 0 || _this$actions31.openModal({
|
|
41036
41154
|
accept: true,
|
|
41037
41155
|
text: (_this$i18n15 = this.i18n()) === null || _this$i18n15 === void 0 ? void 0 : _this$i18n15.t('configurator.PAYLOAD_TO_BIG'),
|
|
41038
41156
|
title: 'modals.error_saving'
|
|
@@ -41055,7 +41173,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41055
41173
|
key: "saveToBasket",
|
|
41056
41174
|
value: function () {
|
|
41057
41175
|
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(event, repairOnly, force) {
|
|
41058
|
-
var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$
|
|
41176
|
+
var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$actions32, _this$actions33;
|
|
41059
41177
|
var set, actBasket, returnTo, oldReturnTo, count, basketData, bytes, result, newDivaNr, _result2, _event4, product;
|
|
41060
41178
|
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
41061
41179
|
while (1) switch (_context27.prev = _context27.next) {
|
|
@@ -41142,7 +41260,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41142
41260
|
_context27.next = _context27.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 39 : _context27.t3 === 'OPEN_SELLER_BASKET' ? 41 : _context27.t3 === 'OPEN_PDF' ? 43 : _context27.t3 === 'SAVE_BASKET_WITH_MODAL' ? 43 : _context27.t3 === 'SAVE_BASKET' ? 43 : _context27.t3 === 'SAVE_BASKET_SYNC' ? 43 : _context27.t3 === 'OPEN_LEAFLET_BARRIER' ? 43 : 63;
|
|
41143
41261
|
break;
|
|
41144
41262
|
case 39:
|
|
41145
|
-
(_this$
|
|
41263
|
+
(_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.openComponent({
|
|
41146
41264
|
type: 'SELLER',
|
|
41147
41265
|
parameters: {
|
|
41148
41266
|
module: 'PCreator',
|
|
@@ -41155,7 +41273,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41155
41273
|
});
|
|
41156
41274
|
return _context27.abrupt("break", 63);
|
|
41157
41275
|
case 41:
|
|
41158
|
-
(_this$
|
|
41276
|
+
(_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openComponent({
|
|
41159
41277
|
type: 'SELLER',
|
|
41160
41278
|
parameters: {
|
|
41161
41279
|
module: 'Basket',
|
|
@@ -41237,6 +41355,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41237
41355
|
if (!set) return;
|
|
41238
41356
|
return setHandlerInstance.checkNotificationRules(set, targetArticles, visitedOptions, event);
|
|
41239
41357
|
}
|
|
41358
|
+
}, {
|
|
41359
|
+
key: "checkBannerRules",
|
|
41360
|
+
value: function checkBannerRules(visitedOptions, event) {
|
|
41361
|
+
var set = this.actSet();
|
|
41362
|
+
if (!set) return;
|
|
41363
|
+
return setHandlerInstance.checkBannerRules(set, visitedOptions, event);
|
|
41364
|
+
}
|
|
41240
41365
|
|
|
41241
41366
|
/**
|
|
41242
41367
|
* This function returns true if the Planner Mode should be visible and the planner Step should be shown.
|
|
@@ -41398,6 +41523,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41398
41523
|
key: "getAllowRTV",
|
|
41399
41524
|
value: function getAllowRTV() {
|
|
41400
41525
|
var _this$actSet21, _this$actSet22;
|
|
41526
|
+
if (this.getEnableUnityRtvKombi()) return false;
|
|
41401
41527
|
if (this.api.forceShowRTV()) return true;
|
|
41402
41528
|
if ((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.divaForceRTV) return true;
|
|
41403
41529
|
if (this.api.getDoShowRTV() && (_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaArReady) return true;
|
|
@@ -41480,16 +41606,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41480
41606
|
key: "addToBasket",
|
|
41481
41607
|
value: function () {
|
|
41482
41608
|
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(actBasket) {
|
|
41483
|
-
var _this$
|
|
41484
|
-
_this$actions33,
|
|
41485
|
-
_this$actions34,
|
|
41609
|
+
var _this$actions34,
|
|
41486
41610
|
_this$actions35,
|
|
41487
41611
|
_this$actions36,
|
|
41488
|
-
_this$divaBasketHandl3,
|
|
41489
|
-
_this3 = this,
|
|
41490
41612
|
_this$actions37,
|
|
41491
41613
|
_this$actions38,
|
|
41492
|
-
_this$
|
|
41614
|
+
_this$divaBasketHandl3,
|
|
41615
|
+
_this3 = this,
|
|
41616
|
+
_this$actions39,
|
|
41617
|
+
_this$actions40,
|
|
41618
|
+
_this$actions41;
|
|
41493
41619
|
var event,
|
|
41494
41620
|
addToBasketLog,
|
|
41495
41621
|
emailConfig,
|
|
@@ -41509,35 +41635,35 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41509
41635
|
break;
|
|
41510
41636
|
case 5:
|
|
41511
41637
|
this.handleSuccessTransaction('onPrintBasket', actBasket);
|
|
41512
|
-
(_this$
|
|
41638
|
+
(_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.onEvent({
|
|
41513
41639
|
type: 'onWebPlanerPrint',
|
|
41514
41640
|
data: actBasket.getAsJson()
|
|
41515
41641
|
});
|
|
41516
41642
|
return _context29.abrupt("break", 38);
|
|
41517
41643
|
case 8:
|
|
41518
41644
|
this.handleSuccessTransaction('onSaveBasket', actBasket);
|
|
41519
|
-
(_this$
|
|
41645
|
+
(_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.onEvent({
|
|
41520
41646
|
type: 'onWebPlanerSave',
|
|
41521
41647
|
data: actBasket.getAsJson()
|
|
41522
41648
|
});
|
|
41523
41649
|
return _context29.abrupt("break", 38);
|
|
41524
41650
|
case 11:
|
|
41525
41651
|
this.handleSuccessTransaction('onShareBasket', actBasket);
|
|
41526
|
-
(_this$
|
|
41652
|
+
(_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
|
|
41527
41653
|
type: 'onWebPlanerShare',
|
|
41528
41654
|
data: actBasket.getAsJson()
|
|
41529
41655
|
});
|
|
41530
41656
|
return _context29.abrupt("break", 38);
|
|
41531
41657
|
case 14:
|
|
41532
41658
|
this.handleSuccessTransaction('onRequestConsulation', actBasket);
|
|
41533
|
-
(_this$
|
|
41659
|
+
(_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
|
|
41534
41660
|
type: 'onRequestConsulation',
|
|
41535
41661
|
data: actBasket.getAsJson()
|
|
41536
41662
|
});
|
|
41537
41663
|
return _context29.abrupt("break", 38);
|
|
41538
41664
|
case 17:
|
|
41539
41665
|
this.handleSuccessTransaction('onSave', actBasket);
|
|
41540
|
-
(_this$
|
|
41666
|
+
(_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
|
|
41541
41667
|
type: 'onSave',
|
|
41542
41668
|
data: actBasket.getAsJson()
|
|
41543
41669
|
});
|
|
@@ -41573,7 +41699,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41573
41699
|
});
|
|
41574
41700
|
this.handleSuccessTransaction('onSendEmail', actBasket);
|
|
41575
41701
|
}
|
|
41576
|
-
(_this$
|
|
41702
|
+
(_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
|
|
41577
41703
|
type: 'onAddToBasket',
|
|
41578
41704
|
data: actBasket.getAsJson()
|
|
41579
41705
|
});
|
|
@@ -41585,7 +41711,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41585
41711
|
case 28:
|
|
41586
41712
|
products = _context29.sent;
|
|
41587
41713
|
this.handleSuccessTransaction('onSaveProduct', actBasket);
|
|
41588
|
-
(_this$
|
|
41714
|
+
(_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
|
|
41589
41715
|
type: 'onAddToBasket',
|
|
41590
41716
|
data: actBasket.getAsJson()
|
|
41591
41717
|
});
|
|
@@ -41599,7 +41725,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41599
41725
|
addToBasketLog = false;
|
|
41600
41726
|
case 35:
|
|
41601
41727
|
if (addToBasketLog) this.handleSuccessTransaction('onAddToBasket', actBasket);
|
|
41602
|
-
(_this$
|
|
41728
|
+
(_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
|
|
41603
41729
|
type: 'onAddToBasket',
|
|
41604
41730
|
data: actBasket.getAsJson()
|
|
41605
41731
|
});
|
|
@@ -41631,8 +41757,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41631
41757
|
}, {
|
|
41632
41758
|
key: "openPDFpostAsEvent",
|
|
41633
41759
|
value: function openPDFpostAsEvent(mongoDBId) {
|
|
41634
|
-
var _this$
|
|
41635
|
-
(_this$
|
|
41760
|
+
var _this$actions42, _this$actions43, _this$actions44;
|
|
41761
|
+
(_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.updateBreadcrumbs({
|
|
41636
41762
|
type: 'update',
|
|
41637
41763
|
param: {
|
|
41638
41764
|
groupId: 'SHOWROOM',
|
|
@@ -41646,7 +41772,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41646
41772
|
}
|
|
41647
41773
|
}
|
|
41648
41774
|
});
|
|
41649
|
-
(_this$
|
|
41775
|
+
(_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.updateBreadcrumbs({
|
|
41650
41776
|
type: 'update',
|
|
41651
41777
|
param: {
|
|
41652
41778
|
groupId: 'SHOWROOM',
|
|
@@ -41660,7 +41786,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41660
41786
|
}
|
|
41661
41787
|
}
|
|
41662
41788
|
});
|
|
41663
|
-
(_this$
|
|
41789
|
+
(_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.openComponent({
|
|
41664
41790
|
type: 'REPORT',
|
|
41665
41791
|
parameters: {
|
|
41666
41792
|
id: mongoDBId
|
|
@@ -41880,14 +42006,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41880
42006
|
}, {
|
|
41881
42007
|
key: "subscribeToWebPlannerEvents",
|
|
41882
42008
|
value: function subscribeToWebPlannerEvents() {
|
|
41883
|
-
var _this$
|
|
41884
|
-
(_this$
|
|
42009
|
+
var _this$actions45;
|
|
42010
|
+
(_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.subscribeEvents(this.addToBasketEventFunction);
|
|
41885
42011
|
}
|
|
41886
42012
|
}, {
|
|
41887
42013
|
key: "unsubscribeFromWebPlannerEvents",
|
|
41888
42014
|
value: function unsubscribeFromWebPlannerEvents() {
|
|
41889
|
-
var _this$
|
|
41890
|
-
(_this$
|
|
42015
|
+
var _this$actions46;
|
|
42016
|
+
(_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.unSubscribeEvents(this.addToBasketEventFunction);
|
|
41891
42017
|
}
|
|
41892
42018
|
}, {
|
|
41893
42019
|
key: "initApiForLogicOnly",
|