@crystaldesign/web-planner-logic 25.4.0-beta.34 → 25.4.0-beta.36

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 (59) hide show
  1. package/build/cjs/{DivaBoxPlanner-66e491b8.js → DivaBoxPlanner-bdba29be.js} +2 -2
  2. package/build/cjs/{DivaStandardPlanner-2eb07926.js → DivaStandardPlanner-ded3927f.js} +2 -2
  3. package/build/cjs/{DoorPlanner-62e30207.js → DoorPlanner-977c7939.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-c3397cf9.js → Host3DSignalR-7c7b0e72.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-e7cfea5f.js → LiviqueWWSHandler-db6e15b8.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-b6a38b56.js → PfisterWWSHandler-c3db27fb.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-8d580758.js → PlannerHandler2D-e726119b.js} +1 -1
  8. package/build/cjs/{SeriousBasketHandler-d6b89f59.js → SeriousBasketHandler-3919fc64.js} +1 -1
  9. package/build/cjs/{ShelfPlanner-2b2a83a7.js → ShelfPlanner-d5667b0a.js} +1 -1
  10. package/build/cjs/{StandardWWSHandler-2e7d48a0.js → StandardWWSHandler-e3244909.js} +1 -1
  11. package/build/cjs/{index-e1d20da4.js → index-0bcfafc8.js} +728 -482
  12. package/build/cjs/index.js +1 -1
  13. package/build/esm/{DivaBoxPlanner-f77a7cfc.js → DivaBoxPlanner-f03cb8f2.js} +2 -2
  14. package/build/esm/{DivaStandardPlanner-2a46e1fc.js → DivaStandardPlanner-4d500655.js} +2 -2
  15. package/build/esm/{DoorPlanner-a905af78.js → DoorPlanner-6300bf8d.js} +1 -1
  16. package/build/esm/{Host3DSignalR-e81c5106.js → Host3DSignalR-4ac73340.js} +1 -1
  17. package/build/esm/{LiviqueWWSHandler-8e63d99c.js → LiviqueWWSHandler-18a06139.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-032ac622.js → PfisterWWSHandler-e9263d8a.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-de2e142b.js → PlannerHandler2D-a0835889.js} +1 -1
  20. package/build/esm/{SeriousBasketHandler-0a75b0c4.js → SeriousBasketHandler-4bd4a253.js} +1 -1
  21. package/build/esm/{ShelfPlanner-4577af3b.js → ShelfPlanner-556b6a40.js} +1 -1
  22. package/build/esm/{StandardWWSHandler-7156e7b1.js → StandardWWSHandler-d5df49a9.js} +1 -1
  23. package/build/esm/{index-e3673195.js → index-bfed1140.js} +728 -482
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts +12 -0
  26. package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/interface/Articles/InitArticleType.d.ts +2 -0
  28. package/build/types/web-planner-logic/src/interface/Articles/InitArticleType.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +1 -1
  30. package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +3 -1
  32. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts +2 -6
  34. package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +2 -0
  36. package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts +1 -0
  38. package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +4 -4
  40. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
  41. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +6 -6
  42. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
  43. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +4 -5
  44. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
  45. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +1 -1
  46. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  47. package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts +12 -0
  48. package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts.map +1 -1
  49. package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts +1 -1
  50. package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts.map +1 -1
  51. package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts +2 -2
  52. package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
  53. package/build/types/web-planner-logic/src/model/Catalog/IDMCatalogData.d.ts +3 -1
  54. package/build/types/web-planner-logic/src/model/Catalog/IDMCatalogData.d.ts.map +1 -1
  55. package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts.map +1 -1
  56. package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts.map +1 -1
  57. package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts +2 -0
  58. package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts.map +1 -1
  59. package/package.json +2 -2
@@ -28,7 +28,7 @@ import _typeof from '@babel/runtime/helpers/typeof';
28
28
  var _excluded = ["type"];
29
29
  function ownKeys$l(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
30
30
  function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$l(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
31
- var LOG$m = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
31
+ var LOG$o = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
32
32
  var JsonDataCache = /*#__PURE__*/function () {
33
33
  function JsonDataCache() {
34
34
  _classCallCheck(this, JsonDataCache);
@@ -59,10 +59,10 @@ var DivaApiHandler = /*#__PURE__*/function () {
59
59
  _defineProperty(this, "jwt", void 0);
60
60
  _defineProperty(this, "apiKey", void 0);
61
61
  _defineProperty(this, "actions", void 0);
62
- _defineProperty(this, "state", void 0);
63
62
  _defineProperty(this, "i18n", void 0);
64
63
  _defineProperty(this, "getSessionGuid", void 0);
65
64
  _defineProperty(this, "useEkPrices", false);
65
+ _defineProperty(this, "smSupplierNr", undefined);
66
66
  this.organization = plannerConfig.currentOrganization;
67
67
  this.getSessionGuid = plannerConfig.actions.getSessionGuid;
68
68
  this.apiConfig = plannerConfig.apiConfig;
@@ -71,10 +71,11 @@ var DivaApiHandler = /*#__PURE__*/function () {
71
71
  this.jwt = plannerConfig.jwt;
72
72
  this.apiKey = plannerConfig.apiKey;
73
73
  this.useEkPrices = !!plannerConfig.useEkPrices;
74
+ this.smSupplierNr = plannerConfig.smSupplierNr;
74
75
  if (plannerConfig.settings) {
75
- this.initalizeWebConfigData(plannerConfig.settings, plannerConfig.lang);
76
+ this.initalizeWebConfigData(plannerConfig);
76
77
  } else {
77
- LOG$m.error(new DivaError('Fehler beim laden der WebConfig', {
78
+ LOG$o.error(new DivaError('Fehler beim laden der WebConfig', {
78
79
  code: 'WC_0001'
79
80
  }));
80
81
  throw Error('Initalize failed!');
@@ -109,7 +110,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
109
110
  while (1) switch (_context.prev = _context.next) {
110
111
  case 0:
111
112
  skip = _args.length > 2 && _args[2] !== undefined ? _args[2] : 0;
112
- LOG$m.debug('DivaApiHandler.fetchData ' + url, 'DivaApiHandler, fetchData');
113
+ LOG$o.debug('DivaApiHandler.fetchData ' + url, 'DivaApiHandler, fetchData');
113
114
  if (init) {
114
115
  _context.next = 4;
115
116
  break;
@@ -142,7 +143,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
142
143
  case 18:
143
144
  data = _context.sent;
144
145
  if (data !== null && data !== void 0 && data.Error) {
145
- LOG$m.error(new DivaError(data.Error, {
146
+ LOG$o.error(new DivaError(data.Error, {
146
147
  code: 'WC_0001',
147
148
  custom: {
148
149
  url: url
@@ -281,14 +282,14 @@ var DivaApiHandler = /*#__PURE__*/function () {
281
282
  _context3.next = 8;
282
283
  break;
283
284
  }
284
- LOG$m.debug('getDataFromInternalCache: ' + queryString);
285
+ LOG$o.debug('getDataFromInternalCache: ' + queryString);
285
286
  return _context3.abrupt("return", cacheHit);
286
287
  case 8:
287
288
  if (!(cacheMD5 && this.jsonDataCache.get(cacheMD5) && !((_this$divaWebConfigDa2 = this.divaWebConfigData) !== null && _this$divaWebConfigDa2 !== void 0 && _this$divaWebConfigDa2.addOrganizationIdToCacheKey))) {
288
289
  _context3.next = 11;
289
290
  break;
290
291
  }
291
- LOG$m.debug('getDataFromInternalCache: ' + queryString);
292
+ LOG$o.debug('getDataFromInternalCache: ' + queryString);
292
293
  return _context3.abrupt("return", this.jsonDataCache.get(cacheMD5));
293
294
  case 11:
294
295
  if (!addSession) {
@@ -349,7 +350,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
349
350
  result = _context3.sent;
350
351
  if (method !== 'POST') this.jsonDataCache.set(myQS, result);
351
352
  if (cacheMD5 && !((_this$divaWebConfigDa3 = this.divaWebConfigData) !== null && _this$divaWebConfigDa3 !== void 0 && _this$divaWebConfigDa3.addOrganizationIdToCacheKey)) this.jsonDataCache.set(cacheMD5, result);
352
- LOG$m.debug('getDataFromApi: ' + queryString);
353
+ LOG$o.debug('getDataFromApi: ' + queryString);
353
354
  return _context3.abrupt("return", result);
354
355
  case 40:
355
356
  case "end":
@@ -385,7 +386,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
385
386
  case 5:
386
387
  _context4.prev = 5;
387
388
  _context4.t0 = _context4["catch"](1);
388
- LOG$m.error(new DivaError('could not create product in Configurator', {
389
+ LOG$o.error(new DivaError('could not create product in Configurator', {
389
390
  cause: _context4.t0
390
391
  }));
391
392
  return _context4.abrupt("return", false);
@@ -402,8 +403,10 @@ var DivaApiHandler = /*#__PURE__*/function () {
402
403
  }()
403
404
  }, {
404
405
  key: "initalizeWebConfigData",
405
- value: function initalizeWebConfigData(data, lang) {
406
- var _data$ViewConfig;
406
+ value: function initalizeWebConfigData(plannerConfig) {
407
+ var _ViewConfig;
408
+ var lang = plannerConfig.lang;
409
+ var data = plannerConfig.settings;
407
410
  this.divaWebConfigData = {
408
411
  serverId: data.serverId != undefined ? data.serverId : '33',
409
412
  configVariant: data.configVariant != undefined ? data.configVariant : '',
@@ -425,7 +428,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
425
428
  doAllowSetPlanner: data.doAllowSetPlanner,
426
429
  onErrorHandling: data.onErrorHandling,
427
430
  returnTo: data.returnTo,
428
- viewConfig: (_data$ViewConfig = data.ViewConfig) !== null && _data$ViewConfig !== void 0 ? _data$ViewConfig : data.viewConfig,
431
+ viewConfig: (_ViewConfig = data.ViewConfig) !== null && _ViewConfig !== void 0 ? _ViewConfig : data.viewConfig,
429
432
  loadSupplierColors: data.loadSupplierColors,
430
433
  showSelectionModeZero: data.showSelectionModeZero,
431
434
  dontLoadCatalogEditorLiteMask: data.dontLoadCatalogEditorLiteMask,
@@ -657,11 +660,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
657
660
  value: function setActions(actions) {
658
661
  this.actions = actions;
659
662
  }
660
- }, {
661
- key: "setState",
662
- value: function setState(state) {
663
- this.state = state;
664
- }
665
663
  }, {
666
664
  key: "getI18n",
667
665
  value: function getI18n() {
@@ -1010,8 +1008,10 @@ var DivaApiHandler = /*#__PURE__*/function () {
1010
1008
  }
1011
1009
  }, {
1012
1010
  key: "getIDMItems",
1013
- value: function getIDMItems(catalogId, serieId) {
1014
- return '/live/v3.0/catalogs/' + catalogId + '/series/' + serieId + '/items';
1011
+ value: function getIDMItems(catalogId, serieId, typeNos) {
1012
+ return '/live/v3.0/catalogs/' + catalogId + '/series/' + serieId + '/items' + (typeNos !== null && typeNos !== void 0 && typeNos.length ? '?filter=' + typeNos.map(function (t) {
1013
+ return encodeURIComponent('typeNo==' + t);
1014
+ }).join(' || ') : '?fields=properties;serieNo;featureClassRefNo;priceTypeRef;itemIdentification;catalogPage;weightBrutto;weightNetto;volume;minimumDeliveryTime;widthBasicShapeNominalValue;widthBasicShapeFrom;widthBasicShapeTo;widthBasicShapeStepSize;heightBasicShapeNominalValue;heightBasicShapeFrom;heightBasicShapeTo;heightBasicShapeStepSize;depthBasicShapeNominalValue;depthBasicShapeFrom;depthBasicShapeTo;depthBasicShapeStepSize;typeKey;eClassNo;detailInfoRefs;partListExclusive;partListRef;decisionRefs;typeNo;sequenceNo;edpNumber;eanNumber;shortText;fullText;planningAdvice;salesNumber');
1015
1015
  }
1016
1016
  }, {
1017
1017
  key: "getIDMItem",
@@ -1021,12 +1021,12 @@ var DivaApiHandler = /*#__PURE__*/function () {
1021
1021
  }, {
1022
1022
  key: "getIDMFeatures",
1023
1023
  value: function getIDMFeatures(catalogId, features) {
1024
- return '/live/v3.0/catalogs/' + catalogId + '/features' + '?featureNos=' + features.join(';');
1024
+ return '/live/v3.0/catalogs/' + catalogId + '/features' + '?featureNos=' + features.join(';') + (this.smSupplierNr ? '&supplierNo=' + this.smSupplierNr : '');
1025
1025
  }
1026
1026
  }, {
1027
1027
  key: "getIDMDecisions",
1028
1028
  value: function getIDMDecisions(catalogId, decisions) {
1029
- return '/live/v3.0/catalogs/' + catalogId + '/decisions' + '?decisionNos=' + decisions.join(';');
1029
+ return '/live/v3.0/catalogs/' + catalogId + '/decisions' + '?decisionNos=' + decisions.join(';') + (this.smSupplierNr ? '&supplierNo=' + this.smSupplierNr : '');
1030
1030
  }
1031
1031
  }, {
1032
1032
  key: "getIDMDetailInfos",
@@ -1194,7 +1194,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1194
1194
  case 9:
1195
1195
  _context10.prev = 9;
1196
1196
  _context10.t0 = _context10["catch"](4);
1197
- LOG$m.error(new DivaError('Error Connecting to Support-Service-LivePlanner', {
1197
+ LOG$o.error(new DivaError('Error Connecting to Support-Service-LivePlanner', {
1198
1198
  cause: _context10.t0
1199
1199
  }));
1200
1200
  case 12:
@@ -1241,7 +1241,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1241
1241
  case 10:
1242
1242
  _context11.prev = 10;
1243
1243
  _context11.t0 = _context11["catch"](3);
1244
- LOG$m.error({
1244
+ LOG$o.error({
1245
1245
  message: 'Could not fetch dimension',
1246
1246
  name: 'get dimension error'
1247
1247
  });
@@ -1320,7 +1320,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1320
1320
  case 14:
1321
1321
  _context12.prev = 14;
1322
1322
  _context12.t0 = _context12["catch"](6);
1323
- LOG$m.error(new DivaError('Error Connecting to Report Service', {
1323
+ LOG$o.error(new DivaError('Error Connecting to Report Service', {
1324
1324
  cause: _context12.t0
1325
1325
  }));
1326
1326
  case 17:
@@ -1844,6 +1844,7 @@ var CatalogPlannerArticleData = /*#__PURE__*/function () {
1844
1844
  }]);
1845
1845
  }();
1846
1846
 
1847
+ var LOG$n = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
1847
1848
  var OptionCatalogData = /*#__PURE__*/function () {
1848
1849
  function OptionCatalogData(opt, catalogData) {
1849
1850
  _classCallCheck(this, OptionCatalogData);
@@ -1924,6 +1925,23 @@ var OptionCatalogData = /*#__PURE__*/function () {
1924
1925
  case 'CONTENT_ITEM':
1925
1926
  this.opt.contentItemId = prop.Value;
1926
1927
  break;
1928
+ case 'SendToPim':
1929
+ this.opt.sendToPIM = prop.Value == '1';
1930
+ break;
1931
+ case 'Multiselect':
1932
+ this.opt.isMultiselect = prop.Value == '1';
1933
+ break;
1934
+ case 'ION_COMMENT_TEXT':
1935
+ case 'SHOW_IN_BASKET_WHEN_HAS_PRICE':
1936
+ case 'FEATURE_TYPE':
1937
+ case 'EshopCategoryMapping':
1938
+ case 'EshopSearchRelevant':
1939
+ case 'IsSalesText':
1940
+ case 'IsArtName':
1941
+ break;
1942
+ default:
1943
+ LOG$n.debug('implement mapping for these props for options: ' + prop.Codex);
1944
+ break;
1927
1945
  }
1928
1946
  }
1929
1947
  }
@@ -15945,6 +15963,7 @@ var ralClassics = [{
15945
15963
  rgb: '#7E8182'
15946
15964
  }];
15947
15965
 
15966
+ var LOG$m = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
15948
15967
  var OptionValueCatalogData = /*#__PURE__*/function () {
15949
15968
  function OptionValueCatalogData(opv, catalogData) {
15950
15969
  var _this = this;
@@ -16068,8 +16087,21 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16068
16087
  };
16069
16088
  });
16070
16089
  break;
16090
+ case 'PIMFlatValues':
16091
+ this.opv.isPIMFlatValue = prop.Value == '1';
16092
+ break;
16093
+ case 'IsVariantAttribute':
16094
+ this.opv.isVariantAttribute = prop.Value == '1';
16095
+ break;
16096
+ case 'ION_COMMENT_TEXT':
16097
+ case 'EshopCategoryMapping':
16098
+ case 'TopFilterAttribute':
16099
+ case 'PriceTageRelevant':
16100
+ case 'IsArtName':
16101
+ break;
16071
16102
  default:
16072
16103
  if (key.includes('__')) break;
16104
+ LOG$m.debug('implement mapping for these props for optionValue: ' + prop.Codex);
16073
16105
  var values_locales = [];
16074
16106
  if (prop.Value_locales) {
16075
16107
  var _prop$Value_locales;
@@ -16365,6 +16397,16 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16365
16397
  get: function get() {
16366
16398
  return this.opv.addToMeasure;
16367
16399
  }
16400
+ }, {
16401
+ key: "isPIMFlatValue",
16402
+ get: function get() {
16403
+ return this.opv.isPIMFlatValue;
16404
+ }
16405
+ }, {
16406
+ key: "isVariantAttribute",
16407
+ get: function get() {
16408
+ return this.opv.isVariantAttribute;
16409
+ }
16368
16410
  }]);
16369
16411
  }();
16370
16412
 
@@ -16506,6 +16548,16 @@ var CatalogArticleData = /*#__PURE__*/function () {
16506
16548
  get: function get() {
16507
16549
  return this._catalogArticle.contentItemId;
16508
16550
  }
16551
+ }, {
16552
+ key: "featureProperties",
16553
+ get: function get() {
16554
+ return this._catalogArticle.featureProperties;
16555
+ }
16556
+ }, {
16557
+ key: "optionProperties",
16558
+ get: function get() {
16559
+ return this._catalogArticle.optionProperties;
16560
+ }
16509
16561
  }, {
16510
16562
  key: "groupContentItemId",
16511
16563
  get: function get() {
@@ -16739,7 +16791,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
16739
16791
  }, {
16740
16792
  key: "areOptionsToLoad",
16741
16793
  get: function get() {
16742
- return this._catalogArticle.articleType == 'FLAT' || this._catalogArticle.areOptionsLoaded;
16794
+ return !(this._catalogArticle.articleType == 'FLAT' || this._catalogArticle.areOptionsLoaded);
16743
16795
  }
16744
16796
  }, {
16745
16797
  key: "areOptionsLoaded",
@@ -17998,12 +18050,12 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
17998
18050
  }, {
17999
18051
  key: "isPIMFlatValue",
18000
18052
  get: function get() {
18001
- return this.opv.isPIMFlatValue;
18053
+ return this.opv.isPIMFlatValue || this.opv.catalogOPV.isPIMFlatValue;
18002
18054
  }
18003
18055
  }, {
18004
18056
  key: "isVariantAttribute",
18005
18057
  get: function get() {
18006
- return this.opv.isVariantAttribute;
18058
+ return this.opv.isVariantAttribute || this.opv.catalogOPV.isVariantAttribute;
18007
18059
  }
18008
18060
  }, {
18009
18061
  key: "setName",
@@ -18463,7 +18515,7 @@ function initArticleRelations(articleRelations, catalogArticleData, catalog) {
18463
18515
  catalog = myAcc.getCatalogData();
18464
18516
  }
18465
18517
  var _catalogArticle = catalog.getCatalogArticle(myAcc.Codex);
18466
- if (!_catalogArticle) continue;
18518
+ if (!_catalogArticle || _catalogArticle.isHidden) continue;
18467
18519
  catalogArticle.articleRelations.push({
18468
18520
  name: _catalogArticle.name,
18469
18521
  actQuantity: 0,
@@ -18791,196 +18843,277 @@ function getArticleOptionValueType(codex, jsonOPV, catalogOPV, myArticle, isPare
18791
18843
  function ownKeys$k(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18792
18844
  function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$k(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18793
18845
  var LOG$j = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
18794
- function loadMoreFromIDMArticle(_x, _x2) {
18795
- return _loadMoreFromIDMArticle.apply(this, arguments);
18846
+ function loadMoreFromIDMArticles(_x, _x2) {
18847
+ return _loadMoreFromIDMArticles.apply(this, arguments);
18796
18848
  }
18797
- function _loadMoreFromIDMArticle() {
18798
- _loadMoreFromIDMArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(catalogArticleData, set) {
18799
- var _catalogArticleData$d;
18800
- var item, neededDecisionsIdWithoutPartlistdecisions, neededDecisionsId, toLoadDecisionIds, loadedDecisions, i, found, neededPriceFeatureGroupNos, toLoadPriceFeatureGroups, loadedPriceFeatureGroups, _i, _found, promises, _yield$Promise$all, _yield$Promise$all2, featureClasses, priceFeatureGroups, decisions, _i2, _i3, neededFeatures, _i4, featureClass, featureRefs, j, alreadyLoadedFeatures, toLoadFeatures, loadedFeatures, _loop2, _i5, _features, _loop3, _i6, features, _i7;
18801
- return _regeneratorRuntime.wrap(function _callee$(_context4) {
18802
- while (1) switch (_context4.prev = _context4.next) {
18849
+ function _loadMoreFromIDMArticles() {
18850
+ _loadMoreFromIDMArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(catalogArticleDatas, set) {
18851
+ var items, _loop3, i, toLoadDecisionIds, toLoadPFGroups, toLoadFeatureClassRefNo, promises, _yield$Promise$all, _yield$Promise$all2, featureClasses, priceFeatureGroups, decisions, _i4, _i5, _i6, _catalogArticleData$d2, catalogArticleData, toLoadFeatures, features, _loop4, _i7, _loop6, _i8;
18852
+ return _regeneratorRuntime.wrap(function _callee$(_context5) {
18853
+ while (1) switch (_context5.prev = _context5.next) {
18803
18854
  case 0:
18804
- _context4.next = 2;
18805
- return set.api.getDataCache(set.api.getIDMItem(set.CatalogData.catalogGuid, set.CatalogData.serieId, catalogArticleData.articleCodex), undefined, undefined, 'enricher');
18855
+ _context5.next = 2;
18856
+ return set.api.getDataCache(set.api.getIDMItems(set.CatalogData.catalogGuid, set.CatalogData.serieId, catalogArticleDatas.map(function (a) {
18857
+ return a.articleCodex;
18858
+ })), undefined, undefined, 'enricher');
18806
18859
  case 2:
18807
- item = _context4.sent;
18808
- catalogArticleData.decisionsRefs = item.decisionRefs;
18809
- catalogArticleData.idmPartlist = item.partlist;
18810
- catalogArticleData.idmPrices = item.prices;
18811
- if (catalogArticleData.featureClassRefNo) {
18812
- _context4.next = 8;
18860
+ items = _context5.sent;
18861
+ _loop3 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop3() {
18862
+ var catalogArticleData, item;
18863
+ return _regeneratorRuntime.wrap(function _loop3$(_context3) {
18864
+ while (1) switch (_context3.prev = _context3.next) {
18865
+ case 0:
18866
+ catalogArticleData = catalogArticleDatas[i];
18867
+ item = items.find(function (i) {
18868
+ return catalogArticleData.articleCodex == i.typeNo;
18869
+ });
18870
+ if (item) {
18871
+ _context3.next = 4;
18872
+ break;
18873
+ }
18874
+ throw new Error('Item ' + catalogArticleData.articleCodex + ' not found');
18875
+ case 4:
18876
+ catalogArticleData.decisionsRefs = item.decisionRefs;
18877
+ catalogArticleData.idmPartlist = item.partlist;
18878
+ catalogArticleData.idmPrices = item.prices;
18879
+ //optionalAdditionalItems
18880
+ //mandatoryAdditionalItems
18881
+ case 7:
18882
+ case "end":
18883
+ return _context3.stop();
18884
+ }
18885
+ }, _loop3);
18886
+ });
18887
+ i = 0;
18888
+ case 5:
18889
+ if (!(i < catalogArticleDatas.length)) {
18890
+ _context5.next = 10;
18813
18891
  break;
18814
18892
  }
18815
- return _context4.abrupt("return");
18816
- case 8:
18817
- catalogArticleData.priceGroup;
18818
- neededDecisionsIdWithoutPartlistdecisions = _toConsumableArray(new Set([].concat(_toConsumableArray(set.CatalogData.globalDecisions.map(function (g) {
18819
- return g.decisionNo;
18820
- })), _toConsumableArray((_catalogArticleData$d = catalogArticleData.decisionsRefs) !== null && _catalogArticleData$d !== void 0 ? _catalogArticleData$d : []))));
18821
- neededDecisionsId = _toConsumableArray(new Set([].concat(_toConsumableArray(neededDecisionsIdWithoutPartlistdecisions), _toConsumableArray(catalogArticleData.idmPartlistDecisions))));
18822
- toLoadDecisionIds = [];
18823
- loadedDecisions = [];
18824
- for (i = 0; i < neededDecisionsId.length; i++) {
18825
- found = set.CatalogData.getDecisionByNo(neededDecisionsId[i]);
18826
- if (found) {
18827
- loadedDecisions.push(found);
18828
- } else {
18829
- toLoadDecisionIds.push(neededDecisionsId[i]);
18830
- }
18831
- }
18832
- neededPriceFeatureGroupNos = catalogArticleData.priceFeatureGroupNos;
18833
- toLoadPriceFeatureGroups = [];
18834
- loadedPriceFeatureGroups = [];
18835
- for (_i = 0; _i < neededPriceFeatureGroupNos.length; _i++) {
18836
- _found = set.CatalogData.getPricefeaturegroup(neededPriceFeatureGroupNos[_i]);
18837
- if (_found) {
18838
- loadedPriceFeatureGroups.push(_found);
18839
- } else {
18840
- toLoadPriceFeatureGroups.push(neededPriceFeatureGroupNos[_i]);
18841
- }
18842
- }
18843
- promises = [set.api.getDataCache(set.api.getIDMFeatureClass(set.CatalogData.catalogGuid, [catalogArticleData.featureClassRefNo]), undefined, undefined, 'enricher'), toLoadPriceFeatureGroups.length ? set.api.getDataCache(set.api.getIDMPriceFeatureGroups(set.CatalogData.catalogGuid, toLoadPriceFeatureGroups), undefined, undefined, 'enricher') : undefined, toLoadDecisionIds.length ? set.api.getDataCache(set.api.getIDMDecisions(set.CatalogData.catalogGuid, toLoadDecisionIds), undefined, undefined, 'enricher') : undefined];
18844
- _context4.next = 21;
18893
+ return _context5.delegateYield(_loop3(), "t0", 7);
18894
+ case 7:
18895
+ i++;
18896
+ _context5.next = 5;
18897
+ break;
18898
+ case 10:
18899
+ toLoadDecisionIds = getToLoadDecisionIds(catalogArticleDatas, set);
18900
+ toLoadPFGroups = getPriceFeatureGroups(catalogArticleDatas, set);
18901
+ toLoadFeatureClassRefNo = _toConsumableArray(new Set(catalogArticleDatas.filter(function (a) {
18902
+ return a.featureClassRefNo !== undefined;
18903
+ }).map(function (a) {
18904
+ return a.featureClassRefNo;
18905
+ })));
18906
+ promises = [set.api.getDataCache(set.api.getIDMFeatureClass(set.CatalogData.catalogGuid, toLoadFeatureClassRefNo), undefined, undefined, 'enricher'), toLoadPFGroups.length ? set.api.getDataCache(set.api.getIDMPriceFeatureGroups(set.CatalogData.catalogGuid, toLoadPFGroups), undefined, undefined, 'enricher') : undefined, toLoadDecisionIds.length ? set.api.getDataCache(set.api.getIDMDecisions(set.CatalogData.catalogGuid, toLoadDecisionIds), undefined, undefined, 'enricher') : undefined];
18907
+ _context5.next = 16;
18845
18908
  return Promise.all(promises);
18846
- case 21:
18847
- _yield$Promise$all = _context4.sent;
18909
+ case 16:
18910
+ _yield$Promise$all = _context5.sent;
18848
18911
  _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
18849
18912
  featureClasses = _yield$Promise$all2[0];
18850
18913
  priceFeatureGroups = _yield$Promise$all2[1];
18851
18914
  decisions = _yield$Promise$all2[2];
18852
18915
  if (decisions) {
18853
- for (_i2 = 0; _i2 < decisions.length; _i2++) {
18854
- set.CatalogData.loadedDecisions.push(initializeDecision(decisions[_i2], set.CatalogData.idmOptionGroups));
18916
+ for (_i4 = 0; _i4 < decisions.length; _i4++) {
18917
+ set.CatalogData.loadedDecisions.push(initializeDecision(decisions[_i4], set.CatalogData.idmOptionGroups));
18855
18918
  }
18856
18919
  }
18857
18920
  if (!(toLoadDecisionIds.length !== 0 && toLoadDecisionIds.length != (decisions === null || decisions === void 0 ? void 0 : decisions.length))) {
18858
- _context4.next = 29;
18921
+ _context5.next = 24;
18859
18922
  break;
18860
18923
  }
18861
18924
  throw new Error('loading decisions failed');
18862
- case 29:
18925
+ case 24:
18863
18926
  if (priceFeatureGroups) {
18864
- for (_i3 = 0; _i3 < priceFeatureGroups.length; _i3++) {
18865
- set.CatalogData.loadedPriceFeaturegroups.push(initializePriceFeatureGroups(priceFeatureGroups[_i3], set.CatalogData.idmOptionGroups));
18927
+ for (_i5 = 0; _i5 < priceFeatureGroups.length; _i5++) {
18928
+ set.CatalogData.loadedPriceFeaturegroups.push(initializePriceFeatureGroups(priceFeatureGroups[_i5], set.CatalogData.idmOptionGroups));
18866
18929
  }
18867
18930
  }
18868
- catalogArticleData.articleIDMDecisions = sortDecisions(set.CatalogData.getDecisionsByNo(neededDecisionsIdWithoutPartlistdecisions));
18869
- neededFeatures = [];
18870
- if (featureClasses) {
18871
- for (_i4 = 0; _i4 < featureClasses.length; _i4++) {
18872
- featureClass = featureClasses[_i4];
18873
- set.CatalogData.loadedFeatureClasses.push(featureClass);
18874
- featureRefs = Object.keys(featureClass.featureRefs);
18875
- for (j = 0; j < featureRefs.length; j++) {
18876
- neededFeatures.push(featureRefs[j]);
18877
- }
18878
- }
18931
+ for (_i6 = 0; _i6 < catalogArticleDatas.length; _i6++) {
18932
+ catalogArticleData = catalogArticleDatas[_i6];
18933
+ catalogArticleData.articleIDMDecisions = sortDecisions(set.CatalogData.getDecisionsByNo(_toConsumableArray(new Set([].concat(_toConsumableArray(set.CatalogData.globalDecisions.map(function (g) {
18934
+ return g.decisionNo;
18935
+ })), _toConsumableArray((_catalogArticleData$d2 = catalogArticleData.decisionsRefs) !== null && _catalogArticleData$d2 !== void 0 ? _catalogArticleData$d2 : []))))));
18879
18936
  }
18880
- alreadyLoadedFeatures = set.CatalogData.loadedFeatures;
18881
- toLoadFeatures = [];
18882
- loadedFeatures = [];
18883
- _loop2 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop2(_i5) {
18884
- var found;
18885
- return _regeneratorRuntime.wrap(function _loop2$(_context3) {
18886
- while (1) switch (_context3.prev = _context3.next) {
18887
- case 0:
18888
- found = alreadyLoadedFeatures.find(function (f) {
18889
- return f.featureNo == neededFeatures[_i5];
18890
- });
18891
- if (found) {
18892
- loadedFeatures.push(found);
18893
- } else {
18894
- toLoadFeatures.push(neededFeatures[_i5]);
18895
- }
18896
- case 2:
18897
- case "end":
18898
- return _context3.stop();
18899
- }
18900
- }, _loop2);
18937
+ featureClasses.map(function (fc) {
18938
+ return set.CatalogData.loadedFeatureClasses.push(fc);
18901
18939
  });
18902
- _i5 = 0;
18903
- case 38:
18904
- if (!(_i5 < neededFeatures.length)) {
18905
- _context4.next = 43;
18906
- break;
18907
- }
18908
- return _context4.delegateYield(_loop2(_i5), "t0", 40);
18909
- case 40:
18910
- _i5++;
18911
- _context4.next = 38;
18912
- break;
18913
- case 43:
18940
+ toLoadFeatures = getFeatures(set, featureClasses);
18914
18941
  if (!toLoadFeatures.length) {
18915
- _context4.next = 54;
18942
+ _context5.next = 39;
18916
18943
  break;
18917
18944
  }
18918
- _context4.next = 46;
18945
+ _context5.next = 31;
18919
18946
  return set.api.getDataCache(set.api.getIDMFeatures(set.CatalogData.catalogGuid, toLoadFeatures), undefined, undefined, 'enricher');
18920
- case 46:
18921
- _features = _context4.sent;
18922
- _loop3 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop3() {
18923
- var feature, _loop4, _j;
18924
- return _regeneratorRuntime.wrap(function _loop3$(_context2) {
18947
+ case 31:
18948
+ features = _context5.sent;
18949
+ _loop4 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop4() {
18950
+ var feature, _loop5, j;
18951
+ return _regeneratorRuntime.wrap(function _loop4$(_context2) {
18925
18952
  while (1) switch (_context2.prev = _context2.next) {
18926
18953
  case 0:
18927
- feature = _features[_i6];
18954
+ feature = features[_i7];
18928
18955
  set.CatalogData.loadedFeatures.push(feature);
18929
- _loop4 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop4(_j) {
18930
- return _regeneratorRuntime.wrap(function _loop4$(_context) {
18956
+ _loop5 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop5(j) {
18957
+ return _regeneratorRuntime.wrap(function _loop5$(_context) {
18931
18958
  while (1) switch (_context.prev = _context.next) {
18932
18959
  case 0:
18933
18960
  if (!set.CatalogData.loadedOptions.find(function (o) {
18934
- return o.optionKey == feature.options[_j].optionKey;
18961
+ return o.optionKey == feature.options[j].optionKey;
18935
18962
  })) {
18936
- set.CatalogData.loadedOptions.push(feature.options[_j]);
18963
+ set.CatalogData.loadedOptions.push(feature.options[j]);
18937
18964
  }
18938
18965
  case 1:
18939
18966
  case "end":
18940
18967
  return _context.stop();
18941
18968
  }
18942
- }, _loop4);
18969
+ }, _loop5);
18943
18970
  });
18944
- _j = 0;
18971
+ j = 0;
18945
18972
  case 4:
18946
- if (!(_j < feature.options.length)) {
18973
+ if (!(j < feature.options.length)) {
18947
18974
  _context2.next = 9;
18948
18975
  break;
18949
18976
  }
18950
- return _context2.delegateYield(_loop4(_j), "t0", 6);
18977
+ return _context2.delegateYield(_loop5(j), "t0", 6);
18951
18978
  case 6:
18952
- _j++;
18979
+ j++;
18953
18980
  _context2.next = 4;
18954
18981
  break;
18955
18982
  case 9:
18956
18983
  case "end":
18957
18984
  return _context2.stop();
18958
18985
  }
18959
- }, _loop3);
18986
+ }, _loop4);
18960
18987
  });
18961
- _i6 = 0;
18962
- case 49:
18963
- if (!(_i6 < _features.length)) {
18964
- _context4.next = 54;
18988
+ _i7 = 0;
18989
+ case 34:
18990
+ if (!(_i7 < features.length)) {
18991
+ _context5.next = 39;
18965
18992
  break;
18966
18993
  }
18967
- return _context4.delegateYield(_loop3(), "t1", 51);
18968
- case 51:
18969
- _i6++;
18970
- _context4.next = 49;
18994
+ return _context5.delegateYield(_loop4(), "t1", 36);
18995
+ case 36:
18996
+ _i7++;
18997
+ _context5.next = 34;
18971
18998
  break;
18972
- case 54:
18973
- features = set.CatalogData.getFeatures(neededFeatures);
18974
- for (_i7 = 0; _i7 < features.length; _i7++) initFeature(features[_i7], catalogArticleData, set);
18975
- catalogArticleData.areOptionsLoaded = true;
18976
- case 57:
18999
+ case 39:
19000
+ _loop6 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop6() {
19001
+ var catalogArticleData, featureClass, features, j;
19002
+ return _regeneratorRuntime.wrap(function _loop6$(_context4) {
19003
+ while (1) switch (_context4.prev = _context4.next) {
19004
+ case 0:
19005
+ catalogArticleData = catalogArticleDatas[_i8];
19006
+ featureClass = featureClasses.find(function (fc) {
19007
+ return fc.featureClassNo == catalogArticleData.featureClassRefNo;
19008
+ });
19009
+ if (featureClass) {
19010
+ _context4.next = 4;
19011
+ break;
19012
+ }
19013
+ throw new Error('featureClassRefNo ' + catalogArticleData.featureClassRefNo + ' not found');
19014
+ case 4:
19015
+ features = set.CatalogData.getFeatures(getFeaturesByFeatureClass(featureClass));
19016
+ for (j = 0; j < features.length; j++) {
19017
+ initFeature(features[j], catalogArticleData, set);
19018
+ }
19019
+ case 6:
19020
+ case "end":
19021
+ return _context4.stop();
19022
+ }
19023
+ }, _loop6);
19024
+ });
19025
+ _i8 = 0;
19026
+ case 41:
19027
+ if (!(_i8 < catalogArticleDatas.length)) {
19028
+ _context5.next = 46;
19029
+ break;
19030
+ }
19031
+ return _context5.delegateYield(_loop6(), "t2", 43);
19032
+ case 43:
19033
+ _i8++;
19034
+ _context5.next = 41;
19035
+ break;
19036
+ case 46:
19037
+ catalogArticleDatas.map(function (c) {
19038
+ return c.areOptionsLoaded = true;
19039
+ });
19040
+ case 47:
18977
19041
  case "end":
18978
- return _context4.stop();
19042
+ return _context5.stop();
18979
19043
  }
18980
19044
  }, _callee);
18981
19045
  }));
18982
- return _loadMoreFromIDMArticle.apply(this, arguments);
19046
+ return _loadMoreFromIDMArticles.apply(this, arguments);
18983
19047
  }
19048
+ var getToLoadDecisionIds = function getToLoadDecisionIds(catalogArticleDatas, set) {
19049
+ var allArticleDecisions = [];
19050
+ for (var i = 0; i < catalogArticleDatas.length; i++) {
19051
+ var _catalogArticleData$i, _catalogArticleData$d;
19052
+ var catalogArticleData = catalogArticleDatas[i];
19053
+ allArticleDecisions = [].concat(_toConsumableArray(allArticleDecisions), _toConsumableArray((_catalogArticleData$i = catalogArticleData.idmPartlistDecisions) !== null && _catalogArticleData$i !== void 0 ? _catalogArticleData$i : []), _toConsumableArray((_catalogArticleData$d = catalogArticleData.decisionsRefs) !== null && _catalogArticleData$d !== void 0 ? _catalogArticleData$d : []));
19054
+ }
19055
+ var neededDecisionsIds = _toConsumableArray(new Set([].concat(_toConsumableArray(set.CatalogData.globalDecisions.map(function (g) {
19056
+ return g.decisionNo;
19057
+ })), _toConsumableArray(allArticleDecisions))));
19058
+ var toLoadDecisionIds = [];
19059
+ for (var _i = 0; _i < neededDecisionsIds.length; _i++) {
19060
+ var found = set.CatalogData.getDecisionByNo(neededDecisionsIds[_i]);
19061
+ if (found) ; else {
19062
+ toLoadDecisionIds.push(neededDecisionsIds[_i]);
19063
+ }
19064
+ }
19065
+ return toLoadDecisionIds;
19066
+ };
19067
+ var getFeatures = function getFeatures(set, featureClasses) {
19068
+ var neededFeatures = [];
19069
+ for (var i = 0; i < featureClasses.length; i++) {
19070
+ var featureClass = featureClasses[i];
19071
+ neededFeatures = [].concat(_toConsumableArray(neededFeatures), _toConsumableArray(getFeaturesByFeatureClass(featureClass)));
19072
+ }
19073
+ neededFeatures = _toConsumableArray(new Set(neededFeatures)); // remove duplicates
19074
+ var alreadyLoadedFeatures = set.CatalogData.loadedFeatures;
19075
+ var toLoadFeatures = [];
19076
+ var loadedFeatures = [];
19077
+ var _loop = function _loop(_i2) {
19078
+ var found = alreadyLoadedFeatures.find(function (f) {
19079
+ return f.featureNo == neededFeatures[_i2];
19080
+ });
19081
+ if (found) {
19082
+ loadedFeatures.push(found);
19083
+ } else {
19084
+ toLoadFeatures.push(neededFeatures[_i2]);
19085
+ }
19086
+ };
19087
+ for (var _i2 = 0; _i2 < neededFeatures.length; _i2++) {
19088
+ _loop(_i2);
19089
+ }
19090
+ LOG$j.debug('features already loaded dont get again from api: ' + loadedFeatures.length);
19091
+ return toLoadFeatures;
19092
+ };
19093
+ var getFeaturesByFeatureClass = function getFeaturesByFeatureClass(featureClass) {
19094
+ var neededFeatures = [];
19095
+ var featureRefs = Object.keys(featureClass.featureRefs);
19096
+ for (var j = 0; j < featureRefs.length; j++) {
19097
+ neededFeatures.push(featureRefs[j]);
19098
+ }
19099
+ return neededFeatures;
19100
+ };
19101
+ var getPriceFeatureGroups = function getPriceFeatureGroups(catalogArticleDatas, set) {
19102
+ var neededPriceFeatureGroupNos = [];
19103
+ for (var i = 0; i < catalogArticleDatas.length; i++) {
19104
+ var _catalogArticleDatas$;
19105
+ neededPriceFeatureGroupNos = [].concat(_toConsumableArray(neededPriceFeatureGroupNos), _toConsumableArray((_catalogArticleDatas$ = catalogArticleDatas[i].priceFeatureGroupNos) !== null && _catalogArticleDatas$ !== void 0 ? _catalogArticleDatas$ : []));
19106
+ }
19107
+ var toLoadPriceFeatureGroups = [];
19108
+ neededPriceFeatureGroupNos = _toConsumableArray(new Set(neededPriceFeatureGroupNos));
19109
+ for (var _i3 = 0; _i3 < neededPriceFeatureGroupNos.length; _i3++) {
19110
+ var found = set.CatalogData.getPricefeaturegroup(neededPriceFeatureGroupNos[_i3]);
19111
+ if (found) ; else {
19112
+ toLoadPriceFeatureGroups.push(neededPriceFeatureGroupNos[_i3]);
19113
+ }
19114
+ }
19115
+ return toLoadPriceFeatureGroups;
19116
+ };
18984
19117
  var initializeDecision = function initializeDecision(decision, idmOptionGroups) {
18985
19118
  var _decision$optionCombi;
18986
19119
  var optionCombinations = (_decision$optionCombi = decision.optionCombinations) === null || _decision$optionCombi === void 0 ? void 0 : _decision$optionCombi.map(function (c) {
@@ -19112,12 +19245,15 @@ function getCatalogFeatureType(feature, catalogArticleData, set) {
19112
19245
  };
19113
19246
  }
19114
19247
  function getArticleFeatureType(feature, catalogArticleData, catOPT, set) {
19115
- var _set$CatalogData$tabG;
19248
+ var _catalogArticleData$f, _set$CatalogData$tabG;
19249
+ var props = (_catalogArticleData$f = catalogArticleData.featureProperties) === null || _catalogArticleData$f === void 0 ? void 0 : _catalogArticleData$f.filter(function (p) {
19250
+ return p.FeatureNos.includes(feature.featureNo);
19251
+ });
19116
19252
  var featureClass = set.CatalogData.getFeatureClass(catalogArticleData.featureClassRefNo);
19117
19253
  var tabgroup = (_set$CatalogData$tabG = set.CatalogData.tabGroups) === null || _set$CatalogData$tabG === void 0 ? void 0 : _set$CatalogData$tabG.find(function (t) {
19118
19254
  return t.featureNos.includes(feature.featureNo);
19119
19255
  });
19120
- return {
19256
+ var opt = {
19121
19257
  codex: feature.featureNo,
19122
19258
  catalogOPT: catOPT,
19123
19259
  articleOptionValues: {},
@@ -19129,6 +19265,22 @@ function getArticleFeatureType(feature, catalogArticleData, catOPT, set) {
19129
19265
  tabGroup: tabgroup !== null && tabgroup !== void 0 && tabgroup.name ? DivaUtils.getLocals(tabgroup.name, set.api.getLanguage()) : undefined,
19130
19266
  tabGroup_locales: tabgroup === null || tabgroup === void 0 ? void 0 : tabgroup.name
19131
19267
  };
19268
+ if (props !== null && props !== void 0 && props.length) {
19269
+ for (var i = 0; i < props.length; i++) {
19270
+ var prop = props[i];
19271
+ switch (prop.Codex) {
19272
+ case 'IsVariantAttribute': // ist in den daten?!
19273
+ case 'TopFilterAttribute':
19274
+ case 'PriceTageRelevant':
19275
+ case 'EshopCategoryMapping':
19276
+ case 'IsArtName':
19277
+ break;
19278
+ default:
19279
+ LOG$j.debug('implement mapping for these props for options: ' + prop.Codex);
19280
+ }
19281
+ }
19282
+ }
19283
+ return opt;
19132
19284
  }
19133
19285
 
19134
19286
  //option in IDM language so in Diva World its OptionValue
@@ -19136,17 +19288,17 @@ function initOption(feature, articleFeature, catalogArticle, set) {
19136
19288
  var options = feature.options;
19137
19289
  var allOptionsOfFeature = {};
19138
19290
  //Items initalisieren
19139
- var _loop = function _loop() {
19291
+ var _loop2 = function _loop2() {
19140
19292
  var option = options[j];
19141
19293
  var catOption = set.CatalogData.getOptionValues().find(function (o) {
19142
19294
  return o.codex == option.optionKey;
19143
19295
  });
19144
19296
  if (!catOption) catOption = getCatalogOptionType(option, set);
19145
- var articleIDMOption = new ArticleOptionValueData(getArticleOption(option, catOption, articleFeature));
19297
+ var articleIDMOption = new ArticleOptionValueData(getArticleOption(option, catOption, articleFeature, catalogArticle));
19146
19298
  allOptionsOfFeature[articleIDMOption.codex] = articleIDMOption;
19147
19299
  };
19148
19300
  for (var j = 0; j < options.length; j++) {
19149
- _loop();
19301
+ _loop2();
19150
19302
  }
19151
19303
  articleFeature.initOPVsInOPT(allOptionsOfFeature);
19152
19304
  catalogArticle.articleOptions[articleFeature.codex];
@@ -19213,7 +19365,12 @@ function getCatalogOptionType(option, set) {
19213
19365
  }
19214
19366
  return new OptionValueCatalogData(opiton, catalogData);
19215
19367
  }
19216
- function getArticleOption(option, catalogOption, feature) {
19368
+ function getArticleOption(option, catalogOption, feature, catalogArticleData) {
19369
+ var _catalogArticleData$o;
19370
+ var props = (_catalogArticleData$o = catalogArticleData.optionProperties) === null || _catalogArticleData$o === void 0 ? void 0 : _catalogArticleData$o.filter(function (p) {
19371
+ return p.OptionKeys.includes(option.optionKey);
19372
+ });
19373
+ //TODO add these props that are articleSpecific
19217
19374
  var opv = {
19218
19375
  codex: option.optionKey,
19219
19376
  catalogOPV: catalogOption,
@@ -19223,6 +19380,23 @@ function getArticleOption(option, catalogOption, feature) {
19223
19380
  price: 0,
19224
19381
  quantity: 1
19225
19382
  };
19383
+ if (props !== null && props !== void 0 && props.length) {
19384
+ for (var i = 0; i < props.length; i++) {
19385
+ var prop = props[i];
19386
+ switch (prop.Codex) {
19387
+ case 'IsVariantAttribute':
19388
+ opv.isVariantAttribute = prop.Value == '1';
19389
+ break;
19390
+ case 'EshopCategoryMapping':
19391
+ case 'TopFilterAttribute':
19392
+ case 'PriceTageRelevant':
19393
+ case 'IsArtName':
19394
+ break;
19395
+ default:
19396
+ LOG$j.debug('implement mapping for these props for options: ' + prop.Codex);
19397
+ }
19398
+ }
19399
+ }
19226
19400
  return opv;
19227
19401
  }
19228
19402
  function componentToHex(c) {
@@ -19267,7 +19441,6 @@ function initIDMCatalogData(serie, orderSet, api) {
19267
19441
  //retailArticleNr: json.RetailArticleNr,
19268
19442
  //additionalCatalogPrice: json.AdditionalCatalogPrice,
19269
19443
  //additionalCatalogPriceText: json.AdditionalCatalogPriceText,
19270
- //mainCategory: json.MainCategory ?? json.Name,
19271
19444
  //digits: json.Digits,
19272
19445
  supplierILN: catalog.glnNo,
19273
19446
  // SupplierILN des Herstellers des Katalogs
@@ -19306,6 +19479,9 @@ function initIDMArticles(jsonItems, catalogData) {
19306
19479
  function getCatalogArticle(article, catalogData) {
19307
19480
  var _catalogData$catalogM, _articleMask$name, _articleMask$properti, _article$weightNetto, _article$detailInfos, _article$detailInfos2;
19308
19481
  var articleMask = (_catalogData$catalogM = catalogData.catalogMask) === null || _catalogData$catalogM === void 0 || (_catalogData$catalogM = _catalogData$catalogM.articles) === null || _catalogData$catalogM === void 0 ? void 0 : _catalogData$catalogM[article.typeNo];
19482
+ var lang = catalogData.api.getLanguageLowercase();
19483
+ var featureProperties = convertProperties(article.properties, lang, 'featureNos');
19484
+ var optionProperties = convertProperties(article.properties, lang, 'optionKeys');
19309
19485
  return {
19310
19486
  areOptionsLoaded: false,
19311
19487
  arePricesLoaded: false,
@@ -19324,12 +19500,14 @@ function getCatalogArticle(article, catalogData) {
19324
19500
  hasArticleRelations: false,
19325
19501
  hasPartlistArticle: !!article.partListRef,
19326
19502
  hasType1Dependencies: false,
19327
- name: DivaUtils.getLocals((_articleMask$name = articleMask === null || articleMask === void 0 ? void 0 : articleMask.name) !== null && _articleMask$name !== void 0 ? _articleMask$name : article.shortText, catalogData.api.getLanguageLowercase()),
19328
- longDescription: DivaUtils.getLocals(article.fullText, catalogData.api.getLanguageLowercase()),
19503
+ name: DivaUtils.getLocals((_articleMask$name = articleMask === null || articleMask === void 0 ? void 0 : articleMask.name) !== null && _articleMask$name !== void 0 ? _articleMask$name : article.shortText, lang),
19504
+ longDescription: DivaUtils.getLocals(article.fullText, lang),
19329
19505
  longDescription_locales: article.fullText,
19330
19506
  isHidden: !!(articleMask !== null && articleMask !== void 0 && articleMask.hidden),
19331
- origName: DivaUtils.getLocals(article.shortText, catalogData.api.getLanguageLowercase()),
19332
- properties: [].concat(_toConsumableArray(convertProperties(article.properties, catalogData.api.getLanguageLowercase())), _toConsumableArray((_articleMask$properti = articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties) !== null && _articleMask$properti !== void 0 ? _articleMask$properti : [])),
19507
+ origName: DivaUtils.getLocals(article.shortText, lang),
19508
+ properties: [].concat(_toConsumableArray(convertProperties(article.properties, lang)), _toConsumableArray((_articleMask$properti = articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties) !== null && _articleMask$properti !== void 0 ? _articleMask$properti : [])),
19509
+ optionProperties: optionProperties,
19510
+ featureProperties: featureProperties,
19333
19511
  articleType: article.featureClassRefNo === undefined ? 'FLAT' : 'OPTIONTREE',
19334
19512
  price: 0,
19335
19513
  featureClassRefNo: article.featureClassRefNo,
@@ -19379,13 +19557,34 @@ function getCatalogArticle(article, catalogData) {
19379
19557
  */
19380
19558
 
19381
19559
  function convertProperties() {
19560
+ var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
19561
+ var lang = arguments.length > 1 ? arguments[1] : undefined;
19562
+ var forCase = arguments.length > 2 ? arguments[2] : undefined;
19563
+ switch (forCase) {
19564
+ case 'featureNos':
19565
+ return mapProp(properties.filter(function (p) {
19566
+ var _p$featureNos;
19567
+ return (_p$featureNos = p.featureNos) === null || _p$featureNos === void 0 ? void 0 : _p$featureNos.length;
19568
+ }), lang);
19569
+ case 'optionKeys':
19570
+ return mapProp(properties.filter(function (p) {
19571
+ var _p$optionKeys;
19572
+ return (_p$optionKeys = p.optionKeys) === null || _p$optionKeys === void 0 ? void 0 : _p$optionKeys.length;
19573
+ }), lang);
19574
+ default:
19575
+ return mapProp(properties, lang);
19576
+ }
19577
+ }
19578
+ function mapProp() {
19382
19579
  var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
19383
19580
  var lang = arguments.length > 1 ? arguments[1] : undefined;
19384
19581
  return properties.map(function (p) {
19385
19582
  return {
19386
19583
  Value: DivaUtils.getLocals(p.value, lang),
19387
19584
  Codex: p.key,
19388
- Name: DivaUtils.getLocals(p.name, lang)
19585
+ Name: DivaUtils.getLocals(p.name, lang),
19586
+ FeatureNos: p.featureNos,
19587
+ OptionKeys: p.optionKeys
19389
19588
  };
19390
19589
  });
19391
19590
  }
@@ -19659,7 +19858,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
19659
19858
  }, {
19660
19859
  key: "loadArticleData",
19661
19860
  value: function () {
19662
- var _loadArticleData = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(catalogArticle, set) {
19861
+ var _loadArticleData = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(catalogArticles, set) {
19862
+ var promises, i;
19663
19863
  return _regeneratorRuntime.wrap(function _callee$(_context) {
19664
19864
  while (1) switch (_context.prev = _context.next) {
19665
19865
  case 0:
@@ -19668,14 +19868,18 @@ var DivaCatalogData = /*#__PURE__*/function () {
19668
19868
  break;
19669
19869
  }
19670
19870
  _context.next = 3;
19671
- return loadMoreFromIDMArticle(catalogArticle, set);
19871
+ return loadMoreFromIDMArticles(catalogArticles, set);
19672
19872
  case 3:
19673
- _context.next = 7;
19873
+ _context.next = 9;
19674
19874
  break;
19675
19875
  case 5:
19676
- _context.next = 7;
19677
- return loadMoreFromDivaArticle(catalogArticle, set);
19678
- case 7:
19876
+ promises = [];
19877
+ for (i = 0; i < catalogArticles.length; i++) {
19878
+ promises.push(loadMoreFromDivaArticle(catalogArticles[i], set));
19879
+ }
19880
+ _context.next = 9;
19881
+ return Promise.all(promises);
19882
+ case 9:
19679
19883
  case "end":
19680
19884
  return _context.stop();
19681
19885
  }
@@ -20659,7 +20863,9 @@ var DivaCatalogData = /*#__PURE__*/function () {
20659
20863
  _this5.catalogProps.articleConfigAll = item.Value == '1';
20660
20864
  break;
20661
20865
  case 'AUTO_OPEN_CONTENTITEM':
20662
- _this5.catalogProps.autoOpenContentItem = item.Value == '1';
20866
+ _this5.catalogProps.autoOpenContentItem = item.Value == '1' ? true : item.Value.split(';').map(function (o) {
20867
+ return (!_this5.isIDMFormat ? 'OPT' : '') + o;
20868
+ });
20663
20869
  break;
20664
20870
  case 'HIDE_PRICE_GROUPS_OF_OPGS':
20665
20871
  _this5.catalogProps.hidePriceGroupsOfOPGs = item.Value == '1';
@@ -24512,12 +24718,13 @@ var DivaArticle = /*#__PURE__*/function () {
24512
24718
  }, {
24513
24719
  key: "hasOptionsThatParentDoesNotHave",
24514
24720
  get: function get() {
24515
- var _this$partListParentA, _this$partListParentA2;
24721
+ var _this$partListParentA;
24722
+ if (!this.partListParentArticle) return false;
24516
24723
  //a partlistartilce should really only be visible in the configtree when the parent does not have a option in his Optiontree that the partlistarticle has
24517
24724
  // first usecase https://app.asana.com/0/1204193128085691/1204389027061737
24518
24725
  var myOptions = this.articleOptionStatesKeys;
24519
- var parentsOptions = (_this$partListParentA = (_this$partListParentA2 = this.partListParentArticle) === null || _this$partListParentA2 === void 0 ? void 0 : _this$partListParentA2.articleOptionStatesKeys) !== null && _this$partListParentA !== void 0 ? _this$partListParentA : [];
24520
- return myOptions.find(function (o) {
24726
+ var parentsOptions = (_this$partListParentA = this.partListParentArticle.articleOptionStatesKeys) !== null && _this$partListParentA !== void 0 ? _this$partListParentA : [];
24727
+ return !!myOptions.find(function (o) {
24521
24728
  return !parentsOptions.includes(o);
24522
24729
  });
24523
24730
  }
@@ -24728,9 +24935,9 @@ var DivaArticle = /*#__PURE__*/function () {
24728
24935
  }, {
24729
24936
  key: "getVkPrice",
24730
24937
  get: function get() {
24731
- var _this$articlePrices$P, _this$articlePrices, _this$partListParentA3, _this$articlePrices$C, _this$articlePrices2, _this$partListParentA4, _this$articlePrices$P2, _this$articlePrices3, _this$partListParentA5;
24938
+ var _this$articlePrices$P, _this$articlePrices, _this$partListParentA2, _this$articlePrices$C, _this$articlePrices2, _this$partListParentA3, _this$articlePrices$P2, _this$articlePrices3, _this$partListParentA4;
24732
24939
  var bruttoPercentage = this.set.getBruttoPercentage();
24733
- return new PriceObjectData(this.set.getBruttoPercentage(true) === undefined ? this.mainPrice : DivaUtils.roundPrice(this.mainPrice * ((100 - this.set.getBruttoPercentage(true)) / 100), 1, 2), DivaUtils.formatPrice(this.calcPrice()), this.calcPrice(), (_this$articlePrices$P = (_this$articlePrices = this.articlePrices) === null || _this$articlePrices === void 0 ? void 0 : _this$articlePrices.PriceType) !== null && _this$articlePrices$P !== void 0 ? _this$articlePrices$P : (_this$partListParentA3 = this.partListParentArticle) === null || _this$partListParentA3 === void 0 || (_this$partListParentA3 = _this$partListParentA3.articlePrices) === null || _this$partListParentA3 === void 0 ? void 0 : _this$partListParentA3.PriceType, (_this$articlePrices$C = (_this$articlePrices2 = this.articlePrices) === null || _this$articlePrices2 === void 0 ? void 0 : _this$articlePrices2.Currency) !== null && _this$articlePrices$C !== void 0 ? _this$articlePrices$C : (_this$partListParentA4 = this.partListParentArticle) === null || _this$partListParentA4 === void 0 || (_this$partListParentA4 = _this$partListParentA4.articlePrices) === null || _this$partListParentA4 === void 0 ? void 0 : _this$partListParentA4.Currency, (_this$articlePrices$P2 = (_this$articlePrices3 = this.articlePrices) === null || _this$articlePrices3 === void 0 ? void 0 : _this$articlePrices3.PriceListCodex) !== null && _this$articlePrices$P2 !== void 0 ? _this$articlePrices$P2 : (_this$partListParentA5 = this.partListParentArticle) === null || _this$partListParentA5 === void 0 || (_this$partListParentA5 = _this$partListParentA5.articlePrices) === null || _this$partListParentA5 === void 0 ? void 0 : _this$partListParentA5.PriceListCodex, bruttoPercentage === undefined ? undefined : this.mainBruttoPrice, bruttoPercentage === undefined ? undefined : this.bruttoCalcPrice);
24940
+ return new PriceObjectData(this.set.getBruttoPercentage(true) === undefined ? this.mainPrice : DivaUtils.roundPrice(this.mainPrice * ((100 - this.set.getBruttoPercentage(true)) / 100), 1, 2), DivaUtils.formatPrice(this.calcPrice()), this.calcPrice(), (_this$articlePrices$P = (_this$articlePrices = this.articlePrices) === null || _this$articlePrices === void 0 ? void 0 : _this$articlePrices.PriceType) !== null && _this$articlePrices$P !== void 0 ? _this$articlePrices$P : (_this$partListParentA2 = this.partListParentArticle) === null || _this$partListParentA2 === void 0 || (_this$partListParentA2 = _this$partListParentA2.articlePrices) === null || _this$partListParentA2 === void 0 ? void 0 : _this$partListParentA2.PriceType, (_this$articlePrices$C = (_this$articlePrices2 = this.articlePrices) === null || _this$articlePrices2 === void 0 ? void 0 : _this$articlePrices2.Currency) !== null && _this$articlePrices$C !== void 0 ? _this$articlePrices$C : (_this$partListParentA3 = this.partListParentArticle) === null || _this$partListParentA3 === void 0 || (_this$partListParentA3 = _this$partListParentA3.articlePrices) === null || _this$partListParentA3 === void 0 ? void 0 : _this$partListParentA3.Currency, (_this$articlePrices$P2 = (_this$articlePrices3 = this.articlePrices) === null || _this$articlePrices3 === void 0 ? void 0 : _this$articlePrices3.PriceListCodex) !== null && _this$articlePrices$P2 !== void 0 ? _this$articlePrices$P2 : (_this$partListParentA4 = this.partListParentArticle) === null || _this$partListParentA4 === void 0 || (_this$partListParentA4 = _this$partListParentA4.articlePrices) === null || _this$partListParentA4 === void 0 ? void 0 : _this$partListParentA4.PriceListCodex, bruttoPercentage === undefined ? undefined : this.mainBruttoPrice, bruttoPercentage === undefined ? undefined : this.bruttoCalcPrice);
24734
24941
  }
24735
24942
  }, {
24736
24943
  key: "priceType",
@@ -25115,8 +25322,8 @@ var DivaArticle = /*#__PURE__*/function () {
25115
25322
  }, {
25116
25323
  key: "getReqursiveArticleOptionStates",
25117
25324
  value: function getReqursiveArticleOptionStates() {
25118
- var _this$partListParentA6, _this$partListParentA7, _this$partListParentA8, _this$partListParentA9, _this$accessoireParen3, _this$accessoireParen4, _this$accessoireParen5, _this$accessoireParen6;
25119
- return [].concat(_toConsumableArray((_this$partListParentA6 = (_this$partListParentA7 = this.partListParentArticle) === null || _this$partListParentA7 === void 0 ? void 0 : _this$partListParentA7.articleOptionStatesData) !== null && _this$partListParentA6 !== void 0 ? _this$partListParentA6 : []), _toConsumableArray((_this$partListParentA8 = (_this$partListParentA9 = this.partListParentArticle) === null || _this$partListParentA9 === void 0 ? void 0 : _this$partListParentA9.getReqursiveArticleOptionStates()) !== null && _this$partListParentA8 !== void 0 ? _this$partListParentA8 : []), _toConsumableArray((_this$accessoireParen3 = (_this$accessoireParen4 = this.accessoireParentArticle) === null || _this$accessoireParen4 === void 0 ? void 0 : _this$accessoireParen4.articleOptionStatesData) !== null && _this$accessoireParen3 !== void 0 ? _this$accessoireParen3 : []), _toConsumableArray((_this$accessoireParen5 = (_this$accessoireParen6 = this.accessoireParentArticle) === null || _this$accessoireParen6 === void 0 ? void 0 : _this$accessoireParen6.getReqursiveArticleOptionStates()) !== null && _this$accessoireParen5 !== void 0 ? _this$accessoireParen5 : []));
25325
+ var _this$partListParentA5, _this$partListParentA6, _this$partListParentA7, _this$partListParentA8, _this$accessoireParen3, _this$accessoireParen4, _this$accessoireParen5, _this$accessoireParen6;
25326
+ return [].concat(_toConsumableArray((_this$partListParentA5 = (_this$partListParentA6 = this.partListParentArticle) === null || _this$partListParentA6 === void 0 ? void 0 : _this$partListParentA6.articleOptionStatesData) !== null && _this$partListParentA5 !== void 0 ? _this$partListParentA5 : []), _toConsumableArray((_this$partListParentA7 = (_this$partListParentA8 = this.partListParentArticle) === null || _this$partListParentA8 === void 0 ? void 0 : _this$partListParentA8.getReqursiveArticleOptionStates()) !== null && _this$partListParentA7 !== void 0 ? _this$partListParentA7 : []), _toConsumableArray((_this$accessoireParen3 = (_this$accessoireParen4 = this.accessoireParentArticle) === null || _this$accessoireParen4 === void 0 ? void 0 : _this$accessoireParen4.articleOptionStatesData) !== null && _this$accessoireParen3 !== void 0 ? _this$accessoireParen3 : []), _toConsumableArray((_this$accessoireParen5 = (_this$accessoireParen6 = this.accessoireParentArticle) === null || _this$accessoireParen6 === void 0 ? void 0 : _this$accessoireParen6.getReqursiveArticleOptionStates()) !== null && _this$accessoireParen5 !== void 0 ? _this$accessoireParen5 : []));
25120
25327
  }
25121
25328
  }, {
25122
25329
  key: "getAllArticleOptionsStates",
@@ -25152,12 +25359,12 @@ var DivaArticle = /*#__PURE__*/function () {
25152
25359
  }, {
25153
25360
  key: "getArticleOptionState",
25154
25361
  value: function getArticleOptionState(codex, from, checkOnAccessoireParent) {
25155
- var _this$partListParentA10, _this$partListParentA11, _this$partlistArticle3;
25362
+ var _this$partListParentA9, _this$partListParentA10, _this$partlistArticle3;
25156
25363
  var firstMatch = this.articleOptionStatesData.find(function (ops) {
25157
25364
  return ops.optionCodex == codex;
25158
25365
  });
25159
25366
  if (firstMatch) return firstMatch;
25160
- if (from !== ((_this$partListParentA10 = this.partListParentArticle) === null || _this$partListParentA10 === void 0 ? void 0 : _this$partListParentA10.basketId) && (_this$partListParentA11 = this.partListParentArticle) !== null && _this$partListParentA11 !== void 0 && _this$partListParentA11.getArticleOptionState(codex, undefined, checkOnAccessoireParent)) {
25367
+ if (from !== ((_this$partListParentA9 = this.partListParentArticle) === null || _this$partListParentA9 === void 0 ? void 0 : _this$partListParentA9.basketId) && (_this$partListParentA10 = this.partListParentArticle) !== null && _this$partListParentA10 !== void 0 && _this$partListParentA10.getArticleOptionState(codex, undefined, checkOnAccessoireParent)) {
25161
25368
  return this.partListParentArticle.getArticleOptionState(codex, this.basketId, checkOnAccessoireParent);
25162
25369
  }
25163
25370
  if (Object.keys((_this$partlistArticle3 = this.partlistArticles) !== null && _this$partlistArticle3 !== void 0 ? _this$partlistArticle3 : {}).length > 0) {
@@ -25636,8 +25843,8 @@ var DivaArticle = /*#__PURE__*/function () {
25636
25843
  }, {
25637
25844
  key: "getBaseParent",
25638
25845
  value: function getBaseParent() {
25639
- var _ref2, _this$partListParentA12, _this$partListParentA13, _this$accessoireParen8;
25640
- return (_ref2 = (_this$partListParentA12 = (_this$partListParentA13 = this.partListParentArticle) === null || _this$partListParentA13 === void 0 ? void 0 : _this$partListParentA13.getBaseParent()) !== null && _this$partListParentA12 !== void 0 ? _this$partListParentA12 : (_this$accessoireParen8 = this.accessoireParentArticle) === null || _this$accessoireParen8 === void 0 ? void 0 : _this$accessoireParen8.getBaseParent()) !== null && _ref2 !== void 0 ? _ref2 : this;
25846
+ var _ref2, _this$partListParentA11, _this$partListParentA12, _this$accessoireParen8;
25847
+ return (_ref2 = (_this$partListParentA11 = (_this$partListParentA12 = this.partListParentArticle) === null || _this$partListParentA12 === void 0 ? void 0 : _this$partListParentA12.getBaseParent()) !== null && _this$partListParentA11 !== void 0 ? _this$partListParentA11 : (_this$accessoireParen8 = this.accessoireParentArticle) === null || _this$accessoireParen8 === void 0 ? void 0 : _this$accessoireParen8.getBaseParent()) !== null && _ref2 !== void 0 ? _ref2 : this;
25641
25848
  }
25642
25849
  }, {
25643
25850
  key: "checkArtCodexIsAccessoire",
@@ -25791,9 +25998,9 @@ var DivaArticle = /*#__PURE__*/function () {
25791
25998
  var array = _toConsumableArray(evaluatedOrderCodex.matchAll(/\{(.*?)\}/g));
25792
25999
  var toRepace = [];
25793
26000
  for (var i = 0; i < array.length; i++) {
25794
- var _this$partListParentA14;
26001
+ var _this$partListParentA13;
25795
26002
  var expressions = array[i][1].split('.');
25796
- if (this.isPartListArticle && (_this$partListParentA14 = this.partListParentArticle) !== null && _this$partListParentA14 !== void 0 && _this$partListParentA14.getArticleOptionState((!this.CatalogData.isIDMFormat ? 'OPT' : '') + expressions[0]) || !this.isPartListArticle && this.getArticleOptionState((!this.CatalogData.isIDMFormat ? 'OPT' : '') + expressions[0])) {
26003
+ if (this.isPartListArticle && (_this$partListParentA13 = this.partListParentArticle) !== null && _this$partListParentA13 !== void 0 && _this$partListParentA13.getArticleOptionState((!this.CatalogData.isIDMFormat ? 'OPT' : '') + expressions[0]) || !this.isPartListArticle && this.getArticleOptionState((!this.CatalogData.isIDMFormat ? 'OPT' : '') + expressions[0])) {
25797
26004
  toRepace.push(eval('this' + (this.isPartListArticle ? '.partListParentArticle' : '') + ".getArticleOptionState('OPT'+expressions[0])[expressions[1]]"));
25798
26005
  } else {
25799
26006
  toRepace.push('___Option: "' + expressions[0] + '" not found!___');
@@ -26730,7 +26937,7 @@ var DivaArticle = /*#__PURE__*/function () {
26730
26937
  break;
26731
26938
  }
26732
26939
  _context.next = 4;
26733
- return import('./ShelfPlanner-4577af3b.js');
26940
+ return import('./ShelfPlanner-556b6a40.js');
26734
26941
  case 4:
26735
26942
  _yield$import = _context.sent;
26736
26943
  ShelfPlanner = _yield$import["default"];
@@ -27480,16 +27687,18 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27480
27687
  value: //Initialisiert eventuell Option Tree und Infos im CatalogArticle
27481
27688
  function () {
27482
27689
  var _loadArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(set, articleCodex, initParams) {
27483
- var _yield$this$preLoadAr, catalog, catalogArticle, newBasketId;
27690
+ var loadedObj, catalog, catalogArticle, newBasketId;
27484
27691
  return _regeneratorRuntime.wrap(function _callee$(_context) {
27485
27692
  while (1) switch (_context.prev = _context.next) {
27486
27693
  case 0:
27487
27694
  _context.next = 2;
27488
- return this.preLoadArticle(set, articleCodex, initParams);
27695
+ return this.preLoadArticles(set, [_objectSpread$d(_objectSpread$d({}, initParams), {}, {
27696
+ articleCodex: articleCodex
27697
+ })]);
27489
27698
  case 2:
27490
- _yield$this$preLoadAr = _context.sent;
27491
- catalog = _yield$this$preLoadAr.catalog;
27492
- catalogArticle = _yield$this$preLoadAr.catalogArticle;
27699
+ loadedObj = _context.sent;
27700
+ catalog = Object.values(loadedObj)[0].catalog;
27701
+ catalogArticle = Object.values(loadedObj)[0].loadedArticles[0];
27493
27702
  newBasketId = initParams.basketId ? initParams.basketId : 'B' + nanoid();
27494
27703
  if (!catalogArticle) {
27495
27704
  _context.next = 10;
@@ -27517,86 +27726,126 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27517
27726
  return loadArticle;
27518
27727
  }() //loads all the calls for an article but does not create the article
27519
27728
  }, {
27520
- key: "preLoadArticle",
27729
+ key: "preLoadArticles",
27521
27730
  value: function () {
27522
- var _preLoadArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(set, articleCodex, initParams) {
27523
- var catalog, _set$getSetState$acti, _set$getSetState$acti2, _set$getSetState$acti3, _set$getSetState$acti4, catalogArticle;
27524
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
27525
- while (1) switch (_context2.prev = _context2.next) {
27731
+ var _preLoadArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(set, initParams) {
27732
+ var articlesToLoadGroupedByCatalogs, i, _initParam$catalogCod, initParam, catalog, catalogCodex, _set$getSetState$acti, _set$getSetState$acti2, _set$getSetState$acti3, _set$getSetState$acti4, _set$getSetState$acti5, _set$getSetState$acti6, _loop, key;
27733
+ return _regeneratorRuntime.wrap(function _callee2$(_context3) {
27734
+ while (1) switch (_context3.prev = _context3.next) {
27526
27735
  case 0:
27527
- if (!(initParams.catalogCodex && initParams.catalogCodex !== set.CatalogData.catalogCodex)) {
27528
- _context2.next = 8;
27736
+ articlesToLoadGroupedByCatalogs = {};
27737
+ i = 0;
27738
+ case 2:
27739
+ if (!(i < initParams.length)) {
27740
+ _context3.next = 20;
27529
27741
  break;
27530
27742
  }
27531
- (_set$getSetState$acti = set.getSetState.actions) === null || _set$getSetState$acti === void 0 || (_set$getSetState$acti2 = _set$getSetState$acti.toggleLoading) === null || _set$getSetState$acti2 === void 0 || _set$getSetState$acti2.call(_set$getSetState$acti, 'loadingCatalog' + initParams.catalogCodex, false, true);
27532
- _context2.next = 4;
27533
- return catalogHandlerInstance.getCatalogData(set.getSetState, initParams.catalogCodex, {
27743
+ initParam = initParams[i];
27744
+ catalog = void 0;
27745
+ catalogCodex = (_initParam$catalogCod = initParam.catalogCodex) !== null && _initParam$catalogCod !== void 0 ? _initParam$catalogCod : set.CatalogData.catalogCodex;
27746
+ if (!(catalogCodex != set.CatalogData.catalogCodex)) {
27747
+ _context3.next = 14;
27748
+ break;
27749
+ }
27750
+ (_set$getSetState$acti = set.getSetState.actions) === null || _set$getSetState$acti === void 0 || (_set$getSetState$acti2 = (_set$getSetState$acti3 = _set$getSetState$acti).toggleLoading) === null || _set$getSetState$acti2 === void 0 || _set$getSetState$acti2.call(_set$getSetState$acti3, 'loadingCatalog' + initParam.catalogCodex, false, true);
27751
+ _context3.next = 10;
27752
+ return catalogHandlerInstance.getCatalogData(set.getSetState, catalogCodex, {
27534
27753
  AccountGUID: set.CatalogData.accountGuid,
27535
27754
  AccountSessionGUID: set.CatalogData.accountSessionGuid
27536
27755
  });
27537
- case 4:
27538
- catalog = _context2.sent;
27539
- (_set$getSetState$acti3 = set.getSetState.actions) === null || _set$getSetState$acti3 === void 0 || (_set$getSetState$acti4 = _set$getSetState$acti3.toggleLoading) === null || _set$getSetState$acti4 === void 0 || _set$getSetState$acti4.call(_set$getSetState$acti3, 'loadingCatalog' + initParams.catalogCodex, false, false);
27540
- _context2.next = 9;
27756
+ case 10:
27757
+ catalog = _context3.sent;
27758
+ (_set$getSetState$acti4 = set.getSetState.actions) === null || _set$getSetState$acti4 === void 0 || (_set$getSetState$acti5 = (_set$getSetState$acti6 = _set$getSetState$acti4).toggleLoading) === null || _set$getSetState$acti5 === void 0 || _set$getSetState$acti5.call(_set$getSetState$acti6, 'loadingCatalog' + initParam.catalogCodex, false, false);
27759
+ _context3.next = 15;
27541
27760
  break;
27542
- case 8:
27543
- catalog = set.CatalogData;
27544
- case 9:
27545
- catalogArticle = catalog.getCatalogArticleByArticleCodex(articleCodex, set.onlyRunLogic); // hat catalogArticle Optionen welche noch nicht gealden wurden, erst laden!
27546
- //usecase der selbe Article wurde bereits verplant. nun kann die bereits geladene & verwendete Klasse catalogArticle wiederverwendet werden da wir dort nichts
27547
- //während der Konfiguration verändern!
27548
- if (!catalogArticle) {
27549
- _context2.next = 17;
27550
- break;
27551
- }
27552
- if (catalogArticle.areOptionsToLoad) {
27553
- _context2.next = 14;
27554
- break;
27555
- }
27556
- _context2.next = 14;
27557
- return catalog.loadArticleData(catalogArticle, set);
27558
27761
  case 14:
27559
- return _context2.abrupt("return", {
27762
+ catalog = set.CatalogData;
27763
+ case 15:
27764
+ if (!articlesToLoadGroupedByCatalogs[catalogCodex]) articlesToLoadGroupedByCatalogs[catalogCodex] = {
27765
+ toLoad: [],
27560
27766
  catalog: catalog,
27561
- catalogArticle: catalogArticle
27562
- });
27767
+ loadedArticles: []
27768
+ };
27769
+ articlesToLoadGroupedByCatalogs[catalogCodex].toLoad.push(initParam);
27563
27770
  case 17:
27564
- return _context2.abrupt("return", {
27565
- catalog: catalog,
27566
- catalogArticle: catalogArticle
27771
+ i++;
27772
+ _context3.next = 2;
27773
+ break;
27774
+ case 20:
27775
+ _loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
27776
+ var articlesObj, catalog, articles, articlesToLoadMore;
27777
+ return _regeneratorRuntime.wrap(function _loop$(_context2) {
27778
+ while (1) switch (_context2.prev = _context2.next) {
27779
+ case 0:
27780
+ articlesObj = articlesToLoadGroupedByCatalogs[key];
27781
+ catalog = articlesObj.catalog;
27782
+ articles = articlesObj.toLoad;
27783
+ articlesObj.loadedArticles = articles.map(function (a) {
27784
+ return catalog.getCatalogArticleByArticleCodex(a.articleCodex, set.onlyRunLogic);
27785
+ });
27786
+ // hat catalogArticle Optionen welche noch nicht gealden wurden, erst laden!
27787
+ //usecase der selbe Article wurde bereits verplant. nun kann die bereits geladene & verwendete Klasse catalogArticle wiederverwendet werden da wir dort nichts
27788
+ //während der Konfiguration verändern!
27789
+ articlesToLoadMore = articlesObj.loadedArticles.filter(function (a) {
27790
+ return a.areOptionsToLoad;
27791
+ });
27792
+ if (!articlesToLoadMore.length) {
27793
+ _context2.next = 8;
27794
+ break;
27795
+ }
27796
+ _context2.next = 8;
27797
+ return catalog.loadArticleData(articlesToLoadMore, set);
27798
+ case 8:
27799
+ case "end":
27800
+ return _context2.stop();
27801
+ }
27802
+ }, _loop);
27567
27803
  });
27568
- case 18:
27804
+ _context3.t0 = _regeneratorRuntime.keys(articlesToLoadGroupedByCatalogs);
27805
+ case 22:
27806
+ if ((_context3.t1 = _context3.t0()).done) {
27807
+ _context3.next = 27;
27808
+ break;
27809
+ }
27810
+ key = _context3.t1.value;
27811
+ return _context3.delegateYield(_loop(), "t2", 25);
27812
+ case 25:
27813
+ _context3.next = 22;
27814
+ break;
27815
+ case 27:
27816
+ return _context3.abrupt("return", articlesToLoadGroupedByCatalogs);
27817
+ case 28:
27569
27818
  case "end":
27570
- return _context2.stop();
27819
+ return _context3.stop();
27571
27820
  }
27572
27821
  }, _callee2);
27573
27822
  }));
27574
- function preLoadArticle(_x4, _x5, _x6) {
27575
- return _preLoadArticle.apply(this, arguments);
27823
+ function preLoadArticles(_x4, _x5) {
27824
+ return _preLoadArticles.apply(this, arguments);
27576
27825
  }
27577
- return preLoadArticle;
27826
+ return preLoadArticles;
27578
27827
  }()
27579
27828
  }, {
27580
27829
  key: "updateAccessoireQuantity",
27581
27830
  value: function () {
27582
27831
  var _updateAccessoireQuantity = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(accessoire, newQuantity) {
27583
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
27584
- while (1) switch (_context3.prev = _context3.next) {
27832
+ return _regeneratorRuntime.wrap(function _callee3$(_context4) {
27833
+ while (1) switch (_context4.prev = _context4.next) {
27585
27834
  case 0:
27586
27835
  accessoire.quantity = newQuantity;
27587
27836
  if (!(accessoire.articleType == 'OPTION' || accessoire.articleType == 'OPTIONTREE')) {
27588
- _context3.next = 4;
27837
+ _context4.next = 4;
27589
27838
  break;
27590
27839
  }
27591
- _context3.next = 4;
27840
+ _context4.next = 4;
27592
27841
  return this.updateCfgValues(accessoire, {}, {});
27593
27842
  case 4:
27594
27843
  case "end":
27595
- return _context3.stop();
27844
+ return _context4.stop();
27596
27845
  }
27597
27846
  }, _callee3, this);
27598
27847
  }));
27599
- function updateAccessoireQuantity(_x7, _x8) {
27848
+ function updateAccessoireQuantity(_x6, _x7) {
27600
27849
  return _updateAccessoireQuantity.apply(this, arguments);
27601
27850
  }
27602
27851
  return updateAccessoireQuantity;
@@ -27605,32 +27854,32 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27605
27854
  key: "toDoAfterArticleLoaded",
27606
27855
  value: function () {
27607
27856
  var _toDoAfterArticleLoaded = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(article, defaultValues, variantValues, from, variantItems, ignorePlanner) {
27608
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
27609
- while (1) switch (_context4.prev = _context4.next) {
27857
+ return _regeneratorRuntime.wrap(function _callee4$(_context5) {
27858
+ while (1) switch (_context5.prev = _context5.next) {
27610
27859
  case 0:
27611
27860
  if (!(article.articleType == 'OPTION' || article.articleType == 'OPTIONTREE')) {
27612
- _context4.next = 8;
27861
+ _context5.next = 8;
27613
27862
  break;
27614
27863
  }
27615
- _context4.next = 3;
27864
+ _context5.next = 3;
27616
27865
  return this.initCfgValues(article, variantValues, variantItems);
27617
27866
  case 3:
27618
- _context4.next = 5;
27867
+ _context5.next = 5;
27619
27868
  return this.updateCfgValues(article, defaultValues, variantValues);
27620
27869
  case 5:
27621
27870
  if (!(article.set.PlannerMode !== 'BoxPlanner')) {
27622
- _context4.next = 8;
27871
+ _context5.next = 8;
27623
27872
  break;
27624
27873
  }
27625
- _context4.next = 8;
27874
+ _context5.next = 8;
27626
27875
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(article.set, defaultValues, [article.basketId], ignorePlanner, from);
27627
27876
  case 8:
27628
27877
  case "end":
27629
- return _context4.stop();
27878
+ return _context5.stop();
27630
27879
  }
27631
27880
  }, _callee4, this);
27632
27881
  }));
27633
- function toDoAfterArticleLoaded(_x9, _x10, _x11, _x12, _x13, _x14) {
27882
+ function toDoAfterArticleLoaded(_x8, _x9, _x10, _x11, _x12, _x13) {
27634
27883
  return _toDoAfterArticleLoaded.apply(this, arguments);
27635
27884
  }
27636
27885
  return toDoAfterArticleLoaded;
@@ -27651,8 +27900,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27651
27900
  value: function () {
27652
27901
  var _updateArticlesOptionStates = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(myValues, targetArticlesWithNewValues, targetArticlesToUpdate, articles, from) {
27653
27902
  var newEDOExtraArticles, partlistArticlesToLoad, valuesArray, i, actArticle, newPartlistArticlesToLoad, _actArticle$checkDefa, variantValues, triggerUpdate;
27654
- return _regeneratorRuntime.wrap(function _callee5$(_context5) {
27655
- while (1) switch (_context5.prev = _context5.next) {
27903
+ return _regeneratorRuntime.wrap(function _callee5$(_context6) {
27904
+ while (1) switch (_context6.prev = _context6.next) {
27656
27905
  case 0:
27657
27906
  newEDOExtraArticles = [];
27658
27907
  partlistArticlesToLoad = [];
@@ -27660,18 +27909,18 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27660
27909
  i = 0;
27661
27910
  case 4:
27662
27911
  if (!(i < targetArticlesToUpdate.length)) {
27663
- _context5.next = 36;
27912
+ _context6.next = 36;
27664
27913
  break;
27665
27914
  }
27666
27915
  valuesArray[i] = {};
27667
27916
  actArticle = articles[targetArticlesToUpdate[i]];
27668
27917
  if (!(!actArticle || actArticle.deleted)) {
27669
- _context5.next = 11;
27918
+ _context6.next = 11;
27670
27919
  break;
27671
27920
  }
27672
27921
  targetArticlesToUpdate.splice(i, 1);
27673
27922
  i--;
27674
- return _context5.abrupt("continue", 33);
27923
+ return _context6.abrupt("continue", 33);
27675
27924
  case 11:
27676
27925
  if (targetArticlesWithNewValues.includes(targetArticlesToUpdate[i])) {
27677
27926
  valuesArray[i] = actArticle.getValidValues(_objectSpread$d({}, myValues), actArticle.CatalogData.mergeOptionsToSameOption);
@@ -27679,61 +27928,61 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27679
27928
 
27680
27929
  //only set config if valuesArray are not empty or the article is initializing
27681
27930
  if (!(Object.entries(valuesArray[i]).length > 0 || from !== null && from !== void 0 && from.startsWith('initializing'))) {
27682
- _context5.next = 28;
27931
+ _context6.next = 28;
27683
27932
  break;
27684
27933
  }
27685
- _context5.next = 15;
27934
+ _context6.next = 15;
27686
27935
  return this.updateCfgValues(actArticle, valuesArray[i], {}, undefined, undefined, from == 'calcVariant');
27687
27936
  case 15:
27688
- newPartlistArticlesToLoad = _context5.sent;
27937
+ newPartlistArticlesToLoad = _context6.sent;
27689
27938
  _actArticle$checkDefa = actArticle.checkDefaultGlobalOpt(valuesArray[i]), variantValues = _actArticle$checkDefa.variantValues, triggerUpdate = _actArticle$checkDefa.triggerUpdate;
27690
27939
  valuesArray[i] = variantValues;
27691
- _context5.next = 20;
27940
+ _context6.next = 20;
27692
27941
  return this.updateAccessoriesFromGlobalOption(valuesArray[i], actArticle);
27693
27942
  case 20:
27694
27943
  if (!triggerUpdate) {
27695
- _context5.next = 24;
27944
+ _context6.next = 24;
27696
27945
  break;
27697
27946
  }
27698
- _context5.next = 23;
27947
+ _context6.next = 23;
27699
27948
  return this.updateCfgValues(actArticle, valuesArray[i], {}, undefined, undefined, from == 'calcVariant');
27700
27949
  case 23:
27701
- newPartlistArticlesToLoad = _context5.sent;
27950
+ newPartlistArticlesToLoad = _context6.sent;
27702
27951
  case 24:
27703
27952
  partlistArticlesToLoad = partlistArticlesToLoad.concat(newPartlistArticlesToLoad);
27704
27953
  newEDOExtraArticles = this.checkEDOArticles(articles);
27705
- _context5.next = 33;
27954
+ _context6.next = 33;
27706
27955
  break;
27707
27956
  case 28:
27708
- _context5.t0 = partlistArticlesToLoad;
27709
- _context5.next = 31;
27957
+ _context6.t0 = partlistArticlesToLoad;
27958
+ _context6.next = 31;
27710
27959
  return this.updateCfgValues(actArticle, {}, {}, undefined, undefined, from == 'calcVariant');
27711
27960
  case 31:
27712
- _context5.t1 = _context5.sent;
27713
- partlistArticlesToLoad = _context5.t0.concat.call(_context5.t0, _context5.t1);
27961
+ _context6.t1 = _context6.sent;
27962
+ partlistArticlesToLoad = _context6.t0.concat.call(_context6.t0, _context6.t1);
27714
27963
  case 33:
27715
27964
  i++;
27716
- _context5.next = 4;
27965
+ _context6.next = 4;
27717
27966
  break;
27718
27967
  case 36:
27719
- _context5.next = 38;
27968
+ _context6.next = 38;
27720
27969
  return this.triggerUpdateOnVisiblePartilstArticles(targetArticlesToUpdate, articles);
27721
27970
  case 38:
27722
- _context5.next = 40;
27971
+ _context6.next = 40;
27723
27972
  return this.triggerMoreUpdates(targetArticlesToUpdate, valuesArray, articles, from);
27724
27973
  case 40:
27725
- return _context5.abrupt("return", {
27974
+ return _context6.abrupt("return", {
27726
27975
  newEDOExtraArticles: newEDOExtraArticles,
27727
27976
  targetArticlesToUpdate: targetArticlesToUpdate,
27728
27977
  partlistArticlesToLoad: partlistArticlesToLoad
27729
27978
  });
27730
27979
  case 41:
27731
27980
  case "end":
27732
- return _context5.stop();
27981
+ return _context6.stop();
27733
27982
  }
27734
27983
  }, _callee5, this);
27735
27984
  }));
27736
- function updateArticlesOptionStates(_x15, _x16, _x17, _x18, _x19) {
27985
+ function updateArticlesOptionStates(_x14, _x15, _x16, _x17, _x18) {
27737
27986
  return _updateArticlesOptionStates.apply(this, arguments);
27738
27987
  }
27739
27988
  return updateArticlesOptionStates;
@@ -27743,42 +27992,42 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27743
27992
  value: function () {
27744
27993
  var _triggerMoreUpdates = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(targetArticlesToUpdate, valuesArray, articles, from) {
27745
27994
  var i, article;
27746
- return _regeneratorRuntime.wrap(function _callee6$(_context6) {
27747
- while (1) switch (_context6.prev = _context6.next) {
27995
+ return _regeneratorRuntime.wrap(function _callee6$(_context7) {
27996
+ while (1) switch (_context7.prev = _context7.next) {
27748
27997
  case 0:
27749
27998
  if (!(!targetArticlesToUpdate.length || from !== 'calcVariant')) {
27750
- _context6.next = 2;
27999
+ _context7.next = 2;
27751
28000
  break;
27752
28001
  }
27753
- return _context6.abrupt("return");
28002
+ return _context7.abrupt("return");
27754
28003
  case 2:
27755
28004
  i = 0;
27756
28005
  case 3:
27757
28006
  if (!(i < targetArticlesToUpdate.length)) {
27758
- _context6.next = 13;
28007
+ _context7.next = 13;
27759
28008
  break;
27760
28009
  }
27761
28010
  article = articles[targetArticlesToUpdate[i]];
27762
28011
  if (!(!article.CatalogData.isIDMFormat && (article.CatalogData.doubleClickOnConfig || article.hasType1Dependencies))) {
27763
- _context6.next = 10;
28012
+ _context7.next = 10;
27764
28013
  break;
27765
28014
  }
27766
- _context6.next = 8;
28015
+ _context7.next = 8;
27767
28016
  return this.updateCfgValues(article, valuesArray[i], {});
27768
28017
  case 8:
27769
- _context6.next = 10;
28018
+ _context7.next = 10;
27770
28019
  return this.updateCfgValues(article, valuesArray[i], {});
27771
28020
  case 10:
27772
28021
  i++;
27773
- _context6.next = 3;
28022
+ _context7.next = 3;
27774
28023
  break;
27775
28024
  case 13:
27776
28025
  case "end":
27777
- return _context6.stop();
28026
+ return _context7.stop();
27778
28027
  }
27779
28028
  }, _callee6, this);
27780
28029
  }));
27781
- function triggerMoreUpdates(_x20, _x21, _x22, _x23) {
28030
+ function triggerMoreUpdates(_x19, _x20, _x21, _x22) {
27782
28031
  return _triggerMoreUpdates.apply(this, arguments);
27783
28032
  }
27784
28033
  return triggerMoreUpdates;
@@ -27789,41 +28038,41 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27789
28038
  var _triggerUpdateOnVisiblePartilstArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(targetArticlesToUpdate, articles) {
27790
28039
  var _articles$targetArtic;
27791
28040
  var key, configuredArticle, toIgnore, actArticle;
27792
- return _regeneratorRuntime.wrap(function _callee7$(_context7) {
27793
- while (1) switch (_context7.prev = _context7.next) {
28041
+ return _regeneratorRuntime.wrap(function _callee7$(_context8) {
28042
+ while (1) switch (_context8.prev = _context8.next) {
27794
28043
  case 0:
27795
28044
  if (!((_articles$targetArtic = articles[targetArticlesToUpdate[0]]) !== null && _articles$targetArtic !== void 0 && _articles$targetArtic.hasPartlistArticleVisibleInTree)) {
27796
- _context7.next = 13;
28045
+ _context8.next = 13;
27797
28046
  break;
27798
28047
  }
27799
- _context7.t0 = _regeneratorRuntime.keys(articles);
28048
+ _context8.t0 = _regeneratorRuntime.keys(articles);
27800
28049
  case 2:
27801
- if ((_context7.t1 = _context7.t0()).done) {
27802
- _context7.next = 13;
28050
+ if ((_context8.t1 = _context8.t0()).done) {
28051
+ _context8.next = 13;
27803
28052
  break;
27804
28053
  }
27805
- key = _context7.t1.value;
28054
+ key = _context8.t1.value;
27806
28055
  configuredArticle = articles[targetArticlesToUpdate[0]];
27807
28056
  toIgnore = configuredArticle.pushParentId();
27808
28057
  if (![configuredArticle.basketId].concat(_toConsumableArray(toIgnore)).includes(key)) {
27809
- _context7.next = 8;
28058
+ _context8.next = 8;
27810
28059
  break;
27811
28060
  }
27812
- return _context7.abrupt("continue", 2);
28061
+ return _context8.abrupt("continue", 2);
27813
28062
  case 8:
27814
28063
  actArticle = articles[key];
27815
- _context7.next = 11;
28064
+ _context8.next = 11;
27816
28065
  return this.updateCfgValues(actArticle, {}, {});
27817
28066
  case 11:
27818
- _context7.next = 2;
28067
+ _context8.next = 2;
27819
28068
  break;
27820
28069
  case 13:
27821
28070
  case "end":
27822
- return _context7.stop();
28071
+ return _context8.stop();
27823
28072
  }
27824
28073
  }, _callee7, this);
27825
28074
  }));
27826
- function triggerUpdateOnVisiblePartilstArticles(_x24, _x25) {
28075
+ function triggerUpdateOnVisiblePartilstArticles(_x23, _x24) {
27827
28076
  return _triggerUpdateOnVisiblePartilstArticles.apply(this, arguments);
27828
28077
  }
27829
28078
  return triggerUpdateOnVisiblePartilstArticles;
@@ -27833,29 +28082,29 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27833
28082
  value: function () {
27834
28083
  var _updateAccessoriesFromGlobalOption = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(values, actArticle) {
27835
28084
  var accessoiresToUpdate, key;
27836
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
27837
- while (1) switch (_context8.prev = _context8.next) {
28085
+ return _regeneratorRuntime.wrap(function _callee8$(_context9) {
28086
+ while (1) switch (_context9.prev = _context9.next) {
27838
28087
  case 0:
27839
28088
  accessoiresToUpdate = actArticle.getAccessoriesToChangeFromGlobalOption(values);
27840
- _context8.t0 = _regeneratorRuntime.keys(accessoiresToUpdate);
28089
+ _context9.t0 = _regeneratorRuntime.keys(accessoiresToUpdate);
27841
28090
  case 2:
27842
- if ((_context8.t1 = _context8.t0()).done) {
27843
- _context8.next = 8;
28091
+ if ((_context9.t1 = _context9.t0()).done) {
28092
+ _context9.next = 8;
27844
28093
  break;
27845
28094
  }
27846
- key = _context8.t1.value;
27847
- _context8.next = 6;
28095
+ key = _context9.t1.value;
28096
+ _context9.next = 6;
27848
28097
  return this.updateCfgValues(accessoiresToUpdate[key].accessoire, accessoiresToUpdate[key].variantValues, {});
27849
28098
  case 6:
27850
- _context8.next = 2;
28099
+ _context9.next = 2;
27851
28100
  break;
27852
28101
  case 8:
27853
28102
  case "end":
27854
- return _context8.stop();
28103
+ return _context9.stop();
27855
28104
  }
27856
28105
  }, _callee8, this);
27857
28106
  }));
27858
- function updateAccessoriesFromGlobalOption(_x26, _x27) {
28107
+ function updateAccessoriesFromGlobalOption(_x25, _x26) {
27859
28108
  return _updateAccessoriesFromGlobalOption.apply(this, arguments);
27860
28109
  }
27861
28110
  return updateAccessoriesFromGlobalOption;
@@ -27952,22 +28201,22 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27952
28201
  var _initCfgValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(article, variantValues,
27953
28202
  // Werte aus einem Basiskonfigurat,
27954
28203
  variantItems) {
27955
- var myCatalogArticleOptions, _loop, i, attr, foundItem, _foundItem$opt, freeText, opss, _i, ops, opv, _iterator3, _step3, _ops, value, optionValueCodex, _i2, variantItem, possibleValues, j, possibleValue, _i3, _variantItem, val;
27956
- return _regeneratorRuntime.wrap(function _callee9$(_context10) {
27957
- while (1) switch (_context10.prev = _context10.next) {
28204
+ var myCatalogArticleOptions, _loop2, i, attr, foundItem, _foundItem$opt, freeText, opss, _i, ops, opv, _iterator3, _step3, _ops, value, optionValueCodex, _i2, variantItem, possibleValues, j, possibleValue, _i3, _variantItem, val;
28205
+ return _regeneratorRuntime.wrap(function _callee9$(_context11) {
28206
+ while (1) switch (_context11.prev = _context11.next) {
27958
28207
  case 0:
27959
28208
  myCatalogArticleOptions = Object.values(article.catalogArticleOptions).sort(function (a, b) {
27960
28209
  var _a$sequenceNo, _b$sequenceNo;
27961
28210
  return ((_a$sequenceNo = a.sequenceNo) !== null && _a$sequenceNo !== void 0 ? _a$sequenceNo : 0) - ((_b$sequenceNo = b.sequenceNo) !== null && _b$sequenceNo !== void 0 ? _b$sequenceNo : 0);
27962
28211
  });
27963
28212
  if (!myCatalogArticleOptions) {
27964
- _context10.next = 9;
28213
+ _context11.next = 9;
27965
28214
  break;
27966
28215
  }
27967
- _loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop(i) {
28216
+ _loop2 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop2(i) {
27968
28217
  var _article$set$ViewConf, optionState;
27969
- return _regeneratorRuntime.wrap(function _loop$(_context9) {
27970
- while (1) switch (_context9.prev = _context9.next) {
28218
+ return _regeneratorRuntime.wrap(function _loop2$(_context10) {
28219
+ while (1) switch (_context10.prev = _context10.next) {
27971
28220
  case 0:
27972
28221
  //Hier wird mal geschaut, ob der aktuelle Artikel alle Optionen schon initialisiert hat.
27973
28222
  if (!article.articleOptionStates.find(function (ops) {
@@ -27978,24 +28227,24 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27978
28227
  }
27979
28228
  case 1:
27980
28229
  case "end":
27981
- return _context9.stop();
28230
+ return _context10.stop();
27982
28231
  }
27983
- }, _loop);
28232
+ }, _loop2);
27984
28233
  });
27985
28234
  i = 0;
27986
28235
  case 4:
27987
28236
  if (!(i < myCatalogArticleOptions.length)) {
27988
- _context10.next = 9;
28237
+ _context11.next = 9;
27989
28238
  break;
27990
28239
  }
27991
- return _context10.delegateYield(_loop(i), "t0", 6);
28240
+ return _context11.delegateYield(_loop2(i), "t0", 6);
27992
28241
  case 6:
27993
28242
  i++;
27994
- _context10.next = 4;
28243
+ _context11.next = 4;
27995
28244
  break;
27996
28245
  case 9:
27997
28246
  if (!article.articleOptionStates.length) {
27998
- _context10.next = 33;
28247
+ _context11.next = 33;
27999
28248
  break;
28000
28249
  }
28001
28250
  //infos eines Basisconfigurats initialisieren
@@ -28025,19 +28274,19 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28025
28274
 
28026
28275
  //defaultValues for FreeText
28027
28276
  _iterator3 = _createForOfIteratorHelper$5(article.articleOptionStates);
28028
- _context10.prev = 12;
28277
+ _context11.prev = 12;
28029
28278
  _iterator3.s();
28030
28279
  case 14:
28031
28280
  if ((_step3 = _iterator3.n()).done) {
28032
- _context10.next = 25;
28281
+ _context11.next = 25;
28033
28282
  break;
28034
28283
  }
28035
28284
  _ops = _step3.value;
28036
28285
  if (!variantValues[_ops.optionCodex + '_val']) {
28037
- _context10.next = 18;
28286
+ _context11.next = 18;
28038
28287
  break;
28039
28288
  }
28040
- return _context10.abrupt("continue", 23);
28289
+ return _context11.abrupt("continue", 23);
28041
28290
  case 18:
28042
28291
  value = undefined;
28043
28292
  optionValueCodex = Object.keys(_ops.option.articleOptionValues)[0];
@@ -28079,26 +28328,26 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28079
28328
  }
28080
28329
  if (value != undefined) article.engine.setOP(_ops.option.codex, _ops.option.articleOptionValues[optionValueCodex], value, true);
28081
28330
  case 23:
28082
- _context10.next = 14;
28331
+ _context11.next = 14;
28083
28332
  break;
28084
28333
  case 25:
28085
- _context10.next = 30;
28334
+ _context11.next = 30;
28086
28335
  break;
28087
28336
  case 27:
28088
- _context10.prev = 27;
28089
- _context10.t1 = _context10["catch"](12);
28090
- _iterator3.e(_context10.t1);
28337
+ _context11.prev = 27;
28338
+ _context11.t1 = _context11["catch"](12);
28339
+ _iterator3.e(_context11.t1);
28091
28340
  case 30:
28092
- _context10.prev = 30;
28341
+ _context11.prev = 30;
28093
28342
  _iterator3.f();
28094
- return _context10.finish(30);
28343
+ return _context11.finish(30);
28095
28344
  case 33:
28096
28345
  case "end":
28097
- return _context10.stop();
28346
+ return _context11.stop();
28098
28347
  }
28099
28348
  }, _callee9, null, [[12, 27, 30, 33]]);
28100
28349
  }));
28101
- function initCfgValues(_x28, _x29, _x30) {
28350
+ function initCfgValues(_x27, _x28, _x29) {
28102
28351
  return _initCfgValues.apply(this, arguments);
28103
28352
  }
28104
28353
  return initCfgValues;
@@ -28107,18 +28356,18 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28107
28356
  key: "setValidVariantValues",
28108
28357
  value: function () {
28109
28358
  var _setValidVariantValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(article) {
28110
- return _regeneratorRuntime.wrap(function _callee10$(_context11) {
28111
- while (1) switch (_context11.prev = _context11.next) {
28359
+ return _regeneratorRuntime.wrap(function _callee10$(_context12) {
28360
+ while (1) switch (_context12.prev = _context12.next) {
28112
28361
  case 0:
28113
- _context11.next = 2;
28362
+ _context12.next = 2;
28114
28363
  return this.updateCfgValues(article, article.getValidValues(article.VariantValues, undefined, true), {});
28115
28364
  case 2:
28116
28365
  case "end":
28117
- return _context11.stop();
28366
+ return _context12.stop();
28118
28367
  }
28119
28368
  }, _callee10, this);
28120
28369
  }));
28121
- function setValidVariantValues(_x31) {
28370
+ function setValidVariantValues(_x30) {
28122
28371
  return _setValidVariantValues.apply(this, arguments);
28123
28372
  }
28124
28373
  return setValidVariantValues;
@@ -28137,8 +28386,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28137
28386
  value: (function () {
28138
28387
  var _updateCfgValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(article, newConfigValues, alreadyInitializedValues, dontCalcPrice, dontLoadPartlist, calcVariantPrice) {
28139
28388
  var setByFeatureVariantValues, key, partlistArticlesToLoad;
28140
- return _regeneratorRuntime.wrap(function _callee11$(_context12) {
28141
- while (1) switch (_context12.prev = _context12.next) {
28389
+ return _regeneratorRuntime.wrap(function _callee11$(_context13) {
28390
+ while (1) switch (_context13.prev = _context13.next) {
28142
28391
  case 0:
28143
28392
  if (!!article.CatalogData.bundleRules) dontLoadPartlist = true;
28144
28393
  //es wird versucht die neuen Optionswerte zu setzten
@@ -28165,24 +28414,24 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28165
28414
  article.engine.evalDecisions();
28166
28415
  }
28167
28416
  if (calcVariantPrice) {
28168
- _context12.next = 8;
28417
+ _context13.next = 8;
28169
28418
  break;
28170
28419
  }
28171
- _context12.next = 8;
28420
+ _context13.next = 8;
28172
28421
  return article.updateShelfPlannerState(newConfigValues);
28173
28422
  case 8:
28174
28423
  if (!(!dontCalcPrice && !calcVariantPrice)) {
28175
- _context12.next = 11;
28424
+ _context13.next = 11;
28176
28425
  break;
28177
28426
  }
28178
- _context12.next = 11;
28427
+ _context13.next = 11;
28179
28428
  return this.updateLastElement(article);
28180
28429
  case 11:
28181
- _context12.next = 13;
28430
+ _context13.next = 13;
28182
28431
  return this.evalAndLoadPartlistArticles(article, dontLoadPartlist, newConfigValues);
28183
28432
  case 13:
28184
- partlistArticlesToLoad = _context12.sent;
28185
- _context12.next = 16;
28433
+ partlistArticlesToLoad = _context13.sent;
28434
+ _context13.next = 16;
28186
28435
  return this.evalOpvsOnOpvsConstructionRules(article);
28187
28436
  case 16:
28188
28437
  //danach Preise berechnen
@@ -28197,14 +28446,14 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28197
28446
  article.updateOPVImages();
28198
28447
  }
28199
28448
  }
28200
- return _context12.abrupt("return", partlistArticlesToLoad);
28449
+ return _context13.abrupt("return", partlistArticlesToLoad);
28201
28450
  case 18:
28202
28451
  case "end":
28203
- return _context12.stop();
28452
+ return _context13.stop();
28204
28453
  }
28205
28454
  }, _callee11, this);
28206
28455
  }));
28207
- function updateCfgValues(_x32, _x33, _x34, _x35, _x36, _x37) {
28456
+ function updateCfgValues(_x31, _x32, _x33, _x34, _x35, _x36) {
28208
28457
  return _updateCfgValues.apply(this, arguments);
28209
28458
  }
28210
28459
  return updateCfgValues;
@@ -28214,8 +28463,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28214
28463
  value: function () {
28215
28464
  var _updateLastElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(article) {
28216
28465
  var isIDM, opsLastElement, lastElement, opsLastPlannedAccessoire, opsFirstAccessoire, _article$accessoirePa, _article$accessoirePa2, accessoires, i;
28217
- return _regeneratorRuntime.wrap(function _callee12$(_context13) {
28218
- while (1) switch (_context13.prev = _context13.next) {
28466
+ return _regeneratorRuntime.wrap(function _callee12$(_context14) {
28467
+ while (1) switch (_context14.prev = _context14.next) {
28219
28468
  case 0:
28220
28469
  isIDM = article.CatalogData.isIDMFormat;
28221
28470
  opsLastElement = article.getArticleOptionState((!isIDM ? 'OPT' : '') + 'ELEMENTPOSITION');
@@ -28239,29 +28488,29 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28239
28488
  }
28240
28489
  opsFirstAccessoire = article.getArticleOptionState((!isIDM ? 'OPT' : '') + 'FIRSTACCESSOIRE');
28241
28490
  if (!opsFirstAccessoire) {
28242
- _context13.next = 15;
28491
+ _context14.next = 15;
28243
28492
  break;
28244
28493
  }
28245
28494
  accessoires = (_article$accessoirePa = (_article$accessoirePa2 = article.accessoireParentArticle) === null || _article$accessoirePa2 === void 0 ? void 0 : _article$accessoirePa2.getAccessoireByArticleCodex(article.articleCodex)) !== null && _article$accessoirePa !== void 0 ? _article$accessoirePa : [];
28246
28495
  i = 0;
28247
28496
  case 9:
28248
28497
  if (!(i < accessoires.length)) {
28249
- _context13.next = 15;
28498
+ _context14.next = 15;
28250
28499
  break;
28251
28500
  }
28252
- _context13.next = 12;
28501
+ _context14.next = 12;
28253
28502
  return this.updateOption(accessoires[i], (!isIDM ? 'OPT' : '') + 'FIRSTACCESSOIRE', (!isIDM ? 'OPV' : '') + (i + 1).toString(), i === 0 ? (!isIDM ? 'OPV' : '') + 'FIRSTACCESSOIRE' : (!isIDM ? 'OPV' : '') + 'NOTFIRSTACCESSOIRE');
28254
28503
  case 12:
28255
28504
  i++;
28256
- _context13.next = 9;
28505
+ _context14.next = 9;
28257
28506
  break;
28258
28507
  case 15:
28259
28508
  case "end":
28260
- return _context13.stop();
28509
+ return _context14.stop();
28261
28510
  }
28262
28511
  }, _callee12, this);
28263
28512
  }));
28264
- function updateLastElement(_x38) {
28513
+ function updateLastElement(_x37) {
28265
28514
  return _updateLastElement.apply(this, arguments);
28266
28515
  }
28267
28516
  return updateLastElement;
@@ -28272,38 +28521,38 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28272
28521
  var _updateOption = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(article, optionCodex, newCodex, fallbackNewCodex) {
28273
28522
  var _ops$val, _ops$visibleOptionVal;
28274
28523
  var ops, oldCodex, newVal;
28275
- return _regeneratorRuntime.wrap(function _callee13$(_context14) {
28276
- while (1) switch (_context14.prev = _context14.next) {
28524
+ return _regeneratorRuntime.wrap(function _callee13$(_context15) {
28525
+ while (1) switch (_context15.prev = _context15.next) {
28277
28526
  case 0:
28278
28527
  ops = article.getArticleOptionState(optionCodex);
28279
28528
  if (ops) {
28280
- _context14.next = 3;
28529
+ _context15.next = 3;
28281
28530
  break;
28282
28531
  }
28283
- return _context14.abrupt("return");
28532
+ return _context15.abrupt("return");
28284
28533
  case 3:
28285
28534
  oldCodex = (_ops$val = ops.val) === null || _ops$val === void 0 ? void 0 : _ops$val.codex;
28286
28535
  newVal = (_ops$visibleOptionVal = ops.visibleOptionValues[newCodex]) !== null && _ops$visibleOptionVal !== void 0 ? _ops$visibleOptionVal : fallbackNewCodex ? ops.visibleOptionValues[fallbackNewCodex] : undefined;
28287
28536
  if (!(oldCodex === (newVal === null || newVal === void 0 ? void 0 : newVal.codex))) {
28288
- _context14.next = 7;
28537
+ _context15.next = 7;
28289
28538
  break;
28290
28539
  }
28291
- return _context14.abrupt("return");
28540
+ return _context15.abrupt("return");
28292
28541
  case 7:
28293
28542
  if (!newVal) {
28294
- _context14.next = 11;
28543
+ _context15.next = 11;
28295
28544
  break;
28296
28545
  }
28297
28546
  ops.val = newVal;
28298
- _context14.next = 11;
28547
+ _context15.next = 11;
28299
28548
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(article.set, {}, []);
28300
28549
  case 11:
28301
28550
  case "end":
28302
- return _context14.stop();
28551
+ return _context15.stop();
28303
28552
  }
28304
28553
  }, _callee13);
28305
28554
  }));
28306
- function updateOption(_x39, _x40, _x41, _x42) {
28555
+ function updateOption(_x38, _x39, _x40, _x41) {
28307
28556
  return _updateOption.apply(this, arguments);
28308
28557
  }
28309
28558
  return updateOption;
@@ -28315,21 +28564,21 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28315
28564
  value: (function () {
28316
28565
  var _evalAndLoadPartlistArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(article, dontLoadPartlist, newConfigValues) {
28317
28566
  var partlistArticlesToLoad;
28318
- return _regeneratorRuntime.wrap(function _callee14$(_context15) {
28319
- while (1) switch (_context15.prev = _context15.next) {
28567
+ return _regeneratorRuntime.wrap(function _callee14$(_context16) {
28568
+ while (1) switch (_context16.prev = _context16.next) {
28320
28569
  case 0:
28321
28570
  partlistArticlesToLoad = [];
28322
28571
  if (!article.hasPartlistArticle) {
28323
- _context15.next = 8;
28572
+ _context16.next = 8;
28324
28573
  break;
28325
28574
  }
28326
28575
  article.deletePartlistArticles(); //alle aktellen PartlistArticles des Articles löschen!
28327
28576
  partlistArticlesToLoad = article.engine.evalPartlist(newConfigValues);
28328
28577
  if (dontLoadPartlist) {
28329
- _context15.next = 8;
28578
+ _context16.next = 8;
28330
28579
  break;
28331
28580
  }
28332
- _context15.next = 7;
28581
+ _context16.next = 7;
28333
28582
  return this.loadPartlistArticles(partlistArticlesToLoad, article, article.VariantValues);
28334
28583
  case 7:
28335
28584
  partlistArticlesToLoad = [];
@@ -28338,14 +28587,14 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28338
28587
  partlistArticlesToLoad = this.bundlePartlistArticles(partlistArticlesToLoad, article.bundleRules, _defineProperty({}, article.basketId, article));
28339
28588
  }
28340
28589
  article.hasPartlistArticleInitialized = true;
28341
- return _context15.abrupt("return", partlistArticlesToLoad);
28590
+ return _context16.abrupt("return", partlistArticlesToLoad);
28342
28591
  case 11:
28343
28592
  case "end":
28344
- return _context15.stop();
28593
+ return _context16.stop();
28345
28594
  }
28346
28595
  }, _callee14, this);
28347
28596
  }));
28348
- function evalAndLoadPartlistArticles(_x43, _x44, _x45) {
28597
+ function evalAndLoadPartlistArticles(_x42, _x43, _x44) {
28349
28598
  return _evalAndLoadPartlistArticles.apply(this, arguments);
28350
28599
  }
28351
28600
  return evalAndLoadPartlistArticles;
@@ -28354,40 +28603,37 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28354
28603
  key: "loadPartlistArticles",
28355
28604
  value: function () {
28356
28605
  var _loadPartlistArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(partlistArticlesToLoad, article, newConfigValues) {
28357
- var loadAwaits, i, doLoadItem;
28358
- return _regeneratorRuntime.wrap(function _callee15$(_context16) {
28359
- while (1) switch (_context16.prev = _context16.next) {
28606
+ var _this = this;
28607
+ var i;
28608
+ return _regeneratorRuntime.wrap(function _callee15$(_context17) {
28609
+ while (1) switch (_context17.prev = _context17.next) {
28360
28610
  case 0:
28361
- //make all api calls of all the partlistarticles at the same time but initialize them still synced
28362
- loadAwaits = [];
28363
- for (i = 0; i < partlistArticlesToLoad.length; i++) {
28364
- doLoadItem = partlistArticlesToLoad[i];
28365
- loadAwaits.push(this.preLoadArticle(article.set, doLoadItem.ArticleCodex, this.partlistArticleInitData(article, doLoadItem)));
28366
- }
28367
- _context16.next = 4;
28368
- return Promise.all(loadAwaits);
28369
- case 4:
28611
+ _context17.next = 2;
28612
+ return this.preLoadArticles(article.set, partlistArticlesToLoad.map(function (p) {
28613
+ return _this.partlistArticleInitData(article, p);
28614
+ }));
28615
+ case 2:
28370
28616
  i = 0;
28371
- case 5:
28617
+ case 3:
28372
28618
  if (!(i < partlistArticlesToLoad.length)) {
28373
- _context16.next = 11;
28619
+ _context17.next = 9;
28374
28620
  break;
28375
28621
  }
28376
- _context16.next = 8;
28622
+ _context17.next = 6;
28377
28623
  return this.loadPartlistArticle(partlistArticlesToLoad[i], article, newConfigValues);
28378
- case 8:
28624
+ case 6:
28379
28625
  i++;
28380
- _context16.next = 5;
28626
+ _context17.next = 3;
28381
28627
  break;
28382
- case 11:
28628
+ case 9:
28383
28629
  article.sortPartlistArticles(partlistArticlesToLoad);
28384
- case 12:
28630
+ case 10:
28385
28631
  case "end":
28386
- return _context16.stop();
28632
+ return _context17.stop();
28387
28633
  }
28388
28634
  }, _callee15, this);
28389
28635
  }));
28390
- function loadPartlistArticles(_x46, _x47, _x48) {
28636
+ function loadPartlistArticles(_x45, _x46, _x47) {
28391
28637
  return _loadPartlistArticles.apply(this, arguments);
28392
28638
  }
28393
28639
  return loadPartlistArticles;
@@ -28398,29 +28644,29 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28398
28644
  value: function () {
28399
28645
  var _loadPartlistArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(doLoadItem, article, newConfigValues) {
28400
28646
  var nArticle;
28401
- return _regeneratorRuntime.wrap(function _callee16$(_context17) {
28402
- while (1) switch (_context17.prev = _context17.next) {
28647
+ return _regeneratorRuntime.wrap(function _callee16$(_context18) {
28648
+ while (1) switch (_context18.prev = _context18.next) {
28403
28649
  case 0:
28404
- _context17.next = 2;
28650
+ _context18.next = 2;
28405
28651
  return this.loadArticle(article.set, doLoadItem.ArticleCodex, this.partlistArticleInitData(article, doLoadItem));
28406
28652
  case 2:
28407
- nArticle = _context17.sent;
28653
+ nArticle = _context18.sent;
28408
28654
  if (!nArticle) {
28409
- _context17.next = 8;
28655
+ _context18.next = 8;
28410
28656
  break;
28411
28657
  }
28412
28658
  doLoadItem.BasketID = nArticle.basketId;
28413
- _context17.next = 7;
28659
+ _context18.next = 7;
28414
28660
  return this.toDoAfterArticleLoaded(nArticle, {}, _objectSpread$d(_objectSpread$d({}, doLoadItem.VariantValues), newConfigValues), 'initializingPartlist', doLoadItem.VariantItemData);
28415
28661
  case 7:
28416
28662
  article.addPartlistArticle(nArticle);
28417
28663
  case 8:
28418
28664
  case "end":
28419
- return _context17.stop();
28665
+ return _context18.stop();
28420
28666
  }
28421
28667
  }, _callee16, this);
28422
28668
  }));
28423
- function loadPartlistArticle(_x49, _x50, _x51) {
28669
+ function loadPartlistArticle(_x48, _x49, _x50) {
28424
28670
  return _loadPartlistArticle.apply(this, arguments);
28425
28671
  }
28426
28672
  return loadPartlistArticle;
@@ -28437,6 +28683,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28437
28683
  //Objektstruktur
28438
28684
  relatedToBasketId: article.basketId,
28439
28685
  parentArticle: article,
28686
+ articleCodex: doLoadItem.ArticleCodex,
28440
28687
  isPartlistArticle: true,
28441
28688
  ruleDesc: doLoadItem.RuleDesc,
28442
28689
  ruleDesc_locales: doLoadItem.RuleDesc_locales,
@@ -28447,7 +28694,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28447
28694
  configArticleCodex: doLoadItem.RetailArticleNr,
28448
28695
  supplierOrderCodex: doLoadItem.SupplierOrderCodex,
28449
28696
  initDecisions: doLoadItem.initDecisions,
28450
- partlistArticleVisibleInTree: doLoadItem.PosInvisibility === 0,
28697
+ partlistArticleVisibleInTree: doLoadItem.PosInvisibility === 0 || doLoadItem.PosInvisibility == 2,
28451
28698
  optionsForPrint: doLoadItem.optionsForPrint,
28452
28699
  optionImgForPrint: doLoadItem.optionImgForPrint,
28453
28700
  catalogCodex: doLoadItem.CatalogCodex
@@ -28460,8 +28707,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28460
28707
  var _evalOpvsOnOpvsConstructionRules = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(article) {
28461
28708
  var _article$CatalogData$;
28462
28709
  var somethingChanged, previousRules, _key, actRules, item, _iterator4, _step4, ops, myOPVs, key2, opv, opvGroupName, _article$catalogArtic, _article$catalogArtic2, disable, onOpv, onOpvArr, invaliOPVs, invalidOPVArr, j, opvRule, ops2, i, invalidOpv, ops3, key, constructionRule, notifications, _i4, _item;
28463
- return _regeneratorRuntime.wrap(function _callee17$(_context18) {
28464
- while (1) switch (_context18.prev = _context18.next) {
28710
+ return _regeneratorRuntime.wrap(function _callee17$(_context19) {
28711
+ while (1) switch (_context19.prev = _context19.next) {
28465
28712
  case 0:
28466
28713
  somethingChanged = false;
28467
28714
  previousRules = {};
@@ -28535,26 +28782,26 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28535
28782
  _iterator4.f();
28536
28783
  }
28537
28784
  if (!((_article$CatalogData$ = article.CatalogData.warningRules) !== null && _article$CatalogData$ !== void 0 && _article$CatalogData$.length)) {
28538
- _context18.next = 20;
28785
+ _context19.next = 20;
28539
28786
  break;
28540
28787
  }
28541
28788
  notifications = this.checkNotificationRules(article.CatalogData.warningRules, _defineProperty({}, article.basketId, article), {});
28542
28789
  if (!(notifications !== null && notifications !== void 0 && notifications.length)) {
28543
- _context18.next = 20;
28790
+ _context19.next = 20;
28544
28791
  break;
28545
28792
  }
28546
28793
  _i4 = 0;
28547
28794
  case 11:
28548
28795
  if (!(_i4 < notifications.length)) {
28549
- _context18.next = 19;
28796
+ _context19.next = 19;
28550
28797
  break;
28551
28798
  }
28552
28799
  _item = notifications[_i4];
28553
28800
  if (_item.showAsWarning) {
28554
- _context18.next = 15;
28801
+ _context19.next = 15;
28555
28802
  break;
28556
28803
  }
28557
- return _context18.abrupt("continue", 16);
28804
+ return _context19.abrupt("continue", 16);
28558
28805
  case 15:
28559
28806
  article.addUpdatedOPVbyOPVConstructionRules(_item.showAsWarning.option + ';' + _item.showAsWarning.optionValue, article.updateOPVConstruction((!article.CatalogData.isIDMFormat ? 'OPT' : '') + _item.showAsWarning.option, (!article.CatalogData.isIDMFormat ? 'OPV' : '') + _item.showAsWarning.optionValue, {
28560
28807
  message: _item.message,
@@ -28562,24 +28809,24 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28562
28809
  }));
28563
28810
  case 16:
28564
28811
  _i4++;
28565
- _context18.next = 11;
28812
+ _context19.next = 11;
28566
28813
  break;
28567
28814
  case 19:
28568
28815
  somethingChanged = true;
28569
28816
  case 20:
28570
28817
  if (!(somethingChanged && JSON.stringify(previousRules) != JSON.stringify(article.updatedOPVbyOPVConstructionRules))) {
28571
- _context18.next = 23;
28818
+ _context19.next = 23;
28572
28819
  break;
28573
28820
  }
28574
- _context18.next = 23;
28821
+ _context19.next = 23;
28575
28822
  return this.updateCfgValues(article, {}, {});
28576
28823
  case 23:
28577
28824
  case "end":
28578
- return _context18.stop();
28825
+ return _context19.stop();
28579
28826
  }
28580
28827
  }, _callee17, this);
28581
28828
  }));
28582
- function evalOpvsOnOpvsConstructionRules(_x52) {
28829
+ function evalOpvsOnOpvsConstructionRules(_x51) {
28583
28830
  return _evalOpvsOnOpvsConstructionRules.apply(this, arguments);
28584
28831
  }
28585
28832
  return evalOpvsOnOpvsConstructionRules;
@@ -28687,7 +28934,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28687
28934
  value: function checkIfAllOptionsAreDefined(articles) {
28688
28935
  var articleNames = [];
28689
28936
  var options = [];
28690
- var _loop2 = function _loop2(baksetId) {
28937
+ var _loop3 = function _loop3(baksetId) {
28691
28938
  var article = articles[baksetId];
28692
28939
  if (!article.areAllOptionsDefined) {
28693
28940
  var requiredUserInputOptions = article.requiredUserInputOptions;
@@ -28703,7 +28950,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28703
28950
  }
28704
28951
  };
28705
28952
  for (var baksetId in articles) {
28706
- _loop2(baksetId);
28953
+ _loop3(baksetId);
28707
28954
  }
28708
28955
  return {
28709
28956
  articleNames: articleNames,
@@ -28760,29 +29007,29 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28760
29007
  value: function () {
28761
29008
  var _triggerShelfplannerVisibility = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(artices, gridGroup) {
28762
29009
  var key, _artice$shelfPlanner, artice;
28763
- return _regeneratorRuntime.wrap(function _callee18$(_context19) {
28764
- while (1) switch (_context19.prev = _context19.next) {
29010
+ return _regeneratorRuntime.wrap(function _callee18$(_context20) {
29011
+ while (1) switch (_context20.prev = _context20.next) {
28765
29012
  case 0:
28766
- _context19.t0 = _regeneratorRuntime.keys(artices);
29013
+ _context20.t0 = _regeneratorRuntime.keys(artices);
28767
29014
  case 1:
28768
- if ((_context19.t1 = _context19.t0()).done) {
28769
- _context19.next = 8;
29015
+ if ((_context20.t1 = _context20.t0()).done) {
29016
+ _context20.next = 8;
28770
29017
  break;
28771
29018
  }
28772
- key = _context19.t1.value;
29019
+ key = _context20.t1.value;
28773
29020
  artice = artices[key];
28774
- _context19.next = 6;
29021
+ _context20.next = 6;
28775
29022
  return (_artice$shelfPlanner = artice.shelfPlanner) === null || _artice$shelfPlanner === void 0 ? void 0 : _artice$shelfPlanner.triggerVisibility(gridGroup);
28776
29023
  case 6:
28777
- _context19.next = 1;
29024
+ _context20.next = 1;
28778
29025
  break;
28779
29026
  case 8:
28780
29027
  case "end":
28781
- return _context19.stop();
29028
+ return _context20.stop();
28782
29029
  }
28783
29030
  }, _callee18);
28784
29031
  }));
28785
- function triggerShelfplannerVisibility(_x53, _x54) {
29032
+ function triggerShelfplannerVisibility(_x52, _x53) {
28786
29033
  return _triggerShelfplannerVisibility.apply(this, arguments);
28787
29034
  }
28788
29035
  return triggerShelfplannerVisibility;
@@ -28798,13 +29045,13 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28798
29045
  }, {
28799
29046
  key: "getOrderLinesOfArticles",
28800
29047
  value: function getOrderLinesOfArticles(articles) {
28801
- var _this = this;
29048
+ var _this2 = this;
28802
29049
  var customDimensions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
28803
29050
  var repairOnly = arguments.length > 2 ? arguments[2] : undefined;
28804
29051
  var hasFavorites = arguments.length > 3 ? arguments[3] : undefined;
28805
29052
  var ret = [];
28806
29053
  if (Object.values(articles).length == 0) return ret;
28807
- var _loop3 = function _loop3() {
29054
+ var _loop4 = function _loop4() {
28808
29055
  var _article$shelfPlanner3, _article$shelfPlanner4, _article$doorPlanner;
28809
29056
  var article = articles[key];
28810
29057
  var catalogData = article.CatalogData;
@@ -28882,12 +29129,12 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28882
29129
 
28883
29130
  //die Partlistarticle eines Articles auch in die Orderline pushen
28884
29131
  if (article.hasPartlistArticle) {
28885
- ret = ret.concat(_this.getOrderLinesOfArticles(article.partlistArticles, customDimensions, repairOnly, hasFavorites));
29132
+ ret = ret.concat(_this2.getOrderLinesOfArticles(article.partlistArticles, customDimensions, repairOnly, hasFavorites));
28886
29133
  }
28887
- ret = ret.concat(_this.getOptiontreeAccessoiresArr(article.set.getSetId(), article));
29134
+ ret = ret.concat(_this2.getOptiontreeAccessoiresArr(article.set.getSetId(), article));
28888
29135
  };
28889
29136
  for (var key in articles) {
28890
- _loop3();
29137
+ _loop4();
28891
29138
  }
28892
29139
  return ret;
28893
29140
  }
@@ -29052,20 +29299,20 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29052
29299
  key: "correctPartlistArticlesByGlobalRules",
29053
29300
  value: (function () {
29054
29301
  var _correctPartlistArticlesByGlobalRules = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(set, partlistArticlesToLoad, bundleRules, doChangeRetailArticleNumbers) {
29055
- var _loop4, i, article;
29056
- return _regeneratorRuntime.wrap(function _callee19$(_context21) {
29057
- while (1) switch (_context21.prev = _context21.next) {
29302
+ var _loop5, i, article;
29303
+ return _regeneratorRuntime.wrap(function _callee19$(_context22) {
29304
+ while (1) switch (_context22.prev = _context22.next) {
29058
29305
  case 0:
29059
29306
  if (bundleRules) partlistArticlesToLoad = this.bundlePartlistArticles(partlistArticlesToLoad, bundleRules, set.getDivaArticles());
29060
29307
  //Correct RetailArticleNumbers
29061
29308
  if (!(doChangeRetailArticleNumbers !== null && doChangeRetailArticleNumbers !== void 0 && doChangeRetailArticleNumbers.doChange && doChangeRetailArticleNumbers.retailArticleRules)) {
29062
- _context21.next = 9;
29309
+ _context22.next = 9;
29063
29310
  break;
29064
29311
  }
29065
- _loop4 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop4(i) {
29312
+ _loop5 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop5(i) {
29066
29313
  var rule;
29067
- return _regeneratorRuntime.wrap(function _loop4$(_context20) {
29068
- while (1) switch (_context20.prev = _context20.next) {
29314
+ return _regeneratorRuntime.wrap(function _loop5$(_context21) {
29315
+ while (1) switch (_context21.prev = _context21.next) {
29069
29316
  case 0:
29070
29317
  //Run through articleCodexes to repair:
29071
29318
  rule = doChangeRetailArticleNumbers.retailArticleRules.find(function (item) {
@@ -29077,34 +29324,34 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29077
29324
  }
29078
29325
  case 2:
29079
29326
  case "end":
29080
- return _context20.stop();
29327
+ return _context21.stop();
29081
29328
  }
29082
- }, _loop4);
29329
+ }, _loop5);
29083
29330
  });
29084
29331
  i = 0;
29085
29332
  case 4:
29086
29333
  if (!(i < partlistArticlesToLoad.length)) {
29087
- _context21.next = 9;
29334
+ _context22.next = 9;
29088
29335
  break;
29089
29336
  }
29090
- return _context21.delegateYield(_loop4(i), "t0", 6);
29337
+ return _context22.delegateYield(_loop5(i), "t0", 6);
29091
29338
  case 6:
29092
29339
  i++;
29093
- _context21.next = 4;
29340
+ _context22.next = 4;
29094
29341
  break;
29095
29342
  case 9:
29096
29343
  article = Object.values(set.getDivaArticles()).find(function (article) {
29097
29344
  return article.hasPartlistArticle && !article.deleted;
29098
29345
  });
29099
- _context21.next = 12;
29346
+ _context22.next = 12;
29100
29347
  return this.loadPartlistArticles(partlistArticlesToLoad, article, {});
29101
29348
  case 12:
29102
29349
  case "end":
29103
- return _context21.stop();
29350
+ return _context22.stop();
29104
29351
  }
29105
29352
  }, _callee19, this);
29106
29353
  }));
29107
- function correctPartlistArticlesByGlobalRules(_x55, _x56, _x57, _x58) {
29354
+ function correctPartlistArticlesByGlobalRules(_x54, _x55, _x56, _x57) {
29108
29355
  return _correctPartlistArticlesByGlobalRules.apply(this, arguments);
29109
29356
  }
29110
29357
  return correctPartlistArticlesByGlobalRules;
@@ -29113,7 +29360,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29113
29360
  key: "bundlePartlistArticles",
29114
29361
  value: function bundlePartlistArticles(partlistArticlesToLoad, bundleRules, articles) {
29115
29362
  var partlistArticlesToLoadGrouped = [];
29116
- var _loop5 = function _loop5(i) {
29363
+ var _loop6 = function _loop6(i) {
29117
29364
  var index = partlistArticlesToLoadGrouped.findIndex(function (item, j) {
29118
29365
  if (item.CatalogCodex == partlistArticlesToLoad[i].CatalogCodex && item.ArticleCodex == partlistArticlesToLoad[i].ArticleCodex && item.RetailArticleNr == partlistArticlesToLoad[i].RetailArticleNr && item.RetailPrefix == partlistArticlesToLoad[i].RetailPrefix) {
29119
29366
  return true;
@@ -29127,7 +29374,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29127
29374
  }
29128
29375
  };
29129
29376
  for (var i = 0; i < partlistArticlesToLoad.length; i++) {
29130
- _loop5(i);
29377
+ _loop6(i);
29131
29378
  }
29132
29379
  //bundle Partlistarticles
29133
29380
  for (var _i6 = 0; _i6 < bundleRules.length; _i6++) {
@@ -31294,7 +31541,7 @@ var DivaSet = /*#__PURE__*/function () {
31294
31541
  break;
31295
31542
  }
31296
31543
  _context5.next = 3;
31297
- return import('./DoorPlanner-a905af78.js');
31544
+ return import('./DoorPlanner-6300bf8d.js');
31298
31545
  case 3:
31299
31546
  _yield$import = _context5.sent;
31300
31547
  DoorPlanner = _yield$import["default"];
@@ -38141,7 +38388,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
38141
38388
  break;
38142
38389
  case 3:
38143
38390
  _context12.next = 5;
38144
- return import('./PfisterWWSHandler-032ac622.js');
38391
+ return import('./PfisterWWSHandler-e9263d8a.js');
38145
38392
  case 5:
38146
38393
  _yield$import = _context12.sent;
38147
38394
  PfisterWWSHandler = _yield$import["default"];
@@ -38149,7 +38396,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
38149
38396
  return _context12.abrupt("break", 27);
38150
38397
  case 9:
38151
38398
  _context12.next = 11;
38152
- return import('./LiviqueWWSHandler-8e63d99c.js');
38399
+ return import('./LiviqueWWSHandler-18a06139.js');
38153
38400
  case 11:
38154
38401
  _yield$import2 = _context12.sent;
38155
38402
  LiviqueWWSHandler = _yield$import2["default"];
@@ -38157,7 +38404,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
38157
38404
  return _context12.abrupt("break", 27);
38158
38405
  case 15:
38159
38406
  _context12.next = 17;
38160
- return import('./SeriousBasketHandler-0a75b0c4.js');
38407
+ return import('./SeriousBasketHandler-4bd4a253.js');
38161
38408
  case 17:
38162
38409
  _yield$import3 = _context12.sent;
38163
38410
  SeriousWWSHandler = _yield$import3["default"];
@@ -38165,7 +38412,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
38165
38412
  return _context12.abrupt("break", 27);
38166
38413
  case 21:
38167
38414
  _context12.next = 23;
38168
- return import('./StandardWWSHandler-7156e7b1.js');
38415
+ return import('./StandardWWSHandler-d5df49a9.js');
38169
38416
  case 23:
38170
38417
  _yield$import4 = _context12.sent;
38171
38418
  StandardWWSHandler = _yield$import4["default"];
@@ -39593,7 +39840,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
39593
39840
  while (1) switch (_context3.prev = _context3.next) {
39594
39841
  case 0:
39595
39842
  _context3.next = 2;
39596
- return import('./Host3DSignalR-e81c5106.js');
39843
+ return import('./Host3DSignalR-4ac73340.js');
39597
39844
  case 2:
39598
39845
  _yield$import = _context3.sent;
39599
39846
  Host3DSignalR = _yield$import["default"];
@@ -41147,7 +41394,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
41147
41394
  break;
41148
41395
  case 8:
41149
41396
  _context4.next = 10;
41150
- return import('./DivaStandardPlanner-2a46e1fc.js');
41397
+ return import('./DivaStandardPlanner-4d500655.js');
41151
41398
  case 10:
41152
41399
  _yield$import = _context4.sent;
41153
41400
  DivaStandardPlanner = _yield$import["default"];
@@ -41158,7 +41405,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
41158
41405
  return _context4.abrupt("break", 21);
41159
41406
  case 15:
41160
41407
  _context4.next = 17;
41161
- return import('./DivaBoxPlanner-f77a7cfc.js');
41408
+ return import('./DivaBoxPlanner-f03cb8f2.js');
41162
41409
  case 17:
41163
41410
  _yield$import2 = _context4.sent;
41164
41411
  DivaBoxPlanner = _yield$import2["default"];
@@ -42917,7 +43164,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42917
43164
  this.api = new DivaApiHandler(this.plannerConfig, this.handler);
42918
43165
  this.api.setI18n(this.i18n);
42919
43166
  this.api.setActions(this.actions);
42920
- this.api.setState(this.state);
42921
43167
  this.ReturnTo = this.plannerConfig.returnTo;
42922
43168
  LOG$1.startTransaction({
42923
43169
  event: 'onInitializeConfigurator',
@@ -42926,46 +43172,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42926
43172
  warningTime: 2000,
42927
43173
  errorTime: 4000
42928
43174
  });
42929
- _context14.next = 8;
43175
+ _context14.next = 7;
42930
43176
  return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
42931
- case 8:
43177
+ case 7:
42932
43178
  this.plannerHandler = new DivaPlannerHandler(false);
42933
43179
  viewReadyPromise = this.initViewApiDependencies();
42934
- _context14.next = 12;
43180
+ _context14.next = 11;
42935
43181
  return this.divaBasketHandler.initializeBasket(this.api);
42936
- case 12:
43182
+ case 11:
42937
43183
  loadSuccessful = _context14.sent;
42938
43184
  if (this.plannerConfig.configuratorSessionId === undefined && (!this.divaBasketHandler.hasConfiguratorSessionIdGetter || DivaUtils.businessMetrics.getConfiguratorSessionId() === undefined)) {
42939
43185
  DivaUtils.businessMetrics.setConfiguratorSessionId();
42940
43186
  }
42941
43187
  if (!loadSuccessful) {
42942
- _context14.next = 28;
43188
+ _context14.next = 27;
42943
43189
  break;
42944
43190
  }
42945
- _context14.prev = 15;
42946
- _context14.next = 18;
43191
+ _context14.prev = 14;
43192
+ _context14.next = 17;
42947
43193
  return this.initializeSets(loadSuccessful, viewReadyPromise);
42948
- case 18:
43194
+ case 17:
42949
43195
  return _context14.abrupt("return", _context14.sent);
42950
- case 21:
42951
- _context14.prev = 21;
42952
- _context14.t0 = _context14["catch"](15);
43196
+ case 20:
43197
+ _context14.prev = 20;
43198
+ _context14.t0 = _context14["catch"](14);
42953
43199
  LOG$1.error(_context14.t0);
42954
43200
  this.onInitializationError(_context14.t0);
42955
43201
  return _context14.abrupt("return", false);
42956
- case 26:
42957
- _context14.next = 31;
43202
+ case 25:
43203
+ _context14.next = 30;
42958
43204
  break;
42959
- case 28:
43205
+ case 27:
42960
43206
  this.onInitializationError();
42961
43207
  //fehler beim laden vom basket..
42962
43208
  LOG$1.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {}, true);
42963
43209
  return _context14.abrupt("return", false);
42964
- case 31:
43210
+ case 30:
42965
43211
  case "end":
42966
43212
  return _context14.stop();
42967
43213
  }
42968
- }, _callee14, this, [[15, 21]]);
43214
+ }, _callee14, this, [[14, 20]]);
42969
43215
  }));
42970
43216
  function initialize() {
42971
43217
  return _initialize.apply(this, arguments);
@@ -43084,7 +43330,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
43084
43330
  value: function updatePlannerConfig(plannerConfig) {
43085
43331
  this.plannerConfig = Object.assign(plannerConfig, {});
43086
43332
  this.divaBasketHandler.updatePlannerConfig(plannerConfig);
43087
- this.api.initalizeWebConfigData(plannerConfig.settings);
43333
+ this.api.initalizeWebConfigData(plannerConfig);
43088
43334
  }
43089
43335
  }, {
43090
43336
  key: "getInitStateForSet",