@crystaldesign/web-planner-logic 26.11.0-beta.11 → 26.11.0-beta.13
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-02a2dbbf.js → DivaBoxPlanner-ce0bb2af.js} +123 -44
- package/build/cjs/{DivaStandardPlanner-150246c0.js → DivaStandardPlanner-e664710b.js} +2 -2
- package/build/cjs/{DoorPlanner-ce630754.js → DoorPlanner-a37c3d62.js} +1 -1
- package/build/cjs/{Host3DSignalR-b0b1fb8d.js → Host3DSignalR-a94701fa.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-c11ea7d2.js → LiviqueWWSHandler-f6488fb8.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-3c723ecc.js → PfisterWWSHandler-a0d05fa3.js} +1 -1
- package/build/cjs/{PlannerHandler2D-6c0324be.js → PlannerHandler2D-fe16c1ce.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-d1ae4006.js → SeriousBasketHandler-bc18769e.js} +1 -1
- package/build/cjs/{ShelfPlanner-04d98f4d.js → ShelfPlanner-eab7ed23.js} +259 -148
- package/build/cjs/{StandardWWSHandler-9b596caf.js → StandardWWSHandler-1ad7e215.js} +1 -1
- package/build/cjs/{index-633196ab.js → index-b849f3ec.js} +1014 -980
- package/build/cjs/index.js +2 -1
- package/build/esm/{DivaBoxPlanner-fa9f6ec6.js → DivaBoxPlanner-f198956e.js} +123 -44
- package/build/esm/{DivaStandardPlanner-6c001048.js → DivaStandardPlanner-ef69c7d9.js} +2 -2
- package/build/esm/{DoorPlanner-ef9165f9.js → DoorPlanner-b6bbdd8f.js} +1 -1
- package/build/esm/{Host3DSignalR-2dc8478a.js → Host3DSignalR-c4b67bb7.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-b6e8bf5f.js → LiviqueWWSHandler-5f62a364.js} +1 -1
- package/build/esm/{PfisterWWSHandler-54b3e0aa.js → PfisterWWSHandler-cf8dd909.js} +1 -1
- package/build/esm/{PlannerHandler2D-0e61311d.js → PlannerHandler2D-88d7f725.js} +1 -1
- package/build/esm/{SeriousBasketHandler-7b097870.js → SeriousBasketHandler-5f29e886.js} +1 -1
- package/build/esm/{ShelfPlanner-f3e86534.js → ShelfPlanner-05d57e72.js} +259 -148
- package/build/esm/{StandardWWSHandler-4b0caefd.js → StandardWWSHandler-a9f0e1f8.js} +1 -1
- package/build/esm/{index-6c8de812.js → index-224d69f7.js} +1014 -980
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/index.d.ts +4 -2
- package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts +13 -0
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/ArticleEngine.d.ts +4 -0
- package/build/types/web-planner-logic/src/logic/Article/Engine/ArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts +12 -2
- package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts +20 -0
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts +19 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +12 -0
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +95 -92
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts +19 -0
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts +5 -0
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/engineFeatureDefaults.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/engineFeatureDefaults.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/idmPlannerPaletteView.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/idmPlannerPaletteView.test.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -77,6 +77,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
77
77
|
_defineProperty(this, "state", void 0);
|
|
78
78
|
_defineProperty(this, "i18n", void 0);
|
|
79
79
|
_defineProperty(this, "enricherErrorModalShown", false);
|
|
80
|
+
_defineProperty(this, "suppressErrorModals", false);
|
|
80
81
|
_defineProperty(this, "getSessionGuid", void 0);
|
|
81
82
|
_defineProperty(this, "useEkPrices", false);
|
|
82
83
|
_defineProperty(this, "smSupplierNr", undefined);
|
|
@@ -90,6 +91,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
90
91
|
this.apiKey = plannerConfig.apiKey;
|
|
91
92
|
this.useEkPrices = !!plannerConfig.useEkPrices;
|
|
92
93
|
this.smSupplierNr = plannerConfig.smSupplierNr;
|
|
94
|
+
this.suppressErrorModals = !!plannerConfig.suppressErrorModals;
|
|
93
95
|
if (plannerConfig.settings) {
|
|
94
96
|
this.initalizeWebConfigData(plannerConfig);
|
|
95
97
|
} else {
|
|
@@ -251,7 +253,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
251
253
|
_translate$t2,
|
|
252
254
|
_translate$t3,
|
|
253
255
|
_this = this;
|
|
254
|
-
if (dontLogError || this.enricherErrorModalShown) return;
|
|
256
|
+
if (dontLogError || this.enricherErrorModalShown || this.suppressErrorModals) return;
|
|
255
257
|
var services = [(_this$apiConfig = this.apiConfig) === null || _this$apiConfig === void 0 ? void 0 : _this$apiConfig.enricherService, (_this$apiConfig2 = this.apiConfig) === null || _this$apiConfig2 === void 0 ? void 0 : _this$apiConfig2.idmService, (_this$apiConfig3 = this.apiConfig) === null || _this$apiConfig3 === void 0 ? void 0 : _this$apiConfig3.api2["default"], (_this$apiConfig4 = this.apiConfig) === null || _this$apiConfig4 === void 0 ? void 0 : _this$apiConfig4.api2.web, (_this$apiConfig5 = this.apiConfig) === null || _this$apiConfig5 === void 0 ? void 0 : _this$apiConfig5.api2.ek];
|
|
256
258
|
if (!services.some(function (service) {
|
|
257
259
|
return service && url.startsWith(service);
|
|
@@ -1177,6 +1179,23 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1177
1179
|
if (this.useEnricherService && !this.packageId) throw new Error('packageId as parameter not missing');
|
|
1178
1180
|
return this.useEnricherService ? '/wysiwyg/' + this.packageId : this.useIDMService ? '' : '/live/' + this.organization._id;
|
|
1179
1181
|
}
|
|
1182
|
+
|
|
1183
|
+
/**
|
|
1184
|
+
* Neutral identity of what the planner is currently working on (mirrors the `idmPrefix`
|
|
1185
|
+
* cascade): the enricher package in the wysiwyg usecase, the IDM package/catalog on the
|
|
1186
|
+
* IDM service, otherwise the live organization. Hosts that need to scope by it (e.g. the
|
|
1187
|
+
* AI chat) derive their own key from these facts — the engine stays unaware of that use.
|
|
1188
|
+
*/
|
|
1189
|
+
}, {
|
|
1190
|
+
key: "getWorkingContext",
|
|
1191
|
+
value: function getWorkingContext() {
|
|
1192
|
+
var _this$organization4;
|
|
1193
|
+
return {
|
|
1194
|
+
service: this.useEnricherService ? 'enricher' : this.useIDMService ? 'idm' : 'live',
|
|
1195
|
+
organizationId: (_this$organization4 = this.organization) === null || _this$organization4 === void 0 ? void 0 : _this$organization4._id,
|
|
1196
|
+
packageId: this.packageId
|
|
1197
|
+
};
|
|
1198
|
+
}
|
|
1180
1199
|
}, {
|
|
1181
1200
|
key: "getIDMCatalog",
|
|
1182
1201
|
value: function getIDMCatalog(catalogId) {
|
|
@@ -1720,20 +1739,20 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1720
1739
|
}, {
|
|
1721
1740
|
key: "OrganizationId",
|
|
1722
1741
|
get: function get() {
|
|
1723
|
-
var _this$
|
|
1724
|
-
return (_this$
|
|
1742
|
+
var _this$organization5;
|
|
1743
|
+
return (_this$organization5 = this.organization) === null || _this$organization5 === void 0 ? void 0 : _this$organization5._id;
|
|
1725
1744
|
}
|
|
1726
1745
|
}, {
|
|
1727
1746
|
key: "enableAR",
|
|
1728
1747
|
get: function get() {
|
|
1729
|
-
var _this$
|
|
1730
|
-
return (_this$
|
|
1748
|
+
var _this$organization6;
|
|
1749
|
+
return (_this$organization6 = this.organization) === null || _this$organization6 === void 0 || (_this$organization6 = _this$organization6.settings) === null || _this$organization6 === void 0 ? void 0 : _this$organization6.enableAR;
|
|
1731
1750
|
}
|
|
1732
1751
|
}, {
|
|
1733
1752
|
key: "pricePreview",
|
|
1734
1753
|
get: function get() {
|
|
1735
|
-
var _this$organization$se3, _this$
|
|
1736
|
-
return (_this$organization$se3 = (_this$
|
|
1754
|
+
var _this$organization$se3, _this$organization7, _this$getViewConfig;
|
|
1755
|
+
return (_this$organization$se3 = (_this$organization7 = this.organization) === null || _this$organization7 === void 0 || (_this$organization7 = _this$organization7.settings) === null || _this$organization7 === void 0 ? void 0 : _this$organization7.pricePreview) !== null && _this$organization$se3 !== void 0 ? _this$organization$se3 : (_this$getViewConfig = this.getViewConfig()) === null || _this$getViewConfig === void 0 ? void 0 : _this$getViewConfig.pricePreview;
|
|
1737
1756
|
}
|
|
1738
1757
|
}, {
|
|
1739
1758
|
key: "webConfig",
|
|
@@ -20635,8 +20654,11 @@ function initCatalogPlannerArticleView(catalogData, catPlanArticle, catalogProps
|
|
|
20635
20654
|
var _catPlanArticle$filte, _catPlanArticle$group, _catPlanArticle$svgs;
|
|
20636
20655
|
if (catPlanArticle.hideInPlannerStep) return;
|
|
20637
20656
|
if (catalogProps.has3dModels && !catPlanArticle.modelName3D) return;
|
|
20657
|
+
var catalogArticle = catalogData.allCatalogArticles[catPlanArticle.codex];
|
|
20638
20658
|
plannerPaletteViewInfo.catalogPlannerArticles.push({
|
|
20639
20659
|
articleCodex: catPlanArticle.codex,
|
|
20660
|
+
contentItemId: catalogArticle === null || catalogArticle === void 0 ? void 0 : catalogArticle.contentItemId,
|
|
20661
|
+
groupContentItemId: catalogArticle === null || catalogArticle === void 0 ? void 0 : catalogArticle.groupContentItemId,
|
|
20640
20662
|
avlFilter: catPlanArticle.avlFilter,
|
|
20641
20663
|
avrFilter: catPlanArticle.avrFilter,
|
|
20642
20664
|
longDescription: catPlanArticle.longDescription,
|
|
@@ -25544,6 +25566,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25544
25566
|
_defineProperty(this, "article", void 0);
|
|
25545
25567
|
_defineProperty(this, "decisionDebugStack", []);
|
|
25546
25568
|
_defineProperty(this, "priceDebugStack", []);
|
|
25569
|
+
_defineProperty(this, "featureDefaultIndex", void 0);
|
|
25547
25570
|
this.article = article;
|
|
25548
25571
|
}
|
|
25549
25572
|
return _createClass(IDMEngine, [{
|
|
@@ -25630,6 +25653,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25630
25653
|
}
|
|
25631
25654
|
this.decisionDebugStack = [];
|
|
25632
25655
|
var beforeSnapshot = this.article.set.logDecisions ? this.article.snapshot : undefined;
|
|
25656
|
+
var beforeDecisionState = this.article.set.logDecisions ? this.decisionStateSnapshot(decisions) : undefined;
|
|
25633
25657
|
for (var m = 0; m < decisions.length; m++) {
|
|
25634
25658
|
var startTime = Date.now();
|
|
25635
25659
|
//Alle Optionen Mit DOC Type 1 ermitten - diese zunächst alle ausblenden, werden dann später über Formeln wieder eingeschaltets
|
|
@@ -25652,7 +25676,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25652
25676
|
break;
|
|
25653
25677
|
}
|
|
25654
25678
|
}
|
|
25655
|
-
|
|
25679
|
+
var pushed = this.pushDecisionDebug(decision, decisions, beforeSnapshot, beforeDecisionState);
|
|
25680
|
+
beforeSnapshot = pushed === null || pushed === void 0 ? void 0 : pushed.afterSnapshot;
|
|
25681
|
+
beforeDecisionState = pushed === null || pushed === void 0 ? void 0 : pushed.afterDecisionState;
|
|
25656
25682
|
var endTime = Date.now();
|
|
25657
25683
|
LOG$g.debug('decision ' + decision.decisionNo + ' time ' + (endTime - startTime));
|
|
25658
25684
|
}
|
|
@@ -25663,13 +25689,40 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25663
25689
|
});
|
|
25664
25690
|
this.updateIDMSpecificFeatures();
|
|
25665
25691
|
}
|
|
25692
|
+
|
|
25693
|
+
/** Capture the enable/disable state of all decisions (IDM debug logging only). */
|
|
25694
|
+
}, {
|
|
25695
|
+
key: "decisionStateSnapshot",
|
|
25696
|
+
value: function decisionStateSnapshot(decisions) {
|
|
25697
|
+
var ret = {};
|
|
25698
|
+
var _iterator3 = _createForOfIteratorHelper$b(decisions),
|
|
25699
|
+
_step3;
|
|
25700
|
+
try {
|
|
25701
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
25702
|
+
var _d$disableHistory;
|
|
25703
|
+
var d = _step3.value;
|
|
25704
|
+
if (d.decisionNo == null) continue;
|
|
25705
|
+
ret[d.decisionNo] = {
|
|
25706
|
+
enabled: d.enabled !== false,
|
|
25707
|
+
activeCombination: d.activeCombination,
|
|
25708
|
+
disableHistory: _toConsumableArray((_d$disableHistory = d.disableHistory) !== null && _d$disableHistory !== void 0 ? _d$disableHistory : [])
|
|
25709
|
+
};
|
|
25710
|
+
}
|
|
25711
|
+
} catch (err) {
|
|
25712
|
+
_iterator3.e(err);
|
|
25713
|
+
} finally {
|
|
25714
|
+
_iterator3.f();
|
|
25715
|
+
}
|
|
25716
|
+
return ret;
|
|
25717
|
+
}
|
|
25666
25718
|
}, {
|
|
25667
25719
|
key: "pushDecisionDebug",
|
|
25668
|
-
value: function pushDecisionDebug(decision, beforeSnapshot) {
|
|
25720
|
+
value: function pushDecisionDebug(decision, decisions, beforeSnapshot, beforeDecisionState) {
|
|
25669
25721
|
var _decision$disableHist;
|
|
25670
25722
|
if (!this.article.set.logDecisions || !beforeSnapshot) return undefined;
|
|
25671
25723
|
var afterSnapshot = this.article.snapshot;
|
|
25672
|
-
this.
|
|
25724
|
+
var afterDecisionState = this.decisionStateSnapshot(decisions);
|
|
25725
|
+
this.decisionDebugStack.push(_objectSpread$j({
|
|
25673
25726
|
text: decision.decisionNo + ' type:' + decision.decisionType + ' ' + ((_decision$disableHist = decision.disableHistory) === null || _decision$disableHist === void 0 ? void 0 : _decision$disableHist.join(',')),
|
|
25674
25727
|
nr: decision.decisionNo,
|
|
25675
25728
|
decision: JSON.parse(JSON.stringify(decision)),
|
|
@@ -25677,8 +25730,16 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25677
25730
|
before: beforeSnapshot,
|
|
25678
25731
|
after: afterSnapshot
|
|
25679
25732
|
}
|
|
25680
|
-
}
|
|
25681
|
-
|
|
25733
|
+
}, beforeDecisionState ? {
|
|
25734
|
+
decisionStates: {
|
|
25735
|
+
before: beforeDecisionState,
|
|
25736
|
+
after: afterDecisionState
|
|
25737
|
+
}
|
|
25738
|
+
} : {}));
|
|
25739
|
+
return {
|
|
25740
|
+
afterSnapshot: afterSnapshot,
|
|
25741
|
+
afterDecisionState: afterDecisionState
|
|
25742
|
+
};
|
|
25682
25743
|
}
|
|
25683
25744
|
|
|
25684
25745
|
/**
|
|
@@ -25726,50 +25787,50 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25726
25787
|
var decisionsToEval = decisions.filter(function (decision) {
|
|
25727
25788
|
return relevantDecisions.includes(decision) || controllingDecisions.includes(decision);
|
|
25728
25789
|
});
|
|
25729
|
-
var
|
|
25730
|
-
|
|
25790
|
+
var _iterator4 = _createForOfIteratorHelper$b(decisionsToEval),
|
|
25791
|
+
_step4;
|
|
25731
25792
|
try {
|
|
25732
|
-
for (
|
|
25733
|
-
var decision =
|
|
25793
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
25794
|
+
var decision = _step4.value;
|
|
25734
25795
|
decision.enabled = true;
|
|
25735
25796
|
decision.disableHistory = [];
|
|
25736
25797
|
decision.activeCombination = undefined;
|
|
25737
25798
|
}
|
|
25738
25799
|
} catch (err) {
|
|
25739
|
-
|
|
25800
|
+
_iterator4.e(err);
|
|
25740
25801
|
} finally {
|
|
25741
|
-
|
|
25802
|
+
_iterator4.f();
|
|
25742
25803
|
}
|
|
25743
|
-
var
|
|
25744
|
-
|
|
25804
|
+
var _iterator5 = _createForOfIteratorHelper$b(relevantDecisions),
|
|
25805
|
+
_step5;
|
|
25745
25806
|
try {
|
|
25746
|
-
for (
|
|
25807
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
25747
25808
|
var _decision$featureRefs2;
|
|
25748
|
-
var _decision =
|
|
25749
|
-
var
|
|
25750
|
-
|
|
25809
|
+
var _decision = _step5.value;
|
|
25810
|
+
var _iterator7 = _createForOfIteratorHelper$b((_decision$featureRefs2 = _decision.featureRefs) !== null && _decision$featureRefs2 !== void 0 ? _decision$featureRefs2 : []),
|
|
25811
|
+
_step7;
|
|
25751
25812
|
try {
|
|
25752
|
-
for (
|
|
25753
|
-
var featureNo =
|
|
25813
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
|
25814
|
+
var featureNo = _step7.value;
|
|
25754
25815
|
var ops = this.article.getArticleOptionStateFlat(featureNo);
|
|
25755
25816
|
if (ops) ops.updateVisibleOptionValues(ops.option.articleOptionValues);
|
|
25756
25817
|
}
|
|
25757
25818
|
} catch (err) {
|
|
25758
|
-
|
|
25819
|
+
_iterator7.e(err);
|
|
25759
25820
|
} finally {
|
|
25760
|
-
|
|
25821
|
+
_iterator7.f();
|
|
25761
25822
|
}
|
|
25762
25823
|
}
|
|
25763
25824
|
} catch (err) {
|
|
25764
|
-
|
|
25825
|
+
_iterator5.e(err);
|
|
25765
25826
|
} finally {
|
|
25766
|
-
|
|
25827
|
+
_iterator5.f();
|
|
25767
25828
|
}
|
|
25768
|
-
var
|
|
25769
|
-
|
|
25829
|
+
var _iterator6 = _createForOfIteratorHelper$b(decisionsToEval),
|
|
25830
|
+
_step6;
|
|
25770
25831
|
try {
|
|
25771
|
-
for (
|
|
25772
|
-
var _decision2 =
|
|
25832
|
+
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
25833
|
+
var _decision2 = _step6.value;
|
|
25773
25834
|
if (!_decision2.enabled || !_decision2.optionCombinations.length) continue;
|
|
25774
25835
|
switch (_decision2.decisionType) {
|
|
25775
25836
|
case 2:
|
|
@@ -25784,9 +25845,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25784
25845
|
}
|
|
25785
25846
|
}
|
|
25786
25847
|
} catch (err) {
|
|
25787
|
-
|
|
25848
|
+
_iterator6.e(err);
|
|
25788
25849
|
} finally {
|
|
25789
|
-
|
|
25850
|
+
_iterator6.f();
|
|
25790
25851
|
}
|
|
25791
25852
|
return (_this$article$getArti = this.article.getArticleOptionStateFlat(targetFeatureNo)) === null || _this$article$getArti === void 0 ? void 0 : _this$article$getArti.visibleOptionValues;
|
|
25792
25853
|
}
|
|
@@ -25926,7 +25987,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25926
25987
|
if (_this3.article.CatalogData.useDiomexConfigLogic) {
|
|
25927
25988
|
_this3.clearOP(featureNo, true);
|
|
25928
25989
|
} else {
|
|
25929
|
-
_this3.updateArtOPV(_this3.
|
|
25990
|
+
_this3.updateArtOPV(_this3.preferredDefaultOpv(featureNo, ops.visibleOptionValues), featureNo, ops, undefined);
|
|
25930
25991
|
}
|
|
25931
25992
|
}
|
|
25932
25993
|
doAlsoCheckFeatureNos.push(featureNo);
|
|
@@ -26009,7 +26070,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26009
26070
|
if (_this4.article.CatalogData.useDiomexConfigLogic) {
|
|
26010
26071
|
_this4.clearOP(featureNo, true);
|
|
26011
26072
|
} else {
|
|
26012
|
-
_this4.updateArtOPV(_this4.
|
|
26073
|
+
_this4.updateArtOPV(_this4.preferredDefaultOpv(featureNo, ops.visibleOptionValues), featureNo, ops, undefined);
|
|
26013
26074
|
}
|
|
26014
26075
|
}
|
|
26015
26076
|
} else if (p < sortedDeatureRefs.length - 1) {
|
|
@@ -26064,12 +26125,12 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26064
26125
|
}, {
|
|
26065
26126
|
key: "evalDisableDecision",
|
|
26066
26127
|
value: function evalDisableDecision(actions, decision, allDecisions, disable) {
|
|
26067
|
-
var
|
|
26068
|
-
|
|
26128
|
+
var _iterator8 = _createForOfIteratorHelper$b(actions),
|
|
26129
|
+
_step8;
|
|
26069
26130
|
try {
|
|
26070
26131
|
var _loop5 = function _loop5() {
|
|
26071
26132
|
var _dec$disableHistory;
|
|
26072
|
-
var action =
|
|
26133
|
+
var action = _step8.value;
|
|
26073
26134
|
var dec = allDecisions.find(function (d) {
|
|
26074
26135
|
return d.decisionNo == Number(action.decisionNo);
|
|
26075
26136
|
});
|
|
@@ -26080,46 +26141,46 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26080
26141
|
};
|
|
26081
26142
|
}
|
|
26082
26143
|
dec.enabled = !disable;
|
|
26083
|
-
(_dec$disableHistory = dec.disableHistory) === null || _dec$disableHistory === void 0 || _dec$disableHistory.push(disable ? 'disabled' : 'enabled' + ' By ' + decision.decisionNo);
|
|
26144
|
+
(_dec$disableHistory = dec.disableHistory) === null || _dec$disableHistory === void 0 || _dec$disableHistory.push((disable ? 'disabled' : 'enabled') + ' By ' + decision.decisionNo);
|
|
26084
26145
|
},
|
|
26085
26146
|
_ret;
|
|
26086
|
-
for (
|
|
26147
|
+
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
26087
26148
|
_ret = _loop5();
|
|
26088
26149
|
if (_ret) return _ret.v;
|
|
26089
26150
|
}
|
|
26090
26151
|
} catch (err) {
|
|
26091
|
-
|
|
26152
|
+
_iterator8.e(err);
|
|
26092
26153
|
} finally {
|
|
26093
|
-
|
|
26154
|
+
_iterator8.f();
|
|
26094
26155
|
}
|
|
26095
26156
|
}
|
|
26096
26157
|
}, {
|
|
26097
26158
|
key: "evalSetFeatureVisible",
|
|
26098
26159
|
value: function evalSetFeatureVisible(actions, hasSetFeatureInvisible, invisible) {
|
|
26099
|
-
var
|
|
26100
|
-
|
|
26160
|
+
var _iterator9 = _createForOfIteratorHelper$b(actions),
|
|
26161
|
+
_step9;
|
|
26101
26162
|
try {
|
|
26102
|
-
for (
|
|
26103
|
-
var action =
|
|
26163
|
+
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
26164
|
+
var action = _step9.value;
|
|
26104
26165
|
if (!this.article.getArticleOptionState(action.featureNo.toString()) || !action.featureNo) continue;
|
|
26105
26166
|
var ops = this.article.getArticleOptionState(action.featureNo.toString());
|
|
26106
26167
|
if (invisible) hasSetFeatureInvisible[action.featureNo.toString()] = invisible;
|
|
26107
26168
|
if (ops) ops.isInvisible = invisible;
|
|
26108
26169
|
}
|
|
26109
26170
|
} catch (err) {
|
|
26110
|
-
|
|
26171
|
+
_iterator9.e(err);
|
|
26111
26172
|
} finally {
|
|
26112
|
-
|
|
26173
|
+
_iterator9.f();
|
|
26113
26174
|
}
|
|
26114
26175
|
}
|
|
26115
26176
|
}, {
|
|
26116
26177
|
key: "evalSetFeatureDefault",
|
|
26117
26178
|
value: function evalSetFeatureDefault(actions, decision, isNull) {
|
|
26118
|
-
var
|
|
26119
|
-
|
|
26179
|
+
var _iterator10 = _createForOfIteratorHelper$b(actions),
|
|
26180
|
+
_step10;
|
|
26120
26181
|
try {
|
|
26121
|
-
for (
|
|
26122
|
-
var action =
|
|
26182
|
+
for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
|
|
26183
|
+
var action = _step10.value;
|
|
26123
26184
|
var ops = this.article.getArticleOptionState(action.featureNo.toString());
|
|
26124
26185
|
if (ops && (isNull && ops.val === undefined || !isNull && (ops.val === undefined || !ops.valueWasSet))) {
|
|
26125
26186
|
if (action.formulaRef) {
|
|
@@ -26144,22 +26205,23 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26144
26205
|
break;
|
|
26145
26206
|
}
|
|
26146
26207
|
} catch (err) {
|
|
26147
|
-
|
|
26208
|
+
_iterator10.e(err);
|
|
26148
26209
|
} finally {
|
|
26149
|
-
|
|
26210
|
+
_iterator10.f();
|
|
26150
26211
|
}
|
|
26151
26212
|
}
|
|
26152
26213
|
}, {
|
|
26153
26214
|
key: "evalSetFeature",
|
|
26154
26215
|
value: function evalSetFeature(actions, decision, isFixed) {
|
|
26155
|
-
var
|
|
26156
|
-
|
|
26216
|
+
var _iterator11 = _createForOfIteratorHelper$b(actions),
|
|
26217
|
+
_step11;
|
|
26157
26218
|
try {
|
|
26158
|
-
for (
|
|
26219
|
+
for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
|
|
26159
26220
|
var _action$featureNo2;
|
|
26160
|
-
var action =
|
|
26221
|
+
var action = _step11.value;
|
|
26161
26222
|
if (!this.article.getArticleOptionState((_action$featureNo2 = action.featureNo) === null || _action$featureNo2 === void 0 ? void 0 : _action$featureNo2.toString()) || !action.featureNo) {
|
|
26162
|
-
|
|
26223
|
+
//usecase is that it want to be set on partlistarticle that is not currently loaded so its not found
|
|
26224
|
+
LOG$g.debug('evalSetFeature decision ' + decision.decisionNo + ' (isFixed=' + isFixed + '): target feature ' + action.featureNo + ' has no option state on article ' + this.article.articleCodex + ' - action skipped');
|
|
26163
26225
|
continue;
|
|
26164
26226
|
}
|
|
26165
26227
|
if (action.formulaRef) {
|
|
@@ -26201,9 +26263,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26201
26263
|
}
|
|
26202
26264
|
}
|
|
26203
26265
|
} catch (err) {
|
|
26204
|
-
|
|
26266
|
+
_iterator11.e(err);
|
|
26205
26267
|
} finally {
|
|
26206
|
-
|
|
26268
|
+
_iterator11.f();
|
|
26207
26269
|
}
|
|
26208
26270
|
}
|
|
26209
26271
|
}, {
|
|
@@ -26748,18 +26810,114 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26748
26810
|
}
|
|
26749
26811
|
return isValidDOC;
|
|
26750
26812
|
}
|
|
26813
|
+
}, {
|
|
26814
|
+
key: "type2DefaultsByFeature",
|
|
26815
|
+
value: /** Prio-sorted type-2 decisions carrying a setFeatureDefault per feature; rebuilt when the decision sources change. */
|
|
26816
|
+
function type2DefaultsByFeature() {
|
|
26817
|
+
var sources = [this.article.articleIDMDecisions, this.article.initDecisions];
|
|
26818
|
+
var cached = this.featureDefaultIndex;
|
|
26819
|
+
if (cached && cached.sources[0] === sources[0] && cached.sources[1] === sources[1]) return cached.byFeature;
|
|
26820
|
+
var byFeature = new Map();
|
|
26821
|
+
var _iterator12 = _createForOfIteratorHelper$b(this.decisions),
|
|
26822
|
+
_step12;
|
|
26823
|
+
try {
|
|
26824
|
+
for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
|
|
26825
|
+
var _decision$optionCombi4;
|
|
26826
|
+
var decision = _step12.value;
|
|
26827
|
+
if (decision.decisionType !== 2) continue;
|
|
26828
|
+
var _iterator13 = _createForOfIteratorHelper$b((_decision$optionCombi4 = decision.optionCombinations) !== null && _decision$optionCombi4 !== void 0 ? _decision$optionCombi4 : []),
|
|
26829
|
+
_step13;
|
|
26830
|
+
try {
|
|
26831
|
+
for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
|
|
26832
|
+
var _combination$projectA6, _combination$projectA7;
|
|
26833
|
+
var combination = _step13.value;
|
|
26834
|
+
var _iterator14 = _createForOfIteratorHelper$b((_combination$projectA6 = (_combination$projectA7 = combination.projectActions) === null || _combination$projectA7 === void 0 ? void 0 : _combination$projectA7.setFeatureDefault) !== null && _combination$projectA6 !== void 0 ? _combination$projectA6 : []),
|
|
26835
|
+
_step14;
|
|
26836
|
+
try {
|
|
26837
|
+
for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
|
|
26838
|
+
var _action$featureNo4, _byFeature$get;
|
|
26839
|
+
var action = _step14.value;
|
|
26840
|
+
var featureNo = (_action$featureNo4 = action.featureNo) === null || _action$featureNo4 === void 0 ? void 0 : _action$featureNo4.toString();
|
|
26841
|
+
if (!featureNo) continue;
|
|
26842
|
+
var list = (_byFeature$get = byFeature.get(featureNo)) !== null && _byFeature$get !== void 0 ? _byFeature$get : [];
|
|
26843
|
+
if (!list.includes(decision)) list.push(decision);
|
|
26844
|
+
byFeature.set(featureNo, list);
|
|
26845
|
+
}
|
|
26846
|
+
} catch (err) {
|
|
26847
|
+
_iterator14.e(err);
|
|
26848
|
+
} finally {
|
|
26849
|
+
_iterator14.f();
|
|
26850
|
+
}
|
|
26851
|
+
}
|
|
26852
|
+
} catch (err) {
|
|
26853
|
+
_iterator13.e(err);
|
|
26854
|
+
} finally {
|
|
26855
|
+
_iterator13.f();
|
|
26856
|
+
}
|
|
26857
|
+
}
|
|
26858
|
+
} catch (err) {
|
|
26859
|
+
_iterator12.e(err);
|
|
26860
|
+
} finally {
|
|
26861
|
+
_iterator12.f();
|
|
26862
|
+
}
|
|
26863
|
+
this.featureDefaultIndex = {
|
|
26864
|
+
sources: sources,
|
|
26865
|
+
byFeature: byFeature
|
|
26866
|
+
};
|
|
26867
|
+
return byFeature;
|
|
26868
|
+
}
|
|
26869
|
+
|
|
26870
|
+
/** Option key a currently-matching type-2 SET_FEATURE_DEFAULT assigns to `featureNo`, if any. */
|
|
26871
|
+
}, {
|
|
26872
|
+
key: "setFeatureDefaultKey",
|
|
26873
|
+
value: function setFeatureDefaultKey(featureNo) {
|
|
26874
|
+
var decisions = this.type2DefaultsByFeature().get(featureNo);
|
|
26875
|
+
if (!decisions) return undefined;
|
|
26876
|
+
var _iterator15 = _createForOfIteratorHelper$b(decisions),
|
|
26877
|
+
_step15;
|
|
26878
|
+
try {
|
|
26879
|
+
for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
|
|
26880
|
+
var _combination$projectA8;
|
|
26881
|
+
var decision = _step15.value;
|
|
26882
|
+
var _ref14 = this.getMatchingOptionCombination(decision.optionCombinations, decision.decisionNo),
|
|
26883
|
+
_ref15 = _slicedToArray(_ref14, 1),
|
|
26884
|
+
combination = _ref15[0];
|
|
26885
|
+
var key = combination === null || combination === void 0 || (_combination$projectA8 = combination.projectActions) === null || _combination$projectA8 === void 0 || (_combination$projectA8 = _combination$projectA8.setFeatureDefault) === null || _combination$projectA8 === void 0 || (_combination$projectA8 = _combination$projectA8.find(function (a) {
|
|
26886
|
+
var _a$featureNo;
|
|
26887
|
+
return ((_a$featureNo = a.featureNo) === null || _a$featureNo === void 0 ? void 0 : _a$featureNo.toString()) === featureNo;
|
|
26888
|
+
})) === null || _combination$projectA8 === void 0 || (_combination$projectA8 = _combination$projectA8.optionRef) === null || _combination$projectA8 === void 0 ? void 0 : _combination$projectA8.optionKey;
|
|
26889
|
+
if (key) return key;
|
|
26890
|
+
}
|
|
26891
|
+
} catch (err) {
|
|
26892
|
+
_iterator15.e(err);
|
|
26893
|
+
} finally {
|
|
26894
|
+
_iterator15.f();
|
|
26895
|
+
}
|
|
26896
|
+
return undefined;
|
|
26897
|
+
}
|
|
26898
|
+
|
|
26899
|
+
/** Authored default (when still visible) in place of getDefaultOpv's arbitrary first-visible pick. */
|
|
26900
|
+
}, {
|
|
26901
|
+
key: "preferredDefaultOpv",
|
|
26902
|
+
value: function preferredDefaultOpv(featureNo, visible) {
|
|
26903
|
+
var _ref16;
|
|
26904
|
+
var key = this.setFeatureDefaultKey(featureNo);
|
|
26905
|
+
return (_ref16 = key ? visible.get(key) : undefined) !== null && _ref16 !== void 0 ? _ref16 : this.article.getDefaultOpv(visible);
|
|
26906
|
+
}
|
|
26751
26907
|
}, {
|
|
26752
26908
|
key: "updateIDMSpecificFeatures",
|
|
26753
26909
|
value: function updateIDMSpecificFeatures() {
|
|
26754
26910
|
//updaten idm planner specific options
|
|
26755
|
-
var
|
|
26756
|
-
|
|
26911
|
+
var _iterator16 = _createForOfIteratorHelper$b(this.article.articleOptionStates.values()),
|
|
26912
|
+
_step16;
|
|
26757
26913
|
try {
|
|
26758
|
-
for (
|
|
26759
|
-
var ops =
|
|
26914
|
+
for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
|
|
26915
|
+
var ops = _step16.value;
|
|
26760
26916
|
//when an option has no decisions the first visible optionValue has to be selected per default
|
|
26761
26917
|
if (ops.val === undefined && ops.visibleCount) {
|
|
26762
|
-
|
|
26918
|
+
// Prefer an authored type-2 default (when visible) over the arbitrary first-visible pick.
|
|
26919
|
+
var key = this.setFeatureDefaultKey(ops.optionCodex);
|
|
26920
|
+
this.assignOptionValue(ops.optionCodex, key && ops.visibleOPVKeys.includes(key) ? key : ops.visibleOPVKeys[0]);
|
|
26763
26921
|
}
|
|
26764
26922
|
if (ops.visibleCount && ops.IsIDMSpecialFeature) {
|
|
26765
26923
|
var _validOpv;
|
|
@@ -26777,9 +26935,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26777
26935
|
}
|
|
26778
26936
|
}
|
|
26779
26937
|
} catch (err) {
|
|
26780
|
-
|
|
26938
|
+
_iterator16.e(err);
|
|
26781
26939
|
} finally {
|
|
26782
|
-
|
|
26940
|
+
_iterator16.f();
|
|
26783
26941
|
}
|
|
26784
26942
|
}
|
|
26785
26943
|
}, {
|
|
@@ -26800,8 +26958,8 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26800
26958
|
}
|
|
26801
26959
|
if ([97, 1097].includes((_myArtOPS$option$idmV3 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV3 !== void 0 ? _myArtOPS$option$idmV3 : 0)) {
|
|
26802
26960
|
try {
|
|
26803
|
-
var
|
|
26804
|
-
var newHeight = this.resolvePlannerDimension(Number((
|
|
26961
|
+
var _ref17, _ref18, _myArtOPS$measureValu;
|
|
26962
|
+
var newHeight = this.resolvePlannerDimension(Number((_ref17 = (_ref18 = (_myArtOPS$measureValu = myArtOPS.measureValue) !== null && _myArtOPS$measureValu !== void 0 ? _myArtOPS$measureValu : this.freeTextMeasureCm(myArtOPS)) !== null && _ref18 !== void 0 ? _ref18 : myArtOPS.value) !== null && _ref17 !== void 0 ? _ref17 : myArtOPS.valueFromName), this.article.catalogArticle.height);
|
|
26805
26963
|
if (newHeight != null) {
|
|
26806
26964
|
this.article.doUpdatePlannerSize = true;
|
|
26807
26965
|
this.article.calcHeight = newHeight;
|
|
@@ -26812,8 +26970,8 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26812
26970
|
}
|
|
26813
26971
|
if ([96, 1096].includes((_myArtOPS$option$idmV4 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV4 !== void 0 ? _myArtOPS$option$idmV4 : 0) || myArtOPS.option.diameter) {
|
|
26814
26972
|
try {
|
|
26815
|
-
var
|
|
26816
|
-
var newDepth = this.resolvePlannerDimension(Number((
|
|
26973
|
+
var _ref19, _ref20, _myArtOPS$measureValu2;
|
|
26974
|
+
var newDepth = this.resolvePlannerDimension(Number((_ref19 = (_ref20 = (_myArtOPS$measureValu2 = myArtOPS.measureValue) !== null && _myArtOPS$measureValu2 !== void 0 ? _myArtOPS$measureValu2 : this.freeTextMeasureCm(myArtOPS)) !== null && _ref20 !== void 0 ? _ref20 : myArtOPS.value) !== null && _ref19 !== void 0 ? _ref19 : myArtOPS.valueFromName), this.article.catalogArticle.depth);
|
|
26817
26975
|
if (newDepth != null) {
|
|
26818
26976
|
this.article.doUpdatePlannerSize = true;
|
|
26819
26977
|
this.article.calcDepth = newDepth;
|
|
@@ -26824,8 +26982,8 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26824
26982
|
}
|
|
26825
26983
|
if ([95, 1095].includes((_myArtOPS$option$idmV5 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV5 !== void 0 ? _myArtOPS$option$idmV5 : 0) || myArtOPS.option.diameter) {
|
|
26826
26984
|
try {
|
|
26827
|
-
var
|
|
26828
|
-
var newWidth = this.resolvePlannerDimension(Number((
|
|
26985
|
+
var _ref21, _ref22, _myArtOPS$measureValu3;
|
|
26986
|
+
var newWidth = this.resolvePlannerDimension(Number((_ref21 = (_ref22 = (_myArtOPS$measureValu3 = myArtOPS.measureValue) !== null && _myArtOPS$measureValu3 !== void 0 ? _myArtOPS$measureValu3 : this.freeTextMeasureCm(myArtOPS)) !== null && _ref22 !== void 0 ? _ref22 : myArtOPS.value) !== null && _ref21 !== void 0 ? _ref21 : myArtOPS.valueFromName), this.article.catalogArticle.width);
|
|
26829
26987
|
if (newWidth != null) {
|
|
26830
26988
|
this.article.doUpdatePlannerSize = true;
|
|
26831
26989
|
this.article.calcWidth = newWidth;
|
|
@@ -26851,12 +27009,12 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26851
27009
|
var oc = decision.optionCombinations[j];
|
|
26852
27010
|
var variantValues = {};
|
|
26853
27011
|
var useVVs = true;
|
|
26854
|
-
var
|
|
26855
|
-
|
|
27012
|
+
var _iterator17 = _createForOfIteratorHelper$b(oc.projectOptionsSetRefs),
|
|
27013
|
+
_step17;
|
|
26856
27014
|
try {
|
|
26857
|
-
for (
|
|
27015
|
+
for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
|
|
26858
27016
|
var _optionSetRef$optionL2, _optionSetRef$optionL3;
|
|
26859
|
-
var optionSetRef =
|
|
27017
|
+
var optionSetRef = _step17.value;
|
|
26860
27018
|
if (optionSetRef.featureNo.toString() == featureNo) {
|
|
26861
27019
|
var _optionSetRef$optionL;
|
|
26862
27020
|
if (optionKey && !((_optionSetRef$optionL = optionSetRef.optionList) !== null && _optionSetRef$optionL !== void 0 && _optionSetRef$optionL.options.includes(optionKey))) {
|
|
@@ -26867,9 +27025,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26867
27025
|
variantValues[optionSetRef.featureNo.toString()] = (_optionSetRef$optionL2 = (_optionSetRef$optionL3 = optionSetRef.optionList) === null || _optionSetRef$optionL3 === void 0 || (_optionSetRef$optionL3 = _optionSetRef$optionL3.optionRef) === null || _optionSetRef$optionL3 === void 0 || (_optionSetRef$optionL3 = _optionSetRef$optionL3[0]) === null || _optionSetRef$optionL3 === void 0 ? void 0 : _optionSetRef$optionL3.optionKey) !== null && _optionSetRef$optionL2 !== void 0 ? _optionSetRef$optionL2 : '';
|
|
26868
27026
|
}
|
|
26869
27027
|
} catch (err) {
|
|
26870
|
-
|
|
27028
|
+
_iterator17.e(err);
|
|
26871
27029
|
} finally {
|
|
26872
|
-
|
|
27030
|
+
_iterator17.f();
|
|
26873
27031
|
}
|
|
26874
27032
|
if (useVVs && Object.keys(variantValues).length) variantValuesArr.push(variantValues);
|
|
26875
27033
|
}
|
|
@@ -26952,9 +27110,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26952
27110
|
for (var j = 0; !doUse && j < image.decisionNos.length; j++) {
|
|
26953
27111
|
var decision = catalogData.getDecisionByNo(image.decisionNos[j]);
|
|
26954
27112
|
if (!decision) continue;
|
|
26955
|
-
var
|
|
26956
|
-
|
|
26957
|
-
combination =
|
|
27113
|
+
var _ref23 = this.getMatchingOptionCombination(decision.optionCombinations, decision.decisionNo),
|
|
27114
|
+
_ref24 = _slicedToArray(_ref23, 1),
|
|
27115
|
+
combination = _ref24[0];
|
|
26958
27116
|
if (combination) {
|
|
26959
27117
|
doUse = true;
|
|
26960
27118
|
break;
|
|
@@ -26973,18 +27131,18 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26973
27131
|
}
|
|
26974
27132
|
|
|
26975
27133
|
// this functions updates the images of OPVs that depend on rules
|
|
26976
|
-
var
|
|
26977
|
-
|
|
27134
|
+
var _iterator18 = _createForOfIteratorHelper$b(this.article.articleOptionStates.values()),
|
|
27135
|
+
_step18;
|
|
26978
27136
|
try {
|
|
26979
|
-
for (
|
|
26980
|
-
var ops =
|
|
26981
|
-
var
|
|
26982
|
-
|
|
27137
|
+
for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
|
|
27138
|
+
var ops = _step18.value;
|
|
27139
|
+
var _iterator19 = _createForOfIteratorHelper$b(ops.visibleOptionValues),
|
|
27140
|
+
_step19;
|
|
26983
27141
|
try {
|
|
26984
|
-
for (
|
|
26985
|
-
var
|
|
26986
|
-
jKey =
|
|
26987
|
-
opv =
|
|
27142
|
+
for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
|
|
27143
|
+
var _step19$value = _slicedToArray(_step19.value, 2),
|
|
27144
|
+
jKey = _step19$value[0],
|
|
27145
|
+
opv = _step19$value[1];
|
|
26988
27146
|
if (opv.images) {
|
|
26989
27147
|
var imageFound = false;
|
|
26990
27148
|
for (var _i5 = 0; _i5 < opv.images.length; _i5++) {
|
|
@@ -26995,9 +27153,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26995
27153
|
for (var _j2 = 0; _j2 < _image.decisionNos.length; _j2++) {
|
|
26996
27154
|
var _decision4 = catalogData.getDecisionByNo(_image.decisionNos[_j2]);
|
|
26997
27155
|
if (!_decision4) throw new Error('decision ' + _image.decisionNos[_j2] + ' not found');
|
|
26998
|
-
var
|
|
26999
|
-
|
|
27000
|
-
_combination2 =
|
|
27156
|
+
var _ref27 = this.getMatchingOptionCombination(_decision4.optionCombinations, _decision4.decisionNo),
|
|
27157
|
+
_ref28 = _slicedToArray(_ref27, 1),
|
|
27158
|
+
_combination2 = _ref28[0];
|
|
27001
27159
|
if (_combination2) {
|
|
27002
27160
|
_doUse = true;
|
|
27003
27161
|
break;
|
|
@@ -27014,18 +27172,18 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
27014
27172
|
}
|
|
27015
27173
|
}
|
|
27016
27174
|
} catch (err) {
|
|
27017
|
-
|
|
27175
|
+
_iterator19.e(err);
|
|
27018
27176
|
} finally {
|
|
27019
|
-
|
|
27177
|
+
_iterator19.f();
|
|
27020
27178
|
}
|
|
27021
27179
|
}
|
|
27022
27180
|
|
|
27023
27181
|
// this function calculates an Svg to the current configuration if neccessary (SVG Tausch)
|
|
27024
27182
|
// if the Article has no SVG Tausch nothing is done
|
|
27025
27183
|
} catch (err) {
|
|
27026
|
-
|
|
27184
|
+
_iterator18.e(err);
|
|
27027
27185
|
} finally {
|
|
27028
|
-
|
|
27186
|
+
_iterator18.f();
|
|
27029
27187
|
}
|
|
27030
27188
|
var newSVGFile = null;
|
|
27031
27189
|
var svgChangedViaSvgTausch = false;
|
|
@@ -27052,9 +27210,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
27052
27210
|
for (var _j = 0; _j < svg.decisionNos.length; _j++) {
|
|
27053
27211
|
var _decision3 = catalogData.getDecisionByNo(svg.decisionNos[_j]);
|
|
27054
27212
|
if (!_decision3) throw new Error('decision ' + svg.decisionNos[_j] + ' not found');
|
|
27055
|
-
var
|
|
27056
|
-
|
|
27057
|
-
_combination =
|
|
27213
|
+
var _ref25 = this.getMatchingOptionCombination(_decision3.optionCombinations, _decision3.decisionNo),
|
|
27214
|
+
_ref26 = _slicedToArray(_ref25, 1),
|
|
27215
|
+
_combination = _ref26[0];
|
|
27058
27216
|
if (_combination) {
|
|
27059
27217
|
svgValid = _decision3;
|
|
27060
27218
|
break;
|
|
@@ -29908,7 +30066,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
29908
30066
|
break;
|
|
29909
30067
|
}
|
|
29910
30068
|
_context.next = 4;
|
|
29911
|
-
return import('./ShelfPlanner-
|
|
30069
|
+
return import('./ShelfPlanner-05d57e72.js');
|
|
29912
30070
|
case 4:
|
|
29913
30071
|
_yield$import = _context.sent;
|
|
29914
30072
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -38003,7 +38161,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
38003
38161
|
break;
|
|
38004
38162
|
}
|
|
38005
38163
|
_context5.next = 3;
|
|
38006
|
-
return import('./DoorPlanner-
|
|
38164
|
+
return import('./DoorPlanner-b6bbdd8f.js');
|
|
38007
38165
|
case 3:
|
|
38008
38166
|
_yield$import = _context5.sent;
|
|
38009
38167
|
DoorPlanner = _yield$import["default"];
|
|
@@ -43587,7 +43745,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
43587
43745
|
break;
|
|
43588
43746
|
case 3:
|
|
43589
43747
|
_context12.next = 5;
|
|
43590
|
-
return import('./PfisterWWSHandler-
|
|
43748
|
+
return import('./PfisterWWSHandler-cf8dd909.js');
|
|
43591
43749
|
case 5:
|
|
43592
43750
|
_yield$import = _context12.sent;
|
|
43593
43751
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -43595,7 +43753,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
43595
43753
|
return _context12.abrupt("break", 27);
|
|
43596
43754
|
case 9:
|
|
43597
43755
|
_context12.next = 11;
|
|
43598
|
-
return import('./LiviqueWWSHandler-
|
|
43756
|
+
return import('./LiviqueWWSHandler-5f62a364.js');
|
|
43599
43757
|
case 11:
|
|
43600
43758
|
_yield$import2 = _context12.sent;
|
|
43601
43759
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -43603,7 +43761,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
43603
43761
|
return _context12.abrupt("break", 27);
|
|
43604
43762
|
case 15:
|
|
43605
43763
|
_context12.next = 17;
|
|
43606
|
-
return import('./SeriousBasketHandler-
|
|
43764
|
+
return import('./SeriousBasketHandler-5f29e886.js');
|
|
43607
43765
|
case 17:
|
|
43608
43766
|
_yield$import3 = _context12.sent;
|
|
43609
43767
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -43611,7 +43769,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
43611
43769
|
return _context12.abrupt("break", 27);
|
|
43612
43770
|
case 21:
|
|
43613
43771
|
_context12.next = 23;
|
|
43614
|
-
return import('./StandardWWSHandler-
|
|
43772
|
+
return import('./StandardWWSHandler-a9f0e1f8.js');
|
|
43615
43773
|
case 23:
|
|
43616
43774
|
_yield$import4 = _context12.sent;
|
|
43617
43775
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -44994,7 +45152,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
44994
45152
|
while (1) switch (_context3.prev = _context3.next) {
|
|
44995
45153
|
case 0:
|
|
44996
45154
|
_context3.next = 2;
|
|
44997
|
-
return import('./Host3DSignalR-
|
|
45155
|
+
return import('./Host3DSignalR-c4b67bb7.js');
|
|
44998
45156
|
case 2:
|
|
44999
45157
|
_yield$import = _context3.sent;
|
|
45000
45158
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -46670,7 +46828,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
46670
46828
|
break;
|
|
46671
46829
|
case 8:
|
|
46672
46830
|
_context5.next = 10;
|
|
46673
|
-
return import('./DivaStandardPlanner-
|
|
46831
|
+
return import('./DivaStandardPlanner-ef69c7d9.js');
|
|
46674
46832
|
case 10:
|
|
46675
46833
|
_yield$import = _context5.sent;
|
|
46676
46834
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -46681,7 +46839,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
46681
46839
|
return _context5.abrupt("break", 21);
|
|
46682
46840
|
case 15:
|
|
46683
46841
|
_context5.next = 17;
|
|
46684
|
-
return import('./DivaBoxPlanner-
|
|
46842
|
+
return import('./DivaBoxPlanner-f198956e.js');
|
|
46685
46843
|
case 17:
|
|
46686
46844
|
_yield$import2 = _context5.sent;
|
|
46687
46845
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -47844,52 +48002,24 @@ function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
47844
48002
|
*/
|
|
47845
48003
|
|
|
47846
48004
|
var LOG$2 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
48005
|
+
|
|
48006
|
+
/**
|
|
48007
|
+
* Everything the planner calls on its attached view, registered as ONE object via
|
|
48008
|
+
* {@link DivaWebPlanner.attachView} (mount or adoption of an existing instance) and removed
|
|
48009
|
+
* via {@link DivaWebPlanner.detachView}. `view === undefined` IS the headless state.
|
|
48010
|
+
*/
|
|
47847
48011
|
var DivaWebPlanner = /*#__PURE__*/function () {
|
|
47848
48012
|
function DivaWebPlanner(plannerConfig) {
|
|
47849
48013
|
var _this = this;
|
|
47850
48014
|
_classCallCheck(this, DivaWebPlanner);
|
|
47851
48015
|
_defineProperty(this, "divaBasketHandler", void 0);
|
|
47852
|
-
|
|
47853
|
-
|
|
47854
|
-
|
|
47855
|
-
_defineProperty(this, "
|
|
47856
|
-
_defineProperty(this, "initConfiguratorStructure", void 0);
|
|
47857
|
-
_defineProperty(this, "onBasketInitialized", void 0);
|
|
47858
|
-
_defineProperty(this, "initConfiguratorMode", void 0);
|
|
47859
|
-
_defineProperty(this, "updatePlannerMsgContainer", void 0);
|
|
47860
|
-
_defineProperty(this, "navigateToConfigStep", void 0);
|
|
47861
|
-
_defineProperty(this, "updateConfiguratorStructure", void 0);
|
|
47862
|
-
_defineProperty(this, "navigateToTabGroup", void 0);
|
|
47863
|
-
_defineProperty(this, "getCurPlannerViewMode", void 0);
|
|
47864
|
-
_defineProperty(this, "getInitPlannerViewMode", void 0);
|
|
47865
|
-
_defineProperty(this, "updatePlanner3DImage", void 0);
|
|
47866
|
-
_defineProperty(this, "setRotationOrbitCube", void 0);
|
|
47867
|
-
_defineProperty(this, "getCanvas2DAsJPG", void 0);
|
|
47868
|
-
_defineProperty(this, "updateFullscreenRendering", void 0);
|
|
48016
|
+
/** The attached view; undefined = headless. */
|
|
48017
|
+
_defineProperty(this, "view", void 0);
|
|
48018
|
+
/** Rendering size for view-less artifact generation (fallback while no view is attached). */
|
|
48019
|
+
_defineProperty(this, "headlessRenderingSize", void 0);
|
|
47869
48020
|
_defineProperty(this, "plannerHandler", void 0);
|
|
47870
|
-
_defineProperty(this, "updateSetImage", void 0);
|
|
47871
|
-
_defineProperty(this, "updatePlanner2DGrid", void 0);
|
|
47872
|
-
_defineProperty(this, "getPlannerRenderingSize", void 0);
|
|
47873
|
-
_defineProperty(this, "updateCatalogPlannerArticles", void 0);
|
|
47874
|
-
_defineProperty(this, "updateCatalogPlanner2Dot0Articles", void 0);
|
|
47875
|
-
_defineProperty(this, "updateAccessoiresPalette", void 0);
|
|
47876
|
-
_defineProperty(this, "updatePaletteInfos", void 0);
|
|
47877
|
-
_defineProperty(this, "updateElementSelectionConfig", void 0);
|
|
47878
|
-
_defineProperty(this, "updateBBox", void 0);
|
|
47879
|
-
_defineProperty(this, "updateElementSelectionPlanner", void 0);
|
|
47880
|
-
_defineProperty(this, "updateConfigItems", void 0);
|
|
47881
|
-
_defineProperty(this, "updateSummaryItems", void 0);
|
|
47882
|
-
_defineProperty(this, "updateStaticRoomListItems", void 0);
|
|
47883
|
-
_defineProperty(this, "updateShelfPlannerItems", void 0);
|
|
47884
|
-
_defineProperty(this, "updateFreePlacesOnGrids", void 0);
|
|
47885
|
-
_defineProperty(this, "updateDoorPlannerItems", void 0);
|
|
47886
|
-
_defineProperty(this, "updatePrice", void 0);
|
|
47887
|
-
_defineProperty(this, "updateViewButtonsDependigOnConfigStructure", void 0);
|
|
47888
|
-
_defineProperty(this, "updateViewPlannerElements", void 0);
|
|
47889
|
-
_defineProperty(this, "getDoShow3DDimensionLines", void 0);
|
|
47890
|
-
_defineProperty(this, "getCurrentAlternativRendering", void 0);
|
|
47891
|
-
_defineProperty(this, "setWebConifguratorTitle", void 0);
|
|
47892
48021
|
_defineProperty(this, "plannerConfig", void 0);
|
|
48022
|
+
_defineProperty(this, "lastInitError", void 0);
|
|
47893
48023
|
_defineProperty(this, "actions", void 0);
|
|
47894
48024
|
_defineProperty(this, "handler", void 0);
|
|
47895
48025
|
_defineProperty(this, "state", void 0);
|
|
@@ -47907,19 +48037,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47907
48037
|
return undefined;
|
|
47908
48038
|
});
|
|
47909
48039
|
_defineProperty(this, "api", void 0);
|
|
47910
|
-
|
|
47911
|
-
_defineProperty(this, "setCamInfo", void 0);
|
|
48040
|
+
// View callbacks are wrapped in lambdas so a view attached/detached LATER (adoption) is always the one reached.
|
|
47912
48041
|
_defineProperty(this, "getPlannerHandlerFunctions", function () {
|
|
47913
48042
|
return {
|
|
47914
|
-
updateCamInfo:
|
|
48043
|
+
updateCamInfo: function updateCamInfo(camInfo) {
|
|
48044
|
+
var _this$view;
|
|
48045
|
+
return (_this$view = _this.view) === null || _this$view === void 0 ? void 0 : _this$view.setCamInfo(camInfo);
|
|
48046
|
+
},
|
|
47915
48047
|
updatePlannerRendering: _this.updatePlannerRendering,
|
|
47916
48048
|
updatePlannerHqRenderScript: _this.updatePlannerHqRenderScript,
|
|
47917
|
-
setRotationOrbitCube:
|
|
48049
|
+
setRotationOrbitCube: function setRotationOrbitCube(forceOrbitTo, rotHori, rotVert) {
|
|
48050
|
+
var _this$view2;
|
|
48051
|
+
return (_this$view2 = _this.view) === null || _this$view2 === void 0 ? void 0 : _this$view2.setRotationOrbitCube(forceOrbitTo, rotHori, rotVert);
|
|
48052
|
+
},
|
|
47918
48053
|
onRoomListLoaded: _this.onRoomListLoaded,
|
|
47919
|
-
updateSetImage:
|
|
48054
|
+
updateSetImage: function updateSetImage(url) {
|
|
48055
|
+
var _this$view3;
|
|
48056
|
+
return (_this$view3 = _this.view) === null || _this$view3 === void 0 ? void 0 : _this$view3.updateSetImage(url);
|
|
48057
|
+
},
|
|
47920
48058
|
getOrigConfiguration: _this.divaBasketHandler.getOrigConfiguration,
|
|
47921
48059
|
doAllowSetPlanner: _this.doAllowSetPlanner.bind(_this),
|
|
47922
|
-
updatePlannerMsgContainer:
|
|
48060
|
+
updatePlannerMsgContainer: function updatePlannerMsgContainer(codex, doShowPlannerMsg, type, content, autoHide, timeoutDuration) {
|
|
48061
|
+
var _this$view4;
|
|
48062
|
+
return (_this$view4 = _this.view) === null || _this$view4 === void 0 ? void 0 : _this$view4.updatePlannerMsgContainer(codex, doShowPlannerMsg, type, content, autoHide, timeoutDuration);
|
|
48063
|
+
},
|
|
47923
48064
|
clearAiImages: _this.clearAllAiImagesAsJpg.bind(_this)
|
|
47924
48065
|
};
|
|
47925
48066
|
});
|
|
@@ -47930,13 +48071,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47930
48071
|
_defineProperty(this, "setActSet", function (setId, oldTabgroupType) {
|
|
47931
48072
|
var somethingChanged = setHandlerInstance.setActSet(_this.sets, setId);
|
|
47932
48073
|
if (somethingChanged) {
|
|
48074
|
+
var _this$view6;
|
|
47933
48075
|
_this.updateWebConfiguratorTitle();
|
|
47934
48076
|
_this.updateConfigStructure();
|
|
47935
48077
|
if (oldTabgroupType) {
|
|
47936
|
-
var _this$
|
|
47937
|
-
if (!((_this$
|
|
48078
|
+
var _this$view5;
|
|
48079
|
+
if (!((_this$view5 = _this.view) !== null && _this$view5 !== void 0 && _this$view5.navigateToTabGroup(oldTabgroupType, undefined, true))) oldTabgroupType = undefined;
|
|
47938
48080
|
}
|
|
47939
|
-
if (!oldTabgroupType) _this.navigateToConfigStep(_this.actSet().ActConfigStepKey, true);
|
|
48081
|
+
if (!oldTabgroupType) (_this$view6 = _this.view) === null || _this$view6 === void 0 || _this$view6.navigateToConfigStep(_this.actSet().ActConfigStepKey, true);
|
|
47940
48082
|
}
|
|
47941
48083
|
return somethingChanged;
|
|
47942
48084
|
});
|
|
@@ -47947,8 +48089,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47947
48089
|
_defineProperty(this, "onRoomListLoaded", function () {
|
|
47948
48090
|
var set = _this.actSet();
|
|
47949
48091
|
if (set !== null && set !== void 0 && set.hasStaticRoomList) {
|
|
47950
|
-
var _this$
|
|
47951
|
-
(_this$
|
|
48092
|
+
var _this$view7;
|
|
48093
|
+
(_this$view7 = _this.view) === null || _this$view7 === void 0 || _this$view7.updateStaticRoomListItems(setHandlerInstance.getStaticRoomListItems(set), !!(_this.api.getRoomListInProduct() || _this.plannerConfig.initMode));
|
|
47952
48094
|
}
|
|
47953
48095
|
});
|
|
47954
48096
|
/**
|
|
@@ -47959,10 +48101,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47959
48101
|
var _this$state;
|
|
47960
48102
|
var onlyUpdateState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
47961
48103
|
if (rendering.getIsFullscreenRendering()) {
|
|
47962
|
-
_this
|
|
48104
|
+
var _this$view8;
|
|
48105
|
+
(_this$view8 = _this.view) === null || _this$view8 === void 0 || _this$view8.updateFullscreenRendering(rendering);
|
|
47963
48106
|
} else {
|
|
47964
|
-
var _this$
|
|
47965
|
-
(_this$
|
|
48107
|
+
var _this$view9;
|
|
48108
|
+
(_this$view9 = _this.view) === null || _this$view9 === void 0 || _this$view9.updatePlanner3DImage(rendering, onlyUpdateState);
|
|
47966
48109
|
}
|
|
47967
48110
|
if (!onlyUpdateState && _this.actions && (_this$state = _this.state) !== null && _this$state !== void 0 && _this$state.enableSupport) {
|
|
47968
48111
|
var _this$actSet, _this$state$user, _this$state$user2, _this$state$user3;
|
|
@@ -47974,26 +48117,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47974
48117
|
* @param rendering The new rendering that should be loaded into the view
|
|
47975
48118
|
*/
|
|
47976
48119
|
_defineProperty(this, "updatePlannerHqRenderScript", function (hqRenderscript) {
|
|
47977
|
-
var _this$
|
|
48120
|
+
var _this$view10;
|
|
47978
48121
|
LOG$2.debug('new HQRenderScript set');
|
|
47979
|
-
(_this$
|
|
48122
|
+
(_this$view10 = _this.view) === null || _this$view10 === void 0 || _this$view10.setHQRenderScript(hqRenderscript.HQRenderScript);
|
|
47980
48123
|
});
|
|
47981
48124
|
/** The latest 2D-grid render; a capture must await it, otherwise it reads the canvas of the previous planning. */
|
|
47982
48125
|
_defineProperty(this, "pending2DRender", void 0);
|
|
47983
48126
|
_defineProperty(this, "update2DGrid", function (set) {
|
|
47984
|
-
if (!_this.
|
|
48127
|
+
if (!_this.view || _this.view.getInitPlannerViewMode() == 'No') return;
|
|
47985
48128
|
var boundingBox = setHandlerInstance.get2DViewPlannerBoundingBox(set);
|
|
47986
48129
|
if (boundingBox) _this.start2DRender(boundingBox);
|
|
47987
48130
|
});
|
|
47988
48131
|
_defineProperty(this, "getPlanning2DAsJpg", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
47989
|
-
var _this$
|
|
48132
|
+
var _this$view11;
|
|
47990
48133
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
47991
48134
|
while (1) switch (_context.prev = _context.next) {
|
|
47992
48135
|
case 0:
|
|
47993
48136
|
_context.next = 2;
|
|
47994
48137
|
return _this.pending2DRender;
|
|
47995
48138
|
case 2:
|
|
47996
|
-
return _context.abrupt("return", (_this$
|
|
48139
|
+
return _context.abrupt("return", (_this$view11 = _this.view) === null || _this$view11 === void 0 ? void 0 : _this$view11.getCanvas2DAsJPG());
|
|
47997
48140
|
case 3:
|
|
47998
48141
|
case "end":
|
|
47999
48142
|
return _context.stop();
|
|
@@ -48011,23 +48154,24 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48011
48154
|
* This Function ist call from the View when all Planner Article are Requested for listing
|
|
48012
48155
|
*/
|
|
48013
48156
|
_defineProperty(this, "loadCatalogPlannerArticles", function (paletteeId, isUpdate, type, dockFilter, actStepName, stepKey, selectedArticle) {
|
|
48014
|
-
var _this$
|
|
48157
|
+
var _this$view12;
|
|
48015
48158
|
//Das aktuelle Set weiß welcher catalog gerade geladen ist.
|
|
48016
48159
|
//Von diesem Katalog müssen wir die CatalogPlannerArticles laden.
|
|
48017
|
-
(_this$
|
|
48160
|
+
(_this$view12 = _this.view) === null || _this$view12 === void 0 || _this$view12.updateCatalogPlannerArticles(setHandlerInstance.getPlannerPaletteViewInfo(_this.actSet(), type, selectedArticle), paletteeId, isUpdate, type, dockFilter, actStepName, stepKey);
|
|
48018
48161
|
});
|
|
48019
48162
|
_defineProperty(this, "loadCatalogPlannerArticles2Dot0", function (isUpdate, onlySelectionChanged, dp) {
|
|
48020
|
-
var _this$
|
|
48021
|
-
(_this$
|
|
48163
|
+
var _this$view13;
|
|
48164
|
+
(_this$view13 = _this.view) === null || _this$view13 === void 0 || _this$view13.updateCatalogPlanner2Dot0Articles(setHandlerInstance.getPlanner2Dot0PaletteViewInfo(_this.actSet()), isUpdate, onlySelectionChanged, dp);
|
|
48022
48165
|
});
|
|
48023
48166
|
/**
|
|
48024
48167
|
* this fuction loads the accessoires of a specific article -> could be more than one article in the future
|
|
48025
48168
|
* @param targetArticles the article of which we load the accessoires
|
|
48026
48169
|
*/
|
|
48027
48170
|
_defineProperty(this, "loadAccessoiresOfArticles", function (targetArticles) {
|
|
48171
|
+
var _this$view14;
|
|
48028
48172
|
var set = _this.actSet();
|
|
48029
48173
|
if (!set) return;
|
|
48030
|
-
_this.updateAccessoiresPalette(setHandlerInstance.getAccessoriesOfArticles(_this.actSet(), targetArticles), set.configAccessoiresInAccessoireStep ? 'ACC_CONFIG' : 'ACC');
|
|
48174
|
+
(_this$view14 = _this.view) === null || _this$view14 === void 0 || _this$view14.updateAccessoiresPalette(setHandlerInstance.getAccessoriesOfArticles(_this.actSet(), targetArticles), set.configAccessoiresInAccessoireStep ? 'ACC_CONFIG' : 'ACC');
|
|
48031
48175
|
});
|
|
48032
48176
|
/**
|
|
48033
48177
|
* this function is called when all Items of a ConfigStep are requested
|
|
@@ -48035,7 +48179,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48035
48179
|
*/
|
|
48036
48180
|
_defineProperty(this, "loadConfigItemsOfOptions", /*#__PURE__*/function () {
|
|
48037
48181
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(configStepKey, paletteId, isUpdate, visible) {
|
|
48038
|
-
var _this$state2, _this$state3, _this$
|
|
48182
|
+
var _this$state2, _this$state3, _this$view15;
|
|
48039
48183
|
var retValues;
|
|
48040
48184
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
48041
48185
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -48044,7 +48188,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48044
48188
|
return setHandlerInstance.loadConfigItemsOfActSetByConfigStepKey(_this.actSet(), configStepKey, visible, !!((_this$state2 = _this.state) !== null && _this$state2 !== void 0 && _this$state2.hidePrices || (_this$state3 = _this.state) !== null && _this$state3 !== void 0 && _this$state3.hideConfigPricePreview));
|
|
48045
48189
|
case 2:
|
|
48046
48190
|
retValues = _context2.sent;
|
|
48047
|
-
(_this$
|
|
48191
|
+
(_this$view15 = _this.view) === null || _this$view15 === void 0 || _this$view15.updateConfigItems(configStepKey, retValues.configItems, retValues.selectedItems, retValues.actStepName, retValues.paletteType, retValues.filterType, paletteId, isUpdate, retValues.visible, retValues.stepInfo, retValues.isRenderedInAccessorieStep, retValues.isRenderedNotInSettingPalette, retValues.optionCodex, retValues.notTotallyMatichingOPVs, retValues.isMultiselect, retValues.groupsDefaultClosed, retValues.contentItemId, retValues.conceptFilter, retValues.contentItemTeaser, retValues.description);
|
|
48048
48192
|
case 4:
|
|
48049
48193
|
case "end":
|
|
48050
48194
|
return _context2.stop();
|
|
@@ -48059,7 +48203,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48059
48203
|
* this function laods the summary Items
|
|
48060
48204
|
*/
|
|
48061
48205
|
_defineProperty(this, "loadSummaryItems", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
48062
|
-
var _this$actions, _this$actions$toggleL, _this$
|
|
48206
|
+
var _this$actions, _this$actions$toggleL, _this$view16, _this$actions2, _this$actions2$toggle;
|
|
48063
48207
|
var setPriceCurrency, setPriceFormat, summaryItems;
|
|
48064
48208
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
48065
48209
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -48077,7 +48221,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48077
48221
|
return summaryHandlerInstance.getSummaryItems(_this.sets, _this.doConfigure.bind(_this));
|
|
48078
48222
|
case 6:
|
|
48079
48223
|
summaryItems = _context3.sent;
|
|
48080
|
-
(_this$
|
|
48224
|
+
(_this$view16 = _this.view) === null || _this$view16 === void 0 || _this$view16.updateSummaryItems(summaryItems, setPriceFormat, summaryHandlerInstance.getSummaryStepWarning(_this.actSet(), summaryItems));
|
|
48081
48225
|
(_this$actions2 = _this.actions) === null || _this$actions2 === void 0 || (_this$actions2$toggle = _this$actions2.toggleLoading) === null || _this$actions2$toggle === void 0 || _this$actions2$toggle.call(_this$actions2, 'SUMMARY');
|
|
48082
48226
|
case 9:
|
|
48083
48227
|
case "end":
|
|
@@ -48086,19 +48230,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48086
48230
|
}, _callee3);
|
|
48087
48231
|
})));
|
|
48088
48232
|
_defineProperty(this, "loadStaticRoomList", function (dontUpdateView) {
|
|
48089
|
-
var _this$
|
|
48090
|
-
(_this$
|
|
48233
|
+
var _this$view17;
|
|
48234
|
+
(_this$view17 = _this.view) === null || _this$view17 === void 0 || _this$view17.updateStaticRoomListItems(setHandlerInstance.getStaticRoomListItems(_this.actSet()), dontUpdateView);
|
|
48091
48235
|
});
|
|
48092
48236
|
_defineProperty(this, "loadShelfPlannerItems", function (paletteId, configStepKey, from) {
|
|
48093
|
-
var _this$
|
|
48237
|
+
var _this$view18;
|
|
48094
48238
|
var _DivaSetHandler$getSh = setHandlerInstance.getShelfPlannerItems(_this.actSet(), configStepKey),
|
|
48095
48239
|
accessoires = _DivaSetHandler$getSh.accessoires,
|
|
48096
48240
|
grids = _DivaSetHandler$getSh.grids;
|
|
48097
|
-
(_this$
|
|
48241
|
+
(_this$view18 = _this.view) === null || _this$view18 === void 0 || _this$view18.updateShelfPlannerItems(paletteId, accessoires, grids, configStepKey, from);
|
|
48098
48242
|
});
|
|
48099
48243
|
_defineProperty(this, "loadDoorPlannerItems", function (configStepKey) {
|
|
48100
|
-
var _this$
|
|
48101
|
-
(_this$
|
|
48244
|
+
var _this$view19;
|
|
48245
|
+
(_this$view19 = _this.view) === null || _this$view19 === void 0 || _this$view19.updateDoorPlannerItems(setHandlerInstance.getDoorPlannerItems(_this.actSet(), configStepKey), configStepKey);
|
|
48102
48246
|
});
|
|
48103
48247
|
/**
|
|
48104
48248
|
* This function is called when switching from one planning to another. All Planner handler are destroyed.
|
|
@@ -48106,7 +48250,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48106
48250
|
*/
|
|
48107
48251
|
_defineProperty(this, "destroyPlannerHandler", function (doDestroy3DHostConnection) {
|
|
48108
48252
|
setHandlerInstance.destroyPlannerHandler(_this.actSet(), doDestroy3DHostConnection);
|
|
48109
|
-
if (_this.
|
|
48253
|
+
if (_this.view) _this.updatePlannerView('DESTROY_PLANNER');
|
|
48110
48254
|
});
|
|
48111
48255
|
/**
|
|
48112
48256
|
* this Function is called when new Planner Article is Loaded
|
|
@@ -48115,7 +48259,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48115
48259
|
*/
|
|
48116
48260
|
_defineProperty(this, "addPlannerElement", /*#__PURE__*/function () {
|
|
48117
48261
|
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(elementCodex, initParams, dontUpdateView) {
|
|
48118
|
-
var _this$actions3, _this$actions3$toggle, _this$actions6, _this$actions6$toggle, _this$
|
|
48262
|
+
var _this$actions3, _this$actions3$toggle, _this$actions6, _this$actions6$toggle, _this$view20, _this$view21, _this$view22;
|
|
48119
48263
|
var set, newArticle, _this$actions4, _this$actions4$openMo, _this$i18n, _this$i18n2, _this$actions5, _this$actions5$toggle, baseArticle;
|
|
48120
48264
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
48121
48265
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -48151,13 +48295,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48151
48295
|
return _context4.abrupt("return", newArticle.doNotDeleteAccWhenNotDocked ? 'AccessoireNotVisualized' : 'AccessorieNoFreeSpace');
|
|
48152
48296
|
case 18:
|
|
48153
48297
|
_this.updateConfigStructure();
|
|
48154
|
-
(_this$
|
|
48298
|
+
(_this$view20 = _this.view) === null || _this$view20 === void 0 || _this$view20.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
48155
48299
|
_this.updatePlannerView('ADD_PLANNER_ELEMENT');
|
|
48156
48300
|
_this.updateWebConfiguratorTitle();
|
|
48157
48301
|
_this.updatePriceInView();
|
|
48158
|
-
_this.updateViewButtonsDependigOnConfigStructure();
|
|
48302
|
+
(_this$view21 = _this.view) === null || _this$view21 === void 0 || _this$view21.updateViewButtonsDependigOnConfigStructure();
|
|
48159
48303
|
baseArticle = setHandlerInstance.getBaseParentArticleOfAccessoire(set, newArticle.basketId);
|
|
48160
|
-
if (!dontUpdateView) (_this$
|
|
48304
|
+
if (!dontUpdateView) (_this$view22 = _this.view) === null || _this$view22 === void 0 || _this$view22.updateElementSelectionPlanner([baseArticle.setId], [baseArticle.elementId], true);
|
|
48161
48305
|
_this.checkMatchingProducts('onAdd');
|
|
48162
48306
|
_this.plannerChangeLog('onAddPlanner');
|
|
48163
48307
|
return _context4.abrupt("return", 'ElementAdded');
|
|
@@ -48179,7 +48323,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48179
48323
|
*/
|
|
48180
48324
|
_defineProperty(this, "switchPlannerElement", /*#__PURE__*/function () {
|
|
48181
48325
|
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(setId, elementId, articleCodex, initParams) {
|
|
48182
|
-
var _this$actions7, _this$actions7$toggle, _this$actions8, _this$actions8$toggle, _this$
|
|
48326
|
+
var _this$actions7, _this$actions7$toggle, _this$actions8, _this$actions8$toggle, _this$view23, _this$view24, _this$view25;
|
|
48183
48327
|
var set, variantValues, deletionResult, article;
|
|
48184
48328
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
48185
48329
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -48203,12 +48347,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48203
48347
|
case 14:
|
|
48204
48348
|
(_this$actions8 = _this.actions) === null || _this$actions8 === void 0 || (_this$actions8$toggle = _this$actions8.toggleLoading) === null || _this$actions8$toggle === void 0 || _this$actions8$toggle.call(_this$actions8, 'plannerswitch' + articleCodex, false, false);
|
|
48205
48349
|
_this.updateConfigStructure();
|
|
48206
|
-
(_this$
|
|
48350
|
+
(_this$view23 = _this.view) === null || _this$view23 === void 0 || _this$view23.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
48207
48351
|
_this.updatePlannerView('SWITCH_PLANNER_ELEMENT');
|
|
48208
48352
|
_this.updateWebConfiguratorTitle();
|
|
48209
|
-
(_this$
|
|
48353
|
+
(_this$view24 = _this.view) === null || _this$view24 === void 0 || _this$view24.updateElementSelectionPlanner([article.setId], [article.elementId], true);
|
|
48210
48354
|
_this.updatePriceInView();
|
|
48211
|
-
_this.updateViewButtonsDependigOnConfigStructure();
|
|
48355
|
+
(_this$view25 = _this.view) === null || _this$view25 === void 0 || _this$view25.updateViewButtonsDependigOnConfigStructure();
|
|
48212
48356
|
_this.checkMatchingProducts('onSwitch');
|
|
48213
48357
|
_this.plannerChangeLog('onSwitchPlanner');
|
|
48214
48358
|
case 24:
|
|
@@ -48224,7 +48368,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48224
48368
|
_defineProperty(this, "addAccessorieOnShelfPlanner", /*#__PURE__*/function () {
|
|
48225
48369
|
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey, partlistCodexToInit) {
|
|
48226
48370
|
var _this$actions9, _this$actions9$toggle, _this$actions10, _this$actions10$toggl;
|
|
48227
|
-
var set, retVal, _this$
|
|
48371
|
+
var set, retVal, _this$view26, _this$view27;
|
|
48228
48372
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
48229
48373
|
while (1) switch (_context6.prev = _context6.next) {
|
|
48230
48374
|
case 0:
|
|
@@ -48241,8 +48385,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48241
48385
|
_this.loadShelfPlannerItems(paletteId, configStepKey, 'add_accessoire');
|
|
48242
48386
|
_this.updateConfigStructure();
|
|
48243
48387
|
_this.updatePriceInView();
|
|
48244
|
-
_this.updateViewButtonsDependigOnConfigStructure();
|
|
48245
|
-
(_this$
|
|
48388
|
+
(_this$view26 = _this.view) === null || _this$view26 === void 0 || _this$view26.updateViewButtonsDependigOnConfigStructure();
|
|
48389
|
+
(_this$view27 = _this.view) === null || _this$view27 === void 0 || _this$view27.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
48246
48390
|
_this.updatePlannerView('ADD_ACC_ON_SHELF_PLANNER');
|
|
48247
48391
|
}
|
|
48248
48392
|
_this.checkMatchingProducts('onShelfAdd');
|
|
@@ -48260,8 +48404,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48260
48404
|
}());
|
|
48261
48405
|
_defineProperty(this, "moveShelfItem", /*#__PURE__*/function () {
|
|
48262
48406
|
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(paletteId, grid, initialIndex, finalIndex, configStepKey) {
|
|
48263
|
-
var _this$
|
|
48264
|
-
var set, result, _this$
|
|
48407
|
+
var _this$view29;
|
|
48408
|
+
var set, result, _this$view28, _this$i18n3;
|
|
48265
48409
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
48266
48410
|
while (1) switch (_context7.prev = _context7.next) {
|
|
48267
48411
|
case 0:
|
|
@@ -48271,11 +48415,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48271
48415
|
case 3:
|
|
48272
48416
|
result = _context7.sent;
|
|
48273
48417
|
if (result == 'RESETTED_CELLS') {
|
|
48274
|
-
(_this$
|
|
48418
|
+
(_this$view28 = _this.view) === null || _this$view28 === void 0 || _this$view28.updatePlannerMsgContainer('COULD_NOT_MOVE_SHELVES', true, 'INFO', (_this$i18n3 = _this.i18n()) === null || _this$i18n3 === void 0 ? void 0 : _this$i18n3.t('configurator.move_resetted'), true);
|
|
48275
48419
|
}
|
|
48276
48420
|
_this.updateConfigStructure();
|
|
48277
48421
|
_this.loadShelfPlannerItems(paletteId, configStepKey, 'move sheld');
|
|
48278
|
-
(_this$
|
|
48422
|
+
(_this$view29 = _this.view) === null || _this$view29 === void 0 || _this$view29.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
48279
48423
|
_this.updatePlannerView('MOVE_SHELF_ITEM');
|
|
48280
48424
|
case 9:
|
|
48281
48425
|
case "end":
|
|
@@ -48293,7 +48437,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48293
48437
|
});
|
|
48294
48438
|
_defineProperty(this, "deleteAccessorieOnShelfPlanner", /*#__PURE__*/function () {
|
|
48295
48439
|
var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey) {
|
|
48296
|
-
var _this$
|
|
48440
|
+
var _this$view30, _this$view31;
|
|
48297
48441
|
var set;
|
|
48298
48442
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
48299
48443
|
while (1) switch (_context8.prev = _context8.next) {
|
|
@@ -48305,8 +48449,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48305
48449
|
_this.updateConfigStructure();
|
|
48306
48450
|
_this.loadShelfPlannerItems(paletteId, configStepKey, 'delete accessorie');
|
|
48307
48451
|
_this.updatePriceInView();
|
|
48308
|
-
_this.updateViewButtonsDependigOnConfigStructure();
|
|
48309
|
-
(_this$
|
|
48452
|
+
(_this$view30 = _this.view) === null || _this$view30 === void 0 || _this$view30.updateViewButtonsDependigOnConfigStructure();
|
|
48453
|
+
(_this$view31 = _this.view) === null || _this$view31 === void 0 || _this$view31.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
48310
48454
|
_this.updatePlannerView('DELETE_ACC_ON_SHELF_PLANNER');
|
|
48311
48455
|
_this.checkMatchingProducts('onShelfDelete');
|
|
48312
48456
|
_this.plannerChangeLog('onDeletePlanner');
|
|
@@ -48329,7 +48473,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48329
48473
|
*/
|
|
48330
48474
|
_defineProperty(this, "updatePlannerTrans", /*#__PURE__*/function () {
|
|
48331
48475
|
var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(setId, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance) {
|
|
48332
|
-
var _this$
|
|
48476
|
+
var _this$view32;
|
|
48333
48477
|
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
48334
48478
|
while (1) switch (_context9.prev = _context9.next) {
|
|
48335
48479
|
case 0:
|
|
@@ -48338,7 +48482,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48338
48482
|
case 2:
|
|
48339
48483
|
if (transState == 'END') {
|
|
48340
48484
|
_this.updatePlannerView('UPDATE_PLANNER_TRANS');
|
|
48341
|
-
(_this$
|
|
48485
|
+
(_this$view32 = _this.view) === null || _this$view32 === void 0 || _this$view32.updateElementSelectionPlanner([setId], [plannerElementID], true);
|
|
48342
48486
|
}
|
|
48343
48487
|
case 3:
|
|
48344
48488
|
case "end":
|
|
@@ -48356,10 +48500,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48356
48500
|
* @param avoidUpdateRendering If this parameter is set to true, the function only updates the viewPointHandler - no rendering is made.
|
|
48357
48501
|
*/
|
|
48358
48502
|
_defineProperty(this, "handle3DVisualizationChanged", function (mode, params, avoidUpdateRendering) {
|
|
48359
|
-
var _this$
|
|
48503
|
+
var _this$view33;
|
|
48360
48504
|
var set = _this.actSet();
|
|
48361
48505
|
if (!set) return;
|
|
48362
|
-
setHandlerInstance.handle3DVisualizationChanged(set, mode, params, (_this$
|
|
48506
|
+
setHandlerInstance.handle3DVisualizationChanged(set, mode, params, (_this$view33 = _this.view) === null || _this$view33 === void 0 ? void 0 : _this$view33.getDoShow3DDimensionLines());
|
|
48363
48507
|
if (avoidUpdateRendering) return;
|
|
48364
48508
|
if (mode != 'Nav3DFullScreen') {
|
|
48365
48509
|
_this.updatePlannerView('HANDLE_3D_VIS_CHANGED');
|
|
@@ -48367,7 +48511,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48367
48511
|
});
|
|
48368
48512
|
_defineProperty(this, "updateAccessoireQuantity", /*#__PURE__*/function () {
|
|
48369
48513
|
var _ref10 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle) {
|
|
48370
|
-
var _this$actions11, _this$actions11$toggl, _this$actions12, _this$actions12$toggl;
|
|
48514
|
+
var _this$actions11, _this$actions11$toggl, _this$actions12, _this$actions12$toggl, _this$view34;
|
|
48371
48515
|
var set, ret;
|
|
48372
48516
|
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
48373
48517
|
while (1) switch (_context10.prev = _context10.next) {
|
|
@@ -48382,7 +48526,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48382
48526
|
if (ret.somethingChanged) _this.updateConfigStructure();
|
|
48383
48527
|
_this.updatePlannerView('UPDATE_ACC_QUANTITY');
|
|
48384
48528
|
_this.updatePriceInView();
|
|
48385
|
-
_this.updateViewButtonsDependigOnConfigStructure();
|
|
48529
|
+
(_this$view34 = _this.view) === null || _this$view34 === void 0 || _this$view34.updateViewButtonsDependigOnConfigStructure();
|
|
48386
48530
|
_this.checkMatchingProducts('onAccessoireUpdate');
|
|
48387
48531
|
_this.plannerChangeLog('onUpdateAccessoireQuantity');
|
|
48388
48532
|
case 12:
|
|
@@ -48397,7 +48541,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48397
48541
|
}());
|
|
48398
48542
|
_defineProperty(this, "deleteAccessoire", /*#__PURE__*/function () {
|
|
48399
48543
|
var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(articleCodex, parentBasketId) {
|
|
48400
|
-
var set, wasDeleted, _this$
|
|
48544
|
+
var set, wasDeleted, _this$view35, _this$view36;
|
|
48401
48545
|
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
48402
48546
|
while (1) switch (_context11.prev = _context11.next) {
|
|
48403
48547
|
case 0:
|
|
@@ -48408,10 +48552,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48408
48552
|
wasDeleted = _context11.sent;
|
|
48409
48553
|
if (wasDeleted) {
|
|
48410
48554
|
_this.updateConfigStructure();
|
|
48411
|
-
(_this$
|
|
48555
|
+
(_this$view35 = _this.view) === null || _this$view35 === void 0 || _this$view35.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
48412
48556
|
_this.updatePlannerView('DELETE_ACC');
|
|
48413
48557
|
_this.updatePriceInView();
|
|
48414
|
-
_this.updateViewButtonsDependigOnConfigStructure();
|
|
48558
|
+
(_this$view36 = _this.view) === null || _this$view36 === void 0 || _this$view36.updateViewButtonsDependigOnConfigStructure();
|
|
48415
48559
|
}
|
|
48416
48560
|
_this.checkMatchingProducts('onAccessoireDelete');
|
|
48417
48561
|
_this.plannerChangeLog('onDeletePlanner');
|
|
@@ -48427,14 +48571,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48427
48571
|
};
|
|
48428
48572
|
}());
|
|
48429
48573
|
_defineProperty(this, "loadPaletteInfos", function (configStepKey, activeArticles, targetArticles) {
|
|
48430
|
-
var _this$
|
|
48574
|
+
var _this$view37, _this$view38, _this$view39;
|
|
48431
48575
|
var set = _this.actSet();
|
|
48432
48576
|
if (!set) return;
|
|
48433
48577
|
var retValues = setHandlerInstance.loadPaletteInfos(set, configStepKey, activeArticles, targetArticles);
|
|
48434
48578
|
if (!retValues.articleInfos) return;
|
|
48435
|
-
_this.updatePaletteInfos(retValues.articleInfos, retValues.doShowConfigSingle, retValues.isConfigSingle, retValues.bbox);
|
|
48436
|
-
(_this$
|
|
48437
|
-
_this.updateElementSelectionConfig(retValues.articleInfos, _this.doAllowSetPlanner());
|
|
48579
|
+
(_this$view37 = _this.view) === null || _this$view37 === void 0 || _this$view37.updatePaletteInfos(retValues.articleInfos, retValues.doShowConfigSingle, retValues.isConfigSingle, retValues.bbox);
|
|
48580
|
+
(_this$view38 = _this.view) === null || _this$view38 === void 0 || _this$view38.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
48581
|
+
(_this$view39 = _this.view) === null || _this$view39 === void 0 || _this$view39.updateElementSelectionConfig(retValues.articleInfos, _this.doAllowSetPlanner());
|
|
48438
48582
|
});
|
|
48439
48583
|
_defineProperty(this, "getBasketIdsOfElementIdLogic", function (elementId) {
|
|
48440
48584
|
return setHandlerInstance.getBasketIdOfElementId(_this.actSet(), elementId);
|
|
@@ -48484,51 +48628,56 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48484
48628
|
//onConfigItemClick ist ein Click auf das Item der ConfigPalette um die OPV zu ändern
|
|
48485
48629
|
_defineProperty(this, "doConfigure", /*#__PURE__*/function () {
|
|
48486
48630
|
var _ref13 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents, eventKey) {
|
|
48487
|
-
var _this$actions13, _this$actions13$toggl
|
|
48488
|
-
var set, returnValues, structure, _returnValues$element, _this$
|
|
48631
|
+
var _this$actions13, _this$actions13$toggl;
|
|
48632
|
+
var set, returnValues, _this$actions14, _this$actions14$toggl, structure, _this$view40, _returnValues$element, _this$view43, _this$view41, _this$view42;
|
|
48489
48633
|
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
48490
48634
|
while (1) switch (_context13.prev = _context13.next) {
|
|
48491
48635
|
case 0:
|
|
48492
48636
|
set = _this.actSet();
|
|
48493
48637
|
(_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);
|
|
48494
|
-
_context13.
|
|
48638
|
+
_context13.prev = 2;
|
|
48639
|
+
_context13.next = 5;
|
|
48495
48640
|
return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, myValues, targetArticles, undefined, 'FromViewClick');
|
|
48496
|
-
case
|
|
48641
|
+
case 5:
|
|
48497
48642
|
returnValues = _context13.sent;
|
|
48643
|
+
case 6:
|
|
48644
|
+
_context13.prev = 6;
|
|
48498
48645
|
(_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);
|
|
48646
|
+
return _context13.finish(6);
|
|
48647
|
+
case 9:
|
|
48499
48648
|
structure = setHandlerInstance.loadConfigStructureOfActSet(set, _this.getCurPlannerType());
|
|
48500
48649
|
_this.checkMatchingProducts('onConfig');
|
|
48501
48650
|
if (dontUpdatePlannerView) {
|
|
48502
|
-
_context13.next =
|
|
48651
|
+
_context13.next = 21;
|
|
48503
48652
|
break;
|
|
48504
48653
|
}
|
|
48505
|
-
_this.updateConfiguratorStructure(structure);
|
|
48654
|
+
(_this$view40 = _this.view) === null || _this$view40 === void 0 || _this$view40.updateConfiguratorStructure(structure);
|
|
48506
48655
|
if (returnValues.articleCountChanged) {
|
|
48507
|
-
(_this$
|
|
48656
|
+
(_this$view41 = _this.view) === null || _this$view41 === void 0 || _this$view41.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
48508
48657
|
}
|
|
48509
48658
|
if ((_returnValues$element = returnValues.elementIdsToUpdateSelection) !== null && _returnValues$element !== void 0 && _returnValues$element.length) {
|
|
48510
|
-
(_this$
|
|
48659
|
+
(_this$view42 = _this.view) === null || _this$view42 === void 0 || _this$view42.updateElementSelectionPlanner([returnValues.setId], returnValues.elementIdsToUpdateSelection, true, true);
|
|
48511
48660
|
}
|
|
48512
48661
|
_this.updatePriceInView();
|
|
48513
|
-
_this.updateViewButtonsDependigOnConfigStructure();
|
|
48662
|
+
(_this$view43 = _this.view) === null || _this$view43 === void 0 || _this$view43.updateViewButtonsDependigOnConfigStructure();
|
|
48514
48663
|
_this.updatePlannerView('DO_CONFIGURE', myValues);
|
|
48515
48664
|
_this.updateWebConfiguratorTitle();
|
|
48516
|
-
_context13.next =
|
|
48665
|
+
_context13.next = 21;
|
|
48517
48666
|
return _this.getFreePlacesOnGrids(undefined, 'doConfigure');
|
|
48518
|
-
case
|
|
48667
|
+
case 21:
|
|
48519
48668
|
if (dontCallEvents) {
|
|
48520
|
-
_context13.next =
|
|
48669
|
+
_context13.next = 24;
|
|
48521
48670
|
break;
|
|
48522
48671
|
}
|
|
48523
|
-
_context13.next =
|
|
48672
|
+
_context13.next = 24;
|
|
48524
48673
|
return _this.fillBaksetforOnWebPlanerConfigChange(myValues, undefined, eventKey);
|
|
48525
|
-
case
|
|
48674
|
+
case 24:
|
|
48526
48675
|
_this.configuratorChangeLog('onConfigurationChange', myValues);
|
|
48527
|
-
case
|
|
48676
|
+
case 25:
|
|
48528
48677
|
case "end":
|
|
48529
48678
|
return _context13.stop();
|
|
48530
48679
|
}
|
|
48531
|
-
}, _callee13);
|
|
48680
|
+
}, _callee13, null, [[2,, 6, 9]]);
|
|
48532
48681
|
}));
|
|
48533
48682
|
return function (_x47, _x48, _x49, _x50, _x51) {
|
|
48534
48683
|
return _ref13.apply(this, arguments);
|
|
@@ -48610,9 +48759,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48610
48759
|
return returnTo;
|
|
48611
48760
|
});
|
|
48612
48761
|
_defineProperty(this, "addToBasketEventFunction", function (e) {
|
|
48613
|
-
var _this$
|
|
48614
|
-
if (e.type == 'addToBasket') (_this$
|
|
48615
|
-
if (e.type == 'saveBasket') (_this$
|
|
48762
|
+
var _this$view44, _this$view45;
|
|
48763
|
+
if (e.type == 'addToBasket') (_this$view44 = _this.view) === null || _this$view44 === void 0 || _this$view44.onClickAddToBasket();
|
|
48764
|
+
if (e.type == 'saveBasket') (_this$view45 = _this.view) === null || _this$view45 === void 0 || _this$view45.onClickAddToBasket(undefined, 'onAddToBasket', true);
|
|
48616
48765
|
});
|
|
48617
48766
|
this.plannerConfig = Object.assign(plannerConfig, {});
|
|
48618
48767
|
this.actions = plannerConfig.actions;
|
|
@@ -48625,7 +48774,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48625
48774
|
key: "initialize",
|
|
48626
48775
|
value: function () {
|
|
48627
48776
|
var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(cache) {
|
|
48628
|
-
var
|
|
48777
|
+
var _this$view46;
|
|
48778
|
+
var viewReadyPromise, loadSuccessful, _ret, set, _this$actions15, _this$i18n4, _this$i18n5, initializationId;
|
|
48629
48779
|
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
48630
48780
|
while (1) switch (_context15.prev = _context15.next) {
|
|
48631
48781
|
case 0:
|
|
@@ -48645,7 +48795,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48645
48795
|
return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
|
|
48646
48796
|
case 8:
|
|
48647
48797
|
this.plannerHandler = new DivaPlannerHandler(false);
|
|
48648
|
-
|
|
48798
|
+
|
|
48799
|
+
// Registered by the mounted view — absent when initializing headless (e.g. backoffice DIVA agent).
|
|
48800
|
+
viewReadyPromise = (_this$view46 = this.view) === null || _this$view46 === void 0 ? void 0 : _this$view46.initViewApiDependencies();
|
|
48649
48801
|
_context15.next = 12;
|
|
48650
48802
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
48651
48803
|
case 12:
|
|
@@ -48661,33 +48813,34 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48661
48813
|
DivaUtils.businessMetrics.setConfiguratorSessionId();
|
|
48662
48814
|
}
|
|
48663
48815
|
if (!loadSuccessful) {
|
|
48664
|
-
_context15.next =
|
|
48816
|
+
_context15.next = 32;
|
|
48665
48817
|
break;
|
|
48666
48818
|
}
|
|
48667
48819
|
_context15.prev = 15;
|
|
48668
48820
|
_context15.next = 18;
|
|
48669
48821
|
return this.initializeSets(loadSuccessful, viewReadyPromise);
|
|
48670
48822
|
case 18:
|
|
48671
|
-
|
|
48823
|
+
_ret = _context15.sent;
|
|
48672
48824
|
set = this.actSet();
|
|
48673
|
-
if (
|
|
48674
|
-
if (this.i18n()) (_this$actions15 = this.actions) === null || _this$actions15 === void 0 || _this$actions15.openModal({
|
|
48825
|
+
if (_ret && set && set.CatalogData.archived) {
|
|
48826
|
+
if (this.i18n() && !this.plannerConfig.suppressErrorModals) (_this$actions15 = this.actions) === null || _this$actions15 === void 0 || _this$actions15.openModal({
|
|
48675
48827
|
accept: true,
|
|
48676
48828
|
title: (_this$i18n4 = this.i18n()) === null || _this$i18n4 === void 0 ? void 0 : _this$i18n4.t('configurator.catalog_not_listed_title'),
|
|
48677
48829
|
text: (_this$i18n5 = this.i18n()) === null || _this$i18n5 === void 0 ? void 0 : _this$i18n5.t('configurator.catalog_not_listed_text')
|
|
48678
48830
|
});
|
|
48679
48831
|
}
|
|
48680
|
-
return _context15.abrupt("return",
|
|
48832
|
+
return _context15.abrupt("return", _ret);
|
|
48681
48833
|
case 24:
|
|
48682
48834
|
_context15.prev = 24;
|
|
48683
48835
|
_context15.t0 = _context15["catch"](15);
|
|
48684
48836
|
LOG$2.error(_context15.t0);
|
|
48837
|
+
this.lastInitError = _context15.t0;
|
|
48685
48838
|
this.onError(_context15.t0);
|
|
48686
48839
|
return _context15.abrupt("return", false);
|
|
48687
|
-
case
|
|
48688
|
-
_context15.next =
|
|
48840
|
+
case 30:
|
|
48841
|
+
_context15.next = 36;
|
|
48689
48842
|
break;
|
|
48690
|
-
case
|
|
48843
|
+
case 32:
|
|
48691
48844
|
this.onError();
|
|
48692
48845
|
//fehler beim laden vom basket..
|
|
48693
48846
|
initializationId = this.getInitializationID();
|
|
@@ -48695,7 +48848,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48695
48848
|
initializationId: initializationId
|
|
48696
48849
|
}, true);
|
|
48697
48850
|
return _context15.abrupt("return", false);
|
|
48698
|
-
case
|
|
48851
|
+
case 36:
|
|
48699
48852
|
case "end":
|
|
48700
48853
|
return _context15.stop();
|
|
48701
48854
|
}
|
|
@@ -48826,7 +48979,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48826
48979
|
}, {
|
|
48827
48980
|
key: "getInitStateForSet",
|
|
48828
48981
|
value: function getInitStateForSet() {
|
|
48829
|
-
var _this$divaBasketHandl,
|
|
48982
|
+
var _this$divaBasketHandl,
|
|
48983
|
+
_this$plannerConfig,
|
|
48984
|
+
_this2 = this,
|
|
48985
|
+
_this$plannerConfig$s2;
|
|
48830
48986
|
var onlyRunLogic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
48831
48987
|
return {
|
|
48832
48988
|
supplierColors: this.plannerConfig.supplierColors,
|
|
@@ -48846,7 +49002,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48846
49002
|
configuratorTitle: (_this$plannerConfig = this.plannerConfig) !== null && _this$plannerConfig !== void 0 && _this$plannerConfig.configuratorTitle ? decodeURIComponent(this.plannerConfig.configuratorTitle) : undefined,
|
|
48847
49003
|
doAllowSetPlanner: this.doAllowSetPlanner,
|
|
48848
49004
|
getPlanning2DAsJpg: this.getPlanning2DAsJpg,
|
|
48849
|
-
updateSetImage:
|
|
49005
|
+
updateSetImage: function updateSetImage(url) {
|
|
49006
|
+
var _this2$view;
|
|
49007
|
+
return (_this2$view = _this2.view) === null || _this2$view === void 0 ? void 0 : _this2$view.updateSetImage(url);
|
|
49008
|
+
},
|
|
48850
49009
|
plannerHandler: this.plannerHandler,
|
|
48851
49010
|
actions: this.actions,
|
|
48852
49011
|
divaCatalogs: this.divaCatalogs,
|
|
@@ -48867,11 +49026,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48867
49026
|
var _e$message,
|
|
48868
49027
|
_this$actions19,
|
|
48869
49028
|
_this$state4,
|
|
48870
|
-
|
|
49029
|
+
_this3 = this,
|
|
48871
49030
|
_this$actions21,
|
|
48872
49031
|
_this$actions21$toggl;
|
|
48873
49032
|
var onErrorHandling = this.api.onErrorHandling();
|
|
48874
|
-
var suppressUi = !!(onErrorHandling !== null && onErrorHandling !== void 0 && onErrorHandling.hideErrorMsg);
|
|
49033
|
+
var suppressUi = !!(onErrorHandling !== null && onErrorHandling !== void 0 && onErrorHandling.hideErrorMsg) || !!this.plannerConfig.suppressErrorModals;
|
|
48875
49034
|
if (!suppressUi && e !== null && e !== void 0 && (_e$message = e.message) !== null && _e$message !== void 0 && _e$message.startsWith('No ConfiguratorStep was generated') && (_this$actions19 = this.actions) !== null && _this$actions19 !== void 0 && _this$actions19.openModal) {
|
|
48876
49035
|
var _this$i18n6, _this$i18n7;
|
|
48877
49036
|
this.actions.openModal({
|
|
@@ -48889,7 +49048,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48889
49048
|
}
|
|
48890
49049
|
if (onErrorHandling) {
|
|
48891
49050
|
var _this$plannerConfig$a2;
|
|
48892
|
-
if (!
|
|
49051
|
+
if (!suppressUi) {
|
|
48893
49052
|
var _this$plannerConfig$a, _this$i18n$t, _this$i18n8, _onErrorHandling$erro;
|
|
48894
49053
|
var isWeb = this.api.getApplicationEnvironment() == 'WEB';
|
|
48895
49054
|
(_this$plannerConfig$a = this.plannerConfig.actions) === null || _this$plannerConfig$a === void 0 || _this$plannerConfig$a.openModal({
|
|
@@ -48897,9 +49056,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48897
49056
|
accept: true,
|
|
48898
49057
|
callback: function callback(accepted) {
|
|
48899
49058
|
if (accepted && isWeb) {
|
|
48900
|
-
var
|
|
48901
|
-
|
|
48902
|
-
((
|
|
49059
|
+
var _this3$state;
|
|
49060
|
+
_this3.callEvent('onWebPlanerClose');
|
|
49061
|
+
((_this3$state = _this3.state) === null || _this3$state === void 0 ? void 0 : _this3$state.isFullscreenComponent) && _this3.callEvent('onFullscreenClose');
|
|
48903
49062
|
}
|
|
48904
49063
|
}
|
|
48905
49064
|
});
|
|
@@ -48963,51 +49122,96 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48963
49122
|
value: function getPlannerHandler() {
|
|
48964
49123
|
return this.plannerHandler;
|
|
48965
49124
|
}
|
|
48966
|
-
|
|
49125
|
+
}, {
|
|
49126
|
+
key: "reattachView",
|
|
49127
|
+
value: function () {
|
|
49128
|
+
var _reattachView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17() {
|
|
49129
|
+
var _this$view47, _this$actSet4, _this$actions22, _this$actions23, _this$actSet$getDivaA2, _this$actSet5;
|
|
49130
|
+
var viewReadyPromise, catalogData, _this$actions24;
|
|
49131
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
49132
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
49133
|
+
case 0:
|
|
49134
|
+
viewReadyPromise = (_this$view47 = this.view) === null || _this$view47 === void 0 ? void 0 : _this$view47.initViewApiDependencies();
|
|
49135
|
+
if (!viewReadyPromise) {
|
|
49136
|
+
_context17.next = 4;
|
|
49137
|
+
break;
|
|
49138
|
+
}
|
|
49139
|
+
_context17.next = 4;
|
|
49140
|
+
return viewReadyPromise;
|
|
49141
|
+
case 4:
|
|
49142
|
+
_context17.next = 6;
|
|
49143
|
+
return this.initView();
|
|
49144
|
+
case 6:
|
|
49145
|
+
catalogData = (_this$actSet4 = this.actSet()) === null || _this$actSet4 === void 0 ? void 0 : _this$actSet4.CatalogData;
|
|
49146
|
+
if (catalogData) (_this$actions22 = this.actions) === null || _this$actions22 === void 0 || _this$actions22.onEvent({
|
|
49147
|
+
type: 'onArticlesLoaded',
|
|
49148
|
+
data: {
|
|
49149
|
+
catalogData: catalogData
|
|
49150
|
+
}
|
|
49151
|
+
});
|
|
49152
|
+
(_this$actions23 = this.actions) === null || _this$actions23 === void 0 || _this$actions23.onEvent({
|
|
49153
|
+
type: 'onConfiguratorReady'
|
|
49154
|
+
});
|
|
49155
|
+
if (Object.keys((_this$actSet$getDivaA2 = (_this$actSet5 = this.actSet()) === null || _this$actSet5 === void 0 ? void 0 : _this$actSet5.getDivaArticles()) !== null && _this$actSet$getDivaA2 !== void 0 ? _this$actSet$getDivaA2 : {}).length) {
|
|
49156
|
+
(_this$actions24 = this.actions) === null || _this$actions24 === void 0 || _this$actions24.onEvent({
|
|
49157
|
+
type: 'onArticleInitialized'
|
|
49158
|
+
});
|
|
49159
|
+
}
|
|
49160
|
+
case 10:
|
|
49161
|
+
case "end":
|
|
49162
|
+
return _context17.stop();
|
|
49163
|
+
}
|
|
49164
|
+
}, _callee17, this);
|
|
49165
|
+
}));
|
|
49166
|
+
function reattachView() {
|
|
49167
|
+
return _reattachView.apply(this, arguments);
|
|
49168
|
+
}
|
|
49169
|
+
return reattachView;
|
|
49170
|
+
}()
|
|
48967
49171
|
/*
|
|
48968
49172
|
Wenn eine Planung geladen wurde, dann muss die View initialisiert werden
|
|
48969
49173
|
*/
|
|
48970
49174
|
}, {
|
|
48971
49175
|
key: "initView",
|
|
48972
49176
|
value: (function () {
|
|
48973
|
-
var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
48974
|
-
var _this$
|
|
48975
|
-
var set, plannerMode, _this$
|
|
48976
|
-
return _regeneratorRuntime.wrap(function
|
|
48977
|
-
while (1) switch (
|
|
49177
|
+
var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18() {
|
|
49178
|
+
var _this$view48;
|
|
49179
|
+
var set, plannerMode, _this$view49, _this$view50, _this$view51, _this$view52, _this$view53, _this$view54;
|
|
49180
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
49181
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
48978
49182
|
case 0:
|
|
48979
49183
|
set = this.actSet();
|
|
48980
49184
|
plannerMode = this.getPlannerMode();
|
|
48981
|
-
(_this$
|
|
49185
|
+
(_this$view48 = this.view) === null || _this$view48 === void 0 || _this$view48.initConfiguratorMode(plannerMode);
|
|
48982
49186
|
if (!(plannerMode == 'ProductList')) {
|
|
48983
|
-
|
|
49187
|
+
_context18.next = 7;
|
|
48984
49188
|
break;
|
|
48985
49189
|
}
|
|
48986
|
-
(_this$
|
|
48987
|
-
|
|
49190
|
+
(_this$view49 = this.view) === null || _this$view49 === void 0 || _this$view49.initConfiguratorStructure(setHandlerInstance.loadConfigStructureForOnlyProductsList());
|
|
49191
|
+
_context18.next = 17;
|
|
48988
49192
|
break;
|
|
48989
49193
|
case 7:
|
|
48990
|
-
|
|
48991
|
-
return (_this$
|
|
49194
|
+
_context18.next = 9;
|
|
49195
|
+
return (_this$view50 = this.view) === null || _this$view50 === void 0 ? void 0 : _this$view50.initPlannerView();
|
|
48992
49196
|
case 9:
|
|
48993
49197
|
//first load the Configuratorstructure STARTCONFIG
|
|
48994
|
-
(_this$
|
|
49198
|
+
(_this$view51 = this.view) === null || _this$view51 === void 0 || _this$view51.initConfiguratorStructure(setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType()));
|
|
48995
49199
|
this.updatePriceInView();
|
|
48996
|
-
(_this$
|
|
49200
|
+
(_this$view52 = this.view) === null || _this$view52 === void 0 || _this$view52.updateViewButtonsDependigOnConfigStructure();
|
|
48997
49201
|
this.updateWebConfiguratorTitle();
|
|
48998
49202
|
//initialize planner view
|
|
48999
|
-
(_this$
|
|
49203
|
+
(_this$view53 = this.view) === null || _this$view53 === void 0 || _this$view53.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set), set.getSetId(), set.firstElementId, true);
|
|
49000
49204
|
this.updatePlannerView('INIT_VIEW');
|
|
49001
|
-
(_this$
|
|
49205
|
+
(_this$view54 = this.view) === null || _this$view54 === void 0 || _this$view54.onBasketInitialized();
|
|
49002
49206
|
this.checkMatchingProducts('onInit');
|
|
49003
49207
|
case 17:
|
|
49004
|
-
|
|
49208
|
+
_context18.next = 19;
|
|
49005
49209
|
return this.runInitMode(plannerMode);
|
|
49006
49210
|
case 19:
|
|
49007
49211
|
case "end":
|
|
49008
|
-
return
|
|
49212
|
+
return _context18.stop();
|
|
49009
49213
|
}
|
|
49010
|
-
},
|
|
49214
|
+
}, _callee18, this);
|
|
49011
49215
|
}));
|
|
49012
49216
|
function initView() {
|
|
49013
49217
|
return _initView.apply(this, arguments);
|
|
@@ -49017,42 +49221,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49017
49221
|
}, {
|
|
49018
49222
|
key: "updateWebConfiguratorTitle",
|
|
49019
49223
|
value: function updateWebConfiguratorTitle() {
|
|
49020
|
-
var _this$
|
|
49021
|
-
(_this$
|
|
49224
|
+
var _this$view55, _this$actSet6;
|
|
49225
|
+
(_this$view55 = this.view) === null || _this$view55 === void 0 || _this$view55.setWebConifguratorTitle((_this$actSet6 = this.actSet()) === null || _this$actSet6 === void 0 ? void 0 : _this$actSet6.getSetTitle());
|
|
49022
49226
|
}
|
|
49023
49227
|
}, {
|
|
49024
49228
|
key: "updateConfigStructure",
|
|
49025
49229
|
value: function updateConfigStructure() {
|
|
49026
|
-
|
|
49230
|
+
var _this$view56;
|
|
49231
|
+
(_this$view56 = this.view) === null || _this$view56 === void 0 || _this$view56.updateConfiguratorStructure(setHandlerInstance.loadConfigStructureOfActSet(this.actSet(), this.getCurPlannerType()));
|
|
49027
49232
|
}
|
|
49028
49233
|
}, {
|
|
49029
49234
|
key: "runInitMode",
|
|
49030
49235
|
value: function () {
|
|
49031
|
-
var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
49236
|
+
var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(plannerMode) {
|
|
49032
49237
|
var _this$plannerConfig$i, _this$state5;
|
|
49033
|
-
var doDefault, _this$
|
|
49034
|
-
return _regeneratorRuntime.wrap(function
|
|
49035
|
-
while (1) switch (
|
|
49238
|
+
var doDefault, _this$view57, _this$saveToBasketWra, _configStepKey, _this$view58, _this$actSet7, _this$view59, _this$view60, _this$view61;
|
|
49239
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
49240
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
49036
49241
|
case 0:
|
|
49037
49242
|
doDefault = true;
|
|
49038
49243
|
if (!['SHOW_PDF'].includes((_this$plannerConfig$i = this.plannerConfig.initMode) !== null && _this$plannerConfig$i !== void 0 ? _this$plannerConfig$i : '')) {
|
|
49039
|
-
|
|
49244
|
+
_context19.next = 9;
|
|
49040
49245
|
break;
|
|
49041
49246
|
}
|
|
49042
49247
|
if (this.plannerConfig.initMode == 'SHOW_PDF') this.ReturnTo = 'OPEN_PDF';
|
|
49043
|
-
(_this$
|
|
49248
|
+
(_this$view57 = this.view) === null || _this$view57 === void 0 || _this$view57.navigateToTabGroup('SUMMARY', undefined, true);
|
|
49044
49249
|
//TODO lea bug das hier ist nur ein temporäre lößung https://app.asana.com/0/1200869909950432/1200998848659806
|
|
49045
|
-
|
|
49250
|
+
_context19.next = 6;
|
|
49046
49251
|
return (_this$saveToBasketWra = this.saveToBasketWrapper) === null || _this$saveToBasketWra === void 0 ? void 0 : _this$saveToBasketWra.call(this);
|
|
49047
49252
|
case 6:
|
|
49048
49253
|
doDefault = false;
|
|
49049
|
-
|
|
49254
|
+
_context19.next = 10;
|
|
49050
49255
|
break;
|
|
49051
49256
|
case 9:
|
|
49052
49257
|
if (this.plannerConfig.initMode == 'OPENCONFIGTABGROUP' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER_ONLY_MOBILE' && (_this$state5 = this.state) !== null && _this$state5 !== void 0 && _this$state5.dimensions.isMobile) {
|
|
49053
|
-
|
|
49054
|
-
if (
|
|
49055
|
-
(_this$
|
|
49258
|
+
_configStepKey = this.plannerConfig.opt ? setHandlerInstance.getConfigStepKeyOfOption(this.actSet(), this.plannerConfig.opt) : setHandlerInstance.getFirstConfigStep(this.actSet());
|
|
49259
|
+
if (_configStepKey) {
|
|
49260
|
+
(_this$view58 = this.view) === null || _this$view58 === void 0 || _this$view58.navigateToConfigStep(_configStepKey, !this.plannerConfig.opt, true);
|
|
49056
49261
|
doDefault = false;
|
|
49057
49262
|
} else {
|
|
49058
49263
|
LOG$2.warn('Option: ' + this.plannerConfig.opt + ' could not be found');
|
|
@@ -49061,18 +49266,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49061
49266
|
case 10:
|
|
49062
49267
|
if (doDefault) {
|
|
49063
49268
|
if (plannerMode == 'ProductList') {
|
|
49064
|
-
(_this$
|
|
49065
|
-
} else if ((_this$
|
|
49066
|
-
(_this$
|
|
49269
|
+
(_this$view59 = this.view) === null || _this$view59 === void 0 || _this$view59.navigateToTabGroup('PRODUCTS');
|
|
49270
|
+
} else if ((_this$actSet7 = this.actSet()) !== null && _this$actSet7 !== void 0 && _this$actSet7.hasStaticRoomList) {
|
|
49271
|
+
(_this$view60 = this.view) === null || _this$view60 === void 0 || _this$view60.navigateToTabGroup('ROOMLIST', true);
|
|
49067
49272
|
} else {
|
|
49068
|
-
(_this$
|
|
49273
|
+
(_this$view61 = this.view) === null || _this$view61 === void 0 || _this$view61.navigateToTabGroup(this.getCurPlannerType(), true);
|
|
49069
49274
|
}
|
|
49070
49275
|
}
|
|
49071
49276
|
case 11:
|
|
49072
49277
|
case "end":
|
|
49073
|
-
return
|
|
49278
|
+
return _context19.stop();
|
|
49074
49279
|
}
|
|
49075
|
-
},
|
|
49280
|
+
}, _callee19, this);
|
|
49076
49281
|
}));
|
|
49077
49282
|
function runInitMode(_x58) {
|
|
49078
49283
|
return _runInitMode.apply(this, arguments);
|
|
@@ -49082,16 +49287,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49082
49287
|
}, {
|
|
49083
49288
|
key: "addSetToActPlanningByDivaNr",
|
|
49084
49289
|
value: function () {
|
|
49085
|
-
var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
49086
|
-
var _this$
|
|
49290
|
+
var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(divaNr) {
|
|
49291
|
+
var _this$view62;
|
|
49087
49292
|
var set, orderSets, i, orderset, lastSetToInitialize, loadedSet, articlesKeys;
|
|
49088
|
-
return _regeneratorRuntime.wrap(function
|
|
49089
|
-
while (1) switch (
|
|
49293
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
49294
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
49090
49295
|
case 0:
|
|
49091
49296
|
set = this.actSet();
|
|
49092
49297
|
this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
49093
49298
|
this.divaBasketHandler.setIgnoreInitObjectWhenInitializing();
|
|
49094
|
-
|
|
49299
|
+
_context20.next = 5;
|
|
49095
49300
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
49096
49301
|
case 5:
|
|
49097
49302
|
orderSets = this.divaBasketHandler.actBasket.OrderSets;
|
|
@@ -49099,44 +49304,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49099
49304
|
i = 0;
|
|
49100
49305
|
case 8:
|
|
49101
49306
|
if (!(i < orderSets.length)) {
|
|
49102
|
-
|
|
49307
|
+
_context20.next = 24;
|
|
49103
49308
|
break;
|
|
49104
49309
|
}
|
|
49105
49310
|
orderset = orderSets[i];
|
|
49106
49311
|
lastSetToInitialize = setHandlerInstance.getOrderSetShouldInitPlanner(orderSets, i);
|
|
49107
49312
|
loadedSet = setHandlerInstance.findLoadedSet(this.sets, orderset.CatalogCodex, orderset.AccountGUID);
|
|
49108
49313
|
if (!loadedSet) {
|
|
49109
|
-
|
|
49314
|
+
_context20.next = 18;
|
|
49110
49315
|
break;
|
|
49111
49316
|
}
|
|
49112
|
-
|
|
49317
|
+
_context20.next = 15;
|
|
49113
49318
|
return setHandlerInstance.addOrderSetArticlesToExistingSet(loadedSet, orderset, lastSetToInitialize);
|
|
49114
49319
|
case 15:
|
|
49115
49320
|
this.checkMatchingProducts('onAdd');
|
|
49116
|
-
|
|
49321
|
+
_context20.next = 20;
|
|
49117
49322
|
break;
|
|
49118
49323
|
case 18:
|
|
49119
|
-
|
|
49324
|
+
_context20.next = 20;
|
|
49120
49325
|
return setHandlerInstance.initSet(orderset, this.getInitStateForSet(), lastSetToInitialize);
|
|
49121
49326
|
case 20:
|
|
49122
49327
|
this.cleanUpEmptySets(true);
|
|
49123
49328
|
case 21:
|
|
49124
49329
|
i++;
|
|
49125
|
-
|
|
49330
|
+
_context20.next = 8;
|
|
49126
49331
|
break;
|
|
49127
49332
|
case 24:
|
|
49128
49333
|
this.divaBasketHandler.actBasket.OrderSets = [];
|
|
49129
49334
|
this.updatePriceInView();
|
|
49130
49335
|
this.updateWebConfiguratorTitle();
|
|
49131
49336
|
this.updateConfigStructure();
|
|
49132
|
-
(_this$
|
|
49337
|
+
(_this$view62 = this.view) === null || _this$view62 === void 0 || _this$view62.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
49133
49338
|
articlesKeys = Object.keys(this.actSet().getDivaArticles());
|
|
49134
49339
|
this.loadPaletteInfos(undefined, [articlesKeys[0]], articlesKeys);
|
|
49135
49340
|
case 31:
|
|
49136
49341
|
case "end":
|
|
49137
|
-
return
|
|
49342
|
+
return _context20.stop();
|
|
49138
49343
|
}
|
|
49139
|
-
},
|
|
49344
|
+
}, _callee20, this);
|
|
49140
49345
|
}));
|
|
49141
49346
|
function addSetToActPlanningByDivaNr(_x59) {
|
|
49142
49347
|
return _addSetToActPlanningByDivaNr.apply(this, arguments);
|
|
@@ -49171,26 +49376,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49171
49376
|
}, {
|
|
49172
49377
|
key: "setActSetCurConfigStepKey",
|
|
49173
49378
|
value: function () {
|
|
49174
|
-
var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
49379
|
+
var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(curConfigStepKey) {
|
|
49175
49380
|
var set;
|
|
49176
|
-
return _regeneratorRuntime.wrap(function
|
|
49177
|
-
while (1) switch (
|
|
49381
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
49382
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
49178
49383
|
case 0:
|
|
49179
49384
|
set = this.actSet();
|
|
49180
49385
|
if (set) {
|
|
49181
|
-
|
|
49386
|
+
_context21.next = 3;
|
|
49182
49387
|
break;
|
|
49183
49388
|
}
|
|
49184
|
-
return
|
|
49389
|
+
return _context21.abrupt("return");
|
|
49185
49390
|
case 3:
|
|
49186
49391
|
set.ActConfigStepKey = curConfigStepKey;
|
|
49187
|
-
|
|
49392
|
+
_context21.next = 6;
|
|
49188
49393
|
return setHandlerInstance.updateNavigation(set);
|
|
49189
49394
|
case 6:
|
|
49190
49395
|
case "end":
|
|
49191
|
-
return
|
|
49396
|
+
return _context21.stop();
|
|
49192
49397
|
}
|
|
49193
|
-
},
|
|
49398
|
+
}, _callee21, this);
|
|
49194
49399
|
}));
|
|
49195
49400
|
function setActSetCurConfigStepKey(_x60) {
|
|
49196
49401
|
return _setActSetCurConfigStepKey.apply(this, arguments);
|
|
@@ -49208,28 +49413,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49208
49413
|
return this.divaBasketHandler.getOrderSetsByDivaNr(divaNr);
|
|
49209
49414
|
}
|
|
49210
49415
|
}, {
|
|
49211
|
-
key: "
|
|
49212
|
-
value:
|
|
49213
|
-
this.setHQRenderScript = setHQRenderScript;
|
|
49214
|
-
}
|
|
49215
|
-
}, {
|
|
49216
|
-
key: "registerSetCamInfo",
|
|
49217
|
-
value: function registerSetCamInfo(setCamInfo) {
|
|
49218
|
-
this.setCamInfo = setCamInfo;
|
|
49219
|
-
}
|
|
49220
|
-
|
|
49416
|
+
key: "updatePlannerView",
|
|
49417
|
+
value:
|
|
49221
49418
|
/**
|
|
49222
49419
|
* This function is called when the planner view should be updated
|
|
49223
49420
|
* @param callingFrom This parameter is used for debug Reasons. It can have information from where in the code the updatePlannerView is called
|
|
49224
49421
|
* @param viewpoint This parameter is used to send the viewpoint information from the rtv to unity
|
|
49225
49422
|
*/
|
|
49226
|
-
|
|
49227
|
-
|
|
49228
|
-
value: function updatePlannerView(callingFrom, onDoConfigureValues, hybridInfo) {
|
|
49229
|
-
var _this$getCurrentAlter, _set$getAlternateRend, _this$getCurPlannerVi, _this$getDoShow3DDime2, _this$getDoShow3DDime3, _this$getDoShow3DDime4;
|
|
49423
|
+
function updatePlannerView(callingFrom, onDoConfigureValues, hybridInfo) {
|
|
49424
|
+
var _this$view63, _set$getAlternateRend, _this$view64, _this$view$getPlanner, _this$view65, _this$view66, _this$view$getPlanner2, _this$view67, _this$view68, _this$view$getPlanner3, _this$view69, _this$view70, _this$view$getInitPla, _this$view72;
|
|
49230
49425
|
var set = this.actSet();
|
|
49231
49426
|
if (!set) return;
|
|
49232
|
-
var alternateRenderInfo = (_this$
|
|
49427
|
+
var alternateRenderInfo = (_this$view63 = this.view) === null || _this$view63 === void 0 || (_this$view63 = _this$view63.getCurrentAlternativRendering()) === null || _this$view63 === void 0 ? void 0 : _this$view63[0];
|
|
49233
49428
|
var alternateRenderInfoExistInSet = (set === null || set === void 0 || (_set$getAlternateRend = set.getAlternateRenderInfo()) === null || _set$getAlternateRend === void 0 ? void 0 : _set$getAlternateRend.length) > 0;
|
|
49234
49429
|
var doUpdateVP = false;
|
|
49235
49430
|
if (alternateRenderInfoExistInSet) {
|
|
@@ -49257,14 +49452,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49257
49452
|
};
|
|
49258
49453
|
}
|
|
49259
49454
|
}
|
|
49260
|
-
var curPlannerViewMode = (_this$
|
|
49455
|
+
var curPlannerViewMode = (_this$view64 = this.view) === null || _this$view64 === void 0 ? void 0 : _this$view64.getCurPlannerViewMode();
|
|
49261
49456
|
if (!curPlannerViewMode) return;
|
|
49262
49457
|
LOG$2.debug('updatePlannerView in mode: ' + curPlannerViewMode + '; called from ' + callingFrom);
|
|
49263
49458
|
//delete me if you see this
|
|
49264
49459
|
|
|
49265
49460
|
switch (curPlannerViewMode) {
|
|
49266
49461
|
case '3DCOMB':
|
|
49267
|
-
setHandlerInstance.update3DPlannerView(true, !hybridInfo || hybridInfo && hybridInfo.focus.adjustZoomInUnity, set, this.getPlannerRenderingSize(), 'STREAM', (_this$
|
|
49462
|
+
setHandlerInstance.update3DPlannerView(true, !hybridInfo || hybridInfo && hybridInfo.focus.adjustZoomInUnity, set, (_this$view$getPlanner = (_this$view65 = this.view) === null || _this$view65 === void 0 ? void 0 : _this$view65.getPlannerRenderingSize()) !== null && _this$view$getPlanner !== void 0 ? _this$view$getPlanner : this.headlessRenderingSize, 'STREAM', (_this$view66 = this.view) === null || _this$view66 === void 0 ? void 0 : _this$view66.getDoShow3DDimensionLines(), alternateRenderInfo, hybridInfo ? {
|
|
49268
49463
|
focus: hybridInfo.focus,
|
|
49269
49464
|
forceRTCam: true,
|
|
49270
49465
|
currentCamera: hybridInfo.currentCamera
|
|
@@ -49274,23 +49469,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49274
49469
|
case 'RTViewer':
|
|
49275
49470
|
//Request HQRenderscript + rendering
|
|
49276
49471
|
//Request new Rendering
|
|
49277
|
-
setHandlerInstance.update3DPlannerView(true, true, set, this.getPlannerRenderingSize(), 'STREAM', (_this$
|
|
49472
|
+
setHandlerInstance.update3DPlannerView(true, true, set, (_this$view$getPlanner2 = (_this$view67 = this.view) === null || _this$view67 === void 0 ? void 0 : _this$view67.getPlannerRenderingSize()) !== null && _this$view$getPlanner2 !== void 0 ? _this$view$getPlanner2 : this.headlessRenderingSize, 'STREAM', (_this$view68 = this.view) === null || _this$view68 === void 0 ? void 0 : _this$view68.getDoShow3DDimensionLines(), alternateRenderInfo, undefined);
|
|
49278
49473
|
break;
|
|
49279
49474
|
case '3DImage':
|
|
49280
49475
|
//Request new Rendering
|
|
49281
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), 'STREAM', (_this$
|
|
49476
|
+
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, (_this$view$getPlanner3 = (_this$view69 = this.view) === null || _this$view69 === void 0 ? void 0 : _this$view69.getPlannerRenderingSize()) !== null && _this$view$getPlanner3 !== void 0 ? _this$view$getPlanner3 : this.headlessRenderingSize, 'STREAM', (_this$view70 = this.view) === null || _this$view70 === void 0 ? void 0 : _this$view70.getDoShow3DDimensionLines(), alternateRenderInfo);
|
|
49282
49477
|
break;
|
|
49283
49478
|
case '2DGrid':
|
|
49284
|
-
var
|
|
49285
|
-
if (
|
|
49286
|
-
var _this$
|
|
49287
|
-
(_this$
|
|
49288
|
-
this.start2DRender(
|
|
49289
|
-
}
|
|
49290
|
-
if (['3DImage', '3DCOMB'].includes(this.getInitPlannerViewMode())) {
|
|
49291
|
-
var _this$
|
|
49479
|
+
var _boundingBox = setHandlerInstance.get2DViewPlannerBoundingBox(set);
|
|
49480
|
+
if (_boundingBox) {
|
|
49481
|
+
var _this$view71;
|
|
49482
|
+
(_this$view71 = this.view) === null || _this$view71 === void 0 || _this$view71.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
49483
|
+
this.start2DRender(_boundingBox);
|
|
49484
|
+
}
|
|
49485
|
+
if (['3DImage', '3DCOMB'].includes((_this$view$getInitPla = (_this$view72 = this.view) === null || _this$view72 === void 0 ? void 0 : _this$view72.getInitPlannerViewMode()) !== null && _this$view$getInitPla !== void 0 ? _this$view$getInitPla : '')) {
|
|
49486
|
+
var _this$view$getPlanner4, _this$view73, _this$view74;
|
|
49292
49487
|
//update 3D image always even if you are in the 2DGrid mode
|
|
49293
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), 'STREAM', (_this$
|
|
49488
|
+
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, (_this$view$getPlanner4 = (_this$view73 = this.view) === null || _this$view73 === void 0 ? void 0 : _this$view73.getPlannerRenderingSize()) !== null && _this$view$getPlanner4 !== void 0 ? _this$view$getPlanner4 : this.headlessRenderingSize, 'STREAM', (_this$view74 = this.view) === null || _this$view74 === void 0 ? void 0 : _this$view74.getDoShow3DDimensionLines(), alternateRenderInfo);
|
|
49294
49489
|
}
|
|
49295
49490
|
break;
|
|
49296
49491
|
}
|
|
@@ -49306,20 +49501,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49306
49501
|
}, {
|
|
49307
49502
|
key: "forceUpdatePlannerView",
|
|
49308
49503
|
value: function forceUpdatePlannerView(renderSavingMode, doLoadAllAlternateRenderings) {
|
|
49504
|
+
var _this$view$getInitPla2, _this$view75;
|
|
49309
49505
|
var set = this.actSet();
|
|
49310
49506
|
this.update2DGrid(set);
|
|
49311
|
-
if (['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(this.getInitPlannerViewMode())) {
|
|
49312
|
-
var _this$
|
|
49507
|
+
if (['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes((_this$view$getInitPla2 = (_this$view75 = this.view) === null || _this$view75 === void 0 ? void 0 : _this$view75.getInitPlannerViewMode()) !== null && _this$view$getInitPla2 !== void 0 ? _this$view$getInitPla2 : '')) {
|
|
49508
|
+
var _this$view$getPlanner6, _this$view78, _this$view79;
|
|
49313
49509
|
if (doLoadAllAlternateRenderings) {
|
|
49314
49510
|
var alternateRenderings = set.CatalogData.alternateRenderingsForSummary;
|
|
49315
49511
|
for (var i = 0; i < alternateRenderings.length; i++) {
|
|
49316
49512
|
if (alternateRenderings[i].hideOptionsIn3DImage && alternateRenderings[i].hideOptionsIn3DImage.length > 0) {
|
|
49317
|
-
var _this$
|
|
49318
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), renderSavingMode, (_this$
|
|
49513
|
+
var _this$view$getPlanner5, _this$view76, _this$view77;
|
|
49514
|
+
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, (_this$view$getPlanner5 = (_this$view76 = this.view) === null || _this$view76 === void 0 ? void 0 : _this$view76.getPlannerRenderingSize()) !== null && _this$view$getPlanner5 !== void 0 ? _this$view$getPlanner5 : this.headlessRenderingSize, renderSavingMode, (_this$view77 = this.view) === null || _this$view77 === void 0 ? void 0 : _this$view77.getDoShow3DDimensionLines(), alternateRenderings[i]);
|
|
49319
49515
|
}
|
|
49320
49516
|
}
|
|
49321
49517
|
}
|
|
49322
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), renderSavingMode, (_this$
|
|
49518
|
+
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, (_this$view$getPlanner6 = (_this$view78 = this.view) === null || _this$view78 === void 0 ? void 0 : _this$view78.getPlannerRenderingSize()) !== null && _this$view$getPlanner6 !== void 0 ? _this$view$getPlanner6 : this.headlessRenderingSize, renderSavingMode, (_this$view79 = this.view) === null || _this$view79 === void 0 ? void 0 : _this$view79.getDoShow3DDimensionLines(), undefined, undefined, false);
|
|
49323
49519
|
}
|
|
49324
49520
|
}
|
|
49325
49521
|
}, {
|
|
@@ -49330,16 +49526,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49330
49526
|
* The rejection MUST be swallowed: the cached promise is awaited by every later capture, so one failed render would break every following save.
|
|
49331
49527
|
*/
|
|
49332
49528
|
function start2DRender(boundingBox) {
|
|
49333
|
-
var _this$
|
|
49334
|
-
this.pending2DRender = Promise.resolve((_this$
|
|
49529
|
+
var _this$view80;
|
|
49530
|
+
this.pending2DRender = Promise.resolve((_this$view80 = this.view) === null || _this$view80 === void 0 ? void 0 : _this$view80.updatePlanner2DGrid(boundingBox))["catch"](function (error) {
|
|
49335
49531
|
LOG$2.error(error instanceof Error ? error : new Error('2D grid render failed: ' + String(error)));
|
|
49336
49532
|
});
|
|
49337
49533
|
}
|
|
49338
49534
|
}, {
|
|
49339
49535
|
key: "getAlternateRenderingsForSummary",
|
|
49340
49536
|
value: function getAlternateRenderingsForSummary() {
|
|
49341
|
-
var _this$
|
|
49342
|
-
return (_this$
|
|
49537
|
+
var _this$actSet8;
|
|
49538
|
+
return (_this$actSet8 = this.actSet()) === null || _this$actSet8 === void 0 || (_this$actSet8 = _this$actSet8.CatalogData) === null || _this$actSet8 === void 0 ? void 0 : _this$actSet8.alternateRenderingsForSummary;
|
|
49343
49539
|
}
|
|
49344
49540
|
}, {
|
|
49345
49541
|
key: "destroyWebPlanner",
|
|
@@ -49395,36 +49591,36 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49395
49591
|
}, {
|
|
49396
49592
|
key: "deletePlannerElement",
|
|
49397
49593
|
value: function () {
|
|
49398
|
-
var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
49399
|
-
var _this$
|
|
49400
|
-
var set, result, _this$
|
|
49401
|
-
return _regeneratorRuntime.wrap(function
|
|
49402
|
-
while (1) switch (
|
|
49594
|
+
var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(setId, elementId, denyElementSelectionClear) {
|
|
49595
|
+
var _this$view81, _this$view82;
|
|
49596
|
+
var set, result, _this$view83, _this$view84;
|
|
49597
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
49598
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
49403
49599
|
case 0:
|
|
49404
49600
|
set = this.sets[setId];
|
|
49405
|
-
|
|
49601
|
+
_context22.next = 3;
|
|
49406
49602
|
return setHandlerInstance.deleteElementFromSetByElemId(set, elementId, true);
|
|
49407
49603
|
case 3:
|
|
49408
|
-
result =
|
|
49604
|
+
result = _context22.sent;
|
|
49409
49605
|
this.updateConfigStructure();
|
|
49410
|
-
(_this$
|
|
49606
|
+
(_this$view81 = this.view) === null || _this$view81 === void 0 || _this$view81.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
49411
49607
|
this.updatePlannerView('DELETE_PLANNER_ELEMENT');
|
|
49412
49608
|
this.updateWebConfiguratorTitle();
|
|
49413
|
-
this.updateViewButtonsDependigOnConfigStructure();
|
|
49609
|
+
(_this$view82 = this.view) === null || _this$view82 === void 0 || _this$view82.updateViewButtonsDependigOnConfigStructure();
|
|
49414
49610
|
if (!denyElementSelectionClear) {
|
|
49415
|
-
if (result.selectElementId) (_this$
|
|
49611
|
+
if (result.selectElementId) (_this$view83 = this.view) === null || _this$view83 === void 0 || _this$view83.updateElementSelectionPlanner([result.setId], [result.selectElementId], true);else (_this$view84 = this.view) === null || _this$view84 === void 0 || _this$view84.updateElementSelectionPlanner([], [], true);
|
|
49416
49612
|
}
|
|
49417
49613
|
this.updatePriceInView();
|
|
49418
49614
|
this.checkMatchingProducts('onDelete');
|
|
49419
|
-
|
|
49615
|
+
_context22.next = 14;
|
|
49420
49616
|
return this.getFreePlacesOnGrids(undefined, 'deleteElement');
|
|
49421
49617
|
case 14:
|
|
49422
49618
|
this.plannerChangeLog('onDeletePlanner');
|
|
49423
49619
|
case 15:
|
|
49424
49620
|
case "end":
|
|
49425
|
-
return
|
|
49621
|
+
return _context22.stop();
|
|
49426
49622
|
}
|
|
49427
|
-
},
|
|
49623
|
+
}, _callee22, this);
|
|
49428
49624
|
}));
|
|
49429
49625
|
function deletePlannerElement(_x61, _x62, _x63) {
|
|
49430
49626
|
return _deletePlannerElement.apply(this, arguments);
|
|
@@ -49439,26 +49635,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49439
49635
|
}, {
|
|
49440
49636
|
key: "movePlannerElement",
|
|
49441
49637
|
value: (function () {
|
|
49442
|
-
var _movePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
49443
|
-
var _this$
|
|
49638
|
+
var _movePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(setId, elementId, curConfigKey, absoluteIndex) {
|
|
49639
|
+
var _this$view85, _this$view86;
|
|
49444
49640
|
var set;
|
|
49445
|
-
return _regeneratorRuntime.wrap(function
|
|
49446
|
-
while (1) switch (
|
|
49641
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
49642
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
49447
49643
|
case 0:
|
|
49448
49644
|
set = this.sets[setId];
|
|
49449
|
-
|
|
49645
|
+
_context23.next = 3;
|
|
49450
49646
|
return setHandlerInstance.movePlannerElement(set, elementId, absoluteIndex);
|
|
49451
49647
|
case 3:
|
|
49452
49648
|
this.updateConfigStructure();
|
|
49453
|
-
(_this$
|
|
49649
|
+
(_this$view85 = this.view) === null || _this$view85 === void 0 || _this$view85.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
49454
49650
|
this.updatePlannerView('MOVE_PLANNER_ELEMENT');
|
|
49455
49651
|
this.updatePriceInView();
|
|
49456
|
-
this.updateViewButtonsDependigOnConfigStructure();
|
|
49652
|
+
(_this$view86 = this.view) === null || _this$view86 === void 0 || _this$view86.updateViewButtonsDependigOnConfigStructure();
|
|
49457
49653
|
case 8:
|
|
49458
49654
|
case "end":
|
|
49459
|
-
return
|
|
49655
|
+
return _context23.stop();
|
|
49460
49656
|
}
|
|
49461
|
-
},
|
|
49657
|
+
}, _callee23, this);
|
|
49462
49658
|
}));
|
|
49463
49659
|
function movePlannerElement(_x64, _x65, _x66, _x67) {
|
|
49464
49660
|
return _movePlannerElement.apply(this, arguments);
|
|
@@ -49475,42 +49671,42 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49475
49671
|
}, {
|
|
49476
49672
|
key: "copyPlannerElement",
|
|
49477
49673
|
value: (function () {
|
|
49478
|
-
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
49479
|
-
var _this$
|
|
49480
|
-
var set, newSelectedArticle, newConfigStepKey, _this$
|
|
49481
|
-
return _regeneratorRuntime.wrap(function
|
|
49482
|
-
while (1) switch (
|
|
49674
|
+
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(setId, elementId, curConfigKey, copyInfo) {
|
|
49675
|
+
var _this$view87, _this$view88;
|
|
49676
|
+
var set, newSelectedArticle, newConfigStepKey, _this$view89, baseArticle;
|
|
49677
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
49678
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
49483
49679
|
case 0:
|
|
49484
49680
|
if (copyInfo) {
|
|
49485
|
-
|
|
49681
|
+
_context24.next = 2;
|
|
49486
49682
|
break;
|
|
49487
49683
|
}
|
|
49488
|
-
return
|
|
49684
|
+
return _context24.abrupt("return");
|
|
49489
49685
|
case 2:
|
|
49490
49686
|
set = this.sets[setId];
|
|
49491
|
-
|
|
49687
|
+
_context24.next = 5;
|
|
49492
49688
|
return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
|
|
49493
49689
|
case 5:
|
|
49494
|
-
newSelectedArticle =
|
|
49690
|
+
newSelectedArticle = _context24.sent;
|
|
49495
49691
|
this.updateConfigStructure();
|
|
49496
|
-
(_this$
|
|
49692
|
+
(_this$view87 = this.view) === null || _this$view87 === void 0 || _this$view87.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
49497
49693
|
this.updatePlannerView('COPY_PLANNER_ELEMENT');
|
|
49498
49694
|
this.updatePriceInView();
|
|
49499
|
-
this.updateViewButtonsDependigOnConfigStructure();
|
|
49695
|
+
(_this$view88 = this.view) === null || _this$view88 === void 0 || _this$view88.updateViewButtonsDependigOnConfigStructure();
|
|
49500
49696
|
newConfigStepKey = undefined;
|
|
49501
49697
|
if (newSelectedArticle != undefined) {
|
|
49502
49698
|
newConfigStepKey = set.configTree.getNewConfigStepKeyByBasketId(curConfigKey, newSelectedArticle.basketId);
|
|
49503
49699
|
this.loadPaletteInfos(curConfigKey, [newSelectedArticle.basketId], Object.keys(set.getDivaArticles()));
|
|
49504
49700
|
baseArticle = setHandlerInstance.getBaseParentArticleOfAccessoire(set, newSelectedArticle.basketId);
|
|
49505
|
-
(_this$
|
|
49701
|
+
(_this$view89 = this.view) === null || _this$view89 === void 0 || _this$view89.updateElementSelectionPlanner([baseArticle.setId], [baseArticle.elementId], true);
|
|
49506
49702
|
}
|
|
49507
49703
|
this.checkMatchingProducts('onCopy');
|
|
49508
|
-
return
|
|
49704
|
+
return _context24.abrupt("return", newConfigStepKey);
|
|
49509
49705
|
case 15:
|
|
49510
49706
|
case "end":
|
|
49511
|
-
return
|
|
49707
|
+
return _context24.stop();
|
|
49512
49708
|
}
|
|
49513
|
-
},
|
|
49709
|
+
}, _callee24, this);
|
|
49514
49710
|
}));
|
|
49515
49711
|
function copyPlannerElement(_x68, _x69, _x70, _x71) {
|
|
49516
49712
|
return _copyPlannerElement.apply(this, arguments);
|
|
@@ -49541,48 +49737,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49541
49737
|
}, {
|
|
49542
49738
|
key: "getFreePlacesOnGrids",
|
|
49543
49739
|
value: function () {
|
|
49544
|
-
var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
49545
|
-
var _this$
|
|
49740
|
+
var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(gridGroup, from) {
|
|
49741
|
+
var _this$view90;
|
|
49546
49742
|
var set, freeShelfGrids, plannedShelfGrids;
|
|
49547
|
-
return _regeneratorRuntime.wrap(function
|
|
49548
|
-
while (1) switch (
|
|
49743
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
49744
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
49549
49745
|
case 0:
|
|
49550
49746
|
set = this.actSet();
|
|
49551
49747
|
if (set) {
|
|
49552
|
-
|
|
49748
|
+
_context25.next = 3;
|
|
49553
49749
|
break;
|
|
49554
49750
|
}
|
|
49555
49751
|
throw new Error('getFreePlacesOnGrids: act set is not defined!');
|
|
49556
49752
|
case 3:
|
|
49557
49753
|
if (!gridGroup) {
|
|
49558
|
-
|
|
49754
|
+
_context25.next = 9;
|
|
49559
49755
|
break;
|
|
49560
49756
|
}
|
|
49561
|
-
|
|
49757
|
+
_context25.next = 6;
|
|
49562
49758
|
return setHandlerInstance.getFreeShelfGrids(set, gridGroup);
|
|
49563
49759
|
case 6:
|
|
49564
|
-
|
|
49565
|
-
|
|
49760
|
+
_context25.t0 = _context25.sent;
|
|
49761
|
+
_context25.next = 10;
|
|
49566
49762
|
break;
|
|
49567
49763
|
case 9:
|
|
49568
|
-
|
|
49764
|
+
_context25.t0 = undefined;
|
|
49569
49765
|
case 10:
|
|
49570
|
-
freeShelfGrids =
|
|
49766
|
+
freeShelfGrids = _context25.t0;
|
|
49571
49767
|
plannedShelfGrids = setHandlerInstance.getPlannedShelfGrids(set);
|
|
49572
49768
|
LOG$2.debug('update free from: ' + from, 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
|
|
49573
|
-
(_this$
|
|
49769
|
+
(_this$view90 = this.view) === null || _this$view90 === void 0 || _this$view90.updateFreePlacesOnGrids({
|
|
49574
49770
|
freeShelfGrids: freeShelfGrids,
|
|
49575
49771
|
plannedShelfGrids: plannedShelfGrids
|
|
49576
49772
|
});
|
|
49577
|
-
return
|
|
49773
|
+
return _context25.abrupt("return", {
|
|
49578
49774
|
freeShelfGrids: freeShelfGrids,
|
|
49579
49775
|
plannedShelfGrids: plannedShelfGrids
|
|
49580
49776
|
});
|
|
49581
49777
|
case 15:
|
|
49582
49778
|
case "end":
|
|
49583
|
-
return
|
|
49779
|
+
return _context25.stop();
|
|
49584
49780
|
}
|
|
49585
|
-
},
|
|
49781
|
+
}, _callee25, this);
|
|
49586
49782
|
}));
|
|
49587
49783
|
function getFreePlacesOnGrids(_x72, _x73) {
|
|
49588
49784
|
return _getFreePlacesOnGrids.apply(this, arguments);
|
|
@@ -49600,34 +49796,34 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49600
49796
|
}, {
|
|
49601
49797
|
key: "moveShelfItemToGrid",
|
|
49602
49798
|
value: function () {
|
|
49603
|
-
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
49799
|
+
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(accessoireBasketId, parentBasketId, gridName, cellIndex) {
|
|
49604
49800
|
var set, newGridId;
|
|
49605
|
-
return _regeneratorRuntime.wrap(function
|
|
49606
|
-
while (1) switch (
|
|
49801
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
49802
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
49607
49803
|
case 0:
|
|
49608
49804
|
set = this.actSet();
|
|
49609
49805
|
if (set) {
|
|
49610
|
-
|
|
49806
|
+
_context26.next = 3;
|
|
49611
49807
|
break;
|
|
49612
49808
|
}
|
|
49613
|
-
return
|
|
49809
|
+
return _context26.abrupt("return");
|
|
49614
49810
|
case 3:
|
|
49615
|
-
|
|
49811
|
+
_context26.next = 5;
|
|
49616
49812
|
return setHandlerInstance.moveShelfItemToGrid(set, accessoireBasketId, parentBasketId, gridName, cellIndex);
|
|
49617
49813
|
case 5:
|
|
49618
|
-
newGridId =
|
|
49814
|
+
newGridId = _context26.sent;
|
|
49619
49815
|
this.updatePlannerView('MOVE_SHELF_ITEM');
|
|
49620
49816
|
if (!newGridId) {
|
|
49621
|
-
|
|
49817
|
+
_context26.next = 10;
|
|
49622
49818
|
break;
|
|
49623
49819
|
}
|
|
49624
|
-
|
|
49820
|
+
_context26.next = 10;
|
|
49625
49821
|
return this.getFreePlacesOnGrids(newGridId, 'move shelf');
|
|
49626
49822
|
case 10:
|
|
49627
49823
|
case "end":
|
|
49628
|
-
return
|
|
49824
|
+
return _context26.stop();
|
|
49629
49825
|
}
|
|
49630
|
-
},
|
|
49826
|
+
}, _callee26, this);
|
|
49631
49827
|
}));
|
|
49632
49828
|
function moveShelfItemToGrid(_x74, _x75, _x76, _x77) {
|
|
49633
49829
|
return _moveShelfItemToGrid.apply(this, arguments);
|
|
@@ -49651,25 +49847,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49651
49847
|
}, {
|
|
49652
49848
|
key: "resetArticle",
|
|
49653
49849
|
value: function () {
|
|
49654
|
-
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
49850
|
+
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(basketId) {
|
|
49655
49851
|
var set;
|
|
49656
|
-
return _regeneratorRuntime.wrap(function
|
|
49657
|
-
while (1) switch (
|
|
49852
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
49853
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
49658
49854
|
case 0:
|
|
49659
49855
|
set = this.actSet();
|
|
49660
49856
|
if (set) {
|
|
49661
|
-
|
|
49857
|
+
_context27.next = 3;
|
|
49662
49858
|
break;
|
|
49663
49859
|
}
|
|
49664
|
-
return
|
|
49860
|
+
return _context27.abrupt("return");
|
|
49665
49861
|
case 3:
|
|
49666
|
-
|
|
49862
|
+
_context27.next = 5;
|
|
49667
49863
|
return setHandlerInstance.resetArticle(set, basketId);
|
|
49668
49864
|
case 5:
|
|
49669
49865
|
case "end":
|
|
49670
|
-
return
|
|
49866
|
+
return _context27.stop();
|
|
49671
49867
|
}
|
|
49672
|
-
},
|
|
49868
|
+
}, _callee27, this);
|
|
49673
49869
|
}));
|
|
49674
49870
|
function resetArticle(_x78) {
|
|
49675
49871
|
return _resetArticle.apply(this, arguments);
|
|
@@ -49689,22 +49885,22 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49689
49885
|
}, {
|
|
49690
49886
|
key: "changeOnFavorites",
|
|
49691
49887
|
value: function changeOnFavorites(opt, opvs, targetArticles, remove) {
|
|
49692
|
-
var _this$
|
|
49693
|
-
favoritesHandlerInstance.changeOnFavorites(this.actSet(), opt, opvs, targetArticles, remove, (_this$
|
|
49888
|
+
var _this$actions25;
|
|
49889
|
+
favoritesHandlerInstance.changeOnFavorites(this.actSet(), opt, opvs, targetArticles, remove, (_this$actions25 = this.actions) === null || _this$actions25 === void 0 ? void 0 : _this$actions25.openModal);
|
|
49694
49890
|
}
|
|
49695
49891
|
}, {
|
|
49696
49892
|
key: "setDifferentOptions",
|
|
49697
49893
|
value: function setDifferentOptions(options) {
|
|
49698
|
-
var _this$
|
|
49699
|
-
(_this$
|
|
49894
|
+
var _this$actSet9;
|
|
49895
|
+
(_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 || _this$actSet9.setDifferentOptions(options);
|
|
49700
49896
|
}
|
|
49701
49897
|
}, {
|
|
49702
49898
|
key: "checkMatchingProducts",
|
|
49703
49899
|
value: function () {
|
|
49704
|
-
var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
49900
|
+
var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(from) {
|
|
49705
49901
|
var set, _set$getMatchingProdu, _set$getMatchingOrigP, _set$getMatchingOrigP2, _set$getMatchingProdu2;
|
|
49706
|
-
return _regeneratorRuntime.wrap(function
|
|
49707
|
-
while (1) switch (
|
|
49902
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
49903
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
49708
49904
|
case 0:
|
|
49709
49905
|
set = this.actSet();
|
|
49710
49906
|
if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
@@ -49718,18 +49914,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49718
49914
|
}
|
|
49719
49915
|
}
|
|
49720
49916
|
if (!(set !== null && set !== void 0 && set.api.doCheckForProductsMatch())) {
|
|
49721
|
-
|
|
49917
|
+
_context28.next = 6;
|
|
49722
49918
|
break;
|
|
49723
49919
|
}
|
|
49724
|
-
|
|
49920
|
+
_context28.next = 5;
|
|
49725
49921
|
return productHandlerInstance.updateProducts(this.setsAsArray, this.api, this.divaBasketHandler.divaWWSHandler, from);
|
|
49726
49922
|
case 5:
|
|
49727
49923
|
this.updatePriceInView();
|
|
49728
49924
|
case 6:
|
|
49729
49925
|
case "end":
|
|
49730
|
-
return
|
|
49926
|
+
return _context28.stop();
|
|
49731
49927
|
}
|
|
49732
|
-
},
|
|
49928
|
+
}, _callee28, this);
|
|
49733
49929
|
}));
|
|
49734
49930
|
function checkMatchingProducts(_x79) {
|
|
49735
49931
|
return _checkMatchingProducts.apply(this, arguments);
|
|
@@ -49743,9 +49939,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49743
49939
|
}, {
|
|
49744
49940
|
key: "updatePriceInView",
|
|
49745
49941
|
value: function updatePriceInView() {
|
|
49746
|
-
var _this$
|
|
49747
|
-
(_this$
|
|
49748
|
-
(_this$
|
|
49942
|
+
var _this$view91, _this$view92, _this$actSet10, _this$actSet11;
|
|
49943
|
+
(_this$view91 = this.view) === null || _this$view91 === void 0 || _this$view91.updateBBox(setHandlerInstance.getBBoxObject(this.actSet()));
|
|
49944
|
+
(_this$view92 = this.view) === null || _this$view92 === void 0 || _this$view92.updatePrice(setHandlerInstance.getTotalViewPrice(this.sets), this.actSet().getViewSetPrice(), setHandlerInstance.getTotalViewBruttoPrice(this.sets), undefined, (_this$actSet10 = this.actSet()) === null || _this$actSet10 === void 0 ? void 0 : _this$actSet10.getCustomDimensionsOfActSet(), (_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 ? void 0 : _this$actSet11.setHash);
|
|
49749
49945
|
}
|
|
49750
49946
|
|
|
49751
49947
|
/**
|
|
@@ -49760,8 +49956,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49760
49956
|
}, {
|
|
49761
49957
|
key: "showModal",
|
|
49762
49958
|
value: function showModal(data) {
|
|
49763
|
-
var _this$
|
|
49764
|
-
(_this$
|
|
49959
|
+
var _this$actions26;
|
|
49960
|
+
(_this$actions26 = this.actions) === null || _this$actions26 === void 0 || _this$actions26.openModal(data);
|
|
49765
49961
|
}
|
|
49766
49962
|
}, {
|
|
49767
49963
|
key: "logGA",
|
|
@@ -49780,25 +49976,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49780
49976
|
}, {
|
|
49781
49977
|
key: "callEvent",
|
|
49782
49978
|
value: function callEvent(event, param) {
|
|
49783
|
-
var _this$
|
|
49979
|
+
var _this$actions27, _this$actions28, _this$actions29, _this$actions30;
|
|
49784
49980
|
switch (event) {
|
|
49785
49981
|
case 'onFullscreenClose':
|
|
49786
|
-
(_this$
|
|
49982
|
+
(_this$actions27 = this.actions) === null || _this$actions27 === void 0 || _this$actions27.onEvent({
|
|
49787
49983
|
type: 'onFullscreenClose'
|
|
49788
49984
|
});
|
|
49789
49985
|
break;
|
|
49790
49986
|
case 'onWebPlanerClose':
|
|
49791
|
-
(_this$
|
|
49987
|
+
(_this$actions28 = this.actions) === null || _this$actions28 === void 0 || _this$actions28.onEvent({
|
|
49792
49988
|
type: 'onWebPlanerClose'
|
|
49793
49989
|
});
|
|
49794
49990
|
break;
|
|
49795
49991
|
case 'onWebPlanerHelp':
|
|
49796
|
-
(_this$
|
|
49992
|
+
(_this$actions29 = this.actions) === null || _this$actions29 === void 0 || _this$actions29.onEvent({
|
|
49797
49993
|
type: 'onWebPlanerHelp'
|
|
49798
49994
|
});
|
|
49799
49995
|
break;
|
|
49800
49996
|
case 'onWebPlanerZoomClick':
|
|
49801
|
-
(_this$
|
|
49997
|
+
(_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.onEvent({
|
|
49802
49998
|
type: 'onWebPlanerZoomClick',
|
|
49803
49999
|
data: param
|
|
49804
50000
|
});
|
|
@@ -49808,81 +50004,81 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49808
50004
|
}, {
|
|
49809
50005
|
key: "saveToBasketWrapper",
|
|
49810
50006
|
value: function () {
|
|
49811
|
-
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
49812
|
-
var _this$
|
|
49813
|
-
_this$
|
|
49814
|
-
_this$
|
|
49815
|
-
_this$
|
|
49816
|
-
|
|
49817
|
-
_this$
|
|
50007
|
+
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(event, repairOnly, returnToParam, hideLoading) {
|
|
50008
|
+
var _this$actions31,
|
|
50009
|
+
_this$actions31$toggl,
|
|
50010
|
+
_this$actions32,
|
|
50011
|
+
_this$actions32$toggl,
|
|
50012
|
+
_this4 = this,
|
|
50013
|
+
_this$actions36,
|
|
49818
50014
|
_this$i18n18;
|
|
49819
|
-
var returnTo, finalEvent, result, _this$
|
|
49820
|
-
return _regeneratorRuntime.wrap(function
|
|
49821
|
-
while (1) switch (
|
|
50015
|
+
var returnTo, finalEvent, result, _this$actions33, _this$i18n12, _this$i18n13, _this$actions34, _this$i18n14, _this$i18n15, _this$actions35, _this$i18n16, _this$i18n17, _this$view93;
|
|
50016
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
50017
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
49822
50018
|
case 0:
|
|
49823
50019
|
returnTo = returnToParam !== null && returnToParam !== void 0 ? returnToParam : this.getReturnTo(event);
|
|
49824
50020
|
finalEvent = {
|
|
49825
50021
|
event: event,
|
|
49826
50022
|
saveBasket: true
|
|
49827
50023
|
};
|
|
49828
|
-
if (!hideLoading) (_this$
|
|
49829
|
-
|
|
50024
|
+
if (!hideLoading) (_this$actions31 = this.actions) === null || _this$actions31 === void 0 || (_this$actions31$toggl = _this$actions31.toggleLoading) === null || _this$actions31$toggl === void 0 || _this$actions31$toggl.call(_this$actions31, 'Planner_Saving', false, true);
|
|
50025
|
+
_context29.next = 5;
|
|
49830
50026
|
return this.saveToBasket(returnTo, finalEvent.event, repairOnly);
|
|
49831
50027
|
case 5:
|
|
49832
|
-
result =
|
|
49833
|
-
if (!hideLoading) (_this$
|
|
50028
|
+
result = _context29.sent;
|
|
50029
|
+
if (!hideLoading) (_this$actions32 = this.actions) === null || _this$actions32 === void 0 || (_this$actions32$toggl = _this$actions32.toggleLoading) === null || _this$actions32$toggl === void 0 || _this$actions32$toggl.call(_this$actions32, 'Planner_Saving', false, false);
|
|
49834
50030
|
if (!(result === 'canceled')) {
|
|
49835
|
-
|
|
50031
|
+
_context29.next = 11;
|
|
49836
50032
|
break;
|
|
49837
50033
|
}
|
|
49838
50034
|
LOG$2.error(new DivaError('failed to save Basket'));
|
|
49839
|
-
(_this$
|
|
50035
|
+
(_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openModal({
|
|
49840
50036
|
text: ((_this$i18n12 = this.i18n()) === null || _this$i18n12 === void 0 ? void 0 : _this$i18n12.t('modal.general_error')) + ' --- ' + DivaUtils.formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils.getCurrentTraceId() ? ((_this$i18n13 = this.i18n()) === null || _this$i18n13 === void 0 ? void 0 : _this$i18n13.t('modal.errorcode')) + ': ' + DivaUtils.getCurrentTraceId() : '',
|
|
49841
50037
|
accept: true
|
|
49842
50038
|
});
|
|
49843
|
-
return
|
|
50039
|
+
return _context29.abrupt("return", result);
|
|
49844
50040
|
case 11:
|
|
49845
|
-
|
|
49846
|
-
|
|
50041
|
+
_context29.t0 = returnTo;
|
|
50042
|
+
_context29.next = _context29.t0 === 'OPEN_PDF' ? 14 : _context29.t0 === 'SAVE_BASKET_WITH_MODAL' ? 16 : _context29.t0 === 'OPEN_CONTACT_FORM' ? 17 : 17;
|
|
49847
50043
|
break;
|
|
49848
50044
|
case 14:
|
|
49849
50045
|
if (!this.getBasket().PDFDocumentURL) {
|
|
49850
50046
|
LOG$2.error(new DivaError('PDF url is missing in basket', {
|
|
49851
50047
|
code: 'WC_0010'
|
|
49852
50048
|
}));
|
|
49853
|
-
(_this$
|
|
50049
|
+
(_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.openModal({
|
|
49854
50050
|
text: ((_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.general_error')) + ' --- ' + DivaUtils.formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils.getCurrentTraceId() ? ((_this$i18n15 = this.i18n()) === null || _this$i18n15 === void 0 ? void 0 : _this$i18n15.t('modal.errorcode')) + ': ' + DivaUtils.getCurrentTraceId() : '',
|
|
49855
50051
|
accept: true
|
|
49856
50052
|
});
|
|
49857
50053
|
} else {
|
|
49858
|
-
(_this$
|
|
50054
|
+
(_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.openModal({
|
|
49859
50055
|
text: (_this$i18n16 = this.i18n()) === null || _this$i18n16 === void 0 ? void 0 : _this$i18n16.t(this.divaBasketHandler.actBasket.Status === 'ORDER' ? 'modal.open_order_pdf_now' : 'modal.open_leaflet_pdf_now'),
|
|
49860
50056
|
accept: (_this$i18n17 = this.i18n()) === null || _this$i18n17 === void 0 ? void 0 : _this$i18n17.t('modals.open_now'),
|
|
49861
50057
|
callback: function callback() {
|
|
49862
|
-
window.open(
|
|
50058
|
+
window.open(_this4.getBasket().PDFDocumentURL, '_blank');
|
|
49863
50059
|
}
|
|
49864
50060
|
});
|
|
49865
50061
|
}
|
|
49866
|
-
return
|
|
50062
|
+
return _context29.abrupt("break", 17);
|
|
49867
50063
|
case 16:
|
|
49868
|
-
(_this$
|
|
50064
|
+
(_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.openModal({
|
|
49869
50065
|
text: (_this$i18n18 = this.i18n()) === null || _this$i18n18 === void 0 ? void 0 : _this$i18n18.t('modal.planning_saved'),
|
|
49870
50066
|
accept: true
|
|
49871
50067
|
});
|
|
49872
50068
|
case 17:
|
|
49873
50069
|
if (!(result == 'noArticleToSave')) {
|
|
49874
|
-
|
|
50070
|
+
_context29.next = 20;
|
|
49875
50071
|
break;
|
|
49876
50072
|
}
|
|
49877
|
-
(_this$
|
|
49878
|
-
return
|
|
50073
|
+
(_this$view93 = this.view) === null || _this$view93 === void 0 || _this$view93.updatePlannerMsgContainer('NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
|
|
50074
|
+
return _context29.abrupt("return", 'canceled');
|
|
49879
50075
|
case 20:
|
|
49880
|
-
return
|
|
50076
|
+
return _context29.abrupt("return", result);
|
|
49881
50077
|
case 21:
|
|
49882
50078
|
case "end":
|
|
49883
|
-
return
|
|
50079
|
+
return _context29.stop();
|
|
49884
50080
|
}
|
|
49885
|
-
},
|
|
50081
|
+
}, _callee29, this);
|
|
49886
50082
|
}));
|
|
49887
50083
|
function saveToBasketWrapper(_x80, _x81, _x82, _x83) {
|
|
49888
50084
|
return _saveToBasketWrapper.apply(this, arguments);
|
|
@@ -49892,42 +50088,42 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49892
50088
|
}, {
|
|
49893
50089
|
key: "saveToBasket",
|
|
49894
50090
|
value: function () {
|
|
49895
|
-
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
49896
|
-
var _returnTo, _returnTo2, _returnTo3, _this$
|
|
49897
|
-
var set, actBasket, oldReturnTo, result, newDivaNr, _this$
|
|
49898
|
-
return _regeneratorRuntime.wrap(function
|
|
49899
|
-
while (1) switch (
|
|
50091
|
+
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(returnTo, event, repairOnly) {
|
|
50092
|
+
var _returnTo, _returnTo2, _returnTo3, _this$actions37, _this$actions38, _this$divaBasketHandl2;
|
|
50093
|
+
var set, actBasket, oldReturnTo, result, newDivaNr, _this$actSet12, arReady, _result, product;
|
|
50094
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
50095
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
49900
50096
|
case 0:
|
|
49901
50097
|
set = this.actSet();
|
|
49902
50098
|
if (!setHandlerInstance.isNoArticleToSave(this.sets)) {
|
|
49903
|
-
|
|
50099
|
+
_context30.next = 3;
|
|
49904
50100
|
break;
|
|
49905
50101
|
}
|
|
49906
|
-
return
|
|
50102
|
+
return _context30.abrupt("return", 'noArticleToSave');
|
|
49907
50103
|
case 3:
|
|
49908
50104
|
actBasket = this.divaBasketHandler.actBasket;
|
|
49909
50105
|
if (!((_returnTo = returnTo) !== null && _returnTo !== void 0 && _returnTo.startsWith('FAVORITS') && favoritesHandlerInstance.FavoritesDefined(set))) {
|
|
49910
|
-
|
|
50106
|
+
_context30.next = 12;
|
|
49911
50107
|
break;
|
|
49912
50108
|
}
|
|
49913
50109
|
oldReturnTo = returnTo;
|
|
49914
50110
|
this.ReturnTo = returnTo.replace('FAVORITS_', '');
|
|
49915
|
-
|
|
50111
|
+
_context30.next = 9;
|
|
49916
50112
|
return this.handleFavorites('SAVE');
|
|
49917
50113
|
case 9:
|
|
49918
|
-
result =
|
|
50114
|
+
result = _context30.sent;
|
|
49919
50115
|
if (result === 'canceled') {
|
|
49920
50116
|
this.ReturnTo = oldReturnTo;
|
|
49921
50117
|
}
|
|
49922
|
-
return
|
|
50118
|
+
return _context30.abrupt("return", result);
|
|
49923
50119
|
case 12:
|
|
49924
|
-
|
|
49925
|
-
|
|
49926
|
-
|
|
50120
|
+
_context30.t0 = this.divaBasketHandler;
|
|
50121
|
+
_context30.t1 = this.divaBasketHandler.actDivaNr;
|
|
50122
|
+
_context30.next = 16;
|
|
49927
50123
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
|
|
49928
50124
|
case 16:
|
|
49929
|
-
|
|
49930
|
-
|
|
50125
|
+
_context30.t2 = _context30.sent;
|
|
50126
|
+
_context30.t0.setBasketData.call(_context30.t0, _context30.t1, _context30.t2);
|
|
49931
50127
|
if ((_returnTo2 = returnTo) !== null && _returnTo2 !== void 0 && _returnTo2.endsWith('OPEN_SELLER_BASKET')) {
|
|
49932
50128
|
this.ReturnTo = 'OPEN_SELLER_BASKET';
|
|
49933
50129
|
returnTo = this.ReturnTo;
|
|
@@ -49942,14 +50138,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49942
50138
|
this.divaBasketHandler.fillOrigConfigurations();
|
|
49943
50139
|
actBasket.Updated = Date.now();
|
|
49944
50140
|
if (!returnTo) {
|
|
49945
|
-
|
|
50141
|
+
_context30.next = 54;
|
|
49946
50142
|
break;
|
|
49947
50143
|
}
|
|
49948
|
-
|
|
49949
|
-
|
|
50144
|
+
_context30.t3 = returnTo;
|
|
50145
|
+
_context30.next = _context30.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 27 : _context30.t3 === 'OPEN_SELLER_BASKET' ? 29 : _context30.t3 === 'OPEN_PDF' ? 32 : _context30.t3 === 'SAVE_BASKET_WITH_MODAL' ? 32 : _context30.t3 === 'SAVE_BASKET' ? 32 : _context30.t3 === 'SAVE_BASKET_SYNC' ? 32 : _context30.t3 === 'SAVE_BASKET_ASYNC' ? 32 : 54;
|
|
49950
50146
|
break;
|
|
49951
50147
|
case 27:
|
|
49952
|
-
(_this$
|
|
50148
|
+
(_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.openComponent({
|
|
49953
50149
|
type: 'SELLER',
|
|
49954
50150
|
parameters: {
|
|
49955
50151
|
module: 'PCreator',
|
|
@@ -49959,12 +50155,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49959
50155
|
basketData: actBasket
|
|
49960
50156
|
}
|
|
49961
50157
|
});
|
|
49962
|
-
return
|
|
50158
|
+
return _context30.abrupt("break", 54);
|
|
49963
50159
|
case 29:
|
|
49964
50160
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
49965
50161
|
actBasket.setDocumentVersion(actBasket.getDocumentVersion() + 1);
|
|
49966
50162
|
}
|
|
49967
|
-
(_this$
|
|
50163
|
+
(_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.openComponent({
|
|
49968
50164
|
type: 'SELLER',
|
|
49969
50165
|
parameters: {
|
|
49970
50166
|
module: 'Basket',
|
|
@@ -49974,26 +50170,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49974
50170
|
basketData: actBasket
|
|
49975
50171
|
}
|
|
49976
50172
|
});
|
|
49977
|
-
return
|
|
50173
|
+
return _context30.abrupt("break", 54);
|
|
49978
50174
|
case 32:
|
|
49979
50175
|
if (!(event == 'onSaveProduct')) {
|
|
49980
|
-
|
|
50176
|
+
_context30.next = 44;
|
|
49981
50177
|
break;
|
|
49982
50178
|
}
|
|
49983
|
-
|
|
50179
|
+
_context30.next = 35;
|
|
49984
50180
|
return setHandlerInstance.flushPendingUploadsViaMediaService(actBasket);
|
|
49985
50181
|
case 35:
|
|
49986
50182
|
//copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
|
|
49987
50183
|
actBasket = new BasketData(JSON.parse(JSON.stringify(actBasket)));
|
|
49988
|
-
|
|
50184
|
+
_context30.next = 38;
|
|
49989
50185
|
return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
|
|
49990
50186
|
case 38:
|
|
49991
|
-
|
|
50187
|
+
_context30.next = 40;
|
|
49992
50188
|
return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
|
|
49993
50189
|
case 40:
|
|
49994
|
-
newDivaNr =
|
|
50190
|
+
newDivaNr = _context30.sent;
|
|
49995
50191
|
actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
|
|
49996
|
-
|
|
50192
|
+
_context30.next = 53;
|
|
49997
50193
|
break;
|
|
49998
50194
|
case 44:
|
|
49999
50195
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
@@ -50002,31 +50198,31 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50002
50198
|
}
|
|
50003
50199
|
this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
|
|
50004
50200
|
actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
|
|
50005
|
-
arReady = !!((_this$
|
|
50006
|
-
|
|
50201
|
+
arReady = !!((_this$actSet12 = this.actSet()) !== null && _this$actSet12 !== void 0 && _this$actSet12.CatalogData.divaArReady);
|
|
50202
|
+
_context30.next = 50;
|
|
50007
50203
|
return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo, arReady);
|
|
50008
50204
|
case 50:
|
|
50009
|
-
_result =
|
|
50205
|
+
_result = _context30.sent;
|
|
50010
50206
|
if (!(_result === 'ERROR_NO_BASKET_SAVED' || _result === 'ERROR_BASKET_AFTER_SAVE')) {
|
|
50011
|
-
|
|
50207
|
+
_context30.next = 53;
|
|
50012
50208
|
break;
|
|
50013
50209
|
}
|
|
50014
|
-
return
|
|
50210
|
+
return _context30.abrupt("return", 'canceled');
|
|
50015
50211
|
case 53:
|
|
50016
|
-
return
|
|
50212
|
+
return _context30.abrupt("break", 54);
|
|
50017
50213
|
case 54:
|
|
50018
50214
|
if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
|
|
50019
50215
|
actBasket = (_this$divaBasketHandl2 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl2 !== void 0 ? _this$divaBasketHandl2 : actBasket; //get pdf documenturl from saved basket
|
|
50020
|
-
|
|
50216
|
+
_context30.next = 58;
|
|
50021
50217
|
return this.addToBasket(actBasket, event);
|
|
50022
50218
|
case 58:
|
|
50023
|
-
product =
|
|
50024
|
-
return
|
|
50219
|
+
product = _context30.sent;
|
|
50220
|
+
return _context30.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
|
|
50025
50221
|
case 60:
|
|
50026
50222
|
case "end":
|
|
50027
|
-
return
|
|
50223
|
+
return _context30.stop();
|
|
50028
50224
|
}
|
|
50029
|
-
},
|
|
50225
|
+
}, _callee30, this);
|
|
50030
50226
|
}));
|
|
50031
50227
|
function saveToBasket(_x84, _x85, _x86) {
|
|
50032
50228
|
return _saveToBasket.apply(this, arguments);
|
|
@@ -50043,24 +50239,24 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50043
50239
|
}, {
|
|
50044
50240
|
key: "generateAiImageWithReferenceImages",
|
|
50045
50241
|
value: function () {
|
|
50046
|
-
var _generateAiImageWithReferenceImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
50047
|
-
var _this$
|
|
50048
|
-
return _regeneratorRuntime.wrap(function
|
|
50049
|
-
while (1) switch (
|
|
50242
|
+
var _generateAiImageWithReferenceImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31(data, leadKey) {
|
|
50243
|
+
var _this$actSet13, _this$state6, _this$actSet14;
|
|
50244
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
50245
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
50050
50246
|
case 0:
|
|
50051
|
-
(_this$
|
|
50052
|
-
|
|
50247
|
+
(_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 || _this$actSet13.CatalogData.catalogCodex;
|
|
50248
|
+
_context31.next = 3;
|
|
50053
50249
|
return this.api.generateAiImageWithReferenceImages(_objectSpread$8(_objectSpread$8({}, data), {}, {
|
|
50054
50250
|
userId: (_this$state6 = this.state) === null || _this$state6 === void 0 || (_this$state6 = _this$state6.user) === null || _this$state6 === void 0 ? void 0 : _this$state6._id,
|
|
50055
|
-
catalogCodex: (_this$
|
|
50251
|
+
catalogCodex: (_this$actSet14 = this.actSet()) === null || _this$actSet14 === void 0 ? void 0 : _this$actSet14.CatalogData.catalogCodex
|
|
50056
50252
|
}), leadKey);
|
|
50057
50253
|
case 3:
|
|
50058
|
-
return
|
|
50254
|
+
return _context31.abrupt("return", _context31.sent);
|
|
50059
50255
|
case 4:
|
|
50060
50256
|
case "end":
|
|
50061
|
-
return
|
|
50257
|
+
return _context31.stop();
|
|
50062
50258
|
}
|
|
50063
|
-
},
|
|
50259
|
+
}, _callee31, this);
|
|
50064
50260
|
}));
|
|
50065
50261
|
function generateAiImageWithReferenceImages(_x87, _x88) {
|
|
50066
50262
|
return _generateAiImageWithReferenceImages.apply(this, arguments);
|
|
@@ -50070,51 +50266,70 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50070
50266
|
}, {
|
|
50071
50267
|
key: "getUsageLimits",
|
|
50072
50268
|
value: function () {
|
|
50073
|
-
var _getUsageLimits = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
50269
|
+
var _getUsageLimits = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32() {
|
|
50074
50270
|
var _localStorage$getItem, _localStorage;
|
|
50075
50271
|
var leadKey;
|
|
50076
|
-
return _regeneratorRuntime.wrap(function
|
|
50077
|
-
while (1) switch (
|
|
50272
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
50273
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
50078
50274
|
case 0:
|
|
50079
50275
|
// Get lead key from localStorage if it exists (for anonymous users)
|
|
50080
50276
|
leadKey = (_localStorage$getItem = (_localStorage = localStorage) === null || _localStorage === void 0 ? void 0 : _localStorage.getItem('diva_lead_key')) !== null && _localStorage$getItem !== void 0 ? _localStorage$getItem : undefined;
|
|
50081
|
-
|
|
50277
|
+
_context32.next = 3;
|
|
50082
50278
|
return this.api.getUsageLimits(leadKey ? {
|
|
50083
50279
|
leadKey: leadKey
|
|
50084
50280
|
} : undefined);
|
|
50085
50281
|
case 3:
|
|
50086
|
-
return
|
|
50282
|
+
return _context32.abrupt("return", _context32.sent);
|
|
50087
50283
|
case 4:
|
|
50088
50284
|
case "end":
|
|
50089
|
-
return
|
|
50285
|
+
return _context32.stop();
|
|
50090
50286
|
}
|
|
50091
|
-
},
|
|
50287
|
+
}, _callee32, this);
|
|
50092
50288
|
}));
|
|
50093
50289
|
function getUsageLimits() {
|
|
50094
50290
|
return _getUsageLimits.apply(this, arguments);
|
|
50095
50291
|
}
|
|
50096
50292
|
return getUsageLimits;
|
|
50097
|
-
}()
|
|
50293
|
+
}() /** Base URL of the diva AI service (used by the analyzer's catalog chat). */
|
|
50294
|
+
}, {
|
|
50295
|
+
key: "getAiServiceUrl",
|
|
50296
|
+
value: function getAiServiceUrl() {
|
|
50297
|
+
return this.api.getDivaAiServiceUrl();
|
|
50298
|
+
}
|
|
50299
|
+
|
|
50300
|
+
/** Current planner JWT, for authenticating direct AI-service calls. */
|
|
50301
|
+
}, {
|
|
50302
|
+
key: "getJwt",
|
|
50303
|
+
value: function getJwt() {
|
|
50304
|
+
return this.api.getJwt();
|
|
50305
|
+
}
|
|
50306
|
+
|
|
50307
|
+
/** What the planner is currently working on (enricher package / IDM package / organization). */
|
|
50308
|
+
}, {
|
|
50309
|
+
key: "getWorkingContext",
|
|
50310
|
+
value: function getWorkingContext() {
|
|
50311
|
+
return this.api.getWorkingContext();
|
|
50312
|
+
}
|
|
50098
50313
|
}, {
|
|
50099
50314
|
key: "getAiRoomRenderings",
|
|
50100
50315
|
value: function () {
|
|
50101
|
-
var _getAiRoomRenderings = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
50316
|
+
var _getAiRoomRenderings = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33() {
|
|
50102
50317
|
var _this$state7;
|
|
50103
50318
|
var organizationId, lang;
|
|
50104
|
-
return _regeneratorRuntime.wrap(function
|
|
50105
|
-
while (1) switch (
|
|
50319
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
50320
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
50106
50321
|
case 0:
|
|
50107
50322
|
organizationId = (_this$state7 = this.state) === null || _this$state7 === void 0 ? void 0 : _this$state7.organization._id;
|
|
50108
50323
|
lang = this.api.getLanguage();
|
|
50109
|
-
|
|
50324
|
+
_context33.next = 4;
|
|
50110
50325
|
return this.api.getAiRoomRenderings(organizationId, lang !== null && lang !== void 0 ? lang : undefined);
|
|
50111
50326
|
case 4:
|
|
50112
|
-
return
|
|
50327
|
+
return _context33.abrupt("return", _context33.sent);
|
|
50113
50328
|
case 5:
|
|
50114
50329
|
case "end":
|
|
50115
|
-
return
|
|
50330
|
+
return _context33.stop();
|
|
50116
50331
|
}
|
|
50117
|
-
},
|
|
50332
|
+
}, _callee33, this);
|
|
50118
50333
|
}));
|
|
50119
50334
|
function getAiRoomRenderings() {
|
|
50120
50335
|
return _getAiRoomRenderings.apply(this, arguments);
|
|
@@ -50124,19 +50339,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50124
50339
|
}, {
|
|
50125
50340
|
key: "createLeadKey",
|
|
50126
50341
|
value: function () {
|
|
50127
|
-
var _createLeadKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
50128
|
-
return _regeneratorRuntime.wrap(function
|
|
50129
|
-
while (1) switch (
|
|
50342
|
+
var _createLeadKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(email) {
|
|
50343
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
50344
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
50130
50345
|
case 0:
|
|
50131
|
-
|
|
50346
|
+
_context34.next = 2;
|
|
50132
50347
|
return this.api.createLeadKey(email);
|
|
50133
50348
|
case 2:
|
|
50134
|
-
return
|
|
50349
|
+
return _context34.abrupt("return", _context34.sent);
|
|
50135
50350
|
case 3:
|
|
50136
50351
|
case "end":
|
|
50137
|
-
return
|
|
50352
|
+
return _context34.stop();
|
|
50138
50353
|
}
|
|
50139
|
-
},
|
|
50354
|
+
}, _callee34, this);
|
|
50140
50355
|
}));
|
|
50141
50356
|
function createLeadKey(_x89) {
|
|
50142
50357
|
return _createLeadKey.apply(this, arguments);
|
|
@@ -50146,9 +50361,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50146
50361
|
}, {
|
|
50147
50362
|
key: "showAiRoomRenderingInSummary",
|
|
50148
50363
|
value: function showAiRoomRenderingInSummary() {
|
|
50149
|
-
var _this$
|
|
50364
|
+
var _this$actSet15;
|
|
50150
50365
|
var viewConfig = this.api.getViewConfig();
|
|
50151
|
-
return (viewConfig === null || viewConfig === void 0 ? void 0 : viewConfig.showAiRoomRenderingInSummary) || (viewConfig === null || viewConfig === void 0 ? void 0 : viewConfig.showAiRoomRenderingInSummaryOnlyForCatalogsWithProperty) && ((_this$
|
|
50366
|
+
return (viewConfig === null || viewConfig === void 0 ? void 0 : viewConfig.showAiRoomRenderingInSummary) || (viewConfig === null || viewConfig === void 0 ? void 0 : viewConfig.showAiRoomRenderingInSummaryOnlyForCatalogsWithProperty) && ((_this$actSet15 = this.actSet()) === null || _this$actSet15 === void 0 ? void 0 : _this$actSet15.CatalogData.showAiRoomRenderingInSummary);
|
|
50152
50367
|
}
|
|
50153
50368
|
}, {
|
|
50154
50369
|
key: "clearAllAiImagesAsJpg",
|
|
@@ -50202,8 +50417,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50202
50417
|
var doTryOptimize = plannerType == 'CUSTOMER_OPTIMIZED_PLANNER' || plannerType == 'JUMP_OVER_PLANNER_ONLY_MOBILE' || plannerType == 'JUMP_OVER_PLANNER';
|
|
50203
50418
|
//if planner is hidden by config but nothing is planned initially
|
|
50204
50419
|
if (plannerType === 'NONE') {
|
|
50205
|
-
var _this$plannerConfig$a7, _this$
|
|
50206
|
-
if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex !== undefined && !((_this$plannerConfig$a7 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a7 !== void 0 && _this$plannerConfig$a7.length) && !this.plannerConfig.productId && !this.plannerConfig.customProductId && !this.plannerConfig.basketData && !((_this$
|
|
50420
|
+
var _this$plannerConfig$a7, _this$actSet16;
|
|
50421
|
+
if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex !== undefined && !((_this$plannerConfig$a7 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a7 !== void 0 && _this$plannerConfig$a7.length) && !this.plannerConfig.productId && !this.plannerConfig.customProductId && !this.plannerConfig.basketData && !((_this$actSet16 = this.actSet()) !== null && _this$actSet16 !== void 0 && (_this$actSet16 = _this$actSet16.CatalogData.startPlannerArticle) !== null && _this$actSet16 !== void 0 && _this$actSet16.length)) {
|
|
50207
50422
|
plannerType = 'PLANNER';
|
|
50208
50423
|
}
|
|
50209
50424
|
}
|
|
@@ -50247,38 +50462,38 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50247
50462
|
}, {
|
|
50248
50463
|
key: "getCurCatalogCodex",
|
|
50249
50464
|
value: function getCurCatalogCodex() {
|
|
50250
|
-
var _this$
|
|
50251
|
-
return (_this$
|
|
50465
|
+
var _this$actSet17;
|
|
50466
|
+
return (_this$actSet17 = this.actSet()) === null || _this$actSet17 === void 0 ? void 0 : _this$actSet17.getCatalogCodex();
|
|
50252
50467
|
}
|
|
50253
50468
|
}, {
|
|
50254
50469
|
key: "getCurCatalogName",
|
|
50255
50470
|
value: function getCurCatalogName() {
|
|
50256
|
-
var _this$
|
|
50257
|
-
return (_this$
|
|
50471
|
+
var _this$actSet18;
|
|
50472
|
+
return (_this$actSet18 = this.actSet()) === null || _this$actSet18 === void 0 ? void 0 : _this$actSet18.getCatalogName();
|
|
50258
50473
|
}
|
|
50259
50474
|
}, {
|
|
50260
50475
|
key: "getCurAccountName",
|
|
50261
50476
|
value: function getCurAccountName() {
|
|
50262
|
-
var _this$
|
|
50263
|
-
return (_this$
|
|
50477
|
+
var _this$actSet19;
|
|
50478
|
+
return (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.getAccountName();
|
|
50264
50479
|
}
|
|
50265
50480
|
}, {
|
|
50266
50481
|
key: "getCurSupplierGuid",
|
|
50267
50482
|
value: function getCurSupplierGuid() {
|
|
50268
|
-
var _this$
|
|
50269
|
-
return (_this$
|
|
50483
|
+
var _this$actSet20;
|
|
50484
|
+
return (_this$actSet20 = this.actSet()) === null || _this$actSet20 === void 0 ? void 0 : _this$actSet20.getSupplierGuid();
|
|
50270
50485
|
}
|
|
50271
50486
|
}, {
|
|
50272
50487
|
key: "getCurSetPrice",
|
|
50273
50488
|
value: function getCurSetPrice() {
|
|
50274
|
-
var _this$actSet$getSetPr, _this$
|
|
50275
|
-
return (_this$actSet$getSetPr = (_this$
|
|
50489
|
+
var _this$actSet$getSetPr, _this$actSet21;
|
|
50490
|
+
return (_this$actSet$getSetPr = (_this$actSet21 = this.actSet()) === null || _this$actSet21 === void 0 ? void 0 : _this$actSet21.getSetPrice()) !== null && _this$actSet$getSetPr !== void 0 ? _this$actSet$getSetPr : 0;
|
|
50276
50491
|
}
|
|
50277
50492
|
}, {
|
|
50278
50493
|
key: "getCurImageMode",
|
|
50279
50494
|
value: function getCurImageMode() {
|
|
50280
|
-
var _this$
|
|
50281
|
-
return (_this$
|
|
50495
|
+
var _this$actSet22;
|
|
50496
|
+
return (_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && (_this$actSet22 = _this$actSet22.CatalogData) !== null && _this$actSet22 !== void 0 && _this$actSet22.has3dModels ? '3D' : '2D';
|
|
50282
50497
|
}
|
|
50283
50498
|
}, {
|
|
50284
50499
|
key: "getViewConfig",
|
|
@@ -50314,80 +50529,80 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50314
50529
|
}, {
|
|
50315
50530
|
key: "doShow3DDimensionLines",
|
|
50316
50531
|
value: function doShow3DDimensionLines() {
|
|
50317
|
-
var _this$
|
|
50318
|
-
return (_this$
|
|
50532
|
+
var _this$actSet23;
|
|
50533
|
+
return (_this$actSet23 = this.actSet()) === null || _this$actSet23 === void 0 || (_this$actSet23 = _this$actSet23.CatalogData) === null || _this$actSet23 === void 0 ? void 0 : _this$actSet23.doShow3DDimensionLines;
|
|
50319
50534
|
}
|
|
50320
50535
|
}, {
|
|
50321
50536
|
key: "doShowMainDimensions",
|
|
50322
50537
|
value: function doShowMainDimensions() {
|
|
50323
|
-
var _this$
|
|
50324
|
-
return (_this$
|
|
50538
|
+
var _this$actSet24;
|
|
50539
|
+
return (_this$actSet24 = this.actSet()) === null || _this$actSet24 === void 0 || (_this$actSet24 = _this$actSet24.CatalogData) === null || _this$actSet24 === void 0 ? void 0 : _this$actSet24.doShowMainDimensions;
|
|
50325
50540
|
}
|
|
50326
50541
|
}, {
|
|
50327
50542
|
key: "defaultDimensionsActive",
|
|
50328
50543
|
value: function defaultDimensionsActive() {
|
|
50329
|
-
var _this$
|
|
50330
|
-
return (_this$
|
|
50544
|
+
var _this$actSet25;
|
|
50545
|
+
return (_this$actSet25 = this.actSet()) === null || _this$actSet25 === void 0 || (_this$actSet25 = _this$actSet25.CatalogData) === null || _this$actSet25 === void 0 ? void 0 : _this$actSet25.defaultDimensionsActive;
|
|
50331
50546
|
}
|
|
50332
50547
|
}, {
|
|
50333
50548
|
key: "autoOpenContentItem",
|
|
50334
50549
|
value: function autoOpenContentItem() {
|
|
50335
|
-
var _this$
|
|
50336
|
-
return (_this$
|
|
50550
|
+
var _this$actSet26;
|
|
50551
|
+
return (_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 || (_this$actSet26 = _this$actSet26.CatalogData) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.autoOpenContentItem;
|
|
50337
50552
|
}
|
|
50338
50553
|
}, {
|
|
50339
50554
|
key: "hidePlannerUiIcons",
|
|
50340
50555
|
value: function hidePlannerUiIcons() {
|
|
50341
|
-
var _this$
|
|
50342
|
-
return (_this$
|
|
50556
|
+
var _this$actSet27;
|
|
50557
|
+
return (_this$actSet27 = this.actSet()) === null || _this$actSet27 === void 0 || (_this$actSet27 = _this$actSet27.CatalogData) === null || _this$actSet27 === void 0 ? void 0 : _this$actSet27.hidePlannerUiIcons;
|
|
50343
50558
|
}
|
|
50344
50559
|
}, {
|
|
50345
50560
|
key: "getPlanner2Dot0Active",
|
|
50346
50561
|
value: function getPlanner2Dot0Active() {
|
|
50347
|
-
var _this$
|
|
50348
|
-
return (_this$
|
|
50562
|
+
var _this$actSet28;
|
|
50563
|
+
return (_this$actSet28 = this.actSet()) === null || _this$actSet28 === void 0 || (_this$actSet28 = _this$actSet28.CatalogData) === null || _this$actSet28 === void 0 ? void 0 : _this$actSet28.planner2Dot0;
|
|
50349
50564
|
}
|
|
50350
50565
|
}, {
|
|
50351
50566
|
key: "doShowPlannerReplaceMode",
|
|
50352
50567
|
value: function doShowPlannerReplaceMode() {
|
|
50353
|
-
var _this$
|
|
50354
|
-
var catalogData = (_this$
|
|
50568
|
+
var _this$actSet29, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
|
|
50569
|
+
var catalogData = (_this$actSet29 = this.actSet()) === null || _this$actSet29 === void 0 ? void 0 : _this$actSet29.CatalogData;
|
|
50355
50570
|
return (catalogData === null || catalogData === void 0 ? void 0 : catalogData.replaceModeActive) && ((_this$api$getViewConf2 = this.api.getViewConfig()) === null || _this$api$getViewConf2 === void 0 ? void 0 : _this$api$getViewConf2.showReplaceFunctionInPlanner) && Object.entries(catalogData.allCatalogPlannerArticles).length > 1 && Object.entries((_catalogData$PlannerP = (_catalogData$PlannerP2 = catalogData.PlannerPaletteViewInfo) === null || _catalogData$PlannerP2 === void 0 ? void 0 : _catalogData$PlannerP2.catalogPlannerArticles) !== null && _catalogData$PlannerP !== void 0 ? _catalogData$PlannerP : {}).length > 1;
|
|
50356
50571
|
}
|
|
50357
50572
|
}, {
|
|
50358
50573
|
key: "doPlannerReplaceAutoSwitch",
|
|
50359
50574
|
value: function doPlannerReplaceAutoSwitch() {
|
|
50360
|
-
var _this$
|
|
50361
|
-
var catalogData = (_this$
|
|
50575
|
+
var _this$actSet30, _this$api$getViewConf3;
|
|
50576
|
+
var catalogData = (_this$actSet30 = this.actSet()) === null || _this$actSet30 === void 0 ? void 0 : _this$actSet30.CatalogData;
|
|
50362
50577
|
return (catalogData === null || catalogData === void 0 ? void 0 : catalogData.catalogPlannsCompletely) && this.doShowPlannerReplaceMode() && ((_this$api$getViewConf3 = this.api.getViewConfig()) === null || _this$api$getViewConf3 === void 0 ? void 0 : _this$api$getViewConf3.allowAutoSwitchInReplaceFunctionInPlanner);
|
|
50363
50578
|
}
|
|
50364
50579
|
}, {
|
|
50365
50580
|
key: "getHidePlanner",
|
|
50366
50581
|
value: function getHidePlanner() {
|
|
50367
|
-
var _this$
|
|
50368
|
-
return this.api.getHidePlanner() || !!((_this$
|
|
50582
|
+
var _this$actSet31;
|
|
50583
|
+
return this.api.getHidePlanner() || !!((_this$actSet31 = this.actSet()) !== null && _this$actSet31 !== void 0 && _this$actSet31.CatalogData.useBoxPlanner);
|
|
50369
50584
|
}
|
|
50370
50585
|
}, {
|
|
50371
50586
|
key: "getFilterForCheckoutButtons",
|
|
50372
50587
|
value: function getFilterForCheckoutButtons() {
|
|
50373
|
-
var _this$actSet$CatalogD, _this$
|
|
50374
|
-
return (_this$actSet$CatalogD = (_this$
|
|
50588
|
+
var _this$actSet$CatalogD, _this$actSet32;
|
|
50589
|
+
return (_this$actSet$CatalogD = (_this$actSet32 = this.actSet()) === null || _this$actSet32 === void 0 ? void 0 : _this$actSet32.CatalogData.filterForCheckoutButtons) !== null && _this$actSet$CatalogD !== void 0 ? _this$actSet$CatalogD : [];
|
|
50375
50590
|
}
|
|
50376
50591
|
}, {
|
|
50377
50592
|
key: "getAllowRTV",
|
|
50378
50593
|
value: function getAllowRTV() {
|
|
50379
|
-
var _this$state9, _this$
|
|
50594
|
+
var _this$state9, _this$actSet33, _this$state10, _this$actSet34;
|
|
50380
50595
|
if (this.getEnableUnityRtvKombi()) return false;
|
|
50381
50596
|
if ((_this$state9 = this.state) !== null && _this$state9 !== void 0 && _this$state9.organization.settings.forceRTV) return true;
|
|
50382
|
-
if ((_this$
|
|
50383
|
-
if ((_this$state10 = this.state) !== null && _this$state10 !== void 0 && _this$state10.organization.settings.enableRTV && (_this$
|
|
50597
|
+
if ((_this$actSet33 = this.actSet()) !== null && _this$actSet33 !== void 0 && _this$actSet33.CatalogData.divaForceRTV) return true;
|
|
50598
|
+
if ((_this$state10 = this.state) !== null && _this$state10 !== void 0 && _this$state10.organization.settings.enableRTV && (_this$actSet34 = this.actSet()) !== null && _this$actSet34 !== void 0 && _this$actSet34.CatalogData.divaArReady) return true;
|
|
50384
50599
|
return false;
|
|
50385
50600
|
}
|
|
50386
50601
|
}, {
|
|
50387
50602
|
key: "getForceRTV",
|
|
50388
50603
|
value: function getForceRTV() {
|
|
50389
|
-
var _this$
|
|
50390
|
-
return !!((_this$
|
|
50604
|
+
var _this$actSet35;
|
|
50605
|
+
return !!((_this$actSet35 = this.actSet()) !== null && _this$actSet35 !== void 0 && _this$actSet35.CatalogData.divaForceRTV);
|
|
50391
50606
|
}
|
|
50392
50607
|
}, {
|
|
50393
50608
|
key: "getPricePreview",
|
|
@@ -50397,29 +50612,29 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50397
50612
|
}, {
|
|
50398
50613
|
key: "hide2DPlanner",
|
|
50399
50614
|
value: function hide2DPlanner() {
|
|
50400
|
-
var _this$
|
|
50401
|
-
return (_this$
|
|
50615
|
+
var _this$actSet36;
|
|
50616
|
+
return (_this$actSet36 = this.actSet()) === null || _this$actSet36 === void 0 ? void 0 : _this$actSet36.CatalogData.hide2DPlanner;
|
|
50402
50617
|
}
|
|
50403
50618
|
}, {
|
|
50404
50619
|
key: "getAllowQRCodeAR",
|
|
50405
50620
|
value: function getAllowQRCodeAR() {
|
|
50406
|
-
var _this$
|
|
50407
|
-
if (this.api.enableAR && (_this$
|
|
50621
|
+
var _this$actSet37;
|
|
50622
|
+
if (this.api.enableAR && (_this$actSet37 = this.actSet()) !== null && _this$actSet37 !== void 0 && _this$actSet37.CatalogData.divaArReady) return true;
|
|
50408
50623
|
return false;
|
|
50409
50624
|
}
|
|
50410
50625
|
}, {
|
|
50411
50626
|
key: "getEnableUnityRtvKombi",
|
|
50412
50627
|
value: function getEnableUnityRtvKombi() {
|
|
50413
|
-
var _this$
|
|
50628
|
+
var _this$actSet38, _this$actSet39;
|
|
50414
50629
|
// if force rtv disable unity kombi - biohort
|
|
50415
|
-
if ((_this$
|
|
50416
|
-
return ((_this$
|
|
50630
|
+
if ((_this$actSet38 = this.actSet()) !== null && _this$actSet38 !== void 0 && _this$actSet38.CatalogData.divaForceRTV) return false;
|
|
50631
|
+
return ((_this$actSet39 = this.actSet()) === null || _this$actSet39 === void 0 ? void 0 : _this$actSet39.CatalogData.divaArReady) == true && this.api.getEnableRTVUnityKombi();
|
|
50417
50632
|
}
|
|
50418
50633
|
}, {
|
|
50419
50634
|
key: "getShelfPlannerRTV",
|
|
50420
50635
|
value: function getShelfPlannerRTV() {
|
|
50421
|
-
var _this$
|
|
50422
|
-
return (_this$
|
|
50636
|
+
var _this$actSet40;
|
|
50637
|
+
return (_this$actSet40 = this.actSet()) === null || _this$actSet40 === void 0 ? void 0 : _this$actSet40.CatalogData.useShelfPlannerRTV;
|
|
50423
50638
|
}
|
|
50424
50639
|
}, {
|
|
50425
50640
|
key: "getBasketData",
|
|
@@ -50434,23 +50649,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50434
50649
|
}, {
|
|
50435
50650
|
key: "getBasketDataWithEkText",
|
|
50436
50651
|
value: function () {
|
|
50437
|
-
var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
50438
|
-
return _regeneratorRuntime.wrap(function
|
|
50439
|
-
while (1) switch (
|
|
50652
|
+
var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35() {
|
|
50653
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
50654
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
50440
50655
|
case 0:
|
|
50441
|
-
|
|
50442
|
-
|
|
50443
|
-
|
|
50656
|
+
_context35.t0 = this.divaBasketHandler;
|
|
50657
|
+
_context35.t1 = this.divaBasketHandler.actDivaNr;
|
|
50658
|
+
_context35.next = 4;
|
|
50444
50659
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, true, this.doAllowSetPlanner(), this.ReturnTo);
|
|
50445
50660
|
case 4:
|
|
50446
|
-
|
|
50447
|
-
|
|
50448
|
-
return
|
|
50661
|
+
_context35.t2 = _context35.sent;
|
|
50662
|
+
_context35.t0.setBasketData.call(_context35.t0, _context35.t1, _context35.t2);
|
|
50663
|
+
return _context35.abrupt("return", this.divaBasketHandler.actBasket);
|
|
50449
50664
|
case 7:
|
|
50450
50665
|
case "end":
|
|
50451
|
-
return
|
|
50666
|
+
return _context35.stop();
|
|
50452
50667
|
}
|
|
50453
|
-
},
|
|
50668
|
+
}, _callee35, this);
|
|
50454
50669
|
}));
|
|
50455
50670
|
function getBasketDataWithEkText() {
|
|
50456
50671
|
return _getBasketDataWithEkText.apply(this, arguments);
|
|
@@ -50460,8 +50675,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50460
50675
|
}, {
|
|
50461
50676
|
key: "getCatalogData",
|
|
50462
50677
|
value: function getCatalogData() {
|
|
50463
|
-
var _this$
|
|
50464
|
-
return (_this$
|
|
50678
|
+
var _this$actSet41;
|
|
50679
|
+
return (_this$actSet41 = this.actSet()) === null || _this$actSet41 === void 0 ? void 0 : _this$actSet41.CatalogData;
|
|
50465
50680
|
}
|
|
50466
50681
|
}, {
|
|
50467
50682
|
key: "ReturnTo",
|
|
@@ -50476,18 +50691,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50476
50691
|
}, {
|
|
50477
50692
|
key: "addToBasket",
|
|
50478
50693
|
value: function () {
|
|
50479
|
-
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
50480
|
-
var _this$
|
|
50481
|
-
_this$actions37,
|
|
50482
|
-
_this$actions38,
|
|
50483
|
-
_this$actions39,
|
|
50694
|
+
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee36(actBasket) {
|
|
50695
|
+
var _this$actions39,
|
|
50484
50696
|
_this$actions40,
|
|
50485
|
-
_this$divaBasketHandl4,
|
|
50486
|
-
_this4 = this,
|
|
50487
50697
|
_this$actions41,
|
|
50488
50698
|
_this$actions42,
|
|
50489
50699
|
_this$actions43,
|
|
50490
|
-
_this$
|
|
50700
|
+
_this$divaBasketHandl4,
|
|
50701
|
+
_this5 = this,
|
|
50702
|
+
_this$actions44,
|
|
50703
|
+
_this$actions45,
|
|
50704
|
+
_this$actions46,
|
|
50705
|
+
_this$actions47;
|
|
50491
50706
|
var event,
|
|
50492
50707
|
emailConfig,
|
|
50493
50708
|
_emailConfig$to$split,
|
|
@@ -50495,44 +50710,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50495
50710
|
to,
|
|
50496
50711
|
variants,
|
|
50497
50712
|
products,
|
|
50498
|
-
|
|
50499
|
-
return _regeneratorRuntime.wrap(function
|
|
50500
|
-
while (1) switch (
|
|
50713
|
+
_args36 = arguments;
|
|
50714
|
+
return _regeneratorRuntime.wrap(function _callee36$(_context36) {
|
|
50715
|
+
while (1) switch (_context36.prev = _context36.next) {
|
|
50501
50716
|
case 0:
|
|
50502
|
-
event =
|
|
50503
|
-
|
|
50504
|
-
|
|
50717
|
+
event = _args36.length > 1 && _args36[1] !== undefined ? _args36[1] : 'onAddToBasket';
|
|
50718
|
+
_context36.t0 = event;
|
|
50719
|
+
_context36.next = _context36.t0 === 'onWebPlanerPrint' ? 4 : _context36.t0 === 'onWebPlanerSave' ? 6 : _context36.t0 === 'onWebPlanerShare' ? 8 : _context36.t0 === 'onRequestConsulation' ? 10 : _context36.t0 === 'onSave' ? 12 : _context36.t0 === 'onSendEmail' ? 14 : _context36.t0 === 'onSaveProduct' ? 19 : _context36.t0 === 'dontSaveBasket' ? 26 : _context36.t0 === 'onAddToBasket' ? 26 : 28;
|
|
50505
50720
|
break;
|
|
50506
50721
|
case 4:
|
|
50507
|
-
(_this$
|
|
50722
|
+
(_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
|
|
50508
50723
|
type: 'onWebPlanerPrint',
|
|
50509
50724
|
data: actBasket.getAsJson()
|
|
50510
50725
|
});
|
|
50511
|
-
return
|
|
50726
|
+
return _context36.abrupt("break", 30);
|
|
50512
50727
|
case 6:
|
|
50513
|
-
(_this$
|
|
50728
|
+
(_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
|
|
50514
50729
|
type: 'onWebPlanerSave',
|
|
50515
50730
|
data: actBasket.getAsJson()
|
|
50516
50731
|
});
|
|
50517
|
-
return
|
|
50732
|
+
return _context36.abrupt("break", 30);
|
|
50518
50733
|
case 8:
|
|
50519
|
-
(_this$
|
|
50734
|
+
(_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
|
|
50520
50735
|
type: 'onWebPlanerShare',
|
|
50521
50736
|
data: actBasket.getAsJson()
|
|
50522
50737
|
});
|
|
50523
|
-
return
|
|
50738
|
+
return _context36.abrupt("break", 30);
|
|
50524
50739
|
case 10:
|
|
50525
|
-
(_this$
|
|
50740
|
+
(_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
|
|
50526
50741
|
type: 'onRequestConsulation',
|
|
50527
50742
|
data: actBasket.getAsJson()
|
|
50528
50743
|
});
|
|
50529
|
-
return
|
|
50744
|
+
return _context36.abrupt("break", 30);
|
|
50530
50745
|
case 12:
|
|
50531
|
-
(_this$
|
|
50746
|
+
(_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
|
|
50532
50747
|
type: 'onSave',
|
|
50533
50748
|
data: actBasket.getAsJson()
|
|
50534
50749
|
});
|
|
50535
|
-
return
|
|
50750
|
+
return _context36.abrupt("break", 30);
|
|
50536
50751
|
case 14:
|
|
50537
50752
|
emailConfig = (_this$divaBasketHandl4 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : this.getEmailConfig(); //reset the emailConfig
|
|
50538
50753
|
this.divaBasketHandler.emailConfig = undefined;
|
|
@@ -50549,8 +50764,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50549
50764
|
})) !== null && _emailConfig$to$split !== void 0 ? _emailConfig$to$split : [''];
|
|
50550
50765
|
variants = emailConfig.variant ? emailConfig.variant.split(',') : ['DEFAULT'];
|
|
50551
50766
|
variants.forEach(function (variant, idx) {
|
|
50552
|
-
var
|
|
50553
|
-
(
|
|
50767
|
+
var _this5$actions;
|
|
50768
|
+
(_this5$actions = _this5.actions) === null || _this5$actions === void 0 || _this5$actions.sendEmail({
|
|
50554
50769
|
showDialog: emailConfig.showDialog,
|
|
50555
50770
|
callback: emailConfig.callback,
|
|
50556
50771
|
content: {
|
|
@@ -50563,45 +50778,45 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50563
50778
|
});
|
|
50564
50779
|
});
|
|
50565
50780
|
}
|
|
50566
|
-
(_this$
|
|
50781
|
+
(_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
|
|
50567
50782
|
type: 'onAddToBasket',
|
|
50568
50783
|
data: actBasket.getAsJson()
|
|
50569
50784
|
});
|
|
50570
|
-
return
|
|
50785
|
+
return _context36.abrupt("break", 30);
|
|
50571
50786
|
case 19:
|
|
50572
50787
|
this.actSet().CatalogData;
|
|
50573
|
-
|
|
50788
|
+
_context36.next = 22;
|
|
50574
50789
|
return this.api.saveAsProduct(this.sets, actBasket);
|
|
50575
50790
|
case 22:
|
|
50576
|
-
products =
|
|
50577
|
-
(_this$
|
|
50791
|
+
products = _context36.sent;
|
|
50792
|
+
(_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.onEvent({
|
|
50578
50793
|
type: 'onAddToBasket',
|
|
50579
50794
|
data: actBasket.getAsJson()
|
|
50580
50795
|
});
|
|
50581
50796
|
if (!products) {
|
|
50582
|
-
|
|
50797
|
+
_context36.next = 26;
|
|
50583
50798
|
break;
|
|
50584
50799
|
}
|
|
50585
|
-
return
|
|
50800
|
+
return _context36.abrupt("return", products[0]);
|
|
50586
50801
|
case 26:
|
|
50587
|
-
(_this$
|
|
50802
|
+
(_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.onEvent({
|
|
50588
50803
|
type: 'onAddToBasket',
|
|
50589
50804
|
data: actBasket.getAsJson()
|
|
50590
50805
|
});
|
|
50591
|
-
return
|
|
50806
|
+
return _context36.abrupt("break", 30);
|
|
50592
50807
|
case 28:
|
|
50593
|
-
(_this$
|
|
50808
|
+
(_this$actions47 = this.actions) === null || _this$actions47 === void 0 || _this$actions47.onEvent({
|
|
50594
50809
|
type: event,
|
|
50595
50810
|
data: actBasket.getAsJson()
|
|
50596
50811
|
});
|
|
50597
|
-
return
|
|
50812
|
+
return _context36.abrupt("break", 30);
|
|
50598
50813
|
case 30:
|
|
50599
|
-
return
|
|
50814
|
+
return _context36.abrupt("return");
|
|
50600
50815
|
case 31:
|
|
50601
50816
|
case "end":
|
|
50602
|
-
return
|
|
50817
|
+
return _context36.stop();
|
|
50603
50818
|
}
|
|
50604
|
-
},
|
|
50819
|
+
}, _callee36, this);
|
|
50605
50820
|
}));
|
|
50606
50821
|
function addToBasket(_x90) {
|
|
50607
50822
|
return _addToBasket.apply(this, arguments);
|
|
@@ -50611,8 +50826,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50611
50826
|
}, {
|
|
50612
50827
|
key: "openPDFpostAsEvent",
|
|
50613
50828
|
value: function openPDFpostAsEvent(mongoDBId) {
|
|
50614
|
-
var _this$
|
|
50615
|
-
(_this$
|
|
50829
|
+
var _this$actions48, _this$actions49, _this$actions50;
|
|
50830
|
+
(_this$actions48 = this.actions) === null || _this$actions48 === void 0 || _this$actions48.updateBreadcrumbs({
|
|
50616
50831
|
type: 'update',
|
|
50617
50832
|
param: {
|
|
50618
50833
|
groupId: 'SHOWROOM',
|
|
@@ -50626,7 +50841,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50626
50841
|
}
|
|
50627
50842
|
}
|
|
50628
50843
|
});
|
|
50629
|
-
(_this$
|
|
50844
|
+
(_this$actions49 = this.actions) === null || _this$actions49 === void 0 || _this$actions49.updateBreadcrumbs({
|
|
50630
50845
|
type: 'update',
|
|
50631
50846
|
param: {
|
|
50632
50847
|
groupId: 'SHOWROOM',
|
|
@@ -50640,7 +50855,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50640
50855
|
}
|
|
50641
50856
|
}
|
|
50642
50857
|
});
|
|
50643
|
-
(_this$
|
|
50858
|
+
(_this$actions50 = this.actions) === null || _this$actions50 === void 0 || _this$actions50.openComponent({
|
|
50644
50859
|
type: 'REPORT',
|
|
50645
50860
|
parameters: {
|
|
50646
50861
|
id: mongoDBId
|
|
@@ -50658,26 +50873,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50658
50873
|
}, {
|
|
50659
50874
|
key: "getCurrentBasket",
|
|
50660
50875
|
value: function () {
|
|
50661
|
-
var _getCurrentBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
50662
|
-
var _this$
|
|
50663
|
-
return _regeneratorRuntime.wrap(function
|
|
50664
|
-
while (1) switch (
|
|
50876
|
+
var _getCurrentBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee37(event, force, returnTo, dontGoToSummary, hideLoading) {
|
|
50877
|
+
var _this$actSet42, _this$divaBasketHandl5, _this$view94;
|
|
50878
|
+
return _regeneratorRuntime.wrap(function _callee37$(_context37) {
|
|
50879
|
+
while (1) switch (_context37.prev = _context37.next) {
|
|
50665
50880
|
case 0:
|
|
50666
|
-
if (!(this.divaBasketHandler.basketWasSavedWithCurrentDocVersion && ((_this$
|
|
50667
|
-
|
|
50881
|
+
if (!(this.divaBasketHandler.basketWasSavedWithCurrentDocVersion && ((_this$actSet42 = this.actSet()) === null || _this$actSet42 === void 0 ? void 0 : _this$actSet42.setHash) === ((_this$divaBasketHandl5 = this.divaBasketHandler.actBasket) === null || _this$divaBasketHandl5 === void 0 || (_this$divaBasketHandl5 = _this$divaBasketHandl5.OrderSets) === null || _this$divaBasketHandl5 === void 0 ? void 0 : _this$divaBasketHandl5[0].SetHash) && !(returnTo !== null && returnTo !== void 0 && returnTo.includes('OPEN')))) {
|
|
50882
|
+
_context37.next = 2;
|
|
50668
50883
|
break;
|
|
50669
50884
|
}
|
|
50670
|
-
return
|
|
50885
|
+
return _context37.abrupt("return", 'BASKET_ALREADY_SAVED');
|
|
50671
50886
|
case 2:
|
|
50672
|
-
|
|
50673
|
-
return (_this$
|
|
50887
|
+
_context37.next = 4;
|
|
50888
|
+
return (_this$view94 = this.view) === null || _this$view94 === void 0 ? void 0 : _this$view94.onClickAddToBasket(undefined, event, force, returnTo, dontGoToSummary, hideLoading);
|
|
50674
50889
|
case 4:
|
|
50675
|
-
return
|
|
50890
|
+
return _context37.abrupt("return", !!_context37.sent);
|
|
50676
50891
|
case 5:
|
|
50677
50892
|
case "end":
|
|
50678
|
-
return
|
|
50893
|
+
return _context37.stop();
|
|
50679
50894
|
}
|
|
50680
|
-
},
|
|
50895
|
+
}, _callee37, this);
|
|
50681
50896
|
}));
|
|
50682
50897
|
function getCurrentBasket(_x91, _x92, _x93, _x94, _x95) {
|
|
50683
50898
|
return _getCurrentBasket.apply(this, arguments);
|
|
@@ -50685,43 +50900,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50685
50900
|
return getCurrentBasket;
|
|
50686
50901
|
}()
|
|
50687
50902
|
/*********************************END Functions in Logik called From View END *************************************/
|
|
50688
|
-
/***********************************
|
|
50689
|
-
|
|
50690
|
-
key: "registerInitPlannerView",
|
|
50691
|
-
value: function registerInitPlannerView(initPlannerView) {
|
|
50692
|
-
this.initPlannerView = initPlannerView;
|
|
50693
|
-
}
|
|
50694
|
-
}, {
|
|
50695
|
-
key: "registerInitApiDependencies",
|
|
50696
|
-
value: function registerInitApiDependencies(initApiDependencies) {
|
|
50697
|
-
this.initViewApiDependencies = initApiDependencies;
|
|
50698
|
-
}
|
|
50903
|
+
/*********************************** View attachment (Logik -> View) ***************************************/
|
|
50904
|
+
/** True while a view is attached; false = headless (backoffice DIVA agent, artifact passes). */
|
|
50699
50905
|
}, {
|
|
50700
|
-
key: "
|
|
50701
|
-
|
|
50702
|
-
this.
|
|
50703
|
-
}
|
|
50704
|
-
}, {
|
|
50705
|
-
key: "registerInitConfiguratorMode",
|
|
50706
|
-
value: function registerInitConfiguratorMode(initConfiguratorMode) {
|
|
50707
|
-
this.initConfiguratorMode = initConfiguratorMode;
|
|
50708
|
-
}
|
|
50709
|
-
}, {
|
|
50710
|
-
key: "registerUpdateFullScreenRendering",
|
|
50711
|
-
value: function registerUpdateFullScreenRendering(updateFullscreenRendering) {
|
|
50712
|
-
this.updateFullscreenRendering = updateFullscreenRendering;
|
|
50906
|
+
key: "isViewAttached",
|
|
50907
|
+
get: function get() {
|
|
50908
|
+
return !!this.view;
|
|
50713
50909
|
}
|
|
50910
|
+
|
|
50911
|
+
/** Attach the view (initial mount or adoption of an existing, possibly headless instance). */
|
|
50714
50912
|
}, {
|
|
50715
|
-
key: "
|
|
50716
|
-
value: function
|
|
50717
|
-
this.
|
|
50913
|
+
key: "attachView",
|
|
50914
|
+
value: function attachView(view) {
|
|
50915
|
+
this.view = view;
|
|
50718
50916
|
}
|
|
50719
50917
|
|
|
50720
|
-
|
|
50918
|
+
/** Detach the view; the instance keeps working headless and can be re-attached later. */
|
|
50721
50919
|
}, {
|
|
50722
|
-
key: "
|
|
50723
|
-
value: function
|
|
50724
|
-
this.
|
|
50920
|
+
key: "detachView",
|
|
50921
|
+
value: function detachView() {
|
|
50922
|
+
this.view = undefined;
|
|
50725
50923
|
}
|
|
50726
50924
|
|
|
50727
50925
|
/** See {@link DivaPlannerHandler.strictArtifactGeneration}. Auto-propagates. */
|
|
@@ -50732,187 +50930,40 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50732
50930
|
this.strictArtifactGeneration = value;
|
|
50733
50931
|
(_this$plannerHandler4 = this.plannerHandler) === null || _this$plannerHandler4 === void 0 || (_this$plannerHandler5 = _this$plannerHandler4.setStrictArtifactGeneration) === null || _this$plannerHandler5 === void 0 || _this$plannerHandler5.call(_this$plannerHandler4, value);
|
|
50734
50932
|
}
|
|
50735
|
-
}, {
|
|
50736
|
-
key: "registerGetDoShow3DDimensionLines",
|
|
50737
|
-
value: function registerGetDoShow3DDimensionLines(getDoShow3DDimensionLines) {
|
|
50738
|
-
this.getDoShow3DDimensionLines = getDoShow3DDimensionLines;
|
|
50739
|
-
}
|
|
50740
|
-
}, {
|
|
50741
|
-
key: "registerGetCurrentAlternativRendering",
|
|
50742
|
-
value: function registerGetCurrentAlternativRendering(getCurrentAlternativRendering) {
|
|
50743
|
-
this.getCurrentAlternativRendering = getCurrentAlternativRendering;
|
|
50744
|
-
}
|
|
50745
|
-
}, {
|
|
50746
|
-
key: "registerUpdatePlanner3DImage",
|
|
50747
|
-
value: function registerUpdatePlanner3DImage(updatePlanner3DImage) {
|
|
50748
|
-
this.updatePlanner3DImage = updatePlanner3DImage;
|
|
50749
|
-
}
|
|
50750
|
-
}, {
|
|
50751
|
-
key: "registerSetRotationOrbitCube",
|
|
50752
|
-
value: function registerSetRotationOrbitCube(setRotationOrbitCube) {
|
|
50753
|
-
this.setRotationOrbitCube = setRotationOrbitCube;
|
|
50754
|
-
}
|
|
50755
|
-
}, {
|
|
50756
|
-
key: "registerGetCanvas2DAsJPG",
|
|
50757
|
-
value: function registerGetCanvas2DAsJPG(getCanvas2DAsJPG) {
|
|
50758
|
-
this.getCanvas2DAsJPG = getCanvas2DAsJPG;
|
|
50759
|
-
}
|
|
50760
|
-
}, {
|
|
50761
|
-
key: "registerUpdatePlanner2DGrid",
|
|
50762
|
-
value: function registerUpdatePlanner2DGrid(updatePlanner2DGrid) {
|
|
50763
|
-
this.updatePlanner2DGrid = updatePlanner2DGrid;
|
|
50764
|
-
}
|
|
50765
|
-
}, {
|
|
50766
|
-
key: "registerGetCurPlannerViewMode",
|
|
50767
|
-
value: function registerGetCurPlannerViewMode(getCurPlannerViewMode) {
|
|
50768
|
-
this.getCurPlannerViewMode = getCurPlannerViewMode;
|
|
50769
|
-
}
|
|
50770
|
-
}, {
|
|
50771
|
-
key: "registerGetInitPlannerViewMode",
|
|
50772
|
-
value: function registerGetInitPlannerViewMode(getInitPlannerViewMode) {
|
|
50773
|
-
this.getInitPlannerViewMode = getInitPlannerViewMode;
|
|
50774
|
-
}
|
|
50775
|
-
//Navigation
|
|
50776
|
-
}, {
|
|
50777
|
-
key: "registerNavigateToTabGroup",
|
|
50778
|
-
value: function registerNavigateToTabGroup(navigateToTabGroup) {
|
|
50779
|
-
this.navigateToTabGroup = navigateToTabGroup;
|
|
50780
|
-
}
|
|
50781
|
-
}, {
|
|
50782
|
-
key: "registerNavigateToConfigStep",
|
|
50783
|
-
value: function registerNavigateToConfigStep(navigateToConfigStep) {
|
|
50784
|
-
this.navigateToConfigStep = navigateToConfigStep;
|
|
50785
|
-
}
|
|
50786
|
-
|
|
50787
|
-
//Config Structure
|
|
50788
|
-
}, {
|
|
50789
|
-
key: "registerInitConfiguratorStructure",
|
|
50790
|
-
value: function registerInitConfiguratorStructure(initConfiguratorStructure) {
|
|
50791
|
-
this.initConfiguratorStructure = initConfiguratorStructure;
|
|
50792
|
-
}
|
|
50793
|
-
}, {
|
|
50794
|
-
key: "registerOnBasketInitialized",
|
|
50795
|
-
value: function registerOnBasketInitialized(onBasketInitialized) {
|
|
50796
|
-
this.onBasketInitialized = onBasketInitialized;
|
|
50797
|
-
}
|
|
50798
|
-
}, {
|
|
50799
|
-
key: "registerUpdateConfiguratorStructure",
|
|
50800
|
-
value: function registerUpdateConfiguratorStructure(updateConfiguratorStructure) {
|
|
50801
|
-
this.updateConfiguratorStructure = updateConfiguratorStructure;
|
|
50802
|
-
}
|
|
50803
|
-
}, {
|
|
50804
|
-
key: "registerSetWebConifguratorTitle",
|
|
50805
|
-
value: function registerSetWebConifguratorTitle(setWebConifguratorTitle) {
|
|
50806
|
-
this.setWebConifguratorTitle = setWebConifguratorTitle;
|
|
50807
|
-
}
|
|
50808
50933
|
|
|
50809
|
-
|
|
50810
|
-
|
|
50811
|
-
|
|
50812
|
-
|
|
50813
|
-
|
|
50814
|
-
}
|
|
50815
|
-
}, {
|
|
50816
|
-
key: "registerUpdateCatalogPlanner2Dot0Articles",
|
|
50817
|
-
value: function registerUpdateCatalogPlanner2Dot0Articles(updateCatalogPlanner2Dot0Articles) {
|
|
50818
|
-
this.updateCatalogPlanner2Dot0Articles = updateCatalogPlanner2Dot0Articles;
|
|
50819
|
-
}
|
|
50820
|
-
}, {
|
|
50821
|
-
key: "registerUpdateAccessoiresPalette",
|
|
50822
|
-
value: function registerUpdateAccessoiresPalette(updateAccessoiresPalette) {
|
|
50823
|
-
this.updateAccessoiresPalette = updateAccessoiresPalette;
|
|
50824
|
-
}
|
|
50825
|
-
}, {
|
|
50826
|
-
key: "registerUpdatePaletteInfos",
|
|
50827
|
-
value: function registerUpdatePaletteInfos(updatePaletteInfos) {
|
|
50828
|
-
this.updatePaletteInfos = updatePaletteInfos;
|
|
50829
|
-
}
|
|
50830
|
-
}, {
|
|
50831
|
-
key: "registerUpdateBBox",
|
|
50832
|
-
value: function registerUpdateBBox(updateBBox) {
|
|
50833
|
-
this.updateBBox = updateBBox;
|
|
50834
|
-
}
|
|
50835
|
-
}, {
|
|
50836
|
-
key: "registerUpdateElementSelectionConfig",
|
|
50837
|
-
value: function registerUpdateElementSelectionConfig(updateElementSelectionConfig) {
|
|
50838
|
-
this.updateElementSelectionConfig = updateElementSelectionConfig;
|
|
50839
|
-
}
|
|
50840
|
-
}, {
|
|
50841
|
-
key: "registerUpdateElementSelectionPlanner",
|
|
50842
|
-
value: function registerUpdateElementSelectionPlanner(updateElementSelectionPlanner, somethingChanged) {
|
|
50843
|
-
this.updateElementSelectionPlanner = updateElementSelectionPlanner;
|
|
50844
|
-
}
|
|
50845
|
-
}, {
|
|
50846
|
-
key: "registerUpdatePlannerElements",
|
|
50847
|
-
value: function registerUpdatePlannerElements(updatePlannerElements) {
|
|
50848
|
-
this.updateViewPlannerElements = updatePlannerElements;
|
|
50849
|
-
}
|
|
50850
|
-
}, {
|
|
50851
|
-
key: "registerUpdateConfigItems",
|
|
50852
|
-
value: function registerUpdateConfigItems(updateConfigItems) {
|
|
50853
|
-
this.updateConfigItems = updateConfigItems;
|
|
50854
|
-
}
|
|
50855
|
-
}, {
|
|
50856
|
-
key: "registerUpdateSummaryItems",
|
|
50857
|
-
value: function registerUpdateSummaryItems(updateSummaryItems) {
|
|
50858
|
-
this.updateSummaryItems = updateSummaryItems;
|
|
50859
|
-
}
|
|
50860
|
-
}, {
|
|
50861
|
-
key: "registerUpdateStaticRoomListItems",
|
|
50862
|
-
value: function registerUpdateStaticRoomListItems(updateStaticRoomListItems) {
|
|
50863
|
-
this.updateStaticRoomListItems = updateStaticRoomListItems;
|
|
50864
|
-
}
|
|
50865
|
-
}, {
|
|
50866
|
-
key: "registerUpdateShelfPlannerItems",
|
|
50867
|
-
value: function registerUpdateShelfPlannerItems(updateShelfPlannerItems) {
|
|
50868
|
-
this.updateShelfPlannerItems = updateShelfPlannerItems;
|
|
50869
|
-
}
|
|
50870
|
-
}, {
|
|
50871
|
-
key: "registerUpdateShelfPlannerGrids",
|
|
50872
|
-
value: function registerUpdateShelfPlannerGrids(updateFreePlacesOnGrids) {
|
|
50873
|
-
this.updateFreePlacesOnGrids = updateFreePlacesOnGrids;
|
|
50874
|
-
}
|
|
50875
|
-
}, {
|
|
50876
|
-
key: "registerUpdateDoorPlannerItems",
|
|
50877
|
-
value: function registerUpdateDoorPlannerItems(updateDoorPlannerItems) {
|
|
50878
|
-
this.updateDoorPlannerItems = updateDoorPlannerItems;
|
|
50879
|
-
}
|
|
50880
|
-
}, {
|
|
50881
|
-
key: "registerUpdatePrice",
|
|
50882
|
-
value: function registerUpdatePrice(updatePrice) {
|
|
50883
|
-
this.updatePrice = updatePrice;
|
|
50884
|
-
}
|
|
50885
|
-
}, {
|
|
50886
|
-
key: "registerUpdateViewButtonsDependigOnConfigStructure",
|
|
50887
|
-
value: function registerUpdateViewButtonsDependigOnConfigStructure(updateViewButtonsDependigOnConfigStructure) {
|
|
50888
|
-
this.updateViewButtonsDependigOnConfigStructure = updateViewButtonsDependigOnConfigStructure;
|
|
50889
|
-
}
|
|
50934
|
+
/**
|
|
50935
|
+
* Bring the view to a config step (and optionally one option value): the view does the
|
|
50936
|
+
* actual navigation/scrolling. Used by the diva agent after it drives the configuration.
|
|
50937
|
+
* No-op when headless.
|
|
50938
|
+
*/
|
|
50890
50939
|
}, {
|
|
50891
|
-
key: "
|
|
50892
|
-
value: function
|
|
50893
|
-
|
|
50940
|
+
key: "revealConfigStepInView",
|
|
50941
|
+
value: function revealConfigStepInView(configStepKey, optionValueCodex) {
|
|
50942
|
+
var _this$view95, _this$view96;
|
|
50943
|
+
(_this$view95 = this.view) === null || _this$view95 === void 0 || _this$view95.navigateToConfigStep(configStepKey, false);
|
|
50944
|
+
if (optionValueCodex) (_this$view96 = this.view) === null || _this$view96 === void 0 || _this$view96.scrollToOptionValueInView(configStepKey, optionValueCodex);
|
|
50894
50945
|
}
|
|
50895
50946
|
|
|
50896
50947
|
/***********************************Outside events the webPlanner subscribes to ******************************************/
|
|
50897
50948
|
}, {
|
|
50898
50949
|
key: "subscribeToWebPlannerEvents",
|
|
50899
50950
|
value: function subscribeToWebPlannerEvents() {
|
|
50900
|
-
var _this$
|
|
50901
|
-
(_this$
|
|
50951
|
+
var _this$actions51;
|
|
50952
|
+
(_this$actions51 = this.actions) === null || _this$actions51 === void 0 || _this$actions51.subscribeEvents(this.addToBasketEventFunction);
|
|
50902
50953
|
}
|
|
50903
50954
|
}, {
|
|
50904
50955
|
key: "unsubscribeFromWebPlannerEvents",
|
|
50905
50956
|
value: function unsubscribeFromWebPlannerEvents() {
|
|
50906
|
-
var _this$
|
|
50907
|
-
(_this$
|
|
50957
|
+
var _this$actions52;
|
|
50958
|
+
(_this$actions52 = this.actions) === null || _this$actions52 === void 0 || _this$actions52.unSubscribeEvents(this.addToBasketEventFunction);
|
|
50908
50959
|
}
|
|
50909
50960
|
}, {
|
|
50910
50961
|
key: "initApiForLogicOnly",
|
|
50911
50962
|
value: //just for testing purposes
|
|
50912
50963
|
function () {
|
|
50913
|
-
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
50914
|
-
return _regeneratorRuntime.wrap(function
|
|
50915
|
-
while (1) switch (
|
|
50964
|
+
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee38(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
|
|
50965
|
+
return _regeneratorRuntime.wrap(function _callee38$(_context38) {
|
|
50966
|
+
while (1) switch (_context38.prev = _context38.next) {
|
|
50916
50967
|
case 0:
|
|
50917
50968
|
//empty services
|
|
50918
50969
|
this.api = new DivaApiHandler(_objectSpread$8(_objectSpread$8({}, this.plannerConfig), {}, {
|
|
@@ -50925,16 +50976,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50925
50976
|
jwt: jwt,
|
|
50926
50977
|
apiKey: apiKey
|
|
50927
50978
|
}), handler);
|
|
50928
|
-
|
|
50979
|
+
_context38.next = 3;
|
|
50929
50980
|
return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
|
|
50930
50981
|
case 3:
|
|
50931
50982
|
this.plannerHandler = new DivaPlannerHandler(true);
|
|
50932
50983
|
if (this.strictArtifactGeneration) this.plannerHandler.setStrictArtifactGeneration(true);
|
|
50933
50984
|
case 5:
|
|
50934
50985
|
case "end":
|
|
50935
|
-
return
|
|
50986
|
+
return _context38.stop();
|
|
50936
50987
|
}
|
|
50937
|
-
},
|
|
50988
|
+
}, _callee38, this);
|
|
50938
50989
|
}));
|
|
50939
50990
|
function initApiForLogicOnly(_x96, _x97, _x98, _x99, _x100, _x101, _x102) {
|
|
50940
50991
|
return _initApiForLogicOnly.apply(this, arguments);
|
|
@@ -50949,16 +51000,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50949
51000
|
}, {
|
|
50950
51001
|
key: "loadBasket",
|
|
50951
51002
|
value: function () {
|
|
50952
|
-
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
50953
|
-
return _regeneratorRuntime.wrap(function
|
|
50954
|
-
while (1) switch (
|
|
51003
|
+
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee39() {
|
|
51004
|
+
return _regeneratorRuntime.wrap(function _callee39$(_context39) {
|
|
51005
|
+
while (1) switch (_context39.prev = _context39.next) {
|
|
50955
51006
|
case 0:
|
|
50956
|
-
return
|
|
51007
|
+
return _context39.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
|
|
50957
51008
|
case 1:
|
|
50958
51009
|
case "end":
|
|
50959
|
-
return
|
|
51010
|
+
return _context39.stop();
|
|
50960
51011
|
}
|
|
50961
|
-
},
|
|
51012
|
+
}, _callee39, this);
|
|
50962
51013
|
}));
|
|
50963
51014
|
function loadBasket() {
|
|
50964
51015
|
return _loadBasket.apply(this, arguments);
|
|
@@ -50973,39 +51024,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50973
51024
|
}, {
|
|
50974
51025
|
key: "initBasket",
|
|
50975
51026
|
value: function () {
|
|
50976
|
-
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
51027
|
+
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee40(init3D, ignoreFavorites) {
|
|
50977
51028
|
var initSetState, set, basket;
|
|
50978
|
-
return _regeneratorRuntime.wrap(function
|
|
50979
|
-
while (1) switch (
|
|
51029
|
+
return _regeneratorRuntime.wrap(function _callee40$(_context40) {
|
|
51030
|
+
while (1) switch (_context40.prev = _context40.next) {
|
|
50980
51031
|
case 0:
|
|
50981
51032
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
50982
51033
|
initSetState = this.getInitStateForSet(!init3D);
|
|
50983
|
-
|
|
51034
|
+
_context40.next = 4;
|
|
50984
51035
|
return this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
50985
51036
|
case 4:
|
|
50986
|
-
|
|
51037
|
+
_context40.next = 6;
|
|
50987
51038
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
50988
51039
|
case 6:
|
|
50989
51040
|
//TODO check if when basket gets repaired the product match gets called
|
|
50990
51041
|
set = this.actSet();
|
|
50991
51042
|
setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
|
|
50992
51043
|
if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
|
|
50993
|
-
|
|
51044
|
+
_context40.next = 11;
|
|
50994
51045
|
break;
|
|
50995
51046
|
}
|
|
50996
|
-
|
|
51047
|
+
_context40.next = 11;
|
|
50997
51048
|
return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
|
|
50998
51049
|
case 11:
|
|
50999
|
-
|
|
51050
|
+
_context40.next = 13;
|
|
51000
51051
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
|
|
51001
51052
|
case 13:
|
|
51002
|
-
basket =
|
|
51003
|
-
return
|
|
51053
|
+
basket = _context40.sent;
|
|
51054
|
+
return _context40.abrupt("return", basket);
|
|
51004
51055
|
case 15:
|
|
51005
51056
|
case "end":
|
|
51006
|
-
return
|
|
51057
|
+
return _context40.stop();
|
|
51007
51058
|
}
|
|
51008
|
-
},
|
|
51059
|
+
}, _callee40, this);
|
|
51009
51060
|
}));
|
|
51010
51061
|
function initBasket(_x103, _x104) {
|
|
51011
51062
|
return _initBasket.apply(this, arguments);
|
|
@@ -51015,9 +51066,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51015
51066
|
}, {
|
|
51016
51067
|
key: "getFavoriteAiRoomKeysFromSet",
|
|
51017
51068
|
value: function getFavoriteAiRoomKeysFromSet() {
|
|
51018
|
-
var _this$
|
|
51069
|
+
var _this$actSet43;
|
|
51019
51070
|
var orderSets = this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr);
|
|
51020
|
-
var actSetId = (_this$
|
|
51071
|
+
var actSetId = (_this$actSet43 = this.actSet()) === null || _this$actSet43 === void 0 ? void 0 : _this$actSet43.getSetId();
|
|
51021
51072
|
var orderSet = orderSets.find(function (os) {
|
|
51022
51073
|
return os.SetID === actSetId;
|
|
51023
51074
|
});
|
|
@@ -51044,21 +51095,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51044
51095
|
}, {
|
|
51045
51096
|
key: "getValidVariantsLength",
|
|
51046
51097
|
value: function () {
|
|
51047
|
-
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
51098
|
+
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee41() {
|
|
51048
51099
|
var set;
|
|
51049
|
-
return _regeneratorRuntime.wrap(function
|
|
51050
|
-
while (1) switch (
|
|
51100
|
+
return _regeneratorRuntime.wrap(function _callee41$(_context41) {
|
|
51101
|
+
while (1) switch (_context41.prev = _context41.next) {
|
|
51051
51102
|
case 0:
|
|
51052
51103
|
set = this.actSet();
|
|
51053
|
-
|
|
51104
|
+
_context41.next = 3;
|
|
51054
51105
|
return favoritesHandlerInstance.getValidVariants(set, true);
|
|
51055
51106
|
case 3:
|
|
51056
|
-
return
|
|
51107
|
+
return _context41.abrupt("return", _context41.sent.length);
|
|
51057
51108
|
case 4:
|
|
51058
51109
|
case "end":
|
|
51059
|
-
return
|
|
51110
|
+
return _context41.stop();
|
|
51060
51111
|
}
|
|
51061
|
-
},
|
|
51112
|
+
}, _callee41, this);
|
|
51062
51113
|
}));
|
|
51063
51114
|
function getValidVariantsLength() {
|
|
51064
51115
|
return _getValidVariantsLength.apply(this, arguments);
|
|
@@ -51068,44 +51119,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51068
51119
|
}, {
|
|
51069
51120
|
key: "handleFavorites",
|
|
51070
51121
|
value: function () {
|
|
51071
|
-
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
51072
|
-
var
|
|
51122
|
+
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee42(mode) {
|
|
51123
|
+
var _this6 = this;
|
|
51073
51124
|
var set, i;
|
|
51074
|
-
return _regeneratorRuntime.wrap(function
|
|
51075
|
-
while (1) switch (
|
|
51125
|
+
return _regeneratorRuntime.wrap(function _callee42$(_context42) {
|
|
51126
|
+
while (1) switch (_context42.prev = _context42.next) {
|
|
51076
51127
|
case 0:
|
|
51077
51128
|
set = this.actSet();
|
|
51078
51129
|
i = 0;
|
|
51079
51130
|
case 2:
|
|
51080
51131
|
if (!favoritesHandlerInstance.IsCalcForSummary) {
|
|
51081
|
-
|
|
51132
|
+
_context42.next = 11;
|
|
51082
51133
|
break;
|
|
51083
51134
|
}
|
|
51084
|
-
|
|
51135
|
+
_context42.next = 5;
|
|
51085
51136
|
return DivaUtils.Sleep(200);
|
|
51086
51137
|
case 5:
|
|
51087
51138
|
i++;
|
|
51088
51139
|
if (!(i > 1000)) {
|
|
51089
|
-
|
|
51140
|
+
_context42.next = 9;
|
|
51090
51141
|
break;
|
|
51091
51142
|
}
|
|
51092
51143
|
LOG$2.error(new DivaError('error on generating Variants of Summary'));
|
|
51093
|
-
return
|
|
51144
|
+
return _context42.abrupt("break", 11);
|
|
51094
51145
|
case 9:
|
|
51095
|
-
|
|
51146
|
+
_context42.next = 2;
|
|
51096
51147
|
break;
|
|
51097
51148
|
case 11:
|
|
51098
|
-
|
|
51149
|
+
_context42.next = 13;
|
|
51099
51150
|
return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
|
|
51100
|
-
return
|
|
51151
|
+
return _this6.update2DGrid(set);
|
|
51101
51152
|
}, this.actions);
|
|
51102
51153
|
case 13:
|
|
51103
|
-
return
|
|
51154
|
+
return _context42.abrupt("return", _context42.sent);
|
|
51104
51155
|
case 14:
|
|
51105
51156
|
case "end":
|
|
51106
|
-
return
|
|
51157
|
+
return _context42.stop();
|
|
51107
51158
|
}
|
|
51108
|
-
},
|
|
51159
|
+
}, _callee42, this);
|
|
51109
51160
|
}));
|
|
51110
51161
|
function handleFavorites(_x105) {
|
|
51111
51162
|
return _handleFavorites.apply(this, arguments);
|
|
@@ -51120,46 +51171,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51120
51171
|
}, {
|
|
51121
51172
|
key: "initSapOrderLinesFromBasket",
|
|
51122
51173
|
value: function () {
|
|
51123
|
-
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
51174
|
+
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee43(divaNr, init3D, onlyLoadOldBakset) {
|
|
51124
51175
|
var result, oldBasket, basket;
|
|
51125
|
-
return _regeneratorRuntime.wrap(function
|
|
51126
|
-
while (1) switch (
|
|
51176
|
+
return _regeneratorRuntime.wrap(function _callee43$(_context43) {
|
|
51177
|
+
while (1) switch (_context43.prev = _context43.next) {
|
|
51127
51178
|
case 0:
|
|
51128
51179
|
if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
51129
|
-
|
|
51180
|
+
_context43.next = 3;
|
|
51130
51181
|
return this.loadBasket();
|
|
51131
51182
|
case 3:
|
|
51132
|
-
result =
|
|
51183
|
+
result = _context43.sent;
|
|
51133
51184
|
if (!onlyLoadOldBakset) {
|
|
51134
|
-
|
|
51185
|
+
_context43.next = 6;
|
|
51135
51186
|
break;
|
|
51136
51187
|
}
|
|
51137
|
-
return
|
|
51188
|
+
return _context43.abrupt("return", {
|
|
51138
51189
|
oldBasket: new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
|
|
51139
51190
|
cache: {}
|
|
51140
51191
|
});
|
|
51141
51192
|
case 6:
|
|
51142
51193
|
if (!(result === false)) {
|
|
51143
|
-
|
|
51194
|
+
_context43.next = 8;
|
|
51144
51195
|
break;
|
|
51145
51196
|
}
|
|
51146
51197
|
throw new Error('Could not load basket! ' + divaNr);
|
|
51147
51198
|
case 8:
|
|
51148
51199
|
oldBasket = new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
|
|
51149
|
-
|
|
51200
|
+
_context43.next = 11;
|
|
51150
51201
|
return this.initBasket(init3D);
|
|
51151
51202
|
case 11:
|
|
51152
|
-
basket =
|
|
51153
|
-
return
|
|
51203
|
+
basket = _context43.sent;
|
|
51204
|
+
return _context43.abrupt("return", {
|
|
51154
51205
|
basket: basket,
|
|
51155
51206
|
oldBasket: oldBasket,
|
|
51156
51207
|
cache: this.api.getJsonDataCache()
|
|
51157
51208
|
});
|
|
51158
51209
|
case 13:
|
|
51159
51210
|
case "end":
|
|
51160
|
-
return
|
|
51211
|
+
return _context43.stop();
|
|
51161
51212
|
}
|
|
51162
|
-
},
|
|
51213
|
+
}, _callee43, this);
|
|
51163
51214
|
}));
|
|
51164
51215
|
function initSapOrderLinesFromBasket(_x106, _x107, _x108) {
|
|
51165
51216
|
return _initSapOrderLinesFromBasket.apply(this, arguments);
|
|
@@ -51372,45 +51423,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51372
51423
|
this.i18n = function () {
|
|
51373
51424
|
return undefined;
|
|
51374
51425
|
};
|
|
51375
|
-
this.
|
|
51376
|
-
this.initConfiguratorMode = undefined;
|
|
51377
|
-
this.initConfiguratorStructure = undefined;
|
|
51378
|
-
this.updateConfiguratorStructure = undefined;
|
|
51379
|
-
this.navigateToTabGroup = undefined;
|
|
51380
|
-
this.navigateToConfigStep = undefined;
|
|
51381
|
-
this.updateCatalogPlannerArticles = undefined;
|
|
51382
|
-
this.updateCatalogPlanner2Dot0Articles = undefined;
|
|
51383
|
-
this.updateAccessoiresPalette = undefined;
|
|
51384
|
-
this.setWebConifguratorTitle = undefined;
|
|
51385
|
-
this.onBasketInitialized = undefined;
|
|
51386
|
-
this.updateConfigItems = undefined;
|
|
51387
|
-
this.updatePaletteInfos = undefined;
|
|
51388
|
-
this.updateViewPlannerElements = undefined;
|
|
51389
|
-
this.updateElementSelectionConfig = undefined;
|
|
51390
|
-
this.updateElementSelectionPlanner = undefined;
|
|
51391
|
-
this.getCurPlannerViewMode = undefined;
|
|
51392
|
-
this.getInitPlannerViewMode = undefined;
|
|
51393
|
-
this.updatePlanner3DImage = undefined;
|
|
51394
|
-
this.setRotationOrbitCube = undefined;
|
|
51395
|
-
this.getCanvas2DAsJPG = undefined;
|
|
51396
|
-
this.updatePlannerMsgContainer = undefined;
|
|
51397
|
-
this.updateFullscreenRendering = undefined;
|
|
51398
|
-
this.updateSetImage = undefined;
|
|
51399
|
-
this.getDoShow3DDimensionLines = undefined;
|
|
51400
|
-
this.getCurrentAlternativRendering = undefined;
|
|
51401
|
-
this.updatePlanner2DGrid = undefined;
|
|
51402
|
-
this.getPlannerRenderingSize = undefined;
|
|
51403
|
-
this.updateSummaryItems = undefined;
|
|
51404
|
-
this.updateStaticRoomListItems = undefined;
|
|
51405
|
-
this.updateShelfPlannerItems = undefined;
|
|
51406
|
-
this.updateFreePlacesOnGrids = undefined;
|
|
51407
|
-
this.updateDoorPlannerItems = undefined;
|
|
51408
|
-
this.updatePrice = undefined;
|
|
51409
|
-
this.onClickAddToBasket = undefined;
|
|
51410
|
-
this.updateViewButtonsDependigOnConfigStructure = undefined;
|
|
51411
|
-
this.initViewApiDependencies = undefined;
|
|
51412
|
-
this.setHQRenderScript = undefined;
|
|
51413
|
-
this.setCamInfo = undefined;
|
|
51426
|
+
this.detachView();
|
|
51414
51427
|
}
|
|
51415
51428
|
}]);
|
|
51416
51429
|
}();
|
|
@@ -53626,6 +53639,36 @@ var Grid = /*#__PURE__*/function () {
|
|
|
53626
53639
|
set: function set(val) {
|
|
53627
53640
|
this.disabledByRule = val;
|
|
53628
53641
|
}
|
|
53642
|
+
}, {
|
|
53643
|
+
key: "HeightGridCellCountOnRule",
|
|
53644
|
+
get: function get() {
|
|
53645
|
+
return this.heightGridCellCountOnRule;
|
|
53646
|
+
}
|
|
53647
|
+
}, {
|
|
53648
|
+
key: "CurrentLoadedRuleIndex",
|
|
53649
|
+
get: function get() {
|
|
53650
|
+
return this.currentLoadedRuleIndex;
|
|
53651
|
+
}
|
|
53652
|
+
}, {
|
|
53653
|
+
key: "MaxAccessoireInGridCounter",
|
|
53654
|
+
get: function get() {
|
|
53655
|
+
return this.maxAccessoireInGridCounter;
|
|
53656
|
+
}
|
|
53657
|
+
}, {
|
|
53658
|
+
key: "ExcludeAccessoiresByAccessoiresInGrid",
|
|
53659
|
+
get: function get() {
|
|
53660
|
+
return this.excludeAccessoiresByAccessoiresInGrid;
|
|
53661
|
+
}
|
|
53662
|
+
}, {
|
|
53663
|
+
key: "InfluencedByNeighborGrids",
|
|
53664
|
+
get: function get() {
|
|
53665
|
+
return this.influencedByNeighborGrids;
|
|
53666
|
+
}
|
|
53667
|
+
}, {
|
|
53668
|
+
key: "InfluencedByOverlappingGrids",
|
|
53669
|
+
get: function get() {
|
|
53670
|
+
return this.influencedByOverlappingGrids;
|
|
53671
|
+
}
|
|
53629
53672
|
}, {
|
|
53630
53673
|
key: "DisableCellsByMeasures",
|
|
53631
53674
|
get: function get() {
|
|
@@ -53921,20 +53964,13 @@ var PlannerElementData = /*#__PURE__*/function () {
|
|
|
53921
53964
|
}, {
|
|
53922
53965
|
key: "WorldPosCenterIgnoreOLF",
|
|
53923
53966
|
get: function get() {
|
|
53924
|
-
//
|
|
53925
|
-
|
|
53926
|
-
|
|
53927
|
-
var olfW = this.planElement.olfWidth / DivaUtils.UnitRecalc;
|
|
53928
|
-
var olfD = this.planElement.olfDepth / DivaUtils.UnitRecalc;
|
|
53929
|
-
var olfCornerDir = new Vector2(-olfW / 2, -olfD / 2);
|
|
53930
|
-
olfCornerDir = Vector2.rotateOrigin(olfCornerDir, this.planElement.rotDeg);
|
|
53931
|
-
baseCorner = new Vector3(this.planElement.worldPosCenter.x + olfCornerDir.x, this.planElement.worldPosCenter.y, this.planElement.worldPosCenter.z + olfCornerDir.y);
|
|
53932
|
-
} else {
|
|
53933
|
-
baseCorner = this.WorldPosCorner;
|
|
53934
|
-
}
|
|
53967
|
+
// oltLeft/oltTop are measured from the OLF corner, so that corner is the base; without an
|
|
53968
|
+
// OLF the getter falls back to WorldPosCorner on its own.
|
|
53969
|
+
var olfCorner = this.getWorldPosCornerOLF();
|
|
53935
53970
|
var centerDir = new Vector2(this.planElement.oltLeft + this.planElement.oltWidth / 2.0, this.planElement.oltTop + this.planElement.oltDepth / 2.0);
|
|
53936
53971
|
centerDir = Vector2.rotateOrigin(centerDir, this.planElement.rotDeg);
|
|
53937
|
-
|
|
53972
|
+
var worldPosCornerIgnoreOLF = new Vector3(olfCorner.x + centerDir.x, this.WorldPosCenter.y, olfCorner.z + centerDir.y);
|
|
53973
|
+
return worldPosCornerIgnoreOLF;
|
|
53938
53974
|
}
|
|
53939
53975
|
|
|
53940
53976
|
/**
|
|
@@ -71608,7 +71644,7 @@ function runHeadlessArtifactPassBatch(_x2) {
|
|
|
71608
71644
|
}
|
|
71609
71645
|
function _runHeadlessArtifactPassBatch() {
|
|
71610
71646
|
_runHeadlessArtifactPassBatch = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(params) {
|
|
71611
|
-
var _params$lang, _params$timeoutMs
|
|
71647
|
+
var _params$lang, _params$timeoutMs;
|
|
71612
71648
|
var lang, timeoutMs, firstBasket, configState, planner, entries, connectionInitialized, _iterator, _step, product, _params$onProductFail, _loop, i;
|
|
71613
71649
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
71614
71650
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -71632,15 +71668,13 @@ function _runHeadlessArtifactPassBatch() {
|
|
|
71632
71668
|
loginMode: 'offline'
|
|
71633
71669
|
};
|
|
71634
71670
|
planner = new DivaWebPlanner(configState);
|
|
71635
|
-
planner.
|
|
71636
|
-
|
|
71637
|
-
|
|
71638
|
-
|
|
71639
|
-
};
|
|
71640
|
-
});
|
|
71671
|
+
planner.headlessRenderingSize = {
|
|
71672
|
+
imgWidth: 1920,
|
|
71673
|
+
imgHeight: 1080
|
|
71674
|
+
};
|
|
71641
71675
|
// Strict mode: fail rather than persist a basket missing its 3D image /
|
|
71642
71676
|
// HQ render script on a render-farm timeout.
|
|
71643
|
-
|
|
71677
|
+
planner.setStrictArtifactGeneration(true);
|
|
71644
71678
|
entries = [];
|
|
71645
71679
|
connectionInitialized = false;
|
|
71646
71680
|
_context4.prev = 11;
|