@crystaldesign/web-planner-logic 26.12.0-beta.22 → 26.12.0-beta.24

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 (29) hide show
  1. package/build/cjs/{DivaBoxPlanner-4257e123.js → DivaBoxPlanner-69dd68ba.js} +2 -2
  2. package/build/cjs/{DivaStandardPlanner-75e89258.js → DivaStandardPlanner-1e17ea12.js} +2 -2
  3. package/build/cjs/{DoorPlanner-d95057f1.js → DoorPlanner-602a86f3.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-5d7777a8.js → Host3DSignalR-09d9efe0.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-c7d2cdaf.js → LiviqueWWSHandler-9497b33d.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-5af229be.js → PfisterWWSHandler-14686c6d.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-55fe0f7d.js → PlannerHandler2D-a22115ce.js} +1 -1
  8. package/build/cjs/{SeriousBasketHandler-8e6ecb34.js → SeriousBasketHandler-acfb2f40.js} +3 -23
  9. package/build/cjs/{ShelfPlanner-0efecc7e.js → ShelfPlanner-bd6038e1.js} +1 -1
  10. package/build/cjs/{StandardWWSHandler-9fda645d.js → StandardWWSHandler-bafafa71.js} +1 -1
  11. package/build/cjs/{index-5e69d373.js → index-cca37a97.js} +203 -155
  12. package/build/cjs/index.js +1 -1
  13. package/build/esm/{DivaBoxPlanner-de401670.js → DivaBoxPlanner-50d29c59.js} +2 -2
  14. package/build/esm/{DivaStandardPlanner-9b5a2a5d.js → DivaStandardPlanner-e1831308.js} +2 -2
  15. package/build/esm/{DoorPlanner-183462e8.js → DoorPlanner-598af141.js} +1 -1
  16. package/build/esm/{Host3DSignalR-7e155294.js → Host3DSignalR-bc77d0ab.js} +1 -1
  17. package/build/esm/{LiviqueWWSHandler-ac11f46d.js → LiviqueWWSHandler-ace695dc.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-93696189.js → PfisterWWSHandler-ebf67f99.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-1c432604.js → PlannerHandler2D-cb6781eb.js} +1 -1
  20. package/build/esm/{SeriousBasketHandler-d9609a7b.js → SeriousBasketHandler-14961eb6.js} +3 -23
  21. package/build/esm/{ShelfPlanner-b2e45c1f.js → ShelfPlanner-6f2b92a1.js} +1 -1
  22. package/build/esm/{StandardWWSHandler-3d453d21.js → StandardWWSHandler-1c478a3c.js} +1 -1
  23. package/build/esm/{index-124399b2.js → index-a201dfa2.js} +203 -155
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.d.ts +0 -8
  26. package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.d.ts +5 -1
  28. package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.d.ts.map +1 -1
  29. package/package.json +3 -3
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./index-5e69d373.js');
5
+ var index = require('./index-cca37a97.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-124399b2.js';
6
+ import { c as Vector2, V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-a201dfa2.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-1c432604.js';
10
+ import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-cb6781eb.js';
11
11
  import '@babel/runtime/helpers/objectWithoutProperties';
12
12
  import 'axios';
13
13
  import '@crystaldesign/basket-model';
@@ -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-124399b2.js';
7
+ import { V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-a201dfa2.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-1c432604.js';
10
+ import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-cb6781eb.js';
11
11
  import '@babel/runtime/helpers/slicedToArray';
12
12
  import '@babel/runtime/helpers/objectWithoutProperties';
13
13
  import 'axios';
@@ -1,7 +1,7 @@
1
1
  import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
2
2
  import _createClass from '@babel/runtime/helpers/createClass';
3
3
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
4
- import './index-124399b2.js';
4
+ import './index-a201dfa2.js';
5
5
  import DivaUtils from '@crystaldesign/diva-utils';
6
6
  import '@babel/runtime/helpers/slicedToArray';
7
7
  import '@babel/runtime/helpers/asyncToGenerator';
@@ -3,7 +3,7 @@ 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 { d as bootMark, R as Rendering, H as HQRenderScript } from './index-124399b2.js';
6
+ import { d as bootMark, R as Rendering, H as HQRenderScript } from './index-a201dfa2.js';
7
7
  import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
8
8
  import { HubConnectionBuilder, LogLevel } from '@microsoft/signalr';
9
9
  import io from 'socket.io-client';
@@ -1,6 +1,6 @@
1
1
  import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
2
2
  import _createClass from '@babel/runtime/helpers/createClass';
3
- import './index-124399b2.js';
3
+ import './index-a201dfa2.js';
4
4
  import '@babel/runtime/helpers/slicedToArray';
5
5
  import '@babel/runtime/helpers/asyncToGenerator';
6
6
  import '@babel/runtime/helpers/defineProperty';
@@ -1,6 +1,6 @@
1
1
  import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
2
2
  import _createClass from '@babel/runtime/helpers/createClass';
3
- import { a as articleHandlerInstance } from './index-124399b2.js';
3
+ import { a as articleHandlerInstance } from './index-a201dfa2.js';
4
4
  import { SAPOrderLineData } from '@crystaldesign/basket-model';
5
5
  import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
6
6
  import '@babel/runtime/helpers/slicedToArray';
@@ -3,7 +3,7 @@ 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 } from './index-124399b2.js';
6
+ import { c as Vector2 } from './index-a201dfa2.js';
7
7
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
8
8
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
9
9
  import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
@@ -1,7 +1,7 @@
1
1
  import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
2
2
  import _createClass from '@babel/runtime/helpers/createClass';
3
3
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
4
- import { s as summaryHandlerInstance } from './index-124399b2.js';
4
+ import { s as summaryHandlerInstance } from './index-a201dfa2.js';
5
5
  import DivaUtils from '@crystaldesign/diva-utils';
6
6
  import '@babel/runtime/helpers/slicedToArray';
7
7
  import '@babel/runtime/helpers/asyncToGenerator';
@@ -70,7 +70,7 @@ var StandardWWSHandler = /*#__PURE__*/function () {
70
70
  var posNr = 1;
71
71
  for (var iKey in articles) {
72
72
  var article = articles[iKey];
73
- var partlistArticles = this.getPartlistComponents(article);
73
+ var partlistArticles = summaryHandlerInstance.getPartlistComponents(article);
74
74
  var partlistArticlesWithTabGroup = [];
75
75
  groupedPartlistArticles.push({
76
76
  article: article,
@@ -163,7 +163,7 @@ var StandardWWSHandler = /*#__PURE__*/function () {
163
163
  var _item$FormattedOption, _item$FormattedOption2, _this$getFormattedOpt;
164
164
  return item.Name == partListArticle.name && item.ArticleNr == partListArticle.configArticleCodex && ((_item$FormattedOption = item.FormattedOptions) === null || _item$FormattedOption === void 0 ? void 0 : _item$FormattedOption[0]) && ((_item$FormattedOption2 = item.FormattedOptions) === null || _item$FormattedOption2 === void 0 ? void 0 : _item$FormattedOption2[0].Title) == ((_this$getFormattedOpt = _this.getFormattedOptions(partListArticle, optionArticle, [], '', usedOptionCodexes)) === null || _this$getFormattedOpt === void 0 ? void 0 : _this$getFormattedOpt[0].Title);
165
165
  });
166
- var unitPrice = _this.unitPrice(partListArticle);
166
+ var unitPrice = summaryHandlerInstance.getPartlistUnitPrice(partListArticle);
167
167
  if (fountEntry) {
168
168
  fountEntry.Quantity = fountEntry.Quantity + partListArticle.quantity;
169
169
  fountEntry.FormattedPrice = DivaUtils.formatPrice(unitPrice * fountEntry.Quantity);
@@ -251,26 +251,6 @@ var StandardWWSHandler = /*#__PURE__*/function () {
251
251
  };
252
252
  }
253
253
 
254
- /**
255
- * Components at any partlist depth. Articles that only bundle further components without a price of their own (IDM
256
- * "Hülsen") are left out, also when the current configuration loads none of their components (e.g. no mattress chosen):
257
- * an empty Hülse is not a part. A partlist parent with a price of its own stays a part, so its price is not lost.
258
- */
259
- }, {
260
- key: "getPartlistComponents",
261
- value: function getPartlistComponents(article) {
262
- return Object.values(article.getRecursivePartlistArticles()).filter(function (partlistArticle) {
263
- return !partlistArticle.hasPartlistArticle || partlistArticle.mainPrice > 0;
264
- });
265
- }
266
-
267
- /** Unit price of a part: a partlist parent contributes only its own price, its components are listed themselves. */
268
- }, {
269
- key: "unitPrice",
270
- value: function unitPrice(partListArticle) {
271
- return partListArticle.hasPartlistArticle ? partListArticle.mainPrice : partListArticle.price;
272
- }
273
-
274
254
  /**
275
255
  * The first emitted option flagged with IS_MAIN_COLOR is the main color of the part list; without one, the first emitted
276
256
  * OPTBE_BOX option (API2 fallback) is. Decided after all lines exist, so only options that really appear can be chosen.
@@ -4,7 +4,7 @@ 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 { G as Grid, a as articleHandlerInstance, b as setHandlerInstance } from './index-124399b2.js';
7
+ import { G as Grid, a as articleHandlerInstance, b as setHandlerInstance } from './index-a201dfa2.js';
8
8
  import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
9
9
  import '@babel/runtime/helpers/slicedToArray';
10
10
  import '@babel/runtime/helpers/objectWithoutProperties';
@@ -1,6 +1,6 @@
1
1
  import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
2
2
  import _createClass from '@babel/runtime/helpers/createClass';
3
- import './index-124399b2.js';
3
+ import './index-a201dfa2.js';
4
4
  import '@babel/runtime/helpers/slicedToArray';
5
5
  import '@babel/runtime/helpers/asyncToGenerator';
6
6
  import '@babel/runtime/helpers/defineProperty';