@crystaldesign/web-planner-logic 26.14.0-beta.16 → 26.14.0-beta.18
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.
- package/build/cjs/{DivaBoxPlanner-4cf1b531.js → DivaBoxPlanner-a5f6ecf3.js} +2 -2
- package/build/cjs/{DivaStandardPlanner-e80e2d63.js → DivaStandardPlanner-b84e8c77.js} +2 -2
- package/build/cjs/{DoorPlanner-1e5f640f.js → DoorPlanner-00e36c65.js} +1 -1
- package/build/cjs/{Host3DSignalR-2b554ff3.js → Host3DSignalR-dcb7c665.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-0ddcb080.js → LiviqueWWSHandler-c8fecd2e.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-7575298f.js → PfisterWWSHandler-efcfdb92.js} +1 -1
- package/build/cjs/{PlannerHandler2D-f13be448.js → PlannerHandler2D-cdf303bd.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-15928aa6.js → SeriousBasketHandler-a159f15c.js} +1 -1
- package/build/cjs/{ShelfPlanner-d12a5010.js → ShelfPlanner-5329a6dc.js} +1 -1
- package/build/cjs/{StandardWWSHandler-4e129c94.js → StandardWWSHandler-4143da24.js} +1 -1
- package/build/cjs/{index-26c88bd9.js → index-df9d5ebc.js} +630 -201
- package/build/cjs/index.js +3 -1
- package/build/esm/{DivaBoxPlanner-149ec344.js → DivaBoxPlanner-604aac25.js} +2 -2
- package/build/esm/{DivaStandardPlanner-7a35b6d4.js → DivaStandardPlanner-7d0e4b79.js} +2 -2
- package/build/esm/{DoorPlanner-4e91165f.js → DoorPlanner-033934e5.js} +1 -1
- package/build/esm/{Host3DSignalR-c5556e93.js → Host3DSignalR-90c03467.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-96bc5a8a.js → LiviqueWWSHandler-2d57af9a.js} +1 -1
- package/build/esm/{PfisterWWSHandler-0733ad3d.js → PfisterWWSHandler-cb0741a1.js} +1 -1
- package/build/esm/{PlannerHandler2D-60865698.js → PlannerHandler2D-d4285c6f.js} +1 -1
- package/build/esm/{SeriousBasketHandler-afa8c61e.js → SeriousBasketHandler-2982e2a2.js} +1 -1
- package/build/esm/{ShelfPlanner-bee5bd90.js → ShelfPlanner-1f5d098e.js} +1 -1
- package/build/esm/{StandardWWSHandler-e686fb40.js → StandardWWSHandler-ac0ddcc9.js} +1 -1
- package/build/esm/{index-272b9790.js → index-f62e78c3.js} +629 -202
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/index.d.ts +2 -0
- package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts +3 -0
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts +8 -0
- package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/PriceObject.d.ts +3 -0
- package/build/types/web-planner-logic/src/interface/Articles/PriceObject.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +2 -1
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts +10 -0
- package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/IDM/IDMCatalog.d.ts +22 -0
- package/build/types/web-planner-logic/src/interface/IDM/IDMCatalog.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +5 -0
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts +17 -0
- package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/idmMeasurePrice.d.ts +61 -0
- package/build/types/web-planner-logic/src/logic/Article/idmMeasurePrice.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts +7 -0
- package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts +1 -0
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/IDMCatalogData.d.ts +6 -0
- package/build/types/web-planner-logic/src/model/Catalog/IDMCatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/freeTextDefaultValue.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/freeTextDefaultValue.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/idmMeasurePrice.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/idmMeasurePrice.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/idmMeasurePriceEngine.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/idmMeasurePriceEngine.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/idmPlanningSizeChoice.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/idmPlanningSizeChoice.test.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -2319,9 +2319,9 @@ function propertyEncodingOf(codex, entity) {
|
|
|
2319
2319
|
return undefined;
|
|
2320
2320
|
}
|
|
2321
2321
|
|
|
2322
|
-
function _createForOfIteratorHelper$
|
|
2323
|
-
function _unsupportedIterableToArray$
|
|
2324
|
-
function _arrayLikeToArray$
|
|
2322
|
+
function _createForOfIteratorHelper$B(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$B(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; } } }; }
|
|
2323
|
+
function _unsupportedIterableToArray$B(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$B(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$B(r, a) : void 0; } }
|
|
2324
|
+
function _arrayLikeToArray$B(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; }
|
|
2325
2325
|
var LOG$s = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
2326
2326
|
|
|
2327
2327
|
/** A JSON value: an object or an array. */
|
|
@@ -2418,7 +2418,7 @@ var SHAPE_TEXTS = {
|
|
|
2418
2418
|
// 'feature:value;feature:value;;...' - an entry without a target repairs nothing
|
|
2419
2419
|
REPAIR_VARIANT_VALUES: function REPAIR_VARIANT_VALUES(text) {
|
|
2420
2420
|
var repairs = {};
|
|
2421
|
-
var _iterator = _createForOfIteratorHelper$
|
|
2421
|
+
var _iterator = _createForOfIteratorHelper$B(text.split(';;').map(function (entry) {
|
|
2422
2422
|
return entry.split(';');
|
|
2423
2423
|
})),
|
|
2424
2424
|
_step;
|
|
@@ -2586,9 +2586,9 @@ function propertyTexts(value) {
|
|
|
2586
2586
|
return [JSON.stringify(value)];
|
|
2587
2587
|
}
|
|
2588
2588
|
|
|
2589
|
-
function _createForOfIteratorHelper$
|
|
2590
|
-
function _unsupportedIterableToArray$
|
|
2591
|
-
function _arrayLikeToArray$
|
|
2589
|
+
function _createForOfIteratorHelper$A(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$A(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; } } }; }
|
|
2590
|
+
function _unsupportedIterableToArray$A(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$A(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$A(r, a) : void 0; } }
|
|
2591
|
+
function _arrayLikeToArray$A(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; }
|
|
2592
2592
|
var LIGHT_PRESETS = ['day', 'evening'];
|
|
2593
2593
|
var FLOOR_FINISHES = ['matte', 'satin', 'gloss'];
|
|
2594
2594
|
var OPENING_TYPES = ['door', 'window', 'passage'];
|
|
@@ -2683,7 +2683,7 @@ function mergeStraightCorners(footprint, wallOf) {
|
|
|
2683
2683
|
bx = _footprint$corner[0],
|
|
2684
2684
|
bz = _footprint$corner[1];
|
|
2685
2685
|
var length = Math.hypot(bx - ax, bz - az);
|
|
2686
|
-
var _iterator = _createForOfIteratorHelper$
|
|
2686
|
+
var _iterator = _createForOfIteratorHelper$A(wallOf),
|
|
2687
2687
|
_step;
|
|
2688
2688
|
try {
|
|
2689
2689
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -2699,7 +2699,7 @@ function mergeStraightCorners(footprint, wallOf) {
|
|
|
2699
2699
|
_iterator.f();
|
|
2700
2700
|
}
|
|
2701
2701
|
footprint.splice(corner, 1);
|
|
2702
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
2702
|
+
var _iterator2 = _createForOfIteratorHelper$A(wallOf),
|
|
2703
2703
|
_step2;
|
|
2704
2704
|
try {
|
|
2705
2705
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -2721,7 +2721,7 @@ function normalizeFootprint(value) {
|
|
|
2721
2721
|
if (!Array.isArray(value) || !value.every(isPoint)) return undefined;
|
|
2722
2722
|
var footprint = [];
|
|
2723
2723
|
var keptIndex = [];
|
|
2724
|
-
var _iterator3 = _createForOfIteratorHelper$
|
|
2724
|
+
var _iterator3 = _createForOfIteratorHelper$A(value),
|
|
2725
2725
|
_step3;
|
|
2726
2726
|
try {
|
|
2727
2727
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
@@ -3050,9 +3050,9 @@ var DEFAULT_PLACEMENT_RULES = {
|
|
|
3050
3050
|
|
|
3051
3051
|
function ownKeys$w(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3052
3052
|
function _objectSpread$w(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$w(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$w(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3053
|
-
function _createForOfIteratorHelper$
|
|
3054
|
-
function _unsupportedIterableToArray$
|
|
3055
|
-
function _arrayLikeToArray$
|
|
3053
|
+
function _createForOfIteratorHelper$z(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$z(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; } } }; }
|
|
3054
|
+
function _unsupportedIterableToArray$z(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$z(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$z(r, a) : void 0; } }
|
|
3055
|
+
function _arrayLikeToArray$z(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; }
|
|
3056
3056
|
|
|
3057
3057
|
/** Where a carrier takes another element: in front of it, beside it, at its foot end, around it or under it. */
|
|
3058
3058
|
|
|
@@ -3161,7 +3161,7 @@ function toSlot(spec) {
|
|
|
3161
3161
|
});
|
|
3162
3162
|
var accepts = {};
|
|
3163
3163
|
if (Array.isArray(spec.accepts)) {
|
|
3164
|
-
var _iterator = _createForOfIteratorHelper$
|
|
3164
|
+
var _iterator = _createForOfIteratorHelper$z(normalizePlacementTypes(spec.accepts)),
|
|
3165
3165
|
_step;
|
|
3166
3166
|
try {
|
|
3167
3167
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -3239,7 +3239,7 @@ function mergeSpecs(defaults, value) {
|
|
|
3239
3239
|
if (!_carrier || !isRecord(carrierValue)) continue;
|
|
3240
3240
|
var _carrierRules = (_merged$_carrier = merged[_carrier]) !== null && _merged$_carrier !== void 0 ? _merged$_carrier : {};
|
|
3241
3241
|
merged[_carrier] = _carrierRules;
|
|
3242
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
3242
|
+
var _iterator2 = _createForOfIteratorHelper$z(RELATIONS),
|
|
3243
3243
|
_step2;
|
|
3244
3244
|
try {
|
|
3245
3245
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -3290,7 +3290,7 @@ function resolvePlacementOptions(rtvPreset) {
|
|
|
3290
3290
|
carrier = _Object$entries7$_i[0],
|
|
3291
3291
|
carrierRules = _Object$entries7$_i[1];
|
|
3292
3292
|
var slots = {};
|
|
3293
|
-
var _iterator3 = _createForOfIteratorHelper$
|
|
3293
|
+
var _iterator3 = _createForOfIteratorHelper$z(RELATIONS),
|
|
3294
3294
|
_step3;
|
|
3295
3295
|
try {
|
|
3296
3296
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
@@ -3312,9 +3312,9 @@ function resolvePlacementOptions(rtvPreset) {
|
|
|
3312
3312
|
};
|
|
3313
3313
|
}
|
|
3314
3314
|
|
|
3315
|
-
function _createForOfIteratorHelper$
|
|
3316
|
-
function _unsupportedIterableToArray$
|
|
3317
|
-
function _arrayLikeToArray$
|
|
3315
|
+
function _createForOfIteratorHelper$y(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$y(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; } } }; }
|
|
3316
|
+
function _unsupportedIterableToArray$y(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$y(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$y(r, a) : void 0; } }
|
|
3317
|
+
function _arrayLikeToArray$y(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; }
|
|
3318
3318
|
|
|
3319
3319
|
/** The article facts the placement-type chain reads. */
|
|
3320
3320
|
|
|
@@ -3325,7 +3325,7 @@ function _arrayLikeToArray$x(r, a) { (null == a || a > r.length) && (a = r.lengt
|
|
|
3325
3325
|
function resolvePlacementType(input, paletteGroups) {
|
|
3326
3326
|
var property = normalizePlacementTypes(input.placementType);
|
|
3327
3327
|
if (property.length) return property;
|
|
3328
|
-
var _iterator = _createForOfIteratorHelper$
|
|
3328
|
+
var _iterator = _createForOfIteratorHelper$y(input.groupNames),
|
|
3329
3329
|
_step;
|
|
3330
3330
|
try {
|
|
3331
3331
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -18694,9 +18694,9 @@ function parseCornerSide(value) {
|
|
|
18694
18694
|
return isOnValue(value) ? 'any' : undefined;
|
|
18695
18695
|
}
|
|
18696
18696
|
|
|
18697
|
-
function _createForOfIteratorHelper$
|
|
18698
|
-
function _unsupportedIterableToArray$
|
|
18699
|
-
function _arrayLikeToArray$
|
|
18697
|
+
function _createForOfIteratorHelper$x(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$x(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; } } }; }
|
|
18698
|
+
function _unsupportedIterableToArray$x(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$x(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$x(r, a) : void 0; } }
|
|
18699
|
+
function _arrayLikeToArray$x(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; }
|
|
18700
18700
|
|
|
18701
18701
|
//kaufmännischer Artikel
|
|
18702
18702
|
var CatalogArticleData = /*#__PURE__*/function () {
|
|
@@ -19142,6 +19142,19 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
19142
19142
|
set: function set(val) {
|
|
19143
19143
|
this._catalogArticle.idmPrices = val;
|
|
19144
19144
|
}
|
|
19145
|
+
}, {
|
|
19146
|
+
key: "priceTypeRef",
|
|
19147
|
+
get: function get() {
|
|
19148
|
+
return this._catalogArticle.priceTypeRef;
|
|
19149
|
+
},
|
|
19150
|
+
set: function set(val) {
|
|
19151
|
+
this._catalogArticle.priceTypeRef = val;
|
|
19152
|
+
}
|
|
19153
|
+
}, {
|
|
19154
|
+
key: "basicShapeMm",
|
|
19155
|
+
get: function get() {
|
|
19156
|
+
return this._catalogArticle.basicShapeMm;
|
|
19157
|
+
}
|
|
19145
19158
|
}, {
|
|
19146
19159
|
key: "priceFeatureGroupNos",
|
|
19147
19160
|
get: function get() {
|
|
@@ -19526,7 +19539,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
19526
19539
|
value: function getOptionValueFromOption(opt, opv) {
|
|
19527
19540
|
if (this._catalogArticle.articleOptions[opt] && this._catalogArticle.articleOptions[opt].hasOPG) {
|
|
19528
19541
|
var myOPGs = this._catalogArticle.articleOptions[opt].articleOptionValues;
|
|
19529
|
-
var _iterator = _createForOfIteratorHelper$
|
|
19542
|
+
var _iterator = _createForOfIteratorHelper$x(myOPGs),
|
|
19530
19543
|
_step;
|
|
19531
19544
|
try {
|
|
19532
19545
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -20695,9 +20708,9 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
|
|
|
20695
20708
|
}]);
|
|
20696
20709
|
}();
|
|
20697
20710
|
|
|
20698
|
-
function _createForOfIteratorHelper$
|
|
20699
|
-
function _unsupportedIterableToArray$
|
|
20700
|
-
function _arrayLikeToArray$
|
|
20711
|
+
function _createForOfIteratorHelper$w(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$w(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; } } }; }
|
|
20712
|
+
function _unsupportedIterableToArray$w(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$w(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$w(r, a) : void 0; } }
|
|
20713
|
+
function _arrayLikeToArray$w(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; }
|
|
20701
20714
|
var LOG$o = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
20702
20715
|
|
|
20703
20716
|
/** Catalog options already warned about a `VIEWER_TOGGLE` without `IS_STATE`: one warning per option, not per article. */
|
|
@@ -20818,7 +20831,7 @@ var ArticleOptionData = /*#__PURE__*/function () {
|
|
|
20818
20831
|
}, {
|
|
20819
20832
|
key: "getOpvByOcd",
|
|
20820
20833
|
value: function getOpvByOcd(codex) {
|
|
20821
|
-
var _iterator = _createForOfIteratorHelper$
|
|
20834
|
+
var _iterator = _createForOfIteratorHelper$w(this.opt.articleOptionValues),
|
|
20822
20835
|
_step;
|
|
20823
20836
|
try {
|
|
20824
20837
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -21177,9 +21190,9 @@ var ArticleOptionData = /*#__PURE__*/function () {
|
|
|
21177
21190
|
}]);
|
|
21178
21191
|
}();
|
|
21179
21192
|
|
|
21180
|
-
function _createForOfIteratorHelper$
|
|
21181
|
-
function _unsupportedIterableToArray$
|
|
21182
|
-
function _arrayLikeToArray$
|
|
21193
|
+
function _createForOfIteratorHelper$v(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$v(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; } } }; }
|
|
21194
|
+
function _unsupportedIterableToArray$v(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$v(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$v(r, a) : void 0; } }
|
|
21195
|
+
function _arrayLikeToArray$v(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; }
|
|
21183
21196
|
var LOG$n = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
21184
21197
|
function addSupplierColors(set, catalogArticleData, allOPVsOfOPT, supplierColors, catalog, newOPT, rule) {
|
|
21185
21198
|
var lang = catalog.api.getLanguage();
|
|
@@ -21556,7 +21569,7 @@ function getReferencedDecisions(decisions, decisionRefs) {
|
|
|
21556
21569
|
});
|
|
21557
21570
|
var enableTargets = getActionTargets(decisions, 'ENABLE_DECISION');
|
|
21558
21571
|
for (var i = 0; i < evaluated.length; i++) {
|
|
21559
|
-
var _iterator = _createForOfIteratorHelper$
|
|
21572
|
+
var _iterator = _createForOfIteratorHelper$v(getActionTargets([evaluated[i]], 'DISABLE_DECISION')),
|
|
21560
21573
|
_step;
|
|
21561
21574
|
try {
|
|
21562
21575
|
var _loop = function _loop() {
|
|
@@ -21583,19 +21596,19 @@ function getReferencedDecisions(decisions, decisionRefs) {
|
|
|
21583
21596
|
/** Numbers of the decisions an action of the given type points at. */
|
|
21584
21597
|
function getActionTargets(decisions, type) {
|
|
21585
21598
|
var targets = new Set();
|
|
21586
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
21599
|
+
var _iterator2 = _createForOfIteratorHelper$v(decisions),
|
|
21587
21600
|
_step2;
|
|
21588
21601
|
try {
|
|
21589
21602
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
21590
21603
|
var _decision$DOC;
|
|
21591
21604
|
var decision = _step2.value;
|
|
21592
|
-
var _iterator3 = _createForOfIteratorHelper$
|
|
21605
|
+
var _iterator3 = _createForOfIteratorHelper$v((_decision$DOC = decision.DOC) !== null && _decision$DOC !== void 0 ? _decision$DOC : []),
|
|
21593
21606
|
_step3;
|
|
21594
21607
|
try {
|
|
21595
21608
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
21596
21609
|
var _combination$DA;
|
|
21597
21610
|
var combination = _step3.value;
|
|
21598
|
-
var _iterator4 = _createForOfIteratorHelper$
|
|
21611
|
+
var _iterator4 = _createForOfIteratorHelper$v((_combination$DA = combination.DA) !== null && _combination$DA !== void 0 ? _combination$DA : []),
|
|
21599
21612
|
_step4;
|
|
21600
21613
|
try {
|
|
21601
21614
|
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
@@ -21749,9 +21762,9 @@ function getArticleOptionValueType(set, codex, jsonOPV, catalogOPV, myArticle, i
|
|
|
21749
21762
|
return opv;
|
|
21750
21763
|
}
|
|
21751
21764
|
|
|
21752
|
-
function _createForOfIteratorHelper$
|
|
21753
|
-
function _unsupportedIterableToArray$
|
|
21754
|
-
function _arrayLikeToArray$
|
|
21765
|
+
function _createForOfIteratorHelper$u(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$u(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; } } }; }
|
|
21766
|
+
function _unsupportedIterableToArray$u(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$u(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$u(r, a) : void 0; } }
|
|
21767
|
+
function _arrayLikeToArray$u(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; }
|
|
21755
21768
|
var LOG$m = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
21756
21769
|
var COUNT_KEY_BY_DOCKING_TYPE = {
|
|
21757
21770
|
AVC: 'avc',
|
|
@@ -21846,7 +21859,7 @@ var SVGUtils = /*#__PURE__*/function () {
|
|
|
21846
21859
|
avu: 0,
|
|
21847
21860
|
avl: 0
|
|
21848
21861
|
};
|
|
21849
|
-
var _iterator = _createForOfIteratorHelper$
|
|
21862
|
+
var _iterator = _createForOfIteratorHelper$u(this.getDPsInSVG(content)),
|
|
21850
21863
|
_step;
|
|
21851
21864
|
try {
|
|
21852
21865
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -22041,7 +22054,7 @@ var SVGUtils = /*#__PURE__*/function () {
|
|
|
22041
22054
|
keepWidth: keep === null || keep === void 0 ? void 0 : keep.width,
|
|
22042
22055
|
keepDepth: keep === null || keep === void 0 ? void 0 : keep.depth
|
|
22043
22056
|
});
|
|
22044
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
22057
|
+
var _iterator2 = _createForOfIteratorHelper$u(result.warnings),
|
|
22045
22058
|
_step2;
|
|
22046
22059
|
try {
|
|
22047
22060
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -22061,9 +22074,9 @@ var SVGUtils = /*#__PURE__*/function () {
|
|
|
22061
22074
|
|
|
22062
22075
|
function ownKeys$u(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22063
22076
|
function _objectSpread$u(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$u(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$u(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22064
|
-
function _createForOfIteratorHelper$
|
|
22065
|
-
function _unsupportedIterableToArray$
|
|
22066
|
-
function _arrayLikeToArray$
|
|
22077
|
+
function _createForOfIteratorHelper$t(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$t(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; } } }; }
|
|
22078
|
+
function _unsupportedIterableToArray$t(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$t(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$t(r, a) : void 0; } }
|
|
22079
|
+
function _arrayLikeToArray$t(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; }
|
|
22067
22080
|
var LOG$l = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
22068
22081
|
|
|
22069
22082
|
//a decision enabled by an action may itself enable further ones; the cap keeps a cyclic catalog from looping
|
|
@@ -22154,8 +22167,9 @@ function _loadMoreFromIDMArticles() {
|
|
|
22154
22167
|
catalogArticleData.decisionsRefs = item.decisionRefs;
|
|
22155
22168
|
catalogArticleData.idmPartlist = item.partlist;
|
|
22156
22169
|
catalogArticleData.idmPrices = item.prices;
|
|
22170
|
+
if (item.priceTypeRef) catalogArticleData.priceTypeRef = item.priceTypeRef;
|
|
22157
22171
|
initIDMArticleRelations(item, catalogArticleData, catalogData, serieCatalogs);
|
|
22158
|
-
case
|
|
22172
|
+
case 9:
|
|
22159
22173
|
case "end":
|
|
22160
22174
|
return _context4.stop();
|
|
22161
22175
|
}
|
|
@@ -22216,7 +22230,7 @@ function _loadMoreFromIDMArticles() {
|
|
|
22216
22230
|
catalogData.loadedPriceFeaturegroups.push(initializePriceFeatureGroups(priceFeatureGroups[_i7], catalogData.idmOptionGroups));
|
|
22217
22231
|
}
|
|
22218
22232
|
}
|
|
22219
|
-
_iterator6 = _createForOfIteratorHelper$
|
|
22233
|
+
_iterator6 = _createForOfIteratorHelper$t(toLoadPFGroups);
|
|
22220
22234
|
_context8.prev = 36;
|
|
22221
22235
|
_loop7 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop7() {
|
|
22222
22236
|
var prfgNo, askedBy;
|
|
@@ -22382,7 +22396,7 @@ function _loadMoreFromIDMArticles() {
|
|
|
22382
22396
|
_context8.next = 62;
|
|
22383
22397
|
break;
|
|
22384
22398
|
case 67:
|
|
22385
|
-
_iterator7 = _createForOfIteratorHelper$
|
|
22399
|
+
_iterator7 = _createForOfIteratorHelper$t(toLoadFeatures);
|
|
22386
22400
|
_context8.prev = 68;
|
|
22387
22401
|
_loop8 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop8() {
|
|
22388
22402
|
var featureNo, askedBy;
|
|
@@ -22511,13 +22525,13 @@ function readAdditionalItemRefs(item) {
|
|
|
22511
22525
|
var _item$mandatoryAdditi, _item$mandatoryAdditi2, _item$optionalAdditio, _item$optionalAdditio2;
|
|
22512
22526
|
var merged = new Map();
|
|
22513
22527
|
var add = function add(groups, quantity) {
|
|
22514
|
-
var _iterator = _createForOfIteratorHelper$
|
|
22528
|
+
var _iterator = _createForOfIteratorHelper$t(groups),
|
|
22515
22529
|
_step;
|
|
22516
22530
|
try {
|
|
22517
22531
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
22518
22532
|
var _group$itemRef;
|
|
22519
22533
|
var group = _step.value;
|
|
22520
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
22534
|
+
var _iterator2 = _createForOfIteratorHelper$t((_group$itemRef = group.itemRef) !== null && _group$itemRef !== void 0 ? _group$itemRef : []),
|
|
22521
22535
|
_step2;
|
|
22522
22536
|
try {
|
|
22523
22537
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -22584,7 +22598,7 @@ function _loadReferencedSerieCatalogs() {
|
|
|
22584
22598
|
});
|
|
22585
22599
|
}));
|
|
22586
22600
|
serieNos["delete"](String(catalogData.catalogCodex));
|
|
22587
|
-
_iterator8 = _createForOfIteratorHelper$
|
|
22601
|
+
_iterator8 = _createForOfIteratorHelper$t(serieNos);
|
|
22588
22602
|
_context9.prev = 6;
|
|
22589
22603
|
_iterator8.s();
|
|
22590
22604
|
case 8:
|
|
@@ -22761,11 +22775,11 @@ function _fillMissingDockingPointCounts() {
|
|
|
22761
22775
|
case 3:
|
|
22762
22776
|
// the same accessories initIDMArticleRelations maps, each with the catalog it lives in
|
|
22763
22777
|
accessories = new Map();
|
|
22764
|
-
_iterator9 = _createForOfIteratorHelper$
|
|
22778
|
+
_iterator9 = _createForOfIteratorHelper$t(items);
|
|
22765
22779
|
try {
|
|
22766
22780
|
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
22767
22781
|
item = _step9.value;
|
|
22768
|
-
_iterator10 = _createForOfIteratorHelper$
|
|
22782
|
+
_iterator10 = _createForOfIteratorHelper$t(readAdditionalItemRefs(item));
|
|
22769
22783
|
try {
|
|
22770
22784
|
for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
|
|
22771
22785
|
ref = _step10.value;
|
|
@@ -22902,16 +22916,16 @@ var loadDecisionsReferencedByActions = /*#__PURE__*/function () {
|
|
|
22902
22916
|
break;
|
|
22903
22917
|
}
|
|
22904
22918
|
toLoad = new Set();
|
|
22905
|
-
_iterator3 = _createForOfIteratorHelper$
|
|
22919
|
+
_iterator3 = _createForOfIteratorHelper$t(catalogData.loadedDecisions);
|
|
22906
22920
|
try {
|
|
22907
22921
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
22908
22922
|
decision = _step3.value;
|
|
22909
|
-
_iterator4 = _createForOfIteratorHelper$
|
|
22923
|
+
_iterator4 = _createForOfIteratorHelper$t((_decision$optionCombi = decision.optionCombinations) !== null && _decision$optionCombi !== void 0 ? _decision$optionCombi : []);
|
|
22910
22924
|
try {
|
|
22911
22925
|
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
22912
22926
|
combination = _step4.value;
|
|
22913
22927
|
refs = [].concat(_toConsumableArray__default["default"]((_combination$projectA = (_combination$projectA2 = combination.projectActions) === null || _combination$projectA2 === void 0 ? void 0 : _combination$projectA2.disableDecision) !== null && _combination$projectA !== void 0 ? _combination$projectA : []), _toConsumableArray__default["default"]((_combination$projectA3 = (_combination$projectA4 = combination.projectActions) === null || _combination$projectA4 === void 0 ? void 0 : _combination$projectA4.enableDecision) !== null && _combination$projectA3 !== void 0 ? _combination$projectA3 : []));
|
|
22914
|
-
_iterator5 = _createForOfIteratorHelper$
|
|
22928
|
+
_iterator5 = _createForOfIteratorHelper$t(refs);
|
|
22915
22929
|
try {
|
|
22916
22930
|
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
22917
22931
|
ref = _step5.value;
|
|
@@ -23335,6 +23349,233 @@ function getArticleOption(set, option, catalogOption, feature, catalogArticleDat
|
|
|
23335
23349
|
return opv;
|
|
23336
23350
|
}
|
|
23337
23351
|
|
|
23352
|
+
function _createForOfIteratorHelper$s(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$s(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; } } }; }
|
|
23353
|
+
function _unsupportedIterableToArray$s(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$s(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$s(r, a) : void 0; } }
|
|
23354
|
+
function _arrayLikeToArray$s(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; }
|
|
23355
|
+
|
|
23356
|
+
/** The dimensions of an article in mm. */
|
|
23357
|
+
|
|
23358
|
+
/** How a measure-dependent catalog price became the price of the configured article. */
|
|
23359
|
+
|
|
23360
|
+
var DIMENSION_OF = {
|
|
23361
|
+
b: 'width',
|
|
23362
|
+
w: 'width',
|
|
23363
|
+
t: 'depth',
|
|
23364
|
+
d: 'depth',
|
|
23365
|
+
h: 'height'
|
|
23366
|
+
};
|
|
23367
|
+
|
|
23368
|
+
/** A price type that prices by width, depth or height; a piece price type has no basic unit. */
|
|
23369
|
+
function isMeasureDependent(priceType) {
|
|
23370
|
+
var _priceType$basicUnit;
|
|
23371
|
+
return !!priceType && ((_priceType$basicUnit = priceType.basicUnit) !== null && _priceType$basicUnit !== void 0 ? _priceType$basicUnit : 0) > 0 && !!(priceType.widthX || priceType.depthY || priceType.heightZ);
|
|
23372
|
+
}
|
|
23373
|
+
|
|
23374
|
+
/**
|
|
23375
|
+
* The length, area or volume a price type prices, in mm, mm² or mm³: its formula if it has one, otherwise the
|
|
23376
|
+
* product of the flagged dimensions. Undefined when a dimension it needs is missing or the formula cannot be read.
|
|
23377
|
+
*/
|
|
23378
|
+
function priceTypeMeasure(priceType, measures) {
|
|
23379
|
+
var _priceType$priceTypeF;
|
|
23380
|
+
if ((_priceType$priceTypeF = priceType.priceTypeFormula) !== null && _priceType$priceTypeF !== void 0 && _priceType$priceTypeF.trim()) return evaluatePriceTypeFormula(priceType.priceTypeFormula, measures);
|
|
23381
|
+
var used = [];
|
|
23382
|
+
if (priceType.widthX) used.push(measures.width);
|
|
23383
|
+
if (priceType.depthY) used.push(measures.depth);
|
|
23384
|
+
if (priceType.heightZ) used.push(measures.height);
|
|
23385
|
+
if (!used.length || used.some(function (m) {
|
|
23386
|
+
return typeof m !== 'number' || !Number.isFinite(m);
|
|
23387
|
+
})) return undefined;
|
|
23388
|
+
return used.reduce(function (product, m) {
|
|
23389
|
+
return product * m;
|
|
23390
|
+
}, 1);
|
|
23391
|
+
}
|
|
23392
|
+
|
|
23393
|
+
/** Rounds a measure to a multiple of the rounding unit: 1 up, 2 down, 3 commercially. */
|
|
23394
|
+
function roundMeasure(measure, roundingUnit, roundingType) {
|
|
23395
|
+
if (!roundingUnit || roundingUnit <= 0) return measure;
|
|
23396
|
+
// Float noise is cut first: 2350 / 10 has to stay 235 steps and must not be rounded up to 236.
|
|
23397
|
+
var steps = Math.round(measure / roundingUnit * 1e9) / 1e9;
|
|
23398
|
+
switch (roundingType) {
|
|
23399
|
+
case 2:
|
|
23400
|
+
return Math.floor(steps) * roundingUnit;
|
|
23401
|
+
case 3:
|
|
23402
|
+
return Math.round(steps) * roundingUnit;
|
|
23403
|
+
default:
|
|
23404
|
+
return Math.ceil(steps) * roundingUnit;
|
|
23405
|
+
}
|
|
23406
|
+
}
|
|
23407
|
+
|
|
23408
|
+
/**
|
|
23409
|
+
* The price of a measure-dependent catalog price for the given dimensions. A basic price dependent type charges the
|
|
23410
|
+
* base price for the basic price unit and the unit price for the rest of the measure (never below zero); any other
|
|
23411
|
+
* type charges the unit price for the whole measure and the base price as its minimum. Undefined for a piece price
|
|
23412
|
+
* type, when a dimension the type needs is missing or when a formula comes out negative.
|
|
23413
|
+
*/
|
|
23414
|
+
function calcMeasurePrice(unitPrice, priceType, measures, basic) {
|
|
23415
|
+
if (!isMeasureDependent(priceType)) return undefined;
|
|
23416
|
+
var raw = priceTypeMeasure(priceType, measures);
|
|
23417
|
+
if (raw === undefined || raw < 0) return undefined;
|
|
23418
|
+
var measure = roundMeasure(raw, priceType.roundingUnit, priceType.roundingType);
|
|
23419
|
+
var basicUnit = priceType.basicUnit;
|
|
23420
|
+
var basicPrice = (basic === null || basic === void 0 ? void 0 : basic.price) || undefined;
|
|
23421
|
+
var price;
|
|
23422
|
+
var minimumApplied = false;
|
|
23423
|
+
if (priceType.basicPriceDependent) {
|
|
23424
|
+
var _basic$unit;
|
|
23425
|
+
price = (basicPrice !== null && basicPrice !== void 0 ? basicPrice : 0) + unitPrice * Math.max(0, measure - ((_basic$unit = basic === null || basic === void 0 ? void 0 : basic.unit) !== null && _basic$unit !== void 0 ? _basic$unit : 0)) / basicUnit;
|
|
23426
|
+
} else {
|
|
23427
|
+
price = unitPrice * measure / basicUnit;
|
|
23428
|
+
if (basicPrice !== undefined && basicPrice > price) {
|
|
23429
|
+
price = basicPrice;
|
|
23430
|
+
minimumApplied = true;
|
|
23431
|
+
}
|
|
23432
|
+
}
|
|
23433
|
+
return {
|
|
23434
|
+
priceTypeNo: priceType.priceTypeNo,
|
|
23435
|
+
unitPrice: unitPrice,
|
|
23436
|
+
measure: measure,
|
|
23437
|
+
basicUnit: basicUnit,
|
|
23438
|
+
unit: priceUnitLabel(priceType),
|
|
23439
|
+
basicPrice: basicPrice,
|
|
23440
|
+
basicPriceDependent: priceType.basicPriceDependent || undefined,
|
|
23441
|
+
basicPriceUnit: priceType.basicPriceDependent ? basic === null || basic === void 0 ? void 0 : basic.unit : undefined,
|
|
23442
|
+
minimumApplied: minimumApplied || undefined,
|
|
23443
|
+
price: Math.round((price + Number.EPSILON) * 100) / 100
|
|
23444
|
+
};
|
|
23445
|
+
}
|
|
23446
|
+
|
|
23447
|
+
/**
|
|
23448
|
+
* The unit a price type prices per: 'm', 'cm²', 'm³', ... or the basic unit in mm when it is no such power. A formula
|
|
23449
|
+
* does not say how many dimensions its result has, so its unit is read from the basic unit alone.
|
|
23450
|
+
*/
|
|
23451
|
+
function priceUnitLabel(priceType) {
|
|
23452
|
+
var _priceType$basicUnit2, _priceType$priceTypeF2;
|
|
23453
|
+
var basicUnit = (_priceType$basicUnit2 = priceType.basicUnit) !== null && _priceType$basicUnit2 !== void 0 ? _priceType$basicUnit2 : 0;
|
|
23454
|
+
var flagged = [priceType.widthX, priceType.depthY, priceType.heightZ].filter(Boolean).length;
|
|
23455
|
+
var dimensionCounts = (_priceType$priceTypeF2 = priceType.priceTypeFormula) !== null && _priceType$priceTypeF2 !== void 0 && _priceType$priceTypeF2.trim() ? [1, 2, 3] : [flagged];
|
|
23456
|
+
var _iterator = _createForOfIteratorHelper$s([['m', 1000], ['cm', 10], ['mm', 1]]),
|
|
23457
|
+
_step;
|
|
23458
|
+
try {
|
|
23459
|
+
var _loop = function _loop() {
|
|
23460
|
+
var _step$value = _slicedToArray__default["default"](_step.value, 2),
|
|
23461
|
+
unit = _step$value[0],
|
|
23462
|
+
side = _step$value[1];
|
|
23463
|
+
var dimensions = dimensionCounts.find(function (count) {
|
|
23464
|
+
return count > 0 && basicUnit === Math.pow(side, count);
|
|
23465
|
+
});
|
|
23466
|
+
if (dimensions) return {
|
|
23467
|
+
v: unit + EXPONENT[dimensions]
|
|
23468
|
+
};
|
|
23469
|
+
},
|
|
23470
|
+
_ret;
|
|
23471
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
23472
|
+
_ret = _loop();
|
|
23473
|
+
if (_ret) return _ret.v;
|
|
23474
|
+
}
|
|
23475
|
+
} catch (err) {
|
|
23476
|
+
_iterator.e(err);
|
|
23477
|
+
} finally {
|
|
23478
|
+
_iterator.f();
|
|
23479
|
+
}
|
|
23480
|
+
return basicUnit + ' mm' + EXPONENT[flagged];
|
|
23481
|
+
}
|
|
23482
|
+
var EXPONENT = {
|
|
23483
|
+
0: '',
|
|
23484
|
+
1: '',
|
|
23485
|
+
2: '²',
|
|
23486
|
+
3: '³'
|
|
23487
|
+
};
|
|
23488
|
+
|
|
23489
|
+
/** The rounded measure of a price with its unit: mm, mm² or mm³ by the dimensions of the unit the price is per. */
|
|
23490
|
+
function measureWithUnit(_ref) {
|
|
23491
|
+
var _exec$, _exec;
|
|
23492
|
+
var measure = _ref.measure,
|
|
23493
|
+
unit = _ref.unit;
|
|
23494
|
+
return "".concat(measure, " mm").concat((_exec$ = (_exec = /[²³]$/.exec(unit)) === null || _exec === void 0 ? void 0 : _exec[0]) !== null && _exec$ !== void 0 ? _exec$ : '');
|
|
23495
|
+
}
|
|
23496
|
+
|
|
23497
|
+
/** The calculation in one line, e.g. '45 per m × 2.35 m = 105.75' or '100 base for 1.5 m + 40 per m × 0.85 m = 134'. */
|
|
23498
|
+
function describeMeasurePrice(_ref2) {
|
|
23499
|
+
var unitPrice = _ref2.unitPrice,
|
|
23500
|
+
measure = _ref2.measure,
|
|
23501
|
+
basicUnit = _ref2.basicUnit,
|
|
23502
|
+
unit = _ref2.unit,
|
|
23503
|
+
basicPrice = _ref2.basicPrice,
|
|
23504
|
+
basicPriceUnit = _ref2.basicPriceUnit,
|
|
23505
|
+
basicPriceDependent = _ref2.basicPriceDependent,
|
|
23506
|
+
minimumApplied = _ref2.minimumApplied,
|
|
23507
|
+
price = _ref2.price;
|
|
23508
|
+
// a basic unit that is no metric power is named in mm, so the measure is too
|
|
23509
|
+
var amount = function amount(mm) {
|
|
23510
|
+
return /\d/.test(unit) ? measureWithUnit({
|
|
23511
|
+
measure: mm,
|
|
23512
|
+
unit: unit
|
|
23513
|
+
}) : "".concat(Math.round(mm / basicUnit * 10000) / 10000, " ").concat(unit);
|
|
23514
|
+
};
|
|
23515
|
+
if (basicPriceDependent) return "".concat(basicPrice !== null && basicPrice !== void 0 ? basicPrice : 0, " base for ").concat(amount(basicPriceUnit !== null && basicPriceUnit !== void 0 ? basicPriceUnit : 0), " + ").concat(unitPrice, " per ").concat(unit, " \xD7 ").concat(amount(Math.max(0, measure - (basicPriceUnit !== null && basicPriceUnit !== void 0 ? basicPriceUnit : 0))), " = ").concat(price);
|
|
23516
|
+
var calculation = "".concat(unitPrice, " per ").concat(unit, " \xD7 ").concat(amount(measure));
|
|
23517
|
+
return minimumApplied ? "".concat(calculation, " is below the minimum: ").concat(price) : "".concat(calculation, " = ").concat(price);
|
|
23518
|
+
}
|
|
23519
|
+
|
|
23520
|
+
/**
|
|
23521
|
+
* Evaluates a PRICE_TYPE_FORMULA over the dimensions in mm: b or w is the width, t or d the depth, h the height,
|
|
23522
|
+
* combined with + - * / and brackets. Undefined when it uses a missing dimension or cannot be read.
|
|
23523
|
+
*/
|
|
23524
|
+
function evaluatePriceTypeFormula(formula, measures) {
|
|
23525
|
+
var source = formula.replace(/\s+/g, '').toLowerCase();
|
|
23526
|
+
var pos = 0;
|
|
23527
|
+
var invalid = function invalid() {
|
|
23528
|
+
throw new Error('invalid price type formula');
|
|
23529
|
+
};
|
|
23530
|
+
var _factor = function factor() {
|
|
23531
|
+
var _char = source[pos];
|
|
23532
|
+
if (_char === '(') {
|
|
23533
|
+
pos++;
|
|
23534
|
+
var value = sum();
|
|
23535
|
+
if (source[pos++] !== ')') invalid();
|
|
23536
|
+
return value;
|
|
23537
|
+
}
|
|
23538
|
+
if (_char === '-' || _char === '+') {
|
|
23539
|
+
pos++;
|
|
23540
|
+
return _char === '-' ? -_factor() : _factor();
|
|
23541
|
+
}
|
|
23542
|
+
var dimension = DIMENSION_OF[_char];
|
|
23543
|
+
if (dimension) {
|
|
23544
|
+
pos++;
|
|
23545
|
+
var _value = measures[dimension];
|
|
23546
|
+
return typeof _value === 'number' && Number.isFinite(_value) ? _value : invalid();
|
|
23547
|
+
}
|
|
23548
|
+
var number = /^\d+(\.\d+)?/.exec(source.slice(pos));
|
|
23549
|
+
if (!number) return invalid();
|
|
23550
|
+
pos += number[0].length;
|
|
23551
|
+
return Number(number[0]);
|
|
23552
|
+
};
|
|
23553
|
+
var product = function product() {
|
|
23554
|
+
var value = _factor();
|
|
23555
|
+
while (source[pos] === '*' || source[pos] === '/') {
|
|
23556
|
+
var operator = source[pos++];
|
|
23557
|
+
var right = _factor();
|
|
23558
|
+
value = operator === '*' ? value * right : value / right;
|
|
23559
|
+
}
|
|
23560
|
+
return value;
|
|
23561
|
+
};
|
|
23562
|
+
var sum = function sum() {
|
|
23563
|
+
var value = product();
|
|
23564
|
+
while (source[pos] === '+' || source[pos] === '-') {
|
|
23565
|
+
var operator = source[pos++];
|
|
23566
|
+
var right = product();
|
|
23567
|
+
value = operator === '+' ? value + right : value - right;
|
|
23568
|
+
}
|
|
23569
|
+
return value;
|
|
23570
|
+
};
|
|
23571
|
+
try {
|
|
23572
|
+
var value = sum();
|
|
23573
|
+
return pos === source.length && Number.isFinite(value) ? value : undefined;
|
|
23574
|
+
} catch (_unused) {
|
|
23575
|
+
return undefined;
|
|
23576
|
+
}
|
|
23577
|
+
}
|
|
23578
|
+
|
|
23338
23579
|
function _createForOfIteratorHelper$r(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$r(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; } } }; }
|
|
23339
23580
|
function _unsupportedIterableToArray$r(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$r(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$r(r, a) : void 0; } }
|
|
23340
23581
|
function _arrayLikeToArray$r(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; }
|
|
@@ -23344,7 +23585,7 @@ var LOG$k = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC'
|
|
|
23344
23585
|
function initIDMCatalogData(serie, orderSet, api) {
|
|
23345
23586
|
var _serie$decisions, _serie$decisions2, _serie$decisionRefs;
|
|
23346
23587
|
var catalog = serie.catalogData;
|
|
23347
|
-
var catalogData = {
|
|
23588
|
+
var catalogData = _objectSpread$t(_objectSpread$t({
|
|
23348
23589
|
accountGuid: orderSet.AccountGUID,
|
|
23349
23590
|
serieId: serie._id,
|
|
23350
23591
|
accountName: '',
|
|
@@ -23376,15 +23617,55 @@ function initIDMCatalogData(serie, orderSet, api) {
|
|
|
23376
23617
|
//digits: json.Digits,
|
|
23377
23618
|
supplierILN: catalog.glnNo,
|
|
23378
23619
|
// SupplierILN des Herstellers des Katalogs
|
|
23379
|
-
supplierName: catalog.manufacturerName1
|
|
23380
|
-
|
|
23620
|
+
supplierName: catalog.manufacturerName1
|
|
23621
|
+
}, readPriceDefinition(catalog)), {}, {
|
|
23381
23622
|
optionGroups: catalog.optionGroups,
|
|
23382
23623
|
formulas: catalog.formulas,
|
|
23383
23624
|
tabGroups: catalog.tabGroups,
|
|
23384
23625
|
loadedPricefeaturegroups: []
|
|
23385
|
-
};
|
|
23626
|
+
});
|
|
23386
23627
|
return catalogData;
|
|
23387
23628
|
}
|
|
23629
|
+
var PRICE_ROUNDINGS = [0, 1, 2, 3];
|
|
23630
|
+
|
|
23631
|
+
/**
|
|
23632
|
+
* The catalog's price types and how its prices are rounded. A price type's rounding rounds its measure: a catalog that
|
|
23633
|
+
* prices by measure shows its prices to the cent, any other catalog keeps the rounding it always had.
|
|
23634
|
+
*/
|
|
23635
|
+
function readPriceDefinition(catalog) {
|
|
23636
|
+
var idmPriceTypes = readPriceTypes(catalog);
|
|
23637
|
+
if (idmPriceTypes.some(isMeasureDependent)) return {
|
|
23638
|
+
idmPriceTypes: idmPriceTypes,
|
|
23639
|
+
rounding: 1,
|
|
23640
|
+
digits: 2
|
|
23641
|
+
};
|
|
23642
|
+
return {
|
|
23643
|
+
idmPriceTypes: idmPriceTypes,
|
|
23644
|
+
rounding: PRICE_ROUNDINGS.find(function (rounding) {
|
|
23645
|
+
return rounding === catalog.roundingType;
|
|
23646
|
+
})
|
|
23647
|
+
};
|
|
23648
|
+
}
|
|
23649
|
+
|
|
23650
|
+
/** The price types of an IDM 4 catalog; read without the list it still names its first one in the flat fields. IDM 3 has no measure prices. */
|
|
23651
|
+
function readPriceTypes(catalog) {
|
|
23652
|
+
var _catalog$priceTypes, _catalog$priceTypeNo;
|
|
23653
|
+
if (catalog.major !== 4) return [];
|
|
23654
|
+
if ((_catalog$priceTypes = catalog.priceTypes) !== null && _catalog$priceTypes !== void 0 && _catalog$priceTypes.length) return catalog.priceTypes;
|
|
23655
|
+
if (catalog.basicUnit === undefined && catalog.widthX === undefined) return [];
|
|
23656
|
+
return [{
|
|
23657
|
+
priceTypeNo: (_catalog$priceTypeNo = catalog.priceTypeNo) !== null && _catalog$priceTypeNo !== void 0 ? _catalog$priceTypeNo : 1,
|
|
23658
|
+
widthX: catalog.widthX,
|
|
23659
|
+
depthY: catalog.depthY,
|
|
23660
|
+
heightZ: catalog.heightZ,
|
|
23661
|
+
basicUnit: catalog.basicUnit,
|
|
23662
|
+
roundingUnit: catalog.roundingUnit,
|
|
23663
|
+
roundingType: catalog.roundingType,
|
|
23664
|
+
basicPriceDependent: catalog.basicPriceDependent,
|
|
23665
|
+
priceTypeFormula: catalog.priceTypeFormula,
|
|
23666
|
+
priceTypeName: catalog.priceTypeName
|
|
23667
|
+
}];
|
|
23668
|
+
}
|
|
23388
23669
|
function initIDMArticles(jsonItems, catalogData) {
|
|
23389
23670
|
if (jsonItems !== null && jsonItems !== void 0 && jsonItems.length) {
|
|
23390
23671
|
for (var i = 0; i < jsonItems.length; i++) {
|
|
@@ -23415,7 +23696,7 @@ function initIDMArticles(jsonItems, catalogData) {
|
|
|
23415
23696
|
}
|
|
23416
23697
|
}
|
|
23417
23698
|
function getCatalogArticle(article, catalogData) {
|
|
23418
|
-
var _catalogData$catalogM, _article$typeKey, _article$salesNumber, _articleMask$name, _article$flatPrice, _article$depthBasicSh, _article$depthBasicSh2, _article$depthBasicSh3, _article$widthBasicSh, _article$widthBasicSh2, _article$widthBasicSh3, _article$heightBasicS, _article$heightBasicS2, _article$heightBasicS3, _article$weightNetto, _article$detailInfos, _article$detailInfos2, _article$detailInfos3, _ref, _ref2, _articleMask$groupnam, _article$typeKey2;
|
|
23699
|
+
var _catalogData$catalogM, _catalogData$idmPrice, _article$typeKey, _article$salesNumber, _articleMask$name, _article$flatPrice, _article$depthBasicSh, _article$depthBasicSh2, _article$depthBasicSh3, _article$widthBasicSh, _article$widthBasicSh2, _article$widthBasicSh3, _article$heightBasicS, _article$heightBasicS2, _article$heightBasicS3, _article$weightNetto, _article$detailInfos, _article$detailInfos2, _article$detailInfos3, _ref, _ref2, _articleMask$groupnam, _article$typeKey2;
|
|
23419
23700
|
var articleMask = (_catalogData$catalogM = catalogData.catalogMask) === null || _catalogData$catalogM === void 0 || (_catalogData$catalogM = _catalogData$catalogM.articles) === null || _catalogData$catalogM === void 0 ? void 0 : _catalogData$catalogM[article.typeNo];
|
|
23420
23701
|
var lang = catalogData.api.getLanguageLowercase();
|
|
23421
23702
|
// empty locale objects ({} or only empty strings) are truthy, so ?? alone doesn't fall back
|
|
@@ -23423,6 +23704,10 @@ function getCatalogArticle(article, catalogData) {
|
|
|
23423
23704
|
var shortText = hasLocaleText(article.shortText) ? article.shortText : article.fullText;
|
|
23424
23705
|
var featureProperties = convertProperties(article.properties, lang, 'option', 'featureNos');
|
|
23425
23706
|
var optionProperties = convertProperties(article.properties, lang, 'optionValue', 'optionKeys');
|
|
23707
|
+
var measurePriced = isMeasureDependent((_catalogData$idmPrice = catalogData.idmPriceTypes) === null || _catalogData$idmPrice === void 0 ? void 0 : _catalogData$idmPrice.find(function (type) {
|
|
23708
|
+
var _article$priceTypeRef;
|
|
23709
|
+
return type.priceTypeNo == ((_article$priceTypeRef = article.priceTypeRef) !== null && _article$priceTypeRef !== void 0 ? _article$priceTypeRef : 1);
|
|
23710
|
+
}));
|
|
23426
23711
|
return {
|
|
23427
23712
|
areOptionsLoaded: false,
|
|
23428
23713
|
arePricesLoaded: false,
|
|
@@ -23455,9 +23740,10 @@ function getCatalogArticle(article, catalogData) {
|
|
|
23455
23740
|
properties: [].concat(_toConsumableArray__default["default"](convertProperties(article.properties, lang, 'article')), _toConsumableArray__default["default"](readProperties('article', articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties, lang))),
|
|
23456
23741
|
optionProperties: optionProperties,
|
|
23457
23742
|
featureProperties: featureProperties,
|
|
23458
|
-
// the service decides what is complete from the list - a missing feature class alone still leaves prices to load
|
|
23459
|
-
|
|
23460
|
-
|
|
23743
|
+
// the service decides what is complete from the list - a missing feature class alone still leaves prices to load;
|
|
23744
|
+
// a measure price is the price per unit, the engine still has to apply the dimensions
|
|
23745
|
+
articleType: article.flat && !measurePriced ? 'FLAT' : 'OPTIONTREE',
|
|
23746
|
+
price: article.flat && !measurePriced ? (_article$flatPrice = article.flatPrice) !== null && _article$flatPrice !== void 0 ? _article$flatPrice : 0 : 0,
|
|
23461
23747
|
featureClassRefNo: article.featureClassRefNo,
|
|
23462
23748
|
useEkPrices: catalogData.api.useEkPrices,
|
|
23463
23749
|
depth: article.depthBasicShapeNominalValue !== undefined ? Math.floor(((_article$depthBasicSh = article.depthBasicShapeNominalValue) !== null && _article$depthBasicSh !== void 0 ? _article$depthBasicSh : 0) / 10) : undefined,
|
|
@@ -23487,6 +23773,12 @@ function getCatalogArticle(article, catalogData) {
|
|
|
23487
23773
|
};
|
|
23488
23774
|
}),
|
|
23489
23775
|
idmPrices: article.prices,
|
|
23776
|
+
priceTypeRef: article.priceTypeRef,
|
|
23777
|
+
basicShapeMm: {
|
|
23778
|
+
width: article.widthBasicShapeNominalValue,
|
|
23779
|
+
depth: article.depthBasicShapeNominalValue,
|
|
23780
|
+
height: article.heightBasicShapeNominalValue
|
|
23781
|
+
},
|
|
23490
23782
|
idmPartlist: article.partlist,
|
|
23491
23783
|
itemIdentification: article.itemIdentification,
|
|
23492
23784
|
articleRelations: [],
|
|
@@ -24969,6 +25261,12 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
24969
25261
|
get: function get() {
|
|
24970
25262
|
return this.catalogData.formulas;
|
|
24971
25263
|
}
|
|
25264
|
+
}, {
|
|
25265
|
+
key: "idmPriceTypes",
|
|
25266
|
+
get: function get() {
|
|
25267
|
+
var _this$catalogData$idm;
|
|
25268
|
+
return (_this$catalogData$idm = this.catalogData.idmPriceTypes) !== null && _this$catalogData$idm !== void 0 ? _this$catalogData$idm : [];
|
|
25269
|
+
}
|
|
24972
25270
|
}, {
|
|
24973
25271
|
key: "tabGroups",
|
|
24974
25272
|
get: function get() {
|
|
@@ -26708,6 +27006,25 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
26708
27006
|
var _this$val25;
|
|
26709
27007
|
return (_this$val25 = this.val) === null || _this$val25 === void 0 ? void 0 : _this$val25.isFreeText;
|
|
26710
27008
|
}
|
|
27009
|
+
|
|
27010
|
+
/**
|
|
27011
|
+
* The text a free-text value starts with: the feature's FREETEXT_DEFAULT_VALUE, kept inside the value's measure
|
|
27012
|
+
* range, else the range minimum. A text preset only counts for a value without a range.
|
|
27013
|
+
*/
|
|
27014
|
+
}, {
|
|
27015
|
+
key: "defaultFreeText",
|
|
27016
|
+
get: function get() {
|
|
27017
|
+
var _this$val26, _this$val27, _this$option;
|
|
27018
|
+
var min = ((_this$val26 = this.val) === null || _this$val26 === void 0 ? void 0 : _this$val26.measureMinimum) || undefined;
|
|
27019
|
+
var max = ((_this$val27 = this.val) === null || _this$val27 === void 0 ? void 0 : _this$val27.measureMaximum) || undefined;
|
|
27020
|
+
var preset = (_this$option = this.option) === null || _this$option === void 0 ? void 0 : _this$option.freetextDefaultValue;
|
|
27021
|
+
if (preset == undefined || preset === '') return min;
|
|
27022
|
+
var value = Number(preset);
|
|
27023
|
+
if (!Number.isFinite(value)) return min || max ? min : preset;
|
|
27024
|
+
if (min && value < Number(min)) return min;
|
|
27025
|
+
if (max && value > Number(max)) return max;
|
|
27026
|
+
return preset;
|
|
27027
|
+
}
|
|
26711
27028
|
}, {
|
|
26712
27029
|
key: "freeText",
|
|
26713
27030
|
get: function get() {
|
|
@@ -26766,8 +27083,8 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
26766
27083
|
}, {
|
|
26767
27084
|
key: "warning",
|
|
26768
27085
|
get: function get() {
|
|
26769
|
-
var _this$
|
|
26770
|
-
if ((_this$
|
|
27086
|
+
var _this$val28;
|
|
27087
|
+
if ((_this$val28 = this.val) !== null && _this$val28 !== void 0 && _this$val28.isFreeText) {
|
|
26771
27088
|
if (this.val.measureMaximum && Number(this.freeText) > Number(this.val.measureMaximum) || this.val.measureMinimum && Number(this.freeText) < Number(this.val.measureMinimum)) {
|
|
26772
27089
|
return 'measureWarning';
|
|
26773
27090
|
}
|
|
@@ -26821,14 +27138,14 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
26821
27138
|
}, {
|
|
26822
27139
|
key: "customDimension",
|
|
26823
27140
|
get: function get() {
|
|
26824
|
-
var _this$val$customDimen, _this$
|
|
26825
|
-
return this.val && ((_this$val$customDimen = (_this$
|
|
27141
|
+
var _this$val$customDimen, _this$val29;
|
|
27142
|
+
return this.val && ((_this$val$customDimen = (_this$val29 = this.val) === null || _this$val29 === void 0 ? void 0 : _this$val29.customDimension) !== null && _this$val$customDimen !== void 0 ? _this$val$customDimen : this.option.customDimension);
|
|
26826
27143
|
}
|
|
26827
27144
|
}, {
|
|
26828
27145
|
key: "addToMeasure",
|
|
26829
27146
|
get: function get() {
|
|
26830
|
-
var _this$
|
|
26831
|
-
return (_this$
|
|
27147
|
+
var _this$val30;
|
|
27148
|
+
return (_this$val30 = this.val) === null || _this$val30 === void 0 ? void 0 : _this$val30.addToMeasure;
|
|
26832
27149
|
}
|
|
26833
27150
|
}, {
|
|
26834
27151
|
key: "showWarningForRequiresUserInput",
|
|
@@ -27280,10 +27597,13 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
27280
27597
|
} else if (freeText != undefined) {
|
|
27281
27598
|
ops.freeText = freeText;
|
|
27282
27599
|
} else if (ops.freeText == undefined || oldCodex !== ops.valCodex) {
|
|
27283
|
-
var
|
|
27284
|
-
if (
|
|
27285
|
-
|
|
27286
|
-
|
|
27600
|
+
var defaultFreeText = ops.defaultFreeText;
|
|
27601
|
+
if (defaultFreeText) {
|
|
27602
|
+
ops.freeText = defaultFreeText;
|
|
27603
|
+
// the names above were built from the previous text
|
|
27604
|
+
var _this$itemInfo2 = this.itemInfo(myOPVItem, !ops.option.hideGroupNameInOrderText, ops.freeText);
|
|
27605
|
+
ops.name = _this$itemInfo2.name;
|
|
27606
|
+
ops.origName = _this$itemInfo2.origName;
|
|
27287
27607
|
}
|
|
27288
27608
|
}
|
|
27289
27609
|
ops.isVisibleFreeText = true;
|
|
@@ -29662,7 +29982,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
29662
29982
|
if (_this4.article.CatalogData.useDiomexConfigLogic) {
|
|
29663
29983
|
_this4.clearOP(featureNo, true);
|
|
29664
29984
|
} else {
|
|
29665
|
-
_this4.
|
|
29985
|
+
_this4.selectFallbackOpv(featureNo, ops);
|
|
29666
29986
|
}
|
|
29667
29987
|
}
|
|
29668
29988
|
doAlsoCheckFeatureNos.push(featureNo);
|
|
@@ -29752,7 +30072,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
29752
30072
|
if (_this5.article.CatalogData.useDiomexConfigLogic) {
|
|
29753
30073
|
_this5.clearOP(featureNo, true);
|
|
29754
30074
|
} else {
|
|
29755
|
-
_this5.
|
|
30075
|
+
_this5.selectFallbackOpv(featureNo, ops);
|
|
29756
30076
|
}
|
|
29757
30077
|
}
|
|
29758
30078
|
} else if (p < sortedDeatureRefs.length - 1) {
|
|
@@ -30104,7 +30424,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30104
30424
|
var index = _this$getMatchingOpti2[1];
|
|
30105
30425
|
this.logPrice(priceFeatureGroup, index);
|
|
30106
30426
|
if (index !== undefined) {
|
|
30107
|
-
var _this$article$catalog, _this$article$catalog4, _priceFeatureGroup$fe, _priceFeatureGroup$fe2;
|
|
30427
|
+
var _this$article$catalog, _this$article$catalog4, _priceFeatureGroup$fe, _priceFeatureGroup$fe2, _measurePrice$price;
|
|
30108
30428
|
var matichingFinish = projectFinishes[index];
|
|
30109
30429
|
var priceKey = this.getFinishPriceKey(priceFeatureGroup, matichingFinish);
|
|
30110
30430
|
if (((_this$article$catalog = this.article.catalogArticle.idmPrices) === null || _this$article$catalog === void 0 ? void 0 : _this$article$catalog.prices[priceKey]) === undefined) {
|
|
@@ -30113,13 +30433,16 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30113
30433
|
continue;
|
|
30114
30434
|
}
|
|
30115
30435
|
var price = (_this$article$catalog4 = this.article.catalogArticle.idmPrices) === null || _this$article$catalog4 === void 0 ? void 0 : _this$article$catalog4.prices[priceKey];
|
|
30436
|
+
var measurePrice = this.getMeasurePrice(priceFeatureGroup, priceKey, price);
|
|
30437
|
+
if (measurePrice && this.article.set.logDecisions && this.priceDebugStack[i]) this.priceDebugStack[i].measurePrice = measurePrice;
|
|
30116
30438
|
this.article.priceRefs.push({
|
|
30117
30439
|
ID: matichingFinish._id,
|
|
30118
30440
|
ISABP: !priceFeatureGroup.additionalPrice,
|
|
30119
30441
|
IsPercentage: priceFeatureGroup.isPercentage,
|
|
30120
30442
|
OPT: (_priceFeatureGroup$fe = (_priceFeatureGroup$fe2 = priceFeatureGroup.featureNos) === null || _priceFeatureGroup$fe2 === void 0 ? void 0 : _priceFeatureGroup$fe2[0]) !== null && _priceFeatureGroup$fe !== void 0 ? _priceFeatureGroup$fe : 'BASE',
|
|
30121
30443
|
PPG: priceKey,
|
|
30122
|
-
Price: price,
|
|
30444
|
+
Price: (_measurePrice$price = measurePrice === null || measurePrice === void 0 ? void 0 : measurePrice.price) !== null && _measurePrice$price !== void 0 ? _measurePrice$price : price,
|
|
30445
|
+
MeasurePrice: measurePrice,
|
|
30123
30446
|
RuleDesc: DivaUtils__default["default"].getLocals(priceFeatureGroup.priceFeatureGroupText, this.article.set.api.getLanguage()),
|
|
30124
30447
|
RuleDesc_locales: priceFeatureGroup.priceFeatureGroupText,
|
|
30125
30448
|
PriceFeatureGroupNo: priceFeatureGroup.priceFeatureGroupNo
|
|
@@ -30267,6 +30590,91 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30267
30590
|
});
|
|
30268
30591
|
}
|
|
30269
30592
|
|
|
30593
|
+
/**
|
|
30594
|
+
* The price of a finish whose price feature group the item prices per length, area or volume (its PRICE_TYPE_REF),
|
|
30595
|
+
* for the article's current dimensions; undefined for a piece price. Only the base group carries a base or minimum
|
|
30596
|
+
* price; a surcharge group of a basic price dependent type charges the rest beyond the item's basic price unit.
|
|
30597
|
+
*/
|
|
30598
|
+
}, {
|
|
30599
|
+
key: "getMeasurePrice",
|
|
30600
|
+
value: function getMeasurePrice(priceFeatureGroup, priceKey, unitPrice) {
|
|
30601
|
+
var _ref7, _prices$priceTypeRefs, _prices$priceTypeRefs2, _prices$basicPrices$p, _prices$basicPrices;
|
|
30602
|
+
var catalogArticle = this.article.catalogArticle;
|
|
30603
|
+
var prices = catalogArticle.idmPrices;
|
|
30604
|
+
var isBase = !priceFeatureGroup.additionalPrice;
|
|
30605
|
+
// without a stored reference a group prices like the editor writes it: the base group by the item's type, a surcharge by type 1
|
|
30606
|
+
var priceTypeNo = (_ref7 = (_prices$priceTypeRefs = prices === null || prices === void 0 || (_prices$priceTypeRefs2 = prices.priceTypeRefs) === null || _prices$priceTypeRefs2 === void 0 ? void 0 : _prices$priceTypeRefs2['PRFG' + priceFeatureGroup.priceFeatureGroupNo]) !== null && _prices$priceTypeRefs !== void 0 ? _prices$priceTypeRefs : isBase ? catalogArticle.priceTypeRef : undefined) !== null && _ref7 !== void 0 ? _ref7 : 1;
|
|
30607
|
+
var priceType = this.article.CatalogData.idmPriceTypes.find(function (type) {
|
|
30608
|
+
return type.priceTypeNo == priceTypeNo;
|
|
30609
|
+
});
|
|
30610
|
+
if (!isMeasureDependent(priceType)) return undefined;
|
|
30611
|
+
var measurePrice = calcMeasurePrice(unitPrice, priceType, this.getMeasuresMm(), isBase ? {
|
|
30612
|
+
price: (_prices$basicPrices$p = prices === null || prices === void 0 || (_prices$basicPrices = prices.basicPrices) === null || _prices$basicPrices === void 0 ? void 0 : _prices$basicPrices[priceKey]) !== null && _prices$basicPrices$p !== void 0 ? _prices$basicPrices$p : undefined,
|
|
30613
|
+
unit: prices === null || prices === void 0 ? void 0 : prices.basicPriceUnit
|
|
30614
|
+
} : {
|
|
30615
|
+
unit: prices === null || prices === void 0 ? void 0 : prices.basicPriceUnit
|
|
30616
|
+
});
|
|
30617
|
+
if (!measurePrice) LOG$g.warn("Price type ".concat(priceTypeNo, " of ").concat(this.article.articleCodex, " needs a dimension the article does not have or a formula that cannot be read: ").concat(priceKey, " stays a piece price"));
|
|
30618
|
+
return measurePrice;
|
|
30619
|
+
}
|
|
30620
|
+
|
|
30621
|
+
/** The article's dimensions in mm: the ones its sinks set, otherwise its planned size, otherwise the item's basic shape. */
|
|
30622
|
+
}, {
|
|
30623
|
+
key: "getMeasuresMm",
|
|
30624
|
+
value: function getMeasuresMm() {
|
|
30625
|
+
var _sinks$width, _sinks$depth, _sinks$height;
|
|
30626
|
+
var _this$article$catalog6 = this.article.catalogArticle,
|
|
30627
|
+
shape = _this$article$catalog6.basicShapeMm,
|
|
30628
|
+
width = _this$article$catalog6.width,
|
|
30629
|
+
depth = _this$article$catalog6.depth,
|
|
30630
|
+
height = _this$article$catalog6.height;
|
|
30631
|
+
var sinks = this.getSinkMeasuresMm();
|
|
30632
|
+
var toMm = function toMm(planned, shapeMm, catalogCm) {
|
|
30633
|
+
// The planner holds a basic shape in whole cm: while the article has that size the shape is the exact measure
|
|
30634
|
+
if (planned > 0 && !(shapeMm && Math.floor(shapeMm / 10) === planned)) return Math.round(planned * 10);
|
|
30635
|
+
return shapeMm || (catalogCm ? catalogCm * 10 : undefined);
|
|
30636
|
+
};
|
|
30637
|
+
return {
|
|
30638
|
+
width: (_sinks$width = sinks.width) !== null && _sinks$width !== void 0 ? _sinks$width : toMm(this.article.calcWidth, shape === null || shape === void 0 ? void 0 : shape.width, width),
|
|
30639
|
+
depth: (_sinks$depth = sinks.depth) !== null && _sinks$depth !== void 0 ? _sinks$depth : toMm(this.article.calcDepth, shape === null || shape === void 0 ? void 0 : shape.depth, depth),
|
|
30640
|
+
height: (_sinks$height = sinks.height) !== null && _sinks$height !== void 0 ? _sinks$height : toMm(this.article.calcHeight, shape === null || shape === void 0 ? void 0 : shape.height, height)
|
|
30641
|
+
};
|
|
30642
|
+
}
|
|
30643
|
+
|
|
30644
|
+
/**
|
|
30645
|
+
* The measures the article's own sinks hold, in mm. They are read here and not from the planner size, which cannot tell
|
|
30646
|
+
* a selected 2350 mm from a basic shape of 2355 mm and never gets the sink of a hidden partlist child.
|
|
30647
|
+
*/
|
|
30648
|
+
}, {
|
|
30649
|
+
key: "getSinkMeasuresMm",
|
|
30650
|
+
value: function getSinkMeasuresMm() {
|
|
30651
|
+
var measures = {};
|
|
30652
|
+
var _iterator20 = _createForOfIteratorHelper$n(this.article.articleOptionStates.values()),
|
|
30653
|
+
_step20;
|
|
30654
|
+
try {
|
|
30655
|
+
for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
|
|
30656
|
+
var _ops$option$idmVarian;
|
|
30657
|
+
var ops = _step20.value;
|
|
30658
|
+
if (!ops.val) continue;
|
|
30659
|
+
var art = (_ops$option$idmVarian = ops.option.idmVariantenArt) !== null && _ops$option$idmVarian !== void 0 ? _ops$option$idmVarian : 0;
|
|
30660
|
+
var setsWidth = [95, 1095].includes(art) || !!ops.option.diameter;
|
|
30661
|
+
var setsDepth = [96, 1096].includes(art) || !!ops.option.diameter;
|
|
30662
|
+
var setsHeight = [97, 1097].includes(art);
|
|
30663
|
+
if (!setsWidth && !setsDepth && !setsHeight) continue;
|
|
30664
|
+
var cm = this.sinkMeasureCm(ops);
|
|
30665
|
+
if (!(cm > 0)) continue;
|
|
30666
|
+
if (setsWidth) measures.width = Math.round(cm * 10);
|
|
30667
|
+
if (setsDepth) measures.depth = Math.round(cm * 10);
|
|
30668
|
+
if (setsHeight) measures.height = Math.round(cm * 10);
|
|
30669
|
+
}
|
|
30670
|
+
} catch (err) {
|
|
30671
|
+
_iterator20.e(err);
|
|
30672
|
+
} finally {
|
|
30673
|
+
_iterator20.f();
|
|
30674
|
+
}
|
|
30675
|
+
return measures;
|
|
30676
|
+
}
|
|
30677
|
+
|
|
30270
30678
|
/** The idmPrices key of a finish. The real lookup, the zero check and the debug log must all use the same one. */
|
|
30271
30679
|
}, {
|
|
30272
30680
|
key: "getFinishPriceKey",
|
|
@@ -30297,12 +30705,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30297
30705
|
// a text without a measure is a typed entry: it replaces what a formula measured before
|
|
30298
30706
|
if (measureValue === undefined) myArtOPS.measureValue = undefined;
|
|
30299
30707
|
} else if (myArtOPS.freeText == undefined || oldCodex !== myArtOPS.valCodex) {
|
|
30300
|
-
var _myArtOPS$val;
|
|
30301
30708
|
//another option means another measure range, so the previous freetext must not carry over
|
|
30302
|
-
|
|
30303
|
-
|
|
30304
|
-
myArtOPS.freeText = (_myArtOPS$val2 = myArtOPS.val) === null || _myArtOPS$val2 === void 0 ? void 0 : _myArtOPS$val2.measureMinimum;
|
|
30305
|
-
}
|
|
30709
|
+
var defaultFreeText = myArtOPS.defaultFreeText;
|
|
30710
|
+
if (defaultFreeText) myArtOPS.freeText = defaultFreeText;
|
|
30306
30711
|
}
|
|
30307
30712
|
myArtOPS.isVisibleFreeText = true;
|
|
30308
30713
|
} else {
|
|
@@ -30361,9 +30766,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30361
30766
|
}, {
|
|
30362
30767
|
key: "evalPartlist",
|
|
30363
30768
|
value: function evalPartlist(newConfigValues) {
|
|
30364
|
-
var _this$article$
|
|
30769
|
+
var _this$article$catalog7;
|
|
30365
30770
|
var partlistArticlesToLoad = [];
|
|
30366
|
-
var myPartlistArticles = (_this$article$
|
|
30771
|
+
var myPartlistArticles = (_this$article$catalog7 = this.article.catalogArticle.idmPartlist) === null || _this$article$catalog7 === void 0 ? void 0 : _this$article$catalog7.partlistPos;
|
|
30367
30772
|
if (!(myPartlistArticles !== null && myPartlistArticles !== void 0 && myPartlistArticles.length)) return [];
|
|
30368
30773
|
if (this.article.set.logDecisions) this.article.partlistDebugEntries = [];
|
|
30369
30774
|
var partlistGroup = [];
|
|
@@ -30505,7 +30910,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30505
30910
|
_loop9(i);
|
|
30506
30911
|
}
|
|
30507
30912
|
if (quanitity >= 1) {
|
|
30508
|
-
var
|
|
30913
|
+
var _ref8;
|
|
30509
30914
|
partlistArticlesToLoad.push({
|
|
30510
30915
|
CatalogCodex: catalogCodex != null ? catalogCodex.toString() : this.article.catalogCodex,
|
|
30511
30916
|
BasketID: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.basketId,
|
|
@@ -30526,7 +30931,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30526
30931
|
PreviousPartlistArticles: previousPartlistArticle !== null && previousPartlistArticle !== void 0 && previousPartlistArticle.partlistArticles && Object.keys(previousPartlistArticle.partlistArticles).length ? previousPartlistArticle.partlistArticles : undefined,
|
|
30527
30932
|
optionsForPrint: featuresForPrint,
|
|
30528
30933
|
RetailArticleNr: myPartListPos.retailArticleNr && myPartListPos.retailArticleNr !== '' ? myPartListPos.retailArticleNr : undefined,
|
|
30529
|
-
RetailPrefix: (
|
|
30934
|
+
RetailPrefix: (_ref8 = myPartListPos.retailPrefix) !== null && _ref8 !== void 0 ? _ref8 : undefined
|
|
30530
30935
|
//SupplierOrderCodex: // TODO WWS IDM ,myPartListPos.SupplierOrderCodex,
|
|
30531
30936
|
|
|
30532
30937
|
//optionImgForPrint,
|
|
@@ -30545,9 +30950,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30545
30950
|
key: "getMatchingOptionCombination",
|
|
30546
30951
|
value: function getMatchingOptionCombination(combinations, decisionNo, ruleSet) {
|
|
30547
30952
|
for (var i = 0; i < combinations.length; i++) {
|
|
30548
|
-
var
|
|
30953
|
+
var _ref9, _ref10, _projectOptionsSetRef;
|
|
30549
30954
|
var combination = combinations[i];
|
|
30550
|
-
var optionSetRefs = (
|
|
30955
|
+
var optionSetRefs = (_ref9 = (_ref10 = (_projectOptionsSetRef = combination.projectOptionsSetRefs) !== null && _projectOptionsSetRef !== void 0 ? _projectOptionsSetRef : combination.optionsSetRef) !== null && _ref10 !== void 0 ? _ref10 : combination.optionsSetRef) !== null && _ref9 !== void 0 ? _ref9 : [];
|
|
30551
30956
|
if (optionSetRefs.length === 0) {
|
|
30552
30957
|
// A conditionless LAST row is the documented fallback; a conditionless row with rows AFTER it is the fault (first match wins).
|
|
30553
30958
|
var shadowsLaterRows = i < combinations.length - 1;
|
|
@@ -30626,9 +31031,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30626
31031
|
//DecisionOptionCombination
|
|
30627
31032
|
//Gibt es innerhalb einer Decision eine eine gültige DOC, die OPVs der in ValidOptionValues vorkommenden Optionen zunächst alle disabeln, werden dann über eine gültige Formel wieder enabled
|
|
30628
31033
|
|
|
30629
|
-
var
|
|
30630
|
-
|
|
30631
|
-
combination =
|
|
31034
|
+
var _ref11 = this.getMatchingOptionCombination(myDecision.optionCombinations, decisionNo),
|
|
31035
|
+
_ref12 = _slicedToArray__default["default"](_ref11, 1),
|
|
31036
|
+
combination = _ref12[0];
|
|
30632
31037
|
if (combination) {
|
|
30633
31038
|
isValidDOC = true;
|
|
30634
31039
|
}
|
|
@@ -30645,25 +31050,25 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30645
31050
|
var cached = this.featureDefaultIndex;
|
|
30646
31051
|
if (cached && cached.sources[0] === sources[0] && cached.sources[1] === sources[1]) return cached.byFeature;
|
|
30647
31052
|
var byFeature = new Map();
|
|
30648
|
-
var
|
|
30649
|
-
|
|
31053
|
+
var _iterator21 = _createForOfIteratorHelper$n(this.decisions),
|
|
31054
|
+
_step21;
|
|
30650
31055
|
try {
|
|
30651
|
-
for (
|
|
31056
|
+
for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
|
|
30652
31057
|
var _decision$optionCombi6;
|
|
30653
|
-
var decision =
|
|
31058
|
+
var decision = _step21.value;
|
|
30654
31059
|
if (decision.decisionType !== 2) continue;
|
|
30655
|
-
var
|
|
30656
|
-
|
|
31060
|
+
var _iterator22 = _createForOfIteratorHelper$n((_decision$optionCombi6 = decision.optionCombinations) !== null && _decision$optionCombi6 !== void 0 ? _decision$optionCombi6 : []),
|
|
31061
|
+
_step22;
|
|
30657
31062
|
try {
|
|
30658
|
-
for (
|
|
31063
|
+
for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
|
|
30659
31064
|
var _combination$projectA10, _combination$projectA11;
|
|
30660
|
-
var combination =
|
|
30661
|
-
var
|
|
30662
|
-
|
|
31065
|
+
var combination = _step22.value;
|
|
31066
|
+
var _iterator23 = _createForOfIteratorHelper$n((_combination$projectA10 = (_combination$projectA11 = combination.projectActions) === null || _combination$projectA11 === void 0 ? void 0 : _combination$projectA11.setFeatureDefault) !== null && _combination$projectA10 !== void 0 ? _combination$projectA10 : []),
|
|
31067
|
+
_step23;
|
|
30663
31068
|
try {
|
|
30664
|
-
for (
|
|
31069
|
+
for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {
|
|
30665
31070
|
var _action$featureNo2, _byFeature$get;
|
|
30666
|
-
var action =
|
|
31071
|
+
var action = _step23.value;
|
|
30667
31072
|
var featureNo = (_action$featureNo2 = action.featureNo) === null || _action$featureNo2 === void 0 ? void 0 : _action$featureNo2.toString();
|
|
30668
31073
|
if (!featureNo) continue;
|
|
30669
31074
|
var list = (_byFeature$get = byFeature.get(featureNo)) !== null && _byFeature$get !== void 0 ? _byFeature$get : [];
|
|
@@ -30671,21 +31076,21 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30671
31076
|
byFeature.set(featureNo, list);
|
|
30672
31077
|
}
|
|
30673
31078
|
} catch (err) {
|
|
30674
|
-
|
|
31079
|
+
_iterator23.e(err);
|
|
30675
31080
|
} finally {
|
|
30676
|
-
|
|
31081
|
+
_iterator23.f();
|
|
30677
31082
|
}
|
|
30678
31083
|
}
|
|
30679
31084
|
} catch (err) {
|
|
30680
|
-
|
|
31085
|
+
_iterator22.e(err);
|
|
30681
31086
|
} finally {
|
|
30682
|
-
|
|
31087
|
+
_iterator22.f();
|
|
30683
31088
|
}
|
|
30684
31089
|
}
|
|
30685
31090
|
} catch (err) {
|
|
30686
|
-
|
|
31091
|
+
_iterator21.e(err);
|
|
30687
31092
|
} finally {
|
|
30688
|
-
|
|
31093
|
+
_iterator21.f();
|
|
30689
31094
|
}
|
|
30690
31095
|
this.featureDefaultIndex = {
|
|
30691
31096
|
sources: sources,
|
|
@@ -30700,17 +31105,17 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30700
31105
|
value: function setFeatureDefaultKey(featureNo) {
|
|
30701
31106
|
var decisions = this.type2DefaultsByFeature().get(featureNo);
|
|
30702
31107
|
if (!decisions) return undefined;
|
|
30703
|
-
var
|
|
30704
|
-
|
|
31108
|
+
var _iterator24 = _createForOfIteratorHelper$n(decisions),
|
|
31109
|
+
_step24;
|
|
30705
31110
|
try {
|
|
30706
|
-
for (
|
|
31111
|
+
for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {
|
|
30707
31112
|
var _combination$projectA12;
|
|
30708
|
-
var decision =
|
|
31113
|
+
var decision = _step24.value;
|
|
30709
31114
|
// A decision evalType2Decision also visits would report WC_0012 twice per convergence pass — a DISABLED one it skips
|
|
30710
31115
|
// entirely, so there the warning has to come from here.
|
|
30711
|
-
var
|
|
30712
|
-
|
|
30713
|
-
combination =
|
|
31116
|
+
var _ref13 = this.getMatchingOptionCombination(decision.optionCombinations, decision.enabled === false ? decision.decisionNo : undefined),
|
|
31117
|
+
_ref14 = _slicedToArray__default["default"](_ref13, 1),
|
|
31118
|
+
combination = _ref14[0];
|
|
30714
31119
|
var key = combination === null || combination === void 0 || (_combination$projectA12 = combination.projectActions) === null || _combination$projectA12 === void 0 || (_combination$projectA12 = _combination$projectA12.setFeatureDefault) === null || _combination$projectA12 === void 0 || (_combination$projectA12 = _combination$projectA12.find(function (a) {
|
|
30715
31120
|
var _a$featureNo;
|
|
30716
31121
|
return ((_a$featureNo = a.featureNo) === null || _a$featureNo === void 0 ? void 0 : _a$featureNo.toString()) === featureNo;
|
|
@@ -30718,9 +31123,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30718
31123
|
if (key) return key;
|
|
30719
31124
|
}
|
|
30720
31125
|
} catch (err) {
|
|
30721
|
-
|
|
31126
|
+
_iterator24.e(err);
|
|
30722
31127
|
} finally {
|
|
30723
|
-
|
|
31128
|
+
_iterator24.f();
|
|
30724
31129
|
}
|
|
30725
31130
|
return undefined;
|
|
30726
31131
|
}
|
|
@@ -30729,23 +31134,35 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30729
31134
|
}, {
|
|
30730
31135
|
key: "preferredDefaultOpv",
|
|
30731
31136
|
value: function preferredDefaultOpv(featureNo, visible, ops) {
|
|
30732
|
-
var
|
|
31137
|
+
var _ref15;
|
|
30733
31138
|
// A rule may hide the chosen value for a while (metal foot hides the woods); when it frees it again the customer's pick must come back.
|
|
30734
31139
|
// getVisibleOptionValue resolves THROUGH option groups; a plain map lookup misses a grouped choice.
|
|
30735
31140
|
var chosen = ops !== null && ops !== void 0 && ops.userChosenOPV ? ops.getVisibleOptionValue(ops.userChosenOPV) : undefined;
|
|
30736
31141
|
if (chosen) return chosen;
|
|
30737
31142
|
var key = this.setFeatureDefaultKey(featureNo);
|
|
30738
|
-
return (
|
|
31143
|
+
return (_ref15 = key ? visible.get(key) : undefined) !== null && _ref15 !== void 0 ? _ref15 : this.article.getDefaultOpv(visible);
|
|
31144
|
+
}
|
|
31145
|
+
|
|
31146
|
+
/** Replaces a value a rule just hid. That is no decision of its own: only a lock from before the rule keeps the feature fixed. */
|
|
31147
|
+
}, {
|
|
31148
|
+
key: "selectFallbackOpv",
|
|
31149
|
+
value: function selectFallbackOpv(featureNo, ops) {
|
|
31150
|
+
var wasFixed = ops.definedBySetFeatureFixed;
|
|
31151
|
+
this.updateArtOPV(this.preferredDefaultOpv(featureNo, ops.visibleOptionValues, ops), featureNo, ops, undefined);
|
|
31152
|
+
ops.definedBySetFeatureFixed = wasFixed;
|
|
30739
31153
|
}
|
|
30740
31154
|
}, {
|
|
30741
31155
|
key: "updateIDMSpecificFeatures",
|
|
30742
31156
|
value: function updateIDMSpecificFeatures() {
|
|
30743
31157
|
//updaten idm planner specific options
|
|
30744
|
-
var
|
|
30745
|
-
|
|
31158
|
+
var _iterator25 = _createForOfIteratorHelper$n(this.article.articleOptionStates.values()),
|
|
31159
|
+
_step25;
|
|
30746
31160
|
try {
|
|
30747
|
-
for (
|
|
30748
|
-
var ops =
|
|
31161
|
+
for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {
|
|
31162
|
+
var ops = _step25.value;
|
|
31163
|
+
// Picking a default or re-applying a planning size here must not lock the feature: updateArtOPV marks it
|
|
31164
|
+
// fixed, and a fixed feature shows only its selected option. A lock a decision set earlier in the pass stays.
|
|
31165
|
+
var wasFixed = ops.definedBySetFeatureFixed;
|
|
30749
31166
|
//when an option has no decisions the first visible optionValue has to be selected per default
|
|
30750
31167
|
if (ops.val === undefined && ops.visibleCount) {
|
|
30751
31168
|
// Prefer an authored type-2 default (when visible) over the arbitrary first-visible pick.
|
|
@@ -30766,11 +31183,12 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30766
31183
|
}
|
|
30767
31184
|
if (validOpv) this.assignOptionValue(ops.optionCodex, (_validOpv = validOpv) === null || _validOpv === void 0 ? void 0 : _validOpv.codex);
|
|
30768
31185
|
}
|
|
31186
|
+
ops.definedBySetFeatureFixed = wasFixed;
|
|
30769
31187
|
}
|
|
30770
31188
|
} catch (err) {
|
|
30771
|
-
|
|
31189
|
+
_iterator25.e(err);
|
|
30772
31190
|
} finally {
|
|
30773
|
-
|
|
31191
|
+
_iterator25.f();
|
|
30774
31192
|
}
|
|
30775
31193
|
}
|
|
30776
31194
|
}, {
|
|
@@ -30791,8 +31209,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30791
31209
|
}
|
|
30792
31210
|
if ([97, 1097].includes((_myArtOPS$option$idmV3 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV3 !== void 0 ? _myArtOPS$option$idmV3 : 0)) {
|
|
30793
31211
|
try {
|
|
30794
|
-
var
|
|
30795
|
-
var newHeight = this.resolvePlannerDimension(Number((_ref15 = (_ref16 = (_myArtOPS$measureValu = myArtOPS.measureValue) !== null && _myArtOPS$measureValu !== void 0 ? _myArtOPS$measureValu : this.freeTextMeasureCm(myArtOPS)) !== null && _ref16 !== void 0 ? _ref16 : myArtOPS.value) !== null && _ref15 !== void 0 ? _ref15 : myArtOPS.valueFromName), this.article.catalogArticle.height);
|
|
31212
|
+
var newHeight = this.resolvePlannerDimension(this.sinkMeasureCm(myArtOPS), this.article.catalogArticle.height);
|
|
30796
31213
|
if (newHeight != null) {
|
|
30797
31214
|
this.article.doUpdatePlannerSize = true;
|
|
30798
31215
|
this.article.calcHeight = newHeight;
|
|
@@ -30803,8 +31220,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30803
31220
|
}
|
|
30804
31221
|
if ([96, 1096].includes((_myArtOPS$option$idmV4 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV4 !== void 0 ? _myArtOPS$option$idmV4 : 0) || myArtOPS.option.diameter) {
|
|
30805
31222
|
try {
|
|
30806
|
-
var
|
|
30807
|
-
var newDepth = this.resolvePlannerDimension(Number((_ref17 = (_ref18 = (_myArtOPS$measureValu2 = myArtOPS.measureValue) !== null && _myArtOPS$measureValu2 !== void 0 ? _myArtOPS$measureValu2 : this.freeTextMeasureCm(myArtOPS)) !== null && _ref18 !== void 0 ? _ref18 : myArtOPS.value) !== null && _ref17 !== void 0 ? _ref17 : myArtOPS.valueFromName), this.article.catalogArticle.depth);
|
|
31223
|
+
var newDepth = this.resolvePlannerDimension(this.sinkMeasureCm(myArtOPS), this.article.catalogArticle.depth);
|
|
30808
31224
|
if (newDepth != null) {
|
|
30809
31225
|
this.article.doUpdatePlannerSize = true;
|
|
30810
31226
|
this.article.calcDepth = newDepth;
|
|
@@ -30815,8 +31231,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30815
31231
|
}
|
|
30816
31232
|
if ([95, 1095].includes((_myArtOPS$option$idmV5 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV5 !== void 0 ? _myArtOPS$option$idmV5 : 0) || myArtOPS.option.diameter) {
|
|
30817
31233
|
try {
|
|
30818
|
-
var
|
|
30819
|
-
var newWidth = this.resolvePlannerDimension(Number((_ref19 = (_ref20 = (_myArtOPS$measureValu3 = myArtOPS.measureValue) !== null && _myArtOPS$measureValu3 !== void 0 ? _myArtOPS$measureValu3 : this.freeTextMeasureCm(myArtOPS)) !== null && _ref20 !== void 0 ? _ref20 : myArtOPS.value) !== null && _ref19 !== void 0 ? _ref19 : myArtOPS.valueFromName), this.article.catalogArticle.width);
|
|
31234
|
+
var newWidth = this.resolvePlannerDimension(this.sinkMeasureCm(myArtOPS), this.article.catalogArticle.width);
|
|
30820
31235
|
if (newWidth != null) {
|
|
30821
31236
|
this.article.doUpdatePlannerSize = true;
|
|
30822
31237
|
this.article.calcWidth = newWidth;
|
|
@@ -30857,11 +31272,11 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30857
31272
|
key: "getConditionValuesOfCombination",
|
|
30858
31273
|
value: function getConditionValuesOfCombination(combination, featureNo, optionKey) {
|
|
30859
31274
|
var variantValues = {};
|
|
30860
|
-
var
|
|
30861
|
-
|
|
31275
|
+
var _iterator26 = _createForOfIteratorHelper$n(combination.projectOptionsSetRefs),
|
|
31276
|
+
_step26;
|
|
30862
31277
|
try {
|
|
30863
|
-
for (
|
|
30864
|
-
var optionSetRef =
|
|
31278
|
+
for (_iterator26.s(); !(_step26 = _iterator26.n()).done;) {
|
|
31279
|
+
var optionSetRef = _step26.value;
|
|
30865
31280
|
var optionList = this.getOptionListOfRef(optionSetRef);
|
|
30866
31281
|
if (optionSetRef.featureNo.toString() == featureNo) {
|
|
30867
31282
|
return optionKey && !(optionList !== null && optionList !== void 0 && optionList.options.includes(optionKey)) ? undefined : variantValues;
|
|
@@ -30870,9 +31285,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30870
31285
|
variantValues[optionSetRef.featureNo.toString()] = optionList.options[0];
|
|
30871
31286
|
}
|
|
30872
31287
|
} catch (err) {
|
|
30873
|
-
|
|
31288
|
+
_iterator26.e(err);
|
|
30874
31289
|
} finally {
|
|
30875
|
-
|
|
31290
|
+
_iterator26.f();
|
|
30876
31291
|
}
|
|
30877
31292
|
return variantValues;
|
|
30878
31293
|
}
|
|
@@ -30898,18 +31313,18 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30898
31313
|
})) return false;
|
|
30899
31314
|
return _this8.decisionRemovesOption(restriction, featureNo, optionKey);
|
|
30900
31315
|
};
|
|
30901
|
-
var
|
|
30902
|
-
|
|
31316
|
+
var _iterator27 = _createForOfIteratorHelper$n(articleDecisions),
|
|
31317
|
+
_step27;
|
|
30903
31318
|
try {
|
|
30904
|
-
for (
|
|
30905
|
-
var gate =
|
|
31319
|
+
for (_iterator27.s(); !(_step27 = _iterator27.n()).done;) {
|
|
31320
|
+
var gate = _step27.value;
|
|
30906
31321
|
if (gate.decisionType != 2) continue;
|
|
30907
|
-
var
|
|
30908
|
-
|
|
31322
|
+
var _iterator28 = _createForOfIteratorHelper$n(gate.optionCombinations),
|
|
31323
|
+
_step28;
|
|
30909
31324
|
try {
|
|
30910
|
-
for (
|
|
31325
|
+
for (_iterator28.s(); !(_step28 = _iterator28.n()).done;) {
|
|
30911
31326
|
var _combination$projectA13, _combination$projectA14;
|
|
30912
|
-
var combination =
|
|
31327
|
+
var combination = _step28.value;
|
|
30913
31328
|
var enabled = (_combination$projectA13 = (_combination$projectA14 = combination.projectActions) === null || _combination$projectA14 === void 0 ? void 0 : _combination$projectA14.enableDecision) !== null && _combination$projectA13 !== void 0 ? _combination$projectA13 : [];
|
|
30914
31329
|
if (!enabled.some(function (ref) {
|
|
30915
31330
|
return isGatedRestriction(Number(ref.decisionNo));
|
|
@@ -30917,15 +31332,15 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30917
31332
|
variantValuesArr.push.apply(variantValuesArr, _toConsumableArray__default["default"](this.getValuesNotMatchingCombination(combination)));
|
|
30918
31333
|
}
|
|
30919
31334
|
} catch (err) {
|
|
30920
|
-
|
|
31335
|
+
_iterator28.e(err);
|
|
30921
31336
|
} finally {
|
|
30922
|
-
|
|
31337
|
+
_iterator28.f();
|
|
30923
31338
|
}
|
|
30924
31339
|
}
|
|
30925
31340
|
} catch (err) {
|
|
30926
|
-
|
|
31341
|
+
_iterator27.e(err);
|
|
30927
31342
|
} finally {
|
|
30928
|
-
|
|
31343
|
+
_iterator27.f();
|
|
30929
31344
|
}
|
|
30930
31345
|
return variantValuesArr;
|
|
30931
31346
|
}
|
|
@@ -30950,34 +31365,34 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30950
31365
|
key: "getValuesNotMatchingCombination",
|
|
30951
31366
|
value: function getValuesNotMatchingCombination(combination) {
|
|
30952
31367
|
var variantValuesArr = [];
|
|
30953
|
-
var
|
|
30954
|
-
|
|
31368
|
+
var _iterator29 = _createForOfIteratorHelper$n(combination.projectOptionsSetRefs),
|
|
31369
|
+
_step29;
|
|
30955
31370
|
try {
|
|
30956
|
-
for (
|
|
30957
|
-
var optionSetRef =
|
|
31371
|
+
for (_iterator29.s(); !(_step29 = _iterator29.n()).done;) {
|
|
31372
|
+
var optionSetRef = _step29.value;
|
|
30958
31373
|
var optionList = this.getOptionListOfRef(optionSetRef);
|
|
30959
31374
|
if (!(optionList !== null && optionList !== void 0 && optionList.options.length) || ![0, 1, 2, 3].includes(optionList.operator)) continue;
|
|
30960
31375
|
var conditionFeatureNo = optionSetRef.featureNo.toString();
|
|
30961
31376
|
var ops = this.article.getArticleOptionState(conditionFeatureNo);
|
|
30962
31377
|
if (!ops) continue;
|
|
30963
|
-
var
|
|
30964
|
-
|
|
31378
|
+
var _iterator30 = _createForOfIteratorHelper$n(ops.visibleOPVKeys),
|
|
31379
|
+
_step30;
|
|
30965
31380
|
try {
|
|
30966
|
-
for (
|
|
30967
|
-
var candidate =
|
|
31381
|
+
for (_iterator30.s(); !(_step30 = _iterator30.n()).done;) {
|
|
31382
|
+
var candidate = _step30.value;
|
|
30968
31383
|
if (this.evalValueWithOperator(optionList.operator, optionList.options, candidate)) continue;
|
|
30969
31384
|
variantValuesArr.push(_defineProperty__default["default"]({}, conditionFeatureNo, candidate));
|
|
30970
31385
|
}
|
|
30971
31386
|
} catch (err) {
|
|
30972
|
-
|
|
31387
|
+
_iterator30.e(err);
|
|
30973
31388
|
} finally {
|
|
30974
|
-
|
|
31389
|
+
_iterator30.f();
|
|
30975
31390
|
}
|
|
30976
31391
|
}
|
|
30977
31392
|
} catch (err) {
|
|
30978
|
-
|
|
31393
|
+
_iterator29.e(err);
|
|
30979
31394
|
} finally {
|
|
30980
|
-
|
|
31395
|
+
_iterator29.f();
|
|
30981
31396
|
}
|
|
30982
31397
|
return variantValuesArr;
|
|
30983
31398
|
}
|
|
@@ -30992,6 +31407,14 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
30992
31407
|
return null;
|
|
30993
31408
|
}
|
|
30994
31409
|
|
|
31410
|
+
/** The dimension in cm a sink's value sets; NaN when it names none. */
|
|
31411
|
+
}, {
|
|
31412
|
+
key: "sinkMeasureCm",
|
|
31413
|
+
value: function sinkMeasureCm(ops) {
|
|
31414
|
+
var _ref16, _ref17, _ops$measureValue;
|
|
31415
|
+
return Number((_ref16 = (_ref17 = (_ops$measureValue = ops.measureValue) !== null && _ops$measureValue !== void 0 ? _ops$measureValue : this.freeTextMeasureCm(ops)) !== null && _ref17 !== void 0 ? _ref17 : ops.value) !== null && _ref16 !== void 0 ? _ref16 : ops.valueFromName);
|
|
31416
|
+
}
|
|
31417
|
+
|
|
30995
31418
|
/** The typed freetext is not unit-converted like `value`: "25600" MMT must become 2560 cm here. */
|
|
30996
31419
|
}, {
|
|
30997
31420
|
key: "freeTextMeasureCm",
|
|
@@ -31036,7 +31459,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
31036
31459
|
}, {
|
|
31037
31460
|
key: "updateConfigDependentMedia",
|
|
31038
31461
|
value: function updateConfigDependentMedia() {
|
|
31039
|
-
var _this$article$
|
|
31462
|
+
var _this$article$catalog8;
|
|
31040
31463
|
var catalogData = this.article.CatalogData;
|
|
31041
31464
|
//articlebild berechnung
|
|
31042
31465
|
|
|
@@ -31050,9 +31473,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
31050
31473
|
for (var j = 0; !doUse && j < image.decisionNos.length; j++) {
|
|
31051
31474
|
var decision = catalogData.getDecisionByNo(image.decisionNos[j]);
|
|
31052
31475
|
if (!decision) continue;
|
|
31053
|
-
var
|
|
31054
|
-
|
|
31055
|
-
combination =
|
|
31476
|
+
var _ref18 = this.getMatchingOptionCombination(decision.optionCombinations, decision.decisionNo),
|
|
31477
|
+
_ref19 = _slicedToArray__default["default"](_ref18, 1),
|
|
31478
|
+
combination = _ref19[0];
|
|
31056
31479
|
if (combination) {
|
|
31057
31480
|
doUse = true;
|
|
31058
31481
|
break;
|
|
@@ -31071,18 +31494,18 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
31071
31494
|
}
|
|
31072
31495
|
|
|
31073
31496
|
// this functions updates the images of OPVs that depend on rules
|
|
31074
|
-
var
|
|
31075
|
-
|
|
31497
|
+
var _iterator31 = _createForOfIteratorHelper$n(this.article.articleOptionStates.values()),
|
|
31498
|
+
_step31;
|
|
31076
31499
|
try {
|
|
31077
|
-
for (
|
|
31078
|
-
var ops =
|
|
31079
|
-
var
|
|
31080
|
-
|
|
31500
|
+
for (_iterator31.s(); !(_step31 = _iterator31.n()).done;) {
|
|
31501
|
+
var ops = _step31.value;
|
|
31502
|
+
var _iterator32 = _createForOfIteratorHelper$n(ops.visibleOptionValues),
|
|
31503
|
+
_step32;
|
|
31081
31504
|
try {
|
|
31082
|
-
for (
|
|
31083
|
-
var
|
|
31084
|
-
jKey =
|
|
31085
|
-
opv =
|
|
31505
|
+
for (_iterator32.s(); !(_step32 = _iterator32.n()).done;) {
|
|
31506
|
+
var _step32$value = _slicedToArray__default["default"](_step32.value, 2),
|
|
31507
|
+
jKey = _step32$value[0],
|
|
31508
|
+
opv = _step32$value[1];
|
|
31086
31509
|
if (opv.images) {
|
|
31087
31510
|
var imageFound = false;
|
|
31088
31511
|
for (var _i5 = 0; _i5 < opv.images.length; _i5++) {
|
|
@@ -31093,9 +31516,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
31093
31516
|
for (var _j2 = 0; _j2 < _image.decisionNos.length; _j2++) {
|
|
31094
31517
|
var _decision5 = catalogData.getDecisionsByNo([_image.decisionNos[_j2]])[0];
|
|
31095
31518
|
if (!_decision5) continue;
|
|
31096
|
-
var
|
|
31097
|
-
|
|
31098
|
-
_combination2 =
|
|
31519
|
+
var _ref22 = this.getMatchingOptionCombination(_decision5.optionCombinations, _decision5.decisionNo),
|
|
31520
|
+
_ref23 = _slicedToArray__default["default"](_ref22, 1),
|
|
31521
|
+
_combination2 = _ref23[0];
|
|
31099
31522
|
if (_combination2) {
|
|
31100
31523
|
_doUse = true;
|
|
31101
31524
|
break;
|
|
@@ -31112,25 +31535,25 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
31112
31535
|
}
|
|
31113
31536
|
}
|
|
31114
31537
|
} catch (err) {
|
|
31115
|
-
|
|
31538
|
+
_iterator32.e(err);
|
|
31116
31539
|
} finally {
|
|
31117
|
-
|
|
31540
|
+
_iterator32.f();
|
|
31118
31541
|
}
|
|
31119
31542
|
}
|
|
31120
31543
|
|
|
31121
31544
|
// this function calculates an Svg to the current configuration if neccessary (SVG Tausch)
|
|
31122
31545
|
// if the Article has no SVG Tausch nothing is done
|
|
31123
31546
|
} catch (err) {
|
|
31124
|
-
|
|
31547
|
+
_iterator31.e(err);
|
|
31125
31548
|
} finally {
|
|
31126
|
-
|
|
31549
|
+
_iterator31.f();
|
|
31127
31550
|
}
|
|
31128
31551
|
var newSVGFile = null;
|
|
31129
31552
|
var svgChangedViaSvgTausch = false;
|
|
31130
|
-
if (!((_this$article$
|
|
31131
|
-
var _this$article$
|
|
31553
|
+
if (!((_this$article$catalog8 = this.article.catalogArticle.svgs) !== null && _this$article$catalog8 !== void 0 && _this$article$catalog8.length)) {
|
|
31554
|
+
var _this$article$catalog9;
|
|
31132
31555
|
//falls der Arikel kein SVG hat könnte eines seiner ParlistArtikel eines haben
|
|
31133
|
-
if (this.article.hasPartlistArticle && !((_this$article$
|
|
31556
|
+
if (this.article.hasPartlistArticle && !((_this$article$catalog9 = this.article.catalogArticle.catalogPlannerArticle) !== null && _this$article$catalog9 !== void 0 && _this$article$catalog9.topSvg)) {
|
|
31134
31557
|
for (var key in this.article.partlistArticles) if (this.article.partlistArticles[key].actPlannerData) {
|
|
31135
31558
|
this.article.plannerData = this.article.partlistArticles[key].actPlannerData;
|
|
31136
31559
|
newSVGFile = true;
|
|
@@ -31153,9 +31576,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
31153
31576
|
for (var _j = 0; _j < svg.decisionNos.length; _j++) {
|
|
31154
31577
|
var _decision4 = catalogData.getDecisionsByNo([svg.decisionNos[_j]])[0];
|
|
31155
31578
|
if (!_decision4) continue;
|
|
31156
|
-
var
|
|
31157
|
-
|
|
31158
|
-
_combination =
|
|
31579
|
+
var _ref20 = this.getMatchingOptionCombination(_decision4.optionCombinations, _decision4.decisionNo),
|
|
31580
|
+
_ref21 = _slicedToArray__default["default"](_ref20, 1),
|
|
31581
|
+
_combination = _ref21[0];
|
|
31159
31582
|
if (_combination) {
|
|
31160
31583
|
svgValid = _decision4;
|
|
31161
31584
|
break;
|
|
@@ -34381,7 +34804,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34381
34804
|
break;
|
|
34382
34805
|
}
|
|
34383
34806
|
_context.next = 4;
|
|
34384
|
-
return Promise.resolve().then(function () { return require('./ShelfPlanner-
|
|
34807
|
+
return Promise.resolve().then(function () { return require('./ShelfPlanner-5329a6dc.js'); });
|
|
34385
34808
|
case 4:
|
|
34386
34809
|
_yield$import = _context.sent;
|
|
34387
34810
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -35859,7 +36282,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
35859
36282
|
var _initCfgValues = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9(article, variantValues,
|
|
35860
36283
|
// Werte aus einem Basiskonfigurat,
|
|
35861
36284
|
variantItems) {
|
|
35862
|
-
var myCatalogArticleOptions, i, _article$set$ViewConf, attr, foundItem, _foundItem$opt, opss, _i3, ops, opv, _iterator3, _step3, _Array$from$0$codex, _Array$from$, _ops, value, optionValueCodex, _i4, variantItem, possibleValues, j, possibleValue, _i5, _variantItem, val;
|
|
36285
|
+
var myCatalogArticleOptions, i, _article$set$ViewConf, attr, foundItem, _foundItem$opt, opss, _i3, ops, opv, _iterator3, _step3, _Array$from$0$codex, _Array$from$, _ops, value, optionValueCodex, _i4, variantItem, possibleValues, j, possibleValue, _i5, _variantItem, val, _ops$defaultFreeText, _ops$valCodex, optionValue;
|
|
35863
36286
|
return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context10) {
|
|
35864
36287
|
while (1) switch (_context10.prev = _context10.next) {
|
|
35865
36288
|
case 0:
|
|
@@ -35953,12 +36376,16 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
35953
36376
|
if (value == undefined && _ops.isFreeText && !variantValues[_ops.optionCodex + '_val']) {
|
|
35954
36377
|
val = _ops.option.freetextDefaultValue;
|
|
35955
36378
|
if (val) {
|
|
35956
|
-
value = val;
|
|
35957
|
-
_ops.freeText =
|
|
36379
|
+
value = (_ops$defaultFreeText = _ops.defaultFreeText) !== null && _ops$defaultFreeText !== void 0 ? _ops$defaultFreeText : val;
|
|
36380
|
+
_ops.freeText = value;
|
|
36381
|
+
// the default is clamped to the selected free value's range, so set it on that value
|
|
36382
|
+
optionValueCodex = (_ops$valCodex = _ops.valCodex) !== null && _ops$valCodex !== void 0 ? _ops$valCodex : optionValueCodex;
|
|
35958
36383
|
}
|
|
35959
36384
|
}
|
|
35960
36385
|
if (value != undefined) {
|
|
35961
|
-
|
|
36386
|
+
// a grouped option keys its values by group, so the selected value may be no direct key
|
|
36387
|
+
optionValue = _ops.valCodex === optionValueCodex ? _ops.val : _ops.option.articleOptionValues.get(optionValueCodex);
|
|
36388
|
+
article.engine.setOP(_ops.option.codex, optionValue, value, true);
|
|
35962
36389
|
}
|
|
35963
36390
|
case 16:
|
|
35964
36391
|
_context10.next = 7;
|
|
@@ -43229,7 +43656,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
43229
43656
|
break;
|
|
43230
43657
|
}
|
|
43231
43658
|
_context5.next = 3;
|
|
43232
|
-
return Promise.resolve().then(function () { return require('./DoorPlanner-
|
|
43659
|
+
return Promise.resolve().then(function () { return require('./DoorPlanner-00e36c65.js'); });
|
|
43233
43660
|
case 3:
|
|
43234
43661
|
_yield$import = _context5.sent;
|
|
43235
43662
|
DoorPlanner = _yield$import["default"];
|
|
@@ -51552,7 +51979,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
51552
51979
|
break;
|
|
51553
51980
|
case 3:
|
|
51554
51981
|
_context13.next = 5;
|
|
51555
|
-
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-
|
|
51982
|
+
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-efcfdb92.js'); });
|
|
51556
51983
|
case 5:
|
|
51557
51984
|
_yield$import = _context13.sent;
|
|
51558
51985
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -51560,7 +51987,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
51560
51987
|
return _context13.abrupt("break", 27);
|
|
51561
51988
|
case 9:
|
|
51562
51989
|
_context13.next = 11;
|
|
51563
|
-
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-
|
|
51990
|
+
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-c8fecd2e.js'); });
|
|
51564
51991
|
case 11:
|
|
51565
51992
|
_yield$import2 = _context13.sent;
|
|
51566
51993
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -51568,7 +51995,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
51568
51995
|
return _context13.abrupt("break", 27);
|
|
51569
51996
|
case 15:
|
|
51570
51997
|
_context13.next = 17;
|
|
51571
|
-
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-
|
|
51998
|
+
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-a159f15c.js'); });
|
|
51572
51999
|
case 17:
|
|
51573
52000
|
_yield$import3 = _context13.sent;
|
|
51574
52001
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -51576,7 +52003,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
51576
52003
|
return _context13.abrupt("break", 27);
|
|
51577
52004
|
case 21:
|
|
51578
52005
|
_context13.next = 23;
|
|
51579
|
-
return Promise.resolve().then(function () { return require('./StandardWWSHandler-
|
|
52006
|
+
return Promise.resolve().then(function () { return require('./StandardWWSHandler-4143da24.js'); });
|
|
51580
52007
|
case 23:
|
|
51581
52008
|
_yield$import4 = _context13.sent;
|
|
51582
52009
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -52974,7 +53401,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
52974
53401
|
//If we need real time rendering initialize the SignalR and 3D host connection Handler
|
|
52975
53402
|
bootMark('signalr: chunk import start');
|
|
52976
53403
|
_context3.next = 3;
|
|
52977
|
-
return Promise.resolve().then(function () { return require('./Host3DSignalR-
|
|
53404
|
+
return Promise.resolve().then(function () { return require('./Host3DSignalR-dcb7c665.js'); });
|
|
52978
53405
|
case 3:
|
|
52979
53406
|
_yield$import = _context3.sent;
|
|
52980
53407
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -57380,7 +57807,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
57380
57807
|
break;
|
|
57381
57808
|
case 9:
|
|
57382
57809
|
_context5.next = 11;
|
|
57383
|
-
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-
|
|
57810
|
+
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-b84e8c77.js'); });
|
|
57384
57811
|
case 11:
|
|
57385
57812
|
_yield$import = _context5.sent;
|
|
57386
57813
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -57395,7 +57822,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
57395
57822
|
return _context5.abrupt("break", 22);
|
|
57396
57823
|
case 16:
|
|
57397
57824
|
_context5.next = 18;
|
|
57398
|
-
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-
|
|
57825
|
+
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-a5f6ecf3.js'); });
|
|
57399
57826
|
case 18:
|
|
57400
57827
|
_yield$import2 = _context5.sent;
|
|
57401
57828
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -82344,6 +82771,7 @@ exports.bootRequestName = bootRequestName;
|
|
|
82344
82771
|
exports.canSwitchTo = canSwitchTo;
|
|
82345
82772
|
exports.collectStructureStepKeys = collectStructureStepKeys;
|
|
82346
82773
|
exports.creatRenderOrders = creatRenderOrders;
|
|
82774
|
+
exports.describeMeasurePrice = describeMeasurePrice;
|
|
82347
82775
|
exports.dockingFiltersMatch = dockingFiltersMatch;
|
|
82348
82776
|
exports.familyMembersOf = familyMembersOf;
|
|
82349
82777
|
exports.fitsInsideRoom = fitsInsideRoom;
|
|
@@ -82366,6 +82794,7 @@ exports.isSavePlannerV2 = isSavePlannerV2;
|
|
|
82366
82794
|
exports.keepInsideRoom = keepInsideRoom;
|
|
82367
82795
|
exports.layersCollide = layersCollide;
|
|
82368
82796
|
exports.loadAndRepairBasket = loadAndRepairBasket;
|
|
82797
|
+
exports.measureWithUnit = measureWithUnit;
|
|
82369
82798
|
exports.moveGroupRigidly = moveGroupRigidly;
|
|
82370
82799
|
exports.movePoints = movePoints;
|
|
82371
82800
|
exports.moveShape = moveShape;
|