@crystaldesign/web-planner-logic 25.4.0-beta.35 → 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
@@ -45,7 +45,7 @@ var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
45
45
  var _excluded = ["type"];
46
46
  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; }
47
47
  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__default["default"](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; }
48
- var LOG$m = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
48
+ var LOG$o = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
49
49
  var JsonDataCache = /*#__PURE__*/function () {
50
50
  function JsonDataCache() {
51
51
  _classCallCheck__default["default"](this, JsonDataCache);
@@ -76,10 +76,10 @@ var DivaApiHandler = /*#__PURE__*/function () {
76
76
  _defineProperty__default["default"](this, "jwt", void 0);
77
77
  _defineProperty__default["default"](this, "apiKey", void 0);
78
78
  _defineProperty__default["default"](this, "actions", void 0);
79
- _defineProperty__default["default"](this, "state", void 0);
80
79
  _defineProperty__default["default"](this, "i18n", void 0);
81
80
  _defineProperty__default["default"](this, "getSessionGuid", void 0);
82
81
  _defineProperty__default["default"](this, "useEkPrices", false);
82
+ _defineProperty__default["default"](this, "smSupplierNr", undefined);
83
83
  this.organization = plannerConfig.currentOrganization;
84
84
  this.getSessionGuid = plannerConfig.actions.getSessionGuid;
85
85
  this.apiConfig = plannerConfig.apiConfig;
@@ -88,10 +88,11 @@ var DivaApiHandler = /*#__PURE__*/function () {
88
88
  this.jwt = plannerConfig.jwt;
89
89
  this.apiKey = plannerConfig.apiKey;
90
90
  this.useEkPrices = !!plannerConfig.useEkPrices;
91
+ this.smSupplierNr = plannerConfig.smSupplierNr;
91
92
  if (plannerConfig.settings) {
92
- this.initalizeWebConfigData(plannerConfig.settings, plannerConfig.lang);
93
+ this.initalizeWebConfigData(plannerConfig);
93
94
  } else {
94
- LOG$m.error(new DivaUtils.DivaError('Fehler beim laden der WebConfig', {
95
+ LOG$o.error(new DivaUtils.DivaError('Fehler beim laden der WebConfig', {
95
96
  code: 'WC_0001'
96
97
  }));
97
98
  throw Error('Initalize failed!');
@@ -126,7 +127,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
126
127
  while (1) switch (_context.prev = _context.next) {
127
128
  case 0:
128
129
  skip = _args.length > 2 && _args[2] !== undefined ? _args[2] : 0;
129
- LOG$m.debug('DivaApiHandler.fetchData ' + url, 'DivaApiHandler, fetchData');
130
+ LOG$o.debug('DivaApiHandler.fetchData ' + url, 'DivaApiHandler, fetchData');
130
131
  if (init) {
131
132
  _context.next = 4;
132
133
  break;
@@ -159,7 +160,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
159
160
  case 18:
160
161
  data = _context.sent;
161
162
  if (data !== null && data !== void 0 && data.Error) {
162
- LOG$m.error(new DivaUtils.DivaError(data.Error, {
163
+ LOG$o.error(new DivaUtils.DivaError(data.Error, {
163
164
  code: 'WC_0001',
164
165
  custom: {
165
166
  url: url
@@ -298,14 +299,14 @@ var DivaApiHandler = /*#__PURE__*/function () {
298
299
  _context3.next = 8;
299
300
  break;
300
301
  }
301
- LOG$m.debug('getDataFromInternalCache: ' + queryString);
302
+ LOG$o.debug('getDataFromInternalCache: ' + queryString);
302
303
  return _context3.abrupt("return", cacheHit);
303
304
  case 8:
304
305
  if (!(cacheMD5 && this.jsonDataCache.get(cacheMD5) && !((_this$divaWebConfigDa2 = this.divaWebConfigData) !== null && _this$divaWebConfigDa2 !== void 0 && _this$divaWebConfigDa2.addOrganizationIdToCacheKey))) {
305
306
  _context3.next = 11;
306
307
  break;
307
308
  }
308
- LOG$m.debug('getDataFromInternalCache: ' + queryString);
309
+ LOG$o.debug('getDataFromInternalCache: ' + queryString);
309
310
  return _context3.abrupt("return", this.jsonDataCache.get(cacheMD5));
310
311
  case 11:
311
312
  if (!addSession) {
@@ -366,7 +367,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
366
367
  result = _context3.sent;
367
368
  if (method !== 'POST') this.jsonDataCache.set(myQS, result);
368
369
  if (cacheMD5 && !((_this$divaWebConfigDa3 = this.divaWebConfigData) !== null && _this$divaWebConfigDa3 !== void 0 && _this$divaWebConfigDa3.addOrganizationIdToCacheKey)) this.jsonDataCache.set(cacheMD5, result);
369
- LOG$m.debug('getDataFromApi: ' + queryString);
370
+ LOG$o.debug('getDataFromApi: ' + queryString);
370
371
  return _context3.abrupt("return", result);
371
372
  case 40:
372
373
  case "end":
@@ -402,7 +403,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
402
403
  case 5:
403
404
  _context4.prev = 5;
404
405
  _context4.t0 = _context4["catch"](1);
405
- LOG$m.error(new DivaUtils.DivaError('could not create product in Configurator', {
406
+ LOG$o.error(new DivaUtils.DivaError('could not create product in Configurator', {
406
407
  cause: _context4.t0
407
408
  }));
408
409
  return _context4.abrupt("return", false);
@@ -419,8 +420,10 @@ var DivaApiHandler = /*#__PURE__*/function () {
419
420
  }()
420
421
  }, {
421
422
  key: "initalizeWebConfigData",
422
- value: function initalizeWebConfigData(data, lang) {
423
- var _data$ViewConfig;
423
+ value: function initalizeWebConfigData(plannerConfig) {
424
+ var _ViewConfig;
425
+ var lang = plannerConfig.lang;
426
+ var data = plannerConfig.settings;
424
427
  this.divaWebConfigData = {
425
428
  serverId: data.serverId != undefined ? data.serverId : '33',
426
429
  configVariant: data.configVariant != undefined ? data.configVariant : '',
@@ -442,7 +445,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
442
445
  doAllowSetPlanner: data.doAllowSetPlanner,
443
446
  onErrorHandling: data.onErrorHandling,
444
447
  returnTo: data.returnTo,
445
- viewConfig: (_data$ViewConfig = data.ViewConfig) !== null && _data$ViewConfig !== void 0 ? _data$ViewConfig : data.viewConfig,
448
+ viewConfig: (_ViewConfig = data.ViewConfig) !== null && _ViewConfig !== void 0 ? _ViewConfig : data.viewConfig,
446
449
  loadSupplierColors: data.loadSupplierColors,
447
450
  showSelectionModeZero: data.showSelectionModeZero,
448
451
  dontLoadCatalogEditorLiteMask: data.dontLoadCatalogEditorLiteMask,
@@ -674,11 +677,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
674
677
  value: function setActions(actions) {
675
678
  this.actions = actions;
676
679
  }
677
- }, {
678
- key: "setState",
679
- value: function setState(state) {
680
- this.state = state;
681
- }
682
680
  }, {
683
681
  key: "getI18n",
684
682
  value: function getI18n() {
@@ -1027,8 +1025,10 @@ var DivaApiHandler = /*#__PURE__*/function () {
1027
1025
  }
1028
1026
  }, {
1029
1027
  key: "getIDMItems",
1030
- value: function getIDMItems(catalogId, serieId) {
1031
- return '/live/v3.0/catalogs/' + catalogId + '/series/' + serieId + '/items';
1028
+ value: function getIDMItems(catalogId, serieId, typeNos) {
1029
+ return '/live/v3.0/catalogs/' + catalogId + '/series/' + serieId + '/items' + (typeNos !== null && typeNos !== void 0 && typeNos.length ? '?filter=' + typeNos.map(function (t) {
1030
+ return encodeURIComponent('typeNo==' + t);
1031
+ }).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');
1032
1032
  }
1033
1033
  }, {
1034
1034
  key: "getIDMItem",
@@ -1038,12 +1038,12 @@ var DivaApiHandler = /*#__PURE__*/function () {
1038
1038
  }, {
1039
1039
  key: "getIDMFeatures",
1040
1040
  value: function getIDMFeatures(catalogId, features) {
1041
- return '/live/v3.0/catalogs/' + catalogId + '/features' + '?featureNos=' + features.join(';');
1041
+ return '/live/v3.0/catalogs/' + catalogId + '/features' + '?featureNos=' + features.join(';') + (this.smSupplierNr ? '&supplierNo=' + this.smSupplierNr : '');
1042
1042
  }
1043
1043
  }, {
1044
1044
  key: "getIDMDecisions",
1045
1045
  value: function getIDMDecisions(catalogId, decisions) {
1046
- return '/live/v3.0/catalogs/' + catalogId + '/decisions' + '?decisionNos=' + decisions.join(';');
1046
+ return '/live/v3.0/catalogs/' + catalogId + '/decisions' + '?decisionNos=' + decisions.join(';') + (this.smSupplierNr ? '&supplierNo=' + this.smSupplierNr : '');
1047
1047
  }
1048
1048
  }, {
1049
1049
  key: "getIDMDetailInfos",
@@ -1211,7 +1211,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1211
1211
  case 9:
1212
1212
  _context10.prev = 9;
1213
1213
  _context10.t0 = _context10["catch"](4);
1214
- LOG$m.error(new DivaUtils.DivaError('Error Connecting to Support-Service-LivePlanner', {
1214
+ LOG$o.error(new DivaUtils.DivaError('Error Connecting to Support-Service-LivePlanner', {
1215
1215
  cause: _context10.t0
1216
1216
  }));
1217
1217
  case 12:
@@ -1258,7 +1258,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1258
1258
  case 10:
1259
1259
  _context11.prev = 10;
1260
1260
  _context11.t0 = _context11["catch"](3);
1261
- LOG$m.error({
1261
+ LOG$o.error({
1262
1262
  message: 'Could not fetch dimension',
1263
1263
  name: 'get dimension error'
1264
1264
  });
@@ -1337,7 +1337,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1337
1337
  case 14:
1338
1338
  _context12.prev = 14;
1339
1339
  _context12.t0 = _context12["catch"](6);
1340
- LOG$m.error(new DivaUtils.DivaError('Error Connecting to Report Service', {
1340
+ LOG$o.error(new DivaUtils.DivaError('Error Connecting to Report Service', {
1341
1341
  cause: _context12.t0
1342
1342
  }));
1343
1343
  case 17:
@@ -1861,6 +1861,7 @@ var CatalogPlannerArticleData = /*#__PURE__*/function () {
1861
1861
  }]);
1862
1862
  }();
1863
1863
 
1864
+ var LOG$n = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
1864
1865
  var OptionCatalogData = /*#__PURE__*/function () {
1865
1866
  function OptionCatalogData(opt, catalogData) {
1866
1867
  _classCallCheck__default["default"](this, OptionCatalogData);
@@ -1941,6 +1942,23 @@ var OptionCatalogData = /*#__PURE__*/function () {
1941
1942
  case 'CONTENT_ITEM':
1942
1943
  this.opt.contentItemId = prop.Value;
1943
1944
  break;
1945
+ case 'SendToPim':
1946
+ this.opt.sendToPIM = prop.Value == '1';
1947
+ break;
1948
+ case 'Multiselect':
1949
+ this.opt.isMultiselect = prop.Value == '1';
1950
+ break;
1951
+ case 'ION_COMMENT_TEXT':
1952
+ case 'SHOW_IN_BASKET_WHEN_HAS_PRICE':
1953
+ case 'FEATURE_TYPE':
1954
+ case 'EshopCategoryMapping':
1955
+ case 'EshopSearchRelevant':
1956
+ case 'IsSalesText':
1957
+ case 'IsArtName':
1958
+ break;
1959
+ default:
1960
+ LOG$n.debug('implement mapping for these props for options: ' + prop.Codex);
1961
+ break;
1944
1962
  }
1945
1963
  }
1946
1964
  }
@@ -15962,6 +15980,7 @@ var ralClassics = [{
15962
15980
  rgb: '#7E8182'
15963
15981
  }];
15964
15982
 
15983
+ var LOG$m = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
15965
15984
  var OptionValueCatalogData = /*#__PURE__*/function () {
15966
15985
  function OptionValueCatalogData(opv, catalogData) {
15967
15986
  var _this = this;
@@ -16085,8 +16104,21 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16085
16104
  };
16086
16105
  });
16087
16106
  break;
16107
+ case 'PIMFlatValues':
16108
+ this.opv.isPIMFlatValue = prop.Value == '1';
16109
+ break;
16110
+ case 'IsVariantAttribute':
16111
+ this.opv.isVariantAttribute = prop.Value == '1';
16112
+ break;
16113
+ case 'ION_COMMENT_TEXT':
16114
+ case 'EshopCategoryMapping':
16115
+ case 'TopFilterAttribute':
16116
+ case 'PriceTageRelevant':
16117
+ case 'IsArtName':
16118
+ break;
16088
16119
  default:
16089
16120
  if (key.includes('__')) break;
16121
+ LOG$m.debug('implement mapping for these props for optionValue: ' + prop.Codex);
16090
16122
  var values_locales = [];
16091
16123
  if (prop.Value_locales) {
16092
16124
  var _prop$Value_locales;
@@ -16382,6 +16414,16 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16382
16414
  get: function get() {
16383
16415
  return this.opv.addToMeasure;
16384
16416
  }
16417
+ }, {
16418
+ key: "isPIMFlatValue",
16419
+ get: function get() {
16420
+ return this.opv.isPIMFlatValue;
16421
+ }
16422
+ }, {
16423
+ key: "isVariantAttribute",
16424
+ get: function get() {
16425
+ return this.opv.isVariantAttribute;
16426
+ }
16385
16427
  }]);
16386
16428
  }();
16387
16429
 
@@ -16523,6 +16565,16 @@ var CatalogArticleData = /*#__PURE__*/function () {
16523
16565
  get: function get() {
16524
16566
  return this._catalogArticle.contentItemId;
16525
16567
  }
16568
+ }, {
16569
+ key: "featureProperties",
16570
+ get: function get() {
16571
+ return this._catalogArticle.featureProperties;
16572
+ }
16573
+ }, {
16574
+ key: "optionProperties",
16575
+ get: function get() {
16576
+ return this._catalogArticle.optionProperties;
16577
+ }
16526
16578
  }, {
16527
16579
  key: "groupContentItemId",
16528
16580
  get: function get() {
@@ -16756,7 +16808,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
16756
16808
  }, {
16757
16809
  key: "areOptionsToLoad",
16758
16810
  get: function get() {
16759
- return this._catalogArticle.articleType == 'FLAT' || this._catalogArticle.areOptionsLoaded;
16811
+ return !(this._catalogArticle.articleType == 'FLAT' || this._catalogArticle.areOptionsLoaded);
16760
16812
  }
16761
16813
  }, {
16762
16814
  key: "areOptionsLoaded",
@@ -18015,12 +18067,12 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
18015
18067
  }, {
18016
18068
  key: "isPIMFlatValue",
18017
18069
  get: function get() {
18018
- return this.opv.isPIMFlatValue;
18070
+ return this.opv.isPIMFlatValue || this.opv.catalogOPV.isPIMFlatValue;
18019
18071
  }
18020
18072
  }, {
18021
18073
  key: "isVariantAttribute",
18022
18074
  get: function get() {
18023
- return this.opv.isVariantAttribute;
18075
+ return this.opv.isVariantAttribute || this.opv.catalogOPV.isVariantAttribute;
18024
18076
  }
18025
18077
  }, {
18026
18078
  key: "setName",
@@ -18480,7 +18532,7 @@ function initArticleRelations(articleRelations, catalogArticleData, catalog) {
18480
18532
  catalog = myAcc.getCatalogData();
18481
18533
  }
18482
18534
  var _catalogArticle = catalog.getCatalogArticle(myAcc.Codex);
18483
- if (!_catalogArticle) continue;
18535
+ if (!_catalogArticle || _catalogArticle.isHidden) continue;
18484
18536
  catalogArticle.articleRelations.push({
18485
18537
  name: _catalogArticle.name,
18486
18538
  actQuantity: 0,
@@ -18808,196 +18860,277 @@ function getArticleOptionValueType(codex, jsonOPV, catalogOPV, myArticle, isPare
18808
18860
  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; }
18809
18861
  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__default["default"](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; }
18810
18862
  var LOG$j = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
18811
- function loadMoreFromIDMArticle(_x, _x2) {
18812
- return _loadMoreFromIDMArticle.apply(this, arguments);
18863
+ function loadMoreFromIDMArticles(_x, _x2) {
18864
+ return _loadMoreFromIDMArticles.apply(this, arguments);
18813
18865
  }
18814
- function _loadMoreFromIDMArticle() {
18815
- _loadMoreFromIDMArticle = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(catalogArticleData, set) {
18816
- var _catalogArticleData$d;
18817
- 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;
18818
- return _regeneratorRuntime__default["default"].wrap(function _callee$(_context4) {
18819
- while (1) switch (_context4.prev = _context4.next) {
18866
+ function _loadMoreFromIDMArticles() {
18867
+ _loadMoreFromIDMArticles = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(catalogArticleDatas, set) {
18868
+ 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;
18869
+ return _regeneratorRuntime__default["default"].wrap(function _callee$(_context5) {
18870
+ while (1) switch (_context5.prev = _context5.next) {
18820
18871
  case 0:
18821
- _context4.next = 2;
18822
- return set.api.getDataCache(set.api.getIDMItem(set.CatalogData.catalogGuid, set.CatalogData.serieId, catalogArticleData.articleCodex), undefined, undefined, 'enricher');
18872
+ _context5.next = 2;
18873
+ return set.api.getDataCache(set.api.getIDMItems(set.CatalogData.catalogGuid, set.CatalogData.serieId, catalogArticleDatas.map(function (a) {
18874
+ return a.articleCodex;
18875
+ })), undefined, undefined, 'enricher');
18823
18876
  case 2:
18824
- item = _context4.sent;
18825
- catalogArticleData.decisionsRefs = item.decisionRefs;
18826
- catalogArticleData.idmPartlist = item.partlist;
18827
- catalogArticleData.idmPrices = item.prices;
18828
- if (catalogArticleData.featureClassRefNo) {
18829
- _context4.next = 8;
18877
+ items = _context5.sent;
18878
+ _loop3 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop3() {
18879
+ var catalogArticleData, item;
18880
+ return _regeneratorRuntime__default["default"].wrap(function _loop3$(_context3) {
18881
+ while (1) switch (_context3.prev = _context3.next) {
18882
+ case 0:
18883
+ catalogArticleData = catalogArticleDatas[i];
18884
+ item = items.find(function (i) {
18885
+ return catalogArticleData.articleCodex == i.typeNo;
18886
+ });
18887
+ if (item) {
18888
+ _context3.next = 4;
18889
+ break;
18890
+ }
18891
+ throw new Error('Item ' + catalogArticleData.articleCodex + ' not found');
18892
+ case 4:
18893
+ catalogArticleData.decisionsRefs = item.decisionRefs;
18894
+ catalogArticleData.idmPartlist = item.partlist;
18895
+ catalogArticleData.idmPrices = item.prices;
18896
+ //optionalAdditionalItems
18897
+ //mandatoryAdditionalItems
18898
+ case 7:
18899
+ case "end":
18900
+ return _context3.stop();
18901
+ }
18902
+ }, _loop3);
18903
+ });
18904
+ i = 0;
18905
+ case 5:
18906
+ if (!(i < catalogArticleDatas.length)) {
18907
+ _context5.next = 10;
18830
18908
  break;
18831
18909
  }
18832
- return _context4.abrupt("return");
18833
- case 8:
18834
- catalogArticleData.priceGroup;
18835
- neededDecisionsIdWithoutPartlistdecisions = _toConsumableArray__default["default"](new Set([].concat(_toConsumableArray__default["default"](set.CatalogData.globalDecisions.map(function (g) {
18836
- return g.decisionNo;
18837
- })), _toConsumableArray__default["default"]((_catalogArticleData$d = catalogArticleData.decisionsRefs) !== null && _catalogArticleData$d !== void 0 ? _catalogArticleData$d : []))));
18838
- neededDecisionsId = _toConsumableArray__default["default"](new Set([].concat(_toConsumableArray__default["default"](neededDecisionsIdWithoutPartlistdecisions), _toConsumableArray__default["default"](catalogArticleData.idmPartlistDecisions))));
18839
- toLoadDecisionIds = [];
18840
- loadedDecisions = [];
18841
- for (i = 0; i < neededDecisionsId.length; i++) {
18842
- found = set.CatalogData.getDecisionByNo(neededDecisionsId[i]);
18843
- if (found) {
18844
- loadedDecisions.push(found);
18845
- } else {
18846
- toLoadDecisionIds.push(neededDecisionsId[i]);
18847
- }
18848
- }
18849
- neededPriceFeatureGroupNos = catalogArticleData.priceFeatureGroupNos;
18850
- toLoadPriceFeatureGroups = [];
18851
- loadedPriceFeatureGroups = [];
18852
- for (_i = 0; _i < neededPriceFeatureGroupNos.length; _i++) {
18853
- _found = set.CatalogData.getPricefeaturegroup(neededPriceFeatureGroupNos[_i]);
18854
- if (_found) {
18855
- loadedPriceFeatureGroups.push(_found);
18856
- } else {
18857
- toLoadPriceFeatureGroups.push(neededPriceFeatureGroupNos[_i]);
18858
- }
18859
- }
18860
- 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];
18861
- _context4.next = 21;
18910
+ return _context5.delegateYield(_loop3(), "t0", 7);
18911
+ case 7:
18912
+ i++;
18913
+ _context5.next = 5;
18914
+ break;
18915
+ case 10:
18916
+ toLoadDecisionIds = getToLoadDecisionIds(catalogArticleDatas, set);
18917
+ toLoadPFGroups = getPriceFeatureGroups(catalogArticleDatas, set);
18918
+ toLoadFeatureClassRefNo = _toConsumableArray__default["default"](new Set(catalogArticleDatas.filter(function (a) {
18919
+ return a.featureClassRefNo !== undefined;
18920
+ }).map(function (a) {
18921
+ return a.featureClassRefNo;
18922
+ })));
18923
+ 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];
18924
+ _context5.next = 16;
18862
18925
  return Promise.all(promises);
18863
- case 21:
18864
- _yield$Promise$all = _context4.sent;
18926
+ case 16:
18927
+ _yield$Promise$all = _context5.sent;
18865
18928
  _yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 3);
18866
18929
  featureClasses = _yield$Promise$all2[0];
18867
18930
  priceFeatureGroups = _yield$Promise$all2[1];
18868
18931
  decisions = _yield$Promise$all2[2];
18869
18932
  if (decisions) {
18870
- for (_i2 = 0; _i2 < decisions.length; _i2++) {
18871
- set.CatalogData.loadedDecisions.push(initializeDecision(decisions[_i2], set.CatalogData.idmOptionGroups));
18933
+ for (_i4 = 0; _i4 < decisions.length; _i4++) {
18934
+ set.CatalogData.loadedDecisions.push(initializeDecision(decisions[_i4], set.CatalogData.idmOptionGroups));
18872
18935
  }
18873
18936
  }
18874
18937
  if (!(toLoadDecisionIds.length !== 0 && toLoadDecisionIds.length != (decisions === null || decisions === void 0 ? void 0 : decisions.length))) {
18875
- _context4.next = 29;
18938
+ _context5.next = 24;
18876
18939
  break;
18877
18940
  }
18878
18941
  throw new Error('loading decisions failed');
18879
- case 29:
18942
+ case 24:
18880
18943
  if (priceFeatureGroups) {
18881
- for (_i3 = 0; _i3 < priceFeatureGroups.length; _i3++) {
18882
- set.CatalogData.loadedPriceFeaturegroups.push(initializePriceFeatureGroups(priceFeatureGroups[_i3], set.CatalogData.idmOptionGroups));
18944
+ for (_i5 = 0; _i5 < priceFeatureGroups.length; _i5++) {
18945
+ set.CatalogData.loadedPriceFeaturegroups.push(initializePriceFeatureGroups(priceFeatureGroups[_i5], set.CatalogData.idmOptionGroups));
18883
18946
  }
18884
18947
  }
18885
- catalogArticleData.articleIDMDecisions = sortDecisions(set.CatalogData.getDecisionsByNo(neededDecisionsIdWithoutPartlistdecisions));
18886
- neededFeatures = [];
18887
- if (featureClasses) {
18888
- for (_i4 = 0; _i4 < featureClasses.length; _i4++) {
18889
- featureClass = featureClasses[_i4];
18890
- set.CatalogData.loadedFeatureClasses.push(featureClass);
18891
- featureRefs = Object.keys(featureClass.featureRefs);
18892
- for (j = 0; j < featureRefs.length; j++) {
18893
- neededFeatures.push(featureRefs[j]);
18894
- }
18895
- }
18948
+ for (_i6 = 0; _i6 < catalogArticleDatas.length; _i6++) {
18949
+ catalogArticleData = catalogArticleDatas[_i6];
18950
+ catalogArticleData.articleIDMDecisions = sortDecisions(set.CatalogData.getDecisionsByNo(_toConsumableArray__default["default"](new Set([].concat(_toConsumableArray__default["default"](set.CatalogData.globalDecisions.map(function (g) {
18951
+ return g.decisionNo;
18952
+ })), _toConsumableArray__default["default"]((_catalogArticleData$d2 = catalogArticleData.decisionsRefs) !== null && _catalogArticleData$d2 !== void 0 ? _catalogArticleData$d2 : []))))));
18896
18953
  }
18897
- alreadyLoadedFeatures = set.CatalogData.loadedFeatures;
18898
- toLoadFeatures = [];
18899
- loadedFeatures = [];
18900
- _loop2 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop2(_i5) {
18901
- var found;
18902
- return _regeneratorRuntime__default["default"].wrap(function _loop2$(_context3) {
18903
- while (1) switch (_context3.prev = _context3.next) {
18904
- case 0:
18905
- found = alreadyLoadedFeatures.find(function (f) {
18906
- return f.featureNo == neededFeatures[_i5];
18907
- });
18908
- if (found) {
18909
- loadedFeatures.push(found);
18910
- } else {
18911
- toLoadFeatures.push(neededFeatures[_i5]);
18912
- }
18913
- case 2:
18914
- case "end":
18915
- return _context3.stop();
18916
- }
18917
- }, _loop2);
18954
+ featureClasses.map(function (fc) {
18955
+ return set.CatalogData.loadedFeatureClasses.push(fc);
18918
18956
  });
18919
- _i5 = 0;
18920
- case 38:
18921
- if (!(_i5 < neededFeatures.length)) {
18922
- _context4.next = 43;
18923
- break;
18924
- }
18925
- return _context4.delegateYield(_loop2(_i5), "t0", 40);
18926
- case 40:
18927
- _i5++;
18928
- _context4.next = 38;
18929
- break;
18930
- case 43:
18957
+ toLoadFeatures = getFeatures(set, featureClasses);
18931
18958
  if (!toLoadFeatures.length) {
18932
- _context4.next = 54;
18959
+ _context5.next = 39;
18933
18960
  break;
18934
18961
  }
18935
- _context4.next = 46;
18962
+ _context5.next = 31;
18936
18963
  return set.api.getDataCache(set.api.getIDMFeatures(set.CatalogData.catalogGuid, toLoadFeatures), undefined, undefined, 'enricher');
18937
- case 46:
18938
- _features = _context4.sent;
18939
- _loop3 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop3() {
18940
- var feature, _loop4, _j;
18941
- return _regeneratorRuntime__default["default"].wrap(function _loop3$(_context2) {
18964
+ case 31:
18965
+ features = _context5.sent;
18966
+ _loop4 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop4() {
18967
+ var feature, _loop5, j;
18968
+ return _regeneratorRuntime__default["default"].wrap(function _loop4$(_context2) {
18942
18969
  while (1) switch (_context2.prev = _context2.next) {
18943
18970
  case 0:
18944
- feature = _features[_i6];
18971
+ feature = features[_i7];
18945
18972
  set.CatalogData.loadedFeatures.push(feature);
18946
- _loop4 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop4(_j) {
18947
- return _regeneratorRuntime__default["default"].wrap(function _loop4$(_context) {
18973
+ _loop5 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop5(j) {
18974
+ return _regeneratorRuntime__default["default"].wrap(function _loop5$(_context) {
18948
18975
  while (1) switch (_context.prev = _context.next) {
18949
18976
  case 0:
18950
18977
  if (!set.CatalogData.loadedOptions.find(function (o) {
18951
- return o.optionKey == feature.options[_j].optionKey;
18978
+ return o.optionKey == feature.options[j].optionKey;
18952
18979
  })) {
18953
- set.CatalogData.loadedOptions.push(feature.options[_j]);
18980
+ set.CatalogData.loadedOptions.push(feature.options[j]);
18954
18981
  }
18955
18982
  case 1:
18956
18983
  case "end":
18957
18984
  return _context.stop();
18958
18985
  }
18959
- }, _loop4);
18986
+ }, _loop5);
18960
18987
  });
18961
- _j = 0;
18988
+ j = 0;
18962
18989
  case 4:
18963
- if (!(_j < feature.options.length)) {
18990
+ if (!(j < feature.options.length)) {
18964
18991
  _context2.next = 9;
18965
18992
  break;
18966
18993
  }
18967
- return _context2.delegateYield(_loop4(_j), "t0", 6);
18994
+ return _context2.delegateYield(_loop5(j), "t0", 6);
18968
18995
  case 6:
18969
- _j++;
18996
+ j++;
18970
18997
  _context2.next = 4;
18971
18998
  break;
18972
18999
  case 9:
18973
19000
  case "end":
18974
19001
  return _context2.stop();
18975
19002
  }
18976
- }, _loop3);
19003
+ }, _loop4);
18977
19004
  });
18978
- _i6 = 0;
18979
- case 49:
18980
- if (!(_i6 < _features.length)) {
18981
- _context4.next = 54;
19005
+ _i7 = 0;
19006
+ case 34:
19007
+ if (!(_i7 < features.length)) {
19008
+ _context5.next = 39;
18982
19009
  break;
18983
19010
  }
18984
- return _context4.delegateYield(_loop3(), "t1", 51);
18985
- case 51:
18986
- _i6++;
18987
- _context4.next = 49;
19011
+ return _context5.delegateYield(_loop4(), "t1", 36);
19012
+ case 36:
19013
+ _i7++;
19014
+ _context5.next = 34;
18988
19015
  break;
18989
- case 54:
18990
- features = set.CatalogData.getFeatures(neededFeatures);
18991
- for (_i7 = 0; _i7 < features.length; _i7++) initFeature(features[_i7], catalogArticleData, set);
18992
- catalogArticleData.areOptionsLoaded = true;
18993
- case 57:
19016
+ case 39:
19017
+ _loop6 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop6() {
19018
+ var catalogArticleData, featureClass, features, j;
19019
+ return _regeneratorRuntime__default["default"].wrap(function _loop6$(_context4) {
19020
+ while (1) switch (_context4.prev = _context4.next) {
19021
+ case 0:
19022
+ catalogArticleData = catalogArticleDatas[_i8];
19023
+ featureClass = featureClasses.find(function (fc) {
19024
+ return fc.featureClassNo == catalogArticleData.featureClassRefNo;
19025
+ });
19026
+ if (featureClass) {
19027
+ _context4.next = 4;
19028
+ break;
19029
+ }
19030
+ throw new Error('featureClassRefNo ' + catalogArticleData.featureClassRefNo + ' not found');
19031
+ case 4:
19032
+ features = set.CatalogData.getFeatures(getFeaturesByFeatureClass(featureClass));
19033
+ for (j = 0; j < features.length; j++) {
19034
+ initFeature(features[j], catalogArticleData, set);
19035
+ }
19036
+ case 6:
19037
+ case "end":
19038
+ return _context4.stop();
19039
+ }
19040
+ }, _loop6);
19041
+ });
19042
+ _i8 = 0;
19043
+ case 41:
19044
+ if (!(_i8 < catalogArticleDatas.length)) {
19045
+ _context5.next = 46;
19046
+ break;
19047
+ }
19048
+ return _context5.delegateYield(_loop6(), "t2", 43);
19049
+ case 43:
19050
+ _i8++;
19051
+ _context5.next = 41;
19052
+ break;
19053
+ case 46:
19054
+ catalogArticleDatas.map(function (c) {
19055
+ return c.areOptionsLoaded = true;
19056
+ });
19057
+ case 47:
18994
19058
  case "end":
18995
- return _context4.stop();
19059
+ return _context5.stop();
18996
19060
  }
18997
19061
  }, _callee);
18998
19062
  }));
18999
- return _loadMoreFromIDMArticle.apply(this, arguments);
19063
+ return _loadMoreFromIDMArticles.apply(this, arguments);
19000
19064
  }
19065
+ var getToLoadDecisionIds = function getToLoadDecisionIds(catalogArticleDatas, set) {
19066
+ var allArticleDecisions = [];
19067
+ for (var i = 0; i < catalogArticleDatas.length; i++) {
19068
+ var _catalogArticleData$i, _catalogArticleData$d;
19069
+ var catalogArticleData = catalogArticleDatas[i];
19070
+ allArticleDecisions = [].concat(_toConsumableArray__default["default"](allArticleDecisions), _toConsumableArray__default["default"]((_catalogArticleData$i = catalogArticleData.idmPartlistDecisions) !== null && _catalogArticleData$i !== void 0 ? _catalogArticleData$i : []), _toConsumableArray__default["default"]((_catalogArticleData$d = catalogArticleData.decisionsRefs) !== null && _catalogArticleData$d !== void 0 ? _catalogArticleData$d : []));
19071
+ }
19072
+ var neededDecisionsIds = _toConsumableArray__default["default"](new Set([].concat(_toConsumableArray__default["default"](set.CatalogData.globalDecisions.map(function (g) {
19073
+ return g.decisionNo;
19074
+ })), _toConsumableArray__default["default"](allArticleDecisions))));
19075
+ var toLoadDecisionIds = [];
19076
+ for (var _i = 0; _i < neededDecisionsIds.length; _i++) {
19077
+ var found = set.CatalogData.getDecisionByNo(neededDecisionsIds[_i]);
19078
+ if (found) ; else {
19079
+ toLoadDecisionIds.push(neededDecisionsIds[_i]);
19080
+ }
19081
+ }
19082
+ return toLoadDecisionIds;
19083
+ };
19084
+ var getFeatures = function getFeatures(set, featureClasses) {
19085
+ var neededFeatures = [];
19086
+ for (var i = 0; i < featureClasses.length; i++) {
19087
+ var featureClass = featureClasses[i];
19088
+ neededFeatures = [].concat(_toConsumableArray__default["default"](neededFeatures), _toConsumableArray__default["default"](getFeaturesByFeatureClass(featureClass)));
19089
+ }
19090
+ neededFeatures = _toConsumableArray__default["default"](new Set(neededFeatures)); // remove duplicates
19091
+ var alreadyLoadedFeatures = set.CatalogData.loadedFeatures;
19092
+ var toLoadFeatures = [];
19093
+ var loadedFeatures = [];
19094
+ var _loop = function _loop(_i2) {
19095
+ var found = alreadyLoadedFeatures.find(function (f) {
19096
+ return f.featureNo == neededFeatures[_i2];
19097
+ });
19098
+ if (found) {
19099
+ loadedFeatures.push(found);
19100
+ } else {
19101
+ toLoadFeatures.push(neededFeatures[_i2]);
19102
+ }
19103
+ };
19104
+ for (var _i2 = 0; _i2 < neededFeatures.length; _i2++) {
19105
+ _loop(_i2);
19106
+ }
19107
+ LOG$j.debug('features already loaded dont get again from api: ' + loadedFeatures.length);
19108
+ return toLoadFeatures;
19109
+ };
19110
+ var getFeaturesByFeatureClass = function getFeaturesByFeatureClass(featureClass) {
19111
+ var neededFeatures = [];
19112
+ var featureRefs = Object.keys(featureClass.featureRefs);
19113
+ for (var j = 0; j < featureRefs.length; j++) {
19114
+ neededFeatures.push(featureRefs[j]);
19115
+ }
19116
+ return neededFeatures;
19117
+ };
19118
+ var getPriceFeatureGroups = function getPriceFeatureGroups(catalogArticleDatas, set) {
19119
+ var neededPriceFeatureGroupNos = [];
19120
+ for (var i = 0; i < catalogArticleDatas.length; i++) {
19121
+ var _catalogArticleDatas$;
19122
+ neededPriceFeatureGroupNos = [].concat(_toConsumableArray__default["default"](neededPriceFeatureGroupNos), _toConsumableArray__default["default"]((_catalogArticleDatas$ = catalogArticleDatas[i].priceFeatureGroupNos) !== null && _catalogArticleDatas$ !== void 0 ? _catalogArticleDatas$ : []));
19123
+ }
19124
+ var toLoadPriceFeatureGroups = [];
19125
+ neededPriceFeatureGroupNos = _toConsumableArray__default["default"](new Set(neededPriceFeatureGroupNos));
19126
+ for (var _i3 = 0; _i3 < neededPriceFeatureGroupNos.length; _i3++) {
19127
+ var found = set.CatalogData.getPricefeaturegroup(neededPriceFeatureGroupNos[_i3]);
19128
+ if (found) ; else {
19129
+ toLoadPriceFeatureGroups.push(neededPriceFeatureGroupNos[_i3]);
19130
+ }
19131
+ }
19132
+ return toLoadPriceFeatureGroups;
19133
+ };
19001
19134
  var initializeDecision = function initializeDecision(decision, idmOptionGroups) {
19002
19135
  var _decision$optionCombi;
19003
19136
  var optionCombinations = (_decision$optionCombi = decision.optionCombinations) === null || _decision$optionCombi === void 0 ? void 0 : _decision$optionCombi.map(function (c) {
@@ -19129,12 +19262,15 @@ function getCatalogFeatureType(feature, catalogArticleData, set) {
19129
19262
  };
19130
19263
  }
19131
19264
  function getArticleFeatureType(feature, catalogArticleData, catOPT, set) {
19132
- var _set$CatalogData$tabG;
19265
+ var _catalogArticleData$f, _set$CatalogData$tabG;
19266
+ var props = (_catalogArticleData$f = catalogArticleData.featureProperties) === null || _catalogArticleData$f === void 0 ? void 0 : _catalogArticleData$f.filter(function (p) {
19267
+ return p.FeatureNos.includes(feature.featureNo);
19268
+ });
19133
19269
  var featureClass = set.CatalogData.getFeatureClass(catalogArticleData.featureClassRefNo);
19134
19270
  var tabgroup = (_set$CatalogData$tabG = set.CatalogData.tabGroups) === null || _set$CatalogData$tabG === void 0 ? void 0 : _set$CatalogData$tabG.find(function (t) {
19135
19271
  return t.featureNos.includes(feature.featureNo);
19136
19272
  });
19137
- return {
19273
+ var opt = {
19138
19274
  codex: feature.featureNo,
19139
19275
  catalogOPT: catOPT,
19140
19276
  articleOptionValues: {},
@@ -19146,6 +19282,22 @@ function getArticleFeatureType(feature, catalogArticleData, catOPT, set) {
19146
19282
  tabGroup: tabgroup !== null && tabgroup !== void 0 && tabgroup.name ? DivaUtils__default["default"].getLocals(tabgroup.name, set.api.getLanguage()) : undefined,
19147
19283
  tabGroup_locales: tabgroup === null || tabgroup === void 0 ? void 0 : tabgroup.name
19148
19284
  };
19285
+ if (props !== null && props !== void 0 && props.length) {
19286
+ for (var i = 0; i < props.length; i++) {
19287
+ var prop = props[i];
19288
+ switch (prop.Codex) {
19289
+ case 'IsVariantAttribute': // ist in den daten?!
19290
+ case 'TopFilterAttribute':
19291
+ case 'PriceTageRelevant':
19292
+ case 'EshopCategoryMapping':
19293
+ case 'IsArtName':
19294
+ break;
19295
+ default:
19296
+ LOG$j.debug('implement mapping for these props for options: ' + prop.Codex);
19297
+ }
19298
+ }
19299
+ }
19300
+ return opt;
19149
19301
  }
19150
19302
 
19151
19303
  //option in IDM language so in Diva World its OptionValue
@@ -19153,17 +19305,17 @@ function initOption(feature, articleFeature, catalogArticle, set) {
19153
19305
  var options = feature.options;
19154
19306
  var allOptionsOfFeature = {};
19155
19307
  //Items initalisieren
19156
- var _loop = function _loop() {
19308
+ var _loop2 = function _loop2() {
19157
19309
  var option = options[j];
19158
19310
  var catOption = set.CatalogData.getOptionValues().find(function (o) {
19159
19311
  return o.codex == option.optionKey;
19160
19312
  });
19161
19313
  if (!catOption) catOption = getCatalogOptionType(option, set);
19162
- var articleIDMOption = new ArticleOptionValueData(getArticleOption(option, catOption, articleFeature));
19314
+ var articleIDMOption = new ArticleOptionValueData(getArticleOption(option, catOption, articleFeature, catalogArticle));
19163
19315
  allOptionsOfFeature[articleIDMOption.codex] = articleIDMOption;
19164
19316
  };
19165
19317
  for (var j = 0; j < options.length; j++) {
19166
- _loop();
19318
+ _loop2();
19167
19319
  }
19168
19320
  articleFeature.initOPVsInOPT(allOptionsOfFeature);
19169
19321
  catalogArticle.articleOptions[articleFeature.codex];
@@ -19230,7 +19382,12 @@ function getCatalogOptionType(option, set) {
19230
19382
  }
19231
19383
  return new OptionValueCatalogData(opiton, catalogData);
19232
19384
  }
19233
- function getArticleOption(option, catalogOption, feature) {
19385
+ function getArticleOption(option, catalogOption, feature, catalogArticleData) {
19386
+ var _catalogArticleData$o;
19387
+ var props = (_catalogArticleData$o = catalogArticleData.optionProperties) === null || _catalogArticleData$o === void 0 ? void 0 : _catalogArticleData$o.filter(function (p) {
19388
+ return p.OptionKeys.includes(option.optionKey);
19389
+ });
19390
+ //TODO add these props that are articleSpecific
19234
19391
  var opv = {
19235
19392
  codex: option.optionKey,
19236
19393
  catalogOPV: catalogOption,
@@ -19240,6 +19397,23 @@ function getArticleOption(option, catalogOption, feature) {
19240
19397
  price: 0,
19241
19398
  quantity: 1
19242
19399
  };
19400
+ if (props !== null && props !== void 0 && props.length) {
19401
+ for (var i = 0; i < props.length; i++) {
19402
+ var prop = props[i];
19403
+ switch (prop.Codex) {
19404
+ case 'IsVariantAttribute':
19405
+ opv.isVariantAttribute = prop.Value == '1';
19406
+ break;
19407
+ case 'EshopCategoryMapping':
19408
+ case 'TopFilterAttribute':
19409
+ case 'PriceTageRelevant':
19410
+ case 'IsArtName':
19411
+ break;
19412
+ default:
19413
+ LOG$j.debug('implement mapping for these props for options: ' + prop.Codex);
19414
+ }
19415
+ }
19416
+ }
19243
19417
  return opv;
19244
19418
  }
19245
19419
  function componentToHex(c) {
@@ -19284,7 +19458,6 @@ function initIDMCatalogData(serie, orderSet, api) {
19284
19458
  //retailArticleNr: json.RetailArticleNr,
19285
19459
  //additionalCatalogPrice: json.AdditionalCatalogPrice,
19286
19460
  //additionalCatalogPriceText: json.AdditionalCatalogPriceText,
19287
- //mainCategory: json.MainCategory ?? json.Name,
19288
19461
  //digits: json.Digits,
19289
19462
  supplierILN: catalog.glnNo,
19290
19463
  // SupplierILN des Herstellers des Katalogs
@@ -19323,6 +19496,9 @@ function initIDMArticles(jsonItems, catalogData) {
19323
19496
  function getCatalogArticle(article, catalogData) {
19324
19497
  var _catalogData$catalogM, _articleMask$name, _articleMask$properti, _article$weightNetto, _article$detailInfos, _article$detailInfos2;
19325
19498
  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];
19499
+ var lang = catalogData.api.getLanguageLowercase();
19500
+ var featureProperties = convertProperties(article.properties, lang, 'featureNos');
19501
+ var optionProperties = convertProperties(article.properties, lang, 'optionKeys');
19326
19502
  return {
19327
19503
  areOptionsLoaded: false,
19328
19504
  arePricesLoaded: false,
@@ -19341,12 +19517,14 @@ function getCatalogArticle(article, catalogData) {
19341
19517
  hasArticleRelations: false,
19342
19518
  hasPartlistArticle: !!article.partListRef,
19343
19519
  hasType1Dependencies: false,
19344
- name: DivaUtils__default["default"].getLocals((_articleMask$name = articleMask === null || articleMask === void 0 ? void 0 : articleMask.name) !== null && _articleMask$name !== void 0 ? _articleMask$name : article.shortText, catalogData.api.getLanguageLowercase()),
19345
- longDescription: DivaUtils__default["default"].getLocals(article.fullText, catalogData.api.getLanguageLowercase()),
19520
+ name: DivaUtils__default["default"].getLocals((_articleMask$name = articleMask === null || articleMask === void 0 ? void 0 : articleMask.name) !== null && _articleMask$name !== void 0 ? _articleMask$name : article.shortText, lang),
19521
+ longDescription: DivaUtils__default["default"].getLocals(article.fullText, lang),
19346
19522
  longDescription_locales: article.fullText,
19347
19523
  isHidden: !!(articleMask !== null && articleMask !== void 0 && articleMask.hidden),
19348
- origName: DivaUtils__default["default"].getLocals(article.shortText, catalogData.api.getLanguageLowercase()),
19349
- properties: [].concat(_toConsumableArray__default["default"](convertProperties(article.properties, catalogData.api.getLanguageLowercase())), _toConsumableArray__default["default"]((_articleMask$properti = articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties) !== null && _articleMask$properti !== void 0 ? _articleMask$properti : [])),
19524
+ origName: DivaUtils__default["default"].getLocals(article.shortText, lang),
19525
+ properties: [].concat(_toConsumableArray__default["default"](convertProperties(article.properties, lang)), _toConsumableArray__default["default"]((_articleMask$properti = articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties) !== null && _articleMask$properti !== void 0 ? _articleMask$properti : [])),
19526
+ optionProperties: optionProperties,
19527
+ featureProperties: featureProperties,
19350
19528
  articleType: article.featureClassRefNo === undefined ? 'FLAT' : 'OPTIONTREE',
19351
19529
  price: 0,
19352
19530
  featureClassRefNo: article.featureClassRefNo,
@@ -19396,13 +19574,34 @@ function getCatalogArticle(article, catalogData) {
19396
19574
  */
19397
19575
 
19398
19576
  function convertProperties() {
19577
+ var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
19578
+ var lang = arguments.length > 1 ? arguments[1] : undefined;
19579
+ var forCase = arguments.length > 2 ? arguments[2] : undefined;
19580
+ switch (forCase) {
19581
+ case 'featureNos':
19582
+ return mapProp(properties.filter(function (p) {
19583
+ var _p$featureNos;
19584
+ return (_p$featureNos = p.featureNos) === null || _p$featureNos === void 0 ? void 0 : _p$featureNos.length;
19585
+ }), lang);
19586
+ case 'optionKeys':
19587
+ return mapProp(properties.filter(function (p) {
19588
+ var _p$optionKeys;
19589
+ return (_p$optionKeys = p.optionKeys) === null || _p$optionKeys === void 0 ? void 0 : _p$optionKeys.length;
19590
+ }), lang);
19591
+ default:
19592
+ return mapProp(properties, lang);
19593
+ }
19594
+ }
19595
+ function mapProp() {
19399
19596
  var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
19400
19597
  var lang = arguments.length > 1 ? arguments[1] : undefined;
19401
19598
  return properties.map(function (p) {
19402
19599
  return {
19403
19600
  Value: DivaUtils__default["default"].getLocals(p.value, lang),
19404
19601
  Codex: p.key,
19405
- Name: DivaUtils__default["default"].getLocals(p.name, lang)
19602
+ Name: DivaUtils__default["default"].getLocals(p.name, lang),
19603
+ FeatureNos: p.featureNos,
19604
+ OptionKeys: p.optionKeys
19406
19605
  };
19407
19606
  });
19408
19607
  }
@@ -19676,7 +19875,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
19676
19875
  }, {
19677
19876
  key: "loadArticleData",
19678
19877
  value: function () {
19679
- var _loadArticleData = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(catalogArticle, set) {
19878
+ var _loadArticleData = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(catalogArticles, set) {
19879
+ var promises, i;
19680
19880
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
19681
19881
  while (1) switch (_context.prev = _context.next) {
19682
19882
  case 0:
@@ -19685,14 +19885,18 @@ var DivaCatalogData = /*#__PURE__*/function () {
19685
19885
  break;
19686
19886
  }
19687
19887
  _context.next = 3;
19688
- return loadMoreFromIDMArticle(catalogArticle, set);
19888
+ return loadMoreFromIDMArticles(catalogArticles, set);
19689
19889
  case 3:
19690
- _context.next = 7;
19890
+ _context.next = 9;
19691
19891
  break;
19692
19892
  case 5:
19693
- _context.next = 7;
19694
- return loadMoreFromDivaArticle(catalogArticle, set);
19695
- case 7:
19893
+ promises = [];
19894
+ for (i = 0; i < catalogArticles.length; i++) {
19895
+ promises.push(loadMoreFromDivaArticle(catalogArticles[i], set));
19896
+ }
19897
+ _context.next = 9;
19898
+ return Promise.all(promises);
19899
+ case 9:
19696
19900
  case "end":
19697
19901
  return _context.stop();
19698
19902
  }
@@ -20676,7 +20880,9 @@ var DivaCatalogData = /*#__PURE__*/function () {
20676
20880
  _this5.catalogProps.articleConfigAll = item.Value == '1';
20677
20881
  break;
20678
20882
  case 'AUTO_OPEN_CONTENTITEM':
20679
- _this5.catalogProps.autoOpenContentItem = item.Value == '1';
20883
+ _this5.catalogProps.autoOpenContentItem = item.Value == '1' ? true : item.Value.split(';').map(function (o) {
20884
+ return (!_this5.isIDMFormat ? 'OPT' : '') + o;
20885
+ });
20680
20886
  break;
20681
20887
  case 'HIDE_PRICE_GROUPS_OF_OPGS':
20682
20888
  _this5.catalogProps.hidePriceGroupsOfOPGs = item.Value == '1';
@@ -24529,12 +24735,13 @@ var DivaArticle = /*#__PURE__*/function () {
24529
24735
  }, {
24530
24736
  key: "hasOptionsThatParentDoesNotHave",
24531
24737
  get: function get() {
24532
- var _this$partListParentA, _this$partListParentA2;
24738
+ var _this$partListParentA;
24739
+ if (!this.partListParentArticle) return false;
24533
24740
  //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
24534
24741
  // first usecase https://app.asana.com/0/1204193128085691/1204389027061737
24535
24742
  var myOptions = this.articleOptionStatesKeys;
24536
- 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 : [];
24537
- return myOptions.find(function (o) {
24743
+ var parentsOptions = (_this$partListParentA = this.partListParentArticle.articleOptionStatesKeys) !== null && _this$partListParentA !== void 0 ? _this$partListParentA : [];
24744
+ return !!myOptions.find(function (o) {
24538
24745
  return !parentsOptions.includes(o);
24539
24746
  });
24540
24747
  }
@@ -24745,9 +24952,9 @@ var DivaArticle = /*#__PURE__*/function () {
24745
24952
  }, {
24746
24953
  key: "getVkPrice",
24747
24954
  get: function get() {
24748
- var _this$articlePrices$P, _this$articlePrices, _this$partListParentA3, _this$articlePrices$C, _this$articlePrices2, _this$partListParentA4, _this$articlePrices$P2, _this$articlePrices3, _this$partListParentA5;
24955
+ var _this$articlePrices$P, _this$articlePrices, _this$partListParentA2, _this$articlePrices$C, _this$articlePrices2, _this$partListParentA3, _this$articlePrices$P2, _this$articlePrices3, _this$partListParentA4;
24749
24956
  var bruttoPercentage = this.set.getBruttoPercentage();
24750
- return new basketModel.PriceObjectData(this.set.getBruttoPercentage(true) === undefined ? this.mainPrice : DivaUtils__default["default"].roundPrice(this.mainPrice * ((100 - this.set.getBruttoPercentage(true)) / 100), 1, 2), DivaUtils__default["default"].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);
24957
+ return new basketModel.PriceObjectData(this.set.getBruttoPercentage(true) === undefined ? this.mainPrice : DivaUtils__default["default"].roundPrice(this.mainPrice * ((100 - this.set.getBruttoPercentage(true)) / 100), 1, 2), DivaUtils__default["default"].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);
24751
24958
  }
24752
24959
  }, {
24753
24960
  key: "priceType",
@@ -25132,8 +25339,8 @@ var DivaArticle = /*#__PURE__*/function () {
25132
25339
  }, {
25133
25340
  key: "getReqursiveArticleOptionStates",
25134
25341
  value: function getReqursiveArticleOptionStates() {
25135
- var _this$partListParentA6, _this$partListParentA7, _this$partListParentA8, _this$partListParentA9, _this$accessoireParen3, _this$accessoireParen4, _this$accessoireParen5, _this$accessoireParen6;
25136
- return [].concat(_toConsumableArray__default["default"]((_this$partListParentA6 = (_this$partListParentA7 = this.partListParentArticle) === null || _this$partListParentA7 === void 0 ? void 0 : _this$partListParentA7.articleOptionStatesData) !== null && _this$partListParentA6 !== void 0 ? _this$partListParentA6 : []), _toConsumableArray__default["default"]((_this$partListParentA8 = (_this$partListParentA9 = this.partListParentArticle) === null || _this$partListParentA9 === void 0 ? void 0 : _this$partListParentA9.getReqursiveArticleOptionStates()) !== null && _this$partListParentA8 !== void 0 ? _this$partListParentA8 : []), _toConsumableArray__default["default"]((_this$accessoireParen3 = (_this$accessoireParen4 = this.accessoireParentArticle) === null || _this$accessoireParen4 === void 0 ? void 0 : _this$accessoireParen4.articleOptionStatesData) !== null && _this$accessoireParen3 !== void 0 ? _this$accessoireParen3 : []), _toConsumableArray__default["default"]((_this$accessoireParen5 = (_this$accessoireParen6 = this.accessoireParentArticle) === null || _this$accessoireParen6 === void 0 ? void 0 : _this$accessoireParen6.getReqursiveArticleOptionStates()) !== null && _this$accessoireParen5 !== void 0 ? _this$accessoireParen5 : []));
25342
+ var _this$partListParentA5, _this$partListParentA6, _this$partListParentA7, _this$partListParentA8, _this$accessoireParen3, _this$accessoireParen4, _this$accessoireParen5, _this$accessoireParen6;
25343
+ return [].concat(_toConsumableArray__default["default"]((_this$partListParentA5 = (_this$partListParentA6 = this.partListParentArticle) === null || _this$partListParentA6 === void 0 ? void 0 : _this$partListParentA6.articleOptionStatesData) !== null && _this$partListParentA5 !== void 0 ? _this$partListParentA5 : []), _toConsumableArray__default["default"]((_this$partListParentA7 = (_this$partListParentA8 = this.partListParentArticle) === null || _this$partListParentA8 === void 0 ? void 0 : _this$partListParentA8.getReqursiveArticleOptionStates()) !== null && _this$partListParentA7 !== void 0 ? _this$partListParentA7 : []), _toConsumableArray__default["default"]((_this$accessoireParen3 = (_this$accessoireParen4 = this.accessoireParentArticle) === null || _this$accessoireParen4 === void 0 ? void 0 : _this$accessoireParen4.articleOptionStatesData) !== null && _this$accessoireParen3 !== void 0 ? _this$accessoireParen3 : []), _toConsumableArray__default["default"]((_this$accessoireParen5 = (_this$accessoireParen6 = this.accessoireParentArticle) === null || _this$accessoireParen6 === void 0 ? void 0 : _this$accessoireParen6.getReqursiveArticleOptionStates()) !== null && _this$accessoireParen5 !== void 0 ? _this$accessoireParen5 : []));
25137
25344
  }
25138
25345
  }, {
25139
25346
  key: "getAllArticleOptionsStates",
@@ -25169,12 +25376,12 @@ var DivaArticle = /*#__PURE__*/function () {
25169
25376
  }, {
25170
25377
  key: "getArticleOptionState",
25171
25378
  value: function getArticleOptionState(codex, from, checkOnAccessoireParent) {
25172
- var _this$partListParentA10, _this$partListParentA11, _this$partlistArticle3;
25379
+ var _this$partListParentA9, _this$partListParentA10, _this$partlistArticle3;
25173
25380
  var firstMatch = this.articleOptionStatesData.find(function (ops) {
25174
25381
  return ops.optionCodex == codex;
25175
25382
  });
25176
25383
  if (firstMatch) return firstMatch;
25177
- 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)) {
25384
+ 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)) {
25178
25385
  return this.partListParentArticle.getArticleOptionState(codex, this.basketId, checkOnAccessoireParent);
25179
25386
  }
25180
25387
  if (Object.keys((_this$partlistArticle3 = this.partlistArticles) !== null && _this$partlistArticle3 !== void 0 ? _this$partlistArticle3 : {}).length > 0) {
@@ -25653,8 +25860,8 @@ var DivaArticle = /*#__PURE__*/function () {
25653
25860
  }, {
25654
25861
  key: "getBaseParent",
25655
25862
  value: function getBaseParent() {
25656
- var _ref2, _this$partListParentA12, _this$partListParentA13, _this$accessoireParen8;
25657
- 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;
25863
+ var _ref2, _this$partListParentA11, _this$partListParentA12, _this$accessoireParen8;
25864
+ 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;
25658
25865
  }
25659
25866
  }, {
25660
25867
  key: "checkArtCodexIsAccessoire",
@@ -25808,9 +26015,9 @@ var DivaArticle = /*#__PURE__*/function () {
25808
26015
  var array = _toConsumableArray__default["default"](evaluatedOrderCodex.matchAll(/\{(.*?)\}/g));
25809
26016
  var toRepace = [];
25810
26017
  for (var i = 0; i < array.length; i++) {
25811
- var _this$partListParentA14;
26018
+ var _this$partListParentA13;
25812
26019
  var expressions = array[i][1].split('.');
25813
- 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])) {
26020
+ 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])) {
25814
26021
  toRepace.push(eval('this' + (this.isPartListArticle ? '.partListParentArticle' : '') + ".getArticleOptionState('OPT'+expressions[0])[expressions[1]]"));
25815
26022
  } else {
25816
26023
  toRepace.push('___Option: "' + expressions[0] + '" not found!___');
@@ -26747,7 +26954,7 @@ var DivaArticle = /*#__PURE__*/function () {
26747
26954
  break;
26748
26955
  }
26749
26956
  _context.next = 4;
26750
- return Promise.resolve().then(function () { return require('./ShelfPlanner-2b2a83a7.js'); });
26957
+ return Promise.resolve().then(function () { return require('./ShelfPlanner-d5667b0a.js'); });
26751
26958
  case 4:
26752
26959
  _yield$import = _context.sent;
26753
26960
  ShelfPlanner = _yield$import["default"];
@@ -27497,16 +27704,18 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27497
27704
  value: //Initialisiert eventuell Option Tree und Infos im CatalogArticle
27498
27705
  function () {
27499
27706
  var _loadArticle = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(set, articleCodex, initParams) {
27500
- var _yield$this$preLoadAr, catalog, catalogArticle, newBasketId;
27707
+ var loadedObj, catalog, catalogArticle, newBasketId;
27501
27708
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
27502
27709
  while (1) switch (_context.prev = _context.next) {
27503
27710
  case 0:
27504
27711
  _context.next = 2;
27505
- return this.preLoadArticle(set, articleCodex, initParams);
27712
+ return this.preLoadArticles(set, [_objectSpread$d(_objectSpread$d({}, initParams), {}, {
27713
+ articleCodex: articleCodex
27714
+ })]);
27506
27715
  case 2:
27507
- _yield$this$preLoadAr = _context.sent;
27508
- catalog = _yield$this$preLoadAr.catalog;
27509
- catalogArticle = _yield$this$preLoadAr.catalogArticle;
27716
+ loadedObj = _context.sent;
27717
+ catalog = Object.values(loadedObj)[0].catalog;
27718
+ catalogArticle = Object.values(loadedObj)[0].loadedArticles[0];
27510
27719
  newBasketId = initParams.basketId ? initParams.basketId : 'B' + DivaUtils.nanoid();
27511
27720
  if (!catalogArticle) {
27512
27721
  _context.next = 10;
@@ -27534,86 +27743,126 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27534
27743
  return loadArticle;
27535
27744
  }() //loads all the calls for an article but does not create the article
27536
27745
  }, {
27537
- key: "preLoadArticle",
27746
+ key: "preLoadArticles",
27538
27747
  value: function () {
27539
- var _preLoadArticle = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(set, articleCodex, initParams) {
27540
- var catalog, _set$getSetState$acti, _set$getSetState$acti2, _set$getSetState$acti3, _set$getSetState$acti4, catalogArticle;
27541
- return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
27542
- while (1) switch (_context2.prev = _context2.next) {
27748
+ var _preLoadArticles = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(set, initParams) {
27749
+ 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;
27750
+ return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context3) {
27751
+ while (1) switch (_context3.prev = _context3.next) {
27543
27752
  case 0:
27544
- if (!(initParams.catalogCodex && initParams.catalogCodex !== set.CatalogData.catalogCodex)) {
27545
- _context2.next = 8;
27753
+ articlesToLoadGroupedByCatalogs = {};
27754
+ i = 0;
27755
+ case 2:
27756
+ if (!(i < initParams.length)) {
27757
+ _context3.next = 20;
27546
27758
  break;
27547
27759
  }
27548
- (_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);
27549
- _context2.next = 4;
27550
- return catalogHandlerInstance.getCatalogData(set.getSetState, initParams.catalogCodex, {
27760
+ initParam = initParams[i];
27761
+ catalog = void 0;
27762
+ catalogCodex = (_initParam$catalogCod = initParam.catalogCodex) !== null && _initParam$catalogCod !== void 0 ? _initParam$catalogCod : set.CatalogData.catalogCodex;
27763
+ if (!(catalogCodex != set.CatalogData.catalogCodex)) {
27764
+ _context3.next = 14;
27765
+ break;
27766
+ }
27767
+ (_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);
27768
+ _context3.next = 10;
27769
+ return catalogHandlerInstance.getCatalogData(set.getSetState, catalogCodex, {
27551
27770
  AccountGUID: set.CatalogData.accountGuid,
27552
27771
  AccountSessionGUID: set.CatalogData.accountSessionGuid
27553
27772
  });
27554
- case 4:
27555
- catalog = _context2.sent;
27556
- (_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);
27557
- _context2.next = 9;
27773
+ case 10:
27774
+ catalog = _context3.sent;
27775
+ (_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);
27776
+ _context3.next = 15;
27558
27777
  break;
27559
- case 8:
27560
- catalog = set.CatalogData;
27561
- case 9:
27562
- catalogArticle = catalog.getCatalogArticleByArticleCodex(articleCodex, set.onlyRunLogic); // hat catalogArticle Optionen welche noch nicht gealden wurden, erst laden!
27563
- //usecase der selbe Article wurde bereits verplant. nun kann die bereits geladene & verwendete Klasse catalogArticle wiederverwendet werden da wir dort nichts
27564
- //während der Konfiguration verändern!
27565
- if (!catalogArticle) {
27566
- _context2.next = 17;
27567
- break;
27568
- }
27569
- if (catalogArticle.areOptionsToLoad) {
27570
- _context2.next = 14;
27571
- break;
27572
- }
27573
- _context2.next = 14;
27574
- return catalog.loadArticleData(catalogArticle, set);
27575
27778
  case 14:
27576
- return _context2.abrupt("return", {
27779
+ catalog = set.CatalogData;
27780
+ case 15:
27781
+ if (!articlesToLoadGroupedByCatalogs[catalogCodex]) articlesToLoadGroupedByCatalogs[catalogCodex] = {
27782
+ toLoad: [],
27577
27783
  catalog: catalog,
27578
- catalogArticle: catalogArticle
27579
- });
27784
+ loadedArticles: []
27785
+ };
27786
+ articlesToLoadGroupedByCatalogs[catalogCodex].toLoad.push(initParam);
27580
27787
  case 17:
27581
- return _context2.abrupt("return", {
27582
- catalog: catalog,
27583
- catalogArticle: catalogArticle
27788
+ i++;
27789
+ _context3.next = 2;
27790
+ break;
27791
+ case 20:
27792
+ _loop = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop() {
27793
+ var articlesObj, catalog, articles, articlesToLoadMore;
27794
+ return _regeneratorRuntime__default["default"].wrap(function _loop$(_context2) {
27795
+ while (1) switch (_context2.prev = _context2.next) {
27796
+ case 0:
27797
+ articlesObj = articlesToLoadGroupedByCatalogs[key];
27798
+ catalog = articlesObj.catalog;
27799
+ articles = articlesObj.toLoad;
27800
+ articlesObj.loadedArticles = articles.map(function (a) {
27801
+ return catalog.getCatalogArticleByArticleCodex(a.articleCodex, set.onlyRunLogic);
27802
+ });
27803
+ // hat catalogArticle Optionen welche noch nicht gealden wurden, erst laden!
27804
+ //usecase der selbe Article wurde bereits verplant. nun kann die bereits geladene & verwendete Klasse catalogArticle wiederverwendet werden da wir dort nichts
27805
+ //während der Konfiguration verändern!
27806
+ articlesToLoadMore = articlesObj.loadedArticles.filter(function (a) {
27807
+ return a.areOptionsToLoad;
27808
+ });
27809
+ if (!articlesToLoadMore.length) {
27810
+ _context2.next = 8;
27811
+ break;
27812
+ }
27813
+ _context2.next = 8;
27814
+ return catalog.loadArticleData(articlesToLoadMore, set);
27815
+ case 8:
27816
+ case "end":
27817
+ return _context2.stop();
27818
+ }
27819
+ }, _loop);
27584
27820
  });
27585
- case 18:
27821
+ _context3.t0 = _regeneratorRuntime__default["default"].keys(articlesToLoadGroupedByCatalogs);
27822
+ case 22:
27823
+ if ((_context3.t1 = _context3.t0()).done) {
27824
+ _context3.next = 27;
27825
+ break;
27826
+ }
27827
+ key = _context3.t1.value;
27828
+ return _context3.delegateYield(_loop(), "t2", 25);
27829
+ case 25:
27830
+ _context3.next = 22;
27831
+ break;
27832
+ case 27:
27833
+ return _context3.abrupt("return", articlesToLoadGroupedByCatalogs);
27834
+ case 28:
27586
27835
  case "end":
27587
- return _context2.stop();
27836
+ return _context3.stop();
27588
27837
  }
27589
27838
  }, _callee2);
27590
27839
  }));
27591
- function preLoadArticle(_x4, _x5, _x6) {
27592
- return _preLoadArticle.apply(this, arguments);
27840
+ function preLoadArticles(_x4, _x5) {
27841
+ return _preLoadArticles.apply(this, arguments);
27593
27842
  }
27594
- return preLoadArticle;
27843
+ return preLoadArticles;
27595
27844
  }()
27596
27845
  }, {
27597
27846
  key: "updateAccessoireQuantity",
27598
27847
  value: function () {
27599
27848
  var _updateAccessoireQuantity = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(accessoire, newQuantity) {
27600
- return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context3) {
27601
- while (1) switch (_context3.prev = _context3.next) {
27849
+ return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context4) {
27850
+ while (1) switch (_context4.prev = _context4.next) {
27602
27851
  case 0:
27603
27852
  accessoire.quantity = newQuantity;
27604
27853
  if (!(accessoire.articleType == 'OPTION' || accessoire.articleType == 'OPTIONTREE')) {
27605
- _context3.next = 4;
27854
+ _context4.next = 4;
27606
27855
  break;
27607
27856
  }
27608
- _context3.next = 4;
27857
+ _context4.next = 4;
27609
27858
  return this.updateCfgValues(accessoire, {}, {});
27610
27859
  case 4:
27611
27860
  case "end":
27612
- return _context3.stop();
27861
+ return _context4.stop();
27613
27862
  }
27614
27863
  }, _callee3, this);
27615
27864
  }));
27616
- function updateAccessoireQuantity(_x7, _x8) {
27865
+ function updateAccessoireQuantity(_x6, _x7) {
27617
27866
  return _updateAccessoireQuantity.apply(this, arguments);
27618
27867
  }
27619
27868
  return updateAccessoireQuantity;
@@ -27622,32 +27871,32 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27622
27871
  key: "toDoAfterArticleLoaded",
27623
27872
  value: function () {
27624
27873
  var _toDoAfterArticleLoaded = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee4(article, defaultValues, variantValues, from, variantItems, ignorePlanner) {
27625
- return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context4) {
27626
- while (1) switch (_context4.prev = _context4.next) {
27874
+ return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context5) {
27875
+ while (1) switch (_context5.prev = _context5.next) {
27627
27876
  case 0:
27628
27877
  if (!(article.articleType == 'OPTION' || article.articleType == 'OPTIONTREE')) {
27629
- _context4.next = 8;
27878
+ _context5.next = 8;
27630
27879
  break;
27631
27880
  }
27632
- _context4.next = 3;
27881
+ _context5.next = 3;
27633
27882
  return this.initCfgValues(article, variantValues, variantItems);
27634
27883
  case 3:
27635
- _context4.next = 5;
27884
+ _context5.next = 5;
27636
27885
  return this.updateCfgValues(article, defaultValues, variantValues);
27637
27886
  case 5:
27638
27887
  if (!(article.set.PlannerMode !== 'BoxPlanner')) {
27639
- _context4.next = 8;
27888
+ _context5.next = 8;
27640
27889
  break;
27641
27890
  }
27642
- _context4.next = 8;
27891
+ _context5.next = 8;
27643
27892
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(article.set, defaultValues, [article.basketId], ignorePlanner, from);
27644
27893
  case 8:
27645
27894
  case "end":
27646
- return _context4.stop();
27895
+ return _context5.stop();
27647
27896
  }
27648
27897
  }, _callee4, this);
27649
27898
  }));
27650
- function toDoAfterArticleLoaded(_x9, _x10, _x11, _x12, _x13, _x14) {
27899
+ function toDoAfterArticleLoaded(_x8, _x9, _x10, _x11, _x12, _x13) {
27651
27900
  return _toDoAfterArticleLoaded.apply(this, arguments);
27652
27901
  }
27653
27902
  return toDoAfterArticleLoaded;
@@ -27668,8 +27917,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27668
27917
  value: function () {
27669
27918
  var _updateArticlesOptionStates = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee5(myValues, targetArticlesWithNewValues, targetArticlesToUpdate, articles, from) {
27670
27919
  var newEDOExtraArticles, partlistArticlesToLoad, valuesArray, i, actArticle, newPartlistArticlesToLoad, _actArticle$checkDefa, variantValues, triggerUpdate;
27671
- return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context5) {
27672
- while (1) switch (_context5.prev = _context5.next) {
27920
+ return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context6) {
27921
+ while (1) switch (_context6.prev = _context6.next) {
27673
27922
  case 0:
27674
27923
  newEDOExtraArticles = [];
27675
27924
  partlistArticlesToLoad = [];
@@ -27677,18 +27926,18 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27677
27926
  i = 0;
27678
27927
  case 4:
27679
27928
  if (!(i < targetArticlesToUpdate.length)) {
27680
- _context5.next = 36;
27929
+ _context6.next = 36;
27681
27930
  break;
27682
27931
  }
27683
27932
  valuesArray[i] = {};
27684
27933
  actArticle = articles[targetArticlesToUpdate[i]];
27685
27934
  if (!(!actArticle || actArticle.deleted)) {
27686
- _context5.next = 11;
27935
+ _context6.next = 11;
27687
27936
  break;
27688
27937
  }
27689
27938
  targetArticlesToUpdate.splice(i, 1);
27690
27939
  i--;
27691
- return _context5.abrupt("continue", 33);
27940
+ return _context6.abrupt("continue", 33);
27692
27941
  case 11:
27693
27942
  if (targetArticlesWithNewValues.includes(targetArticlesToUpdate[i])) {
27694
27943
  valuesArray[i] = actArticle.getValidValues(_objectSpread$d({}, myValues), actArticle.CatalogData.mergeOptionsToSameOption);
@@ -27696,61 +27945,61 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27696
27945
 
27697
27946
  //only set config if valuesArray are not empty or the article is initializing
27698
27947
  if (!(Object.entries(valuesArray[i]).length > 0 || from !== null && from !== void 0 && from.startsWith('initializing'))) {
27699
- _context5.next = 28;
27948
+ _context6.next = 28;
27700
27949
  break;
27701
27950
  }
27702
- _context5.next = 15;
27951
+ _context6.next = 15;
27703
27952
  return this.updateCfgValues(actArticle, valuesArray[i], {}, undefined, undefined, from == 'calcVariant');
27704
27953
  case 15:
27705
- newPartlistArticlesToLoad = _context5.sent;
27954
+ newPartlistArticlesToLoad = _context6.sent;
27706
27955
  _actArticle$checkDefa = actArticle.checkDefaultGlobalOpt(valuesArray[i]), variantValues = _actArticle$checkDefa.variantValues, triggerUpdate = _actArticle$checkDefa.triggerUpdate;
27707
27956
  valuesArray[i] = variantValues;
27708
- _context5.next = 20;
27957
+ _context6.next = 20;
27709
27958
  return this.updateAccessoriesFromGlobalOption(valuesArray[i], actArticle);
27710
27959
  case 20:
27711
27960
  if (!triggerUpdate) {
27712
- _context5.next = 24;
27961
+ _context6.next = 24;
27713
27962
  break;
27714
27963
  }
27715
- _context5.next = 23;
27964
+ _context6.next = 23;
27716
27965
  return this.updateCfgValues(actArticle, valuesArray[i], {}, undefined, undefined, from == 'calcVariant');
27717
27966
  case 23:
27718
- newPartlistArticlesToLoad = _context5.sent;
27967
+ newPartlistArticlesToLoad = _context6.sent;
27719
27968
  case 24:
27720
27969
  partlistArticlesToLoad = partlistArticlesToLoad.concat(newPartlistArticlesToLoad);
27721
27970
  newEDOExtraArticles = this.checkEDOArticles(articles);
27722
- _context5.next = 33;
27971
+ _context6.next = 33;
27723
27972
  break;
27724
27973
  case 28:
27725
- _context5.t0 = partlistArticlesToLoad;
27726
- _context5.next = 31;
27974
+ _context6.t0 = partlistArticlesToLoad;
27975
+ _context6.next = 31;
27727
27976
  return this.updateCfgValues(actArticle, {}, {}, undefined, undefined, from == 'calcVariant');
27728
27977
  case 31:
27729
- _context5.t1 = _context5.sent;
27730
- partlistArticlesToLoad = _context5.t0.concat.call(_context5.t0, _context5.t1);
27978
+ _context6.t1 = _context6.sent;
27979
+ partlistArticlesToLoad = _context6.t0.concat.call(_context6.t0, _context6.t1);
27731
27980
  case 33:
27732
27981
  i++;
27733
- _context5.next = 4;
27982
+ _context6.next = 4;
27734
27983
  break;
27735
27984
  case 36:
27736
- _context5.next = 38;
27985
+ _context6.next = 38;
27737
27986
  return this.triggerUpdateOnVisiblePartilstArticles(targetArticlesToUpdate, articles);
27738
27987
  case 38:
27739
- _context5.next = 40;
27988
+ _context6.next = 40;
27740
27989
  return this.triggerMoreUpdates(targetArticlesToUpdate, valuesArray, articles, from);
27741
27990
  case 40:
27742
- return _context5.abrupt("return", {
27991
+ return _context6.abrupt("return", {
27743
27992
  newEDOExtraArticles: newEDOExtraArticles,
27744
27993
  targetArticlesToUpdate: targetArticlesToUpdate,
27745
27994
  partlistArticlesToLoad: partlistArticlesToLoad
27746
27995
  });
27747
27996
  case 41:
27748
27997
  case "end":
27749
- return _context5.stop();
27998
+ return _context6.stop();
27750
27999
  }
27751
28000
  }, _callee5, this);
27752
28001
  }));
27753
- function updateArticlesOptionStates(_x15, _x16, _x17, _x18, _x19) {
28002
+ function updateArticlesOptionStates(_x14, _x15, _x16, _x17, _x18) {
27754
28003
  return _updateArticlesOptionStates.apply(this, arguments);
27755
28004
  }
27756
28005
  return updateArticlesOptionStates;
@@ -27760,42 +28009,42 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27760
28009
  value: function () {
27761
28010
  var _triggerMoreUpdates = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(targetArticlesToUpdate, valuesArray, articles, from) {
27762
28011
  var i, article;
27763
- return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context6) {
27764
- while (1) switch (_context6.prev = _context6.next) {
28012
+ return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context7) {
28013
+ while (1) switch (_context7.prev = _context7.next) {
27765
28014
  case 0:
27766
28015
  if (!(!targetArticlesToUpdate.length || from !== 'calcVariant')) {
27767
- _context6.next = 2;
28016
+ _context7.next = 2;
27768
28017
  break;
27769
28018
  }
27770
- return _context6.abrupt("return");
28019
+ return _context7.abrupt("return");
27771
28020
  case 2:
27772
28021
  i = 0;
27773
28022
  case 3:
27774
28023
  if (!(i < targetArticlesToUpdate.length)) {
27775
- _context6.next = 13;
28024
+ _context7.next = 13;
27776
28025
  break;
27777
28026
  }
27778
28027
  article = articles[targetArticlesToUpdate[i]];
27779
28028
  if (!(!article.CatalogData.isIDMFormat && (article.CatalogData.doubleClickOnConfig || article.hasType1Dependencies))) {
27780
- _context6.next = 10;
28029
+ _context7.next = 10;
27781
28030
  break;
27782
28031
  }
27783
- _context6.next = 8;
28032
+ _context7.next = 8;
27784
28033
  return this.updateCfgValues(article, valuesArray[i], {});
27785
28034
  case 8:
27786
- _context6.next = 10;
28035
+ _context7.next = 10;
27787
28036
  return this.updateCfgValues(article, valuesArray[i], {});
27788
28037
  case 10:
27789
28038
  i++;
27790
- _context6.next = 3;
28039
+ _context7.next = 3;
27791
28040
  break;
27792
28041
  case 13:
27793
28042
  case "end":
27794
- return _context6.stop();
28043
+ return _context7.stop();
27795
28044
  }
27796
28045
  }, _callee6, this);
27797
28046
  }));
27798
- function triggerMoreUpdates(_x20, _x21, _x22, _x23) {
28047
+ function triggerMoreUpdates(_x19, _x20, _x21, _x22) {
27799
28048
  return _triggerMoreUpdates.apply(this, arguments);
27800
28049
  }
27801
28050
  return triggerMoreUpdates;
@@ -27806,41 +28055,41 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27806
28055
  var _triggerUpdateOnVisiblePartilstArticles = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(targetArticlesToUpdate, articles) {
27807
28056
  var _articles$targetArtic;
27808
28057
  var key, configuredArticle, toIgnore, actArticle;
27809
- return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context7) {
27810
- while (1) switch (_context7.prev = _context7.next) {
28058
+ return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context8) {
28059
+ while (1) switch (_context8.prev = _context8.next) {
27811
28060
  case 0:
27812
28061
  if (!((_articles$targetArtic = articles[targetArticlesToUpdate[0]]) !== null && _articles$targetArtic !== void 0 && _articles$targetArtic.hasPartlistArticleVisibleInTree)) {
27813
- _context7.next = 13;
28062
+ _context8.next = 13;
27814
28063
  break;
27815
28064
  }
27816
- _context7.t0 = _regeneratorRuntime__default["default"].keys(articles);
28065
+ _context8.t0 = _regeneratorRuntime__default["default"].keys(articles);
27817
28066
  case 2:
27818
- if ((_context7.t1 = _context7.t0()).done) {
27819
- _context7.next = 13;
28067
+ if ((_context8.t1 = _context8.t0()).done) {
28068
+ _context8.next = 13;
27820
28069
  break;
27821
28070
  }
27822
- key = _context7.t1.value;
28071
+ key = _context8.t1.value;
27823
28072
  configuredArticle = articles[targetArticlesToUpdate[0]];
27824
28073
  toIgnore = configuredArticle.pushParentId();
27825
28074
  if (![configuredArticle.basketId].concat(_toConsumableArray__default["default"](toIgnore)).includes(key)) {
27826
- _context7.next = 8;
28075
+ _context8.next = 8;
27827
28076
  break;
27828
28077
  }
27829
- return _context7.abrupt("continue", 2);
28078
+ return _context8.abrupt("continue", 2);
27830
28079
  case 8:
27831
28080
  actArticle = articles[key];
27832
- _context7.next = 11;
28081
+ _context8.next = 11;
27833
28082
  return this.updateCfgValues(actArticle, {}, {});
27834
28083
  case 11:
27835
- _context7.next = 2;
28084
+ _context8.next = 2;
27836
28085
  break;
27837
28086
  case 13:
27838
28087
  case "end":
27839
- return _context7.stop();
28088
+ return _context8.stop();
27840
28089
  }
27841
28090
  }, _callee7, this);
27842
28091
  }));
27843
- function triggerUpdateOnVisiblePartilstArticles(_x24, _x25) {
28092
+ function triggerUpdateOnVisiblePartilstArticles(_x23, _x24) {
27844
28093
  return _triggerUpdateOnVisiblePartilstArticles.apply(this, arguments);
27845
28094
  }
27846
28095
  return triggerUpdateOnVisiblePartilstArticles;
@@ -27850,29 +28099,29 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27850
28099
  value: function () {
27851
28100
  var _updateAccessoriesFromGlobalOption = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(values, actArticle) {
27852
28101
  var accessoiresToUpdate, key;
27853
- return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
27854
- while (1) switch (_context8.prev = _context8.next) {
28102
+ return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context9) {
28103
+ while (1) switch (_context9.prev = _context9.next) {
27855
28104
  case 0:
27856
28105
  accessoiresToUpdate = actArticle.getAccessoriesToChangeFromGlobalOption(values);
27857
- _context8.t0 = _regeneratorRuntime__default["default"].keys(accessoiresToUpdate);
28106
+ _context9.t0 = _regeneratorRuntime__default["default"].keys(accessoiresToUpdate);
27858
28107
  case 2:
27859
- if ((_context8.t1 = _context8.t0()).done) {
27860
- _context8.next = 8;
28108
+ if ((_context9.t1 = _context9.t0()).done) {
28109
+ _context9.next = 8;
27861
28110
  break;
27862
28111
  }
27863
- key = _context8.t1.value;
27864
- _context8.next = 6;
28112
+ key = _context9.t1.value;
28113
+ _context9.next = 6;
27865
28114
  return this.updateCfgValues(accessoiresToUpdate[key].accessoire, accessoiresToUpdate[key].variantValues, {});
27866
28115
  case 6:
27867
- _context8.next = 2;
28116
+ _context9.next = 2;
27868
28117
  break;
27869
28118
  case 8:
27870
28119
  case "end":
27871
- return _context8.stop();
28120
+ return _context9.stop();
27872
28121
  }
27873
28122
  }, _callee8, this);
27874
28123
  }));
27875
- function updateAccessoriesFromGlobalOption(_x26, _x27) {
28124
+ function updateAccessoriesFromGlobalOption(_x25, _x26) {
27876
28125
  return _updateAccessoriesFromGlobalOption.apply(this, arguments);
27877
28126
  }
27878
28127
  return updateAccessoriesFromGlobalOption;
@@ -27969,22 +28218,22 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27969
28218
  var _initCfgValues = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9(article, variantValues,
27970
28219
  // Werte aus einem Basiskonfigurat,
27971
28220
  variantItems) {
27972
- 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;
27973
- return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context10) {
27974
- while (1) switch (_context10.prev = _context10.next) {
28221
+ 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;
28222
+ return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context11) {
28223
+ while (1) switch (_context11.prev = _context11.next) {
27975
28224
  case 0:
27976
28225
  myCatalogArticleOptions = Object.values(article.catalogArticleOptions).sort(function (a, b) {
27977
28226
  var _a$sequenceNo, _b$sequenceNo;
27978
28227
  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);
27979
28228
  });
27980
28229
  if (!myCatalogArticleOptions) {
27981
- _context10.next = 9;
28230
+ _context11.next = 9;
27982
28231
  break;
27983
28232
  }
27984
- _loop = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop(i) {
28233
+ _loop2 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop2(i) {
27985
28234
  var _article$set$ViewConf, optionState;
27986
- return _regeneratorRuntime__default["default"].wrap(function _loop$(_context9) {
27987
- while (1) switch (_context9.prev = _context9.next) {
28235
+ return _regeneratorRuntime__default["default"].wrap(function _loop2$(_context10) {
28236
+ while (1) switch (_context10.prev = _context10.next) {
27988
28237
  case 0:
27989
28238
  //Hier wird mal geschaut, ob der aktuelle Artikel alle Optionen schon initialisiert hat.
27990
28239
  if (!article.articleOptionStates.find(function (ops) {
@@ -27995,24 +28244,24 @@ var DivaArticleHandler = /*#__PURE__*/function () {
27995
28244
  }
27996
28245
  case 1:
27997
28246
  case "end":
27998
- return _context9.stop();
28247
+ return _context10.stop();
27999
28248
  }
28000
- }, _loop);
28249
+ }, _loop2);
28001
28250
  });
28002
28251
  i = 0;
28003
28252
  case 4:
28004
28253
  if (!(i < myCatalogArticleOptions.length)) {
28005
- _context10.next = 9;
28254
+ _context11.next = 9;
28006
28255
  break;
28007
28256
  }
28008
- return _context10.delegateYield(_loop(i), "t0", 6);
28257
+ return _context11.delegateYield(_loop2(i), "t0", 6);
28009
28258
  case 6:
28010
28259
  i++;
28011
- _context10.next = 4;
28260
+ _context11.next = 4;
28012
28261
  break;
28013
28262
  case 9:
28014
28263
  if (!article.articleOptionStates.length) {
28015
- _context10.next = 33;
28264
+ _context11.next = 33;
28016
28265
  break;
28017
28266
  }
28018
28267
  //infos eines Basisconfigurats initialisieren
@@ -28042,19 +28291,19 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28042
28291
 
28043
28292
  //defaultValues for FreeText
28044
28293
  _iterator3 = _createForOfIteratorHelper$5(article.articleOptionStates);
28045
- _context10.prev = 12;
28294
+ _context11.prev = 12;
28046
28295
  _iterator3.s();
28047
28296
  case 14:
28048
28297
  if ((_step3 = _iterator3.n()).done) {
28049
- _context10.next = 25;
28298
+ _context11.next = 25;
28050
28299
  break;
28051
28300
  }
28052
28301
  _ops = _step3.value;
28053
28302
  if (!variantValues[_ops.optionCodex + '_val']) {
28054
- _context10.next = 18;
28303
+ _context11.next = 18;
28055
28304
  break;
28056
28305
  }
28057
- return _context10.abrupt("continue", 23);
28306
+ return _context11.abrupt("continue", 23);
28058
28307
  case 18:
28059
28308
  value = undefined;
28060
28309
  optionValueCodex = Object.keys(_ops.option.articleOptionValues)[0];
@@ -28096,26 +28345,26 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28096
28345
  }
28097
28346
  if (value != undefined) article.engine.setOP(_ops.option.codex, _ops.option.articleOptionValues[optionValueCodex], value, true);
28098
28347
  case 23:
28099
- _context10.next = 14;
28348
+ _context11.next = 14;
28100
28349
  break;
28101
28350
  case 25:
28102
- _context10.next = 30;
28351
+ _context11.next = 30;
28103
28352
  break;
28104
28353
  case 27:
28105
- _context10.prev = 27;
28106
- _context10.t1 = _context10["catch"](12);
28107
- _iterator3.e(_context10.t1);
28354
+ _context11.prev = 27;
28355
+ _context11.t1 = _context11["catch"](12);
28356
+ _iterator3.e(_context11.t1);
28108
28357
  case 30:
28109
- _context10.prev = 30;
28358
+ _context11.prev = 30;
28110
28359
  _iterator3.f();
28111
- return _context10.finish(30);
28360
+ return _context11.finish(30);
28112
28361
  case 33:
28113
28362
  case "end":
28114
- return _context10.stop();
28363
+ return _context11.stop();
28115
28364
  }
28116
28365
  }, _callee9, null, [[12, 27, 30, 33]]);
28117
28366
  }));
28118
- function initCfgValues(_x28, _x29, _x30) {
28367
+ function initCfgValues(_x27, _x28, _x29) {
28119
28368
  return _initCfgValues.apply(this, arguments);
28120
28369
  }
28121
28370
  return initCfgValues;
@@ -28124,18 +28373,18 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28124
28373
  key: "setValidVariantValues",
28125
28374
  value: function () {
28126
28375
  var _setValidVariantValues = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee10(article) {
28127
- return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context11) {
28128
- while (1) switch (_context11.prev = _context11.next) {
28376
+ return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context12) {
28377
+ while (1) switch (_context12.prev = _context12.next) {
28129
28378
  case 0:
28130
- _context11.next = 2;
28379
+ _context12.next = 2;
28131
28380
  return this.updateCfgValues(article, article.getValidValues(article.VariantValues, undefined, true), {});
28132
28381
  case 2:
28133
28382
  case "end":
28134
- return _context11.stop();
28383
+ return _context12.stop();
28135
28384
  }
28136
28385
  }, _callee10, this);
28137
28386
  }));
28138
- function setValidVariantValues(_x31) {
28387
+ function setValidVariantValues(_x30) {
28139
28388
  return _setValidVariantValues.apply(this, arguments);
28140
28389
  }
28141
28390
  return setValidVariantValues;
@@ -28154,8 +28403,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28154
28403
  value: (function () {
28155
28404
  var _updateCfgValues = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(article, newConfigValues, alreadyInitializedValues, dontCalcPrice, dontLoadPartlist, calcVariantPrice) {
28156
28405
  var setByFeatureVariantValues, key, partlistArticlesToLoad;
28157
- return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context12) {
28158
- while (1) switch (_context12.prev = _context12.next) {
28406
+ return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context13) {
28407
+ while (1) switch (_context13.prev = _context13.next) {
28159
28408
  case 0:
28160
28409
  if (!!article.CatalogData.bundleRules) dontLoadPartlist = true;
28161
28410
  //es wird versucht die neuen Optionswerte zu setzten
@@ -28182,24 +28431,24 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28182
28431
  article.engine.evalDecisions();
28183
28432
  }
28184
28433
  if (calcVariantPrice) {
28185
- _context12.next = 8;
28434
+ _context13.next = 8;
28186
28435
  break;
28187
28436
  }
28188
- _context12.next = 8;
28437
+ _context13.next = 8;
28189
28438
  return article.updateShelfPlannerState(newConfigValues);
28190
28439
  case 8:
28191
28440
  if (!(!dontCalcPrice && !calcVariantPrice)) {
28192
- _context12.next = 11;
28441
+ _context13.next = 11;
28193
28442
  break;
28194
28443
  }
28195
- _context12.next = 11;
28444
+ _context13.next = 11;
28196
28445
  return this.updateLastElement(article);
28197
28446
  case 11:
28198
- _context12.next = 13;
28447
+ _context13.next = 13;
28199
28448
  return this.evalAndLoadPartlistArticles(article, dontLoadPartlist, newConfigValues);
28200
28449
  case 13:
28201
- partlistArticlesToLoad = _context12.sent;
28202
- _context12.next = 16;
28450
+ partlistArticlesToLoad = _context13.sent;
28451
+ _context13.next = 16;
28203
28452
  return this.evalOpvsOnOpvsConstructionRules(article);
28204
28453
  case 16:
28205
28454
  //danach Preise berechnen
@@ -28214,14 +28463,14 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28214
28463
  article.updateOPVImages();
28215
28464
  }
28216
28465
  }
28217
- return _context12.abrupt("return", partlistArticlesToLoad);
28466
+ return _context13.abrupt("return", partlistArticlesToLoad);
28218
28467
  case 18:
28219
28468
  case "end":
28220
- return _context12.stop();
28469
+ return _context13.stop();
28221
28470
  }
28222
28471
  }, _callee11, this);
28223
28472
  }));
28224
- function updateCfgValues(_x32, _x33, _x34, _x35, _x36, _x37) {
28473
+ function updateCfgValues(_x31, _x32, _x33, _x34, _x35, _x36) {
28225
28474
  return _updateCfgValues.apply(this, arguments);
28226
28475
  }
28227
28476
  return updateCfgValues;
@@ -28231,8 +28480,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28231
28480
  value: function () {
28232
28481
  var _updateLastElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12(article) {
28233
28482
  var isIDM, opsLastElement, lastElement, opsLastPlannedAccessoire, opsFirstAccessoire, _article$accessoirePa, _article$accessoirePa2, accessoires, i;
28234
- return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context13) {
28235
- while (1) switch (_context13.prev = _context13.next) {
28483
+ return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context14) {
28484
+ while (1) switch (_context14.prev = _context14.next) {
28236
28485
  case 0:
28237
28486
  isIDM = article.CatalogData.isIDMFormat;
28238
28487
  opsLastElement = article.getArticleOptionState((!isIDM ? 'OPT' : '') + 'ELEMENTPOSITION');
@@ -28256,29 +28505,29 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28256
28505
  }
28257
28506
  opsFirstAccessoire = article.getArticleOptionState((!isIDM ? 'OPT' : '') + 'FIRSTACCESSOIRE');
28258
28507
  if (!opsFirstAccessoire) {
28259
- _context13.next = 15;
28508
+ _context14.next = 15;
28260
28509
  break;
28261
28510
  }
28262
28511
  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 : [];
28263
28512
  i = 0;
28264
28513
  case 9:
28265
28514
  if (!(i < accessoires.length)) {
28266
- _context13.next = 15;
28515
+ _context14.next = 15;
28267
28516
  break;
28268
28517
  }
28269
- _context13.next = 12;
28518
+ _context14.next = 12;
28270
28519
  return this.updateOption(accessoires[i], (!isIDM ? 'OPT' : '') + 'FIRSTACCESSOIRE', (!isIDM ? 'OPV' : '') + (i + 1).toString(), i === 0 ? (!isIDM ? 'OPV' : '') + 'FIRSTACCESSOIRE' : (!isIDM ? 'OPV' : '') + 'NOTFIRSTACCESSOIRE');
28271
28520
  case 12:
28272
28521
  i++;
28273
- _context13.next = 9;
28522
+ _context14.next = 9;
28274
28523
  break;
28275
28524
  case 15:
28276
28525
  case "end":
28277
- return _context13.stop();
28526
+ return _context14.stop();
28278
28527
  }
28279
28528
  }, _callee12, this);
28280
28529
  }));
28281
- function updateLastElement(_x38) {
28530
+ function updateLastElement(_x37) {
28282
28531
  return _updateLastElement.apply(this, arguments);
28283
28532
  }
28284
28533
  return updateLastElement;
@@ -28289,38 +28538,38 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28289
28538
  var _updateOption = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13(article, optionCodex, newCodex, fallbackNewCodex) {
28290
28539
  var _ops$val, _ops$visibleOptionVal;
28291
28540
  var ops, oldCodex, newVal;
28292
- return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context14) {
28293
- while (1) switch (_context14.prev = _context14.next) {
28541
+ return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context15) {
28542
+ while (1) switch (_context15.prev = _context15.next) {
28294
28543
  case 0:
28295
28544
  ops = article.getArticleOptionState(optionCodex);
28296
28545
  if (ops) {
28297
- _context14.next = 3;
28546
+ _context15.next = 3;
28298
28547
  break;
28299
28548
  }
28300
- return _context14.abrupt("return");
28549
+ return _context15.abrupt("return");
28301
28550
  case 3:
28302
28551
  oldCodex = (_ops$val = ops.val) === null || _ops$val === void 0 ? void 0 : _ops$val.codex;
28303
28552
  newVal = (_ops$visibleOptionVal = ops.visibleOptionValues[newCodex]) !== null && _ops$visibleOptionVal !== void 0 ? _ops$visibleOptionVal : fallbackNewCodex ? ops.visibleOptionValues[fallbackNewCodex] : undefined;
28304
28553
  if (!(oldCodex === (newVal === null || newVal === void 0 ? void 0 : newVal.codex))) {
28305
- _context14.next = 7;
28554
+ _context15.next = 7;
28306
28555
  break;
28307
28556
  }
28308
- return _context14.abrupt("return");
28557
+ return _context15.abrupt("return");
28309
28558
  case 7:
28310
28559
  if (!newVal) {
28311
- _context14.next = 11;
28560
+ _context15.next = 11;
28312
28561
  break;
28313
28562
  }
28314
28563
  ops.val = newVal;
28315
- _context14.next = 11;
28564
+ _context15.next = 11;
28316
28565
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(article.set, {}, []);
28317
28566
  case 11:
28318
28567
  case "end":
28319
- return _context14.stop();
28568
+ return _context15.stop();
28320
28569
  }
28321
28570
  }, _callee13);
28322
28571
  }));
28323
- function updateOption(_x39, _x40, _x41, _x42) {
28572
+ function updateOption(_x38, _x39, _x40, _x41) {
28324
28573
  return _updateOption.apply(this, arguments);
28325
28574
  }
28326
28575
  return updateOption;
@@ -28332,21 +28581,21 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28332
28581
  value: (function () {
28333
28582
  var _evalAndLoadPartlistArticles = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(article, dontLoadPartlist, newConfigValues) {
28334
28583
  var partlistArticlesToLoad;
28335
- return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context15) {
28336
- while (1) switch (_context15.prev = _context15.next) {
28584
+ return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context16) {
28585
+ while (1) switch (_context16.prev = _context16.next) {
28337
28586
  case 0:
28338
28587
  partlistArticlesToLoad = [];
28339
28588
  if (!article.hasPartlistArticle) {
28340
- _context15.next = 8;
28589
+ _context16.next = 8;
28341
28590
  break;
28342
28591
  }
28343
28592
  article.deletePartlistArticles(); //alle aktellen PartlistArticles des Articles löschen!
28344
28593
  partlistArticlesToLoad = article.engine.evalPartlist(newConfigValues);
28345
28594
  if (dontLoadPartlist) {
28346
- _context15.next = 8;
28595
+ _context16.next = 8;
28347
28596
  break;
28348
28597
  }
28349
- _context15.next = 7;
28598
+ _context16.next = 7;
28350
28599
  return this.loadPartlistArticles(partlistArticlesToLoad, article, article.VariantValues);
28351
28600
  case 7:
28352
28601
  partlistArticlesToLoad = [];
@@ -28355,14 +28604,14 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28355
28604
  partlistArticlesToLoad = this.bundlePartlistArticles(partlistArticlesToLoad, article.bundleRules, _defineProperty__default["default"]({}, article.basketId, article));
28356
28605
  }
28357
28606
  article.hasPartlistArticleInitialized = true;
28358
- return _context15.abrupt("return", partlistArticlesToLoad);
28607
+ return _context16.abrupt("return", partlistArticlesToLoad);
28359
28608
  case 11:
28360
28609
  case "end":
28361
- return _context15.stop();
28610
+ return _context16.stop();
28362
28611
  }
28363
28612
  }, _callee14, this);
28364
28613
  }));
28365
- function evalAndLoadPartlistArticles(_x43, _x44, _x45) {
28614
+ function evalAndLoadPartlistArticles(_x42, _x43, _x44) {
28366
28615
  return _evalAndLoadPartlistArticles.apply(this, arguments);
28367
28616
  }
28368
28617
  return evalAndLoadPartlistArticles;
@@ -28371,40 +28620,37 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28371
28620
  key: "loadPartlistArticles",
28372
28621
  value: function () {
28373
28622
  var _loadPartlistArticles = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(partlistArticlesToLoad, article, newConfigValues) {
28374
- var loadAwaits, i, doLoadItem;
28375
- return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context16) {
28376
- while (1) switch (_context16.prev = _context16.next) {
28623
+ var _this = this;
28624
+ var i;
28625
+ return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context17) {
28626
+ while (1) switch (_context17.prev = _context17.next) {
28377
28627
  case 0:
28378
- //make all api calls of all the partlistarticles at the same time but initialize them still synced
28379
- loadAwaits = [];
28380
- for (i = 0; i < partlistArticlesToLoad.length; i++) {
28381
- doLoadItem = partlistArticlesToLoad[i];
28382
- loadAwaits.push(this.preLoadArticle(article.set, doLoadItem.ArticleCodex, this.partlistArticleInitData(article, doLoadItem)));
28383
- }
28384
- _context16.next = 4;
28385
- return Promise.all(loadAwaits);
28386
- case 4:
28628
+ _context17.next = 2;
28629
+ return this.preLoadArticles(article.set, partlistArticlesToLoad.map(function (p) {
28630
+ return _this.partlistArticleInitData(article, p);
28631
+ }));
28632
+ case 2:
28387
28633
  i = 0;
28388
- case 5:
28634
+ case 3:
28389
28635
  if (!(i < partlistArticlesToLoad.length)) {
28390
- _context16.next = 11;
28636
+ _context17.next = 9;
28391
28637
  break;
28392
28638
  }
28393
- _context16.next = 8;
28639
+ _context17.next = 6;
28394
28640
  return this.loadPartlistArticle(partlistArticlesToLoad[i], article, newConfigValues);
28395
- case 8:
28641
+ case 6:
28396
28642
  i++;
28397
- _context16.next = 5;
28643
+ _context17.next = 3;
28398
28644
  break;
28399
- case 11:
28645
+ case 9:
28400
28646
  article.sortPartlistArticles(partlistArticlesToLoad);
28401
- case 12:
28647
+ case 10:
28402
28648
  case "end":
28403
- return _context16.stop();
28649
+ return _context17.stop();
28404
28650
  }
28405
28651
  }, _callee15, this);
28406
28652
  }));
28407
- function loadPartlistArticles(_x46, _x47, _x48) {
28653
+ function loadPartlistArticles(_x45, _x46, _x47) {
28408
28654
  return _loadPartlistArticles.apply(this, arguments);
28409
28655
  }
28410
28656
  return loadPartlistArticles;
@@ -28415,29 +28661,29 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28415
28661
  value: function () {
28416
28662
  var _loadPartlistArticle = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(doLoadItem, article, newConfigValues) {
28417
28663
  var nArticle;
28418
- return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context17) {
28419
- while (1) switch (_context17.prev = _context17.next) {
28664
+ return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context18) {
28665
+ while (1) switch (_context18.prev = _context18.next) {
28420
28666
  case 0:
28421
- _context17.next = 2;
28667
+ _context18.next = 2;
28422
28668
  return this.loadArticle(article.set, doLoadItem.ArticleCodex, this.partlistArticleInitData(article, doLoadItem));
28423
28669
  case 2:
28424
- nArticle = _context17.sent;
28670
+ nArticle = _context18.sent;
28425
28671
  if (!nArticle) {
28426
- _context17.next = 8;
28672
+ _context18.next = 8;
28427
28673
  break;
28428
28674
  }
28429
28675
  doLoadItem.BasketID = nArticle.basketId;
28430
- _context17.next = 7;
28676
+ _context18.next = 7;
28431
28677
  return this.toDoAfterArticleLoaded(nArticle, {}, _objectSpread$d(_objectSpread$d({}, doLoadItem.VariantValues), newConfigValues), 'initializingPartlist', doLoadItem.VariantItemData);
28432
28678
  case 7:
28433
28679
  article.addPartlistArticle(nArticle);
28434
28680
  case 8:
28435
28681
  case "end":
28436
- return _context17.stop();
28682
+ return _context18.stop();
28437
28683
  }
28438
28684
  }, _callee16, this);
28439
28685
  }));
28440
- function loadPartlistArticle(_x49, _x50, _x51) {
28686
+ function loadPartlistArticle(_x48, _x49, _x50) {
28441
28687
  return _loadPartlistArticle.apply(this, arguments);
28442
28688
  }
28443
28689
  return loadPartlistArticle;
@@ -28454,6 +28700,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28454
28700
  //Objektstruktur
28455
28701
  relatedToBasketId: article.basketId,
28456
28702
  parentArticle: article,
28703
+ articleCodex: doLoadItem.ArticleCodex,
28457
28704
  isPartlistArticle: true,
28458
28705
  ruleDesc: doLoadItem.RuleDesc,
28459
28706
  ruleDesc_locales: doLoadItem.RuleDesc_locales,
@@ -28464,7 +28711,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28464
28711
  configArticleCodex: doLoadItem.RetailArticleNr,
28465
28712
  supplierOrderCodex: doLoadItem.SupplierOrderCodex,
28466
28713
  initDecisions: doLoadItem.initDecisions,
28467
- partlistArticleVisibleInTree: doLoadItem.PosInvisibility === 0,
28714
+ partlistArticleVisibleInTree: doLoadItem.PosInvisibility === 0 || doLoadItem.PosInvisibility == 2,
28468
28715
  optionsForPrint: doLoadItem.optionsForPrint,
28469
28716
  optionImgForPrint: doLoadItem.optionImgForPrint,
28470
28717
  catalogCodex: doLoadItem.CatalogCodex
@@ -28477,8 +28724,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28477
28724
  var _evalOpvsOnOpvsConstructionRules = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee17(article) {
28478
28725
  var _article$CatalogData$;
28479
28726
  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;
28480
- return _regeneratorRuntime__default["default"].wrap(function _callee17$(_context18) {
28481
- while (1) switch (_context18.prev = _context18.next) {
28727
+ return _regeneratorRuntime__default["default"].wrap(function _callee17$(_context19) {
28728
+ while (1) switch (_context19.prev = _context19.next) {
28482
28729
  case 0:
28483
28730
  somethingChanged = false;
28484
28731
  previousRules = {};
@@ -28552,26 +28799,26 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28552
28799
  _iterator4.f();
28553
28800
  }
28554
28801
  if (!((_article$CatalogData$ = article.CatalogData.warningRules) !== null && _article$CatalogData$ !== void 0 && _article$CatalogData$.length)) {
28555
- _context18.next = 20;
28802
+ _context19.next = 20;
28556
28803
  break;
28557
28804
  }
28558
28805
  notifications = this.checkNotificationRules(article.CatalogData.warningRules, _defineProperty__default["default"]({}, article.basketId, article), {});
28559
28806
  if (!(notifications !== null && notifications !== void 0 && notifications.length)) {
28560
- _context18.next = 20;
28807
+ _context19.next = 20;
28561
28808
  break;
28562
28809
  }
28563
28810
  _i4 = 0;
28564
28811
  case 11:
28565
28812
  if (!(_i4 < notifications.length)) {
28566
- _context18.next = 19;
28813
+ _context19.next = 19;
28567
28814
  break;
28568
28815
  }
28569
28816
  _item = notifications[_i4];
28570
28817
  if (_item.showAsWarning) {
28571
- _context18.next = 15;
28818
+ _context19.next = 15;
28572
28819
  break;
28573
28820
  }
28574
- return _context18.abrupt("continue", 16);
28821
+ return _context19.abrupt("continue", 16);
28575
28822
  case 15:
28576
28823
  article.addUpdatedOPVbyOPVConstructionRules(_item.showAsWarning.option + ';' + _item.showAsWarning.optionValue, article.updateOPVConstruction((!article.CatalogData.isIDMFormat ? 'OPT' : '') + _item.showAsWarning.option, (!article.CatalogData.isIDMFormat ? 'OPV' : '') + _item.showAsWarning.optionValue, {
28577
28824
  message: _item.message,
@@ -28579,24 +28826,24 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28579
28826
  }));
28580
28827
  case 16:
28581
28828
  _i4++;
28582
- _context18.next = 11;
28829
+ _context19.next = 11;
28583
28830
  break;
28584
28831
  case 19:
28585
28832
  somethingChanged = true;
28586
28833
  case 20:
28587
28834
  if (!(somethingChanged && JSON.stringify(previousRules) != JSON.stringify(article.updatedOPVbyOPVConstructionRules))) {
28588
- _context18.next = 23;
28835
+ _context19.next = 23;
28589
28836
  break;
28590
28837
  }
28591
- _context18.next = 23;
28838
+ _context19.next = 23;
28592
28839
  return this.updateCfgValues(article, {}, {});
28593
28840
  case 23:
28594
28841
  case "end":
28595
- return _context18.stop();
28842
+ return _context19.stop();
28596
28843
  }
28597
28844
  }, _callee17, this);
28598
28845
  }));
28599
- function evalOpvsOnOpvsConstructionRules(_x52) {
28846
+ function evalOpvsOnOpvsConstructionRules(_x51) {
28600
28847
  return _evalOpvsOnOpvsConstructionRules.apply(this, arguments);
28601
28848
  }
28602
28849
  return evalOpvsOnOpvsConstructionRules;
@@ -28704,7 +28951,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28704
28951
  value: function checkIfAllOptionsAreDefined(articles) {
28705
28952
  var articleNames = [];
28706
28953
  var options = [];
28707
- var _loop2 = function _loop2(baksetId) {
28954
+ var _loop3 = function _loop3(baksetId) {
28708
28955
  var article = articles[baksetId];
28709
28956
  if (!article.areAllOptionsDefined) {
28710
28957
  var requiredUserInputOptions = article.requiredUserInputOptions;
@@ -28720,7 +28967,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28720
28967
  }
28721
28968
  };
28722
28969
  for (var baksetId in articles) {
28723
- _loop2(baksetId);
28970
+ _loop3(baksetId);
28724
28971
  }
28725
28972
  return {
28726
28973
  articleNames: articleNames,
@@ -28777,29 +29024,29 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28777
29024
  value: function () {
28778
29025
  var _triggerShelfplannerVisibility = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee18(artices, gridGroup) {
28779
29026
  var key, _artice$shelfPlanner, artice;
28780
- return _regeneratorRuntime__default["default"].wrap(function _callee18$(_context19) {
28781
- while (1) switch (_context19.prev = _context19.next) {
29027
+ return _regeneratorRuntime__default["default"].wrap(function _callee18$(_context20) {
29028
+ while (1) switch (_context20.prev = _context20.next) {
28782
29029
  case 0:
28783
- _context19.t0 = _regeneratorRuntime__default["default"].keys(artices);
29030
+ _context20.t0 = _regeneratorRuntime__default["default"].keys(artices);
28784
29031
  case 1:
28785
- if ((_context19.t1 = _context19.t0()).done) {
28786
- _context19.next = 8;
29032
+ if ((_context20.t1 = _context20.t0()).done) {
29033
+ _context20.next = 8;
28787
29034
  break;
28788
29035
  }
28789
- key = _context19.t1.value;
29036
+ key = _context20.t1.value;
28790
29037
  artice = artices[key];
28791
- _context19.next = 6;
29038
+ _context20.next = 6;
28792
29039
  return (_artice$shelfPlanner = artice.shelfPlanner) === null || _artice$shelfPlanner === void 0 ? void 0 : _artice$shelfPlanner.triggerVisibility(gridGroup);
28793
29040
  case 6:
28794
- _context19.next = 1;
29041
+ _context20.next = 1;
28795
29042
  break;
28796
29043
  case 8:
28797
29044
  case "end":
28798
- return _context19.stop();
29045
+ return _context20.stop();
28799
29046
  }
28800
29047
  }, _callee18);
28801
29048
  }));
28802
- function triggerShelfplannerVisibility(_x53, _x54) {
29049
+ function triggerShelfplannerVisibility(_x52, _x53) {
28803
29050
  return _triggerShelfplannerVisibility.apply(this, arguments);
28804
29051
  }
28805
29052
  return triggerShelfplannerVisibility;
@@ -28815,13 +29062,13 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28815
29062
  }, {
28816
29063
  key: "getOrderLinesOfArticles",
28817
29064
  value: function getOrderLinesOfArticles(articles) {
28818
- var _this = this;
29065
+ var _this2 = this;
28819
29066
  var customDimensions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
28820
29067
  var repairOnly = arguments.length > 2 ? arguments[2] : undefined;
28821
29068
  var hasFavorites = arguments.length > 3 ? arguments[3] : undefined;
28822
29069
  var ret = [];
28823
29070
  if (Object.values(articles).length == 0) return ret;
28824
- var _loop3 = function _loop3() {
29071
+ var _loop4 = function _loop4() {
28825
29072
  var _article$shelfPlanner3, _article$shelfPlanner4, _article$doorPlanner;
28826
29073
  var article = articles[key];
28827
29074
  var catalogData = article.CatalogData;
@@ -28899,12 +29146,12 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28899
29146
 
28900
29147
  //die Partlistarticle eines Articles auch in die Orderline pushen
28901
29148
  if (article.hasPartlistArticle) {
28902
- ret = ret.concat(_this.getOrderLinesOfArticles(article.partlistArticles, customDimensions, repairOnly, hasFavorites));
29149
+ ret = ret.concat(_this2.getOrderLinesOfArticles(article.partlistArticles, customDimensions, repairOnly, hasFavorites));
28903
29150
  }
28904
- ret = ret.concat(_this.getOptiontreeAccessoiresArr(article.set.getSetId(), article));
29151
+ ret = ret.concat(_this2.getOptiontreeAccessoiresArr(article.set.getSetId(), article));
28905
29152
  };
28906
29153
  for (var key in articles) {
28907
- _loop3();
29154
+ _loop4();
28908
29155
  }
28909
29156
  return ret;
28910
29157
  }
@@ -29069,20 +29316,20 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29069
29316
  key: "correctPartlistArticlesByGlobalRules",
29070
29317
  value: (function () {
29071
29318
  var _correctPartlistArticlesByGlobalRules = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee19(set, partlistArticlesToLoad, bundleRules, doChangeRetailArticleNumbers) {
29072
- var _loop4, i, article;
29073
- return _regeneratorRuntime__default["default"].wrap(function _callee19$(_context21) {
29074
- while (1) switch (_context21.prev = _context21.next) {
29319
+ var _loop5, i, article;
29320
+ return _regeneratorRuntime__default["default"].wrap(function _callee19$(_context22) {
29321
+ while (1) switch (_context22.prev = _context22.next) {
29075
29322
  case 0:
29076
29323
  if (bundleRules) partlistArticlesToLoad = this.bundlePartlistArticles(partlistArticlesToLoad, bundleRules, set.getDivaArticles());
29077
29324
  //Correct RetailArticleNumbers
29078
29325
  if (!(doChangeRetailArticleNumbers !== null && doChangeRetailArticleNumbers !== void 0 && doChangeRetailArticleNumbers.doChange && doChangeRetailArticleNumbers.retailArticleRules)) {
29079
- _context21.next = 9;
29326
+ _context22.next = 9;
29080
29327
  break;
29081
29328
  }
29082
- _loop4 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop4(i) {
29329
+ _loop5 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop5(i) {
29083
29330
  var rule;
29084
- return _regeneratorRuntime__default["default"].wrap(function _loop4$(_context20) {
29085
- while (1) switch (_context20.prev = _context20.next) {
29331
+ return _regeneratorRuntime__default["default"].wrap(function _loop5$(_context21) {
29332
+ while (1) switch (_context21.prev = _context21.next) {
29086
29333
  case 0:
29087
29334
  //Run through articleCodexes to repair:
29088
29335
  rule = doChangeRetailArticleNumbers.retailArticleRules.find(function (item) {
@@ -29094,34 +29341,34 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29094
29341
  }
29095
29342
  case 2:
29096
29343
  case "end":
29097
- return _context20.stop();
29344
+ return _context21.stop();
29098
29345
  }
29099
- }, _loop4);
29346
+ }, _loop5);
29100
29347
  });
29101
29348
  i = 0;
29102
29349
  case 4:
29103
29350
  if (!(i < partlistArticlesToLoad.length)) {
29104
- _context21.next = 9;
29351
+ _context22.next = 9;
29105
29352
  break;
29106
29353
  }
29107
- return _context21.delegateYield(_loop4(i), "t0", 6);
29354
+ return _context22.delegateYield(_loop5(i), "t0", 6);
29108
29355
  case 6:
29109
29356
  i++;
29110
- _context21.next = 4;
29357
+ _context22.next = 4;
29111
29358
  break;
29112
29359
  case 9:
29113
29360
  article = Object.values(set.getDivaArticles()).find(function (article) {
29114
29361
  return article.hasPartlistArticle && !article.deleted;
29115
29362
  });
29116
- _context21.next = 12;
29363
+ _context22.next = 12;
29117
29364
  return this.loadPartlistArticles(partlistArticlesToLoad, article, {});
29118
29365
  case 12:
29119
29366
  case "end":
29120
- return _context21.stop();
29367
+ return _context22.stop();
29121
29368
  }
29122
29369
  }, _callee19, this);
29123
29370
  }));
29124
- function correctPartlistArticlesByGlobalRules(_x55, _x56, _x57, _x58) {
29371
+ function correctPartlistArticlesByGlobalRules(_x54, _x55, _x56, _x57) {
29125
29372
  return _correctPartlistArticlesByGlobalRules.apply(this, arguments);
29126
29373
  }
29127
29374
  return correctPartlistArticlesByGlobalRules;
@@ -29130,7 +29377,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29130
29377
  key: "bundlePartlistArticles",
29131
29378
  value: function bundlePartlistArticles(partlistArticlesToLoad, bundleRules, articles) {
29132
29379
  var partlistArticlesToLoadGrouped = [];
29133
- var _loop5 = function _loop5(i) {
29380
+ var _loop6 = function _loop6(i) {
29134
29381
  var index = partlistArticlesToLoadGrouped.findIndex(function (item, j) {
29135
29382
  if (item.CatalogCodex == partlistArticlesToLoad[i].CatalogCodex && item.ArticleCodex == partlistArticlesToLoad[i].ArticleCodex && item.RetailArticleNr == partlistArticlesToLoad[i].RetailArticleNr && item.RetailPrefix == partlistArticlesToLoad[i].RetailPrefix) {
29136
29383
  return true;
@@ -29144,7 +29391,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29144
29391
  }
29145
29392
  };
29146
29393
  for (var i = 0; i < partlistArticlesToLoad.length; i++) {
29147
- _loop5(i);
29394
+ _loop6(i);
29148
29395
  }
29149
29396
  //bundle Partlistarticles
29150
29397
  for (var _i6 = 0; _i6 < bundleRules.length; _i6++) {
@@ -31311,7 +31558,7 @@ var DivaSet = /*#__PURE__*/function () {
31311
31558
  break;
31312
31559
  }
31313
31560
  _context5.next = 3;
31314
- return Promise.resolve().then(function () { return require('./DoorPlanner-62e30207.js'); });
31561
+ return Promise.resolve().then(function () { return require('./DoorPlanner-977c7939.js'); });
31315
31562
  case 3:
31316
31563
  _yield$import = _context5.sent;
31317
31564
  DoorPlanner = _yield$import["default"];
@@ -38158,7 +38405,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
38158
38405
  break;
38159
38406
  case 3:
38160
38407
  _context12.next = 5;
38161
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-b6a38b56.js'); });
38408
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-c3db27fb.js'); });
38162
38409
  case 5:
38163
38410
  _yield$import = _context12.sent;
38164
38411
  PfisterWWSHandler = _yield$import["default"];
@@ -38166,7 +38413,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
38166
38413
  return _context12.abrupt("break", 27);
38167
38414
  case 9:
38168
38415
  _context12.next = 11;
38169
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-e7cfea5f.js'); });
38416
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-db6e15b8.js'); });
38170
38417
  case 11:
38171
38418
  _yield$import2 = _context12.sent;
38172
38419
  LiviqueWWSHandler = _yield$import2["default"];
@@ -38174,7 +38421,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
38174
38421
  return _context12.abrupt("break", 27);
38175
38422
  case 15:
38176
38423
  _context12.next = 17;
38177
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-d6b89f59.js'); });
38424
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-3919fc64.js'); });
38178
38425
  case 17:
38179
38426
  _yield$import3 = _context12.sent;
38180
38427
  SeriousWWSHandler = _yield$import3["default"];
@@ -38182,7 +38429,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
38182
38429
  return _context12.abrupt("break", 27);
38183
38430
  case 21:
38184
38431
  _context12.next = 23;
38185
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-2e7d48a0.js'); });
38432
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-e3244909.js'); });
38186
38433
  case 23:
38187
38434
  _yield$import4 = _context12.sent;
38188
38435
  StandardWWSHandler = _yield$import4["default"];
@@ -39610,7 +39857,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
39610
39857
  while (1) switch (_context3.prev = _context3.next) {
39611
39858
  case 0:
39612
39859
  _context3.next = 2;
39613
- return Promise.resolve().then(function () { return require('./Host3DSignalR-c3397cf9.js'); });
39860
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-7c7b0e72.js'); });
39614
39861
  case 2:
39615
39862
  _yield$import = _context3.sent;
39616
39863
  Host3DSignalR = _yield$import["default"];
@@ -41164,7 +41411,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
41164
41411
  break;
41165
41412
  case 8:
41166
41413
  _context4.next = 10;
41167
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-2eb07926.js'); });
41414
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-ded3927f.js'); });
41168
41415
  case 10:
41169
41416
  _yield$import = _context4.sent;
41170
41417
  DivaStandardPlanner = _yield$import["default"];
@@ -41175,7 +41422,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
41175
41422
  return _context4.abrupt("break", 21);
41176
41423
  case 15:
41177
41424
  _context4.next = 17;
41178
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-66e491b8.js'); });
41425
+ return Promise.resolve().then(function () { return require('./DivaBoxPlanner-bdba29be.js'); });
41179
41426
  case 17:
41180
41427
  _yield$import2 = _context4.sent;
41181
41428
  DivaBoxPlanner = _yield$import2["default"];
@@ -42934,7 +43181,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42934
43181
  this.api = new DivaApiHandler(this.plannerConfig, this.handler);
42935
43182
  this.api.setI18n(this.i18n);
42936
43183
  this.api.setActions(this.actions);
42937
- this.api.setState(this.state);
42938
43184
  this.ReturnTo = this.plannerConfig.returnTo;
42939
43185
  LOG$1.startTransaction({
42940
43186
  event: 'onInitializeConfigurator',
@@ -42943,46 +43189,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42943
43189
  warningTime: 2000,
42944
43190
  errorTime: 4000
42945
43191
  });
42946
- _context14.next = 8;
43192
+ _context14.next = 7;
42947
43193
  return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
42948
- case 8:
43194
+ case 7:
42949
43195
  this.plannerHandler = new DivaPlannerHandler(false);
42950
43196
  viewReadyPromise = this.initViewApiDependencies();
42951
- _context14.next = 12;
43197
+ _context14.next = 11;
42952
43198
  return this.divaBasketHandler.initializeBasket(this.api);
42953
- case 12:
43199
+ case 11:
42954
43200
  loadSuccessful = _context14.sent;
42955
43201
  if (this.plannerConfig.configuratorSessionId === undefined && (!this.divaBasketHandler.hasConfiguratorSessionIdGetter || DivaUtils__default["default"].businessMetrics.getConfiguratorSessionId() === undefined)) {
42956
43202
  DivaUtils__default["default"].businessMetrics.setConfiguratorSessionId();
42957
43203
  }
42958
43204
  if (!loadSuccessful) {
42959
- _context14.next = 28;
43205
+ _context14.next = 27;
42960
43206
  break;
42961
43207
  }
42962
- _context14.prev = 15;
42963
- _context14.next = 18;
43208
+ _context14.prev = 14;
43209
+ _context14.next = 17;
42964
43210
  return this.initializeSets(loadSuccessful, viewReadyPromise);
42965
- case 18:
43211
+ case 17:
42966
43212
  return _context14.abrupt("return", _context14.sent);
42967
- case 21:
42968
- _context14.prev = 21;
42969
- _context14.t0 = _context14["catch"](15);
43213
+ case 20:
43214
+ _context14.prev = 20;
43215
+ _context14.t0 = _context14["catch"](14);
42970
43216
  LOG$1.error(_context14.t0);
42971
43217
  this.onInitializationError(_context14.t0);
42972
43218
  return _context14.abrupt("return", false);
42973
- case 26:
42974
- _context14.next = 31;
43219
+ case 25:
43220
+ _context14.next = 30;
42975
43221
  break;
42976
- case 28:
43222
+ case 27:
42977
43223
  this.onInitializationError();
42978
43224
  //fehler beim laden vom basket..
42979
43225
  LOG$1.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {}, true);
42980
43226
  return _context14.abrupt("return", false);
42981
- case 31:
43227
+ case 30:
42982
43228
  case "end":
42983
43229
  return _context14.stop();
42984
43230
  }
42985
- }, _callee14, this, [[15, 21]]);
43231
+ }, _callee14, this, [[14, 20]]);
42986
43232
  }));
42987
43233
  function initialize() {
42988
43234
  return _initialize.apply(this, arguments);
@@ -43101,7 +43347,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
43101
43347
  value: function updatePlannerConfig(plannerConfig) {
43102
43348
  this.plannerConfig = Object.assign(plannerConfig, {});
43103
43349
  this.divaBasketHandler.updatePlannerConfig(plannerConfig);
43104
- this.api.initalizeWebConfigData(plannerConfig.settings);
43350
+ this.api.initalizeWebConfigData(plannerConfig);
43105
43351
  }
43106
43352
  }, {
43107
43353
  key: "getInitStateForSet",