@crystaldesign/web-planner-logic 24.11.0-beta.38 → 24.11.0-beta.39

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 (56) hide show
  1. package/build/cjs/{DivaBoxPlanner-330653bb.js → DivaBoxPlanner-c0491407.js} +2 -2
  2. package/build/cjs/{DivaStandardPlanner-428015e0.js → DivaStandardPlanner-3a655cd7.js} +73 -17
  3. package/build/cjs/{DoorPlanner-73c462cf.js → DoorPlanner-497f79a4.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-93aafc52.js → Host3DSignalR-c8a4f342.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-72636128.js → LiviqueWWSHandler-9ef41a4b.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-0b867d64.js → PfisterWWSHandler-3832b3db.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-80167e97.js → PlannerHandler2D-49ee318c.js} +26 -2
  8. package/build/cjs/{ProductBasketHandler-7b9f5bd9.js → ProductBasketHandler-bf3f28a6.js} +1 -1
  9. package/build/cjs/{SeriousBasketHandler-0303202e.js → SeriousBasketHandler-44108127.js} +1 -1
  10. package/build/cjs/{ShelfPlanner-47bbfb7c.js → ShelfPlanner-8b2db628.js} +1 -1
  11. package/build/cjs/{StandardWWSHandler-06ae3bfc.js → StandardWWSHandler-6150a756.js} +1 -1
  12. package/build/cjs/{index-c285a3c4.js → index-4d3eb4fa.js} +365 -269
  13. package/build/cjs/index.js +1 -1
  14. package/build/esm/{DivaBoxPlanner-da028daa.js → DivaBoxPlanner-ad6509af.js} +2 -2
  15. package/build/esm/{DivaStandardPlanner-b23fcfc4.js → DivaStandardPlanner-251c5b36.js} +73 -17
  16. package/build/esm/{DoorPlanner-d53478a6.js → DoorPlanner-8063f973.js} +1 -1
  17. package/build/esm/{Host3DSignalR-de59e1ca.js → Host3DSignalR-ab1ccbea.js} +1 -1
  18. package/build/esm/{LiviqueWWSHandler-8ac2de7d.js → LiviqueWWSHandler-f13c497c.js} +1 -1
  19. package/build/esm/{PfisterWWSHandler-7e6d73a9.js → PfisterWWSHandler-cb6d8996.js} +1 -1
  20. package/build/esm/{PlannerHandler2D-d320a01d.js → PlannerHandler2D-4ed43b5f.js} +26 -2
  21. package/build/esm/{ProductBasketHandler-faa30dae.js → ProductBasketHandler-e42fb957.js} +1 -1
  22. package/build/esm/{SeriousBasketHandler-00d1471a.js → SeriousBasketHandler-bd8bacf8.js} +1 -1
  23. package/build/esm/{ShelfPlanner-747bb48e.js → ShelfPlanner-1a65509e.js} +1 -1
  24. package/build/esm/{StandardWWSHandler-33764628.js → StandardWWSHandler-51626324.js} +1 -1
  25. package/build/esm/{index-1f21b165.js → index-862cadbc.js} +365 -269
  26. package/build/esm/index.js +1 -1
  27. package/build/types/web-planner-logic/src/interface/Articles/AccessoireItemType.d.ts +2 -0
  28. package/build/types/web-planner-logic/src/interface/Articles/AccessoireItemType.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/Articles/CatalogPlannerArticleDataType.d.ts +4 -0
  30. package/build/types/web-planner-logic/src/interface/Articles/CatalogPlannerArticleDataType.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/Articles/CatalogPlannerArticleViewDataType.d.ts +2 -0
  32. package/build/types/web-planner-logic/src/interface/Articles/CatalogPlannerArticleViewDataType.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/interface/Planner/DockingPointDataType.d.ts +1 -1
  34. package/build/types/web-planner-logic/src/interface/Planner/DockingPointDataType.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/interface/Planner/IDivaViewPlannerElement.d.ts +2 -0
  36. package/build/types/web-planner-logic/src/interface/Planner/IDivaViewPlannerElement.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/interface/Planner/PlannerDataType.d.ts +2 -0
  38. package/build/types/web-planner-logic/src/interface/Planner/PlannerDataType.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
  40. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +10 -0
  41. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
  42. package/build/types/web-planner-logic/src/logic/DivaCatalogHandler.d.ts.map +1 -1
  43. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
  44. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts +1 -1
  45. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
  46. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/DockingPointHandler.d.ts.map +1 -1
  47. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts.map +1 -1
  48. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts +6 -0
  49. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts.map +1 -1
  50. package/build/types/web-planner-logic/src/model/Articles/CatalogArticleData.d.ts.map +1 -1
  51. package/build/types/web-planner-logic/src/model/Articles/CatalogPlannerArticleData.d.ts +2 -0
  52. package/build/types/web-planner-logic/src/model/Articles/CatalogPlannerArticleData.d.ts.map +1 -1
  53. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
  54. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts +4 -0
  55. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
  56. package/package.json +2 -2
@@ -17071,7 +17071,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
17071
17071
  if (articleRelations[0].Articles.length > 0) {
17072
17072
  this.catalogArticle.hasArticleRelations = true;
17073
17073
  for (var i = 0; i < articleRelations[0].Articles.length; i++) {
17074
- var _catalogArticle$catal, _catalogArticle$catal2, _catalogArticle$catal3, _catalogArticle$catal4, _catalogArticle$catal5, _catalogArticle$catal6;
17074
+ var _catalogArticle$catal, _catalogArticle$catal2, _catalogArticle$catal3, _catalogArticle$catal4, _catalogArticle$catal5, _catalogArticle$catal6, _catalogArticle$catal7, _catalogArticle$catal8, _catalogArticle$catal9, _catalogArticle$catal10;
17075
17075
  var myAcc = articleRelations[0].Articles[i];
17076
17076
  if (this.catalogCodex != myAcc.CatalogCodex) {
17077
17077
  //DivaUtils.LOG.log("Accessoire ist von einem anderen Catalog. Sollte eig funktionern aber bitte testen!");
@@ -17096,6 +17096,8 @@ var CatalogArticleData = /*#__PURE__*/function () {
17096
17096
  hasAVC: ((_catalogArticle$catal = (_catalogArticle$catal2 = catalogArticle.catalogPlannerArticle) === null || _catalogArticle$catal2 === void 0 ? void 0 : _catalogArticle$catal2.topAVC) !== null && _catalogArticle$catal !== void 0 ? _catalogArticle$catal : 0) > 0,
17097
17097
  hasAVO: ((_catalogArticle$catal3 = (_catalogArticle$catal4 = catalogArticle.catalogPlannerArticle) === null || _catalogArticle$catal4 === void 0 ? void 0 : _catalogArticle$catal4.topAVO) !== null && _catalogArticle$catal3 !== void 0 ? _catalogArticle$catal3 : 0) > 0,
17098
17098
  hasAVU: ((_catalogArticle$catal5 = (_catalogArticle$catal6 = catalogArticle.catalogPlannerArticle) === null || _catalogArticle$catal6 === void 0 ? void 0 : _catalogArticle$catal6.topAVU) !== null && _catalogArticle$catal5 !== void 0 ? _catalogArticle$catal5 : 0) > 0,
17099
+ hasAVN: ((_catalogArticle$catal7 = (_catalogArticle$catal8 = catalogArticle.catalogPlannerArticle) === null || _catalogArticle$catal8 === void 0 ? void 0 : _catalogArticle$catal8.topAVN) !== null && _catalogArticle$catal7 !== void 0 ? _catalogArticle$catal7 : 0) > 0,
17100
+ hasAVS: ((_catalogArticle$catal9 = (_catalogArticle$catal10 = catalogArticle.catalogPlannerArticle) === null || _catalogArticle$catal10 === void 0 ? void 0 : _catalogArticle$catal10.topAVS) !== null && _catalogArticle$catal9 !== void 0 ? _catalogArticle$catal9 : 0) > 0,
17099
17101
  width: catalogArticle.width,
17100
17102
  height: catalogArticle.height,
17101
17103
  depth: catalogArticle.depth,
@@ -17542,6 +17544,8 @@ var CatalogPlannerArticleData = /*#__PURE__*/function () {
17542
17544
  topAVO: jsonArticle.TopAVO ? jsonArticle.TopAVO : -1,
17543
17545
  topAVU: jsonArticle.TopAVU ? jsonArticle.TopAVU : -1,
17544
17546
  topAVC: jsonArticle.TopAVC ? jsonArticle.TopAVC : -1,
17547
+ topAVN: jsonArticle.TopAVN ? jsonArticle.TopAVN : -1,
17548
+ topAVS: jsonArticle.TopAVS ? jsonArticle.TopAVS : -1,
17545
17549
  topIsAccessoire: jsonArticle.TopIsAccessoire != undefined ? jsonArticle.TopIsAccessoire : undefined,
17546
17550
  j3DUrl: jsonArticle.J3DUrl && jsonArticle.J3DUrl != '' ? jsonArticle.J3DUrl : undefined,
17547
17551
  isArticleRelation: jsonArticle.IsArticleRelation != undefined ? jsonArticle.IsArticleRelation : undefined,
@@ -17745,6 +17749,16 @@ var CatalogPlannerArticleData = /*#__PURE__*/function () {
17745
17749
  get: function get() {
17746
17750
  return this.catPlanArt.topAVU;
17747
17751
  }
17752
+ }, {
17753
+ key: "topAVN",
17754
+ get: function get() {
17755
+ return this.catPlanArt.topAVN;
17756
+ }
17757
+ }, {
17758
+ key: "topAVS",
17759
+ get: function get() {
17760
+ return this.catPlanArt.topAVS;
17761
+ }
17748
17762
  }, {
17749
17763
  key: "getSvgInSvgWithFormulaArr",
17750
17764
  value: function getSvgInSvgWithFormulaArr(curSVG) {
@@ -17773,9 +17787,9 @@ var CatalogPlannerArticleData = /*#__PURE__*/function () {
17773
17787
  get: function get() {
17774
17788
  if (
17775
17789
  //if the article hasTopSvg
17776
- this.hasTopSvg && (this.topAVC > 0 || this.topAVO > 0 || this.topAVU > 0 || this.topHasAVL || this.topHasAVR) ||
17790
+ this.hasTopSvg && (this.topAVC > 0 || this.topAVO > 0 || this.topAVU > 0 || this.topAVN > 0 || this.topAVS > 0 || this.topHasAVL || this.topHasAVR) ||
17777
17791
  //if the article hasTopSvgsWithFormula (more svgs). All svgs have to have the same dp
17778
- this.hasTopSvgsWithFormula && this.topSvgsWithFormula.length > 0 && (this.topSvgsWithFormula[0].AVC > 0 || this.topSvgsWithFormula[0].AVO > 0 || this.topSvgsWithFormula[0].AVU > 0 || this.topSvgsWithFormula[0].HasAVL || this.topSvgsWithFormula[0].HasAVR)) {
17792
+ this.hasTopSvgsWithFormula && this.topSvgsWithFormula.length > 0 && (this.topSvgsWithFormula[0].AVC > 0 || this.topSvgsWithFormula[0].AVO > 0 || this.topSvgsWithFormula[0].AVU > 0 || this.topSvgsWithFormula[0].AVN > 0 || this.topSvgsWithFormula[0].AVS > 0 || this.topSvgsWithFormula[0].HasAVL || this.topSvgsWithFormula[0].HasAVR)) {
17779
17793
  return true;
17780
17794
  }
17781
17795
  return false;
@@ -18773,6 +18787,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
18773
18787
  hasAVC: topSvg.TopAVC && topSvg.TopAVC > 0 || topSvg.AVC && topSvg.AVC > 0 ? true : false,
18774
18788
  hasAVO: topSvg.TopAVO && topSvg.TopAVO > 0 || topSvg.AVO && topSvg.AVO > 0 ? true : false,
18775
18789
  hasAVU: topSvg.TopAVU && topSvg.TopAVU > 0 || topSvg.AVU && topSvg.AVU > 0 ? true : false,
18790
+ hasAVN: topSvg.TopAVN && topSvg.TopAVN > 0 || topSvg.AVN && topSvg.AVN > 0 ? true : false,
18791
+ hasAVS: topSvg.TopAVS && topSvg.TopAVS > 0 || topSvg.AVS && topSvg.AVS > 0 ? true : false,
18776
18792
  hasAVR: topSvg.HasAVR ? true : false,
18777
18793
  hasAVL: topSvg.HasAVL ? true : false,
18778
18794
  jsonFormula: topSvg.JsFormula,
@@ -18829,6 +18845,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
18829
18845
  hasAVC: catPlanArticle.topAVC && catPlanArticle.topAVC > 0 ? true : false,
18830
18846
  hasAVO: catPlanArticle.topAVO && catPlanArticle.topAVO > 0 ? true : false,
18831
18847
  hasAVU: catPlanArticle.topAVU && catPlanArticle.topAVU > 0 ? true : false,
18848
+ hasAVN: catPlanArticle.topAVN && catPlanArticle.topAVN > 0 ? true : false,
18849
+ hasAVS: catPlanArticle.topAVS && catPlanArticle.topAVS > 0 ? true : false,
18832
18850
  hasAVR: hasAVR,
18833
18851
  hasAVL: hasAVL,
18834
18852
  layer: catPlanArticle.topLayer ? Number(catPlanArticle.topLayer) : 20,
@@ -20475,6 +20493,8 @@ var DivaArticle = /*#__PURE__*/function () {
20475
20493
  countAVC: -1,
20476
20494
  countAVO: -1,
20477
20495
  countAVU: -1,
20496
+ countAVN: -1,
20497
+ countAVS: -1,
20478
20498
  hasAVL: false,
20479
20499
  hasAVR: false,
20480
20500
  isAccessoire: false,
@@ -20504,6 +20524,8 @@ var DivaArticle = /*#__PURE__*/function () {
20504
20524
  this.actPlannerData.countAVC = plannerElement.topAVC;
20505
20525
  this.actPlannerData.countAVO = plannerElement.topAVO;
20506
20526
  this.actPlannerData.countAVU = plannerElement.topAVU;
20527
+ this.actPlannerData.countAVN = plannerElement.topAVN;
20528
+ this.actPlannerData.countAVS = plannerElement.topAVS;
20507
20529
  }
20508
20530
  this.actPlannerData.accessoireList = this.accessoireList;
20509
20531
  this.actPlannerData.svgsWithFormula = plannerElement.topSvgsWithFormula;
@@ -21531,6 +21553,8 @@ var DivaArticle = /*#__PURE__*/function () {
21531
21553
  this.actPlannerData.countAVC = this.article.catalogArticle.catalogPlannerArticle.topAVC;
21532
21554
  this.actPlannerData.countAVO = this.article.catalogArticle.catalogPlannerArticle.topAVO;
21533
21555
  this.actPlannerData.countAVU = this.article.catalogArticle.catalogPlannerArticle.topAVU;
21556
+ this.actPlannerData.countAVN = this.article.catalogArticle.catalogPlannerArticle.topAVN;
21557
+ this.actPlannerData.countAVS = this.article.catalogArticle.catalogPlannerArticle.topAVS;
21534
21558
  this.actPlannerData.isAccessoire = !this.isPartListArticle && this.article.relatedToBasketId != undefined;
21535
21559
  }
21536
21560
  }, {
@@ -22322,8 +22346,9 @@ var DivaArticle = /*#__PURE__*/function () {
22322
22346
  ops.freeTextLang['FR'] = langs[1];
22323
22347
  ops.freeTextLang['IT'] = langs[2];
22324
22348
  } else {
22349
+ var _freeTextValues$optio;
22325
22350
  var doSetValue = newConfigValues[optionCodex + '_val'] === undefined;
22326
- if (!doSetValue && !freeTextValues[optionCodex].exactMatchingKey && key === partenOptionCodex + '.' + optionCodex) doSetValue = true;
22351
+ if (!doSetValue && !((_freeTextValues$optio = freeTextValues[optionCodex]) !== null && _freeTextValues$optio !== void 0 && _freeTextValues$optio.exactMatchingKey) && key === partenOptionCodex + '.' + optionCodex) doSetValue = true;
22327
22352
  if (!doSetValue) return;
22328
22353
  freeTextValues[optionCodex] = {
22329
22354
  exactMatchingKey: key === partenOptionCodex + '.' + optionCodex
@@ -23521,7 +23546,7 @@ var DivaArticle = /*#__PURE__*/function () {
23521
23546
  break;
23522
23547
  }
23523
23548
  _context.next = 4;
23524
- return import('./ShelfPlanner-747bb48e.js');
23549
+ return import('./ShelfPlanner-1a65509e.js');
23525
23550
  case 4:
23526
23551
  _yield$import = _context.sent;
23527
23552
  ShelfPlanner = _yield$import["default"];
@@ -24065,6 +24090,8 @@ var DivaArticle = /*#__PURE__*/function () {
24065
24090
  this.actPlannerData.countAVC = mySVG.AVC;
24066
24091
  this.actPlannerData.countAVO = mySVG.AVO;
24067
24092
  this.actPlannerData.countAVU = mySVG.AVU;
24093
+ this.actPlannerData.countAVN = mySVG.AVN;
24094
+ this.actPlannerData.countAVS = mySVG.AVS;
24068
24095
  this.actPlannerData.hasAVL = mySVG.HasAVL;
24069
24096
  this.actPlannerData.hasAVR = mySVG.HasAVR;
24070
24097
  LOG$c.debug('new SVG by SVG tausch', {
@@ -24074,6 +24101,8 @@ var DivaArticle = /*#__PURE__*/function () {
24074
24101
  AVC: mySVG.AVC,
24075
24102
  AVO: mySVG.AVO,
24076
24103
  AVU: mySVG.AVU,
24104
+ AVN: mySVG.AVN,
24105
+ AVS: mySVG.AVS,
24077
24106
  HasAVL: mySVG.HasAVL,
24078
24107
  HasAVR: mySVG.HasAVR
24079
24108
  });
@@ -24472,24 +24501,68 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24472
24501
  value: //Initialisiert eventuell Option Tree und Infos im CatalogArticle
24473
24502
  function () {
24474
24503
  var _loadArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(set, articleCodex, initParams) {
24475
- var catalog, _set$getSetState$acti, _set$getSetState$acti2, _set$getSetState$acti3, _set$getSetState$acti4, catalogArticle, newBasketId, _set$actions;
24504
+ var _yield$this$preLoadAr, catalog, catalogArticle, newBasketId, _set$actions;
24476
24505
  return _regeneratorRuntime.wrap(function _callee$(_context) {
24477
24506
  while (1) switch (_context.prev = _context.next) {
24507
+ case 0:
24508
+ _context.next = 2;
24509
+ return this.preLoadArticle(set, articleCodex, initParams);
24510
+ case 2:
24511
+ _yield$this$preLoadAr = _context.sent;
24512
+ catalog = _yield$this$preLoadAr.catalog;
24513
+ catalogArticle = _yield$this$preLoadAr.catalogArticle;
24514
+ newBasketId = initParams.basketId ? initParams.basketId : 'B' + nanoid();
24515
+ if (!catalogArticle) {
24516
+ _context.next = 10;
24517
+ break;
24518
+ }
24519
+ return _context.abrupt("return", new DivaArticle(set, newBasketId, initParams, catalogArticle, catalog));
24520
+ case 10:
24521
+ //articleCodex does not exist anymore in catalog
24522
+ LOG$b.error(new DivaError('articleCodex not found in article list. Could be due to exclusivity or a bug in the application!', {
24523
+ code: 'WC_0011',
24524
+ custom: {
24525
+ articleCodex: articleCodex
24526
+ }
24527
+ }));
24528
+ (_set$actions = set.actions) === null || _set$actions === void 0 || _set$actions.openModal({
24529
+ accept: true,
24530
+ title: set.i18n.t('modals.error_accured')
24531
+ });
24532
+ return _context.abrupt("return", false);
24533
+ case 13:
24534
+ case "end":
24535
+ return _context.stop();
24536
+ }
24537
+ }, _callee, this);
24538
+ }));
24539
+ function loadArticle(_x, _x2, _x3) {
24540
+ return _loadArticle.apply(this, arguments);
24541
+ }
24542
+ return loadArticle;
24543
+ }() //loads all the calls for an article but does not create the article
24544
+ }, {
24545
+ key: "preLoadArticle",
24546
+ value: function () {
24547
+ var _preLoadArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(set, articleCodex, initParams) {
24548
+ var catalog, _set$getSetState$acti, _set$getSetState$acti2, _set$getSetState$acti3, _set$getSetState$acti4, catalogArticle;
24549
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
24550
+ while (1) switch (_context2.prev = _context2.next) {
24478
24551
  case 0:
24479
24552
  if (!(initParams.catalogCodex && initParams.catalogCodex !== set.CatalogData.catalogCodex)) {
24480
- _context.next = 8;
24553
+ _context2.next = 8;
24481
24554
  break;
24482
24555
  }
24483
24556
  (_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);
24484
- _context.next = 4;
24557
+ _context2.next = 4;
24485
24558
  return catalogHandlerInstance.getCatalogData(set.getSetState, initParams.catalogCodex, {
24486
24559
  AccountGUID: set.CatalogData.accountGuid,
24487
24560
  AccountSessionGUID: set.CatalogData.accountSessionGuid
24488
24561
  });
24489
24562
  case 4:
24490
- catalog = _context.sent;
24563
+ catalog = _context2.sent;
24491
24564
  (_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);
24492
- _context.next = 9;
24565
+ _context2.next = 9;
24493
24566
  break;
24494
24567
  case 8:
24495
24568
  catalog = set.CatalogData;
@@ -24498,68 +24571,62 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24498
24571
  //usecase der selbe Article wurde bereits verplant. nun kann die bereits geladene & verwendete Klasse catalogArticle wiederverwendet werden da wir dort nichts
24499
24572
  //während der Konfiguration verändern!
24500
24573
  if (!catalogArticle) {
24501
- _context.next = 18;
24574
+ _context2.next = 17;
24502
24575
  break;
24503
24576
  }
24504
24577
  if (!catalogArticle.areOptionsToLoad) {
24505
- _context.next = 14;
24578
+ _context2.next = 14;
24506
24579
  break;
24507
24580
  }
24508
- _context.next = 14;
24581
+ _context2.next = 14;
24509
24582
  return this.loadArticleData(set, catalogArticle, catalog);
24510
24583
  case 14:
24511
- newBasketId = initParams.basketId ? initParams.basketId : 'B' + nanoid();
24512
- return _context.abrupt("return", new DivaArticle(set, newBasketId, initParams, catalogArticle, catalog));
24513
- case 18:
24514
- //articleCodex does not exist anymore in catalog
24515
- LOG$b.error(new DivaError('articleCodex not found in article list. Could be due to exclusivity or a bug in the application!', {
24516
- code: 'WC_0011',
24517
- custom: {
24518
- articleCodex: articleCodex
24519
- }
24520
- }));
24521
- (_set$actions = set.actions) === null || _set$actions === void 0 || _set$actions.openModal({
24522
- accept: true,
24523
- title: set.i18n.t('modals.error_accured')
24584
+ return _context2.abrupt("return", {
24585
+ catalog: catalog,
24586
+ catalogArticle: catalogArticle
24524
24587
  });
24525
- return _context.abrupt("return", false);
24526
- case 21:
24588
+ case 17:
24589
+ return _context2.abrupt("return", {
24590
+ catalog: catalog,
24591
+ catalogArticle: catalogArticle
24592
+ });
24593
+ case 18:
24527
24594
  case "end":
24528
- return _context.stop();
24595
+ return _context2.stop();
24529
24596
  }
24530
- }, _callee, this);
24597
+ }, _callee2, this);
24531
24598
  }));
24532
- function loadArticle(_x, _x2, _x3) {
24533
- return _loadArticle.apply(this, arguments);
24599
+ function preLoadArticle(_x4, _x5, _x6) {
24600
+ return _preLoadArticle.apply(this, arguments);
24534
24601
  }
24535
- return loadArticle;
24602
+ return preLoadArticle;
24536
24603
  }()
24537
24604
  }, {
24538
24605
  key: "loadArticleData",
24539
24606
  value: function () {
24540
- var _loadArticleData = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(set, catalogArticle, catalog) {
24607
+ var _loadArticleData = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(set, catalogArticle, catalog) {
24541
24608
  var catalogCodex, promises, _yield$Promise$all, _yield$Promise$all2, jsonPrices, jsonOption;
24542
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
24543
- while (1) switch (_context2.prev = _context2.next) {
24609
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
24610
+ while (1) switch (_context3.prev = _context3.next) {
24544
24611
  case 0:
24545
24612
  //ArticleRelations und J3D und Partlists bekommt man jetzt noch
24546
24613
  catalogCodex = catalog.catalogCodex;
24547
- _context2.t0 = catalogArticle;
24548
- _context2.next = 4;
24614
+ _context3.t0 = catalogArticle;
24615
+ _context3.next = 4;
24549
24616
  return set.api.getArticleJson(catalogArticle.articleCodex, catalogCodex, catalog.accountSessionGuid);
24550
24617
  case 4:
24551
- _context2.t1 = _context2.sent;
24552
- _context2.t2 = catalog;
24553
- _context2.t0.loadMoreFromArticle.call(_context2.t0, _context2.t1, _context2.t2);
24618
+ _context3.t1 = _context3.sent;
24619
+ _context3.t2 = catalog;
24620
+ _context3.t0.loadMoreFromArticle.call(_context3.t0, _context3.t1, _context3.t2);
24554
24621
  if (!catalogArticle.templateCodex) {
24555
- _context2.next = 17;
24622
+ _context3.next = 17;
24556
24623
  break;
24557
24624
  }
24558
24625
  promises = [set.api.loadArticlePricesQS(catalogArticle.articleCodex, catalogCodex, catalog.accountSessionGuid), set.api.getJsonOptionTree(catalogArticle.templateCodex, catalogCodex, catalog.accountSessionGuid)];
24559
- _context2.next = 11;
24626
+ _context3.next = 11;
24560
24627
  return Promise.all(promises);
24561
24628
  case 11:
24562
- _yield$Promise$all = _context2.sent;
24629
+ _yield$Promise$all = _context3.sent;
24563
24630
  _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
24564
24631
  jsonPrices = _yield$Promise$all2[0];
24565
24632
  jsonOption = _yield$Promise$all2[1];
@@ -24569,11 +24636,11 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24569
24636
  catalogArticle.areOptionsLoaded = true;
24570
24637
  case 18:
24571
24638
  case "end":
24572
- return _context2.stop();
24639
+ return _context3.stop();
24573
24640
  }
24574
- }, _callee2);
24641
+ }, _callee3);
24575
24642
  }));
24576
- function loadArticleData(_x4, _x5, _x6) {
24643
+ function loadArticleData(_x7, _x8, _x9) {
24577
24644
  return _loadArticleData.apply(this, arguments);
24578
24645
  }
24579
24646
  return loadArticleData;
@@ -24581,24 +24648,24 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24581
24648
  }, {
24582
24649
  key: "updateAccessoireQuantity",
24583
24650
  value: function () {
24584
- var _updateAccessoireQuantity = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(accessoire, newQuantity) {
24585
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
24586
- while (1) switch (_context3.prev = _context3.next) {
24651
+ var _updateAccessoireQuantity = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(accessoire, newQuantity) {
24652
+ return _regeneratorRuntime.wrap(function _callee4$(_context4) {
24653
+ while (1) switch (_context4.prev = _context4.next) {
24587
24654
  case 0:
24588
24655
  accessoire.quantity = newQuantity;
24589
24656
  if (!(accessoire.articleType == 'OPTION' || accessoire.articleType == 'OPTIONTREE')) {
24590
- _context3.next = 4;
24657
+ _context4.next = 4;
24591
24658
  break;
24592
24659
  }
24593
- _context3.next = 4;
24660
+ _context4.next = 4;
24594
24661
  return this.updateCfgValues(accessoire, {}, {});
24595
24662
  case 4:
24596
24663
  case "end":
24597
- return _context3.stop();
24664
+ return _context4.stop();
24598
24665
  }
24599
- }, _callee3, this);
24666
+ }, _callee4, this);
24600
24667
  }));
24601
- function updateAccessoireQuantity(_x7, _x8) {
24668
+ function updateAccessoireQuantity(_x10, _x11) {
24602
24669
  return _updateAccessoireQuantity.apply(this, arguments);
24603
24670
  }
24604
24671
  return updateAccessoireQuantity;
@@ -24606,33 +24673,33 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24606
24673
  }, {
24607
24674
  key: "toDoAfterArticleLoaded",
24608
24675
  value: function () {
24609
- var _toDoAfterArticleLoaded = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(article, defaultValues, variantValues, from, variantItems, ignorePlanner) {
24610
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
24611
- while (1) switch (_context4.prev = _context4.next) {
24676
+ var _toDoAfterArticleLoaded = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(article, defaultValues, variantValues, from, variantItems, ignorePlanner) {
24677
+ return _regeneratorRuntime.wrap(function _callee5$(_context5) {
24678
+ while (1) switch (_context5.prev = _context5.next) {
24612
24679
  case 0:
24613
24680
  if (!(article.articleType == 'OPTION' || article.articleType == 'OPTIONTREE')) {
24614
- _context4.next = 8;
24681
+ _context5.next = 8;
24615
24682
  break;
24616
24683
  }
24617
- _context4.next = 3;
24684
+ _context5.next = 3;
24618
24685
  return this.initCfgValues(article, variantValues, variantItems);
24619
24686
  case 3:
24620
- _context4.next = 5;
24687
+ _context5.next = 5;
24621
24688
  return this.updateCfgValues(article, defaultValues, variantValues);
24622
24689
  case 5:
24623
24690
  if (!(article.set.PlannerMode !== 'BoxPlanner')) {
24624
- _context4.next = 8;
24691
+ _context5.next = 8;
24625
24692
  break;
24626
24693
  }
24627
- _context4.next = 8;
24694
+ _context5.next = 8;
24628
24695
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(article.set, defaultValues, [article.basketId], ignorePlanner, from);
24629
24696
  case 8:
24630
24697
  case "end":
24631
- return _context4.stop();
24698
+ return _context5.stop();
24632
24699
  }
24633
- }, _callee4, this);
24700
+ }, _callee5, this);
24634
24701
  }));
24635
- function toDoAfterArticleLoaded(_x9, _x10, _x11, _x12, _x13, _x14) {
24702
+ function toDoAfterArticleLoaded(_x12, _x13, _x14, _x15, _x16, _x17) {
24636
24703
  return _toDoAfterArticleLoaded.apply(this, arguments);
24637
24704
  }
24638
24705
  return toDoAfterArticleLoaded;
@@ -24651,11 +24718,11 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24651
24718
  }, {
24652
24719
  key: "updateArticlesOptionStates",
24653
24720
  value: function () {
24654
- var _updateArticlesOptionStates = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(myValues, targetArticlesWithNewValues, targetArticlesToUpdate, articles, from) {
24721
+ var _updateArticlesOptionStates = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(myValues, targetArticlesWithNewValues, targetArticlesToUpdate, articles, from) {
24655
24722
  var _articles$targetArtic;
24656
24723
  var newEDOExtraArticles, partlistArticlesToLoad, valuesArray, i, actArticle, newPartlistArticlesToLoad, _actArticle$checkDefa, variantValues, triggerUpdate, key, configuredArticle, toIgnore, _actArticle, _i, _actArticle2;
24657
- return _regeneratorRuntime.wrap(function _callee5$(_context5) {
24658
- while (1) switch (_context5.prev = _context5.next) {
24724
+ return _regeneratorRuntime.wrap(function _callee6$(_context6) {
24725
+ while (1) switch (_context6.prev = _context6.next) {
24659
24726
  case 0:
24660
24727
  newEDOExtraArticles = [];
24661
24728
  partlistArticlesToLoad = [];
@@ -24663,124 +24730,124 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24663
24730
  i = 0;
24664
24731
  case 4:
24665
24732
  if (!(i < targetArticlesToUpdate.length)) {
24666
- _context5.next = 40;
24733
+ _context6.next = 40;
24667
24734
  break;
24668
24735
  }
24669
24736
  valuesArray[i] = {};
24670
24737
  actArticle = articles[targetArticlesToUpdate[i]];
24671
24738
  if (!(!actArticle || actArticle.deleted)) {
24672
- _context5.next = 11;
24739
+ _context6.next = 11;
24673
24740
  break;
24674
24741
  }
24675
24742
  targetArticlesToUpdate.splice(i, 1);
24676
24743
  i--;
24677
- return _context5.abrupt("continue", 37);
24744
+ return _context6.abrupt("continue", 37);
24678
24745
  case 11:
24679
24746
  if (targetArticlesWithNewValues.includes(targetArticlesToUpdate[i])) {
24680
24747
  valuesArray[i] = actArticle.getValidValues(_objectSpread$c({}, myValues), actArticle.CatalogData.mergeOptionsToSameOption);
24681
24748
  }
24682
24749
  if (!(Object.entries(valuesArray[i]).length > 0 || from !== null && from !== void 0 && from.startsWith('initializing'))) {
24683
- _context5.next = 32;
24750
+ _context6.next = 32;
24684
24751
  break;
24685
24752
  }
24686
- _context5.next = 15;
24753
+ _context6.next = 15;
24687
24754
  return this.updateCfgValues(actArticle, valuesArray[i], {});
24688
24755
  case 15:
24689
- newPartlistArticlesToLoad = _context5.sent;
24756
+ newPartlistArticlesToLoad = _context6.sent;
24690
24757
  _actArticle$checkDefa = actArticle.checkDefaultGlobalOpt(valuesArray[i]), variantValues = _actArticle$checkDefa.variantValues, triggerUpdate = _actArticle$checkDefa.triggerUpdate;
24691
24758
  valuesArray[i] = variantValues;
24692
- _context5.next = 20;
24759
+ _context6.next = 20;
24693
24760
  return this.updateAccessoriesFromGlobalOption(valuesArray[i], actArticle);
24694
24761
  case 20:
24695
24762
  if (!triggerUpdate) {
24696
- _context5.next = 28;
24763
+ _context6.next = 28;
24697
24764
  break;
24698
24765
  }
24699
- _context5.t0 = partlistArticlesToLoad;
24700
- _context5.next = 24;
24766
+ _context6.t0 = partlistArticlesToLoad;
24767
+ _context6.next = 24;
24701
24768
  return this.updateCfgValues(actArticle, valuesArray[i], {});
24702
24769
  case 24:
24703
- _context5.t1 = _context5.sent;
24704
- partlistArticlesToLoad = _context5.t0.concat.call(_context5.t0, _context5.t1);
24705
- _context5.next = 29;
24770
+ _context6.t1 = _context6.sent;
24771
+ partlistArticlesToLoad = _context6.t0.concat.call(_context6.t0, _context6.t1);
24772
+ _context6.next = 29;
24706
24773
  break;
24707
24774
  case 28:
24708
24775
  partlistArticlesToLoad = partlistArticlesToLoad.concat(newPartlistArticlesToLoad);
24709
24776
  case 29:
24710
24777
  newEDOExtraArticles = this.checkEDOArticles(articles);
24711
- _context5.next = 37;
24778
+ _context6.next = 37;
24712
24779
  break;
24713
24780
  case 32:
24714
- _context5.t2 = partlistArticlesToLoad;
24715
- _context5.next = 35;
24781
+ _context6.t2 = partlistArticlesToLoad;
24782
+ _context6.next = 35;
24716
24783
  return this.updateCfgValues(actArticle, {}, {});
24717
24784
  case 35:
24718
- _context5.t3 = _context5.sent;
24719
- partlistArticlesToLoad = _context5.t2.concat.call(_context5.t2, _context5.t3);
24785
+ _context6.t3 = _context6.sent;
24786
+ partlistArticlesToLoad = _context6.t2.concat.call(_context6.t2, _context6.t3);
24720
24787
  case 37:
24721
24788
  i++;
24722
- _context5.next = 4;
24789
+ _context6.next = 4;
24723
24790
  break;
24724
24791
  case 40:
24725
24792
  if (!((_articles$targetArtic = articles[targetArticlesToUpdate[0]]) !== null && _articles$targetArtic !== void 0 && _articles$targetArtic.hasPartlistArticleVisibleInTree)) {
24726
- _context5.next = 53;
24793
+ _context6.next = 53;
24727
24794
  break;
24728
24795
  }
24729
- _context5.t4 = _regeneratorRuntime.keys(articles);
24796
+ _context6.t4 = _regeneratorRuntime.keys(articles);
24730
24797
  case 42:
24731
- if ((_context5.t5 = _context5.t4()).done) {
24732
- _context5.next = 53;
24798
+ if ((_context6.t5 = _context6.t4()).done) {
24799
+ _context6.next = 53;
24733
24800
  break;
24734
24801
  }
24735
- key = _context5.t5.value;
24802
+ key = _context6.t5.value;
24736
24803
  configuredArticle = articles[targetArticlesToUpdate[0]];
24737
24804
  toIgnore = configuredArticle.pushParentId();
24738
24805
  if (![configuredArticle.basketId].concat(_toConsumableArray(toIgnore)).includes(key)) {
24739
- _context5.next = 48;
24806
+ _context6.next = 48;
24740
24807
  break;
24741
24808
  }
24742
- return _context5.abrupt("continue", 42);
24809
+ return _context6.abrupt("continue", 42);
24743
24810
  case 48:
24744
24811
  _actArticle = articles[key];
24745
- _context5.next = 51;
24812
+ _context6.next = 51;
24746
24813
  return this.updateCfgValues(_actArticle, {}, {});
24747
24814
  case 51:
24748
- _context5.next = 42;
24815
+ _context6.next = 42;
24749
24816
  break;
24750
24817
  case 53:
24751
24818
  _i = 0;
24752
24819
  case 54:
24753
24820
  if (!(_i < targetArticlesToUpdate.length)) {
24754
- _context5.next = 64;
24821
+ _context6.next = 64;
24755
24822
  break;
24756
24823
  }
24757
24824
  _actArticle2 = articles[targetArticlesToUpdate[_i]];
24758
24825
  if (!(_actArticle2.CatalogData.doubleClickOnConfig || _actArticle2.hasType1Dependencies)) {
24759
- _context5.next = 61;
24826
+ _context6.next = 61;
24760
24827
  break;
24761
24828
  }
24762
- _context5.next = 59;
24829
+ _context6.next = 59;
24763
24830
  return this.updateCfgValues(_actArticle2, valuesArray[_i], {});
24764
24831
  case 59:
24765
- _context5.next = 61;
24832
+ _context6.next = 61;
24766
24833
  return this.updateCfgValues(_actArticle2, valuesArray[_i], {});
24767
24834
  case 61:
24768
24835
  _i++;
24769
- _context5.next = 54;
24836
+ _context6.next = 54;
24770
24837
  break;
24771
24838
  case 64:
24772
- return _context5.abrupt("return", {
24839
+ return _context6.abrupt("return", {
24773
24840
  newEDOExtraArticles: newEDOExtraArticles,
24774
24841
  targetArticlesToUpdate: targetArticlesToUpdate,
24775
24842
  partlistArticlesToLoad: partlistArticlesToLoad
24776
24843
  });
24777
24844
  case 65:
24778
24845
  case "end":
24779
- return _context5.stop();
24846
+ return _context6.stop();
24780
24847
  }
24781
- }, _callee5, this);
24848
+ }, _callee6, this);
24782
24849
  }));
24783
- function updateArticlesOptionStates(_x15, _x16, _x17, _x18, _x19) {
24850
+ function updateArticlesOptionStates(_x18, _x19, _x20, _x21, _x22) {
24784
24851
  return _updateArticlesOptionStates.apply(this, arguments);
24785
24852
  }
24786
24853
  return updateArticlesOptionStates;
@@ -24788,31 +24855,31 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24788
24855
  }, {
24789
24856
  key: "updateAccessoriesFromGlobalOption",
24790
24857
  value: function () {
24791
- var _updateAccessoriesFromGlobalOption = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(values, actArticle) {
24858
+ var _updateAccessoriesFromGlobalOption = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(values, actArticle) {
24792
24859
  var accessoiresToUpdate, key;
24793
- return _regeneratorRuntime.wrap(function _callee6$(_context6) {
24794
- while (1) switch (_context6.prev = _context6.next) {
24860
+ return _regeneratorRuntime.wrap(function _callee7$(_context7) {
24861
+ while (1) switch (_context7.prev = _context7.next) {
24795
24862
  case 0:
24796
24863
  accessoiresToUpdate = actArticle.getAccessoriesToChangeFromGlobalOption(values);
24797
- _context6.t0 = _regeneratorRuntime.keys(accessoiresToUpdate);
24864
+ _context7.t0 = _regeneratorRuntime.keys(accessoiresToUpdate);
24798
24865
  case 2:
24799
- if ((_context6.t1 = _context6.t0()).done) {
24800
- _context6.next = 8;
24866
+ if ((_context7.t1 = _context7.t0()).done) {
24867
+ _context7.next = 8;
24801
24868
  break;
24802
24869
  }
24803
- key = _context6.t1.value;
24804
- _context6.next = 6;
24870
+ key = _context7.t1.value;
24871
+ _context7.next = 6;
24805
24872
  return this.updateCfgValues(accessoiresToUpdate[key].accessoire, accessoiresToUpdate[key].variantValues, {});
24806
24873
  case 6:
24807
- _context6.next = 2;
24874
+ _context7.next = 2;
24808
24875
  break;
24809
24876
  case 8:
24810
24877
  case "end":
24811
- return _context6.stop();
24878
+ return _context7.stop();
24812
24879
  }
24813
- }, _callee6, this);
24880
+ }, _callee7, this);
24814
24881
  }));
24815
- function updateAccessoriesFromGlobalOption(_x20, _x21) {
24882
+ function updateAccessoriesFromGlobalOption(_x23, _x24) {
24816
24883
  return _updateAccessoriesFromGlobalOption.apply(this, arguments);
24817
24884
  }
24818
24885
  return updateAccessoriesFromGlobalOption;
@@ -24890,12 +24957,12 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24890
24957
  }, {
24891
24958
  key: "initCfgValues",
24892
24959
  value: (function () {
24893
- var _initCfgValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(article, variantValues,
24960
+ var _initCfgValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(article, variantValues,
24894
24961
  // Werte aus einem Basiskonfigurat,
24895
24962
  variantItems) {
24896
24963
  var myCatalogArticleOptions, articleOptionState, key, _article$set$ViewConf, optionState, attr, foundItem, _foundItem$opt, freeText, _key, myArtOPS, value, optionValueCodex, i, variantItem, possibleValues, j, possibleValue, _i2, _variantItem, val;
24897
- return _regeneratorRuntime.wrap(function _callee7$(_context7) {
24898
- while (1) switch (_context7.prev = _context7.next) {
24964
+ return _regeneratorRuntime.wrap(function _callee8$(_context8) {
24965
+ while (1) switch (_context8.prev = _context8.next) {
24899
24966
  case 0:
24900
24967
  myCatalogArticleOptions = article.catalogArticleOptions;
24901
24968
  articleOptionState = article.articleOptionStates;
@@ -24975,11 +25042,11 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24975
25042
  }
24976
25043
  case 4:
24977
25044
  case "end":
24978
- return _context7.stop();
25045
+ return _context8.stop();
24979
25046
  }
24980
- }, _callee7);
25047
+ }, _callee8);
24981
25048
  }));
24982
- function initCfgValues(_x22, _x23, _x24) {
25049
+ function initCfgValues(_x25, _x26, _x27) {
24983
25050
  return _initCfgValues.apply(this, arguments);
24984
25051
  }
24985
25052
  return initCfgValues;
@@ -24987,19 +25054,19 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24987
25054
  }, {
24988
25055
  key: "setValidVariantValues",
24989
25056
  value: function () {
24990
- var _setValidVariantValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(article) {
24991
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
24992
- while (1) switch (_context8.prev = _context8.next) {
25057
+ var _setValidVariantValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(article) {
25058
+ return _regeneratorRuntime.wrap(function _callee9$(_context9) {
25059
+ while (1) switch (_context9.prev = _context9.next) {
24993
25060
  case 0:
24994
- _context8.next = 2;
25061
+ _context9.next = 2;
24995
25062
  return this.updateCfgValues(article, article.getValidValues(article.VariantValues, undefined, true), {});
24996
25063
  case 2:
24997
25064
  case "end":
24998
- return _context8.stop();
25065
+ return _context9.stop();
24999
25066
  }
25000
- }, _callee8, this);
25067
+ }, _callee9, this);
25001
25068
  }));
25002
- function setValidVariantValues(_x25) {
25069
+ function setValidVariantValues(_x28) {
25003
25070
  return _setValidVariantValues.apply(this, arguments);
25004
25071
  }
25005
25072
  return setValidVariantValues;
@@ -25016,10 +25083,10 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25016
25083
  }, {
25017
25084
  key: "updateCfgValues",
25018
25085
  value: (function () {
25019
- var _updateCfgValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(article, newConfigValues, alreadyInitializedValues, dontCalcPrice, dontLoadPartlist) {
25086
+ var _updateCfgValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(article, newConfigValues, alreadyInitializedValues, dontCalcPrice, dontLoadPartlist) {
25020
25087
  var maxPriceOfGroupCodex, setByFeatureVariantValues, key, partlistArticlesToLoad;
25021
- return _regeneratorRuntime.wrap(function _callee9$(_context9) {
25022
- while (1) switch (_context9.prev = _context9.next) {
25088
+ return _regeneratorRuntime.wrap(function _callee10$(_context10) {
25089
+ while (1) switch (_context10.prev = _context10.next) {
25023
25090
  case 0:
25024
25091
  if (!!article.CatalogData.bundleRules) dontLoadPartlist = true;
25025
25092
  //es wird versucht die neuen Optionswerte zu setzten
@@ -25052,20 +25119,20 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25052
25119
  }
25053
25120
 
25054
25121
  //await -> partlist berechnung und laden
25055
- _context9.next = 8;
25122
+ _context10.next = 8;
25056
25123
  return article.updateShelfPlannerState();
25057
25124
  case 8:
25058
25125
  if (dontCalcPrice) {
25059
- _context9.next = 11;
25126
+ _context10.next = 11;
25060
25127
  break;
25061
25128
  }
25062
- _context9.next = 11;
25129
+ _context10.next = 11;
25063
25130
  return this.updateLastElement(article);
25064
25131
  case 11:
25065
- _context9.next = 13;
25132
+ _context10.next = 13;
25066
25133
  return this.evalAndLoadPartlistArticles(article, dontLoadPartlist, newConfigValues);
25067
25134
  case 13:
25068
- partlistArticlesToLoad = _context9.sent;
25135
+ partlistArticlesToLoad = _context10.sent;
25069
25136
  // löscht seine eigene partlist article - optimierung schnittmenge nicht löschen und nur neu neu laden
25070
25137
 
25071
25138
  //evalConstructionRules ausswerten
@@ -25082,14 +25149,14 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25082
25149
  //evtl opv images mit rules updaten
25083
25150
  article.updateOPVImages();
25084
25151
  }
25085
- return _context9.abrupt("return", partlistArticlesToLoad);
25152
+ return _context10.abrupt("return", partlistArticlesToLoad);
25086
25153
  case 17:
25087
25154
  case "end":
25088
- return _context9.stop();
25155
+ return _context10.stop();
25089
25156
  }
25090
- }, _callee9, this);
25157
+ }, _callee10, this);
25091
25158
  }));
25092
- function updateCfgValues(_x26, _x27, _x28, _x29, _x30) {
25159
+ function updateCfgValues(_x29, _x30, _x31, _x32, _x33) {
25093
25160
  return _updateCfgValues.apply(this, arguments);
25094
25161
  }
25095
25162
  return updateCfgValues;
@@ -25097,10 +25164,10 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25097
25164
  }, {
25098
25165
  key: "updateLastElement",
25099
25166
  value: function () {
25100
- var _updateLastElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(article) {
25167
+ var _updateLastElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(article) {
25101
25168
  var opsLastElement, lastElement, opsLastPlannedAccessoire, opsFirstAccessoire, _article$accessoirePa, _article$accessoirePa2, accessoires, i;
25102
- return _regeneratorRuntime.wrap(function _callee10$(_context10) {
25103
- while (1) switch (_context10.prev = _context10.next) {
25169
+ return _regeneratorRuntime.wrap(function _callee11$(_context11) {
25170
+ while (1) switch (_context11.prev = _context11.next) {
25104
25171
  case 0:
25105
25172
  opsLastElement = article.getArticleOptionState('OPTELEMENTPOSITION');
25106
25173
  if (opsLastElement) {
@@ -25123,29 +25190,29 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25123
25190
  }
25124
25191
  opsFirstAccessoire = article.getArticleOptionState('OPTFIRSTACCESSOIRE');
25125
25192
  if (!opsFirstAccessoire) {
25126
- _context10.next = 14;
25193
+ _context11.next = 14;
25127
25194
  break;
25128
25195
  }
25129
25196
  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 : [];
25130
25197
  i = 0;
25131
25198
  case 8:
25132
25199
  if (!(i < accessoires.length)) {
25133
- _context10.next = 14;
25200
+ _context11.next = 14;
25134
25201
  break;
25135
25202
  }
25136
- _context10.next = 11;
25203
+ _context11.next = 11;
25137
25204
  return this.updateOption(accessoires[i], 'OPTFIRSTACCESSOIRE', 'OPV' + (i + 1).toString(), i === 0 ? 'OPVFIRSTACCESSOIRE' : 'OPVNOTFIRSTACCESSOIRE');
25138
25205
  case 11:
25139
25206
  i++;
25140
- _context10.next = 8;
25207
+ _context11.next = 8;
25141
25208
  break;
25142
25209
  case 14:
25143
25210
  case "end":
25144
- return _context10.stop();
25211
+ return _context11.stop();
25145
25212
  }
25146
- }, _callee10, this);
25213
+ }, _callee11, this);
25147
25214
  }));
25148
- function updateLastElement(_x31) {
25215
+ function updateLastElement(_x34) {
25149
25216
  return _updateLastElement.apply(this, arguments);
25150
25217
  }
25151
25218
  return updateLastElement;
@@ -25153,41 +25220,41 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25153
25220
  }, {
25154
25221
  key: "updateOption",
25155
25222
  value: function () {
25156
- var _updateOption = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(article, optionCodex, newCodex, fallbackNewCodex) {
25223
+ var _updateOption = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(article, optionCodex, newCodex, fallbackNewCodex) {
25157
25224
  var _ops$val, _ops$visibleOptionVal;
25158
25225
  var ops, oldCodex, newVal;
25159
- return _regeneratorRuntime.wrap(function _callee11$(_context11) {
25160
- while (1) switch (_context11.prev = _context11.next) {
25226
+ return _regeneratorRuntime.wrap(function _callee12$(_context12) {
25227
+ while (1) switch (_context12.prev = _context12.next) {
25161
25228
  case 0:
25162
25229
  ops = article.getArticleOptionState(optionCodex);
25163
25230
  if (ops) {
25164
- _context11.next = 3;
25231
+ _context12.next = 3;
25165
25232
  break;
25166
25233
  }
25167
- return _context11.abrupt("return");
25234
+ return _context12.abrupt("return");
25168
25235
  case 3:
25169
25236
  oldCodex = (_ops$val = ops.val) === null || _ops$val === void 0 ? void 0 : _ops$val.codex;
25170
25237
  newVal = (_ops$visibleOptionVal = ops.visibleOptionValues[newCodex]) !== null && _ops$visibleOptionVal !== void 0 ? _ops$visibleOptionVal : fallbackNewCodex ? ops.visibleOptionValues[fallbackNewCodex] : undefined;
25171
25238
  if (!(oldCodex === (newVal === null || newVal === void 0 ? void 0 : newVal.codex))) {
25172
- _context11.next = 7;
25239
+ _context12.next = 7;
25173
25240
  break;
25174
25241
  }
25175
- return _context11.abrupt("return");
25242
+ return _context12.abrupt("return");
25176
25243
  case 7:
25177
25244
  if (!newVal) {
25178
- _context11.next = 11;
25245
+ _context12.next = 11;
25179
25246
  break;
25180
25247
  }
25181
25248
  ops.val = newVal;
25182
- _context11.next = 11;
25249
+ _context12.next = 11;
25183
25250
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(article.set, {}, []);
25184
25251
  case 11:
25185
25252
  case "end":
25186
- return _context11.stop();
25253
+ return _context12.stop();
25187
25254
  }
25188
- }, _callee11);
25255
+ }, _callee12);
25189
25256
  }));
25190
- function updateOption(_x32, _x33, _x34, _x35) {
25257
+ function updateOption(_x35, _x36, _x37, _x38) {
25191
25258
  return _updateOption.apply(this, arguments);
25192
25259
  }
25193
25260
  return updateOption;
@@ -25197,23 +25264,23 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25197
25264
  }, {
25198
25265
  key: "evalAndLoadPartlistArticles",
25199
25266
  value: (function () {
25200
- var _evalAndLoadPartlistArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(article, dontLoadPartlist, newConfigValues) {
25267
+ var _evalAndLoadPartlistArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(article, dontLoadPartlist, newConfigValues) {
25201
25268
  var partlistArticlesToLoad;
25202
- return _regeneratorRuntime.wrap(function _callee12$(_context12) {
25203
- while (1) switch (_context12.prev = _context12.next) {
25269
+ return _regeneratorRuntime.wrap(function _callee13$(_context13) {
25270
+ while (1) switch (_context13.prev = _context13.next) {
25204
25271
  case 0:
25205
25272
  partlistArticlesToLoad = [];
25206
25273
  if (!article.hasPartlistArticle) {
25207
- _context12.next = 8;
25274
+ _context13.next = 8;
25208
25275
  break;
25209
25276
  }
25210
25277
  article.deletePartlistArticles(); //alle aktellen PartlistArticles des Articles löschen!
25211
25278
  partlistArticlesToLoad = article.evalPartlist(newConfigValues);
25212
25279
  if (dontLoadPartlist) {
25213
- _context12.next = 8;
25280
+ _context13.next = 8;
25214
25281
  break;
25215
25282
  }
25216
- _context12.next = 7;
25283
+ _context13.next = 7;
25217
25284
  return this.loadPartlistArticles(partlistArticlesToLoad, article, article.VariantValues);
25218
25285
  case 7:
25219
25286
  partlistArticlesToLoad = [];
@@ -25222,14 +25289,14 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25222
25289
  partlistArticlesToLoad = this.bundlePartlistArticles(partlistArticlesToLoad, article.bundleRules, _defineProperty({}, article.basketId, article));
25223
25290
  }
25224
25291
  article.hasPartlistArticleInitialized = true;
25225
- return _context12.abrupt("return", partlistArticlesToLoad);
25292
+ return _context13.abrupt("return", partlistArticlesToLoad);
25226
25293
  case 11:
25227
25294
  case "end":
25228
- return _context12.stop();
25295
+ return _context13.stop();
25229
25296
  }
25230
- }, _callee12, this);
25297
+ }, _callee13, this);
25231
25298
  }));
25232
- function evalAndLoadPartlistArticles(_x36, _x37, _x38) {
25299
+ function evalAndLoadPartlistArticles(_x39, _x40, _x41) {
25233
25300
  return _evalAndLoadPartlistArticles.apply(this, arguments);
25234
25301
  }
25235
25302
  return evalAndLoadPartlistArticles;
@@ -25237,32 +25304,41 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25237
25304
  }, {
25238
25305
  key: "loadPartlistArticles",
25239
25306
  value: function () {
25240
- var _loadPartlistArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(partlistArticlesToLoad, article, newConfigValues) {
25241
- var i;
25242
- return _regeneratorRuntime.wrap(function _callee13$(_context13) {
25243
- while (1) switch (_context13.prev = _context13.next) {
25307
+ var _loadPartlistArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(partlistArticlesToLoad, article, newConfigValues) {
25308
+ var loadAwaits, i, doLoadItem;
25309
+ return _regeneratorRuntime.wrap(function _callee14$(_context14) {
25310
+ while (1) switch (_context14.prev = _context14.next) {
25244
25311
  case 0:
25312
+ //make all api calls of all the partlistarticles at the same time but initialize them still synced
25313
+ loadAwaits = [];
25314
+ for (i = 0; i < partlistArticlesToLoad.length; i++) {
25315
+ doLoadItem = partlistArticlesToLoad[i];
25316
+ loadAwaits.push(this.preLoadArticle(article.set, doLoadItem.ArticleCodex, this.partlistArticleInitData(article, doLoadItem)));
25317
+ }
25318
+ _context14.next = 4;
25319
+ return Promise.all(loadAwaits);
25320
+ case 4:
25245
25321
  i = 0;
25246
- case 1:
25322
+ case 5:
25247
25323
  if (!(i < partlistArticlesToLoad.length)) {
25248
- _context13.next = 7;
25324
+ _context14.next = 11;
25249
25325
  break;
25250
25326
  }
25251
- _context13.next = 4;
25327
+ _context14.next = 8;
25252
25328
  return this.loadPartlistArticle(partlistArticlesToLoad[i], article, newConfigValues);
25253
- case 4:
25329
+ case 8:
25254
25330
  i++;
25255
- _context13.next = 1;
25331
+ _context14.next = 5;
25256
25332
  break;
25257
- case 7:
25333
+ case 11:
25258
25334
  article.sortPartlistArticles(partlistArticlesToLoad);
25259
- case 8:
25335
+ case 12:
25260
25336
  case "end":
25261
- return _context13.stop();
25337
+ return _context14.stop();
25262
25338
  }
25263
- }, _callee13, this);
25339
+ }, _callee14, this);
25264
25340
  }));
25265
- function loadPartlistArticles(_x39, _x40, _x41) {
25341
+ function loadPartlistArticles(_x42, _x43, _x44) {
25266
25342
  return _loadPartlistArticles.apply(this, arguments);
25267
25343
  }
25268
25344
  return loadPartlistArticles;
@@ -25271,60 +25347,64 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25271
25347
  }, {
25272
25348
  key: "loadPartlistArticle",
25273
25349
  value: function () {
25274
- var _loadPartlistArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(doLoadItem, article, newConfigValues) {
25275
- var parentVariantValues, initParams, nArticle;
25276
- return _regeneratorRuntime.wrap(function _callee14$(_context14) {
25277
- while (1) switch (_context14.prev = _context14.next) {
25350
+ var _loadPartlistArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(doLoadItem, article, newConfigValues) {
25351
+ var nArticle;
25352
+ return _regeneratorRuntime.wrap(function _callee15$(_context15) {
25353
+ while (1) switch (_context15.prev = _context15.next) {
25278
25354
  case 0:
25279
- //jeder neue Artikel sollte im Warenkorb als Zubehörartikel gelistet werden - es können auch mehrere sein
25280
- parentVariantValues = article.getArticleJsonVariantValues(); //jetzt Artikel laden und zur Kollektion hinzufügen
25281
- initParams = {
25282
- plannerBasketID: article.basketId,
25283
- //Bei Ekornes gibt es Partlistartikels mit SVGs - Damit die BasketID im Plener weiter gültig ist, wird hier die Originale BasketID gemerkt.
25284
- quantity: doLoadItem.Quantity,
25285
- variantValues: parentVariantValues,
25286
- //Objektstruktur
25287
- relatedToBasketId: article.basketId,
25288
- parentArticle: article,
25289
- isPartlistArticle: true,
25290
- ruleDesc: doLoadItem.RuleDesc,
25291
- ruleDesc_locales: doLoadItem.RuleDesc_locales,
25292
- basketId: doLoadItem.BasketID,
25293
- partlistRule: doLoadItem.PartlistRule,
25294
- retailArticleNr: doLoadItem.RetailArticleNr,
25295
- retailPrefix: doLoadItem.RetailPrefix,
25296
- configArticleCodex: doLoadItem.RetailArticleNr,
25297
- supplierOrderCodex: doLoadItem.SupplierOrderCodex,
25298
- initDecisions: doLoadItem.initDecisions,
25299
- partlistArticleVisibleInTree: doLoadItem.PosInvisibility === 0,
25300
- optionsForPrint: doLoadItem.optionsForPrint,
25301
- optionImgForPrint: doLoadItem.optionImgForPrint,
25302
- catalogCodex: doLoadItem.CatalogCodex
25303
- };
25304
- _context14.next = 4;
25305
- return this.loadArticle(article.set, doLoadItem.ArticleCodex, initParams);
25306
- case 4:
25307
- nArticle = _context14.sent;
25355
+ _context15.next = 2;
25356
+ return this.loadArticle(article.set, doLoadItem.ArticleCodex, this.partlistArticleInitData(article, doLoadItem));
25357
+ case 2:
25358
+ nArticle = _context15.sent;
25308
25359
  if (!nArticle) {
25309
- _context14.next = 10;
25360
+ _context15.next = 8;
25310
25361
  break;
25311
25362
  }
25312
25363
  doLoadItem.BasketID = nArticle.basketId;
25313
- _context14.next = 9;
25364
+ _context15.next = 7;
25314
25365
  return this.toDoAfterArticleLoaded(nArticle, {}, _objectSpread$c(_objectSpread$c({}, doLoadItem.VariantValues), newConfigValues), 'initializingPartlist', doLoadItem.VariantItemData);
25315
- case 9:
25366
+ case 7:
25316
25367
  article.addPartlistArticle(nArticle);
25317
- case 10:
25368
+ case 8:
25318
25369
  case "end":
25319
- return _context14.stop();
25370
+ return _context15.stop();
25320
25371
  }
25321
- }, _callee14, this);
25372
+ }, _callee15, this);
25322
25373
  }));
25323
- function loadPartlistArticle(_x42, _x43, _x44) {
25374
+ function loadPartlistArticle(_x45, _x46, _x47) {
25324
25375
  return _loadPartlistArticle.apply(this, arguments);
25325
25376
  }
25326
25377
  return loadPartlistArticle;
25327
- }() /**************************************** Querkontrollen über mehrere Article deshalb hier im ArticleHandler ********************************************************************************/
25378
+ }()
25379
+ }, {
25380
+ key: "partlistArticleInitData",
25381
+ value: function partlistArticleInitData(article, doLoadItem) {
25382
+ //jetzt Artikel laden und zur Kollektion hinzufügen
25383
+ return {
25384
+ plannerBasketID: article.basketId,
25385
+ //Bei Ekornes gibt es Partlistartikels mit SVGs - Damit die BasketID im Plener weiter gültig ist, wird hier die Originale BasketID gemerkt.
25386
+ quantity: doLoadItem.Quantity,
25387
+ variantValues: article.getArticleJsonVariantValues(),
25388
+ //Objektstruktur
25389
+ relatedToBasketId: article.basketId,
25390
+ parentArticle: article,
25391
+ isPartlistArticle: true,
25392
+ ruleDesc: doLoadItem.RuleDesc,
25393
+ ruleDesc_locales: doLoadItem.RuleDesc_locales,
25394
+ basketId: doLoadItem.BasketID,
25395
+ partlistRule: doLoadItem.PartlistRule,
25396
+ retailArticleNr: doLoadItem.RetailArticleNr,
25397
+ retailPrefix: doLoadItem.RetailPrefix,
25398
+ configArticleCodex: doLoadItem.RetailArticleNr,
25399
+ supplierOrderCodex: doLoadItem.SupplierOrderCodex,
25400
+ initDecisions: doLoadItem.initDecisions,
25401
+ partlistArticleVisibleInTree: doLoadItem.PosInvisibility === 0,
25402
+ optionsForPrint: doLoadItem.optionsForPrint,
25403
+ optionImgForPrint: doLoadItem.optionImgForPrint,
25404
+ catalogCodex: doLoadItem.CatalogCodex
25405
+ };
25406
+ }
25407
+ /**************************************** Querkontrollen über mehrere Article deshalb hier im ArticleHandler ********************************************************************************/
25328
25408
  }, {
25329
25409
  key: "evalOpvsOnOpvsConstructionRules",
25330
25410
  value: function evalOpvsOnOpvsConstructionRules(article) {
@@ -25569,31 +25649,31 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25569
25649
  }, {
25570
25650
  key: "triggerShelfplannerVisibility",
25571
25651
  value: function () {
25572
- var _triggerShelfplannerVisibility = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(artices, gridGroup) {
25652
+ var _triggerShelfplannerVisibility = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(artices, gridGroup) {
25573
25653
  var key, _artice$shelfPlanner, artice;
25574
- return _regeneratorRuntime.wrap(function _callee15$(_context15) {
25575
- while (1) switch (_context15.prev = _context15.next) {
25654
+ return _regeneratorRuntime.wrap(function _callee16$(_context16) {
25655
+ while (1) switch (_context16.prev = _context16.next) {
25576
25656
  case 0:
25577
- _context15.t0 = _regeneratorRuntime.keys(artices);
25657
+ _context16.t0 = _regeneratorRuntime.keys(artices);
25578
25658
  case 1:
25579
- if ((_context15.t1 = _context15.t0()).done) {
25580
- _context15.next = 8;
25659
+ if ((_context16.t1 = _context16.t0()).done) {
25660
+ _context16.next = 8;
25581
25661
  break;
25582
25662
  }
25583
- key = _context15.t1.value;
25663
+ key = _context16.t1.value;
25584
25664
  artice = artices[key];
25585
- _context15.next = 6;
25665
+ _context16.next = 6;
25586
25666
  return (_artice$shelfPlanner = artice.shelfPlanner) === null || _artice$shelfPlanner === void 0 ? void 0 : _artice$shelfPlanner.triggerVisibility(gridGroup);
25587
25667
  case 6:
25588
- _context15.next = 1;
25668
+ _context16.next = 1;
25589
25669
  break;
25590
25670
  case 8:
25591
25671
  case "end":
25592
- return _context15.stop();
25672
+ return _context16.stop();
25593
25673
  }
25594
- }, _callee15);
25674
+ }, _callee16);
25595
25675
  }));
25596
- function triggerShelfplannerVisibility(_x45, _x46) {
25676
+ function triggerShelfplannerVisibility(_x48, _x49) {
25597
25677
  return _triggerShelfplannerVisibility.apply(this, arguments);
25598
25678
  }
25599
25679
  return triggerShelfplannerVisibility;
@@ -25839,21 +25919,21 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25839
25919
  }, {
25840
25920
  key: "correctPartlistArticlesByGlobalRules",
25841
25921
  value: (function () {
25842
- var _correctPartlistArticlesByGlobalRules = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(set, partlistArticlesToLoad, bundleRules, doChangeRetailArticleNumbers) {
25922
+ var _correctPartlistArticlesByGlobalRules = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(set, partlistArticlesToLoad, bundleRules, doChangeRetailArticleNumbers) {
25843
25923
  var _loop2, i, article;
25844
- return _regeneratorRuntime.wrap(function _callee16$(_context17) {
25845
- while (1) switch (_context17.prev = _context17.next) {
25924
+ return _regeneratorRuntime.wrap(function _callee17$(_context18) {
25925
+ while (1) switch (_context18.prev = _context18.next) {
25846
25926
  case 0:
25847
25927
  if (bundleRules) partlistArticlesToLoad = this.bundlePartlistArticles(partlistArticlesToLoad, bundleRules, set.getDivaArticles());
25848
25928
  //Correct RetailArticleNumbers
25849
25929
  if (!(doChangeRetailArticleNumbers !== null && doChangeRetailArticleNumbers !== void 0 && doChangeRetailArticleNumbers.doChange && doChangeRetailArticleNumbers.retailArticleRules)) {
25850
- _context17.next = 9;
25930
+ _context18.next = 9;
25851
25931
  break;
25852
25932
  }
25853
25933
  _loop2 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop2(i) {
25854
25934
  var rule;
25855
- return _regeneratorRuntime.wrap(function _loop2$(_context16) {
25856
- while (1) switch (_context16.prev = _context16.next) {
25935
+ return _regeneratorRuntime.wrap(function _loop2$(_context17) {
25936
+ while (1) switch (_context17.prev = _context17.next) {
25857
25937
  case 0:
25858
25938
  //Run through articleCodexes to repair:
25859
25939
  rule = doChangeRetailArticleNumbers.retailArticleRules.find(function (item) {
@@ -25865,34 +25945,34 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25865
25945
  }
25866
25946
  case 2:
25867
25947
  case "end":
25868
- return _context16.stop();
25948
+ return _context17.stop();
25869
25949
  }
25870
25950
  }, _loop2);
25871
25951
  });
25872
25952
  i = 0;
25873
25953
  case 4:
25874
25954
  if (!(i < partlistArticlesToLoad.length)) {
25875
- _context17.next = 9;
25955
+ _context18.next = 9;
25876
25956
  break;
25877
25957
  }
25878
- return _context17.delegateYield(_loop2(i), "t0", 6);
25958
+ return _context18.delegateYield(_loop2(i), "t0", 6);
25879
25959
  case 6:
25880
25960
  i++;
25881
- _context17.next = 4;
25961
+ _context18.next = 4;
25882
25962
  break;
25883
25963
  case 9:
25884
25964
  article = Object.values(set.getDivaArticles()).find(function (article) {
25885
25965
  return article.hasPartlistArticle && !article.deleted;
25886
25966
  });
25887
- _context17.next = 12;
25967
+ _context18.next = 12;
25888
25968
  return this.loadPartlistArticles(partlistArticlesToLoad, article, {});
25889
25969
  case 12:
25890
25970
  case "end":
25891
- return _context17.stop();
25971
+ return _context18.stop();
25892
25972
  }
25893
- }, _callee16, this);
25973
+ }, _callee17, this);
25894
25974
  }));
25895
- function correctPartlistArticlesByGlobalRules(_x47, _x48, _x49, _x50) {
25975
+ function correctPartlistArticlesByGlobalRules(_x50, _x51, _x52, _x53) {
25896
25976
  return _correctPartlistArticlesByGlobalRules.apply(this, arguments);
25897
25977
  }
25898
25978
  return correctPartlistArticlesByGlobalRules;
@@ -27984,7 +28064,7 @@ var DivaSet = /*#__PURE__*/function () {
27984
28064
  break;
27985
28065
  }
27986
28066
  _context4.next = 3;
27987
- return import('./DoorPlanner-d53478a6.js');
28067
+ return import('./DoorPlanner-8063f973.js');
27988
28068
  case 3:
27989
28069
  _yield$import = _context4.sent;
27990
28070
  DoorPlanner = _yield$import["default"];
@@ -35201,7 +35281,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35201
35281
  break;
35202
35282
  case 3:
35203
35283
  _context13.next = 5;
35204
- return import('./PfisterWWSHandler-7e6d73a9.js');
35284
+ return import('./PfisterWWSHandler-cb6d8996.js');
35205
35285
  case 5:
35206
35286
  _yield$import = _context13.sent;
35207
35287
  PfisterWWSHandler = _yield$import["default"];
@@ -35209,7 +35289,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35209
35289
  return _context13.abrupt("break", 33);
35210
35290
  case 9:
35211
35291
  _context13.next = 11;
35212
- return import('./LiviqueWWSHandler-8ac2de7d.js');
35292
+ return import('./LiviqueWWSHandler-f13c497c.js');
35213
35293
  case 11:
35214
35294
  _yield$import2 = _context13.sent;
35215
35295
  LiviqueWWSHandler = _yield$import2["default"];
@@ -35217,7 +35297,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35217
35297
  return _context13.abrupt("break", 33);
35218
35298
  case 15:
35219
35299
  _context13.next = 17;
35220
- return import('./SeriousBasketHandler-00d1471a.js');
35300
+ return import('./SeriousBasketHandler-bd8bacf8.js');
35221
35301
  case 17:
35222
35302
  _yield$import3 = _context13.sent;
35223
35303
  SeriousWWSHandler = _yield$import3["default"];
@@ -35225,7 +35305,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35225
35305
  return _context13.abrupt("break", 33);
35226
35306
  case 21:
35227
35307
  _context13.next = 23;
35228
- return import('./ProductBasketHandler-faa30dae.js');
35308
+ return import('./ProductBasketHandler-e42fb957.js');
35229
35309
  case 23:
35230
35310
  _yield$import4 = _context13.sent;
35231
35311
  ProductWWSHandler = _yield$import4["default"];
@@ -35233,7 +35313,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35233
35313
  return _context13.abrupt("break", 33);
35234
35314
  case 27:
35235
35315
  _context13.next = 29;
35236
- return import('./StandardWWSHandler-33764628.js');
35316
+ return import('./StandardWWSHandler-51626324.js');
35237
35317
  case 29:
35238
35318
  _yield$import5 = _context13.sent;
35239
35319
  StandardWWSHandler = _yield$import5["default"];
@@ -36069,6 +36149,17 @@ var Rendering = /*#__PURE__*/function () {
36069
36149
  value: function getUnityFOV() {
36070
36150
  return parseFloat(this.uiInfo['CAM']['FOV']);
36071
36151
  }
36152
+ }, {
36153
+ key: "get3DDimInfo",
36154
+ value: function get3DDimInfo() {
36155
+ if (this.uiInfo && this.uiInfo['DIM3D']) return this.uiInfo['DIM3D'];
36156
+ LOG$5.warn('No dimension infos returned');
36157
+ return {
36158
+ w: -1,
36159
+ h: -1,
36160
+ d: -1
36161
+ };
36162
+ }
36072
36163
 
36073
36164
  //elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
36074
36165
  //It returns the distance of an element to the ground in cm
@@ -36093,7 +36184,11 @@ var Rendering = /*#__PURE__*/function () {
36093
36184
  }));
36094
36185
  }
36095
36186
  }
36096
-
36187
+ }, {
36188
+ key: "hasUIInfo",
36189
+ value: function hasUIInfo() {
36190
+ return this.uiInfo != '';
36191
+ }
36097
36192
  /**
36098
36193
  * This function adds a blobImage to the rendering .
36099
36194
  * It is parsed to a base64 image.
@@ -36603,7 +36698,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36603
36698
  while (1) switch (_context3.prev = _context3.next) {
36604
36699
  case 0:
36605
36700
  _context3.next = 2;
36606
- return import('./Host3DSignalR-de59e1ca.js');
36701
+ return import('./Host3DSignalR-ab1ccbea.js');
36607
36702
  case 2:
36608
36703
  _yield$import = _context3.sent;
36609
36704
  Host3DSignalR = _yield$import["default"];
@@ -36896,7 +36991,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36896
36991
  startTimeWait = new Date(); //It can happen that a rendering is not in the waitForRenderings stack anymore, but UrlToSavedRendering is not set yet- therefore wait until the url to the rendering is set.
36897
36992
  //This happens when two renderings are requested at the same time. First one with mediaType Stream and the second with mediatype TEMP. (Open PDF Viewer directly)
36898
36993
  case 4:
36899
- if (!(this.waitForRenderings.has(this.lastSavedRendering.PlanningHash) || !this.lastSavedRendering.UrlToSavedRendering)) {
36994
+ if (!(this.waitForRenderings.has(this.lastSavedRendering.PlanningHash) || !this.lastSavedRendering.UrlToSavedRendering || !this.lastSavedRendering.hasUIInfo())) {
36900
36995
  _context5.next = 12;
36901
36996
  break;
36902
36997
  }
@@ -36958,7 +37053,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36958
37053
  break;
36959
37054
  }
36960
37055
  case 5:
36961
- if (!(this.waitForRenderings.has(this.lastSavedAlternateRenderings[i].PlanningHash) || !this.lastSavedAlternateRenderings[i].UrlToSavedRendering)) {
37056
+ if (!(this.waitForRenderings.has(this.lastSavedAlternateRenderings[i].PlanningHash) || !this.lastSavedAlternateRenderings[i].UrlToSavedRendering || !this.lastSavedAlternateRenderings[i].hasUIInfo())) {
36962
37057
  _context6.next = 12;
36963
37058
  break;
36964
37059
  }
@@ -38152,7 +38247,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38152
38247
  break;
38153
38248
  case 8:
38154
38249
  _context4.next = 10;
38155
- return import('./DivaStandardPlanner-b23fcfc4.js');
38250
+ return import('./DivaStandardPlanner-251c5b36.js');
38156
38251
  case 10:
38157
38252
  _yield$import = _context4.sent;
38158
38253
  DivaStandardPlanner = _yield$import["default"];
@@ -38163,7 +38258,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38163
38258
  return _context4.abrupt("break", 21);
38164
38259
  case 15:
38165
38260
  _context4.next = 17;
38166
- return import('./DivaBoxPlanner-da028daa.js');
38261
+ return import('./DivaBoxPlanner-ad6509af.js');
38167
38262
  case 17:
38168
38263
  _yield$import2 = _context4.sent;
38169
38264
  DivaBoxPlanner = _yield$import2["default"];
@@ -38305,8 +38400,9 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38305
38400
  return this.getSetRendering(setId);
38306
38401
  case 2:
38307
38402
  rendering = _context6.sent;
38403
+ LOG$2.debug('SAVE SET IMAGE DIM3D width: ' + (rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().w) + ', height: ' + (rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().h) + ', depth: ' + (rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().d));
38308
38404
  return _context6.abrupt("return", rendering != undefined ? rendering.UrlToSavedRendering : '');
38309
- case 4:
38405
+ case 5:
38310
38406
  case "end":
38311
38407
  return _context6.stop();
38312
38408
  }