@crystaldesign/web-planner-logic 26.12.1 → 26.12.2-rc.0

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 (37) hide show
  1. package/build/cjs/{DivaBoxPlanner-62074399.js → DivaBoxPlanner-8659ebba.js} +2 -2
  2. package/build/cjs/{DivaStandardPlanner-138a1952.js → DivaStandardPlanner-063f16dd.js} +2 -2
  3. package/build/cjs/{DoorPlanner-c3725f0f.js → DoorPlanner-3b028aa7.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-bc3f0b60.js → Host3DSignalR-83ce4067.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-adf281e4.js → LiviqueWWSHandler-90d2c601.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-e152d115.js → PfisterWWSHandler-6abd8410.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-e65dab88.js → PlannerHandler2D-cb423b50.js} +1 -1
  8. package/build/cjs/{SeriousBasketHandler-777c6da6.js → SeriousBasketHandler-607cedc9.js} +1 -1
  9. package/build/cjs/{ShelfPlanner-a0458bc2.js → ShelfPlanner-061612c6.js} +1 -1
  10. package/build/cjs/{StandardWWSHandler-c43312b1.js → StandardWWSHandler-0302c3d8.js} +1 -1
  11. package/build/cjs/{index-d9a17ecd.js → index-0c5bb387.js} +107 -74
  12. package/build/cjs/index.js +1 -1
  13. package/build/esm/{DivaBoxPlanner-5c1a4605.js → DivaBoxPlanner-e2000e70.js} +2 -2
  14. package/build/esm/{DivaStandardPlanner-a574665a.js → DivaStandardPlanner-f61828fe.js} +2 -2
  15. package/build/esm/{DoorPlanner-3571bb65.js → DoorPlanner-5de751f3.js} +1 -1
  16. package/build/esm/{Host3DSignalR-80a913b9.js → Host3DSignalR-f2c99d11.js} +1 -1
  17. package/build/esm/{LiviqueWWSHandler-ba85781d.js → LiviqueWWSHandler-c98d6332.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-1047c8f3.js → PfisterWWSHandler-df44b85f.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-95806884.js → PlannerHandler2D-36eede09.js} +1 -1
  20. package/build/esm/{SeriousBasketHandler-28001030.js → SeriousBasketHandler-51ad4544.js} +1 -1
  21. package/build/esm/{ShelfPlanner-a2271d15.js → ShelfPlanner-b48716fa.js} +1 -1
  22. package/build/esm/{StandardWWSHandler-ac222da5.js → StandardWWSHandler-d1ed480c.js} +1 -1
  23. package/build/esm/{index-2d017864.js → index-a594415c.js} +107 -74
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/interface/Articles/AccessoireItemType.d.ts +6 -2
  26. package/build/types/web-planner-logic/src/interface/Articles/AccessoireItemType.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts +1 -1
  28. package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/logic/Article/mandatoryAccessories.d.ts +3 -1
  30. package/build/types/web-planner-logic/src/logic/Article/mandatoryAccessories.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +2 -0
  32. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +4 -0
  34. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts.map +1 -1
  36. package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
  37. package/package.json +3 -3
@@ -5,11 +5,11 @@ var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
5
5
  var _createClass = require('@babel/runtime/helpers/createClass');
6
6
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
7
7
  var _regeneratorRuntime = require('@babel/runtime/regenerator');
8
- var index = require('./index-d9a17ecd.js');
8
+ var index = require('./index-0c5bb387.js');
9
9
  var DivaUtils = require('@crystaldesign/diva-utils');
10
10
  var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
11
11
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
12
- var PlannerHandler2D = require('./PlannerHandler2D-e65dab88.js');
12
+ var PlannerHandler2D = require('./PlannerHandler2D-cb423b50.js');
13
13
  require('@babel/runtime/helpers/objectWithoutProperties');
14
14
  require('axios');
15
15
  require('@babel/runtime/helpers/typeof');
@@ -6,10 +6,10 @@ var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
6
6
  var _createClass = require('@babel/runtime/helpers/createClass');
7
7
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
8
8
  var _regeneratorRuntime = require('@babel/runtime/regenerator');
9
- var index = require('./index-d9a17ecd.js');
9
+ var index = require('./index-0c5bb387.js');
10
10
  var DivaUtils = require('@crystaldesign/diva-utils');
11
11
  var planner2dCore = require('@crystaldesign/planner-2d-core');
12
- var PlannerHandler2D = require('./PlannerHandler2D-e65dab88.js');
12
+ var PlannerHandler2D = require('./PlannerHandler2D-cb423b50.js');
13
13
  require('@babel/runtime/helpers/slicedToArray');
14
14
  require('@babel/runtime/helpers/objectWithoutProperties');
15
15
  require('axios');
@@ -3,7 +3,7 @@
3
3
  var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
4
4
  var _createClass = require('@babel/runtime/helpers/createClass');
5
5
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
- require('./index-d9a17ecd.js');
6
+ require('./index-0c5bb387.js');
7
7
  var DivaUtils = require('@crystaldesign/diva-utils');
8
8
  require('@babel/runtime/helpers/slicedToArray');
9
9
  require('@babel/runtime/helpers/asyncToGenerator');
@@ -5,7 +5,7 @@ var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
5
5
  var _createClass = require('@babel/runtime/helpers/createClass');
6
6
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
7
7
  var _regeneratorRuntime = require('@babel/runtime/regenerator');
8
- var index = require('./index-d9a17ecd.js');
8
+ var index = require('./index-0c5bb387.js');
9
9
  var DivaUtils = require('@crystaldesign/diva-utils');
10
10
  var signalr = require('@microsoft/signalr');
11
11
  var io = require('socket.io-client');
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
4
4
  var _createClass = require('@babel/runtime/helpers/createClass');
5
- require('./index-d9a17ecd.js');
5
+ require('./index-0c5bb387.js');
6
6
  require('@babel/runtime/helpers/slicedToArray');
7
7
  require('@babel/runtime/helpers/asyncToGenerator');
8
8
  require('@babel/runtime/helpers/defineProperty');
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
4
4
  var _createClass = require('@babel/runtime/helpers/createClass');
5
- var index = require('./index-d9a17ecd.js');
5
+ var index = require('./index-0c5bb387.js');
6
6
  var basketModel = require('@crystaldesign/basket-model');
7
7
  var DivaUtils = require('@crystaldesign/diva-utils');
8
8
  require('@babel/runtime/helpers/slicedToArray');
@@ -5,7 +5,7 @@ var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
5
5
  var _createClass = require('@babel/runtime/helpers/createClass');
6
6
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
7
7
  var _regeneratorRuntime = require('@babel/runtime/regenerator');
8
- var index = require('./index-d9a17ecd.js');
8
+ var index = require('./index-0c5bb387.js');
9
9
  var _possibleConstructorReturn = require('@babel/runtime/helpers/possibleConstructorReturn');
10
10
  var _getPrototypeOf = require('@babel/runtime/helpers/getPrototypeOf');
11
11
  var _get = require('@babel/runtime/helpers/get');
@@ -3,7 +3,7 @@
3
3
  var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
4
4
  var _createClass = require('@babel/runtime/helpers/createClass');
5
5
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
- var index = require('./index-d9a17ecd.js');
6
+ var index = require('./index-0c5bb387.js');
7
7
  var DivaUtils = require('@crystaldesign/diva-utils');
8
8
  require('@babel/runtime/helpers/slicedToArray');
9
9
  require('@babel/runtime/helpers/asyncToGenerator');
@@ -6,7 +6,7 @@ var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
6
6
  var _createClass = require('@babel/runtime/helpers/createClass');
7
7
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
8
8
  var _regeneratorRuntime = require('@babel/runtime/regenerator');
9
- var index = require('./index-d9a17ecd.js');
9
+ var index = require('./index-0c5bb387.js');
10
10
  var DivaUtils = require('@crystaldesign/diva-utils');
11
11
  require('@babel/runtime/helpers/slicedToArray');
12
12
  require('@babel/runtime/helpers/objectWithoutProperties');
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
4
4
  var _createClass = require('@babel/runtime/helpers/createClass');
5
- require('./index-d9a17ecd.js');
5
+ require('./index-0c5bb387.js');
6
6
  require('@babel/runtime/helpers/slicedToArray');
7
7
  require('@babel/runtime/helpers/asyncToGenerator');
8
8
  require('@babel/runtime/helpers/defineProperty');
@@ -20831,26 +20831,26 @@ function _loadMoreFromIDMArticles() {
20831
20831
  featureClasses,
20832
20832
  priceFeatureGroups,
20833
20833
  decisions,
20834
- _i5,
20834
+ _i6,
20835
20835
  _decisions$map,
20836
20836
  loadedIds,
20837
20837
  missingIds,
20838
- _i6,
20838
+ _i7,
20839
20839
  _iterator6,
20840
20840
  _step6,
20841
20841
  _loop7,
20842
- _i7,
20842
+ _i8,
20843
20843
  _catalogArticleData$d2,
20844
20844
  catalogArticleData,
20845
20845
  toLoadFeatures,
20846
20846
  features,
20847
20847
  _loop4,
20848
- _i8,
20848
+ _i9,
20849
20849
  _iterator7,
20850
20850
  _step7,
20851
20851
  _loop8,
20852
20852
  _loop6,
20853
- _i9,
20853
+ _i10,
20854
20854
  _args8 = arguments;
20855
20855
  return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context8) {
20856
20856
  while (1) switch (_context8.prev = _context8.next) {
@@ -20925,8 +20925,8 @@ function _loadMoreFromIDMArticles() {
20925
20925
  priceFeatureGroups = _yield$Promise$all2[1];
20926
20926
  decisions = _yield$Promise$all2[2];
20927
20927
  if (decisions) {
20928
- for (_i5 = 0; _i5 < decisions.length; _i5++) {
20929
- catalogData.loadedDecisions.push(initializeDecision(decisions[_i5], catalogData.idmOptionGroups));
20928
+ for (_i6 = 0; _i6 < decisions.length; _i6++) {
20929
+ catalogData.loadedDecisions.push(initializeDecision(decisions[_i6], catalogData.idmOptionGroups));
20930
20930
  }
20931
20931
  }
20932
20932
  if (!(toLoadDecisionIds.length !== 0 && toLoadDecisionIds.length != (decisions === null || decisions === void 0 ? void 0 : decisions.length))) {
@@ -20945,8 +20945,8 @@ function _loadMoreFromIDMArticles() {
20945
20945
  return loadDecisionsReferencedByActions(set, catalogData);
20946
20946
  case 34:
20947
20947
  if (priceFeatureGroups) {
20948
- for (_i6 = 0; _i6 < priceFeatureGroups.length; _i6++) {
20949
- catalogData.loadedPriceFeaturegroups.push(initializePriceFeatureGroups(priceFeatureGroups[_i6], catalogData.idmOptionGroups));
20948
+ for (_i7 = 0; _i7 < priceFeatureGroups.length; _i7++) {
20949
+ catalogData.loadedPriceFeaturegroups.push(initializePriceFeatureGroups(priceFeatureGroups[_i7], catalogData.idmOptionGroups));
20950
20950
  }
20951
20951
  }
20952
20952
  _iterator6 = _createForOfIteratorHelper$l(toLoadPFGroups);
@@ -21006,8 +21006,8 @@ function _loadMoreFromIDMArticles() {
21006
21006
  _iterator6.f();
21007
21007
  return _context8.finish(50);
21008
21008
  case 53:
21009
- for (_i7 = 0; _i7 < catalogArticleDatas.length; _i7++) {
21010
- catalogArticleData = catalogArticleDatas[_i7];
21009
+ for (_i8 = 0; _i8 < catalogArticleDatas.length; _i8++) {
21010
+ catalogArticleData = catalogArticleDatas[_i8];
21011
21011
  catalogArticleData.articleIDMDecisions = sortDecisions(catalogData.getDecisionsByNo(_toConsumableArray__default["default"](new Set([].concat(_toConsumableArray__default["default"](catalogData.globalDecisions.map(function (g) {
21012
21012
  return g.decisionNo;
21013
21013
  })), _toConsumableArray__default["default"](catalogData.serieDecisionRefs), _toConsumableArray__default["default"]((_catalogArticleData$d2 = catalogArticleData.decisionsRefs) !== null && _catalogArticleData$d2 !== void 0 ? _catalogArticleData$d2 : []))))));
@@ -21029,7 +21029,7 @@ function _loadMoreFromIDMArticles() {
21029
21029
  return _regeneratorRuntime__default["default"].wrap(function _loop4$(_context3) {
21030
21030
  while (1) switch (_context3.prev = _context3.next) {
21031
21031
  case 0:
21032
- feature = features[_i8];
21032
+ feature = features[_i9];
21033
21033
  insertIndex = catalogData.loadedFeatures.length;
21034
21034
  k = 0;
21035
21035
  case 3:
@@ -21103,15 +21103,15 @@ function _loadMoreFromIDMArticles() {
21103
21103
  }
21104
21104
  }, _loop4);
21105
21105
  });
21106
- _i8 = 0;
21106
+ _i9 = 0;
21107
21107
  case 62:
21108
- if (!(_i8 < features.length)) {
21108
+ if (!(_i9 < features.length)) {
21109
21109
  _context8.next = 67;
21110
21110
  break;
21111
21111
  }
21112
21112
  return _context8.delegateYield(_loop4(), "t3", 64);
21113
21113
  case 64:
21114
- _i8++;
21114
+ _i9++;
21115
21115
  _context8.next = 62;
21116
21116
  break;
21117
21117
  case 67:
@@ -21178,7 +21178,7 @@ function _loadMoreFromIDMArticles() {
21178
21178
  return _regeneratorRuntime__default["default"].wrap(function _loop6$(_context7) {
21179
21179
  while (1) switch (_context7.prev = _context7.next) {
21180
21180
  case 0:
21181
- catalogArticleData = catalogArticleDatas[_i9]; // an item without a feature class has no features of its own to initialize
21181
+ catalogArticleData = catalogArticleDatas[_i10]; // an item without a feature class has no features of its own to initialize
21182
21182
  if (!(catalogArticleData.featureClassRefNo === undefined)) {
21183
21183
  _context7.next = 3;
21184
21184
  break;
@@ -21204,9 +21204,9 @@ function _loadMoreFromIDMArticles() {
21204
21204
  }
21205
21205
  }, _loop6);
21206
21206
  });
21207
- _i9 = 0;
21207
+ _i10 = 0;
21208
21208
  case 87:
21209
- if (!(_i9 < catalogArticleDatas.length)) {
21209
+ if (!(_i10 < catalogArticleDatas.length)) {
21210
21210
  _context8.next = 94;
21211
21211
  break;
21212
21212
  }
@@ -21218,7 +21218,7 @@ function _loadMoreFromIDMArticles() {
21218
21218
  }
21219
21219
  return _context8.abrupt("continue", 91);
21220
21220
  case 91:
21221
- _i9++;
21221
+ _i10++;
21222
21222
  _context8.next = 87;
21223
21223
  break;
21224
21224
  case 94:
@@ -21388,27 +21388,35 @@ function initIDMArticleRelations(item, catalogArticleData, catalog) {
21388
21388
  var _a$accessory$sequence, _b$accessory$sequence;
21389
21389
  return ((_a$accessory$sequence = a.accessory.sequenceNo) !== null && _a$accessory$sequence !== void 0 ? _a$accessory$sequence : 0) - ((_b$accessory$sequence = b.accessory.sequenceNo) !== null && _b$accessory$sequence !== void 0 ? _b$accessory$sequence : 0);
21390
21390
  });
21391
+ // counted over the offered accessories only: a set whose alternatives are hidden or missing leaves its last one without a choice
21392
+ var mandatorySetSizes = new Map();
21391
21393
  for (var _i = 0, _accessories = accessories; _i < _accessories.length; _i++) {
21392
- var _ref2$mandatoryQuanti, _accessory$catalogPla, _accessory$catalogPla2, _accessory$catalogPla3, _accessory$catalogPla4, _accessory$catalogPla5, _accessory$catalogPla6, _accessory$catalogPla7, _accessory$catalogPla8, _accessory$catalogPla9, _accessory$catalogPla10, _accessory$catalogPla11;
21393
- var _accessories$_i = _accessories[_i],
21394
- _ref2 = _accessories$_i.ref,
21395
- _accessory = _accessories$_i.accessory,
21396
- _refCatalog = _accessories$_i.refCatalog;
21397
- // The ITEM_REF quantity is a suggestion; only a mandatory item's quantity binds the planning (IDM OPTIONAL_QUANTITY doc).
21398
- var bindingQuantity = _ref2.mandatorySetNo !== undefined ? Math.max(1, (_ref2$mandatoryQuanti = _ref2.mandatoryQuantity) !== null && _ref2$mandatoryQuanti !== void 0 ? _ref2$mandatoryQuanti : 1) : 0;
21394
+ var _mandatorySetSizes$ge;
21395
+ var _ref2 = _accessories[_i].ref;
21396
+ if (_ref2.mandatorySetNo !== undefined) mandatorySetSizes.set(_ref2.mandatorySetNo, ((_mandatorySetSizes$ge = mandatorySetSizes.get(_ref2.mandatorySetNo)) !== null && _mandatorySetSizes$ge !== void 0 ? _mandatorySetSizes$ge : 0) + 1);
21397
+ }
21398
+ for (var _i2 = 0, _accessories2 = accessories; _i2 < _accessories2.length; _i2++) {
21399
+ var _ref3$mandatoryQuanti, _accessory$catalogPla, _accessory$catalogPla2, _accessory$catalogPla3, _accessory$catalogPla4, _accessory$catalogPla5, _accessory$catalogPla6, _accessory$catalogPla7, _accessory$catalogPla8, _accessory$catalogPla9, _accessory$catalogPla10, _accessory$catalogPla11;
21400
+ var _accessories2$_i = _accessories2[_i2],
21401
+ _ref3 = _accessories2$_i.ref,
21402
+ _accessory = _accessories2$_i.accessory,
21403
+ _refCatalog = _accessories2$_i.refCatalog;
21404
+ // IDM knows no cap: a mandatory item's quantity binds as the minimum, the optional quantity only suggests (IDM OPTIONAL_QUANTITY doc).
21405
+ var bindingQuantity = _ref3.mandatorySetNo !== undefined ? Math.max(1, (_ref3$mandatoryQuanti = _ref3.mandatoryQuantity) !== null && _ref3$mandatoryQuanti !== void 0 ? _ref3$mandatoryQuanti : 1) : 0;
21399
21406
  catalogArticle.articleRelations.push({
21400
21407
  name: _accessory.name,
21401
21408
  actQuantity: 0,
21402
21409
  minQuantity: bindingQuantity,
21403
- // 0 = no cap, like a diva relation without a MaxQuantity
21404
- maxQuantity: bindingQuantity,
21405
- mandatorySetNo: _ref2.mandatorySetNo,
21406
- suggestedQuantity: _ref2.mandatorySetNo === undefined ? _ref2.optionalQuantity : undefined,
21410
+ maxQuantity: 0,
21411
+ isIDMRelation: true,
21412
+ mandatorySetNo: _ref3.mandatorySetNo,
21413
+ isSoleMandatory: _ref3.mandatorySetNo !== undefined && mandatorySetSizes.get(_ref3.mandatorySetNo) === 1,
21414
+ suggestedQuantity: _ref3.optionalQuantity,
21407
21415
  price: !catalog.dontShowBasePrice ? _accessory.articlePrice : 0,
21408
- articleCodex: _ref2.typeNo,
21409
- catalogCodex: _ref2.serieNo,
21416
+ articleCodex: _ref3.typeNo,
21417
+ catalogCodex: _ref3.serieNo,
21410
21418
  longDescription: _accessory.longDescription,
21411
- positionGroupNr: _ref2.setNo,
21419
+ positionGroupNr: _ref3.setNo,
21412
21420
  typeNr: _accessory.typeNr,
21413
21421
  image: _accessory.image ? _refCatalog.getCatImageURL(_accessory.image, '') : undefined,
21414
21422
  //accessoires are only PlannerElements if the have an SVG with dockingpossibilities (AVO/ AVU/ AVC)
@@ -21528,13 +21536,13 @@ function _fillMissingDockingPointCounts() {
21528
21536
  };
21529
21537
  _context11.next = 11;
21530
21538
  return Promise.all(_toConsumableArray__default["default"](accessories).map(/*#__PURE__*/function () {
21531
- var _ref5 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee4(_ref4) {
21539
+ var _ref6 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee4(_ref5) {
21532
21540
  var _accessory$svgs, _accessory$catalogPla12;
21533
- var _ref6, accessory, accessoryCatalog, svgs, uncounted, counts, topCounts, paletteView;
21541
+ var _ref7, accessory, accessoryCatalog, svgs, uncounted, counts, topCounts, paletteView;
21534
21542
  return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context10) {
21535
21543
  while (1) switch (_context10.prev = _context10.next) {
21536
21544
  case 0:
21537
- _ref6 = _slicedToArray__default["default"](_ref4, 2), accessory = _ref6[0], accessoryCatalog = _ref6[1];
21545
+ _ref7 = _slicedToArray__default["default"](_ref5, 2), accessory = _ref7[0], accessoryCatalog = _ref7[1];
21538
21546
  svgs = (_accessory$svgs = accessory.svgs) !== null && _accessory$svgs !== void 0 ? _accessory$svgs : [];
21539
21547
  uncounted = svgs.filter(lacksDockingPointCounts);
21540
21548
  if (uncounted.length) {
@@ -21584,7 +21592,7 @@ function _fillMissingDockingPointCounts() {
21584
21592
  }, _callee4);
21585
21593
  }));
21586
21594
  return function (_x11) {
21587
- return _ref5.apply(this, arguments);
21595
+ return _ref6.apply(this, arguments);
21588
21596
  };
21589
21597
  }()));
21590
21598
  case 11:
@@ -21613,7 +21621,7 @@ var fetchDecisions = function fetchDecisions(set, catalogData, decisionNos) {
21613
21621
  * apply while that action matches. References are followed transitively.
21614
21622
  */
21615
21623
  var loadDecisionsReferencedByActions = /*#__PURE__*/function () {
21616
- var _ref3 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(set, catalogData) {
21624
+ var _ref4 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(set, catalogData) {
21617
21625
  var round, toLoad, _iterator3, _step3, _decision$optionCombi, decision, _iterator4, _step4, _combination$projectA, _combination$projectA2, _combination$projectA3, _combination$projectA4, combination, refs, _iterator5, _step5, ref, decisionNo, decisions, i, _decisions$length, stillMissing;
21618
21626
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
21619
21627
  while (1) switch (_context.prev = _context.next) {
@@ -21692,7 +21700,7 @@ var loadDecisionsReferencedByActions = /*#__PURE__*/function () {
21692
21700
  }, _callee);
21693
21701
  }));
21694
21702
  return function loadDecisionsReferencedByActions(_x9, _x10) {
21695
- return _ref3.apply(this, arguments);
21703
+ return _ref4.apply(this, arguments);
21696
21704
  };
21697
21705
  }();
21698
21706
 
@@ -21715,10 +21723,10 @@ var getToLoadDecisionIds = function getToLoadDecisionIds(catalogArticleDatas, ca
21715
21723
  return g.decisionNo;
21716
21724
  })), _toConsumableArray__default["default"](catalogData.serieDecisionRefs), _toConsumableArray__default["default"](allArticleDecisions))));
21717
21725
  var toLoadDecisionIds = [];
21718
- for (var _i2 = 0; _i2 < neededDecisionsIds.length; _i2++) {
21719
- var found = catalogData.getDecisionByNo(neededDecisionsIds[_i2]);
21726
+ for (var _i3 = 0; _i3 < neededDecisionsIds.length; _i3++) {
21727
+ var found = catalogData.getDecisionByNo(neededDecisionsIds[_i3]);
21720
21728
  if (found) ; else {
21721
- toLoadDecisionIds.push(neededDecisionsIds[_i2]);
21729
+ toLoadDecisionIds.push(neededDecisionsIds[_i3]);
21722
21730
  }
21723
21731
  }
21724
21732
  return toLoadDecisionIds;
@@ -21735,18 +21743,18 @@ var getFeatures = function getFeatures(catalogData, featureClasses) {
21735
21743
  var alreadyLoadedFeatures = catalogData.loadedFeatures;
21736
21744
  var toLoadFeatures = [];
21737
21745
  var loadedFeatures = [];
21738
- var _loop = function _loop(_i3) {
21746
+ var _loop = function _loop(_i4) {
21739
21747
  var found = alreadyLoadedFeatures.find(function (f) {
21740
- return f.featureNo == neededFeatures[_i3];
21748
+ return f.featureNo == neededFeatures[_i4];
21741
21749
  });
21742
21750
  if (found) {
21743
21751
  loadedFeatures.push(found);
21744
21752
  } else {
21745
- toLoadFeatures.push(neededFeatures[_i3]);
21753
+ toLoadFeatures.push(neededFeatures[_i4]);
21746
21754
  }
21747
21755
  };
21748
- for (var _i3 = 0; _i3 < neededFeatures.length; _i3++) {
21749
- _loop(_i3);
21756
+ for (var _i4 = 0; _i4 < neededFeatures.length; _i4++) {
21757
+ _loop(_i4);
21750
21758
  }
21751
21759
  LOG$l.debug('features already loaded dont get again from api: ' + loadedFeatures.length);
21752
21760
  return toLoadFeatures;
@@ -21770,10 +21778,10 @@ var getPriceFeatureGroups = function getPriceFeatureGroups(catalogArticleDatas,
21770
21778
  }
21771
21779
  var toLoadPriceFeatureGroups = [];
21772
21780
  neededPriceFeatureGroupNos = _toConsumableArray__default["default"](new Set(neededPriceFeatureGroupNos));
21773
- for (var _i4 = 0; _i4 < neededPriceFeatureGroupNos.length; _i4++) {
21774
- var found = catalogData.getPricefeaturegroup(neededPriceFeatureGroupNos[_i4]);
21781
+ for (var _i5 = 0; _i5 < neededPriceFeatureGroupNos.length; _i5++) {
21782
+ var found = catalogData.getPricefeaturegroup(neededPriceFeatureGroupNos[_i5]);
21775
21783
  if (found) ; else {
21776
- toLoadPriceFeatureGroups.push(neededPriceFeatureGroupNos[_i4]);
21784
+ toLoadPriceFeatureGroups.push(neededPriceFeatureGroupNos[_i5]);
21777
21785
  }
21778
21786
  }
21779
21787
  return toLoadPriceFeatureGroups;
@@ -23738,7 +23746,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
23738
23746
  if (_this2.catalogProps.diva3dRoom == 'raumatlantis') _this2.catalogProps.diva3dRoom = 'weissraumatlantis';
23739
23747
  break;
23740
23748
  case 'DIVA3D_RENDERING':
23741
- diva3DRenderingIsSet = item.Value == '1' || item.Value.toLowerCase() == 'true';
23749
+ // String(): the enrichment editor stored flags as native booleans for a while, and a stored false has no toLowerCase
23750
+ diva3DRenderingIsSet = item.Value == '1' || String(item.Value).toLowerCase() == 'true';
23742
23751
  if (_this2.isIDMFormat) {
23743
23752
  _this2.catalogProps.has3dModels = diva3DRenderingIsSet;
23744
23753
  }
@@ -23771,20 +23780,20 @@ var DivaCatalogData = /*#__PURE__*/function () {
23771
23780
  _this2.catalogProps.diva3dCompatibleWithImageCache = item.Value == '1';
23772
23781
  break;
23773
23782
  case 'ENABLE_DO_SHOW_3DDIMENSIONS':
23774
- _this2.catalogProps.doShow3DDimensionLines = item.Value == '1' || item.Value.toLowerCase() == 'true';
23783
+ _this2.catalogProps.doShow3DDimensionLines = item.Value == '1' || String(item.Value).toLowerCase() == 'true';
23775
23784
  break;
23776
23785
  case 'DO_SHOW_MAIN_DIMENSIONS':
23777
- _this2.catalogProps.doShowMainDimensions = item.Value == '1' || item.Value.toLowerCase() == 'true';
23786
+ _this2.catalogProps.doShowMainDimensions = item.Value == '1' || String(item.Value).toLowerCase() == 'true';
23778
23787
  break;
23779
23788
  case 'DEFAULT_DO_SHOW_3DDIMENSIONS':
23780
- _this2.catalogProps.defaultDimensionsActive = '1' == item.Value || 'true' == item.Value.toLowerCase();
23789
+ _this2.catalogProps.defaultDimensionsActive = '1' == item.Value || 'true' == String(item.Value).toLowerCase();
23781
23790
  break;
23782
23791
  case 'DIVA_KI_READY':
23783
- _this2.catalogProps.divaKiReady = item.Value == '1' || item.Value.toLowerCase() == 'true';
23792
+ _this2.catalogProps.divaKiReady = item.Value == '1' || String(item.Value).toLowerCase() == 'true';
23784
23793
  break;
23785
23794
  // Planner Topics
23786
23795
  case 'IS_IDM3D_CAT':
23787
- _this2.catalogProps.isIDM3DCat = item.Value == '1' || item.Value.toLowerCase() == 'true';
23796
+ _this2.catalogProps.isIDM3DCat = item.Value == '1' || String(item.Value).toLowerCase() == 'true';
23788
23797
  break;
23789
23798
  case 'IDM3D_ENVIRONMENT':
23790
23799
  _this2.catalogProps.IDM3DEnvironment = (_item$Value = item.Value) !== null && _item$Value !== void 0 ? _item$Value : 'diva.ro';
@@ -32879,7 +32888,7 @@ var DivaArticle = /*#__PURE__*/function () {
32879
32888
  break;
32880
32889
  }
32881
32890
  _context.next = 4;
32882
- return Promise.resolve().then(function () { return require('./ShelfPlanner-a0458bc2.js'); });
32891
+ return Promise.resolve().then(function () { return require('./ShelfPlanner-061612c6.js'); });
32883
32892
  case 4:
32884
32893
  _yield$import = _context.sent;
32885
32894
  ShelfPlanner = _yield$import["default"];
@@ -41628,7 +41637,7 @@ var DivaSet = /*#__PURE__*/function () {
41628
41637
  break;
41629
41638
  }
41630
41639
  _context5.next = 3;
41631
- return Promise.resolve().then(function () { return require('./DoorPlanner-c3725f0f.js'); });
41640
+ return Promise.resolve().then(function () { return require('./DoorPlanner-3b028aa7.js'); });
41632
41641
  case 3:
41633
41642
  _yield$import = _context5.sent;
41634
41643
  DoorPlanner = _yield$import["default"];
@@ -43951,8 +43960,15 @@ var ArtifactGenerationError = /*#__PURE__*/function (_Error) {
43951
43960
  function _createForOfIteratorHelper$6(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$6(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
43952
43961
  function _unsupportedIterableToArray$6(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$6(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$6(r, a) : void 0; } }
43953
43962
  function _arrayLikeToArray$6(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
43954
- /** Per IDM mandatory set with nothing planned yet: its only accessory (the spec selects it automatically) or the first of several. */
43963
+ /** The sole accessory of every IDM mandatory set that is not planned yet (the spec selects it automatically); a set of several waits for the customer's choice. */
43955
43964
  function mandatoryAccessoriesToPlan(relations, isPlanned) {
43965
+ return relations.filter(function (relation) {
43966
+ return relation.isSoleMandatory && !isPlanned(relation);
43967
+ });
43968
+ }
43969
+
43970
+ /** True when an IDM mandatory set has no planned accessory - at least one of each set has to be chosen. */
43971
+ function hasMandatorySetWithoutAccessory(relations, isPlanned) {
43956
43972
  var bySet = new Map();
43957
43973
  var _iterator = _createForOfIteratorHelper$6(relations),
43958
43974
  _step;
@@ -43968,10 +43984,8 @@ function mandatoryAccessoriesToPlan(relations, isPlanned) {
43968
43984
  } finally {
43969
43985
  _iterator.f();
43970
43986
  }
43971
- return _toConsumableArray__default["default"](bySet.values()).filter(function (members) {
43987
+ return _toConsumableArray__default["default"](bySet.values()).some(function (members) {
43972
43988
  return !members.some(isPlanned);
43973
- }).map(function (members) {
43974
- return members[0];
43975
43989
  });
43976
43990
  }
43977
43991
 
@@ -45169,7 +45183,19 @@ var DivaSetHandler = /*#__PURE__*/function () {
45169
45183
  return _planMandatoryAccessoires.apply(this, arguments);
45170
45184
  }
45171
45185
  return planMandatoryAccessoires;
45172
- }()
45186
+ }() /** IDM: true when a main article of the sets has a mandatory Zusatzartikel set without any planned accessory. */
45187
+ }, {
45188
+ key: "hasMissingMandatoryAccessories",
45189
+ value: function hasMissingMandatoryAccessories(sets) {
45190
+ return Object.values(sets).some(function (set) {
45191
+ return Object.values(set.getDivaArticles()).some(function (article) {
45192
+ var _article$catalogArtic2;
45193
+ return !article.relatedToBasketId && hasMandatorySetWithoutAccessory((_article$catalogArtic2 = article.catalogArticle.articleRelations) !== null && _article$catalogArtic2 !== void 0 ? _article$catalogArtic2 : [], function (r) {
45194
+ return article.curQunatityOfAccessoire(r.articleCodex, r.catalogCodex) > 0;
45195
+ });
45196
+ });
45197
+ });
45198
+ }
45173
45199
  }, {
45174
45200
  key: "updateAccessoireQuantity",
45175
45201
  value: function () {
@@ -46145,7 +46171,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
46145
46171
  for (var key in divaArticles) {
46146
46172
  var article = divaArticles[key];
46147
46173
  if (article.plannerData) {
46148
- var _article$typeNr, _article$imageUrl, _article$catalogArtic2, _article$catalogArtic3, _article$catalogArtic4, _article$actPlannerDa, _article$actPlannerDa2, _article$posNr;
46174
+ var _article$typeNr, _article$imageUrl, _article$catalogArtic3, _article$catalogArtic4, _article$catalogArtic5, _article$actPlannerDa, _article$actPlannerDa2, _article$posNr;
46149
46175
  plannedElements.push({
46150
46176
  setId: set.getSetId(),
46151
46177
  basketId: article.basketId,
@@ -46157,13 +46183,13 @@ var DivaSetHandler = /*#__PURE__*/function () {
46157
46183
  typeNr: (_article$typeNr = article.typeNr) !== null && _article$typeNr !== void 0 ? _article$typeNr : '',
46158
46184
  image: (_article$imageUrl = article.imageUrl) !== null && _article$imageUrl !== void 0 ? _article$imageUrl : '',
46159
46185
  price: article.price,
46160
- contentItemId: (_article$catalogArtic2 = article.catalogArticle) === null || _article$catalogArtic2 === void 0 ? void 0 : _article$catalogArtic2.contentItemId,
46161
- groupContentItemId: (_article$catalogArtic3 = article.catalogArticle) === null || _article$catalogArtic3 === void 0 ? void 0 : _article$catalogArtic3.groupContentItemId,
46186
+ contentItemId: (_article$catalogArtic3 = article.catalogArticle) === null || _article$catalogArtic3 === void 0 ? void 0 : _article$catalogArtic3.contentItemId,
46187
+ groupContentItemId: (_article$catalogArtic4 = article.catalogArticle) === null || _article$catalogArtic4 === void 0 ? void 0 : _article$catalogArtic4.groupContentItemId,
46162
46188
  depth: article.depth,
46163
46189
  width: article.width,
46164
46190
  height: article.height,
46165
46191
  sizeInfo: DivaUtils__default["default"].sizeFormatter(article.catalogArticle, set.i18n, true, ':'),
46166
- longDescription: (_article$catalogArtic4 = article.catalogArticle) === null || _article$catalogArtic4 === void 0 ? void 0 : _article$catalogArtic4.longDescription,
46192
+ longDescription: (_article$catalogArtic5 = article.catalogArticle) === null || _article$catalogArtic5 === void 0 ? void 0 : _article$catalogArtic5.longDescription,
46167
46193
  incomplete: article.incomplete,
46168
46194
  isAccessoire: !!article.relatedToBasketId,
46169
46195
  avlFilter: (_article$actPlannerDa = article.actPlannerData) === null || _article$actPlannerDa === void 0 ? void 0 : _article$actPlannerDa.AVLFilter,
@@ -49582,7 +49608,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
49582
49608
  break;
49583
49609
  case 3:
49584
49610
  _context12.next = 5;
49585
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-e152d115.js'); });
49611
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-6abd8410.js'); });
49586
49612
  case 5:
49587
49613
  _yield$import = _context12.sent;
49588
49614
  PfisterWWSHandler = _yield$import["default"];
@@ -49590,7 +49616,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
49590
49616
  return _context12.abrupt("break", 27);
49591
49617
  case 9:
49592
49618
  _context12.next = 11;
49593
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-adf281e4.js'); });
49619
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-90d2c601.js'); });
49594
49620
  case 11:
49595
49621
  _yield$import2 = _context12.sent;
49596
49622
  LiviqueWWSHandler = _yield$import2["default"];
@@ -49598,7 +49624,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
49598
49624
  return _context12.abrupt("break", 27);
49599
49625
  case 15:
49600
49626
  _context12.next = 17;
49601
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-777c6da6.js'); });
49627
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-607cedc9.js'); });
49602
49628
  case 17:
49603
49629
  _yield$import3 = _context12.sent;
49604
49630
  SeriousWWSHandler = _yield$import3["default"];
@@ -49606,7 +49632,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
49606
49632
  return _context12.abrupt("break", 27);
49607
49633
  case 21:
49608
49634
  _context12.next = 23;
49609
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-c43312b1.js'); });
49635
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-0302c3d8.js'); });
49610
49636
  case 23:
49611
49637
  _yield$import4 = _context12.sent;
49612
49638
  StandardWWSHandler = _yield$import4["default"];
@@ -50993,7 +51019,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
50993
51019
  //If we need real time rendering initialize the SignalR and 3D host connection Handler
50994
51020
  bootMark('signalr: chunk import start');
50995
51021
  _context3.next = 3;
50996
- return Promise.resolve().then(function () { return require('./Host3DSignalR-bc3f0b60.js'); });
51022
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-83ce4067.js'); });
50997
51023
  case 3:
50998
51024
  _yield$import = _context3.sent;
50999
51025
  Host3DSignalR = _yield$import["default"];
@@ -52738,7 +52764,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
52738
52764
  break;
52739
52765
  case 8:
52740
52766
  _context5.next = 10;
52741
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-138a1952.js'); });
52767
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-063f16dd.js'); });
52742
52768
  case 10:
52743
52769
  _yield$import = _context5.sent;
52744
52770
  DivaStandardPlanner = _yield$import["default"];
@@ -52749,7 +52775,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
52749
52775
  return _context5.abrupt("break", 21);
52750
52776
  case 15:
52751
52777
  _context5.next = 17;
52752
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-62074399.js'); });
52778
+ return Promise.resolve().then(function () { return require('./DivaBoxPlanner-8659ebba.js'); });
52753
52779
  case 17:
52754
52780
  _yield$import2 = _context5.sent;
52755
52781
  DivaBoxPlanner = _yield$import2["default"];
@@ -56067,6 +56093,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
56067
56093
  value: function checkIfAllOptionsAreDefined() {
56068
56094
  return setHandlerInstance.checkIfAllOptionsAreDefined(this.sets);
56069
56095
  }
56096
+
56097
+ /** IDM: true when a planned main article has a mandatory Zusatzartikel set without any planned accessory. */
56098
+ }, {
56099
+ key: "hasMissingMandatoryAccessories",
56100
+ value: function hasMissingMandatoryAccessories() {
56101
+ return setHandlerInstance.hasMissingMandatoryAccessories(this.sets);
56102
+ }
56070
56103
  }, {
56071
56104
  key: "changeOnFavorites",
56072
56105
  value: function changeOnFavorites(opt, opvs, targetArticles, remove) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./index-d9a17ecd.js');
5
+ var index = require('./index-0c5bb387.js');
6
6
  var planner2dCore = require('@crystaldesign/planner-2d-core');
7
7
  require('@babel/runtime/helpers/slicedToArray');
8
8
  require('@babel/runtime/helpers/asyncToGenerator');
@@ -3,11 +3,11 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
3
3
  import _createClass from '@babel/runtime/helpers/createClass';
4
4
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
5
5
  import _regeneratorRuntime from '@babel/runtime/regenerator';
6
- import { c as Vector2, V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-2d017864.js';
6
+ import { c as Vector2, V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-a594415c.js';
7
7
  import DivaUtils, { DivaError, md5 } from '@crystaldesign/diva-utils';
8
8
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
9
9
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
10
- import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-95806884.js';
10
+ import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-36eede09.js';
11
11
  import '@babel/runtime/helpers/objectWithoutProperties';
12
12
  import 'axios';
13
13
  import '@babel/runtime/helpers/typeof';
@@ -4,10 +4,10 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
4
4
  import _createClass from '@babel/runtime/helpers/createClass';
5
5
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
6
6
  import _regeneratorRuntime from '@babel/runtime/regenerator';
7
- import { V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-2d017864.js';
7
+ import { V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-a594415c.js';
8
8
  import DivaUtils, { DivaError, md5 } from '@crystaldesign/diva-utils';
9
9
  import { computeDockedTransform } from '@crystaldesign/planner-2d-core';
10
- import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-95806884.js';
10
+ import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-36eede09.js';
11
11
  import '@babel/runtime/helpers/slicedToArray';
12
12
  import '@babel/runtime/helpers/objectWithoutProperties';
13
13
  import 'axios';