@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.
Files changed (52) hide show
  1. package/build/cjs/{DivaBoxPlanner-02a2dbbf.js → DivaBoxPlanner-ce0bb2af.js} +123 -44
  2. package/build/cjs/{DivaStandardPlanner-150246c0.js → DivaStandardPlanner-e664710b.js} +2 -2
  3. package/build/cjs/{DoorPlanner-ce630754.js → DoorPlanner-a37c3d62.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-b0b1fb8d.js → Host3DSignalR-a94701fa.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-c11ea7d2.js → LiviqueWWSHandler-f6488fb8.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-3c723ecc.js → PfisterWWSHandler-a0d05fa3.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-6c0324be.js → PlannerHandler2D-fe16c1ce.js} +1 -1
  8. package/build/cjs/{SeriousBasketHandler-d1ae4006.js → SeriousBasketHandler-bc18769e.js} +1 -1
  9. package/build/cjs/{ShelfPlanner-04d98f4d.js → ShelfPlanner-eab7ed23.js} +259 -148
  10. package/build/cjs/{StandardWWSHandler-9b596caf.js → StandardWWSHandler-1ad7e215.js} +1 -1
  11. package/build/cjs/{index-633196ab.js → index-b849f3ec.js} +1014 -980
  12. package/build/cjs/index.js +2 -1
  13. package/build/esm/{DivaBoxPlanner-fa9f6ec6.js → DivaBoxPlanner-f198956e.js} +123 -44
  14. package/build/esm/{DivaStandardPlanner-6c001048.js → DivaStandardPlanner-ef69c7d9.js} +2 -2
  15. package/build/esm/{DoorPlanner-ef9165f9.js → DoorPlanner-b6bbdd8f.js} +1 -1
  16. package/build/esm/{Host3DSignalR-2dc8478a.js → Host3DSignalR-c4b67bb7.js} +1 -1
  17. package/build/esm/{LiviqueWWSHandler-b6e8bf5f.js → LiviqueWWSHandler-5f62a364.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-54b3e0aa.js → PfisterWWSHandler-cf8dd909.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-0e61311d.js → PlannerHandler2D-88d7f725.js} +1 -1
  20. package/build/esm/{SeriousBasketHandler-7b097870.js → SeriousBasketHandler-5f29e886.js} +1 -1
  21. package/build/esm/{ShelfPlanner-f3e86534.js → ShelfPlanner-05d57e72.js} +259 -148
  22. package/build/esm/{StandardWWSHandler-4b0caefd.js → StandardWWSHandler-a9f0e1f8.js} +1 -1
  23. package/build/esm/{index-6c8de812.js → index-224d69f7.js} +1014 -980
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/index.d.ts +4 -2
  26. package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts +13 -0
  28. package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts +1 -0
  30. package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/logic/Article/Engine/ArticleEngine.d.ts +4 -0
  32. package/build/types/web-planner-logic/src/logic/Article/Engine/ArticleEngine.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts +12 -2
  34. package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts +20 -0
  36. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts +19 -1
  38. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +12 -0
  40. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
  41. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +95 -92
  42. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  43. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts +19 -0
  44. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts.map +1 -1
  45. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts +5 -0
  46. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts.map +1 -1
  47. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
  48. package/build/types/web-planner-logic/src/test/engineFeatureDefaults.test.d.ts +2 -0
  49. package/build/types/web-planner-logic/src/test/engineFeatureDefaults.test.d.ts.map +1 -0
  50. package/build/types/web-planner-logic/src/test/idmPlannerPaletteView.test.d.ts +2 -0
  51. package/build/types/web-planner-logic/src/test/idmPlannerPaletteView.test.d.ts.map +1 -0
  52. package/package.json +2 -2
@@ -98,6 +98,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
98
98
  _defineProperty__default["default"](this, "state", void 0);
99
99
  _defineProperty__default["default"](this, "i18n", void 0);
100
100
  _defineProperty__default["default"](this, "enricherErrorModalShown", false);
101
+ _defineProperty__default["default"](this, "suppressErrorModals", false);
101
102
  _defineProperty__default["default"](this, "getSessionGuid", void 0);
102
103
  _defineProperty__default["default"](this, "useEkPrices", false);
103
104
  _defineProperty__default["default"](this, "smSupplierNr", undefined);
@@ -111,6 +112,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
111
112
  this.apiKey = plannerConfig.apiKey;
112
113
  this.useEkPrices = !!plannerConfig.useEkPrices;
113
114
  this.smSupplierNr = plannerConfig.smSupplierNr;
115
+ this.suppressErrorModals = !!plannerConfig.suppressErrorModals;
114
116
  if (plannerConfig.settings) {
115
117
  this.initalizeWebConfigData(plannerConfig);
116
118
  } else {
@@ -272,7 +274,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
272
274
  _translate$t2,
273
275
  _translate$t3,
274
276
  _this = this;
275
- if (dontLogError || this.enricherErrorModalShown) return;
277
+ if (dontLogError || this.enricherErrorModalShown || this.suppressErrorModals) return;
276
278
  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];
277
279
  if (!services.some(function (service) {
278
280
  return service && url.startsWith(service);
@@ -1198,6 +1200,23 @@ var DivaApiHandler = /*#__PURE__*/function () {
1198
1200
  if (this.useEnricherService && !this.packageId) throw new Error('packageId as parameter not missing');
1199
1201
  return this.useEnricherService ? '/wysiwyg/' + this.packageId : this.useIDMService ? '' : '/live/' + this.organization._id;
1200
1202
  }
1203
+
1204
+ /**
1205
+ * Neutral identity of what the planner is currently working on (mirrors the `idmPrefix`
1206
+ * cascade): the enricher package in the wysiwyg usecase, the IDM package/catalog on the
1207
+ * IDM service, otherwise the live organization. Hosts that need to scope by it (e.g. the
1208
+ * AI chat) derive their own key from these facts — the engine stays unaware of that use.
1209
+ */
1210
+ }, {
1211
+ key: "getWorkingContext",
1212
+ value: function getWorkingContext() {
1213
+ var _this$organization4;
1214
+ return {
1215
+ service: this.useEnricherService ? 'enricher' : this.useIDMService ? 'idm' : 'live',
1216
+ organizationId: (_this$organization4 = this.organization) === null || _this$organization4 === void 0 ? void 0 : _this$organization4._id,
1217
+ packageId: this.packageId
1218
+ };
1219
+ }
1201
1220
  }, {
1202
1221
  key: "getIDMCatalog",
1203
1222
  value: function getIDMCatalog(catalogId) {
@@ -1741,20 +1760,20 @@ var DivaApiHandler = /*#__PURE__*/function () {
1741
1760
  }, {
1742
1761
  key: "OrganizationId",
1743
1762
  get: function get() {
1744
- var _this$organization4;
1745
- return (_this$organization4 = this.organization) === null || _this$organization4 === void 0 ? void 0 : _this$organization4._id;
1763
+ var _this$organization5;
1764
+ return (_this$organization5 = this.organization) === null || _this$organization5 === void 0 ? void 0 : _this$organization5._id;
1746
1765
  }
1747
1766
  }, {
1748
1767
  key: "enableAR",
1749
1768
  get: function get() {
1750
- var _this$organization5;
1751
- return (_this$organization5 = this.organization) === null || _this$organization5 === void 0 || (_this$organization5 = _this$organization5.settings) === null || _this$organization5 === void 0 ? void 0 : _this$organization5.enableAR;
1769
+ var _this$organization6;
1770
+ 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;
1752
1771
  }
1753
1772
  }, {
1754
1773
  key: "pricePreview",
1755
1774
  get: function get() {
1756
- var _this$organization$se3, _this$organization6, _this$getViewConfig;
1757
- return (_this$organization$se3 = (_this$organization6 = this.organization) === null || _this$organization6 === void 0 || (_this$organization6 = _this$organization6.settings) === null || _this$organization6 === void 0 ? void 0 : _this$organization6.pricePreview) !== null && _this$organization$se3 !== void 0 ? _this$organization$se3 : (_this$getViewConfig = this.getViewConfig()) === null || _this$getViewConfig === void 0 ? void 0 : _this$getViewConfig.pricePreview;
1775
+ var _this$organization$se3, _this$organization7, _this$getViewConfig;
1776
+ 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;
1758
1777
  }
1759
1778
  }, {
1760
1779
  key: "webConfig",
@@ -20656,8 +20675,11 @@ function initCatalogPlannerArticleView(catalogData, catPlanArticle, catalogProps
20656
20675
  var _catPlanArticle$filte, _catPlanArticle$group, _catPlanArticle$svgs;
20657
20676
  if (catPlanArticle.hideInPlannerStep) return;
20658
20677
  if (catalogProps.has3dModels && !catPlanArticle.modelName3D) return;
20678
+ var catalogArticle = catalogData.allCatalogArticles[catPlanArticle.codex];
20659
20679
  plannerPaletteViewInfo.catalogPlannerArticles.push({
20660
20680
  articleCodex: catPlanArticle.codex,
20681
+ contentItemId: catalogArticle === null || catalogArticle === void 0 ? void 0 : catalogArticle.contentItemId,
20682
+ groupContentItemId: catalogArticle === null || catalogArticle === void 0 ? void 0 : catalogArticle.groupContentItemId,
20661
20683
  avlFilter: catPlanArticle.avlFilter,
20662
20684
  avrFilter: catPlanArticle.avrFilter,
20663
20685
  longDescription: catPlanArticle.longDescription,
@@ -25565,6 +25587,7 @@ var IDMEngine = /*#__PURE__*/function () {
25565
25587
  _defineProperty__default["default"](this, "article", void 0);
25566
25588
  _defineProperty__default["default"](this, "decisionDebugStack", []);
25567
25589
  _defineProperty__default["default"](this, "priceDebugStack", []);
25590
+ _defineProperty__default["default"](this, "featureDefaultIndex", void 0);
25568
25591
  this.article = article;
25569
25592
  }
25570
25593
  return _createClass__default["default"](IDMEngine, [{
@@ -25651,6 +25674,7 @@ var IDMEngine = /*#__PURE__*/function () {
25651
25674
  }
25652
25675
  this.decisionDebugStack = [];
25653
25676
  var beforeSnapshot = this.article.set.logDecisions ? this.article.snapshot : undefined;
25677
+ var beforeDecisionState = this.article.set.logDecisions ? this.decisionStateSnapshot(decisions) : undefined;
25654
25678
  for (var m = 0; m < decisions.length; m++) {
25655
25679
  var startTime = Date.now();
25656
25680
  //Alle Optionen Mit DOC Type 1 ermitten - diese zunächst alle ausblenden, werden dann später über Formeln wieder eingeschaltets
@@ -25673,7 +25697,9 @@ var IDMEngine = /*#__PURE__*/function () {
25673
25697
  break;
25674
25698
  }
25675
25699
  }
25676
- beforeSnapshot = this.pushDecisionDebug(decision, beforeSnapshot);
25700
+ var pushed = this.pushDecisionDebug(decision, decisions, beforeSnapshot, beforeDecisionState);
25701
+ beforeSnapshot = pushed === null || pushed === void 0 ? void 0 : pushed.afterSnapshot;
25702
+ beforeDecisionState = pushed === null || pushed === void 0 ? void 0 : pushed.afterDecisionState;
25677
25703
  var endTime = Date.now();
25678
25704
  LOG$g.debug('decision ' + decision.decisionNo + ' time ' + (endTime - startTime));
25679
25705
  }
@@ -25684,13 +25710,40 @@ var IDMEngine = /*#__PURE__*/function () {
25684
25710
  });
25685
25711
  this.updateIDMSpecificFeatures();
25686
25712
  }
25713
+
25714
+ /** Capture the enable/disable state of all decisions (IDM debug logging only). */
25715
+ }, {
25716
+ key: "decisionStateSnapshot",
25717
+ value: function decisionStateSnapshot(decisions) {
25718
+ var ret = {};
25719
+ var _iterator3 = _createForOfIteratorHelper$b(decisions),
25720
+ _step3;
25721
+ try {
25722
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
25723
+ var _d$disableHistory;
25724
+ var d = _step3.value;
25725
+ if (d.decisionNo == null) continue;
25726
+ ret[d.decisionNo] = {
25727
+ enabled: d.enabled !== false,
25728
+ activeCombination: d.activeCombination,
25729
+ disableHistory: _toConsumableArray__default["default"]((_d$disableHistory = d.disableHistory) !== null && _d$disableHistory !== void 0 ? _d$disableHistory : [])
25730
+ };
25731
+ }
25732
+ } catch (err) {
25733
+ _iterator3.e(err);
25734
+ } finally {
25735
+ _iterator3.f();
25736
+ }
25737
+ return ret;
25738
+ }
25687
25739
  }, {
25688
25740
  key: "pushDecisionDebug",
25689
- value: function pushDecisionDebug(decision, beforeSnapshot) {
25741
+ value: function pushDecisionDebug(decision, decisions, beforeSnapshot, beforeDecisionState) {
25690
25742
  var _decision$disableHist;
25691
25743
  if (!this.article.set.logDecisions || !beforeSnapshot) return undefined;
25692
25744
  var afterSnapshot = this.article.snapshot;
25693
- this.decisionDebugStack.push({
25745
+ var afterDecisionState = this.decisionStateSnapshot(decisions);
25746
+ this.decisionDebugStack.push(_objectSpread$j({
25694
25747
  text: decision.decisionNo + ' type:' + decision.decisionType + ' ' + ((_decision$disableHist = decision.disableHistory) === null || _decision$disableHist === void 0 ? void 0 : _decision$disableHist.join(',')),
25695
25748
  nr: decision.decisionNo,
25696
25749
  decision: JSON.parse(JSON.stringify(decision)),
@@ -25698,8 +25751,16 @@ var IDMEngine = /*#__PURE__*/function () {
25698
25751
  before: beforeSnapshot,
25699
25752
  after: afterSnapshot
25700
25753
  }
25701
- });
25702
- return afterSnapshot;
25754
+ }, beforeDecisionState ? {
25755
+ decisionStates: {
25756
+ before: beforeDecisionState,
25757
+ after: afterDecisionState
25758
+ }
25759
+ } : {}));
25760
+ return {
25761
+ afterSnapshot: afterSnapshot,
25762
+ afterDecisionState: afterDecisionState
25763
+ };
25703
25764
  }
25704
25765
 
25705
25766
  /**
@@ -25747,50 +25808,50 @@ var IDMEngine = /*#__PURE__*/function () {
25747
25808
  var decisionsToEval = decisions.filter(function (decision) {
25748
25809
  return relevantDecisions.includes(decision) || controllingDecisions.includes(decision);
25749
25810
  });
25750
- var _iterator3 = _createForOfIteratorHelper$b(decisionsToEval),
25751
- _step3;
25811
+ var _iterator4 = _createForOfIteratorHelper$b(decisionsToEval),
25812
+ _step4;
25752
25813
  try {
25753
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
25754
- var decision = _step3.value;
25814
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
25815
+ var decision = _step4.value;
25755
25816
  decision.enabled = true;
25756
25817
  decision.disableHistory = [];
25757
25818
  decision.activeCombination = undefined;
25758
25819
  }
25759
25820
  } catch (err) {
25760
- _iterator3.e(err);
25821
+ _iterator4.e(err);
25761
25822
  } finally {
25762
- _iterator3.f();
25823
+ _iterator4.f();
25763
25824
  }
25764
- var _iterator4 = _createForOfIteratorHelper$b(relevantDecisions),
25765
- _step4;
25825
+ var _iterator5 = _createForOfIteratorHelper$b(relevantDecisions),
25826
+ _step5;
25766
25827
  try {
25767
- for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
25828
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
25768
25829
  var _decision$featureRefs2;
25769
- var _decision = _step4.value;
25770
- var _iterator6 = _createForOfIteratorHelper$b((_decision$featureRefs2 = _decision.featureRefs) !== null && _decision$featureRefs2 !== void 0 ? _decision$featureRefs2 : []),
25771
- _step6;
25830
+ var _decision = _step5.value;
25831
+ var _iterator7 = _createForOfIteratorHelper$b((_decision$featureRefs2 = _decision.featureRefs) !== null && _decision$featureRefs2 !== void 0 ? _decision$featureRefs2 : []),
25832
+ _step7;
25772
25833
  try {
25773
- for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
25774
- var featureNo = _step6.value;
25834
+ for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
25835
+ var featureNo = _step7.value;
25775
25836
  var ops = this.article.getArticleOptionStateFlat(featureNo);
25776
25837
  if (ops) ops.updateVisibleOptionValues(ops.option.articleOptionValues);
25777
25838
  }
25778
25839
  } catch (err) {
25779
- _iterator6.e(err);
25840
+ _iterator7.e(err);
25780
25841
  } finally {
25781
- _iterator6.f();
25842
+ _iterator7.f();
25782
25843
  }
25783
25844
  }
25784
25845
  } catch (err) {
25785
- _iterator4.e(err);
25846
+ _iterator5.e(err);
25786
25847
  } finally {
25787
- _iterator4.f();
25848
+ _iterator5.f();
25788
25849
  }
25789
- var _iterator5 = _createForOfIteratorHelper$b(decisionsToEval),
25790
- _step5;
25850
+ var _iterator6 = _createForOfIteratorHelper$b(decisionsToEval),
25851
+ _step6;
25791
25852
  try {
25792
- for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
25793
- var _decision2 = _step5.value;
25853
+ for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
25854
+ var _decision2 = _step6.value;
25794
25855
  if (!_decision2.enabled || !_decision2.optionCombinations.length) continue;
25795
25856
  switch (_decision2.decisionType) {
25796
25857
  case 2:
@@ -25805,9 +25866,9 @@ var IDMEngine = /*#__PURE__*/function () {
25805
25866
  }
25806
25867
  }
25807
25868
  } catch (err) {
25808
- _iterator5.e(err);
25869
+ _iterator6.e(err);
25809
25870
  } finally {
25810
- _iterator5.f();
25871
+ _iterator6.f();
25811
25872
  }
25812
25873
  return (_this$article$getArti = this.article.getArticleOptionStateFlat(targetFeatureNo)) === null || _this$article$getArti === void 0 ? void 0 : _this$article$getArti.visibleOptionValues;
25813
25874
  }
@@ -25947,7 +26008,7 @@ var IDMEngine = /*#__PURE__*/function () {
25947
26008
  if (_this3.article.CatalogData.useDiomexConfigLogic) {
25948
26009
  _this3.clearOP(featureNo, true);
25949
26010
  } else {
25950
- _this3.updateArtOPV(_this3.article.getDefaultOpv(ops.visibleOptionValues), featureNo, ops, undefined);
26011
+ _this3.updateArtOPV(_this3.preferredDefaultOpv(featureNo, ops.visibleOptionValues), featureNo, ops, undefined);
25951
26012
  }
25952
26013
  }
25953
26014
  doAlsoCheckFeatureNos.push(featureNo);
@@ -26030,7 +26091,7 @@ var IDMEngine = /*#__PURE__*/function () {
26030
26091
  if (_this4.article.CatalogData.useDiomexConfigLogic) {
26031
26092
  _this4.clearOP(featureNo, true);
26032
26093
  } else {
26033
- _this4.updateArtOPV(_this4.article.getDefaultOpv(ops.visibleOptionValues), featureNo, ops, undefined);
26094
+ _this4.updateArtOPV(_this4.preferredDefaultOpv(featureNo, ops.visibleOptionValues), featureNo, ops, undefined);
26034
26095
  }
26035
26096
  }
26036
26097
  } else if (p < sortedDeatureRefs.length - 1) {
@@ -26085,12 +26146,12 @@ var IDMEngine = /*#__PURE__*/function () {
26085
26146
  }, {
26086
26147
  key: "evalDisableDecision",
26087
26148
  value: function evalDisableDecision(actions, decision, allDecisions, disable) {
26088
- var _iterator7 = _createForOfIteratorHelper$b(actions),
26089
- _step7;
26149
+ var _iterator8 = _createForOfIteratorHelper$b(actions),
26150
+ _step8;
26090
26151
  try {
26091
26152
  var _loop5 = function _loop5() {
26092
26153
  var _dec$disableHistory;
26093
- var action = _step7.value;
26154
+ var action = _step8.value;
26094
26155
  var dec = allDecisions.find(function (d) {
26095
26156
  return d.decisionNo == Number(action.decisionNo);
26096
26157
  });
@@ -26101,46 +26162,46 @@ var IDMEngine = /*#__PURE__*/function () {
26101
26162
  };
26102
26163
  }
26103
26164
  dec.enabled = !disable;
26104
- (_dec$disableHistory = dec.disableHistory) === null || _dec$disableHistory === void 0 || _dec$disableHistory.push(disable ? 'disabled' : 'enabled' + ' By ' + decision.decisionNo);
26165
+ (_dec$disableHistory = dec.disableHistory) === null || _dec$disableHistory === void 0 || _dec$disableHistory.push((disable ? 'disabled' : 'enabled') + ' By ' + decision.decisionNo);
26105
26166
  },
26106
26167
  _ret;
26107
- for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
26168
+ for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
26108
26169
  _ret = _loop5();
26109
26170
  if (_ret) return _ret.v;
26110
26171
  }
26111
26172
  } catch (err) {
26112
- _iterator7.e(err);
26173
+ _iterator8.e(err);
26113
26174
  } finally {
26114
- _iterator7.f();
26175
+ _iterator8.f();
26115
26176
  }
26116
26177
  }
26117
26178
  }, {
26118
26179
  key: "evalSetFeatureVisible",
26119
26180
  value: function evalSetFeatureVisible(actions, hasSetFeatureInvisible, invisible) {
26120
- var _iterator8 = _createForOfIteratorHelper$b(actions),
26121
- _step8;
26181
+ var _iterator9 = _createForOfIteratorHelper$b(actions),
26182
+ _step9;
26122
26183
  try {
26123
- for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
26124
- var action = _step8.value;
26184
+ for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
26185
+ var action = _step9.value;
26125
26186
  if (!this.article.getArticleOptionState(action.featureNo.toString()) || !action.featureNo) continue;
26126
26187
  var ops = this.article.getArticleOptionState(action.featureNo.toString());
26127
26188
  if (invisible) hasSetFeatureInvisible[action.featureNo.toString()] = invisible;
26128
26189
  if (ops) ops.isInvisible = invisible;
26129
26190
  }
26130
26191
  } catch (err) {
26131
- _iterator8.e(err);
26192
+ _iterator9.e(err);
26132
26193
  } finally {
26133
- _iterator8.f();
26194
+ _iterator9.f();
26134
26195
  }
26135
26196
  }
26136
26197
  }, {
26137
26198
  key: "evalSetFeatureDefault",
26138
26199
  value: function evalSetFeatureDefault(actions, decision, isNull) {
26139
- var _iterator9 = _createForOfIteratorHelper$b(actions),
26140
- _step9;
26200
+ var _iterator10 = _createForOfIteratorHelper$b(actions),
26201
+ _step10;
26141
26202
  try {
26142
- for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
26143
- var action = _step9.value;
26203
+ for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
26204
+ var action = _step10.value;
26144
26205
  var ops = this.article.getArticleOptionState(action.featureNo.toString());
26145
26206
  if (ops && (isNull && ops.val === undefined || !isNull && (ops.val === undefined || !ops.valueWasSet))) {
26146
26207
  if (action.formulaRef) {
@@ -26165,22 +26226,23 @@ var IDMEngine = /*#__PURE__*/function () {
26165
26226
  break;
26166
26227
  }
26167
26228
  } catch (err) {
26168
- _iterator9.e(err);
26229
+ _iterator10.e(err);
26169
26230
  } finally {
26170
- _iterator9.f();
26231
+ _iterator10.f();
26171
26232
  }
26172
26233
  }
26173
26234
  }, {
26174
26235
  key: "evalSetFeature",
26175
26236
  value: function evalSetFeature(actions, decision, isFixed) {
26176
- var _iterator10 = _createForOfIteratorHelper$b(actions),
26177
- _step10;
26237
+ var _iterator11 = _createForOfIteratorHelper$b(actions),
26238
+ _step11;
26178
26239
  try {
26179
- for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
26240
+ for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
26180
26241
  var _action$featureNo2;
26181
- var action = _step10.value;
26242
+ var action = _step11.value;
26182
26243
  if (!this.article.getArticleOptionState((_action$featureNo2 = action.featureNo) === null || _action$featureNo2 === void 0 ? void 0 : _action$featureNo2.toString()) || !action.featureNo) {
26183
- LOG$g.warn('evalSetFeature decision ' + decision.decisionNo + ' (isFixed=' + isFixed + '): target feature ' + action.featureNo + ' has no option state on article ' + this.article.articleCodex + ' - action skipped');
26244
+ //usecase is that it want to be set on partlistarticle that is not currently loaded so its not found
26245
+ LOG$g.debug('evalSetFeature decision ' + decision.decisionNo + ' (isFixed=' + isFixed + '): target feature ' + action.featureNo + ' has no option state on article ' + this.article.articleCodex + ' - action skipped');
26184
26246
  continue;
26185
26247
  }
26186
26248
  if (action.formulaRef) {
@@ -26222,9 +26284,9 @@ var IDMEngine = /*#__PURE__*/function () {
26222
26284
  }
26223
26285
  }
26224
26286
  } catch (err) {
26225
- _iterator10.e(err);
26287
+ _iterator11.e(err);
26226
26288
  } finally {
26227
- _iterator10.f();
26289
+ _iterator11.f();
26228
26290
  }
26229
26291
  }
26230
26292
  }, {
@@ -26769,18 +26831,114 @@ var IDMEngine = /*#__PURE__*/function () {
26769
26831
  }
26770
26832
  return isValidDOC;
26771
26833
  }
26834
+ }, {
26835
+ key: "type2DefaultsByFeature",
26836
+ value: /** Prio-sorted type-2 decisions carrying a setFeatureDefault per feature; rebuilt when the decision sources change. */
26837
+ function type2DefaultsByFeature() {
26838
+ var sources = [this.article.articleIDMDecisions, this.article.initDecisions];
26839
+ var cached = this.featureDefaultIndex;
26840
+ if (cached && cached.sources[0] === sources[0] && cached.sources[1] === sources[1]) return cached.byFeature;
26841
+ var byFeature = new Map();
26842
+ var _iterator12 = _createForOfIteratorHelper$b(this.decisions),
26843
+ _step12;
26844
+ try {
26845
+ for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
26846
+ var _decision$optionCombi4;
26847
+ var decision = _step12.value;
26848
+ if (decision.decisionType !== 2) continue;
26849
+ var _iterator13 = _createForOfIteratorHelper$b((_decision$optionCombi4 = decision.optionCombinations) !== null && _decision$optionCombi4 !== void 0 ? _decision$optionCombi4 : []),
26850
+ _step13;
26851
+ try {
26852
+ for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
26853
+ var _combination$projectA6, _combination$projectA7;
26854
+ var combination = _step13.value;
26855
+ 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 : []),
26856
+ _step14;
26857
+ try {
26858
+ for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
26859
+ var _action$featureNo4, _byFeature$get;
26860
+ var action = _step14.value;
26861
+ var featureNo = (_action$featureNo4 = action.featureNo) === null || _action$featureNo4 === void 0 ? void 0 : _action$featureNo4.toString();
26862
+ if (!featureNo) continue;
26863
+ var list = (_byFeature$get = byFeature.get(featureNo)) !== null && _byFeature$get !== void 0 ? _byFeature$get : [];
26864
+ if (!list.includes(decision)) list.push(decision);
26865
+ byFeature.set(featureNo, list);
26866
+ }
26867
+ } catch (err) {
26868
+ _iterator14.e(err);
26869
+ } finally {
26870
+ _iterator14.f();
26871
+ }
26872
+ }
26873
+ } catch (err) {
26874
+ _iterator13.e(err);
26875
+ } finally {
26876
+ _iterator13.f();
26877
+ }
26878
+ }
26879
+ } catch (err) {
26880
+ _iterator12.e(err);
26881
+ } finally {
26882
+ _iterator12.f();
26883
+ }
26884
+ this.featureDefaultIndex = {
26885
+ sources: sources,
26886
+ byFeature: byFeature
26887
+ };
26888
+ return byFeature;
26889
+ }
26890
+
26891
+ /** Option key a currently-matching type-2 SET_FEATURE_DEFAULT assigns to `featureNo`, if any. */
26892
+ }, {
26893
+ key: "setFeatureDefaultKey",
26894
+ value: function setFeatureDefaultKey(featureNo) {
26895
+ var decisions = this.type2DefaultsByFeature().get(featureNo);
26896
+ if (!decisions) return undefined;
26897
+ var _iterator15 = _createForOfIteratorHelper$b(decisions),
26898
+ _step15;
26899
+ try {
26900
+ for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
26901
+ var _combination$projectA8;
26902
+ var decision = _step15.value;
26903
+ var _ref14 = this.getMatchingOptionCombination(decision.optionCombinations, decision.decisionNo),
26904
+ _ref15 = _slicedToArray__default["default"](_ref14, 1),
26905
+ combination = _ref15[0];
26906
+ 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) {
26907
+ var _a$featureNo;
26908
+ return ((_a$featureNo = a.featureNo) === null || _a$featureNo === void 0 ? void 0 : _a$featureNo.toString()) === featureNo;
26909
+ })) === null || _combination$projectA8 === void 0 || (_combination$projectA8 = _combination$projectA8.optionRef) === null || _combination$projectA8 === void 0 ? void 0 : _combination$projectA8.optionKey;
26910
+ if (key) return key;
26911
+ }
26912
+ } catch (err) {
26913
+ _iterator15.e(err);
26914
+ } finally {
26915
+ _iterator15.f();
26916
+ }
26917
+ return undefined;
26918
+ }
26919
+
26920
+ /** Authored default (when still visible) in place of getDefaultOpv's arbitrary first-visible pick. */
26921
+ }, {
26922
+ key: "preferredDefaultOpv",
26923
+ value: function preferredDefaultOpv(featureNo, visible) {
26924
+ var _ref16;
26925
+ var key = this.setFeatureDefaultKey(featureNo);
26926
+ return (_ref16 = key ? visible.get(key) : undefined) !== null && _ref16 !== void 0 ? _ref16 : this.article.getDefaultOpv(visible);
26927
+ }
26772
26928
  }, {
26773
26929
  key: "updateIDMSpecificFeatures",
26774
26930
  value: function updateIDMSpecificFeatures() {
26775
26931
  //updaten idm planner specific options
26776
- var _iterator11 = _createForOfIteratorHelper$b(this.article.articleOptionStates.values()),
26777
- _step11;
26932
+ var _iterator16 = _createForOfIteratorHelper$b(this.article.articleOptionStates.values()),
26933
+ _step16;
26778
26934
  try {
26779
- for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
26780
- var ops = _step11.value;
26935
+ for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
26936
+ var ops = _step16.value;
26781
26937
  //when an option has no decisions the first visible optionValue has to be selected per default
26782
26938
  if (ops.val === undefined && ops.visibleCount) {
26783
- this.assignOptionValue(ops.optionCodex, ops.visibleOPVKeys[0]);
26939
+ // Prefer an authored type-2 default (when visible) over the arbitrary first-visible pick.
26940
+ var key = this.setFeatureDefaultKey(ops.optionCodex);
26941
+ this.assignOptionValue(ops.optionCodex, key && ops.visibleOPVKeys.includes(key) ? key : ops.visibleOPVKeys[0]);
26784
26942
  }
26785
26943
  if (ops.visibleCount && ops.IsIDMSpecialFeature) {
26786
26944
  var _validOpv;
@@ -26798,9 +26956,9 @@ var IDMEngine = /*#__PURE__*/function () {
26798
26956
  }
26799
26957
  }
26800
26958
  } catch (err) {
26801
- _iterator11.e(err);
26959
+ _iterator16.e(err);
26802
26960
  } finally {
26803
- _iterator11.f();
26961
+ _iterator16.f();
26804
26962
  }
26805
26963
  }
26806
26964
  }, {
@@ -26821,8 +26979,8 @@ var IDMEngine = /*#__PURE__*/function () {
26821
26979
  }
26822
26980
  if ([97, 1097].includes((_myArtOPS$option$idmV3 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV3 !== void 0 ? _myArtOPS$option$idmV3 : 0)) {
26823
26981
  try {
26824
- var _ref14, _ref15, _myArtOPS$measureValu;
26825
- var newHeight = this.resolvePlannerDimension(Number((_ref14 = (_ref15 = (_myArtOPS$measureValu = myArtOPS.measureValue) !== null && _myArtOPS$measureValu !== void 0 ? _myArtOPS$measureValu : this.freeTextMeasureCm(myArtOPS)) !== null && _ref15 !== void 0 ? _ref15 : myArtOPS.value) !== null && _ref14 !== void 0 ? _ref14 : myArtOPS.valueFromName), this.article.catalogArticle.height);
26982
+ var _ref17, _ref18, _myArtOPS$measureValu;
26983
+ 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);
26826
26984
  if (newHeight != null) {
26827
26985
  this.article.doUpdatePlannerSize = true;
26828
26986
  this.article.calcHeight = newHeight;
@@ -26833,8 +26991,8 @@ var IDMEngine = /*#__PURE__*/function () {
26833
26991
  }
26834
26992
  if ([96, 1096].includes((_myArtOPS$option$idmV4 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV4 !== void 0 ? _myArtOPS$option$idmV4 : 0) || myArtOPS.option.diameter) {
26835
26993
  try {
26836
- var _ref16, _ref17, _myArtOPS$measureValu2;
26837
- var newDepth = this.resolvePlannerDimension(Number((_ref16 = (_ref17 = (_myArtOPS$measureValu2 = myArtOPS.measureValue) !== null && _myArtOPS$measureValu2 !== void 0 ? _myArtOPS$measureValu2 : this.freeTextMeasureCm(myArtOPS)) !== null && _ref17 !== void 0 ? _ref17 : myArtOPS.value) !== null && _ref16 !== void 0 ? _ref16 : myArtOPS.valueFromName), this.article.catalogArticle.depth);
26994
+ var _ref19, _ref20, _myArtOPS$measureValu2;
26995
+ 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);
26838
26996
  if (newDepth != null) {
26839
26997
  this.article.doUpdatePlannerSize = true;
26840
26998
  this.article.calcDepth = newDepth;
@@ -26845,8 +27003,8 @@ var IDMEngine = /*#__PURE__*/function () {
26845
27003
  }
26846
27004
  if ([95, 1095].includes((_myArtOPS$option$idmV5 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV5 !== void 0 ? _myArtOPS$option$idmV5 : 0) || myArtOPS.option.diameter) {
26847
27005
  try {
26848
- var _ref18, _ref19, _myArtOPS$measureValu3;
26849
- var newWidth = this.resolvePlannerDimension(Number((_ref18 = (_ref19 = (_myArtOPS$measureValu3 = myArtOPS.measureValue) !== null && _myArtOPS$measureValu3 !== void 0 ? _myArtOPS$measureValu3 : this.freeTextMeasureCm(myArtOPS)) !== null && _ref19 !== void 0 ? _ref19 : myArtOPS.value) !== null && _ref18 !== void 0 ? _ref18 : myArtOPS.valueFromName), this.article.catalogArticle.width);
27006
+ var _ref21, _ref22, _myArtOPS$measureValu3;
27007
+ 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);
26850
27008
  if (newWidth != null) {
26851
27009
  this.article.doUpdatePlannerSize = true;
26852
27010
  this.article.calcWidth = newWidth;
@@ -26872,12 +27030,12 @@ var IDMEngine = /*#__PURE__*/function () {
26872
27030
  var oc = decision.optionCombinations[j];
26873
27031
  var variantValues = {};
26874
27032
  var useVVs = true;
26875
- var _iterator12 = _createForOfIteratorHelper$b(oc.projectOptionsSetRefs),
26876
- _step12;
27033
+ var _iterator17 = _createForOfIteratorHelper$b(oc.projectOptionsSetRefs),
27034
+ _step17;
26877
27035
  try {
26878
- for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
27036
+ for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
26879
27037
  var _optionSetRef$optionL2, _optionSetRef$optionL3;
26880
- var optionSetRef = _step12.value;
27038
+ var optionSetRef = _step17.value;
26881
27039
  if (optionSetRef.featureNo.toString() == featureNo) {
26882
27040
  var _optionSetRef$optionL;
26883
27041
  if (optionKey && !((_optionSetRef$optionL = optionSetRef.optionList) !== null && _optionSetRef$optionL !== void 0 && _optionSetRef$optionL.options.includes(optionKey))) {
@@ -26888,9 +27046,9 @@ var IDMEngine = /*#__PURE__*/function () {
26888
27046
  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 : '';
26889
27047
  }
26890
27048
  } catch (err) {
26891
- _iterator12.e(err);
27049
+ _iterator17.e(err);
26892
27050
  } finally {
26893
- _iterator12.f();
27051
+ _iterator17.f();
26894
27052
  }
26895
27053
  if (useVVs && Object.keys(variantValues).length) variantValuesArr.push(variantValues);
26896
27054
  }
@@ -26973,9 +27131,9 @@ var IDMEngine = /*#__PURE__*/function () {
26973
27131
  for (var j = 0; !doUse && j < image.decisionNos.length; j++) {
26974
27132
  var decision = catalogData.getDecisionByNo(image.decisionNos[j]);
26975
27133
  if (!decision) continue;
26976
- var _ref20 = this.getMatchingOptionCombination(decision.optionCombinations, decision.decisionNo),
26977
- _ref21 = _slicedToArray__default["default"](_ref20, 1),
26978
- combination = _ref21[0];
27134
+ var _ref23 = this.getMatchingOptionCombination(decision.optionCombinations, decision.decisionNo),
27135
+ _ref24 = _slicedToArray__default["default"](_ref23, 1),
27136
+ combination = _ref24[0];
26979
27137
  if (combination) {
26980
27138
  doUse = true;
26981
27139
  break;
@@ -26994,18 +27152,18 @@ var IDMEngine = /*#__PURE__*/function () {
26994
27152
  }
26995
27153
 
26996
27154
  // this functions updates the images of OPVs that depend on rules
26997
- var _iterator13 = _createForOfIteratorHelper$b(this.article.articleOptionStates.values()),
26998
- _step13;
27155
+ var _iterator18 = _createForOfIteratorHelper$b(this.article.articleOptionStates.values()),
27156
+ _step18;
26999
27157
  try {
27000
- for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
27001
- var ops = _step13.value;
27002
- var _iterator14 = _createForOfIteratorHelper$b(ops.visibleOptionValues),
27003
- _step14;
27158
+ for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
27159
+ var ops = _step18.value;
27160
+ var _iterator19 = _createForOfIteratorHelper$b(ops.visibleOptionValues),
27161
+ _step19;
27004
27162
  try {
27005
- for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
27006
- var _step14$value = _slicedToArray__default["default"](_step14.value, 2),
27007
- jKey = _step14$value[0],
27008
- opv = _step14$value[1];
27163
+ for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
27164
+ var _step19$value = _slicedToArray__default["default"](_step19.value, 2),
27165
+ jKey = _step19$value[0],
27166
+ opv = _step19$value[1];
27009
27167
  if (opv.images) {
27010
27168
  var imageFound = false;
27011
27169
  for (var _i5 = 0; _i5 < opv.images.length; _i5++) {
@@ -27016,9 +27174,9 @@ var IDMEngine = /*#__PURE__*/function () {
27016
27174
  for (var _j2 = 0; _j2 < _image.decisionNos.length; _j2++) {
27017
27175
  var _decision4 = catalogData.getDecisionByNo(_image.decisionNos[_j2]);
27018
27176
  if (!_decision4) throw new Error('decision ' + _image.decisionNos[_j2] + ' not found');
27019
- var _ref24 = this.getMatchingOptionCombination(_decision4.optionCombinations, _decision4.decisionNo),
27020
- _ref25 = _slicedToArray__default["default"](_ref24, 1),
27021
- _combination2 = _ref25[0];
27177
+ var _ref27 = this.getMatchingOptionCombination(_decision4.optionCombinations, _decision4.decisionNo),
27178
+ _ref28 = _slicedToArray__default["default"](_ref27, 1),
27179
+ _combination2 = _ref28[0];
27022
27180
  if (_combination2) {
27023
27181
  _doUse = true;
27024
27182
  break;
@@ -27035,18 +27193,18 @@ var IDMEngine = /*#__PURE__*/function () {
27035
27193
  }
27036
27194
  }
27037
27195
  } catch (err) {
27038
- _iterator14.e(err);
27196
+ _iterator19.e(err);
27039
27197
  } finally {
27040
- _iterator14.f();
27198
+ _iterator19.f();
27041
27199
  }
27042
27200
  }
27043
27201
 
27044
27202
  // this function calculates an Svg to the current configuration if neccessary (SVG Tausch)
27045
27203
  // if the Article has no SVG Tausch nothing is done
27046
27204
  } catch (err) {
27047
- _iterator13.e(err);
27205
+ _iterator18.e(err);
27048
27206
  } finally {
27049
- _iterator13.f();
27207
+ _iterator18.f();
27050
27208
  }
27051
27209
  var newSVGFile = null;
27052
27210
  var svgChangedViaSvgTausch = false;
@@ -27073,9 +27231,9 @@ var IDMEngine = /*#__PURE__*/function () {
27073
27231
  for (var _j = 0; _j < svg.decisionNos.length; _j++) {
27074
27232
  var _decision3 = catalogData.getDecisionByNo(svg.decisionNos[_j]);
27075
27233
  if (!_decision3) throw new Error('decision ' + svg.decisionNos[_j] + ' not found');
27076
- var _ref22 = this.getMatchingOptionCombination(_decision3.optionCombinations, _decision3.decisionNo),
27077
- _ref23 = _slicedToArray__default["default"](_ref22, 1),
27078
- _combination = _ref23[0];
27234
+ var _ref25 = this.getMatchingOptionCombination(_decision3.optionCombinations, _decision3.decisionNo),
27235
+ _ref26 = _slicedToArray__default["default"](_ref25, 1),
27236
+ _combination = _ref26[0];
27079
27237
  if (_combination) {
27080
27238
  svgValid = _decision3;
27081
27239
  break;
@@ -29929,7 +30087,7 @@ var DivaArticle = /*#__PURE__*/function () {
29929
30087
  break;
29930
30088
  }
29931
30089
  _context.next = 4;
29932
- return Promise.resolve().then(function () { return require('./ShelfPlanner-04d98f4d.js'); });
30090
+ return Promise.resolve().then(function () { return require('./ShelfPlanner-eab7ed23.js'); });
29933
30091
  case 4:
29934
30092
  _yield$import = _context.sent;
29935
30093
  ShelfPlanner = _yield$import["default"];
@@ -38024,7 +38182,7 @@ var DivaSet = /*#__PURE__*/function () {
38024
38182
  break;
38025
38183
  }
38026
38184
  _context5.next = 3;
38027
- return Promise.resolve().then(function () { return require('./DoorPlanner-ce630754.js'); });
38185
+ return Promise.resolve().then(function () { return require('./DoorPlanner-a37c3d62.js'); });
38028
38186
  case 3:
38029
38187
  _yield$import = _context5.sent;
38030
38188
  DoorPlanner = _yield$import["default"];
@@ -43608,7 +43766,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
43608
43766
  break;
43609
43767
  case 3:
43610
43768
  _context12.next = 5;
43611
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-3c723ecc.js'); });
43769
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-a0d05fa3.js'); });
43612
43770
  case 5:
43613
43771
  _yield$import = _context12.sent;
43614
43772
  PfisterWWSHandler = _yield$import["default"];
@@ -43616,7 +43774,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
43616
43774
  return _context12.abrupt("break", 27);
43617
43775
  case 9:
43618
43776
  _context12.next = 11;
43619
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-c11ea7d2.js'); });
43777
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-f6488fb8.js'); });
43620
43778
  case 11:
43621
43779
  _yield$import2 = _context12.sent;
43622
43780
  LiviqueWWSHandler = _yield$import2["default"];
@@ -43624,7 +43782,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
43624
43782
  return _context12.abrupt("break", 27);
43625
43783
  case 15:
43626
43784
  _context12.next = 17;
43627
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-d1ae4006.js'); });
43785
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-bc18769e.js'); });
43628
43786
  case 17:
43629
43787
  _yield$import3 = _context12.sent;
43630
43788
  SeriousWWSHandler = _yield$import3["default"];
@@ -43632,7 +43790,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
43632
43790
  return _context12.abrupt("break", 27);
43633
43791
  case 21:
43634
43792
  _context12.next = 23;
43635
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-9b596caf.js'); });
43793
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-1ad7e215.js'); });
43636
43794
  case 23:
43637
43795
  _yield$import4 = _context12.sent;
43638
43796
  StandardWWSHandler = _yield$import4["default"];
@@ -45015,7 +45173,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
45015
45173
  while (1) switch (_context3.prev = _context3.next) {
45016
45174
  case 0:
45017
45175
  _context3.next = 2;
45018
- return Promise.resolve().then(function () { return require('./Host3DSignalR-b0b1fb8d.js'); });
45176
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-a94701fa.js'); });
45019
45177
  case 2:
45020
45178
  _yield$import = _context3.sent;
45021
45179
  Host3DSignalR = _yield$import["default"];
@@ -46691,7 +46849,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
46691
46849
  break;
46692
46850
  case 8:
46693
46851
  _context5.next = 10;
46694
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-150246c0.js'); });
46852
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-e664710b.js'); });
46695
46853
  case 10:
46696
46854
  _yield$import = _context5.sent;
46697
46855
  DivaStandardPlanner = _yield$import["default"];
@@ -46702,7 +46860,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
46702
46860
  return _context5.abrupt("break", 21);
46703
46861
  case 15:
46704
46862
  _context5.next = 17;
46705
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-02a2dbbf.js'); });
46863
+ return Promise.resolve().then(function () { return require('./DivaBoxPlanner-ce0bb2af.js'); });
46706
46864
  case 17:
46707
46865
  _yield$import2 = _context5.sent;
46708
46866
  DivaBoxPlanner = _yield$import2["default"];
@@ -47865,52 +48023,24 @@ function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t
47865
48023
  */
47866
48024
 
47867
48025
  var LOG$2 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
48026
+
48027
+ /**
48028
+ * Everything the planner calls on its attached view, registered as ONE object via
48029
+ * {@link DivaWebPlanner.attachView} (mount or adoption of an existing instance) and removed
48030
+ * via {@link DivaWebPlanner.detachView}. `view === undefined` IS the headless state.
48031
+ */
47868
48032
  var DivaWebPlanner = /*#__PURE__*/function () {
47869
48033
  function DivaWebPlanner(plannerConfig) {
47870
48034
  var _this = this;
47871
48035
  _classCallCheck__default["default"](this, DivaWebPlanner);
47872
48036
  _defineProperty__default["default"](this, "divaBasketHandler", void 0);
47873
- _defineProperty__default["default"](this, "onClickAddToBasket", void 0);
47874
- //Öffentliche Funktionen für die View
47875
- _defineProperty__default["default"](this, "initPlannerView", void 0);
47876
- _defineProperty__default["default"](this, "initViewApiDependencies", void 0);
47877
- _defineProperty__default["default"](this, "initConfiguratorStructure", void 0);
47878
- _defineProperty__default["default"](this, "onBasketInitialized", void 0);
47879
- _defineProperty__default["default"](this, "initConfiguratorMode", void 0);
47880
- _defineProperty__default["default"](this, "updatePlannerMsgContainer", void 0);
47881
- _defineProperty__default["default"](this, "navigateToConfigStep", void 0);
47882
- _defineProperty__default["default"](this, "updateConfiguratorStructure", void 0);
47883
- _defineProperty__default["default"](this, "navigateToTabGroup", void 0);
47884
- _defineProperty__default["default"](this, "getCurPlannerViewMode", void 0);
47885
- _defineProperty__default["default"](this, "getInitPlannerViewMode", void 0);
47886
- _defineProperty__default["default"](this, "updatePlanner3DImage", void 0);
47887
- _defineProperty__default["default"](this, "setRotationOrbitCube", void 0);
47888
- _defineProperty__default["default"](this, "getCanvas2DAsJPG", void 0);
47889
- _defineProperty__default["default"](this, "updateFullscreenRendering", void 0);
48037
+ /** The attached view; undefined = headless. */
48038
+ _defineProperty__default["default"](this, "view", void 0);
48039
+ /** Rendering size for view-less artifact generation (fallback while no view is attached). */
48040
+ _defineProperty__default["default"](this, "headlessRenderingSize", void 0);
47890
48041
  _defineProperty__default["default"](this, "plannerHandler", void 0);
47891
- _defineProperty__default["default"](this, "updateSetImage", void 0);
47892
- _defineProperty__default["default"](this, "updatePlanner2DGrid", void 0);
47893
- _defineProperty__default["default"](this, "getPlannerRenderingSize", void 0);
47894
- _defineProperty__default["default"](this, "updateCatalogPlannerArticles", void 0);
47895
- _defineProperty__default["default"](this, "updateCatalogPlanner2Dot0Articles", void 0);
47896
- _defineProperty__default["default"](this, "updateAccessoiresPalette", void 0);
47897
- _defineProperty__default["default"](this, "updatePaletteInfos", void 0);
47898
- _defineProperty__default["default"](this, "updateElementSelectionConfig", void 0);
47899
- _defineProperty__default["default"](this, "updateBBox", void 0);
47900
- _defineProperty__default["default"](this, "updateElementSelectionPlanner", void 0);
47901
- _defineProperty__default["default"](this, "updateConfigItems", void 0);
47902
- _defineProperty__default["default"](this, "updateSummaryItems", void 0);
47903
- _defineProperty__default["default"](this, "updateStaticRoomListItems", void 0);
47904
- _defineProperty__default["default"](this, "updateShelfPlannerItems", void 0);
47905
- _defineProperty__default["default"](this, "updateFreePlacesOnGrids", void 0);
47906
- _defineProperty__default["default"](this, "updateDoorPlannerItems", void 0);
47907
- _defineProperty__default["default"](this, "updatePrice", void 0);
47908
- _defineProperty__default["default"](this, "updateViewButtonsDependigOnConfigStructure", void 0);
47909
- _defineProperty__default["default"](this, "updateViewPlannerElements", void 0);
47910
- _defineProperty__default["default"](this, "getDoShow3DDimensionLines", void 0);
47911
- _defineProperty__default["default"](this, "getCurrentAlternativRendering", void 0);
47912
- _defineProperty__default["default"](this, "setWebConifguratorTitle", void 0);
47913
48042
  _defineProperty__default["default"](this, "plannerConfig", void 0);
48043
+ _defineProperty__default["default"](this, "lastInitError", void 0);
47914
48044
  _defineProperty__default["default"](this, "actions", void 0);
47915
48045
  _defineProperty__default["default"](this, "handler", void 0);
47916
48046
  _defineProperty__default["default"](this, "state", void 0);
@@ -47928,19 +48058,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
47928
48058
  return undefined;
47929
48059
  });
47930
48060
  _defineProperty__default["default"](this, "api", void 0);
47931
- _defineProperty__default["default"](this, "setHQRenderScript", void 0);
47932
- _defineProperty__default["default"](this, "setCamInfo", void 0);
48061
+ // View callbacks are wrapped in lambdas so a view attached/detached LATER (adoption) is always the one reached.
47933
48062
  _defineProperty__default["default"](this, "getPlannerHandlerFunctions", function () {
47934
48063
  return {
47935
- updateCamInfo: _this.setCamInfo,
48064
+ updateCamInfo: function updateCamInfo(camInfo) {
48065
+ var _this$view;
48066
+ return (_this$view = _this.view) === null || _this$view === void 0 ? void 0 : _this$view.setCamInfo(camInfo);
48067
+ },
47936
48068
  updatePlannerRendering: _this.updatePlannerRendering,
47937
48069
  updatePlannerHqRenderScript: _this.updatePlannerHqRenderScript,
47938
- setRotationOrbitCube: _this.setRotationOrbitCube,
48070
+ setRotationOrbitCube: function setRotationOrbitCube(forceOrbitTo, rotHori, rotVert) {
48071
+ var _this$view2;
48072
+ return (_this$view2 = _this.view) === null || _this$view2 === void 0 ? void 0 : _this$view2.setRotationOrbitCube(forceOrbitTo, rotHori, rotVert);
48073
+ },
47939
48074
  onRoomListLoaded: _this.onRoomListLoaded,
47940
- updateSetImage: _this.updateSetImage,
48075
+ updateSetImage: function updateSetImage(url) {
48076
+ var _this$view3;
48077
+ return (_this$view3 = _this.view) === null || _this$view3 === void 0 ? void 0 : _this$view3.updateSetImage(url);
48078
+ },
47941
48079
  getOrigConfiguration: _this.divaBasketHandler.getOrigConfiguration,
47942
48080
  doAllowSetPlanner: _this.doAllowSetPlanner.bind(_this),
47943
- updatePlannerMsgContainer: _this.updatePlannerMsgContainer,
48081
+ updatePlannerMsgContainer: function updatePlannerMsgContainer(codex, doShowPlannerMsg, type, content, autoHide, timeoutDuration) {
48082
+ var _this$view4;
48083
+ return (_this$view4 = _this.view) === null || _this$view4 === void 0 ? void 0 : _this$view4.updatePlannerMsgContainer(codex, doShowPlannerMsg, type, content, autoHide, timeoutDuration);
48084
+ },
47944
48085
  clearAiImages: _this.clearAllAiImagesAsJpg.bind(_this)
47945
48086
  };
47946
48087
  });
@@ -47951,13 +48092,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
47951
48092
  _defineProperty__default["default"](this, "setActSet", function (setId, oldTabgroupType) {
47952
48093
  var somethingChanged = setHandlerInstance.setActSet(_this.sets, setId);
47953
48094
  if (somethingChanged) {
48095
+ var _this$view6;
47954
48096
  _this.updateWebConfiguratorTitle();
47955
48097
  _this.updateConfigStructure();
47956
48098
  if (oldTabgroupType) {
47957
- var _this$navigateToTabGr;
47958
- if (!((_this$navigateToTabGr = _this.navigateToTabGroup) !== null && _this$navigateToTabGr !== void 0 && _this$navigateToTabGr.call(_this, oldTabgroupType, undefined, true))) oldTabgroupType = undefined;
48099
+ var _this$view5;
48100
+ if (!((_this$view5 = _this.view) !== null && _this$view5 !== void 0 && _this$view5.navigateToTabGroup(oldTabgroupType, undefined, true))) oldTabgroupType = undefined;
47959
48101
  }
47960
- if (!oldTabgroupType) _this.navigateToConfigStep(_this.actSet().ActConfigStepKey, true);
48102
+ if (!oldTabgroupType) (_this$view6 = _this.view) === null || _this$view6 === void 0 || _this$view6.navigateToConfigStep(_this.actSet().ActConfigStepKey, true);
47961
48103
  }
47962
48104
  return somethingChanged;
47963
48105
  });
@@ -47968,8 +48110,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
47968
48110
  _defineProperty__default["default"](this, "onRoomListLoaded", function () {
47969
48111
  var set = _this.actSet();
47970
48112
  if (set !== null && set !== void 0 && set.hasStaticRoomList) {
47971
- var _this$updateStaticRoo;
47972
- (_this$updateStaticRoo = _this.updateStaticRoomListItems) === null || _this$updateStaticRoo === void 0 || _this$updateStaticRoo.call(_this, setHandlerInstance.getStaticRoomListItems(set), _this.api.getRoomListInProduct() || _this.plannerConfig.initMode);
48113
+ var _this$view7;
48114
+ (_this$view7 = _this.view) === null || _this$view7 === void 0 || _this$view7.updateStaticRoomListItems(setHandlerInstance.getStaticRoomListItems(set), !!(_this.api.getRoomListInProduct() || _this.plannerConfig.initMode));
47973
48115
  }
47974
48116
  });
47975
48117
  /**
@@ -47980,10 +48122,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
47980
48122
  var _this$state;
47981
48123
  var onlyUpdateState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
47982
48124
  if (rendering.getIsFullscreenRendering()) {
47983
- _this.updateFullscreenRendering(rendering);
48125
+ var _this$view8;
48126
+ (_this$view8 = _this.view) === null || _this$view8 === void 0 || _this$view8.updateFullscreenRendering(rendering);
47984
48127
  } else {
47985
- var _this$updatePlanner3D;
47986
- (_this$updatePlanner3D = _this.updatePlanner3DImage) === null || _this$updatePlanner3D === void 0 || _this$updatePlanner3D.call(_this, rendering, onlyUpdateState);
48128
+ var _this$view9;
48129
+ (_this$view9 = _this.view) === null || _this$view9 === void 0 || _this$view9.updatePlanner3DImage(rendering, onlyUpdateState);
47987
48130
  }
47988
48131
  if (!onlyUpdateState && _this.actions && (_this$state = _this.state) !== null && _this$state !== void 0 && _this$state.enableSupport) {
47989
48132
  var _this$actSet, _this$state$user, _this$state$user2, _this$state$user3;
@@ -47995,26 +48138,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
47995
48138
  * @param rendering The new rendering that should be loaded into the view
47996
48139
  */
47997
48140
  _defineProperty__default["default"](this, "updatePlannerHqRenderScript", function (hqRenderscript) {
47998
- var _this$setHQRenderScri;
48141
+ var _this$view10;
47999
48142
  LOG$2.debug('new HQRenderScript set');
48000
- (_this$setHQRenderScri = _this.setHQRenderScript) === null || _this$setHQRenderScri === void 0 || _this$setHQRenderScri.call(_this, hqRenderscript.HQRenderScript);
48143
+ (_this$view10 = _this.view) === null || _this$view10 === void 0 || _this$view10.setHQRenderScript(hqRenderscript.HQRenderScript);
48001
48144
  });
48002
48145
  /** The latest 2D-grid render; a capture must await it, otherwise it reads the canvas of the previous planning. */
48003
48146
  _defineProperty__default["default"](this, "pending2DRender", void 0);
48004
48147
  _defineProperty__default["default"](this, "update2DGrid", function (set) {
48005
- if (!_this.getInitPlannerViewMode || _this.getInitPlannerViewMode() == 'No') return;
48148
+ if (!_this.view || _this.view.getInitPlannerViewMode() == 'No') return;
48006
48149
  var boundingBox = setHandlerInstance.get2DViewPlannerBoundingBox(set);
48007
48150
  if (boundingBox) _this.start2DRender(boundingBox);
48008
48151
  });
48009
48152
  _defineProperty__default["default"](this, "getPlanning2DAsJpg", /*#__PURE__*/_asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee() {
48010
- var _this$getCanvas2DAsJP;
48153
+ var _this$view11;
48011
48154
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
48012
48155
  while (1) switch (_context.prev = _context.next) {
48013
48156
  case 0:
48014
48157
  _context.next = 2;
48015
48158
  return _this.pending2DRender;
48016
48159
  case 2:
48017
- return _context.abrupt("return", (_this$getCanvas2DAsJP = _this.getCanvas2DAsJPG) === null || _this$getCanvas2DAsJP === void 0 ? void 0 : _this$getCanvas2DAsJP.call(_this));
48160
+ return _context.abrupt("return", (_this$view11 = _this.view) === null || _this$view11 === void 0 ? void 0 : _this$view11.getCanvas2DAsJPG());
48018
48161
  case 3:
48019
48162
  case "end":
48020
48163
  return _context.stop();
@@ -48032,23 +48175,24 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48032
48175
  * This Function ist call from the View when all Planner Article are Requested for listing
48033
48176
  */
48034
48177
  _defineProperty__default["default"](this, "loadCatalogPlannerArticles", function (paletteeId, isUpdate, type, dockFilter, actStepName, stepKey, selectedArticle) {
48035
- var _this$updateCatalogPl;
48178
+ var _this$view12;
48036
48179
  //Das aktuelle Set weiß welcher catalog gerade geladen ist.
48037
48180
  //Von diesem Katalog müssen wir die CatalogPlannerArticles laden.
48038
- (_this$updateCatalogPl = _this.updateCatalogPlannerArticles) === null || _this$updateCatalogPl === void 0 || _this$updateCatalogPl.call(_this, setHandlerInstance.getPlannerPaletteViewInfo(_this.actSet(), type, selectedArticle), paletteeId, isUpdate, type, dockFilter, actStepName, stepKey);
48181
+ (_this$view12 = _this.view) === null || _this$view12 === void 0 || _this$view12.updateCatalogPlannerArticles(setHandlerInstance.getPlannerPaletteViewInfo(_this.actSet(), type, selectedArticle), paletteeId, isUpdate, type, dockFilter, actStepName, stepKey);
48039
48182
  });
48040
48183
  _defineProperty__default["default"](this, "loadCatalogPlannerArticles2Dot0", function (isUpdate, onlySelectionChanged, dp) {
48041
- var _this$updateCatalogPl2;
48042
- (_this$updateCatalogPl2 = _this.updateCatalogPlanner2Dot0Articles) === null || _this$updateCatalogPl2 === void 0 || _this$updateCatalogPl2.call(_this, setHandlerInstance.getPlanner2Dot0PaletteViewInfo(_this.actSet()), isUpdate, onlySelectionChanged, dp);
48184
+ var _this$view13;
48185
+ (_this$view13 = _this.view) === null || _this$view13 === void 0 || _this$view13.updateCatalogPlanner2Dot0Articles(setHandlerInstance.getPlanner2Dot0PaletteViewInfo(_this.actSet()), isUpdate, onlySelectionChanged, dp);
48043
48186
  });
48044
48187
  /**
48045
48188
  * this fuction loads the accessoires of a specific article -> could be more than one article in the future
48046
48189
  * @param targetArticles the article of which we load the accessoires
48047
48190
  */
48048
48191
  _defineProperty__default["default"](this, "loadAccessoiresOfArticles", function (targetArticles) {
48192
+ var _this$view14;
48049
48193
  var set = _this.actSet();
48050
48194
  if (!set) return;
48051
- _this.updateAccessoiresPalette(setHandlerInstance.getAccessoriesOfArticles(_this.actSet(), targetArticles), set.configAccessoiresInAccessoireStep ? 'ACC_CONFIG' : 'ACC');
48195
+ (_this$view14 = _this.view) === null || _this$view14 === void 0 || _this$view14.updateAccessoiresPalette(setHandlerInstance.getAccessoriesOfArticles(_this.actSet(), targetArticles), set.configAccessoiresInAccessoireStep ? 'ACC_CONFIG' : 'ACC');
48052
48196
  });
48053
48197
  /**
48054
48198
  * this function is called when all Items of a ConfigStep are requested
@@ -48056,7 +48200,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48056
48200
  */
48057
48201
  _defineProperty__default["default"](this, "loadConfigItemsOfOptions", /*#__PURE__*/function () {
48058
48202
  var _ref2 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(configStepKey, paletteId, isUpdate, visible) {
48059
- var _this$state2, _this$state3, _this$updateConfigIte;
48203
+ var _this$state2, _this$state3, _this$view15;
48060
48204
  var retValues;
48061
48205
  return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
48062
48206
  while (1) switch (_context2.prev = _context2.next) {
@@ -48065,7 +48209,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48065
48209
  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));
48066
48210
  case 2:
48067
48211
  retValues = _context2.sent;
48068
- (_this$updateConfigIte = _this.updateConfigItems) === null || _this$updateConfigIte === void 0 || _this$updateConfigIte.call(_this, configStepKey, retValues.configItems, retValues.selectedItems, retValues.actStepName, retValues.paletteType, retValues.filterType, paletteId, isUpdate, retValues.visible, retValues.stepInfo, retValues.isRenderedInAccessorieStep, retValues.isRenderedNotInSettingPalette, retValues.optionCodex, retValues.notTotallyMatichingOPVs, retValues.isMultiselect, retValues.groupsDefaultClosed, retValues.contentItemId, retValues.conceptFilter, retValues.contentItemTeaser, retValues.description);
48212
+ (_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);
48069
48213
  case 4:
48070
48214
  case "end":
48071
48215
  return _context2.stop();
@@ -48080,7 +48224,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48080
48224
  * this function laods the summary Items
48081
48225
  */
48082
48226
  _defineProperty__default["default"](this, "loadSummaryItems", /*#__PURE__*/_asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3() {
48083
- var _this$actions, _this$actions$toggleL, _this$updateSummaryIt, _this$actions2, _this$actions2$toggle;
48227
+ var _this$actions, _this$actions$toggleL, _this$view16, _this$actions2, _this$actions2$toggle;
48084
48228
  var setPriceCurrency, setPriceFormat, summaryItems;
48085
48229
  return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context3) {
48086
48230
  while (1) switch (_context3.prev = _context3.next) {
@@ -48098,7 +48242,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48098
48242
  return summaryHandlerInstance.getSummaryItems(_this.sets, _this.doConfigure.bind(_this));
48099
48243
  case 6:
48100
48244
  summaryItems = _context3.sent;
48101
- (_this$updateSummaryIt = _this.updateSummaryItems) === null || _this$updateSummaryIt === void 0 || _this$updateSummaryIt.call(_this, summaryItems, setPriceFormat, summaryHandlerInstance.getSummaryStepWarning(_this.actSet(), summaryItems));
48245
+ (_this$view16 = _this.view) === null || _this$view16 === void 0 || _this$view16.updateSummaryItems(summaryItems, setPriceFormat, summaryHandlerInstance.getSummaryStepWarning(_this.actSet(), summaryItems));
48102
48246
  (_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');
48103
48247
  case 9:
48104
48248
  case "end":
@@ -48107,19 +48251,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48107
48251
  }, _callee3);
48108
48252
  })));
48109
48253
  _defineProperty__default["default"](this, "loadStaticRoomList", function (dontUpdateView) {
48110
- var _this$updateStaticRoo2;
48111
- (_this$updateStaticRoo2 = _this.updateStaticRoomListItems) === null || _this$updateStaticRoo2 === void 0 || _this$updateStaticRoo2.call(_this, setHandlerInstance.getStaticRoomListItems(_this.actSet()), dontUpdateView);
48254
+ var _this$view17;
48255
+ (_this$view17 = _this.view) === null || _this$view17 === void 0 || _this$view17.updateStaticRoomListItems(setHandlerInstance.getStaticRoomListItems(_this.actSet()), dontUpdateView);
48112
48256
  });
48113
48257
  _defineProperty__default["default"](this, "loadShelfPlannerItems", function (paletteId, configStepKey, from) {
48114
- var _this$updateShelfPlan;
48258
+ var _this$view18;
48115
48259
  var _DivaSetHandler$getSh = setHandlerInstance.getShelfPlannerItems(_this.actSet(), configStepKey),
48116
48260
  accessoires = _DivaSetHandler$getSh.accessoires,
48117
48261
  grids = _DivaSetHandler$getSh.grids;
48118
- (_this$updateShelfPlan = _this.updateShelfPlannerItems) === null || _this$updateShelfPlan === void 0 || _this$updateShelfPlan.call(_this, paletteId, accessoires, grids, configStepKey, from);
48262
+ (_this$view18 = _this.view) === null || _this$view18 === void 0 || _this$view18.updateShelfPlannerItems(paletteId, accessoires, grids, configStepKey, from);
48119
48263
  });
48120
48264
  _defineProperty__default["default"](this, "loadDoorPlannerItems", function (configStepKey) {
48121
- var _this$updateDoorPlann;
48122
- (_this$updateDoorPlann = _this.updateDoorPlannerItems) === null || _this$updateDoorPlann === void 0 || _this$updateDoorPlann.call(_this, setHandlerInstance.getDoorPlannerItems(_this.actSet(), configStepKey), configStepKey);
48265
+ var _this$view19;
48266
+ (_this$view19 = _this.view) === null || _this$view19 === void 0 || _this$view19.updateDoorPlannerItems(setHandlerInstance.getDoorPlannerItems(_this.actSet(), configStepKey), configStepKey);
48123
48267
  });
48124
48268
  /**
48125
48269
  * This function is called when switching from one planning to another. All Planner handler are destroyed.
@@ -48127,7 +48271,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48127
48271
  */
48128
48272
  _defineProperty__default["default"](this, "destroyPlannerHandler", function (doDestroy3DHostConnection) {
48129
48273
  setHandlerInstance.destroyPlannerHandler(_this.actSet(), doDestroy3DHostConnection);
48130
- if (_this.getCurPlannerViewMode) _this.updatePlannerView('DESTROY_PLANNER');
48274
+ if (_this.view) _this.updatePlannerView('DESTROY_PLANNER');
48131
48275
  });
48132
48276
  /**
48133
48277
  * this Function is called when new Planner Article is Loaded
@@ -48136,7 +48280,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48136
48280
  */
48137
48281
  _defineProperty__default["default"](this, "addPlannerElement", /*#__PURE__*/function () {
48138
48282
  var _ref4 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee4(elementCodex, initParams, dontUpdateView) {
48139
- var _this$actions3, _this$actions3$toggle, _this$actions6, _this$actions6$toggle, _this$updateViewPlann, _this$updateElementSe;
48283
+ var _this$actions3, _this$actions3$toggle, _this$actions6, _this$actions6$toggle, _this$view20, _this$view21, _this$view22;
48140
48284
  var set, newArticle, _this$actions4, _this$actions4$openMo, _this$i18n, _this$i18n2, _this$actions5, _this$actions5$toggle, baseArticle;
48141
48285
  return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context4) {
48142
48286
  while (1) switch (_context4.prev = _context4.next) {
@@ -48172,13 +48316,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48172
48316
  return _context4.abrupt("return", newArticle.doNotDeleteAccWhenNotDocked ? 'AccessoireNotVisualized' : 'AccessorieNoFreeSpace');
48173
48317
  case 18:
48174
48318
  _this.updateConfigStructure();
48175
- (_this$updateViewPlann = _this.updateViewPlannerElements) === null || _this$updateViewPlann === void 0 || _this$updateViewPlann.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
48319
+ (_this$view20 = _this.view) === null || _this$view20 === void 0 || _this$view20.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
48176
48320
  _this.updatePlannerView('ADD_PLANNER_ELEMENT');
48177
48321
  _this.updateWebConfiguratorTitle();
48178
48322
  _this.updatePriceInView();
48179
- _this.updateViewButtonsDependigOnConfigStructure();
48323
+ (_this$view21 = _this.view) === null || _this$view21 === void 0 || _this$view21.updateViewButtonsDependigOnConfigStructure();
48180
48324
  baseArticle = setHandlerInstance.getBaseParentArticleOfAccessoire(set, newArticle.basketId);
48181
- if (!dontUpdateView) (_this$updateElementSe = _this.updateElementSelectionPlanner) === null || _this$updateElementSe === void 0 || _this$updateElementSe.call(_this, [baseArticle.setId], [baseArticle.elementId], true);
48325
+ if (!dontUpdateView) (_this$view22 = _this.view) === null || _this$view22 === void 0 || _this$view22.updateElementSelectionPlanner([baseArticle.setId], [baseArticle.elementId], true);
48182
48326
  _this.checkMatchingProducts('onAdd');
48183
48327
  _this.plannerChangeLog('onAddPlanner');
48184
48328
  return _context4.abrupt("return", 'ElementAdded');
@@ -48200,7 +48344,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48200
48344
  */
48201
48345
  _defineProperty__default["default"](this, "switchPlannerElement", /*#__PURE__*/function () {
48202
48346
  var _ref5 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee5(setId, elementId, articleCodex, initParams) {
48203
- var _this$actions7, _this$actions7$toggle, _this$actions8, _this$actions8$toggle, _this$updateViewPlann2, _this$updateElementSe2;
48347
+ var _this$actions7, _this$actions7$toggle, _this$actions8, _this$actions8$toggle, _this$view23, _this$view24, _this$view25;
48204
48348
  var set, variantValues, deletionResult, article;
48205
48349
  return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context5) {
48206
48350
  while (1) switch (_context5.prev = _context5.next) {
@@ -48224,12 +48368,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48224
48368
  case 14:
48225
48369
  (_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);
48226
48370
  _this.updateConfigStructure();
48227
- (_this$updateViewPlann2 = _this.updateViewPlannerElements) === null || _this$updateViewPlann2 === void 0 || _this$updateViewPlann2.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
48371
+ (_this$view23 = _this.view) === null || _this$view23 === void 0 || _this$view23.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
48228
48372
  _this.updatePlannerView('SWITCH_PLANNER_ELEMENT');
48229
48373
  _this.updateWebConfiguratorTitle();
48230
- (_this$updateElementSe2 = _this.updateElementSelectionPlanner) === null || _this$updateElementSe2 === void 0 || _this$updateElementSe2.call(_this, [article.setId], [article.elementId], true);
48374
+ (_this$view24 = _this.view) === null || _this$view24 === void 0 || _this$view24.updateElementSelectionPlanner([article.setId], [article.elementId], true);
48231
48375
  _this.updatePriceInView();
48232
- _this.updateViewButtonsDependigOnConfigStructure();
48376
+ (_this$view25 = _this.view) === null || _this$view25 === void 0 || _this$view25.updateViewButtonsDependigOnConfigStructure();
48233
48377
  _this.checkMatchingProducts('onSwitch');
48234
48378
  _this.plannerChangeLog('onSwitchPlanner');
48235
48379
  case 24:
@@ -48245,7 +48389,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48245
48389
  _defineProperty__default["default"](this, "addAccessorieOnShelfPlanner", /*#__PURE__*/function () {
48246
48390
  var _ref6 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey, partlistCodexToInit) {
48247
48391
  var _this$actions9, _this$actions9$toggle, _this$actions10, _this$actions10$toggl;
48248
- var set, retVal, _this$updateViewPlann3;
48392
+ var set, retVal, _this$view26, _this$view27;
48249
48393
  return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context6) {
48250
48394
  while (1) switch (_context6.prev = _context6.next) {
48251
48395
  case 0:
@@ -48262,8 +48406,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48262
48406
  _this.loadShelfPlannerItems(paletteId, configStepKey, 'add_accessoire');
48263
48407
  _this.updateConfigStructure();
48264
48408
  _this.updatePriceInView();
48265
- _this.updateViewButtonsDependigOnConfigStructure();
48266
- (_this$updateViewPlann3 = _this.updateViewPlannerElements) === null || _this$updateViewPlann3 === void 0 || _this$updateViewPlann3.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
48409
+ (_this$view26 = _this.view) === null || _this$view26 === void 0 || _this$view26.updateViewButtonsDependigOnConfigStructure();
48410
+ (_this$view27 = _this.view) === null || _this$view27 === void 0 || _this$view27.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
48267
48411
  _this.updatePlannerView('ADD_ACC_ON_SHELF_PLANNER');
48268
48412
  }
48269
48413
  _this.checkMatchingProducts('onShelfAdd');
@@ -48281,8 +48425,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48281
48425
  }());
48282
48426
  _defineProperty__default["default"](this, "moveShelfItem", /*#__PURE__*/function () {
48283
48427
  var _ref7 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(paletteId, grid, initialIndex, finalIndex, configStepKey) {
48284
- var _this$updateViewPlann4;
48285
- var set, result, _this$updatePlannerMs, _this$i18n3;
48428
+ var _this$view29;
48429
+ var set, result, _this$view28, _this$i18n3;
48286
48430
  return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context7) {
48287
48431
  while (1) switch (_context7.prev = _context7.next) {
48288
48432
  case 0:
@@ -48292,11 +48436,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48292
48436
  case 3:
48293
48437
  result = _context7.sent;
48294
48438
  if (result == 'RESETTED_CELLS') {
48295
- (_this$updatePlannerMs = _this.updatePlannerMsgContainer) === null || _this$updatePlannerMs === void 0 || _this$updatePlannerMs.call(_this, 'COULD_NOT_MOVE_SHELVES', true, 'INFO', (_this$i18n3 = _this.i18n()) === null || _this$i18n3 === void 0 ? void 0 : _this$i18n3.t('configurator.move_resetted'), true);
48439
+ (_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);
48296
48440
  }
48297
48441
  _this.updateConfigStructure();
48298
48442
  _this.loadShelfPlannerItems(paletteId, configStepKey, 'move sheld');
48299
- (_this$updateViewPlann4 = _this.updateViewPlannerElements) === null || _this$updateViewPlann4 === void 0 || _this$updateViewPlann4.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
48443
+ (_this$view29 = _this.view) === null || _this$view29 === void 0 || _this$view29.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
48300
48444
  _this.updatePlannerView('MOVE_SHELF_ITEM');
48301
48445
  case 9:
48302
48446
  case "end":
@@ -48314,7 +48458,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48314
48458
  });
48315
48459
  _defineProperty__default["default"](this, "deleteAccessorieOnShelfPlanner", /*#__PURE__*/function () {
48316
48460
  var _ref8 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey) {
48317
- var _this$updateViewPlann5;
48461
+ var _this$view30, _this$view31;
48318
48462
  var set;
48319
48463
  return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
48320
48464
  while (1) switch (_context8.prev = _context8.next) {
@@ -48326,8 +48470,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48326
48470
  _this.updateConfigStructure();
48327
48471
  _this.loadShelfPlannerItems(paletteId, configStepKey, 'delete accessorie');
48328
48472
  _this.updatePriceInView();
48329
- _this.updateViewButtonsDependigOnConfigStructure();
48330
- (_this$updateViewPlann5 = _this.updateViewPlannerElements) === null || _this$updateViewPlann5 === void 0 || _this$updateViewPlann5.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
48473
+ (_this$view30 = _this.view) === null || _this$view30 === void 0 || _this$view30.updateViewButtonsDependigOnConfigStructure();
48474
+ (_this$view31 = _this.view) === null || _this$view31 === void 0 || _this$view31.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
48331
48475
  _this.updatePlannerView('DELETE_ACC_ON_SHELF_PLANNER');
48332
48476
  _this.checkMatchingProducts('onShelfDelete');
48333
48477
  _this.plannerChangeLog('onDeletePlanner');
@@ -48350,7 +48494,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48350
48494
  */
48351
48495
  _defineProperty__default["default"](this, "updatePlannerTrans", /*#__PURE__*/function () {
48352
48496
  var _ref9 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9(setId, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance) {
48353
- var _this$updateElementSe3;
48497
+ var _this$view32;
48354
48498
  return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context9) {
48355
48499
  while (1) switch (_context9.prev = _context9.next) {
48356
48500
  case 0:
@@ -48359,7 +48503,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48359
48503
  case 2:
48360
48504
  if (transState == 'END') {
48361
48505
  _this.updatePlannerView('UPDATE_PLANNER_TRANS');
48362
- (_this$updateElementSe3 = _this.updateElementSelectionPlanner) === null || _this$updateElementSe3 === void 0 || _this$updateElementSe3.call(_this, [setId], [plannerElementID], true);
48506
+ (_this$view32 = _this.view) === null || _this$view32 === void 0 || _this$view32.updateElementSelectionPlanner([setId], [plannerElementID], true);
48363
48507
  }
48364
48508
  case 3:
48365
48509
  case "end":
@@ -48377,10 +48521,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48377
48521
  * @param avoidUpdateRendering If this parameter is set to true, the function only updates the viewPointHandler - no rendering is made.
48378
48522
  */
48379
48523
  _defineProperty__default["default"](this, "handle3DVisualizationChanged", function (mode, params, avoidUpdateRendering) {
48380
- var _this$getDoShow3DDime;
48524
+ var _this$view33;
48381
48525
  var set = _this.actSet();
48382
48526
  if (!set) return;
48383
- setHandlerInstance.handle3DVisualizationChanged(set, mode, params, (_this$getDoShow3DDime = _this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime === void 0 ? void 0 : _this$getDoShow3DDime.call(_this));
48527
+ setHandlerInstance.handle3DVisualizationChanged(set, mode, params, (_this$view33 = _this.view) === null || _this$view33 === void 0 ? void 0 : _this$view33.getDoShow3DDimensionLines());
48384
48528
  if (avoidUpdateRendering) return;
48385
48529
  if (mode != 'Nav3DFullScreen') {
48386
48530
  _this.updatePlannerView('HANDLE_3D_VIS_CHANGED');
@@ -48388,7 +48532,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48388
48532
  });
48389
48533
  _defineProperty__default["default"](this, "updateAccessoireQuantity", /*#__PURE__*/function () {
48390
48534
  var _ref10 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee10(accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle) {
48391
- var _this$actions11, _this$actions11$toggl, _this$actions12, _this$actions12$toggl;
48535
+ var _this$actions11, _this$actions11$toggl, _this$actions12, _this$actions12$toggl, _this$view34;
48392
48536
  var set, ret;
48393
48537
  return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context10) {
48394
48538
  while (1) switch (_context10.prev = _context10.next) {
@@ -48403,7 +48547,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48403
48547
  if (ret.somethingChanged) _this.updateConfigStructure();
48404
48548
  _this.updatePlannerView('UPDATE_ACC_QUANTITY');
48405
48549
  _this.updatePriceInView();
48406
- _this.updateViewButtonsDependigOnConfigStructure();
48550
+ (_this$view34 = _this.view) === null || _this$view34 === void 0 || _this$view34.updateViewButtonsDependigOnConfigStructure();
48407
48551
  _this.checkMatchingProducts('onAccessoireUpdate');
48408
48552
  _this.plannerChangeLog('onUpdateAccessoireQuantity');
48409
48553
  case 12:
@@ -48418,7 +48562,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48418
48562
  }());
48419
48563
  _defineProperty__default["default"](this, "deleteAccessoire", /*#__PURE__*/function () {
48420
48564
  var _ref11 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(articleCodex, parentBasketId) {
48421
- var set, wasDeleted, _this$updateViewPlann6;
48565
+ var set, wasDeleted, _this$view35, _this$view36;
48422
48566
  return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context11) {
48423
48567
  while (1) switch (_context11.prev = _context11.next) {
48424
48568
  case 0:
@@ -48429,10 +48573,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48429
48573
  wasDeleted = _context11.sent;
48430
48574
  if (wasDeleted) {
48431
48575
  _this.updateConfigStructure();
48432
- (_this$updateViewPlann6 = _this.updateViewPlannerElements) === null || _this$updateViewPlann6 === void 0 || _this$updateViewPlann6.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
48576
+ (_this$view35 = _this.view) === null || _this$view35 === void 0 || _this$view35.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
48433
48577
  _this.updatePlannerView('DELETE_ACC');
48434
48578
  _this.updatePriceInView();
48435
- _this.updateViewButtonsDependigOnConfigStructure();
48579
+ (_this$view36 = _this.view) === null || _this$view36 === void 0 || _this$view36.updateViewButtonsDependigOnConfigStructure();
48436
48580
  }
48437
48581
  _this.checkMatchingProducts('onAccessoireDelete');
48438
48582
  _this.plannerChangeLog('onDeletePlanner');
@@ -48448,14 +48592,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48448
48592
  };
48449
48593
  }());
48450
48594
  _defineProperty__default["default"](this, "loadPaletteInfos", function (configStepKey, activeArticles, targetArticles) {
48451
- var _this$updateViewPlann7;
48595
+ var _this$view37, _this$view38, _this$view39;
48452
48596
  var set = _this.actSet();
48453
48597
  if (!set) return;
48454
48598
  var retValues = setHandlerInstance.loadPaletteInfos(set, configStepKey, activeArticles, targetArticles);
48455
48599
  if (!retValues.articleInfos) return;
48456
- _this.updatePaletteInfos(retValues.articleInfos, retValues.doShowConfigSingle, retValues.isConfigSingle, retValues.bbox);
48457
- (_this$updateViewPlann7 = _this.updateViewPlannerElements) === null || _this$updateViewPlann7 === void 0 || _this$updateViewPlann7.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
48458
- _this.updateElementSelectionConfig(retValues.articleInfos, _this.doAllowSetPlanner());
48600
+ (_this$view37 = _this.view) === null || _this$view37 === void 0 || _this$view37.updatePaletteInfos(retValues.articleInfos, retValues.doShowConfigSingle, retValues.isConfigSingle, retValues.bbox);
48601
+ (_this$view38 = _this.view) === null || _this$view38 === void 0 || _this$view38.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
48602
+ (_this$view39 = _this.view) === null || _this$view39 === void 0 || _this$view39.updateElementSelectionConfig(retValues.articleInfos, _this.doAllowSetPlanner());
48459
48603
  });
48460
48604
  _defineProperty__default["default"](this, "getBasketIdsOfElementIdLogic", function (elementId) {
48461
48605
  return setHandlerInstance.getBasketIdOfElementId(_this.actSet(), elementId);
@@ -48505,51 +48649,56 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48505
48649
  //onConfigItemClick ist ein Click auf das Item der ConfigPalette um die OPV zu ändern
48506
48650
  _defineProperty__default["default"](this, "doConfigure", /*#__PURE__*/function () {
48507
48651
  var _ref13 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents, eventKey) {
48508
- var _this$actions13, _this$actions13$toggl, _this$actions14, _this$actions14$toggl;
48509
- var set, returnValues, structure, _returnValues$element, _this$updateViewPlann8, _this$updateElementSe4;
48652
+ var _this$actions13, _this$actions13$toggl;
48653
+ var set, returnValues, _this$actions14, _this$actions14$toggl, structure, _this$view40, _returnValues$element, _this$view43, _this$view41, _this$view42;
48510
48654
  return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context13) {
48511
48655
  while (1) switch (_context13.prev = _context13.next) {
48512
48656
  case 0:
48513
48657
  set = _this.actSet();
48514
48658
  (_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);
48515
- _context13.next = 4;
48659
+ _context13.prev = 2;
48660
+ _context13.next = 5;
48516
48661
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, myValues, targetArticles, undefined, 'FromViewClick');
48517
- case 4:
48662
+ case 5:
48518
48663
  returnValues = _context13.sent;
48664
+ case 6:
48665
+ _context13.prev = 6;
48519
48666
  (_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);
48667
+ return _context13.finish(6);
48668
+ case 9:
48520
48669
  structure = setHandlerInstance.loadConfigStructureOfActSet(set, _this.getCurPlannerType());
48521
48670
  _this.checkMatchingProducts('onConfig');
48522
48671
  if (dontUpdatePlannerView) {
48523
- _context13.next = 18;
48672
+ _context13.next = 21;
48524
48673
  break;
48525
48674
  }
48526
- _this.updateConfiguratorStructure(structure);
48675
+ (_this$view40 = _this.view) === null || _this$view40 === void 0 || _this$view40.updateConfiguratorStructure(structure);
48527
48676
  if (returnValues.articleCountChanged) {
48528
- (_this$updateViewPlann8 = _this.updateViewPlannerElements) === null || _this$updateViewPlann8 === void 0 || _this$updateViewPlann8.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
48677
+ (_this$view41 = _this.view) === null || _this$view41 === void 0 || _this$view41.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
48529
48678
  }
48530
48679
  if ((_returnValues$element = returnValues.elementIdsToUpdateSelection) !== null && _returnValues$element !== void 0 && _returnValues$element.length) {
48531
- (_this$updateElementSe4 = _this.updateElementSelectionPlanner) === null || _this$updateElementSe4 === void 0 || _this$updateElementSe4.call(_this, [returnValues.setId], returnValues.elementIdsToUpdateSelection, true, true);
48680
+ (_this$view42 = _this.view) === null || _this$view42 === void 0 || _this$view42.updateElementSelectionPlanner([returnValues.setId], returnValues.elementIdsToUpdateSelection, true, true);
48532
48681
  }
48533
48682
  _this.updatePriceInView();
48534
- _this.updateViewButtonsDependigOnConfigStructure();
48683
+ (_this$view43 = _this.view) === null || _this$view43 === void 0 || _this$view43.updateViewButtonsDependigOnConfigStructure();
48535
48684
  _this.updatePlannerView('DO_CONFIGURE', myValues);
48536
48685
  _this.updateWebConfiguratorTitle();
48537
- _context13.next = 18;
48686
+ _context13.next = 21;
48538
48687
  return _this.getFreePlacesOnGrids(undefined, 'doConfigure');
48539
- case 18:
48688
+ case 21:
48540
48689
  if (dontCallEvents) {
48541
- _context13.next = 21;
48690
+ _context13.next = 24;
48542
48691
  break;
48543
48692
  }
48544
- _context13.next = 21;
48693
+ _context13.next = 24;
48545
48694
  return _this.fillBaksetforOnWebPlanerConfigChange(myValues, undefined, eventKey);
48546
- case 21:
48695
+ case 24:
48547
48696
  _this.configuratorChangeLog('onConfigurationChange', myValues);
48548
- case 22:
48697
+ case 25:
48549
48698
  case "end":
48550
48699
  return _context13.stop();
48551
48700
  }
48552
- }, _callee13);
48701
+ }, _callee13, null, [[2,, 6, 9]]);
48553
48702
  }));
48554
48703
  return function (_x47, _x48, _x49, _x50, _x51) {
48555
48704
  return _ref13.apply(this, arguments);
@@ -48631,9 +48780,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48631
48780
  return returnTo;
48632
48781
  });
48633
48782
  _defineProperty__default["default"](this, "addToBasketEventFunction", function (e) {
48634
- var _this$onClickAddToBas, _this$onClickAddToBas2;
48635
- if (e.type == 'addToBasket') (_this$onClickAddToBas = _this.onClickAddToBasket) === null || _this$onClickAddToBas === void 0 || _this$onClickAddToBas.call(_this);
48636
- if (e.type == 'saveBasket') (_this$onClickAddToBas2 = _this.onClickAddToBasket) === null || _this$onClickAddToBas2 === void 0 || _this$onClickAddToBas2.call(_this, undefined, 'onAddToBasket', true);
48783
+ var _this$view44, _this$view45;
48784
+ if (e.type == 'addToBasket') (_this$view44 = _this.view) === null || _this$view44 === void 0 || _this$view44.onClickAddToBasket();
48785
+ if (e.type == 'saveBasket') (_this$view45 = _this.view) === null || _this$view45 === void 0 || _this$view45.onClickAddToBasket(undefined, 'onAddToBasket', true);
48637
48786
  });
48638
48787
  this.plannerConfig = Object.assign(plannerConfig, {});
48639
48788
  this.actions = plannerConfig.actions;
@@ -48646,7 +48795,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48646
48795
  key: "initialize",
48647
48796
  value: function () {
48648
48797
  var _initialize = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(cache) {
48649
- var viewReadyPromise, loadSuccessful, ret, set, _this$actions15, _this$i18n4, _this$i18n5, initializationId;
48798
+ var _this$view46;
48799
+ var viewReadyPromise, loadSuccessful, _ret, set, _this$actions15, _this$i18n4, _this$i18n5, initializationId;
48650
48800
  return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context15) {
48651
48801
  while (1) switch (_context15.prev = _context15.next) {
48652
48802
  case 0:
@@ -48666,7 +48816,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48666
48816
  return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
48667
48817
  case 8:
48668
48818
  this.plannerHandler = new DivaPlannerHandler(false);
48669
- viewReadyPromise = this.initViewApiDependencies();
48819
+
48820
+ // Registered by the mounted view — absent when initializing headless (e.g. backoffice DIVA agent).
48821
+ viewReadyPromise = (_this$view46 = this.view) === null || _this$view46 === void 0 ? void 0 : _this$view46.initViewApiDependencies();
48670
48822
  _context15.next = 12;
48671
48823
  return this.divaBasketHandler.initializeBasket(this.api);
48672
48824
  case 12:
@@ -48682,33 +48834,34 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48682
48834
  DivaUtils__default["default"].businessMetrics.setConfiguratorSessionId();
48683
48835
  }
48684
48836
  if (!loadSuccessful) {
48685
- _context15.next = 31;
48837
+ _context15.next = 32;
48686
48838
  break;
48687
48839
  }
48688
48840
  _context15.prev = 15;
48689
48841
  _context15.next = 18;
48690
48842
  return this.initializeSets(loadSuccessful, viewReadyPromise);
48691
48843
  case 18:
48692
- ret = _context15.sent;
48844
+ _ret = _context15.sent;
48693
48845
  set = this.actSet();
48694
- if (ret && set && set.CatalogData.archived) {
48695
- if (this.i18n()) (_this$actions15 = this.actions) === null || _this$actions15 === void 0 || _this$actions15.openModal({
48846
+ if (_ret && set && set.CatalogData.archived) {
48847
+ if (this.i18n() && !this.plannerConfig.suppressErrorModals) (_this$actions15 = this.actions) === null || _this$actions15 === void 0 || _this$actions15.openModal({
48696
48848
  accept: true,
48697
48849
  title: (_this$i18n4 = this.i18n()) === null || _this$i18n4 === void 0 ? void 0 : _this$i18n4.t('configurator.catalog_not_listed_title'),
48698
48850
  text: (_this$i18n5 = this.i18n()) === null || _this$i18n5 === void 0 ? void 0 : _this$i18n5.t('configurator.catalog_not_listed_text')
48699
48851
  });
48700
48852
  }
48701
- return _context15.abrupt("return", ret);
48853
+ return _context15.abrupt("return", _ret);
48702
48854
  case 24:
48703
48855
  _context15.prev = 24;
48704
48856
  _context15.t0 = _context15["catch"](15);
48705
48857
  LOG$2.error(_context15.t0);
48858
+ this.lastInitError = _context15.t0;
48706
48859
  this.onError(_context15.t0);
48707
48860
  return _context15.abrupt("return", false);
48708
- case 29:
48709
- _context15.next = 35;
48861
+ case 30:
48862
+ _context15.next = 36;
48710
48863
  break;
48711
- case 31:
48864
+ case 32:
48712
48865
  this.onError();
48713
48866
  //fehler beim laden vom basket..
48714
48867
  initializationId = this.getInitializationID();
@@ -48716,7 +48869,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48716
48869
  initializationId: initializationId
48717
48870
  }, true);
48718
48871
  return _context15.abrupt("return", false);
48719
- case 35:
48872
+ case 36:
48720
48873
  case "end":
48721
48874
  return _context15.stop();
48722
48875
  }
@@ -48847,7 +49000,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48847
49000
  }, {
48848
49001
  key: "getInitStateForSet",
48849
49002
  value: function getInitStateForSet() {
48850
- var _this$divaBasketHandl, _this$plannerConfig, _this$plannerConfig$s2;
49003
+ var _this$divaBasketHandl,
49004
+ _this$plannerConfig,
49005
+ _this2 = this,
49006
+ _this$plannerConfig$s2;
48851
49007
  var onlyRunLogic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
48852
49008
  return {
48853
49009
  supplierColors: this.plannerConfig.supplierColors,
@@ -48867,7 +49023,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48867
49023
  configuratorTitle: (_this$plannerConfig = this.plannerConfig) !== null && _this$plannerConfig !== void 0 && _this$plannerConfig.configuratorTitle ? decodeURIComponent(this.plannerConfig.configuratorTitle) : undefined,
48868
49024
  doAllowSetPlanner: this.doAllowSetPlanner,
48869
49025
  getPlanning2DAsJpg: this.getPlanning2DAsJpg,
48870
- updateSetImage: this.updateSetImage,
49026
+ updateSetImage: function updateSetImage(url) {
49027
+ var _this2$view;
49028
+ return (_this2$view = _this2.view) === null || _this2$view === void 0 ? void 0 : _this2$view.updateSetImage(url);
49029
+ },
48871
49030
  plannerHandler: this.plannerHandler,
48872
49031
  actions: this.actions,
48873
49032
  divaCatalogs: this.divaCatalogs,
@@ -48888,11 +49047,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48888
49047
  var _e$message,
48889
49048
  _this$actions19,
48890
49049
  _this$state4,
48891
- _this2 = this,
49050
+ _this3 = this,
48892
49051
  _this$actions21,
48893
49052
  _this$actions21$toggl;
48894
49053
  var onErrorHandling = this.api.onErrorHandling();
48895
- var suppressUi = !!(onErrorHandling !== null && onErrorHandling !== void 0 && onErrorHandling.hideErrorMsg);
49054
+ var suppressUi = !!(onErrorHandling !== null && onErrorHandling !== void 0 && onErrorHandling.hideErrorMsg) || !!this.plannerConfig.suppressErrorModals;
48896
49055
  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) {
48897
49056
  var _this$i18n6, _this$i18n7;
48898
49057
  this.actions.openModal({
@@ -48910,7 +49069,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48910
49069
  }
48911
49070
  if (onErrorHandling) {
48912
49071
  var _this$plannerConfig$a2;
48913
- if (!onErrorHandling.hideErrorMsg) {
49072
+ if (!suppressUi) {
48914
49073
  var _this$plannerConfig$a, _this$i18n$t, _this$i18n8, _onErrorHandling$erro;
48915
49074
  var isWeb = this.api.getApplicationEnvironment() == 'WEB';
48916
49075
  (_this$plannerConfig$a = this.plannerConfig.actions) === null || _this$plannerConfig$a === void 0 || _this$plannerConfig$a.openModal({
@@ -48918,9 +49077,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48918
49077
  accept: true,
48919
49078
  callback: function callback(accepted) {
48920
49079
  if (accepted && isWeb) {
48921
- var _this2$state;
48922
- _this2.callEvent('onWebPlanerClose');
48923
- ((_this2$state = _this2.state) === null || _this2$state === void 0 ? void 0 : _this2$state.isFullscreenComponent) && _this2.callEvent('onFullscreenClose');
49080
+ var _this3$state;
49081
+ _this3.callEvent('onWebPlanerClose');
49082
+ ((_this3$state = _this3.state) === null || _this3$state === void 0 ? void 0 : _this3$state.isFullscreenComponent) && _this3.callEvent('onFullscreenClose');
48924
49083
  }
48925
49084
  }
48926
49085
  });
@@ -48984,51 +49143,96 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48984
49143
  value: function getPlannerHandler() {
48985
49144
  return this.plannerHandler;
48986
49145
  }
48987
-
49146
+ }, {
49147
+ key: "reattachView",
49148
+ value: function () {
49149
+ var _reattachView = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee17() {
49150
+ var _this$view47, _this$actSet4, _this$actions22, _this$actions23, _this$actSet$getDivaA2, _this$actSet5;
49151
+ var viewReadyPromise, catalogData, _this$actions24;
49152
+ return _regeneratorRuntime__default["default"].wrap(function _callee17$(_context17) {
49153
+ while (1) switch (_context17.prev = _context17.next) {
49154
+ case 0:
49155
+ viewReadyPromise = (_this$view47 = this.view) === null || _this$view47 === void 0 ? void 0 : _this$view47.initViewApiDependencies();
49156
+ if (!viewReadyPromise) {
49157
+ _context17.next = 4;
49158
+ break;
49159
+ }
49160
+ _context17.next = 4;
49161
+ return viewReadyPromise;
49162
+ case 4:
49163
+ _context17.next = 6;
49164
+ return this.initView();
49165
+ case 6:
49166
+ catalogData = (_this$actSet4 = this.actSet()) === null || _this$actSet4 === void 0 ? void 0 : _this$actSet4.CatalogData;
49167
+ if (catalogData) (_this$actions22 = this.actions) === null || _this$actions22 === void 0 || _this$actions22.onEvent({
49168
+ type: 'onArticlesLoaded',
49169
+ data: {
49170
+ catalogData: catalogData
49171
+ }
49172
+ });
49173
+ (_this$actions23 = this.actions) === null || _this$actions23 === void 0 || _this$actions23.onEvent({
49174
+ type: 'onConfiguratorReady'
49175
+ });
49176
+ 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) {
49177
+ (_this$actions24 = this.actions) === null || _this$actions24 === void 0 || _this$actions24.onEvent({
49178
+ type: 'onArticleInitialized'
49179
+ });
49180
+ }
49181
+ case 10:
49182
+ case "end":
49183
+ return _context17.stop();
49184
+ }
49185
+ }, _callee17, this);
49186
+ }));
49187
+ function reattachView() {
49188
+ return _reattachView.apply(this, arguments);
49189
+ }
49190
+ return reattachView;
49191
+ }()
48988
49192
  /*
48989
49193
  Wenn eine Planung geladen wurde, dann muss die View initialisiert werden
48990
49194
  */
48991
49195
  }, {
48992
49196
  key: "initView",
48993
49197
  value: (function () {
48994
- var _initView = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee17() {
48995
- var _this$initConfigurato;
48996
- var set, plannerMode, _this$initConfigurato2, _this$initPlannerView, _this$initConfigurato3, _this$updateViewButto, _this$updateViewPlann9, _this$onBasketInitial;
48997
- return _regeneratorRuntime__default["default"].wrap(function _callee17$(_context17) {
48998
- while (1) switch (_context17.prev = _context17.next) {
49198
+ var _initView = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee18() {
49199
+ var _this$view48;
49200
+ var set, plannerMode, _this$view49, _this$view50, _this$view51, _this$view52, _this$view53, _this$view54;
49201
+ return _regeneratorRuntime__default["default"].wrap(function _callee18$(_context18) {
49202
+ while (1) switch (_context18.prev = _context18.next) {
48999
49203
  case 0:
49000
49204
  set = this.actSet();
49001
49205
  plannerMode = this.getPlannerMode();
49002
- (_this$initConfigurato = this.initConfiguratorMode) === null || _this$initConfigurato === void 0 || _this$initConfigurato.call(this, plannerMode);
49206
+ (_this$view48 = this.view) === null || _this$view48 === void 0 || _this$view48.initConfiguratorMode(plannerMode);
49003
49207
  if (!(plannerMode == 'ProductList')) {
49004
- _context17.next = 7;
49208
+ _context18.next = 7;
49005
49209
  break;
49006
49210
  }
49007
- (_this$initConfigurato2 = this.initConfiguratorStructure) === null || _this$initConfigurato2 === void 0 || _this$initConfigurato2.call(this, setHandlerInstance.loadConfigStructureForOnlyProductsList());
49008
- _context17.next = 17;
49211
+ (_this$view49 = this.view) === null || _this$view49 === void 0 || _this$view49.initConfiguratorStructure(setHandlerInstance.loadConfigStructureForOnlyProductsList());
49212
+ _context18.next = 17;
49009
49213
  break;
49010
49214
  case 7:
49011
- _context17.next = 9;
49012
- return (_this$initPlannerView = this.initPlannerView) === null || _this$initPlannerView === void 0 ? void 0 : _this$initPlannerView.call(this);
49215
+ _context18.next = 9;
49216
+ return (_this$view50 = this.view) === null || _this$view50 === void 0 ? void 0 : _this$view50.initPlannerView();
49013
49217
  case 9:
49014
49218
  //first load the Configuratorstructure STARTCONFIG
49015
- (_this$initConfigurato3 = this.initConfiguratorStructure) === null || _this$initConfigurato3 === void 0 || _this$initConfigurato3.call(this, setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType()));
49219
+ (_this$view51 = this.view) === null || _this$view51 === void 0 || _this$view51.initConfiguratorStructure(setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType()));
49016
49220
  this.updatePriceInView();
49017
- (_this$updateViewButto = this.updateViewButtonsDependigOnConfigStructure) === null || _this$updateViewButto === void 0 || _this$updateViewButto.call(this);
49221
+ (_this$view52 = this.view) === null || _this$view52 === void 0 || _this$view52.updateViewButtonsDependigOnConfigStructure();
49018
49222
  this.updateWebConfiguratorTitle();
49019
49223
  //initialize planner view
49020
- (_this$updateViewPlann9 = this.updateViewPlannerElements) === null || _this$updateViewPlann9 === void 0 || _this$updateViewPlann9.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set), set.getSetId(), set.firstElementId, true);
49224
+ (_this$view53 = this.view) === null || _this$view53 === void 0 || _this$view53.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set), set.getSetId(), set.firstElementId, true);
49021
49225
  this.updatePlannerView('INIT_VIEW');
49022
- (_this$onBasketInitial = this.onBasketInitialized) === null || _this$onBasketInitial === void 0 || _this$onBasketInitial.call(this);
49226
+ (_this$view54 = this.view) === null || _this$view54 === void 0 || _this$view54.onBasketInitialized();
49023
49227
  this.checkMatchingProducts('onInit');
49024
49228
  case 17:
49025
- _context17.next = 19;
49229
+ _context18.next = 19;
49026
49230
  return this.runInitMode(plannerMode);
49027
49231
  case 19:
49028
49232
  case "end":
49029
- return _context17.stop();
49233
+ return _context18.stop();
49030
49234
  }
49031
- }, _callee17, this);
49235
+ }, _callee18, this);
49032
49236
  }));
49033
49237
  function initView() {
49034
49238
  return _initView.apply(this, arguments);
@@ -49038,42 +49242,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49038
49242
  }, {
49039
49243
  key: "updateWebConfiguratorTitle",
49040
49244
  value: function updateWebConfiguratorTitle() {
49041
- var _this$setWebConifgura, _this$actSet4;
49042
- (_this$setWebConifgura = this.setWebConifguratorTitle) === null || _this$setWebConifgura === void 0 || _this$setWebConifgura.call(this, (_this$actSet4 = this.actSet()) === null || _this$actSet4 === void 0 ? void 0 : _this$actSet4.getSetTitle());
49245
+ var _this$view55, _this$actSet6;
49246
+ (_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());
49043
49247
  }
49044
49248
  }, {
49045
49249
  key: "updateConfigStructure",
49046
49250
  value: function updateConfigStructure() {
49047
- this.updateConfiguratorStructure(setHandlerInstance.loadConfigStructureOfActSet(this.actSet(), this.getCurPlannerType()));
49251
+ var _this$view56;
49252
+ (_this$view56 = this.view) === null || _this$view56 === void 0 || _this$view56.updateConfiguratorStructure(setHandlerInstance.loadConfigStructureOfActSet(this.actSet(), this.getCurPlannerType()));
49048
49253
  }
49049
49254
  }, {
49050
49255
  key: "runInitMode",
49051
49256
  value: function () {
49052
- var _runInitMode = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee18(plannerMode) {
49257
+ var _runInitMode = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee19(plannerMode) {
49053
49258
  var _this$plannerConfig$i, _this$state5;
49054
- var doDefault, _this$navigateToTabGr2, _this$saveToBasketWra, configStepKey, _this$navigateToConfi, _this$actSet5, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
49055
- return _regeneratorRuntime__default["default"].wrap(function _callee18$(_context18) {
49056
- while (1) switch (_context18.prev = _context18.next) {
49259
+ var doDefault, _this$view57, _this$saveToBasketWra, _configStepKey, _this$view58, _this$actSet7, _this$view59, _this$view60, _this$view61;
49260
+ return _regeneratorRuntime__default["default"].wrap(function _callee19$(_context19) {
49261
+ while (1) switch (_context19.prev = _context19.next) {
49057
49262
  case 0:
49058
49263
  doDefault = true;
49059
49264
  if (!['SHOW_PDF'].includes((_this$plannerConfig$i = this.plannerConfig.initMode) !== null && _this$plannerConfig$i !== void 0 ? _this$plannerConfig$i : '')) {
49060
- _context18.next = 9;
49265
+ _context19.next = 9;
49061
49266
  break;
49062
49267
  }
49063
49268
  if (this.plannerConfig.initMode == 'SHOW_PDF') this.ReturnTo = 'OPEN_PDF';
49064
- (_this$navigateToTabGr2 = this.navigateToTabGroup) === null || _this$navigateToTabGr2 === void 0 || _this$navigateToTabGr2.call(this, 'SUMMARY', undefined, true);
49269
+ (_this$view57 = this.view) === null || _this$view57 === void 0 || _this$view57.navigateToTabGroup('SUMMARY', undefined, true);
49065
49270
  //TODO lea bug das hier ist nur ein temporäre lößung https://app.asana.com/0/1200869909950432/1200998848659806
49066
- _context18.next = 6;
49271
+ _context19.next = 6;
49067
49272
  return (_this$saveToBasketWra = this.saveToBasketWrapper) === null || _this$saveToBasketWra === void 0 ? void 0 : _this$saveToBasketWra.call(this);
49068
49273
  case 6:
49069
49274
  doDefault = false;
49070
- _context18.next = 10;
49275
+ _context19.next = 10;
49071
49276
  break;
49072
49277
  case 9:
49073
49278
  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) {
49074
- configStepKey = this.plannerConfig.opt ? setHandlerInstance.getConfigStepKeyOfOption(this.actSet(), this.plannerConfig.opt) : setHandlerInstance.getFirstConfigStep(this.actSet());
49075
- if (configStepKey) {
49076
- (_this$navigateToConfi = this.navigateToConfigStep) === null || _this$navigateToConfi === void 0 || _this$navigateToConfi.call(this, configStepKey, !this.plannerConfig.opt, true);
49279
+ _configStepKey = this.plannerConfig.opt ? setHandlerInstance.getConfigStepKeyOfOption(this.actSet(), this.plannerConfig.opt) : setHandlerInstance.getFirstConfigStep(this.actSet());
49280
+ if (_configStepKey) {
49281
+ (_this$view58 = this.view) === null || _this$view58 === void 0 || _this$view58.navigateToConfigStep(_configStepKey, !this.plannerConfig.opt, true);
49077
49282
  doDefault = false;
49078
49283
  } else {
49079
49284
  LOG$2.warn('Option: ' + this.plannerConfig.opt + ' could not be found');
@@ -49082,18 +49287,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49082
49287
  case 10:
49083
49288
  if (doDefault) {
49084
49289
  if (plannerMode == 'ProductList') {
49085
- (_this$navigateToTabGr3 = this.navigateToTabGroup) === null || _this$navigateToTabGr3 === void 0 || _this$navigateToTabGr3.call(this, 'PRODUCTS');
49086
- } else if ((_this$actSet5 = this.actSet()) !== null && _this$actSet5 !== void 0 && _this$actSet5.hasStaticRoomList) {
49087
- (_this$navigateToTabGr4 = this.navigateToTabGroup) === null || _this$navigateToTabGr4 === void 0 || _this$navigateToTabGr4.call(this, 'ROOMLIST', true);
49290
+ (_this$view59 = this.view) === null || _this$view59 === void 0 || _this$view59.navigateToTabGroup('PRODUCTS');
49291
+ } else if ((_this$actSet7 = this.actSet()) !== null && _this$actSet7 !== void 0 && _this$actSet7.hasStaticRoomList) {
49292
+ (_this$view60 = this.view) === null || _this$view60 === void 0 || _this$view60.navigateToTabGroup('ROOMLIST', true);
49088
49293
  } else {
49089
- (_this$navigateToTabGr5 = this.navigateToTabGroup) === null || _this$navigateToTabGr5 === void 0 || _this$navigateToTabGr5.call(this, this.getCurPlannerType(), true);
49294
+ (_this$view61 = this.view) === null || _this$view61 === void 0 || _this$view61.navigateToTabGroup(this.getCurPlannerType(), true);
49090
49295
  }
49091
49296
  }
49092
49297
  case 11:
49093
49298
  case "end":
49094
- return _context18.stop();
49299
+ return _context19.stop();
49095
49300
  }
49096
- }, _callee18, this);
49301
+ }, _callee19, this);
49097
49302
  }));
49098
49303
  function runInitMode(_x58) {
49099
49304
  return _runInitMode.apply(this, arguments);
@@ -49103,16 +49308,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49103
49308
  }, {
49104
49309
  key: "addSetToActPlanningByDivaNr",
49105
49310
  value: function () {
49106
- var _addSetToActPlanningByDivaNr = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee19(divaNr) {
49107
- var _this$updateViewPlann10;
49311
+ var _addSetToActPlanningByDivaNr = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee20(divaNr) {
49312
+ var _this$view62;
49108
49313
  var set, orderSets, i, orderset, lastSetToInitialize, loadedSet, articlesKeys;
49109
- return _regeneratorRuntime__default["default"].wrap(function _callee19$(_context19) {
49110
- while (1) switch (_context19.prev = _context19.next) {
49314
+ return _regeneratorRuntime__default["default"].wrap(function _callee20$(_context20) {
49315
+ while (1) switch (_context20.prev = _context20.next) {
49111
49316
  case 0:
49112
49317
  set = this.actSet();
49113
49318
  this.divaBasketHandler.updateDivaNrInBasket(divaNr);
49114
49319
  this.divaBasketHandler.setIgnoreInitObjectWhenInitializing();
49115
- _context19.next = 5;
49320
+ _context20.next = 5;
49116
49321
  return this.divaBasketHandler.initializeBasket(this.api);
49117
49322
  case 5:
49118
49323
  orderSets = this.divaBasketHandler.actBasket.OrderSets;
@@ -49120,44 +49325,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49120
49325
  i = 0;
49121
49326
  case 8:
49122
49327
  if (!(i < orderSets.length)) {
49123
- _context19.next = 24;
49328
+ _context20.next = 24;
49124
49329
  break;
49125
49330
  }
49126
49331
  orderset = orderSets[i];
49127
49332
  lastSetToInitialize = setHandlerInstance.getOrderSetShouldInitPlanner(orderSets, i);
49128
49333
  loadedSet = setHandlerInstance.findLoadedSet(this.sets, orderset.CatalogCodex, orderset.AccountGUID);
49129
49334
  if (!loadedSet) {
49130
- _context19.next = 18;
49335
+ _context20.next = 18;
49131
49336
  break;
49132
49337
  }
49133
- _context19.next = 15;
49338
+ _context20.next = 15;
49134
49339
  return setHandlerInstance.addOrderSetArticlesToExistingSet(loadedSet, orderset, lastSetToInitialize);
49135
49340
  case 15:
49136
49341
  this.checkMatchingProducts('onAdd');
49137
- _context19.next = 20;
49342
+ _context20.next = 20;
49138
49343
  break;
49139
49344
  case 18:
49140
- _context19.next = 20;
49345
+ _context20.next = 20;
49141
49346
  return setHandlerInstance.initSet(orderset, this.getInitStateForSet(), lastSetToInitialize);
49142
49347
  case 20:
49143
49348
  this.cleanUpEmptySets(true);
49144
49349
  case 21:
49145
49350
  i++;
49146
- _context19.next = 8;
49351
+ _context20.next = 8;
49147
49352
  break;
49148
49353
  case 24:
49149
49354
  this.divaBasketHandler.actBasket.OrderSets = [];
49150
49355
  this.updatePriceInView();
49151
49356
  this.updateWebConfiguratorTitle();
49152
49357
  this.updateConfigStructure();
49153
- (_this$updateViewPlann10 = this.updateViewPlannerElements) === null || _this$updateViewPlann10 === void 0 || _this$updateViewPlann10.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
49358
+ (_this$view62 = this.view) === null || _this$view62 === void 0 || _this$view62.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
49154
49359
  articlesKeys = Object.keys(this.actSet().getDivaArticles());
49155
49360
  this.loadPaletteInfos(undefined, [articlesKeys[0]], articlesKeys);
49156
49361
  case 31:
49157
49362
  case "end":
49158
- return _context19.stop();
49363
+ return _context20.stop();
49159
49364
  }
49160
- }, _callee19, this);
49365
+ }, _callee20, this);
49161
49366
  }));
49162
49367
  function addSetToActPlanningByDivaNr(_x59) {
49163
49368
  return _addSetToActPlanningByDivaNr.apply(this, arguments);
@@ -49192,26 +49397,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49192
49397
  }, {
49193
49398
  key: "setActSetCurConfigStepKey",
49194
49399
  value: function () {
49195
- var _setActSetCurConfigStepKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee20(curConfigStepKey) {
49400
+ var _setActSetCurConfigStepKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee21(curConfigStepKey) {
49196
49401
  var set;
49197
- return _regeneratorRuntime__default["default"].wrap(function _callee20$(_context20) {
49198
- while (1) switch (_context20.prev = _context20.next) {
49402
+ return _regeneratorRuntime__default["default"].wrap(function _callee21$(_context21) {
49403
+ while (1) switch (_context21.prev = _context21.next) {
49199
49404
  case 0:
49200
49405
  set = this.actSet();
49201
49406
  if (set) {
49202
- _context20.next = 3;
49407
+ _context21.next = 3;
49203
49408
  break;
49204
49409
  }
49205
- return _context20.abrupt("return");
49410
+ return _context21.abrupt("return");
49206
49411
  case 3:
49207
49412
  set.ActConfigStepKey = curConfigStepKey;
49208
- _context20.next = 6;
49413
+ _context21.next = 6;
49209
49414
  return setHandlerInstance.updateNavigation(set);
49210
49415
  case 6:
49211
49416
  case "end":
49212
- return _context20.stop();
49417
+ return _context21.stop();
49213
49418
  }
49214
- }, _callee20, this);
49419
+ }, _callee21, this);
49215
49420
  }));
49216
49421
  function setActSetCurConfigStepKey(_x60) {
49217
49422
  return _setActSetCurConfigStepKey.apply(this, arguments);
@@ -49229,28 +49434,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49229
49434
  return this.divaBasketHandler.getOrderSetsByDivaNr(divaNr);
49230
49435
  }
49231
49436
  }, {
49232
- key: "registerSetHQRenderScript",
49233
- value: function registerSetHQRenderScript(setHQRenderScript) {
49234
- this.setHQRenderScript = setHQRenderScript;
49235
- }
49236
- }, {
49237
- key: "registerSetCamInfo",
49238
- value: function registerSetCamInfo(setCamInfo) {
49239
- this.setCamInfo = setCamInfo;
49240
- }
49241
-
49437
+ key: "updatePlannerView",
49438
+ value:
49242
49439
  /**
49243
49440
  * This function is called when the planner view should be updated
49244
49441
  * @param callingFrom This parameter is used for debug Reasons. It can have information from where in the code the updatePlannerView is called
49245
49442
  * @param viewpoint This parameter is used to send the viewpoint information from the rtv to unity
49246
49443
  */
49247
- }, {
49248
- key: "updatePlannerView",
49249
- value: function updatePlannerView(callingFrom, onDoConfigureValues, hybridInfo) {
49250
- var _this$getCurrentAlter, _set$getAlternateRend, _this$getCurPlannerVi, _this$getDoShow3DDime2, _this$getDoShow3DDime3, _this$getDoShow3DDime4;
49444
+ function updatePlannerView(callingFrom, onDoConfigureValues, hybridInfo) {
49445
+ 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;
49251
49446
  var set = this.actSet();
49252
49447
  if (!set) return;
49253
- var alternateRenderInfo = (_this$getCurrentAlter = this.getCurrentAlternativRendering) === null || _this$getCurrentAlter === void 0 || (_this$getCurrentAlter = _this$getCurrentAlter.call(this)) === null || _this$getCurrentAlter === void 0 ? void 0 : _this$getCurrentAlter[0];
49448
+ 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];
49254
49449
  var alternateRenderInfoExistInSet = (set === null || set === void 0 || (_set$getAlternateRend = set.getAlternateRenderInfo()) === null || _set$getAlternateRend === void 0 ? void 0 : _set$getAlternateRend.length) > 0;
49255
49450
  var doUpdateVP = false;
49256
49451
  if (alternateRenderInfoExistInSet) {
@@ -49278,14 +49473,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49278
49473
  };
49279
49474
  }
49280
49475
  }
49281
- var curPlannerViewMode = (_this$getCurPlannerVi = this.getCurPlannerViewMode) === null || _this$getCurPlannerVi === void 0 ? void 0 : _this$getCurPlannerVi.call(this);
49476
+ var curPlannerViewMode = (_this$view64 = this.view) === null || _this$view64 === void 0 ? void 0 : _this$view64.getCurPlannerViewMode();
49282
49477
  if (!curPlannerViewMode) return;
49283
49478
  LOG$2.debug('updatePlannerView in mode: ' + curPlannerViewMode + '; called from ' + callingFrom);
49284
49479
  //delete me if you see this
49285
49480
 
49286
49481
  switch (curPlannerViewMode) {
49287
49482
  case '3DCOMB':
49288
- setHandlerInstance.update3DPlannerView(true, !hybridInfo || hybridInfo && hybridInfo.focus.adjustZoomInUnity, set, this.getPlannerRenderingSize(), 'STREAM', (_this$getDoShow3DDime2 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime2 === void 0 ? void 0 : _this$getDoShow3DDime2.call(this), alternateRenderInfo, hybridInfo ? {
49483
+ 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 ? {
49289
49484
  focus: hybridInfo.focus,
49290
49485
  forceRTCam: true,
49291
49486
  currentCamera: hybridInfo.currentCamera
@@ -49295,23 +49490,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49295
49490
  case 'RTViewer':
49296
49491
  //Request HQRenderscript + rendering
49297
49492
  //Request new Rendering
49298
- setHandlerInstance.update3DPlannerView(true, true, set, this.getPlannerRenderingSize(), 'STREAM', (_this$getDoShow3DDime3 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime3 === void 0 ? void 0 : _this$getDoShow3DDime3.call(this), alternateRenderInfo, undefined);
49493
+ 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);
49299
49494
  break;
49300
49495
  case '3DImage':
49301
49496
  //Request new Rendering
49302
- setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), 'STREAM', (_this$getDoShow3DDime4 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime4 === void 0 ? void 0 : _this$getDoShow3DDime4.call(this), alternateRenderInfo);
49497
+ 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);
49303
49498
  break;
49304
49499
  case '2DGrid':
49305
- var boundingBox = setHandlerInstance.get2DViewPlannerBoundingBox(set);
49306
- if (boundingBox) {
49307
- var _this$updateViewPlann11;
49308
- (_this$updateViewPlann11 = this.updateViewPlannerElements) === null || _this$updateViewPlann11 === void 0 || _this$updateViewPlann11.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
49309
- this.start2DRender(boundingBox);
49310
- }
49311
- if (['3DImage', '3DCOMB'].includes(this.getInitPlannerViewMode())) {
49312
- var _this$getDoShow3DDime5;
49500
+ var _boundingBox = setHandlerInstance.get2DViewPlannerBoundingBox(set);
49501
+ if (_boundingBox) {
49502
+ var _this$view71;
49503
+ (_this$view71 = this.view) === null || _this$view71 === void 0 || _this$view71.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
49504
+ this.start2DRender(_boundingBox);
49505
+ }
49506
+ 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 : '')) {
49507
+ var _this$view$getPlanner4, _this$view73, _this$view74;
49313
49508
  //update 3D image always even if you are in the 2DGrid mode
49314
- setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), 'STREAM', (_this$getDoShow3DDime5 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime5 === void 0 ? void 0 : _this$getDoShow3DDime5.call(this), alternateRenderInfo);
49509
+ 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);
49315
49510
  }
49316
49511
  break;
49317
49512
  }
@@ -49327,20 +49522,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49327
49522
  }, {
49328
49523
  key: "forceUpdatePlannerView",
49329
49524
  value: function forceUpdatePlannerView(renderSavingMode, doLoadAllAlternateRenderings) {
49525
+ var _this$view$getInitPla2, _this$view75;
49330
49526
  var set = this.actSet();
49331
49527
  this.update2DGrid(set);
49332
- if (['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(this.getInitPlannerViewMode())) {
49333
- var _this$getDoShow3DDime7;
49528
+ 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 : '')) {
49529
+ var _this$view$getPlanner6, _this$view78, _this$view79;
49334
49530
  if (doLoadAllAlternateRenderings) {
49335
49531
  var alternateRenderings = set.CatalogData.alternateRenderingsForSummary;
49336
49532
  for (var i = 0; i < alternateRenderings.length; i++) {
49337
49533
  if (alternateRenderings[i].hideOptionsIn3DImage && alternateRenderings[i].hideOptionsIn3DImage.length > 0) {
49338
- var _this$getDoShow3DDime6;
49339
- setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), renderSavingMode, (_this$getDoShow3DDime6 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime6 === void 0 ? void 0 : _this$getDoShow3DDime6.call(this), alternateRenderings[i]);
49534
+ var _this$view$getPlanner5, _this$view76, _this$view77;
49535
+ 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]);
49340
49536
  }
49341
49537
  }
49342
49538
  }
49343
- setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), renderSavingMode, (_this$getDoShow3DDime7 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime7 === void 0 ? void 0 : _this$getDoShow3DDime7.call(this), undefined, undefined, false);
49539
+ 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);
49344
49540
  }
49345
49541
  }
49346
49542
  }, {
@@ -49351,16 +49547,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49351
49547
  * The rejection MUST be swallowed: the cached promise is awaited by every later capture, so one failed render would break every following save.
49352
49548
  */
49353
49549
  function start2DRender(boundingBox) {
49354
- var _this$updatePlanner2D;
49355
- this.pending2DRender = Promise.resolve((_this$updatePlanner2D = this.updatePlanner2DGrid) === null || _this$updatePlanner2D === void 0 ? void 0 : _this$updatePlanner2D.call(this, boundingBox))["catch"](function (error) {
49550
+ var _this$view80;
49551
+ this.pending2DRender = Promise.resolve((_this$view80 = this.view) === null || _this$view80 === void 0 ? void 0 : _this$view80.updatePlanner2DGrid(boundingBox))["catch"](function (error) {
49356
49552
  LOG$2.error(error instanceof Error ? error : new Error('2D grid render failed: ' + String(error)));
49357
49553
  });
49358
49554
  }
49359
49555
  }, {
49360
49556
  key: "getAlternateRenderingsForSummary",
49361
49557
  value: function getAlternateRenderingsForSummary() {
49362
- var _this$actSet6;
49363
- return (_this$actSet6 = this.actSet()) === null || _this$actSet6 === void 0 || (_this$actSet6 = _this$actSet6.CatalogData) === null || _this$actSet6 === void 0 ? void 0 : _this$actSet6.alternateRenderingsForSummary;
49558
+ var _this$actSet8;
49559
+ 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;
49364
49560
  }
49365
49561
  }, {
49366
49562
  key: "destroyWebPlanner",
@@ -49416,36 +49612,36 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49416
49612
  }, {
49417
49613
  key: "deletePlannerElement",
49418
49614
  value: function () {
49419
- var _deletePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee21(setId, elementId, denyElementSelectionClear) {
49420
- var _this$updateViewPlann12;
49421
- var set, result, _this$updateElementSe5, _this$updateElementSe6;
49422
- return _regeneratorRuntime__default["default"].wrap(function _callee21$(_context21) {
49423
- while (1) switch (_context21.prev = _context21.next) {
49615
+ var _deletePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee22(setId, elementId, denyElementSelectionClear) {
49616
+ var _this$view81, _this$view82;
49617
+ var set, result, _this$view83, _this$view84;
49618
+ return _regeneratorRuntime__default["default"].wrap(function _callee22$(_context22) {
49619
+ while (1) switch (_context22.prev = _context22.next) {
49424
49620
  case 0:
49425
49621
  set = this.sets[setId];
49426
- _context21.next = 3;
49622
+ _context22.next = 3;
49427
49623
  return setHandlerInstance.deleteElementFromSetByElemId(set, elementId, true);
49428
49624
  case 3:
49429
- result = _context21.sent;
49625
+ result = _context22.sent;
49430
49626
  this.updateConfigStructure();
49431
- (_this$updateViewPlann12 = this.updateViewPlannerElements) === null || _this$updateViewPlann12 === void 0 || _this$updateViewPlann12.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
49627
+ (_this$view81 = this.view) === null || _this$view81 === void 0 || _this$view81.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
49432
49628
  this.updatePlannerView('DELETE_PLANNER_ELEMENT');
49433
49629
  this.updateWebConfiguratorTitle();
49434
- this.updateViewButtonsDependigOnConfigStructure();
49630
+ (_this$view82 = this.view) === null || _this$view82 === void 0 || _this$view82.updateViewButtonsDependigOnConfigStructure();
49435
49631
  if (!denyElementSelectionClear) {
49436
- if (result.selectElementId) (_this$updateElementSe5 = this.updateElementSelectionPlanner) === null || _this$updateElementSe5 === void 0 || _this$updateElementSe5.call(this, [result.setId], [result.selectElementId], true);else (_this$updateElementSe6 = this.updateElementSelectionPlanner) === null || _this$updateElementSe6 === void 0 || _this$updateElementSe6.call(this, [], [], true);
49632
+ 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);
49437
49633
  }
49438
49634
  this.updatePriceInView();
49439
49635
  this.checkMatchingProducts('onDelete');
49440
- _context21.next = 14;
49636
+ _context22.next = 14;
49441
49637
  return this.getFreePlacesOnGrids(undefined, 'deleteElement');
49442
49638
  case 14:
49443
49639
  this.plannerChangeLog('onDeletePlanner');
49444
49640
  case 15:
49445
49641
  case "end":
49446
- return _context21.stop();
49642
+ return _context22.stop();
49447
49643
  }
49448
- }, _callee21, this);
49644
+ }, _callee22, this);
49449
49645
  }));
49450
49646
  function deletePlannerElement(_x61, _x62, _x63) {
49451
49647
  return _deletePlannerElement.apply(this, arguments);
@@ -49460,26 +49656,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49460
49656
  }, {
49461
49657
  key: "movePlannerElement",
49462
49658
  value: (function () {
49463
- var _movePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee22(setId, elementId, curConfigKey, absoluteIndex) {
49464
- var _this$updateViewPlann13;
49659
+ var _movePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee23(setId, elementId, curConfigKey, absoluteIndex) {
49660
+ var _this$view85, _this$view86;
49465
49661
  var set;
49466
- return _regeneratorRuntime__default["default"].wrap(function _callee22$(_context22) {
49467
- while (1) switch (_context22.prev = _context22.next) {
49662
+ return _regeneratorRuntime__default["default"].wrap(function _callee23$(_context23) {
49663
+ while (1) switch (_context23.prev = _context23.next) {
49468
49664
  case 0:
49469
49665
  set = this.sets[setId];
49470
- _context22.next = 3;
49666
+ _context23.next = 3;
49471
49667
  return setHandlerInstance.movePlannerElement(set, elementId, absoluteIndex);
49472
49668
  case 3:
49473
49669
  this.updateConfigStructure();
49474
- (_this$updateViewPlann13 = this.updateViewPlannerElements) === null || _this$updateViewPlann13 === void 0 || _this$updateViewPlann13.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
49670
+ (_this$view85 = this.view) === null || _this$view85 === void 0 || _this$view85.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
49475
49671
  this.updatePlannerView('MOVE_PLANNER_ELEMENT');
49476
49672
  this.updatePriceInView();
49477
- this.updateViewButtonsDependigOnConfigStructure();
49673
+ (_this$view86 = this.view) === null || _this$view86 === void 0 || _this$view86.updateViewButtonsDependigOnConfigStructure();
49478
49674
  case 8:
49479
49675
  case "end":
49480
- return _context22.stop();
49676
+ return _context23.stop();
49481
49677
  }
49482
- }, _callee22, this);
49678
+ }, _callee23, this);
49483
49679
  }));
49484
49680
  function movePlannerElement(_x64, _x65, _x66, _x67) {
49485
49681
  return _movePlannerElement.apply(this, arguments);
@@ -49496,42 +49692,42 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49496
49692
  }, {
49497
49693
  key: "copyPlannerElement",
49498
49694
  value: (function () {
49499
- var _copyPlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee23(setId, elementId, curConfigKey, copyInfo) {
49500
- var _this$updateViewPlann14;
49501
- var set, newSelectedArticle, newConfigStepKey, _this$updateElementSe7, baseArticle;
49502
- return _regeneratorRuntime__default["default"].wrap(function _callee23$(_context23) {
49503
- while (1) switch (_context23.prev = _context23.next) {
49695
+ var _copyPlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee24(setId, elementId, curConfigKey, copyInfo) {
49696
+ var _this$view87, _this$view88;
49697
+ var set, newSelectedArticle, newConfigStepKey, _this$view89, baseArticle;
49698
+ return _regeneratorRuntime__default["default"].wrap(function _callee24$(_context24) {
49699
+ while (1) switch (_context24.prev = _context24.next) {
49504
49700
  case 0:
49505
49701
  if (copyInfo) {
49506
- _context23.next = 2;
49702
+ _context24.next = 2;
49507
49703
  break;
49508
49704
  }
49509
- return _context23.abrupt("return");
49705
+ return _context24.abrupt("return");
49510
49706
  case 2:
49511
49707
  set = this.sets[setId];
49512
- _context23.next = 5;
49708
+ _context24.next = 5;
49513
49709
  return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
49514
49710
  case 5:
49515
- newSelectedArticle = _context23.sent;
49711
+ newSelectedArticle = _context24.sent;
49516
49712
  this.updateConfigStructure();
49517
- (_this$updateViewPlann14 = this.updateViewPlannerElements) === null || _this$updateViewPlann14 === void 0 || _this$updateViewPlann14.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
49713
+ (_this$view87 = this.view) === null || _this$view87 === void 0 || _this$view87.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
49518
49714
  this.updatePlannerView('COPY_PLANNER_ELEMENT');
49519
49715
  this.updatePriceInView();
49520
- this.updateViewButtonsDependigOnConfigStructure();
49716
+ (_this$view88 = this.view) === null || _this$view88 === void 0 || _this$view88.updateViewButtonsDependigOnConfigStructure();
49521
49717
  newConfigStepKey = undefined;
49522
49718
  if (newSelectedArticle != undefined) {
49523
49719
  newConfigStepKey = set.configTree.getNewConfigStepKeyByBasketId(curConfigKey, newSelectedArticle.basketId);
49524
49720
  this.loadPaletteInfos(curConfigKey, [newSelectedArticle.basketId], Object.keys(set.getDivaArticles()));
49525
49721
  baseArticle = setHandlerInstance.getBaseParentArticleOfAccessoire(set, newSelectedArticle.basketId);
49526
- (_this$updateElementSe7 = this.updateElementSelectionPlanner) === null || _this$updateElementSe7 === void 0 || _this$updateElementSe7.call(this, [baseArticle.setId], [baseArticle.elementId], true);
49722
+ (_this$view89 = this.view) === null || _this$view89 === void 0 || _this$view89.updateElementSelectionPlanner([baseArticle.setId], [baseArticle.elementId], true);
49527
49723
  }
49528
49724
  this.checkMatchingProducts('onCopy');
49529
- return _context23.abrupt("return", newConfigStepKey);
49725
+ return _context24.abrupt("return", newConfigStepKey);
49530
49726
  case 15:
49531
49727
  case "end":
49532
- return _context23.stop();
49728
+ return _context24.stop();
49533
49729
  }
49534
- }, _callee23, this);
49730
+ }, _callee24, this);
49535
49731
  }));
49536
49732
  function copyPlannerElement(_x68, _x69, _x70, _x71) {
49537
49733
  return _copyPlannerElement.apply(this, arguments);
@@ -49562,48 +49758,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49562
49758
  }, {
49563
49759
  key: "getFreePlacesOnGrids",
49564
49760
  value: function () {
49565
- var _getFreePlacesOnGrids = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee24(gridGroup, from) {
49566
- var _this$updateFreePlace;
49761
+ var _getFreePlacesOnGrids = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee25(gridGroup, from) {
49762
+ var _this$view90;
49567
49763
  var set, freeShelfGrids, plannedShelfGrids;
49568
- return _regeneratorRuntime__default["default"].wrap(function _callee24$(_context24) {
49569
- while (1) switch (_context24.prev = _context24.next) {
49764
+ return _regeneratorRuntime__default["default"].wrap(function _callee25$(_context25) {
49765
+ while (1) switch (_context25.prev = _context25.next) {
49570
49766
  case 0:
49571
49767
  set = this.actSet();
49572
49768
  if (set) {
49573
- _context24.next = 3;
49769
+ _context25.next = 3;
49574
49770
  break;
49575
49771
  }
49576
49772
  throw new Error('getFreePlacesOnGrids: act set is not defined!');
49577
49773
  case 3:
49578
49774
  if (!gridGroup) {
49579
- _context24.next = 9;
49775
+ _context25.next = 9;
49580
49776
  break;
49581
49777
  }
49582
- _context24.next = 6;
49778
+ _context25.next = 6;
49583
49779
  return setHandlerInstance.getFreeShelfGrids(set, gridGroup);
49584
49780
  case 6:
49585
- _context24.t0 = _context24.sent;
49586
- _context24.next = 10;
49781
+ _context25.t0 = _context25.sent;
49782
+ _context25.next = 10;
49587
49783
  break;
49588
49784
  case 9:
49589
- _context24.t0 = undefined;
49785
+ _context25.t0 = undefined;
49590
49786
  case 10:
49591
- freeShelfGrids = _context24.t0;
49787
+ freeShelfGrids = _context25.t0;
49592
49788
  plannedShelfGrids = setHandlerInstance.getPlannedShelfGrids(set);
49593
49789
  LOG$2.debug('update free from: ' + from, 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
49594
- (_this$updateFreePlace = this.updateFreePlacesOnGrids) === null || _this$updateFreePlace === void 0 || _this$updateFreePlace.call(this, {
49790
+ (_this$view90 = this.view) === null || _this$view90 === void 0 || _this$view90.updateFreePlacesOnGrids({
49595
49791
  freeShelfGrids: freeShelfGrids,
49596
49792
  plannedShelfGrids: plannedShelfGrids
49597
49793
  });
49598
- return _context24.abrupt("return", {
49794
+ return _context25.abrupt("return", {
49599
49795
  freeShelfGrids: freeShelfGrids,
49600
49796
  plannedShelfGrids: plannedShelfGrids
49601
49797
  });
49602
49798
  case 15:
49603
49799
  case "end":
49604
- return _context24.stop();
49800
+ return _context25.stop();
49605
49801
  }
49606
- }, _callee24, this);
49802
+ }, _callee25, this);
49607
49803
  }));
49608
49804
  function getFreePlacesOnGrids(_x72, _x73) {
49609
49805
  return _getFreePlacesOnGrids.apply(this, arguments);
@@ -49621,34 +49817,34 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49621
49817
  }, {
49622
49818
  key: "moveShelfItemToGrid",
49623
49819
  value: function () {
49624
- var _moveShelfItemToGrid = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee25(accessoireBasketId, parentBasketId, gridName, cellIndex) {
49820
+ var _moveShelfItemToGrid = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee26(accessoireBasketId, parentBasketId, gridName, cellIndex) {
49625
49821
  var set, newGridId;
49626
- return _regeneratorRuntime__default["default"].wrap(function _callee25$(_context25) {
49627
- while (1) switch (_context25.prev = _context25.next) {
49822
+ return _regeneratorRuntime__default["default"].wrap(function _callee26$(_context26) {
49823
+ while (1) switch (_context26.prev = _context26.next) {
49628
49824
  case 0:
49629
49825
  set = this.actSet();
49630
49826
  if (set) {
49631
- _context25.next = 3;
49827
+ _context26.next = 3;
49632
49828
  break;
49633
49829
  }
49634
- return _context25.abrupt("return");
49830
+ return _context26.abrupt("return");
49635
49831
  case 3:
49636
- _context25.next = 5;
49832
+ _context26.next = 5;
49637
49833
  return setHandlerInstance.moveShelfItemToGrid(set, accessoireBasketId, parentBasketId, gridName, cellIndex);
49638
49834
  case 5:
49639
- newGridId = _context25.sent;
49835
+ newGridId = _context26.sent;
49640
49836
  this.updatePlannerView('MOVE_SHELF_ITEM');
49641
49837
  if (!newGridId) {
49642
- _context25.next = 10;
49838
+ _context26.next = 10;
49643
49839
  break;
49644
49840
  }
49645
- _context25.next = 10;
49841
+ _context26.next = 10;
49646
49842
  return this.getFreePlacesOnGrids(newGridId, 'move shelf');
49647
49843
  case 10:
49648
49844
  case "end":
49649
- return _context25.stop();
49845
+ return _context26.stop();
49650
49846
  }
49651
- }, _callee25, this);
49847
+ }, _callee26, this);
49652
49848
  }));
49653
49849
  function moveShelfItemToGrid(_x74, _x75, _x76, _x77) {
49654
49850
  return _moveShelfItemToGrid.apply(this, arguments);
@@ -49672,25 +49868,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49672
49868
  }, {
49673
49869
  key: "resetArticle",
49674
49870
  value: function () {
49675
- var _resetArticle = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee26(basketId) {
49871
+ var _resetArticle = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee27(basketId) {
49676
49872
  var set;
49677
- return _regeneratorRuntime__default["default"].wrap(function _callee26$(_context26) {
49678
- while (1) switch (_context26.prev = _context26.next) {
49873
+ return _regeneratorRuntime__default["default"].wrap(function _callee27$(_context27) {
49874
+ while (1) switch (_context27.prev = _context27.next) {
49679
49875
  case 0:
49680
49876
  set = this.actSet();
49681
49877
  if (set) {
49682
- _context26.next = 3;
49878
+ _context27.next = 3;
49683
49879
  break;
49684
49880
  }
49685
- return _context26.abrupt("return");
49881
+ return _context27.abrupt("return");
49686
49882
  case 3:
49687
- _context26.next = 5;
49883
+ _context27.next = 5;
49688
49884
  return setHandlerInstance.resetArticle(set, basketId);
49689
49885
  case 5:
49690
49886
  case "end":
49691
- return _context26.stop();
49887
+ return _context27.stop();
49692
49888
  }
49693
- }, _callee26, this);
49889
+ }, _callee27, this);
49694
49890
  }));
49695
49891
  function resetArticle(_x78) {
49696
49892
  return _resetArticle.apply(this, arguments);
@@ -49710,22 +49906,22 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49710
49906
  }, {
49711
49907
  key: "changeOnFavorites",
49712
49908
  value: function changeOnFavorites(opt, opvs, targetArticles, remove) {
49713
- var _this$actions22;
49714
- favoritesHandlerInstance.changeOnFavorites(this.actSet(), opt, opvs, targetArticles, remove, (_this$actions22 = this.actions) === null || _this$actions22 === void 0 ? void 0 : _this$actions22.openModal);
49909
+ var _this$actions25;
49910
+ favoritesHandlerInstance.changeOnFavorites(this.actSet(), opt, opvs, targetArticles, remove, (_this$actions25 = this.actions) === null || _this$actions25 === void 0 ? void 0 : _this$actions25.openModal);
49715
49911
  }
49716
49912
  }, {
49717
49913
  key: "setDifferentOptions",
49718
49914
  value: function setDifferentOptions(options) {
49719
- var _this$actSet7;
49720
- (_this$actSet7 = this.actSet()) === null || _this$actSet7 === void 0 || _this$actSet7.setDifferentOptions(options);
49915
+ var _this$actSet9;
49916
+ (_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 || _this$actSet9.setDifferentOptions(options);
49721
49917
  }
49722
49918
  }, {
49723
49919
  key: "checkMatchingProducts",
49724
49920
  value: function () {
49725
- var _checkMatchingProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee27(from) {
49921
+ var _checkMatchingProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee28(from) {
49726
49922
  var set, _set$getMatchingProdu, _set$getMatchingOrigP, _set$getMatchingOrigP2, _set$getMatchingProdu2;
49727
- return _regeneratorRuntime__default["default"].wrap(function _callee27$(_context27) {
49728
- while (1) switch (_context27.prev = _context27.next) {
49923
+ return _regeneratorRuntime__default["default"].wrap(function _callee28$(_context28) {
49924
+ while (1) switch (_context28.prev = _context28.next) {
49729
49925
  case 0:
49730
49926
  set = this.actSet();
49731
49927
  if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
@@ -49739,18 +49935,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49739
49935
  }
49740
49936
  }
49741
49937
  if (!(set !== null && set !== void 0 && set.api.doCheckForProductsMatch())) {
49742
- _context27.next = 6;
49938
+ _context28.next = 6;
49743
49939
  break;
49744
49940
  }
49745
- _context27.next = 5;
49941
+ _context28.next = 5;
49746
49942
  return productHandlerInstance.updateProducts(this.setsAsArray, this.api, this.divaBasketHandler.divaWWSHandler, from);
49747
49943
  case 5:
49748
49944
  this.updatePriceInView();
49749
49945
  case 6:
49750
49946
  case "end":
49751
- return _context27.stop();
49947
+ return _context28.stop();
49752
49948
  }
49753
- }, _callee27, this);
49949
+ }, _callee28, this);
49754
49950
  }));
49755
49951
  function checkMatchingProducts(_x79) {
49756
49952
  return _checkMatchingProducts.apply(this, arguments);
@@ -49764,9 +49960,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49764
49960
  }, {
49765
49961
  key: "updatePriceInView",
49766
49962
  value: function updatePriceInView() {
49767
- var _this$updateBBox, _this$updatePrice, _this$actSet8, _this$actSet9;
49768
- (_this$updateBBox = this.updateBBox) === null || _this$updateBBox === void 0 || _this$updateBBox.call(this, setHandlerInstance.getBBoxObject(this.actSet()));
49769
- (_this$updatePrice = this.updatePrice) === null || _this$updatePrice === void 0 || _this$updatePrice.call(this, setHandlerInstance.getTotalViewPrice(this.sets), this.actSet().getViewSetPrice(), setHandlerInstance.getTotalViewBruttoPrice(this.sets), undefined, (_this$actSet8 = this.actSet()) === null || _this$actSet8 === void 0 ? void 0 : _this$actSet8.getCustomDimensionsOfActSet(), (_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.setHash);
49963
+ var _this$view91, _this$view92, _this$actSet10, _this$actSet11;
49964
+ (_this$view91 = this.view) === null || _this$view91 === void 0 || _this$view91.updateBBox(setHandlerInstance.getBBoxObject(this.actSet()));
49965
+ (_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);
49770
49966
  }
49771
49967
 
49772
49968
  /**
@@ -49781,8 +49977,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49781
49977
  }, {
49782
49978
  key: "showModal",
49783
49979
  value: function showModal(data) {
49784
- var _this$actions23;
49785
- (_this$actions23 = this.actions) === null || _this$actions23 === void 0 || _this$actions23.openModal(data);
49980
+ var _this$actions26;
49981
+ (_this$actions26 = this.actions) === null || _this$actions26 === void 0 || _this$actions26.openModal(data);
49786
49982
  }
49787
49983
  }, {
49788
49984
  key: "logGA",
@@ -49801,25 +49997,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49801
49997
  }, {
49802
49998
  key: "callEvent",
49803
49999
  value: function callEvent(event, param) {
49804
- var _this$actions24, _this$actions25, _this$actions26, _this$actions27;
50000
+ var _this$actions27, _this$actions28, _this$actions29, _this$actions30;
49805
50001
  switch (event) {
49806
50002
  case 'onFullscreenClose':
49807
- (_this$actions24 = this.actions) === null || _this$actions24 === void 0 || _this$actions24.onEvent({
50003
+ (_this$actions27 = this.actions) === null || _this$actions27 === void 0 || _this$actions27.onEvent({
49808
50004
  type: 'onFullscreenClose'
49809
50005
  });
49810
50006
  break;
49811
50007
  case 'onWebPlanerClose':
49812
- (_this$actions25 = this.actions) === null || _this$actions25 === void 0 || _this$actions25.onEvent({
50008
+ (_this$actions28 = this.actions) === null || _this$actions28 === void 0 || _this$actions28.onEvent({
49813
50009
  type: 'onWebPlanerClose'
49814
50010
  });
49815
50011
  break;
49816
50012
  case 'onWebPlanerHelp':
49817
- (_this$actions26 = this.actions) === null || _this$actions26 === void 0 || _this$actions26.onEvent({
50013
+ (_this$actions29 = this.actions) === null || _this$actions29 === void 0 || _this$actions29.onEvent({
49818
50014
  type: 'onWebPlanerHelp'
49819
50015
  });
49820
50016
  break;
49821
50017
  case 'onWebPlanerZoomClick':
49822
- (_this$actions27 = this.actions) === null || _this$actions27 === void 0 || _this$actions27.onEvent({
50018
+ (_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.onEvent({
49823
50019
  type: 'onWebPlanerZoomClick',
49824
50020
  data: param
49825
50021
  });
@@ -49829,81 +50025,81 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49829
50025
  }, {
49830
50026
  key: "saveToBasketWrapper",
49831
50027
  value: function () {
49832
- var _saveToBasketWrapper = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee28(event, repairOnly, returnToParam, hideLoading) {
49833
- var _this$actions28,
49834
- _this$actions28$toggl,
49835
- _this$actions29,
49836
- _this$actions29$toggl,
49837
- _this3 = this,
49838
- _this$actions33,
50028
+ var _saveToBasketWrapper = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(event, repairOnly, returnToParam, hideLoading) {
50029
+ var _this$actions31,
50030
+ _this$actions31$toggl,
50031
+ _this$actions32,
50032
+ _this$actions32$toggl,
50033
+ _this4 = this,
50034
+ _this$actions36,
49839
50035
  _this$i18n18;
49840
- var returnTo, finalEvent, result, _this$actions30, _this$i18n12, _this$i18n13, _this$actions31, _this$i18n14, _this$i18n15, _this$actions32, _this$i18n16, _this$i18n17, _this$updatePlannerMs2;
49841
- return _regeneratorRuntime__default["default"].wrap(function _callee28$(_context28) {
49842
- while (1) switch (_context28.prev = _context28.next) {
50036
+ var returnTo, finalEvent, result, _this$actions33, _this$i18n12, _this$i18n13, _this$actions34, _this$i18n14, _this$i18n15, _this$actions35, _this$i18n16, _this$i18n17, _this$view93;
50037
+ return _regeneratorRuntime__default["default"].wrap(function _callee29$(_context29) {
50038
+ while (1) switch (_context29.prev = _context29.next) {
49843
50039
  case 0:
49844
50040
  returnTo = returnToParam !== null && returnToParam !== void 0 ? returnToParam : this.getReturnTo(event);
49845
50041
  finalEvent = {
49846
50042
  event: event,
49847
50043
  saveBasket: true
49848
50044
  };
49849
- if (!hideLoading) (_this$actions28 = this.actions) === null || _this$actions28 === void 0 || (_this$actions28$toggl = _this$actions28.toggleLoading) === null || _this$actions28$toggl === void 0 || _this$actions28$toggl.call(_this$actions28, 'Planner_Saving', false, true);
49850
- _context28.next = 5;
50045
+ 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);
50046
+ _context29.next = 5;
49851
50047
  return this.saveToBasket(returnTo, finalEvent.event, repairOnly);
49852
50048
  case 5:
49853
- result = _context28.sent;
49854
- if (!hideLoading) (_this$actions29 = this.actions) === null || _this$actions29 === void 0 || (_this$actions29$toggl = _this$actions29.toggleLoading) === null || _this$actions29$toggl === void 0 || _this$actions29$toggl.call(_this$actions29, 'Planner_Saving', false, false);
50049
+ result = _context29.sent;
50050
+ 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);
49855
50051
  if (!(result === 'canceled')) {
49856
- _context28.next = 11;
50052
+ _context29.next = 11;
49857
50053
  break;
49858
50054
  }
49859
50055
  LOG$2.error(new DivaUtils.DivaError('failed to save Basket'));
49860
- (_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.openModal({
50056
+ (_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openModal({
49861
50057
  text: ((_this$i18n12 = this.i18n()) === null || _this$i18n12 === void 0 ? void 0 : _this$i18n12.t('modal.general_error')) + ' --- ' + DivaUtils__default["default"].formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils__default["default"].getCurrentTraceId() ? ((_this$i18n13 = this.i18n()) === null || _this$i18n13 === void 0 ? void 0 : _this$i18n13.t('modal.errorcode')) + ': ' + DivaUtils__default["default"].getCurrentTraceId() : '',
49862
50058
  accept: true
49863
50059
  });
49864
- return _context28.abrupt("return", result);
50060
+ return _context29.abrupt("return", result);
49865
50061
  case 11:
49866
- _context28.t0 = returnTo;
49867
- _context28.next = _context28.t0 === 'OPEN_PDF' ? 14 : _context28.t0 === 'SAVE_BASKET_WITH_MODAL' ? 16 : _context28.t0 === 'OPEN_CONTACT_FORM' ? 17 : 17;
50062
+ _context29.t0 = returnTo;
50063
+ _context29.next = _context29.t0 === 'OPEN_PDF' ? 14 : _context29.t0 === 'SAVE_BASKET_WITH_MODAL' ? 16 : _context29.t0 === 'OPEN_CONTACT_FORM' ? 17 : 17;
49868
50064
  break;
49869
50065
  case 14:
49870
50066
  if (!this.getBasket().PDFDocumentURL) {
49871
50067
  LOG$2.error(new DivaUtils.DivaError('PDF url is missing in basket', {
49872
50068
  code: 'WC_0010'
49873
50069
  }));
49874
- (_this$actions31 = this.actions) === null || _this$actions31 === void 0 || _this$actions31.openModal({
50070
+ (_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.openModal({
49875
50071
  text: ((_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.general_error')) + ' --- ' + DivaUtils__default["default"].formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils__default["default"].getCurrentTraceId() ? ((_this$i18n15 = this.i18n()) === null || _this$i18n15 === void 0 ? void 0 : _this$i18n15.t('modal.errorcode')) + ': ' + DivaUtils__default["default"].getCurrentTraceId() : '',
49876
50072
  accept: true
49877
50073
  });
49878
50074
  } else {
49879
- (_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.openModal({
50075
+ (_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.openModal({
49880
50076
  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'),
49881
50077
  accept: (_this$i18n17 = this.i18n()) === null || _this$i18n17 === void 0 ? void 0 : _this$i18n17.t('modals.open_now'),
49882
50078
  callback: function callback() {
49883
- window.open(_this3.getBasket().PDFDocumentURL, '_blank');
50079
+ window.open(_this4.getBasket().PDFDocumentURL, '_blank');
49884
50080
  }
49885
50081
  });
49886
50082
  }
49887
- return _context28.abrupt("break", 17);
50083
+ return _context29.abrupt("break", 17);
49888
50084
  case 16:
49889
- (_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openModal({
50085
+ (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.openModal({
49890
50086
  text: (_this$i18n18 = this.i18n()) === null || _this$i18n18 === void 0 ? void 0 : _this$i18n18.t('modal.planning_saved'),
49891
50087
  accept: true
49892
50088
  });
49893
50089
  case 17:
49894
50090
  if (!(result == 'noArticleToSave')) {
49895
- _context28.next = 20;
50091
+ _context29.next = 20;
49896
50092
  break;
49897
50093
  }
49898
- (_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
49899
- return _context28.abrupt("return", 'canceled');
50094
+ (_this$view93 = this.view) === null || _this$view93 === void 0 || _this$view93.updatePlannerMsgContainer('NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
50095
+ return _context29.abrupt("return", 'canceled');
49900
50096
  case 20:
49901
- return _context28.abrupt("return", result);
50097
+ return _context29.abrupt("return", result);
49902
50098
  case 21:
49903
50099
  case "end":
49904
- return _context28.stop();
50100
+ return _context29.stop();
49905
50101
  }
49906
- }, _callee28, this);
50102
+ }, _callee29, this);
49907
50103
  }));
49908
50104
  function saveToBasketWrapper(_x80, _x81, _x82, _x83) {
49909
50105
  return _saveToBasketWrapper.apply(this, arguments);
@@ -49913,42 +50109,42 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49913
50109
  }, {
49914
50110
  key: "saveToBasket",
49915
50111
  value: function () {
49916
- var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(returnTo, event, repairOnly) {
49917
- var _returnTo, _returnTo2, _returnTo3, _this$actions34, _this$actions35, _this$divaBasketHandl2;
49918
- var set, actBasket, oldReturnTo, result, newDivaNr, _this$actSet10, arReady, _result, product;
49919
- return _regeneratorRuntime__default["default"].wrap(function _callee29$(_context29) {
49920
- while (1) switch (_context29.prev = _context29.next) {
50112
+ var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30(returnTo, event, repairOnly) {
50113
+ var _returnTo, _returnTo2, _returnTo3, _this$actions37, _this$actions38, _this$divaBasketHandl2;
50114
+ var set, actBasket, oldReturnTo, result, newDivaNr, _this$actSet12, arReady, _result, product;
50115
+ return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context30) {
50116
+ while (1) switch (_context30.prev = _context30.next) {
49921
50117
  case 0:
49922
50118
  set = this.actSet();
49923
50119
  if (!setHandlerInstance.isNoArticleToSave(this.sets)) {
49924
- _context29.next = 3;
50120
+ _context30.next = 3;
49925
50121
  break;
49926
50122
  }
49927
- return _context29.abrupt("return", 'noArticleToSave');
50123
+ return _context30.abrupt("return", 'noArticleToSave');
49928
50124
  case 3:
49929
50125
  actBasket = this.divaBasketHandler.actBasket;
49930
50126
  if (!((_returnTo = returnTo) !== null && _returnTo !== void 0 && _returnTo.startsWith('FAVORITS') && favoritesHandlerInstance.FavoritesDefined(set))) {
49931
- _context29.next = 12;
50127
+ _context30.next = 12;
49932
50128
  break;
49933
50129
  }
49934
50130
  oldReturnTo = returnTo;
49935
50131
  this.ReturnTo = returnTo.replace('FAVORITS_', '');
49936
- _context29.next = 9;
50132
+ _context30.next = 9;
49937
50133
  return this.handleFavorites('SAVE');
49938
50134
  case 9:
49939
- result = _context29.sent;
50135
+ result = _context30.sent;
49940
50136
  if (result === 'canceled') {
49941
50137
  this.ReturnTo = oldReturnTo;
49942
50138
  }
49943
- return _context29.abrupt("return", result);
50139
+ return _context30.abrupt("return", result);
49944
50140
  case 12:
49945
- _context29.t0 = this.divaBasketHandler;
49946
- _context29.t1 = this.divaBasketHandler.actDivaNr;
49947
- _context29.next = 16;
50141
+ _context30.t0 = this.divaBasketHandler;
50142
+ _context30.t1 = this.divaBasketHandler.actDivaNr;
50143
+ _context30.next = 16;
49948
50144
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
49949
50145
  case 16:
49950
- _context29.t2 = _context29.sent;
49951
- _context29.t0.setBasketData.call(_context29.t0, _context29.t1, _context29.t2);
50146
+ _context30.t2 = _context30.sent;
50147
+ _context30.t0.setBasketData.call(_context30.t0, _context30.t1, _context30.t2);
49952
50148
  if ((_returnTo2 = returnTo) !== null && _returnTo2 !== void 0 && _returnTo2.endsWith('OPEN_SELLER_BASKET')) {
49953
50149
  this.ReturnTo = 'OPEN_SELLER_BASKET';
49954
50150
  returnTo = this.ReturnTo;
@@ -49963,14 +50159,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49963
50159
  this.divaBasketHandler.fillOrigConfigurations();
49964
50160
  actBasket.Updated = Date.now();
49965
50161
  if (!returnTo) {
49966
- _context29.next = 54;
50162
+ _context30.next = 54;
49967
50163
  break;
49968
50164
  }
49969
- _context29.t3 = returnTo;
49970
- _context29.next = _context29.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 27 : _context29.t3 === 'OPEN_SELLER_BASKET' ? 29 : _context29.t3 === 'OPEN_PDF' ? 32 : _context29.t3 === 'SAVE_BASKET_WITH_MODAL' ? 32 : _context29.t3 === 'SAVE_BASKET' ? 32 : _context29.t3 === 'SAVE_BASKET_SYNC' ? 32 : _context29.t3 === 'SAVE_BASKET_ASYNC' ? 32 : 54;
50165
+ _context30.t3 = returnTo;
50166
+ _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;
49971
50167
  break;
49972
50168
  case 27:
49973
- (_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.openComponent({
50169
+ (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.openComponent({
49974
50170
  type: 'SELLER',
49975
50171
  parameters: {
49976
50172
  module: 'PCreator',
@@ -49980,12 +50176,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49980
50176
  basketData: actBasket
49981
50177
  }
49982
50178
  });
49983
- return _context29.abrupt("break", 54);
50179
+ return _context30.abrupt("break", 54);
49984
50180
  case 29:
49985
50181
  if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
49986
50182
  actBasket.setDocumentVersion(actBasket.getDocumentVersion() + 1);
49987
50183
  }
49988
- (_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.openComponent({
50184
+ (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.openComponent({
49989
50185
  type: 'SELLER',
49990
50186
  parameters: {
49991
50187
  module: 'Basket',
@@ -49995,26 +50191,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49995
50191
  basketData: actBasket
49996
50192
  }
49997
50193
  });
49998
- return _context29.abrupt("break", 54);
50194
+ return _context30.abrupt("break", 54);
49999
50195
  case 32:
50000
50196
  if (!(event == 'onSaveProduct')) {
50001
- _context29.next = 44;
50197
+ _context30.next = 44;
50002
50198
  break;
50003
50199
  }
50004
- _context29.next = 35;
50200
+ _context30.next = 35;
50005
50201
  return setHandlerInstance.flushPendingUploadsViaMediaService(actBasket);
50006
50202
  case 35:
50007
50203
  //copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
50008
50204
  actBasket = new basketModel.BasketData(JSON.parse(JSON.stringify(actBasket)));
50009
- _context29.next = 38;
50205
+ _context30.next = 38;
50010
50206
  return DivaUtils__default["default"].updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
50011
50207
  case 38:
50012
- _context29.next = 40;
50208
+ _context30.next = 40;
50013
50209
  return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
50014
50210
  case 40:
50015
- newDivaNr = _context29.sent;
50211
+ newDivaNr = _context30.sent;
50016
50212
  actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
50017
- _context29.next = 53;
50213
+ _context30.next = 53;
50018
50214
  break;
50019
50215
  case 44:
50020
50216
  if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
@@ -50023,31 +50219,31 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50023
50219
  }
50024
50220
  this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
50025
50221
  actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
50026
- arReady = !!((_this$actSet10 = this.actSet()) !== null && _this$actSet10 !== void 0 && _this$actSet10.CatalogData.divaArReady);
50027
- _context29.next = 50;
50222
+ arReady = !!((_this$actSet12 = this.actSet()) !== null && _this$actSet12 !== void 0 && _this$actSet12.CatalogData.divaArReady);
50223
+ _context30.next = 50;
50028
50224
  return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo, arReady);
50029
50225
  case 50:
50030
- _result = _context29.sent;
50226
+ _result = _context30.sent;
50031
50227
  if (!(_result === 'ERROR_NO_BASKET_SAVED' || _result === 'ERROR_BASKET_AFTER_SAVE')) {
50032
- _context29.next = 53;
50228
+ _context30.next = 53;
50033
50229
  break;
50034
50230
  }
50035
- return _context29.abrupt("return", 'canceled');
50231
+ return _context30.abrupt("return", 'canceled');
50036
50232
  case 53:
50037
- return _context29.abrupt("break", 54);
50233
+ return _context30.abrupt("break", 54);
50038
50234
  case 54:
50039
50235
  if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
50040
50236
  actBasket = (_this$divaBasketHandl2 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl2 !== void 0 ? _this$divaBasketHandl2 : actBasket; //get pdf documenturl from saved basket
50041
- _context29.next = 58;
50237
+ _context30.next = 58;
50042
50238
  return this.addToBasket(actBasket, event);
50043
50239
  case 58:
50044
- product = _context29.sent;
50045
- return _context29.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
50240
+ product = _context30.sent;
50241
+ return _context30.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
50046
50242
  case 60:
50047
50243
  case "end":
50048
- return _context29.stop();
50244
+ return _context30.stop();
50049
50245
  }
50050
- }, _callee29, this);
50246
+ }, _callee30, this);
50051
50247
  }));
50052
50248
  function saveToBasket(_x84, _x85, _x86) {
50053
50249
  return _saveToBasket.apply(this, arguments);
@@ -50064,24 +50260,24 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50064
50260
  }, {
50065
50261
  key: "generateAiImageWithReferenceImages",
50066
50262
  value: function () {
50067
- var _generateAiImageWithReferenceImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30(data, leadKey) {
50068
- var _this$actSet11, _this$state6, _this$actSet12;
50069
- return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context30) {
50070
- while (1) switch (_context30.prev = _context30.next) {
50263
+ var _generateAiImageWithReferenceImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31(data, leadKey) {
50264
+ var _this$actSet13, _this$state6, _this$actSet14;
50265
+ return _regeneratorRuntime__default["default"].wrap(function _callee31$(_context31) {
50266
+ while (1) switch (_context31.prev = _context31.next) {
50071
50267
  case 0:
50072
- (_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 || _this$actSet11.CatalogData.catalogCodex;
50073
- _context30.next = 3;
50268
+ (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 || _this$actSet13.CatalogData.catalogCodex;
50269
+ _context31.next = 3;
50074
50270
  return this.api.generateAiImageWithReferenceImages(_objectSpread$8(_objectSpread$8({}, data), {}, {
50075
50271
  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,
50076
- catalogCodex: (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.CatalogData.catalogCodex
50272
+ catalogCodex: (_this$actSet14 = this.actSet()) === null || _this$actSet14 === void 0 ? void 0 : _this$actSet14.CatalogData.catalogCodex
50077
50273
  }), leadKey);
50078
50274
  case 3:
50079
- return _context30.abrupt("return", _context30.sent);
50275
+ return _context31.abrupt("return", _context31.sent);
50080
50276
  case 4:
50081
50277
  case "end":
50082
- return _context30.stop();
50278
+ return _context31.stop();
50083
50279
  }
50084
- }, _callee30, this);
50280
+ }, _callee31, this);
50085
50281
  }));
50086
50282
  function generateAiImageWithReferenceImages(_x87, _x88) {
50087
50283
  return _generateAiImageWithReferenceImages.apply(this, arguments);
@@ -50091,51 +50287,70 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50091
50287
  }, {
50092
50288
  key: "getUsageLimits",
50093
50289
  value: function () {
50094
- var _getUsageLimits = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31() {
50290
+ var _getUsageLimits = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee32() {
50095
50291
  var _localStorage$getItem, _localStorage;
50096
50292
  var leadKey;
50097
- return _regeneratorRuntime__default["default"].wrap(function _callee31$(_context31) {
50098
- while (1) switch (_context31.prev = _context31.next) {
50293
+ return _regeneratorRuntime__default["default"].wrap(function _callee32$(_context32) {
50294
+ while (1) switch (_context32.prev = _context32.next) {
50099
50295
  case 0:
50100
50296
  // Get lead key from localStorage if it exists (for anonymous users)
50101
50297
  leadKey = (_localStorage$getItem = (_localStorage = localStorage) === null || _localStorage === void 0 ? void 0 : _localStorage.getItem('diva_lead_key')) !== null && _localStorage$getItem !== void 0 ? _localStorage$getItem : undefined;
50102
- _context31.next = 3;
50298
+ _context32.next = 3;
50103
50299
  return this.api.getUsageLimits(leadKey ? {
50104
50300
  leadKey: leadKey
50105
50301
  } : undefined);
50106
50302
  case 3:
50107
- return _context31.abrupt("return", _context31.sent);
50303
+ return _context32.abrupt("return", _context32.sent);
50108
50304
  case 4:
50109
50305
  case "end":
50110
- return _context31.stop();
50306
+ return _context32.stop();
50111
50307
  }
50112
- }, _callee31, this);
50308
+ }, _callee32, this);
50113
50309
  }));
50114
50310
  function getUsageLimits() {
50115
50311
  return _getUsageLimits.apply(this, arguments);
50116
50312
  }
50117
50313
  return getUsageLimits;
50118
- }()
50314
+ }() /** Base URL of the diva AI service (used by the analyzer's catalog chat). */
50315
+ }, {
50316
+ key: "getAiServiceUrl",
50317
+ value: function getAiServiceUrl() {
50318
+ return this.api.getDivaAiServiceUrl();
50319
+ }
50320
+
50321
+ /** Current planner JWT, for authenticating direct AI-service calls. */
50322
+ }, {
50323
+ key: "getJwt",
50324
+ value: function getJwt() {
50325
+ return this.api.getJwt();
50326
+ }
50327
+
50328
+ /** What the planner is currently working on (enricher package / IDM package / organization). */
50329
+ }, {
50330
+ key: "getWorkingContext",
50331
+ value: function getWorkingContext() {
50332
+ return this.api.getWorkingContext();
50333
+ }
50119
50334
  }, {
50120
50335
  key: "getAiRoomRenderings",
50121
50336
  value: function () {
50122
- var _getAiRoomRenderings = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee32() {
50337
+ var _getAiRoomRenderings = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee33() {
50123
50338
  var _this$state7;
50124
50339
  var organizationId, lang;
50125
- return _regeneratorRuntime__default["default"].wrap(function _callee32$(_context32) {
50126
- while (1) switch (_context32.prev = _context32.next) {
50340
+ return _regeneratorRuntime__default["default"].wrap(function _callee33$(_context33) {
50341
+ while (1) switch (_context33.prev = _context33.next) {
50127
50342
  case 0:
50128
50343
  organizationId = (_this$state7 = this.state) === null || _this$state7 === void 0 ? void 0 : _this$state7.organization._id;
50129
50344
  lang = this.api.getLanguage();
50130
- _context32.next = 4;
50345
+ _context33.next = 4;
50131
50346
  return this.api.getAiRoomRenderings(organizationId, lang !== null && lang !== void 0 ? lang : undefined);
50132
50347
  case 4:
50133
- return _context32.abrupt("return", _context32.sent);
50348
+ return _context33.abrupt("return", _context33.sent);
50134
50349
  case 5:
50135
50350
  case "end":
50136
- return _context32.stop();
50351
+ return _context33.stop();
50137
50352
  }
50138
- }, _callee32, this);
50353
+ }, _callee33, this);
50139
50354
  }));
50140
50355
  function getAiRoomRenderings() {
50141
50356
  return _getAiRoomRenderings.apply(this, arguments);
@@ -50145,19 +50360,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50145
50360
  }, {
50146
50361
  key: "createLeadKey",
50147
50362
  value: function () {
50148
- var _createLeadKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee33(email) {
50149
- return _regeneratorRuntime__default["default"].wrap(function _callee33$(_context33) {
50150
- while (1) switch (_context33.prev = _context33.next) {
50363
+ var _createLeadKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34(email) {
50364
+ return _regeneratorRuntime__default["default"].wrap(function _callee34$(_context34) {
50365
+ while (1) switch (_context34.prev = _context34.next) {
50151
50366
  case 0:
50152
- _context33.next = 2;
50367
+ _context34.next = 2;
50153
50368
  return this.api.createLeadKey(email);
50154
50369
  case 2:
50155
- return _context33.abrupt("return", _context33.sent);
50370
+ return _context34.abrupt("return", _context34.sent);
50156
50371
  case 3:
50157
50372
  case "end":
50158
- return _context33.stop();
50373
+ return _context34.stop();
50159
50374
  }
50160
- }, _callee33, this);
50375
+ }, _callee34, this);
50161
50376
  }));
50162
50377
  function createLeadKey(_x89) {
50163
50378
  return _createLeadKey.apply(this, arguments);
@@ -50167,9 +50382,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50167
50382
  }, {
50168
50383
  key: "showAiRoomRenderingInSummary",
50169
50384
  value: function showAiRoomRenderingInSummary() {
50170
- var _this$actSet13;
50385
+ var _this$actSet15;
50171
50386
  var viewConfig = this.api.getViewConfig();
50172
- return (viewConfig === null || viewConfig === void 0 ? void 0 : viewConfig.showAiRoomRenderingInSummary) || (viewConfig === null || viewConfig === void 0 ? void 0 : viewConfig.showAiRoomRenderingInSummaryOnlyForCatalogsWithProperty) && ((_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.CatalogData.showAiRoomRenderingInSummary);
50387
+ 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);
50173
50388
  }
50174
50389
  }, {
50175
50390
  key: "clearAllAiImagesAsJpg",
@@ -50223,8 +50438,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50223
50438
  var doTryOptimize = plannerType == 'CUSTOMER_OPTIMIZED_PLANNER' || plannerType == 'JUMP_OVER_PLANNER_ONLY_MOBILE' || plannerType == 'JUMP_OVER_PLANNER';
50224
50439
  //if planner is hidden by config but nothing is planned initially
50225
50440
  if (plannerType === 'NONE') {
50226
- var _this$plannerConfig$a7, _this$actSet14;
50227
- 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$actSet14 = this.actSet()) !== null && _this$actSet14 !== void 0 && (_this$actSet14 = _this$actSet14.CatalogData.startPlannerArticle) !== null && _this$actSet14 !== void 0 && _this$actSet14.length)) {
50441
+ var _this$plannerConfig$a7, _this$actSet16;
50442
+ 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)) {
50228
50443
  plannerType = 'PLANNER';
50229
50444
  }
50230
50445
  }
@@ -50268,38 +50483,38 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50268
50483
  }, {
50269
50484
  key: "getCurCatalogCodex",
50270
50485
  value: function getCurCatalogCodex() {
50271
- var _this$actSet15;
50272
- return (_this$actSet15 = this.actSet()) === null || _this$actSet15 === void 0 ? void 0 : _this$actSet15.getCatalogCodex();
50486
+ var _this$actSet17;
50487
+ return (_this$actSet17 = this.actSet()) === null || _this$actSet17 === void 0 ? void 0 : _this$actSet17.getCatalogCodex();
50273
50488
  }
50274
50489
  }, {
50275
50490
  key: "getCurCatalogName",
50276
50491
  value: function getCurCatalogName() {
50277
- var _this$actSet16;
50278
- return (_this$actSet16 = this.actSet()) === null || _this$actSet16 === void 0 ? void 0 : _this$actSet16.getCatalogName();
50492
+ var _this$actSet18;
50493
+ return (_this$actSet18 = this.actSet()) === null || _this$actSet18 === void 0 ? void 0 : _this$actSet18.getCatalogName();
50279
50494
  }
50280
50495
  }, {
50281
50496
  key: "getCurAccountName",
50282
50497
  value: function getCurAccountName() {
50283
- var _this$actSet17;
50284
- return (_this$actSet17 = this.actSet()) === null || _this$actSet17 === void 0 ? void 0 : _this$actSet17.getAccountName();
50498
+ var _this$actSet19;
50499
+ return (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.getAccountName();
50285
50500
  }
50286
50501
  }, {
50287
50502
  key: "getCurSupplierGuid",
50288
50503
  value: function getCurSupplierGuid() {
50289
- var _this$actSet18;
50290
- return (_this$actSet18 = this.actSet()) === null || _this$actSet18 === void 0 ? void 0 : _this$actSet18.getSupplierGuid();
50504
+ var _this$actSet20;
50505
+ return (_this$actSet20 = this.actSet()) === null || _this$actSet20 === void 0 ? void 0 : _this$actSet20.getSupplierGuid();
50291
50506
  }
50292
50507
  }, {
50293
50508
  key: "getCurSetPrice",
50294
50509
  value: function getCurSetPrice() {
50295
- var _this$actSet$getSetPr, _this$actSet19;
50296
- return (_this$actSet$getSetPr = (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.getSetPrice()) !== null && _this$actSet$getSetPr !== void 0 ? _this$actSet$getSetPr : 0;
50510
+ var _this$actSet$getSetPr, _this$actSet21;
50511
+ 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;
50297
50512
  }
50298
50513
  }, {
50299
50514
  key: "getCurImageMode",
50300
50515
  value: function getCurImageMode() {
50301
- var _this$actSet20;
50302
- return (_this$actSet20 = this.actSet()) !== null && _this$actSet20 !== void 0 && (_this$actSet20 = _this$actSet20.CatalogData) !== null && _this$actSet20 !== void 0 && _this$actSet20.has3dModels ? '3D' : '2D';
50516
+ var _this$actSet22;
50517
+ 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';
50303
50518
  }
50304
50519
  }, {
50305
50520
  key: "getViewConfig",
@@ -50335,80 +50550,80 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50335
50550
  }, {
50336
50551
  key: "doShow3DDimensionLines",
50337
50552
  value: function doShow3DDimensionLines() {
50338
- var _this$actSet21;
50339
- return (_this$actSet21 = this.actSet()) === null || _this$actSet21 === void 0 || (_this$actSet21 = _this$actSet21.CatalogData) === null || _this$actSet21 === void 0 ? void 0 : _this$actSet21.doShow3DDimensionLines;
50553
+ var _this$actSet23;
50554
+ 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;
50340
50555
  }
50341
50556
  }, {
50342
50557
  key: "doShowMainDimensions",
50343
50558
  value: function doShowMainDimensions() {
50344
- var _this$actSet22;
50345
- return (_this$actSet22 = this.actSet()) === null || _this$actSet22 === void 0 || (_this$actSet22 = _this$actSet22.CatalogData) === null || _this$actSet22 === void 0 ? void 0 : _this$actSet22.doShowMainDimensions;
50559
+ var _this$actSet24;
50560
+ 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;
50346
50561
  }
50347
50562
  }, {
50348
50563
  key: "defaultDimensionsActive",
50349
50564
  value: function defaultDimensionsActive() {
50350
- var _this$actSet23;
50351
- return (_this$actSet23 = this.actSet()) === null || _this$actSet23 === void 0 || (_this$actSet23 = _this$actSet23.CatalogData) === null || _this$actSet23 === void 0 ? void 0 : _this$actSet23.defaultDimensionsActive;
50565
+ var _this$actSet25;
50566
+ 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;
50352
50567
  }
50353
50568
  }, {
50354
50569
  key: "autoOpenContentItem",
50355
50570
  value: function autoOpenContentItem() {
50356
- var _this$actSet24;
50357
- return (_this$actSet24 = this.actSet()) === null || _this$actSet24 === void 0 || (_this$actSet24 = _this$actSet24.CatalogData) === null || _this$actSet24 === void 0 ? void 0 : _this$actSet24.autoOpenContentItem;
50571
+ var _this$actSet26;
50572
+ 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;
50358
50573
  }
50359
50574
  }, {
50360
50575
  key: "hidePlannerUiIcons",
50361
50576
  value: function hidePlannerUiIcons() {
50362
- var _this$actSet25;
50363
- return (_this$actSet25 = this.actSet()) === null || _this$actSet25 === void 0 || (_this$actSet25 = _this$actSet25.CatalogData) === null || _this$actSet25 === void 0 ? void 0 : _this$actSet25.hidePlannerUiIcons;
50577
+ var _this$actSet27;
50578
+ 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;
50364
50579
  }
50365
50580
  }, {
50366
50581
  key: "getPlanner2Dot0Active",
50367
50582
  value: function getPlanner2Dot0Active() {
50368
- var _this$actSet26;
50369
- return (_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 || (_this$actSet26 = _this$actSet26.CatalogData) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.planner2Dot0;
50583
+ var _this$actSet28;
50584
+ 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;
50370
50585
  }
50371
50586
  }, {
50372
50587
  key: "doShowPlannerReplaceMode",
50373
50588
  value: function doShowPlannerReplaceMode() {
50374
- var _this$actSet27, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
50375
- var catalogData = (_this$actSet27 = this.actSet()) === null || _this$actSet27 === void 0 ? void 0 : _this$actSet27.CatalogData;
50589
+ var _this$actSet29, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
50590
+ var catalogData = (_this$actSet29 = this.actSet()) === null || _this$actSet29 === void 0 ? void 0 : _this$actSet29.CatalogData;
50376
50591
  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;
50377
50592
  }
50378
50593
  }, {
50379
50594
  key: "doPlannerReplaceAutoSwitch",
50380
50595
  value: function doPlannerReplaceAutoSwitch() {
50381
- var _this$actSet28, _this$api$getViewConf3;
50382
- var catalogData = (_this$actSet28 = this.actSet()) === null || _this$actSet28 === void 0 ? void 0 : _this$actSet28.CatalogData;
50596
+ var _this$actSet30, _this$api$getViewConf3;
50597
+ var catalogData = (_this$actSet30 = this.actSet()) === null || _this$actSet30 === void 0 ? void 0 : _this$actSet30.CatalogData;
50383
50598
  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);
50384
50599
  }
50385
50600
  }, {
50386
50601
  key: "getHidePlanner",
50387
50602
  value: function getHidePlanner() {
50388
- var _this$actSet29;
50389
- return this.api.getHidePlanner() || !!((_this$actSet29 = this.actSet()) !== null && _this$actSet29 !== void 0 && _this$actSet29.CatalogData.useBoxPlanner);
50603
+ var _this$actSet31;
50604
+ return this.api.getHidePlanner() || !!((_this$actSet31 = this.actSet()) !== null && _this$actSet31 !== void 0 && _this$actSet31.CatalogData.useBoxPlanner);
50390
50605
  }
50391
50606
  }, {
50392
50607
  key: "getFilterForCheckoutButtons",
50393
50608
  value: function getFilterForCheckoutButtons() {
50394
- var _this$actSet$CatalogD, _this$actSet30;
50395
- return (_this$actSet$CatalogD = (_this$actSet30 = this.actSet()) === null || _this$actSet30 === void 0 ? void 0 : _this$actSet30.CatalogData.filterForCheckoutButtons) !== null && _this$actSet$CatalogD !== void 0 ? _this$actSet$CatalogD : [];
50609
+ var _this$actSet$CatalogD, _this$actSet32;
50610
+ 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 : [];
50396
50611
  }
50397
50612
  }, {
50398
50613
  key: "getAllowRTV",
50399
50614
  value: function getAllowRTV() {
50400
- var _this$state9, _this$actSet31, _this$state10, _this$actSet32;
50615
+ var _this$state9, _this$actSet33, _this$state10, _this$actSet34;
50401
50616
  if (this.getEnableUnityRtvKombi()) return false;
50402
50617
  if ((_this$state9 = this.state) !== null && _this$state9 !== void 0 && _this$state9.organization.settings.forceRTV) return true;
50403
- if ((_this$actSet31 = this.actSet()) !== null && _this$actSet31 !== void 0 && _this$actSet31.CatalogData.divaForceRTV) return true;
50404
- if ((_this$state10 = this.state) !== null && _this$state10 !== void 0 && _this$state10.organization.settings.enableRTV && (_this$actSet32 = this.actSet()) !== null && _this$actSet32 !== void 0 && _this$actSet32.CatalogData.divaArReady) return true;
50618
+ if ((_this$actSet33 = this.actSet()) !== null && _this$actSet33 !== void 0 && _this$actSet33.CatalogData.divaForceRTV) return true;
50619
+ 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;
50405
50620
  return false;
50406
50621
  }
50407
50622
  }, {
50408
50623
  key: "getForceRTV",
50409
50624
  value: function getForceRTV() {
50410
- var _this$actSet33;
50411
- return !!((_this$actSet33 = this.actSet()) !== null && _this$actSet33 !== void 0 && _this$actSet33.CatalogData.divaForceRTV);
50625
+ var _this$actSet35;
50626
+ return !!((_this$actSet35 = this.actSet()) !== null && _this$actSet35 !== void 0 && _this$actSet35.CatalogData.divaForceRTV);
50412
50627
  }
50413
50628
  }, {
50414
50629
  key: "getPricePreview",
@@ -50418,29 +50633,29 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50418
50633
  }, {
50419
50634
  key: "hide2DPlanner",
50420
50635
  value: function hide2DPlanner() {
50421
- var _this$actSet34;
50422
- return (_this$actSet34 = this.actSet()) === null || _this$actSet34 === void 0 ? void 0 : _this$actSet34.CatalogData.hide2DPlanner;
50636
+ var _this$actSet36;
50637
+ return (_this$actSet36 = this.actSet()) === null || _this$actSet36 === void 0 ? void 0 : _this$actSet36.CatalogData.hide2DPlanner;
50423
50638
  }
50424
50639
  }, {
50425
50640
  key: "getAllowQRCodeAR",
50426
50641
  value: function getAllowQRCodeAR() {
50427
- var _this$actSet35;
50428
- if (this.api.enableAR && (_this$actSet35 = this.actSet()) !== null && _this$actSet35 !== void 0 && _this$actSet35.CatalogData.divaArReady) return true;
50642
+ var _this$actSet37;
50643
+ if (this.api.enableAR && (_this$actSet37 = this.actSet()) !== null && _this$actSet37 !== void 0 && _this$actSet37.CatalogData.divaArReady) return true;
50429
50644
  return false;
50430
50645
  }
50431
50646
  }, {
50432
50647
  key: "getEnableUnityRtvKombi",
50433
50648
  value: function getEnableUnityRtvKombi() {
50434
- var _this$actSet36, _this$actSet37;
50649
+ var _this$actSet38, _this$actSet39;
50435
50650
  // if force rtv disable unity kombi - biohort
50436
- if ((_this$actSet36 = this.actSet()) !== null && _this$actSet36 !== void 0 && _this$actSet36.CatalogData.divaForceRTV) return false;
50437
- return ((_this$actSet37 = this.actSet()) === null || _this$actSet37 === void 0 ? void 0 : _this$actSet37.CatalogData.divaArReady) == true && this.api.getEnableRTVUnityKombi();
50651
+ if ((_this$actSet38 = this.actSet()) !== null && _this$actSet38 !== void 0 && _this$actSet38.CatalogData.divaForceRTV) return false;
50652
+ return ((_this$actSet39 = this.actSet()) === null || _this$actSet39 === void 0 ? void 0 : _this$actSet39.CatalogData.divaArReady) == true && this.api.getEnableRTVUnityKombi();
50438
50653
  }
50439
50654
  }, {
50440
50655
  key: "getShelfPlannerRTV",
50441
50656
  value: function getShelfPlannerRTV() {
50442
- var _this$actSet38;
50443
- return (_this$actSet38 = this.actSet()) === null || _this$actSet38 === void 0 ? void 0 : _this$actSet38.CatalogData.useShelfPlannerRTV;
50657
+ var _this$actSet40;
50658
+ return (_this$actSet40 = this.actSet()) === null || _this$actSet40 === void 0 ? void 0 : _this$actSet40.CatalogData.useShelfPlannerRTV;
50444
50659
  }
50445
50660
  }, {
50446
50661
  key: "getBasketData",
@@ -50455,23 +50670,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50455
50670
  }, {
50456
50671
  key: "getBasketDataWithEkText",
50457
50672
  value: function () {
50458
- var _getBasketDataWithEkText = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34() {
50459
- return _regeneratorRuntime__default["default"].wrap(function _callee34$(_context34) {
50460
- while (1) switch (_context34.prev = _context34.next) {
50673
+ var _getBasketDataWithEkText = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35() {
50674
+ return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context35) {
50675
+ while (1) switch (_context35.prev = _context35.next) {
50461
50676
  case 0:
50462
- _context34.t0 = this.divaBasketHandler;
50463
- _context34.t1 = this.divaBasketHandler.actDivaNr;
50464
- _context34.next = 4;
50677
+ _context35.t0 = this.divaBasketHandler;
50678
+ _context35.t1 = this.divaBasketHandler.actDivaNr;
50679
+ _context35.next = 4;
50465
50680
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, true, this.doAllowSetPlanner(), this.ReturnTo);
50466
50681
  case 4:
50467
- _context34.t2 = _context34.sent;
50468
- _context34.t0.setBasketData.call(_context34.t0, _context34.t1, _context34.t2);
50469
- return _context34.abrupt("return", this.divaBasketHandler.actBasket);
50682
+ _context35.t2 = _context35.sent;
50683
+ _context35.t0.setBasketData.call(_context35.t0, _context35.t1, _context35.t2);
50684
+ return _context35.abrupt("return", this.divaBasketHandler.actBasket);
50470
50685
  case 7:
50471
50686
  case "end":
50472
- return _context34.stop();
50687
+ return _context35.stop();
50473
50688
  }
50474
- }, _callee34, this);
50689
+ }, _callee35, this);
50475
50690
  }));
50476
50691
  function getBasketDataWithEkText() {
50477
50692
  return _getBasketDataWithEkText.apply(this, arguments);
@@ -50481,8 +50696,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50481
50696
  }, {
50482
50697
  key: "getCatalogData",
50483
50698
  value: function getCatalogData() {
50484
- var _this$actSet39;
50485
- return (_this$actSet39 = this.actSet()) === null || _this$actSet39 === void 0 ? void 0 : _this$actSet39.CatalogData;
50699
+ var _this$actSet41;
50700
+ return (_this$actSet41 = this.actSet()) === null || _this$actSet41 === void 0 ? void 0 : _this$actSet41.CatalogData;
50486
50701
  }
50487
50702
  }, {
50488
50703
  key: "ReturnTo",
@@ -50497,18 +50712,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50497
50712
  }, {
50498
50713
  key: "addToBasket",
50499
50714
  value: function () {
50500
- var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35(actBasket) {
50501
- var _this$actions36,
50502
- _this$actions37,
50503
- _this$actions38,
50504
- _this$actions39,
50715
+ var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee36(actBasket) {
50716
+ var _this$actions39,
50505
50717
  _this$actions40,
50506
- _this$divaBasketHandl4,
50507
- _this4 = this,
50508
50718
  _this$actions41,
50509
50719
  _this$actions42,
50510
50720
  _this$actions43,
50511
- _this$actions44;
50721
+ _this$divaBasketHandl4,
50722
+ _this5 = this,
50723
+ _this$actions44,
50724
+ _this$actions45,
50725
+ _this$actions46,
50726
+ _this$actions47;
50512
50727
  var event,
50513
50728
  emailConfig,
50514
50729
  _emailConfig$to$split,
@@ -50516,44 +50731,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50516
50731
  to,
50517
50732
  variants,
50518
50733
  products,
50519
- _args35 = arguments;
50520
- return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context35) {
50521
- while (1) switch (_context35.prev = _context35.next) {
50734
+ _args36 = arguments;
50735
+ return _regeneratorRuntime__default["default"].wrap(function _callee36$(_context36) {
50736
+ while (1) switch (_context36.prev = _context36.next) {
50522
50737
  case 0:
50523
- event = _args35.length > 1 && _args35[1] !== undefined ? _args35[1] : 'onAddToBasket';
50524
- _context35.t0 = event;
50525
- _context35.next = _context35.t0 === 'onWebPlanerPrint' ? 4 : _context35.t0 === 'onWebPlanerSave' ? 6 : _context35.t0 === 'onWebPlanerShare' ? 8 : _context35.t0 === 'onRequestConsulation' ? 10 : _context35.t0 === 'onSave' ? 12 : _context35.t0 === 'onSendEmail' ? 14 : _context35.t0 === 'onSaveProduct' ? 19 : _context35.t0 === 'dontSaveBasket' ? 26 : _context35.t0 === 'onAddToBasket' ? 26 : 28;
50738
+ event = _args36.length > 1 && _args36[1] !== undefined ? _args36[1] : 'onAddToBasket';
50739
+ _context36.t0 = event;
50740
+ _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;
50526
50741
  break;
50527
50742
  case 4:
50528
- (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
50743
+ (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
50529
50744
  type: 'onWebPlanerPrint',
50530
50745
  data: actBasket.getAsJson()
50531
50746
  });
50532
- return _context35.abrupt("break", 30);
50747
+ return _context36.abrupt("break", 30);
50533
50748
  case 6:
50534
- (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
50749
+ (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
50535
50750
  type: 'onWebPlanerSave',
50536
50751
  data: actBasket.getAsJson()
50537
50752
  });
50538
- return _context35.abrupt("break", 30);
50753
+ return _context36.abrupt("break", 30);
50539
50754
  case 8:
50540
- (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
50755
+ (_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
50541
50756
  type: 'onWebPlanerShare',
50542
50757
  data: actBasket.getAsJson()
50543
50758
  });
50544
- return _context35.abrupt("break", 30);
50759
+ return _context36.abrupt("break", 30);
50545
50760
  case 10:
50546
- (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
50761
+ (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
50547
50762
  type: 'onRequestConsulation',
50548
50763
  data: actBasket.getAsJson()
50549
50764
  });
50550
- return _context35.abrupt("break", 30);
50765
+ return _context36.abrupt("break", 30);
50551
50766
  case 12:
50552
- (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
50767
+ (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
50553
50768
  type: 'onSave',
50554
50769
  data: actBasket.getAsJson()
50555
50770
  });
50556
- return _context35.abrupt("break", 30);
50771
+ return _context36.abrupt("break", 30);
50557
50772
  case 14:
50558
50773
  emailConfig = (_this$divaBasketHandl4 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : this.getEmailConfig(); //reset the emailConfig
50559
50774
  this.divaBasketHandler.emailConfig = undefined;
@@ -50570,8 +50785,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50570
50785
  })) !== null && _emailConfig$to$split !== void 0 ? _emailConfig$to$split : [''];
50571
50786
  variants = emailConfig.variant ? emailConfig.variant.split(',') : ['DEFAULT'];
50572
50787
  variants.forEach(function (variant, idx) {
50573
- var _this4$actions;
50574
- (_this4$actions = _this4.actions) === null || _this4$actions === void 0 || _this4$actions.sendEmail({
50788
+ var _this5$actions;
50789
+ (_this5$actions = _this5.actions) === null || _this5$actions === void 0 || _this5$actions.sendEmail({
50575
50790
  showDialog: emailConfig.showDialog,
50576
50791
  callback: emailConfig.callback,
50577
50792
  content: {
@@ -50584,45 +50799,45 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50584
50799
  });
50585
50800
  });
50586
50801
  }
50587
- (_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
50802
+ (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
50588
50803
  type: 'onAddToBasket',
50589
50804
  data: actBasket.getAsJson()
50590
50805
  });
50591
- return _context35.abrupt("break", 30);
50806
+ return _context36.abrupt("break", 30);
50592
50807
  case 19:
50593
50808
  this.actSet().CatalogData;
50594
- _context35.next = 22;
50809
+ _context36.next = 22;
50595
50810
  return this.api.saveAsProduct(this.sets, actBasket);
50596
50811
  case 22:
50597
- products = _context35.sent;
50598
- (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
50812
+ products = _context36.sent;
50813
+ (_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.onEvent({
50599
50814
  type: 'onAddToBasket',
50600
50815
  data: actBasket.getAsJson()
50601
50816
  });
50602
50817
  if (!products) {
50603
- _context35.next = 26;
50818
+ _context36.next = 26;
50604
50819
  break;
50605
50820
  }
50606
- return _context35.abrupt("return", products[0]);
50821
+ return _context36.abrupt("return", products[0]);
50607
50822
  case 26:
50608
- (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
50823
+ (_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.onEvent({
50609
50824
  type: 'onAddToBasket',
50610
50825
  data: actBasket.getAsJson()
50611
50826
  });
50612
- return _context35.abrupt("break", 30);
50827
+ return _context36.abrupt("break", 30);
50613
50828
  case 28:
50614
- (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
50829
+ (_this$actions47 = this.actions) === null || _this$actions47 === void 0 || _this$actions47.onEvent({
50615
50830
  type: event,
50616
50831
  data: actBasket.getAsJson()
50617
50832
  });
50618
- return _context35.abrupt("break", 30);
50833
+ return _context36.abrupt("break", 30);
50619
50834
  case 30:
50620
- return _context35.abrupt("return");
50835
+ return _context36.abrupt("return");
50621
50836
  case 31:
50622
50837
  case "end":
50623
- return _context35.stop();
50838
+ return _context36.stop();
50624
50839
  }
50625
- }, _callee35, this);
50840
+ }, _callee36, this);
50626
50841
  }));
50627
50842
  function addToBasket(_x90) {
50628
50843
  return _addToBasket.apply(this, arguments);
@@ -50632,8 +50847,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50632
50847
  }, {
50633
50848
  key: "openPDFpostAsEvent",
50634
50849
  value: function openPDFpostAsEvent(mongoDBId) {
50635
- var _this$actions45, _this$actions46, _this$actions47;
50636
- (_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.updateBreadcrumbs({
50850
+ var _this$actions48, _this$actions49, _this$actions50;
50851
+ (_this$actions48 = this.actions) === null || _this$actions48 === void 0 || _this$actions48.updateBreadcrumbs({
50637
50852
  type: 'update',
50638
50853
  param: {
50639
50854
  groupId: 'SHOWROOM',
@@ -50647,7 +50862,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50647
50862
  }
50648
50863
  }
50649
50864
  });
50650
- (_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.updateBreadcrumbs({
50865
+ (_this$actions49 = this.actions) === null || _this$actions49 === void 0 || _this$actions49.updateBreadcrumbs({
50651
50866
  type: 'update',
50652
50867
  param: {
50653
50868
  groupId: 'SHOWROOM',
@@ -50661,7 +50876,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50661
50876
  }
50662
50877
  }
50663
50878
  });
50664
- (_this$actions47 = this.actions) === null || _this$actions47 === void 0 || _this$actions47.openComponent({
50879
+ (_this$actions50 = this.actions) === null || _this$actions50 === void 0 || _this$actions50.openComponent({
50665
50880
  type: 'REPORT',
50666
50881
  parameters: {
50667
50882
  id: mongoDBId
@@ -50679,26 +50894,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50679
50894
  }, {
50680
50895
  key: "getCurrentBasket",
50681
50896
  value: function () {
50682
- var _getCurrentBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee36(event, force, returnTo, dontGoToSummary, hideLoading) {
50683
- var _this$actSet40, _this$divaBasketHandl5, _this$onClickAddToBas3;
50684
- return _regeneratorRuntime__default["default"].wrap(function _callee36$(_context36) {
50685
- while (1) switch (_context36.prev = _context36.next) {
50897
+ var _getCurrentBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee37(event, force, returnTo, dontGoToSummary, hideLoading) {
50898
+ var _this$actSet42, _this$divaBasketHandl5, _this$view94;
50899
+ return _regeneratorRuntime__default["default"].wrap(function _callee37$(_context37) {
50900
+ while (1) switch (_context37.prev = _context37.next) {
50686
50901
  case 0:
50687
- if (!(this.divaBasketHandler.basketWasSavedWithCurrentDocVersion && ((_this$actSet40 = this.actSet()) === null || _this$actSet40 === void 0 ? void 0 : _this$actSet40.setHash) === ((_this$divaBasketHandl5 = this.divaBasketHandler.actBasket) === null || _this$divaBasketHandl5 === void 0 || (_this$divaBasketHandl5 = _this$divaBasketHandl5.OrderSets) === null || _this$divaBasketHandl5 === void 0 ? void 0 : _this$divaBasketHandl5[0].SetHash) && !(returnTo !== null && returnTo !== void 0 && returnTo.includes('OPEN')))) {
50688
- _context36.next = 2;
50902
+ 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')))) {
50903
+ _context37.next = 2;
50689
50904
  break;
50690
50905
  }
50691
- return _context36.abrupt("return", 'BASKET_ALREADY_SAVED');
50906
+ return _context37.abrupt("return", 'BASKET_ALREADY_SAVED');
50692
50907
  case 2:
50693
- _context36.next = 4;
50694
- return (_this$onClickAddToBas3 = this.onClickAddToBasket) === null || _this$onClickAddToBas3 === void 0 ? void 0 : _this$onClickAddToBas3.call(this, undefined, event, force, returnTo, dontGoToSummary, hideLoading);
50908
+ _context37.next = 4;
50909
+ return (_this$view94 = this.view) === null || _this$view94 === void 0 ? void 0 : _this$view94.onClickAddToBasket(undefined, event, force, returnTo, dontGoToSummary, hideLoading);
50695
50910
  case 4:
50696
- return _context36.abrupt("return", !!_context36.sent);
50911
+ return _context37.abrupt("return", !!_context37.sent);
50697
50912
  case 5:
50698
50913
  case "end":
50699
- return _context36.stop();
50914
+ return _context37.stop();
50700
50915
  }
50701
- }, _callee36, this);
50916
+ }, _callee37, this);
50702
50917
  }));
50703
50918
  function getCurrentBasket(_x91, _x92, _x93, _x94, _x95) {
50704
50919
  return _getCurrentBasket.apply(this, arguments);
@@ -50706,43 +50921,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50706
50921
  return getCurrentBasket;
50707
50922
  }()
50708
50923
  /*********************************END Functions in Logik called From View END *************************************/
50709
- /*********************************** Register Funictions from Logik to View ***************************************/
50710
- }, {
50711
- key: "registerInitPlannerView",
50712
- value: function registerInitPlannerView(initPlannerView) {
50713
- this.initPlannerView = initPlannerView;
50714
- }
50715
- }, {
50716
- key: "registerInitApiDependencies",
50717
- value: function registerInitApiDependencies(initApiDependencies) {
50718
- this.initViewApiDependencies = initApiDependencies;
50719
- }
50924
+ /*********************************** View attachment (Logik -> View) ***************************************/
50925
+ /** True while a view is attached; false = headless (backoffice DIVA agent, artifact passes). */
50720
50926
  }, {
50721
- key: "registerUpdatePlannerMsgContainer",
50722
- value: function registerUpdatePlannerMsgContainer(updatePlannerMsgContainer) {
50723
- this.updatePlannerMsgContainer = updatePlannerMsgContainer;
50724
- }
50725
- }, {
50726
- key: "registerInitConfiguratorMode",
50727
- value: function registerInitConfiguratorMode(initConfiguratorMode) {
50728
- this.initConfiguratorMode = initConfiguratorMode;
50729
- }
50730
- }, {
50731
- key: "registerUpdateFullScreenRendering",
50732
- value: function registerUpdateFullScreenRendering(updateFullscreenRendering) {
50733
- this.updateFullscreenRendering = updateFullscreenRendering;
50927
+ key: "isViewAttached",
50928
+ get: function get() {
50929
+ return !!this.view;
50734
50930
  }
50931
+
50932
+ /** Attach the view (initial mount or adoption of an existing, possibly headless instance). */
50735
50933
  }, {
50736
- key: "registerUpdateSetImage",
50737
- value: function registerUpdateSetImage(updateSetImage) {
50738
- this.updateSetImage = updateSetImage;
50934
+ key: "attachView",
50935
+ value: function attachView(view) {
50936
+ this.view = view;
50739
50937
  }
50740
50938
 
50741
- // Planner 3D / 2D
50939
+ /** Detach the view; the instance keeps working headless and can be re-attached later. */
50742
50940
  }, {
50743
- key: "registerGetPlannerRenderingSize",
50744
- value: function registerGetPlannerRenderingSize(getPlannerRenderingSize) {
50745
- this.getPlannerRenderingSize = getPlannerRenderingSize;
50941
+ key: "detachView",
50942
+ value: function detachView() {
50943
+ this.view = undefined;
50746
50944
  }
50747
50945
 
50748
50946
  /** See {@link DivaPlannerHandler.strictArtifactGeneration}. Auto-propagates. */
@@ -50753,187 +50951,40 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50753
50951
  this.strictArtifactGeneration = value;
50754
50952
  (_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);
50755
50953
  }
50756
- }, {
50757
- key: "registerGetDoShow3DDimensionLines",
50758
- value: function registerGetDoShow3DDimensionLines(getDoShow3DDimensionLines) {
50759
- this.getDoShow3DDimensionLines = getDoShow3DDimensionLines;
50760
- }
50761
- }, {
50762
- key: "registerGetCurrentAlternativRendering",
50763
- value: function registerGetCurrentAlternativRendering(getCurrentAlternativRendering) {
50764
- this.getCurrentAlternativRendering = getCurrentAlternativRendering;
50765
- }
50766
- }, {
50767
- key: "registerUpdatePlanner3DImage",
50768
- value: function registerUpdatePlanner3DImage(updatePlanner3DImage) {
50769
- this.updatePlanner3DImage = updatePlanner3DImage;
50770
- }
50771
- }, {
50772
- key: "registerSetRotationOrbitCube",
50773
- value: function registerSetRotationOrbitCube(setRotationOrbitCube) {
50774
- this.setRotationOrbitCube = setRotationOrbitCube;
50775
- }
50776
- }, {
50777
- key: "registerGetCanvas2DAsJPG",
50778
- value: function registerGetCanvas2DAsJPG(getCanvas2DAsJPG) {
50779
- this.getCanvas2DAsJPG = getCanvas2DAsJPG;
50780
- }
50781
- }, {
50782
- key: "registerUpdatePlanner2DGrid",
50783
- value: function registerUpdatePlanner2DGrid(updatePlanner2DGrid) {
50784
- this.updatePlanner2DGrid = updatePlanner2DGrid;
50785
- }
50786
- }, {
50787
- key: "registerGetCurPlannerViewMode",
50788
- value: function registerGetCurPlannerViewMode(getCurPlannerViewMode) {
50789
- this.getCurPlannerViewMode = getCurPlannerViewMode;
50790
- }
50791
- }, {
50792
- key: "registerGetInitPlannerViewMode",
50793
- value: function registerGetInitPlannerViewMode(getInitPlannerViewMode) {
50794
- this.getInitPlannerViewMode = getInitPlannerViewMode;
50795
- }
50796
- //Navigation
50797
- }, {
50798
- key: "registerNavigateToTabGroup",
50799
- value: function registerNavigateToTabGroup(navigateToTabGroup) {
50800
- this.navigateToTabGroup = navigateToTabGroup;
50801
- }
50802
- }, {
50803
- key: "registerNavigateToConfigStep",
50804
- value: function registerNavigateToConfigStep(navigateToConfigStep) {
50805
- this.navigateToConfigStep = navigateToConfigStep;
50806
- }
50807
-
50808
- //Config Structure
50809
- }, {
50810
- key: "registerInitConfiguratorStructure",
50811
- value: function registerInitConfiguratorStructure(initConfiguratorStructure) {
50812
- this.initConfiguratorStructure = initConfiguratorStructure;
50813
- }
50814
- }, {
50815
- key: "registerOnBasketInitialized",
50816
- value: function registerOnBasketInitialized(onBasketInitialized) {
50817
- this.onBasketInitialized = onBasketInitialized;
50818
- }
50819
- }, {
50820
- key: "registerUpdateConfiguratorStructure",
50821
- value: function registerUpdateConfiguratorStructure(updateConfiguratorStructure) {
50822
- this.updateConfiguratorStructure = updateConfiguratorStructure;
50823
- }
50824
- }, {
50825
- key: "registerSetWebConifguratorTitle",
50826
- value: function registerSetWebConifguratorTitle(setWebConifguratorTitle) {
50827
- this.setWebConifguratorTitle = setWebConifguratorTitle;
50828
- }
50829
50954
 
50830
- //Paletten
50831
- }, {
50832
- key: "registerUpdateCatalogPlannerArticles",
50833
- value: function registerUpdateCatalogPlannerArticles(updateCatalogPlannerArticles) {
50834
- this.updateCatalogPlannerArticles = updateCatalogPlannerArticles;
50835
- }
50836
- }, {
50837
- key: "registerUpdateCatalogPlanner2Dot0Articles",
50838
- value: function registerUpdateCatalogPlanner2Dot0Articles(updateCatalogPlanner2Dot0Articles) {
50839
- this.updateCatalogPlanner2Dot0Articles = updateCatalogPlanner2Dot0Articles;
50840
- }
50841
- }, {
50842
- key: "registerUpdateAccessoiresPalette",
50843
- value: function registerUpdateAccessoiresPalette(updateAccessoiresPalette) {
50844
- this.updateAccessoiresPalette = updateAccessoiresPalette;
50845
- }
50846
- }, {
50847
- key: "registerUpdatePaletteInfos",
50848
- value: function registerUpdatePaletteInfos(updatePaletteInfos) {
50849
- this.updatePaletteInfos = updatePaletteInfos;
50850
- }
50851
- }, {
50852
- key: "registerUpdateBBox",
50853
- value: function registerUpdateBBox(updateBBox) {
50854
- this.updateBBox = updateBBox;
50855
- }
50856
- }, {
50857
- key: "registerUpdateElementSelectionConfig",
50858
- value: function registerUpdateElementSelectionConfig(updateElementSelectionConfig) {
50859
- this.updateElementSelectionConfig = updateElementSelectionConfig;
50860
- }
50861
- }, {
50862
- key: "registerUpdateElementSelectionPlanner",
50863
- value: function registerUpdateElementSelectionPlanner(updateElementSelectionPlanner, somethingChanged) {
50864
- this.updateElementSelectionPlanner = updateElementSelectionPlanner;
50865
- }
50866
- }, {
50867
- key: "registerUpdatePlannerElements",
50868
- value: function registerUpdatePlannerElements(updatePlannerElements) {
50869
- this.updateViewPlannerElements = updatePlannerElements;
50870
- }
50871
- }, {
50872
- key: "registerUpdateConfigItems",
50873
- value: function registerUpdateConfigItems(updateConfigItems) {
50874
- this.updateConfigItems = updateConfigItems;
50875
- }
50876
- }, {
50877
- key: "registerUpdateSummaryItems",
50878
- value: function registerUpdateSummaryItems(updateSummaryItems) {
50879
- this.updateSummaryItems = updateSummaryItems;
50880
- }
50881
- }, {
50882
- key: "registerUpdateStaticRoomListItems",
50883
- value: function registerUpdateStaticRoomListItems(updateStaticRoomListItems) {
50884
- this.updateStaticRoomListItems = updateStaticRoomListItems;
50885
- }
50886
- }, {
50887
- key: "registerUpdateShelfPlannerItems",
50888
- value: function registerUpdateShelfPlannerItems(updateShelfPlannerItems) {
50889
- this.updateShelfPlannerItems = updateShelfPlannerItems;
50890
- }
50891
- }, {
50892
- key: "registerUpdateShelfPlannerGrids",
50893
- value: function registerUpdateShelfPlannerGrids(updateFreePlacesOnGrids) {
50894
- this.updateFreePlacesOnGrids = updateFreePlacesOnGrids;
50895
- }
50896
- }, {
50897
- key: "registerUpdateDoorPlannerItems",
50898
- value: function registerUpdateDoorPlannerItems(updateDoorPlannerItems) {
50899
- this.updateDoorPlannerItems = updateDoorPlannerItems;
50900
- }
50901
- }, {
50902
- key: "registerUpdatePrice",
50903
- value: function registerUpdatePrice(updatePrice) {
50904
- this.updatePrice = updatePrice;
50905
- }
50906
- }, {
50907
- key: "registerUpdateViewButtonsDependigOnConfigStructure",
50908
- value: function registerUpdateViewButtonsDependigOnConfigStructure(updateViewButtonsDependigOnConfigStructure) {
50909
- this.updateViewButtonsDependigOnConfigStructure = updateViewButtonsDependigOnConfigStructure;
50910
- }
50955
+ /**
50956
+ * Bring the view to a config step (and optionally one option value): the view does the
50957
+ * actual navigation/scrolling. Used by the diva agent after it drives the configuration.
50958
+ * No-op when headless.
50959
+ */
50911
50960
  }, {
50912
- key: "registerOnClickAddToBasket",
50913
- value: function registerOnClickAddToBasket(onClickAddToBasket) {
50914
- this.onClickAddToBasket = onClickAddToBasket;
50961
+ key: "revealConfigStepInView",
50962
+ value: function revealConfigStepInView(configStepKey, optionValueCodex) {
50963
+ var _this$view95, _this$view96;
50964
+ (_this$view95 = this.view) === null || _this$view95 === void 0 || _this$view95.navigateToConfigStep(configStepKey, false);
50965
+ if (optionValueCodex) (_this$view96 = this.view) === null || _this$view96 === void 0 || _this$view96.scrollToOptionValueInView(configStepKey, optionValueCodex);
50915
50966
  }
50916
50967
 
50917
50968
  /***********************************Outside events the webPlanner subscribes to ******************************************/
50918
50969
  }, {
50919
50970
  key: "subscribeToWebPlannerEvents",
50920
50971
  value: function subscribeToWebPlannerEvents() {
50921
- var _this$actions48;
50922
- (_this$actions48 = this.actions) === null || _this$actions48 === void 0 || _this$actions48.subscribeEvents(this.addToBasketEventFunction);
50972
+ var _this$actions51;
50973
+ (_this$actions51 = this.actions) === null || _this$actions51 === void 0 || _this$actions51.subscribeEvents(this.addToBasketEventFunction);
50923
50974
  }
50924
50975
  }, {
50925
50976
  key: "unsubscribeFromWebPlannerEvents",
50926
50977
  value: function unsubscribeFromWebPlannerEvents() {
50927
- var _this$actions49;
50928
- (_this$actions49 = this.actions) === null || _this$actions49 === void 0 || _this$actions49.unSubscribeEvents(this.addToBasketEventFunction);
50978
+ var _this$actions52;
50979
+ (_this$actions52 = this.actions) === null || _this$actions52 === void 0 || _this$actions52.unSubscribeEvents(this.addToBasketEventFunction);
50929
50980
  }
50930
50981
  }, {
50931
50982
  key: "initApiForLogicOnly",
50932
50983
  value: //just for testing purposes
50933
50984
  function () {
50934
- var _initApiForLogicOnly = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee37(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
50935
- return _regeneratorRuntime__default["default"].wrap(function _callee37$(_context37) {
50936
- while (1) switch (_context37.prev = _context37.next) {
50985
+ var _initApiForLogicOnly = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee38(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
50986
+ return _regeneratorRuntime__default["default"].wrap(function _callee38$(_context38) {
50987
+ while (1) switch (_context38.prev = _context38.next) {
50937
50988
  case 0:
50938
50989
  //empty services
50939
50990
  this.api = new DivaApiHandler(_objectSpread$8(_objectSpread$8({}, this.plannerConfig), {}, {
@@ -50946,16 +50997,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50946
50997
  jwt: jwt,
50947
50998
  apiKey: apiKey
50948
50999
  }), handler);
50949
- _context37.next = 3;
51000
+ _context38.next = 3;
50950
51001
  return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
50951
51002
  case 3:
50952
51003
  this.plannerHandler = new DivaPlannerHandler(true);
50953
51004
  if (this.strictArtifactGeneration) this.plannerHandler.setStrictArtifactGeneration(true);
50954
51005
  case 5:
50955
51006
  case "end":
50956
- return _context37.stop();
51007
+ return _context38.stop();
50957
51008
  }
50958
- }, _callee37, this);
51009
+ }, _callee38, this);
50959
51010
  }));
50960
51011
  function initApiForLogicOnly(_x96, _x97, _x98, _x99, _x100, _x101, _x102) {
50961
51012
  return _initApiForLogicOnly.apply(this, arguments);
@@ -50970,16 +51021,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50970
51021
  }, {
50971
51022
  key: "loadBasket",
50972
51023
  value: function () {
50973
- var _loadBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee38() {
50974
- return _regeneratorRuntime__default["default"].wrap(function _callee38$(_context38) {
50975
- while (1) switch (_context38.prev = _context38.next) {
51024
+ var _loadBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee39() {
51025
+ return _regeneratorRuntime__default["default"].wrap(function _callee39$(_context39) {
51026
+ while (1) switch (_context39.prev = _context39.next) {
50976
51027
  case 0:
50977
- return _context38.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
51028
+ return _context39.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
50978
51029
  case 1:
50979
51030
  case "end":
50980
- return _context38.stop();
51031
+ return _context39.stop();
50981
51032
  }
50982
- }, _callee38, this);
51033
+ }, _callee39, this);
50983
51034
  }));
50984
51035
  function loadBasket() {
50985
51036
  return _loadBasket.apply(this, arguments);
@@ -50994,39 +51045,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50994
51045
  }, {
50995
51046
  key: "initBasket",
50996
51047
  value: function () {
50997
- var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee39(init3D, ignoreFavorites) {
51048
+ var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee40(init3D, ignoreFavorites) {
50998
51049
  var initSetState, set, basket;
50999
- return _regeneratorRuntime__default["default"].wrap(function _callee39$(_context39) {
51000
- while (1) switch (_context39.prev = _context39.next) {
51050
+ return _regeneratorRuntime__default["default"].wrap(function _callee40$(_context40) {
51051
+ while (1) switch (_context40.prev = _context40.next) {
51001
51052
  case 0:
51002
51053
  this.divaNr = this.divaBasketHandler.actDivaNr;
51003
51054
  initSetState = this.getInitStateForSet(!init3D);
51004
- _context39.next = 4;
51055
+ _context40.next = 4;
51005
51056
  return this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
51006
51057
  case 4:
51007
- _context39.next = 6;
51058
+ _context40.next = 6;
51008
51059
  return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
51009
51060
  case 6:
51010
51061
  //TODO check if when basket gets repaired the product match gets called
51011
51062
  set = this.actSet();
51012
51063
  setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
51013
51064
  if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
51014
- _context39.next = 11;
51065
+ _context40.next = 11;
51015
51066
  break;
51016
51067
  }
51017
- _context39.next = 11;
51068
+ _context40.next = 11;
51018
51069
  return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
51019
51070
  case 11:
51020
- _context39.next = 13;
51071
+ _context40.next = 13;
51021
51072
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
51022
51073
  case 13:
51023
- basket = _context39.sent;
51024
- return _context39.abrupt("return", basket);
51074
+ basket = _context40.sent;
51075
+ return _context40.abrupt("return", basket);
51025
51076
  case 15:
51026
51077
  case "end":
51027
- return _context39.stop();
51078
+ return _context40.stop();
51028
51079
  }
51029
- }, _callee39, this);
51080
+ }, _callee40, this);
51030
51081
  }));
51031
51082
  function initBasket(_x103, _x104) {
51032
51083
  return _initBasket.apply(this, arguments);
@@ -51036,9 +51087,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
51036
51087
  }, {
51037
51088
  key: "getFavoriteAiRoomKeysFromSet",
51038
51089
  value: function getFavoriteAiRoomKeysFromSet() {
51039
- var _this$actSet41;
51090
+ var _this$actSet43;
51040
51091
  var orderSets = this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr);
51041
- var actSetId = (_this$actSet41 = this.actSet()) === null || _this$actSet41 === void 0 ? void 0 : _this$actSet41.getSetId();
51092
+ var actSetId = (_this$actSet43 = this.actSet()) === null || _this$actSet43 === void 0 ? void 0 : _this$actSet43.getSetId();
51042
51093
  var orderSet = orderSets.find(function (os) {
51043
51094
  return os.SetID === actSetId;
51044
51095
  });
@@ -51065,21 +51116,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
51065
51116
  }, {
51066
51117
  key: "getValidVariantsLength",
51067
51118
  value: function () {
51068
- var _getValidVariantsLength = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee40() {
51119
+ var _getValidVariantsLength = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee41() {
51069
51120
  var set;
51070
- return _regeneratorRuntime__default["default"].wrap(function _callee40$(_context40) {
51071
- while (1) switch (_context40.prev = _context40.next) {
51121
+ return _regeneratorRuntime__default["default"].wrap(function _callee41$(_context41) {
51122
+ while (1) switch (_context41.prev = _context41.next) {
51072
51123
  case 0:
51073
51124
  set = this.actSet();
51074
- _context40.next = 3;
51125
+ _context41.next = 3;
51075
51126
  return favoritesHandlerInstance.getValidVariants(set, true);
51076
51127
  case 3:
51077
- return _context40.abrupt("return", _context40.sent.length);
51128
+ return _context41.abrupt("return", _context41.sent.length);
51078
51129
  case 4:
51079
51130
  case "end":
51080
- return _context40.stop();
51131
+ return _context41.stop();
51081
51132
  }
51082
- }, _callee40, this);
51133
+ }, _callee41, this);
51083
51134
  }));
51084
51135
  function getValidVariantsLength() {
51085
51136
  return _getValidVariantsLength.apply(this, arguments);
@@ -51089,44 +51140,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
51089
51140
  }, {
51090
51141
  key: "handleFavorites",
51091
51142
  value: function () {
51092
- var _handleFavorites = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee41(mode) {
51093
- var _this5 = this;
51143
+ var _handleFavorites = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee42(mode) {
51144
+ var _this6 = this;
51094
51145
  var set, i;
51095
- return _regeneratorRuntime__default["default"].wrap(function _callee41$(_context41) {
51096
- while (1) switch (_context41.prev = _context41.next) {
51146
+ return _regeneratorRuntime__default["default"].wrap(function _callee42$(_context42) {
51147
+ while (1) switch (_context42.prev = _context42.next) {
51097
51148
  case 0:
51098
51149
  set = this.actSet();
51099
51150
  i = 0;
51100
51151
  case 2:
51101
51152
  if (!favoritesHandlerInstance.IsCalcForSummary) {
51102
- _context41.next = 11;
51153
+ _context42.next = 11;
51103
51154
  break;
51104
51155
  }
51105
- _context41.next = 5;
51156
+ _context42.next = 5;
51106
51157
  return DivaUtils__default["default"].Sleep(200);
51107
51158
  case 5:
51108
51159
  i++;
51109
51160
  if (!(i > 1000)) {
51110
- _context41.next = 9;
51161
+ _context42.next = 9;
51111
51162
  break;
51112
51163
  }
51113
51164
  LOG$2.error(new DivaUtils.DivaError('error on generating Variants of Summary'));
51114
- return _context41.abrupt("break", 11);
51165
+ return _context42.abrupt("break", 11);
51115
51166
  case 9:
51116
- _context41.next = 2;
51167
+ _context42.next = 2;
51117
51168
  break;
51118
51169
  case 11:
51119
- _context41.next = 13;
51170
+ _context42.next = 13;
51120
51171
  return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
51121
- return _this5.update2DGrid(set);
51172
+ return _this6.update2DGrid(set);
51122
51173
  }, this.actions);
51123
51174
  case 13:
51124
- return _context41.abrupt("return", _context41.sent);
51175
+ return _context42.abrupt("return", _context42.sent);
51125
51176
  case 14:
51126
51177
  case "end":
51127
- return _context41.stop();
51178
+ return _context42.stop();
51128
51179
  }
51129
- }, _callee41, this);
51180
+ }, _callee42, this);
51130
51181
  }));
51131
51182
  function handleFavorites(_x105) {
51132
51183
  return _handleFavorites.apply(this, arguments);
@@ -51141,46 +51192,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
51141
51192
  }, {
51142
51193
  key: "initSapOrderLinesFromBasket",
51143
51194
  value: function () {
51144
- var _initSapOrderLinesFromBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee42(divaNr, init3D, onlyLoadOldBakset) {
51195
+ var _initSapOrderLinesFromBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee43(divaNr, init3D, onlyLoadOldBakset) {
51145
51196
  var result, oldBasket, basket;
51146
- return _regeneratorRuntime__default["default"].wrap(function _callee42$(_context42) {
51147
- while (1) switch (_context42.prev = _context42.next) {
51197
+ return _regeneratorRuntime__default["default"].wrap(function _callee43$(_context43) {
51198
+ while (1) switch (_context43.prev = _context43.next) {
51148
51199
  case 0:
51149
51200
  if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
51150
- _context42.next = 3;
51201
+ _context43.next = 3;
51151
51202
  return this.loadBasket();
51152
51203
  case 3:
51153
- result = _context42.sent;
51204
+ result = _context43.sent;
51154
51205
  if (!onlyLoadOldBakset) {
51155
- _context42.next = 6;
51206
+ _context43.next = 6;
51156
51207
  break;
51157
51208
  }
51158
- return _context42.abrupt("return", {
51209
+ return _context43.abrupt("return", {
51159
51210
  oldBasket: new basketModel.BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
51160
51211
  cache: {}
51161
51212
  });
51162
51213
  case 6:
51163
51214
  if (!(result === false)) {
51164
- _context42.next = 8;
51215
+ _context43.next = 8;
51165
51216
  break;
51166
51217
  }
51167
51218
  throw new Error('Could not load basket! ' + divaNr);
51168
51219
  case 8:
51169
51220
  oldBasket = new basketModel.BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
51170
- _context42.next = 11;
51221
+ _context43.next = 11;
51171
51222
  return this.initBasket(init3D);
51172
51223
  case 11:
51173
- basket = _context42.sent;
51174
- return _context42.abrupt("return", {
51224
+ basket = _context43.sent;
51225
+ return _context43.abrupt("return", {
51175
51226
  basket: basket,
51176
51227
  oldBasket: oldBasket,
51177
51228
  cache: this.api.getJsonDataCache()
51178
51229
  });
51179
51230
  case 13:
51180
51231
  case "end":
51181
- return _context42.stop();
51232
+ return _context43.stop();
51182
51233
  }
51183
- }, _callee42, this);
51234
+ }, _callee43, this);
51184
51235
  }));
51185
51236
  function initSapOrderLinesFromBasket(_x106, _x107, _x108) {
51186
51237
  return _initSapOrderLinesFromBasket.apply(this, arguments);
@@ -51393,45 +51444,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
51393
51444
  this.i18n = function () {
51394
51445
  return undefined;
51395
51446
  };
51396
- this.initPlannerView = undefined;
51397
- this.initConfiguratorMode = undefined;
51398
- this.initConfiguratorStructure = undefined;
51399
- this.updateConfiguratorStructure = undefined;
51400
- this.navigateToTabGroup = undefined;
51401
- this.navigateToConfigStep = undefined;
51402
- this.updateCatalogPlannerArticles = undefined;
51403
- this.updateCatalogPlanner2Dot0Articles = undefined;
51404
- this.updateAccessoiresPalette = undefined;
51405
- this.setWebConifguratorTitle = undefined;
51406
- this.onBasketInitialized = undefined;
51407
- this.updateConfigItems = undefined;
51408
- this.updatePaletteInfos = undefined;
51409
- this.updateViewPlannerElements = undefined;
51410
- this.updateElementSelectionConfig = undefined;
51411
- this.updateElementSelectionPlanner = undefined;
51412
- this.getCurPlannerViewMode = undefined;
51413
- this.getInitPlannerViewMode = undefined;
51414
- this.updatePlanner3DImage = undefined;
51415
- this.setRotationOrbitCube = undefined;
51416
- this.getCanvas2DAsJPG = undefined;
51417
- this.updatePlannerMsgContainer = undefined;
51418
- this.updateFullscreenRendering = undefined;
51419
- this.updateSetImage = undefined;
51420
- this.getDoShow3DDimensionLines = undefined;
51421
- this.getCurrentAlternativRendering = undefined;
51422
- this.updatePlanner2DGrid = undefined;
51423
- this.getPlannerRenderingSize = undefined;
51424
- this.updateSummaryItems = undefined;
51425
- this.updateStaticRoomListItems = undefined;
51426
- this.updateShelfPlannerItems = undefined;
51427
- this.updateFreePlacesOnGrids = undefined;
51428
- this.updateDoorPlannerItems = undefined;
51429
- this.updatePrice = undefined;
51430
- this.onClickAddToBasket = undefined;
51431
- this.updateViewButtonsDependigOnConfigStructure = undefined;
51432
- this.initViewApiDependencies = undefined;
51433
- this.setHQRenderScript = undefined;
51434
- this.setCamInfo = undefined;
51447
+ this.detachView();
51435
51448
  }
51436
51449
  }]);
51437
51450
  }();
@@ -53647,6 +53660,36 @@ var Grid = /*#__PURE__*/function () {
53647
53660
  set: function set(val) {
53648
53661
  this.disabledByRule = val;
53649
53662
  }
53663
+ }, {
53664
+ key: "HeightGridCellCountOnRule",
53665
+ get: function get() {
53666
+ return this.heightGridCellCountOnRule;
53667
+ }
53668
+ }, {
53669
+ key: "CurrentLoadedRuleIndex",
53670
+ get: function get() {
53671
+ return this.currentLoadedRuleIndex;
53672
+ }
53673
+ }, {
53674
+ key: "MaxAccessoireInGridCounter",
53675
+ get: function get() {
53676
+ return this.maxAccessoireInGridCounter;
53677
+ }
53678
+ }, {
53679
+ key: "ExcludeAccessoiresByAccessoiresInGrid",
53680
+ get: function get() {
53681
+ return this.excludeAccessoiresByAccessoiresInGrid;
53682
+ }
53683
+ }, {
53684
+ key: "InfluencedByNeighborGrids",
53685
+ get: function get() {
53686
+ return this.influencedByNeighborGrids;
53687
+ }
53688
+ }, {
53689
+ key: "InfluencedByOverlappingGrids",
53690
+ get: function get() {
53691
+ return this.influencedByOverlappingGrids;
53692
+ }
53650
53693
  }, {
53651
53694
  key: "DisableCellsByMeasures",
53652
53695
  get: function get() {
@@ -53942,20 +53985,13 @@ var PlannerElementData = /*#__PURE__*/function () {
53942
53985
  }, {
53943
53986
  key: "WorldPosCenterIgnoreOLF",
53944
53987
  get: function get() {
53945
- // OLT offset (oltLeft, oltTop) is relative to OLF origin - use OLF corner when we have OLF dimensions
53946
- var baseCorner;
53947
- if (this.HasOLFPolygon && this.planElement.olfWidth != null && this.planElement.olfDepth != null) {
53948
- var olfW = this.planElement.olfWidth / DivaUtils__default["default"].UnitRecalc;
53949
- var olfD = this.planElement.olfDepth / DivaUtils__default["default"].UnitRecalc;
53950
- var olfCornerDir = new Vector2(-olfW / 2, -olfD / 2);
53951
- olfCornerDir = Vector2.rotateOrigin(olfCornerDir, this.planElement.rotDeg);
53952
- baseCorner = new Vector3(this.planElement.worldPosCenter.x + olfCornerDir.x, this.planElement.worldPosCenter.y, this.planElement.worldPosCenter.z + olfCornerDir.y);
53953
- } else {
53954
- baseCorner = this.WorldPosCorner;
53955
- }
53988
+ // oltLeft/oltTop are measured from the OLF corner, so that corner is the base; without an
53989
+ // OLF the getter falls back to WorldPosCorner on its own.
53990
+ var olfCorner = this.getWorldPosCornerOLF();
53956
53991
  var centerDir = new Vector2(this.planElement.oltLeft + this.planElement.oltWidth / 2.0, this.planElement.oltTop + this.planElement.oltDepth / 2.0);
53957
53992
  centerDir = Vector2.rotateOrigin(centerDir, this.planElement.rotDeg);
53958
- return new Vector3(baseCorner.x + centerDir.x, this.WorldPosCenter.y, baseCorner.z + centerDir.y);
53993
+ var worldPosCornerIgnoreOLF = new Vector3(olfCorner.x + centerDir.x, this.WorldPosCenter.y, olfCorner.z + centerDir.y);
53994
+ return worldPosCornerIgnoreOLF;
53959
53995
  }
53960
53996
 
53961
53997
  /**
@@ -71629,7 +71665,7 @@ function runHeadlessArtifactPassBatch(_x2) {
71629
71665
  }
71630
71666
  function _runHeadlessArtifactPassBatch() {
71631
71667
  _runHeadlessArtifactPassBatch = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(params) {
71632
- var _params$lang, _params$timeoutMs, _planner$setStrictArt;
71668
+ var _params$lang, _params$timeoutMs;
71633
71669
  var lang, timeoutMs, firstBasket, configState, planner, entries, connectionInitialized, _iterator, _step, product, _params$onProductFail, _loop, i;
71634
71670
  return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context4) {
71635
71671
  while (1) switch (_context4.prev = _context4.next) {
@@ -71653,15 +71689,13 @@ function _runHeadlessArtifactPassBatch() {
71653
71689
  loginMode: 'offline'
71654
71690
  };
71655
71691
  planner = new DivaWebPlanner(configState);
71656
- planner.registerGetPlannerRenderingSize(function () {
71657
- return {
71658
- imgWidth: 1920,
71659
- imgHeight: 1080
71660
- };
71661
- });
71692
+ planner.headlessRenderingSize = {
71693
+ imgWidth: 1920,
71694
+ imgHeight: 1080
71695
+ };
71662
71696
  // Strict mode: fail rather than persist a basket missing its 3D image /
71663
71697
  // HQ render script on a render-farm timeout.
71664
- (_planner$setStrictArt = planner.setStrictArtifactGeneration) === null || _planner$setStrictArt === void 0 || _planner$setStrictArt.call(planner, true);
71698
+ planner.setStrictArtifactGeneration(true);
71665
71699
  entries = [];
71666
71700
  connectionInitialized = false;
71667
71701
  _context4.prev = 11;