@crystaldesign/web-planner-logic 25.10.0-beta.9 → 25.10.0-rc.2
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-04bf6318.js → DivaBoxPlanner-ab72c374.js} +6 -5
- package/build/cjs/{DivaStandardPlanner-77476193.js → DivaStandardPlanner-a35a2184.js} +2 -2
- package/build/cjs/{DoorPlanner-f5c079a9.js → DoorPlanner-b3deb85e.js} +1 -1
- package/build/cjs/{Host3DSignalR-57e23024.js → Host3DSignalR-062ed34e.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-47a27ec7.js → LiviqueWWSHandler-8e0bf61c.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-e44293f5.js → PfisterWWSHandler-036e9844.js} +1 -1
- package/build/cjs/{PlannerHandler2D-be01ece6.js → PlannerHandler2D-04a31da5.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-6934e260.js → SeriousBasketHandler-26ca142e.js} +1 -1
- package/build/cjs/{ShelfPlanner-d409ac3e.js → ShelfPlanner-02c23e5a.js} +1 -1
- package/build/cjs/{StandardWWSHandler-5dd8d94a.js → StandardWWSHandler-0e718668.js} +1 -1
- package/build/cjs/{index-a366532b.js → index-b4cac17d.js} +1042 -1317
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-b09f2e76.js → DivaBoxPlanner-67c08b94.js} +6 -5
- package/build/esm/{DivaStandardPlanner-a186b727.js → DivaStandardPlanner-76627de9.js} +2 -2
- package/build/esm/{DoorPlanner-5bdbe66c.js → DoorPlanner-bb580288.js} +1 -1
- package/build/esm/{Host3DSignalR-b3bc2b02.js → Host3DSignalR-61f6fb99.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-1a326919.js → LiviqueWWSHandler-962b5822.js} +1 -1
- package/build/esm/{PfisterWWSHandler-fd75b316.js → PfisterWWSHandler-bc7dd1da.js} +1 -1
- package/build/esm/{PlannerHandler2D-35519ef0.js → PlannerHandler2D-9fb1802d.js} +1 -1
- package/build/esm/{SeriousBasketHandler-def7e867.js → SeriousBasketHandler-0205a0d5.js} +1 -1
- package/build/esm/{ShelfPlanner-ffbf54ca.js → ShelfPlanner-467314ca.js} +1 -1
- package/build/esm/{StandardWWSHandler-91ba6b7c.js → StandardWWSHandler-5304778e.js} +1 -1
- package/build/esm/{index-949457fc.js → index-dabb6172.js} +1042 -1317
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/ArticleOptionStateType.d.ts +6 -2
- package/build/types/web-planner-logic/src/interface/ArticleOptionStateType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts +7 -2
- package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/ViewTypes/index.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/ViewTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +12 -4
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +5 -3
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +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 +0 -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.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts +1 -1
- package/build/types/web-planner-logic/src/model/Articles/Article/DivaCatalogArticle.d.ts +3 -1
- package/build/types/web-planner-logic/src/model/Articles/Article/DivaCatalogArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts +6 -2
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts +6 -2
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/datas/environments/testing/pfister-dev.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/datas/environments/testing/pfister-prod.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/datas/environments/testing/retail-dev.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/datas/environments/testing/retail-prod-IDM.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/datas/environments/testing/retail-test.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -26,8 +26,8 @@ import _typeof from '@babel/runtime/helpers/typeof';
|
|
|
26
26
|
})();
|
|
27
27
|
|
|
28
28
|
var _excluded = ["type"];
|
|
29
|
-
function ownKeys$
|
|
30
|
-
function _objectSpread$
|
|
29
|
+
function ownKeys$l(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30
|
+
function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$l(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31
31
|
var LOG$p = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
32
32
|
var JsonDataCache = /*#__PURE__*/function () {
|
|
33
33
|
function JsonDataCache() {
|
|
@@ -238,8 +238,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
238
238
|
if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig2 = this.apiConfig) !== null && _this$apiConfig2 !== void 0 && _this$apiConfig2.api2.web) {
|
|
239
239
|
api2Url = this.apiConfig.api2.web;
|
|
240
240
|
}
|
|
241
|
-
_context2.t0 = _objectSpread$
|
|
242
|
-
_context2.t1 = _objectSpread$
|
|
241
|
+
_context2.t0 = _objectSpread$l;
|
|
242
|
+
_context2.t1 = _objectSpread$l({}, init.config.headers);
|
|
243
243
|
_context2.t2 = {};
|
|
244
244
|
_context2.next = 21;
|
|
245
245
|
return this.getSessionGuid('V', undefined, this.OrganizationId, api2Url);
|
|
@@ -16481,9 +16481,6 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16481
16481
|
}]);
|
|
16482
16482
|
}();
|
|
16483
16483
|
|
|
16484
|
-
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; } } }; }
|
|
16485
|
-
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; } }
|
|
16486
|
-
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; }
|
|
16487
16484
|
//kaufmännischer Artikel
|
|
16488
16485
|
var CatalogArticleData = /*#__PURE__*/function () {
|
|
16489
16486
|
function CatalogArticleData(catalogArticle) {
|
|
@@ -17196,25 +17193,14 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17196
17193
|
value: function getOptionValueFromOption(opt, opv) {
|
|
17197
17194
|
if (this._catalogArticle.articleOptions[opt] && this._catalogArticle.articleOptions[opt].hasOPG) {
|
|
17198
17195
|
var myOPGs = this._catalogArticle.articleOptions[opt].articleOptionValues;
|
|
17199
|
-
var
|
|
17200
|
-
|
|
17201
|
-
|
|
17202
|
-
|
|
17203
|
-
var _step$value = _slicedToArray(_step.value, 2),
|
|
17204
|
-
_key2 = _step$value[0],
|
|
17205
|
-
value = _step$value[1];
|
|
17206
|
-
var myOPVs = value.articleOptionValues;
|
|
17207
|
-
if (myOPVs && myOPVs.get(opv)) {
|
|
17208
|
-
return myOPVs.get(opv);
|
|
17209
|
-
}
|
|
17196
|
+
for (var _key2 in myOPGs) {
|
|
17197
|
+
var myOPVs = myOPGs[_key2].articleOptionValues;
|
|
17198
|
+
if (myOPVs && myOPVs[opv]) {
|
|
17199
|
+
return myOPVs[opv];
|
|
17210
17200
|
}
|
|
17211
|
-
} catch (err) {
|
|
17212
|
-
_iterator.e(err);
|
|
17213
|
-
} finally {
|
|
17214
|
-
_iterator.f();
|
|
17215
17201
|
}
|
|
17216
17202
|
} else {
|
|
17217
|
-
return this._catalogArticle.articleOptions[opt].articleOptionValues
|
|
17203
|
+
return this._catalogArticle.articleOptions[opt].articleOptionValues[opv];
|
|
17218
17204
|
}
|
|
17219
17205
|
return null;
|
|
17220
17206
|
}
|
|
@@ -17249,11 +17235,8 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17249
17235
|
key: "getOptionCodexFromOptionsValue",
|
|
17250
17236
|
value: function getOptionCodexFromOptionsValue(opv) {
|
|
17251
17237
|
if (this._catalogArticle.articleOptions) {
|
|
17252
|
-
for (var
|
|
17253
|
-
|
|
17254
|
-
_key3 = _Object$entries$_i[0],
|
|
17255
|
-
value = _Object$entries$_i[1];
|
|
17256
|
-
if (value.articleOptionValues.get(opv)) {
|
|
17238
|
+
for (var _key3 in this._catalogArticle.articleOptions) {
|
|
17239
|
+
if (this._catalogArticle.articleOptions[_key3].articleOptionValues[opv]) {
|
|
17257
17240
|
return _key3;
|
|
17258
17241
|
}
|
|
17259
17242
|
}
|
|
@@ -18218,9 +18201,6 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
|
|
|
18218
18201
|
}]);
|
|
18219
18202
|
}();
|
|
18220
18203
|
|
|
18221
|
-
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; } } }; }
|
|
18222
|
-
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; } }
|
|
18223
|
-
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; }
|
|
18224
18204
|
var ArticleOptionData = /*#__PURE__*/function () {
|
|
18225
18205
|
function ArticleOptionData(opt) {
|
|
18226
18206
|
var _this$tabGroup;
|
|
@@ -18239,6 +18219,24 @@ var ArticleOptionData = /*#__PURE__*/function () {
|
|
|
18239
18219
|
key: "initOPVsInOPT",
|
|
18240
18220
|
value: function initOPVsInOPT(articleOptionValues) {
|
|
18241
18221
|
this.opt.articleOptionValues = articleOptionValues;
|
|
18222
|
+
for (var key in articleOptionValues) {
|
|
18223
|
+
if (this.opt.hasOPG) {
|
|
18224
|
+
var opg = articleOptionValues[key];
|
|
18225
|
+
for (var key2 in opg.articleOptionValues) {
|
|
18226
|
+
var opv = opg.articleOptionValues[key2];
|
|
18227
|
+
if (opv.image || opv.hexColor) {
|
|
18228
|
+
this.opt.hasImages = true;
|
|
18229
|
+
break;
|
|
18230
|
+
}
|
|
18231
|
+
}
|
|
18232
|
+
} else {
|
|
18233
|
+
var _opv = articleOptionValues[key];
|
|
18234
|
+
if (_opv.image || _opv.hexColor) {
|
|
18235
|
+
this.opt.hasImages = true;
|
|
18236
|
+
}
|
|
18237
|
+
}
|
|
18238
|
+
if (this.opt.hasImages) break;
|
|
18239
|
+
}
|
|
18242
18240
|
}
|
|
18243
18241
|
/**************************************************GETTER ************************************************** */
|
|
18244
18242
|
}, {
|
|
@@ -18315,28 +18313,17 @@ var ArticleOptionData = /*#__PURE__*/function () {
|
|
|
18315
18313
|
}, {
|
|
18316
18314
|
key: "getOpvByOcd",
|
|
18317
18315
|
value: function getOpvByOcd(codex) {
|
|
18318
|
-
var
|
|
18319
|
-
|
|
18320
|
-
|
|
18321
|
-
|
|
18322
|
-
|
|
18323
|
-
|
|
18324
|
-
|
|
18325
|
-
|
|
18326
|
-
|
|
18327
|
-
|
|
18328
|
-
}
|
|
18329
|
-
if (opv.isOPVG) {
|
|
18330
|
-
var _opv$articleOptionVal, _opv$articleOptionVal2;
|
|
18331
|
-
return Array.from((_opv$articleOptionVal = (_opv$articleOptionVal2 = opv.articleOptionValues) === null || _opv$articleOptionVal2 === void 0 ? void 0 : _opv$articleOptionVal2.values()) !== null && _opv$articleOptionVal !== void 0 ? _opv$articleOptionVal : []).find(function (v) {
|
|
18332
|
-
return v.ocd === codex;
|
|
18333
|
-
});
|
|
18334
|
-
}
|
|
18316
|
+
for (var key in this.opt.articleOptionValues) {
|
|
18317
|
+
var opv = this.opt.articleOptionValues[key];
|
|
18318
|
+
if (opv.ocd == codex) {
|
|
18319
|
+
return opv;
|
|
18320
|
+
}
|
|
18321
|
+
if (opv.isOPVG) {
|
|
18322
|
+
var _opv$articleOptionVal;
|
|
18323
|
+
return Object.values((_opv$articleOptionVal = opv.articleOptionValues) !== null && _opv$articleOptionVal !== void 0 ? _opv$articleOptionVal : {}).find(function (v) {
|
|
18324
|
+
return v.ocd === codex;
|
|
18325
|
+
});
|
|
18335
18326
|
}
|
|
18336
|
-
} catch (err) {
|
|
18337
|
-
_iterator.e(err);
|
|
18338
|
-
} finally {
|
|
18339
|
-
_iterator.f();
|
|
18340
18327
|
}
|
|
18341
18328
|
return undefined;
|
|
18342
18329
|
}
|
|
@@ -18348,13 +18335,7 @@ var ArticleOptionData = /*#__PURE__*/function () {
|
|
|
18348
18335
|
}, {
|
|
18349
18336
|
key: "hasImages",
|
|
18350
18337
|
get: function get() {
|
|
18351
|
-
|
|
18352
|
-
return ((_this$opt$articleOpti = (_this$opt$articleOpti2 = this.opt.articleOptionValues) === null || _this$opt$articleOpti2 === void 0 ? void 0 : _this$opt$articleOpti2.values()) !== null && _this$opt$articleOpti !== void 0 ? _this$opt$articleOpti : []).some(function (v) {
|
|
18353
|
-
var _v$articleOptionValue;
|
|
18354
|
-
return (_v$articleOptionValue = v.articleOptionValues) === null || _v$articleOptionValue === void 0 ? void 0 : _v$articleOptionValue.values().some(function (v2) {
|
|
18355
|
-
return v2.image || v2.hexColor;
|
|
18356
|
-
});
|
|
18357
|
-
});
|
|
18338
|
+
return this.opt.hasImages;
|
|
18358
18339
|
}
|
|
18359
18340
|
}, {
|
|
18360
18341
|
key: "parentOptionCodex",
|
|
@@ -18550,8 +18531,8 @@ function addSupplierColors(catalogArticleData, allOPVsOfOPT, supplierColors, cat
|
|
|
18550
18531
|
var articleOPG = new ArticleOptionValueData(getArticleOptionValueType('OPVSUPPLIER_COLORS', {
|
|
18551
18532
|
RUL: rule
|
|
18552
18533
|
}, catalogOPG, catalogArticleData, false, newOPT, catalog.multiselectOptions));
|
|
18553
|
-
allOPVsOfOPT
|
|
18554
|
-
var supplierColorsOpvs =
|
|
18534
|
+
allOPVsOfOPT['OPVSUPPLIER_COLORS'] = articleOPG;
|
|
18535
|
+
var supplierColorsOpvs = {};
|
|
18555
18536
|
for (var i = 0; i < supplierColors.length; i++) {
|
|
18556
18537
|
var col = supplierColors[i];
|
|
18557
18538
|
var colorCatalogOpv = new OptionValueCatalogData(getCatalogOptionValueDataType('OPV' + col.OptionValueCodex, {
|
|
@@ -18560,7 +18541,7 @@ function addSupplierColors(catalogArticleData, allOPVsOfOPT, supplierColors, cat
|
|
|
18560
18541
|
HexColor: col.HexColor,
|
|
18561
18542
|
GroupName: 'Lieferantenfarben'
|
|
18562
18543
|
}, catalog), catalog);
|
|
18563
|
-
supplierColorsOpvs
|
|
18544
|
+
supplierColorsOpvs['OPV' + col.OptionValueCodex] = new ArticleOptionValueData(getArticleOptionValueType('OPV' + col.OptionValueCodex, {}, colorCatalogOpv, catalogArticleData, true, articleOPG, catalog.multiselectOptions));
|
|
18564
18545
|
}
|
|
18565
18546
|
articleOPG.initOPVsInOPG(supplierColorsOpvs);
|
|
18566
18547
|
}
|
|
@@ -18640,7 +18621,7 @@ function _loadMoreFromDivaArticle() {
|
|
|
18640
18621
|
jsonPrices = _yield$Promise$all2[0];
|
|
18641
18622
|
jsonOption = _yield$Promise$all2[1];
|
|
18642
18623
|
loadPrices(jsonPrices, catalogArticleData, catalog);
|
|
18643
|
-
loadArticleOptions(jsonOption, catalogArticleData, set
|
|
18624
|
+
loadArticleOptions(jsonOption, catalogArticleData, set);
|
|
18644
18625
|
case 31:
|
|
18645
18626
|
catalogArticle.areOptionsLoaded = true;
|
|
18646
18627
|
case 32:
|
|
@@ -18705,7 +18686,7 @@ function initArticleRelations(articleRelations, catalogArticleData, catalog) {
|
|
|
18705
18686
|
}
|
|
18706
18687
|
}
|
|
18707
18688
|
}
|
|
18708
|
-
function loadArticleOptions(json, catalogArticleData, set
|
|
18689
|
+
function loadArticleOptions(json, catalogArticleData, set) {
|
|
18709
18690
|
var catalogArticle = catalogArticleData.catalogArticle;
|
|
18710
18691
|
var multiselectOptions = json.OPT.filter(function (o) {
|
|
18711
18692
|
var _o$OCD;
|
|
@@ -18716,26 +18697,26 @@ function loadArticleOptions(json, catalogArticleData, set, onlyRunLogic) {
|
|
|
18716
18697
|
if (json.OPT && json.OPT.length != 0) {
|
|
18717
18698
|
for (var i = 0; i < json.OPT.length; i++) {
|
|
18718
18699
|
var myOPT = json.OPT[i];
|
|
18719
|
-
var allOPVsOfOPT =
|
|
18700
|
+
var allOPVsOfOPT = {};
|
|
18720
18701
|
var newOPT = new ArticleOptionData(getArticleOptionType(myOPT, set));
|
|
18721
18702
|
|
|
18722
18703
|
//Items initalisieren
|
|
18723
18704
|
if (newOPT.hasOPG) {
|
|
18724
18705
|
var _myOPT$OPV;
|
|
18725
18706
|
for (var j = 0; j < myOPT.OPG.length; j++) {
|
|
18726
|
-
var allOPVsOfOPG =
|
|
18707
|
+
var allOPVsOfOPG = {};
|
|
18727
18708
|
var tmpOPG = myOPT.OPG[j],
|
|
18728
18709
|
catOPG = set.CatalogData.getOptionValue(tmpOPG.OCD ? tmpOPG.OCD : tmpOPG.Codex);
|
|
18729
18710
|
if (catOPG) {
|
|
18730
18711
|
var newOPG = new ArticleOptionValueData(getArticleOptionValueType(tmpOPG.Codex, tmpOPG, catOPG, catalogArticleData, false, newOPT, multiselectOptions));
|
|
18731
|
-
allOPVsOfOPT
|
|
18712
|
+
allOPVsOfOPT[tmpOPG.Codex] = newOPG;
|
|
18732
18713
|
for (var m = 0; m < tmpOPG.OPV.length; m++) {
|
|
18733
18714
|
var tmpOPV = tmpOPG.OPV[m],
|
|
18734
18715
|
catOPV = set.CatalogData.getOptionValue(tmpOPV.OCD ? tmpOPV.OCD : tmpOPV.Codex);
|
|
18735
18716
|
if (catOPV) {
|
|
18736
18717
|
if (!(catOPV !== null && catOPV !== void 0 && catOPV.groupName) && catOPG) catOPV.groupName = catOPG.name;
|
|
18737
18718
|
var myOPV = new ArticleOptionValueData(getArticleOptionValueType(tmpOPV.Codex, tmpOPV, catOPV, catalogArticleData, true, newOPG, multiselectOptions));
|
|
18738
|
-
allOPVsOfOPG
|
|
18719
|
+
allOPVsOfOPG[tmpOPV.Codex] = myOPV;
|
|
18739
18720
|
}
|
|
18740
18721
|
}
|
|
18741
18722
|
newOPG.initOPVsInOPG(allOPVsOfOPG);
|
|
@@ -18743,16 +18724,16 @@ function loadArticleOptions(json, catalogArticleData, set, onlyRunLogic) {
|
|
|
18743
18724
|
}
|
|
18744
18725
|
if ((_myOPT$OPV = myOPT.OPV) !== null && _myOPT$OPV !== void 0 && _myOPT$OPV.length) {
|
|
18745
18726
|
for (var _j = 0; _j < myOPT.OPV.length; _j++) {
|
|
18746
|
-
var _allOPVsOfOPG =
|
|
18727
|
+
var _allOPVsOfOPG = {};
|
|
18747
18728
|
var _tmpOPG = myOPT.OPV[_j],
|
|
18748
18729
|
_catOPG = set.CatalogData.getOptionValue(_tmpOPG.OCD ? _tmpOPG.OCD : _tmpOPG.Codex);
|
|
18749
18730
|
if (_catOPG) {
|
|
18750
18731
|
var _newOPG = new ArticleOptionValueData(getArticleOptionValueType(_tmpOPG.Codex, _tmpOPG, _catOPG, catalogArticleData, false, newOPT, multiselectOptions));
|
|
18751
|
-
allOPVsOfOPT
|
|
18732
|
+
allOPVsOfOPT[_tmpOPG.Codex] = _newOPG;
|
|
18752
18733
|
var _catOPV = set.CatalogData.getOptionValue(_tmpOPG.OCD ? _tmpOPG.OCD : _tmpOPG.Codex);
|
|
18753
18734
|
if (_catOPV) {
|
|
18754
18735
|
var _myOPV = new ArticleOptionValueData(getArticleOptionValueType(_tmpOPG.Codex, _tmpOPG, _catOPV, catalogArticleData, true, _newOPG, multiselectOptions));
|
|
18755
|
-
_allOPVsOfOPG
|
|
18736
|
+
_allOPVsOfOPG[_tmpOPG.Codex] = _myOPV;
|
|
18756
18737
|
}
|
|
18757
18738
|
_newOPG.initOPVsInOPG(_allOPVsOfOPG);
|
|
18758
18739
|
}
|
|
@@ -18764,12 +18745,12 @@ function loadArticleOptions(json, catalogArticleData, set, onlyRunLogic) {
|
|
|
18764
18745
|
_catOPV2 = set.CatalogData.getOptionValue(_tmpOPV.OCD ? _tmpOPV.OCD : _tmpOPV.Codex);
|
|
18765
18746
|
if (_catOPV2) {
|
|
18766
18747
|
var _myOPV2 = new ArticleOptionValueData(getArticleOptionValueType(_tmpOPV.Codex, _tmpOPV, _catOPV2, catalogArticleData, true, newOPT, multiselectOptions));
|
|
18767
|
-
allOPVsOfOPT
|
|
18748
|
+
allOPVsOfOPT[_tmpOPV.Codex] = _myOPV2;
|
|
18768
18749
|
}
|
|
18769
18750
|
}
|
|
18770
18751
|
}
|
|
18771
18752
|
if (set.supplierColors) {
|
|
18772
|
-
var supplierColorFound =
|
|
18753
|
+
var supplierColorFound = Object.values(allOPVsOfOPT).find(function (item) {
|
|
18773
18754
|
var _item$codex;
|
|
18774
18755
|
return (_item$codex = item.codex) === null || _item$codex === void 0 ? void 0 : _item$codex.endsWith('OPV_FARBE_BASIS');
|
|
18775
18756
|
});
|
|
@@ -18878,14 +18859,16 @@ function initDecisions(catalog, catalogArticleData) {
|
|
|
18878
18859
|
}
|
|
18879
18860
|
}
|
|
18880
18861
|
function getArticleOptionType(myOPT, set) {
|
|
18862
|
+
var _set$CatalogData$cata, _set$CatalogData$cata2, _set$CatalogData$cata3, _optionMask$hidden;
|
|
18881
18863
|
var OP = myOPT.OCD ? myOPT.OCD : myOPT.Codex;
|
|
18882
18864
|
var catOPT = set.CatalogData.getOption(OP);
|
|
18865
|
+
var optionMask = (_set$CatalogData$cata = (_set$CatalogData$cata2 = set.CatalogData.catalogMask) === null || _set$CatalogData$cata2 === void 0 || (_set$CatalogData$cata2 = _set$CatalogData$cata2.options) === null || _set$CatalogData$cata2 === void 0 ? void 0 : _set$CatalogData$cata2[OP]) !== null && _set$CatalogData$cata !== void 0 ? _set$CatalogData$cata : OP.startsWith('OPT') ? (_set$CatalogData$cata3 = set.CatalogData.catalogMask) === null || _set$CatalogData$cata3 === void 0 || (_set$CatalogData$cata3 = _set$CatalogData$cata3.options) === null || _set$CatalogData$cata3 === void 0 ? void 0 : _set$CatalogData$cata3[OP.substring(3)] : undefined;
|
|
18883
18866
|
if (!catOPT) throw new Error('Option: ' + OP + ' not in CatalogData');
|
|
18884
18867
|
var optHasOpg = myOPT.OPG && myOPT.OPG.length > 0;
|
|
18885
18868
|
return {
|
|
18886
18869
|
codex: myOPT.Codex,
|
|
18887
18870
|
catalogOPT: catOPT,
|
|
18888
|
-
articleOptionValues:
|
|
18871
|
+
articleOptionValues: {},
|
|
18889
18872
|
pos: Number(myOPT.POS),
|
|
18890
18873
|
tabGroup: myOPT.TabGroup,
|
|
18891
18874
|
tabGroup_locales: myOPT.TabGroup_locales,
|
|
@@ -18894,7 +18877,8 @@ function getArticleOptionType(myOPT, set) {
|
|
|
18894
18877
|
sendToSAP: myOPT.SendToSAP && myOPT.SendToSAP != '-1' ? myOPT.SendToSAP : undefined,
|
|
18895
18878
|
articlePlaceholder: myOPT.ArticlePlaceholder,
|
|
18896
18879
|
hasOPG: optHasOpg,
|
|
18897
|
-
|
|
18880
|
+
hasImages: false,
|
|
18881
|
+
invisible: (_optionMask$hidden = optionMask === null || optionMask === void 0 ? void 0 : optionMask.hidden) !== null && _optionMask$hidden !== void 0 ? _optionMask$hidden : myOPT.Invisible == 'True' ? true : myOPT.Invisible == 'False' ? false : undefined,
|
|
18898
18882
|
parentOptionCodex: myOPT.ParentOptionCodex
|
|
18899
18883
|
};
|
|
18900
18884
|
}
|
|
@@ -18993,8 +18977,8 @@ function getArticleOptionValueType(codex, jsonOPV, catalogOPV, myArticle, isPare
|
|
|
18993
18977
|
return opv;
|
|
18994
18978
|
}
|
|
18995
18979
|
|
|
18996
|
-
function ownKeys$
|
|
18997
|
-
function _objectSpread$
|
|
18980
|
+
function ownKeys$k(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18981
|
+
function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$k(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18998
18982
|
var LOG$k = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
18999
18983
|
function loadMoreFromIDMArticles(_x, _x2) {
|
|
19000
18984
|
return _loadMoreFromIDMArticles.apply(this, arguments);
|
|
@@ -19278,11 +19262,11 @@ var getPriceFeatureGroups = function getPriceFeatureGroups(catalogArticleDatas,
|
|
|
19278
19262
|
var initializeDecision = function initializeDecision(decision, idmOptionGroups) {
|
|
19279
19263
|
var _decision$optionCombi;
|
|
19280
19264
|
var optionCombinations = (_decision$optionCombi = decision.optionCombinations) === null || _decision$optionCombi === void 0 ? void 0 : _decision$optionCombi.map(function (c) {
|
|
19281
|
-
return _objectSpread$
|
|
19265
|
+
return _objectSpread$k(_objectSpread$k({}, c), {}, {
|
|
19282
19266
|
projectOptionsSetRefs: parseOptionSetRef(c.projectOptionsSetRefs, idmOptionGroups)
|
|
19283
19267
|
});
|
|
19284
19268
|
});
|
|
19285
|
-
return _objectSpread$
|
|
19269
|
+
return _objectSpread$k(_objectSpread$k({}, decision), {}, {
|
|
19286
19270
|
optionCombinations: optionCombinations === null || optionCombinations === void 0 ? void 0 : optionCombinations.sort(function (a, b) {
|
|
19287
19271
|
return a.sequence - b.sequence;
|
|
19288
19272
|
})
|
|
@@ -19291,11 +19275,11 @@ var initializeDecision = function initializeDecision(decision, idmOptionGroups)
|
|
|
19291
19275
|
var initializePriceFeatureGroups = function initializePriceFeatureGroups(priceFeatureGroup, idmOptionGroups) {
|
|
19292
19276
|
var _priceFeatureGroup$pr;
|
|
19293
19277
|
var finishes = (_priceFeatureGroup$pr = priceFeatureGroup.projectFinishes) === null || _priceFeatureGroup$pr === void 0 ? void 0 : _priceFeatureGroup$pr.map(function (c) {
|
|
19294
|
-
return _objectSpread$
|
|
19278
|
+
return _objectSpread$k(_objectSpread$k({}, c), {}, {
|
|
19295
19279
|
projectOptionsSetRefs: c.optionsSetRef ? parseOptionSetRef(c.optionsSetRef, idmOptionGroups) : []
|
|
19296
19280
|
});
|
|
19297
19281
|
});
|
|
19298
|
-
return _objectSpread$
|
|
19282
|
+
return _objectSpread$k(_objectSpread$k({}, priceFeatureGroup), {}, {
|
|
19299
19283
|
projectFinishes: finishes === null || finishes === void 0 ? void 0 : finishes.sort(function (a, b) {
|
|
19300
19284
|
return a.sequence - b.sequence;
|
|
19301
19285
|
})
|
|
@@ -19376,8 +19360,9 @@ var initFeature = function initFeature(feature, catalogArticleData, set) {
|
|
|
19376
19360
|
catalogArticleData.articleOptions[newArticleFeature.codex] = newArticleFeature;
|
|
19377
19361
|
};
|
|
19378
19362
|
function getCatalogFeatureType(feature, catalogArticleData, set) {
|
|
19379
|
-
var _feature$detailInfos, _ref, _feature$properties, _feature$options
|
|
19363
|
+
var _set$CatalogData$cata, _feature$detailInfos, _ref, _feature$properties, _feature$options$, _optionMask$hidden;
|
|
19380
19364
|
var featureClass = set.CatalogData.getFeatureClass(catalogArticleData.featureClassRefNo);
|
|
19365
|
+
var optionMask = (_set$CatalogData$cata = set.CatalogData.catalogMask) === null || _set$CatalogData$cata === void 0 || (_set$CatalogData$cata = _set$CatalogData$cata.options) === null || _set$CatalogData$cata === void 0 ? void 0 : _set$CatalogData$cata[feature.featureNo];
|
|
19381
19366
|
return {
|
|
19382
19367
|
name: DivaUtils.getLocals(feature.featureText, set.api.getLanguageLowercase()),
|
|
19383
19368
|
origName: DivaUtils.getLocals(feature.featureText, set.api.getLanguageLowercase()),
|
|
@@ -19396,7 +19381,7 @@ function getCatalogFeatureType(feature, catalogArticleData, set) {
|
|
|
19396
19381
|
})) === null || _feature$properties === void 0 ? void 0 : _feature$properties.value) !== null && _ref !== void 0 ? _ref : (_feature$options$ = feature.options[0]) !== null && _feature$options$ !== void 0 && (_feature$options$ = _feature$options$.detailInfos) !== null && _feature$options$ !== void 0 && _feature$options$.find(function (d) {
|
|
19397
19382
|
return d.functionType == 'OPV';
|
|
19398
19383
|
}) ? 'IMAGE' : 'TEXT',
|
|
19399
|
-
invisible: !!(featureClass !== null && featureClass !== void 0 && featureClass.featureRefs[feature.featureNo])
|
|
19384
|
+
invisible: (_optionMask$hidden = optionMask === null || optionMask === void 0 ? void 0 : optionMask.hidden) !== null && _optionMask$hidden !== void 0 ? _optionMask$hidden : !!(featureClass !== null && featureClass !== void 0 && featureClass.featureRefs[feature.featureNo])
|
|
19400
19385
|
};
|
|
19401
19386
|
}
|
|
19402
19387
|
function getArticleFeatureType(feature, catalogArticleData, catOPT, set) {
|
|
@@ -19411,10 +19396,11 @@ function getArticleFeatureType(feature, catalogArticleData, catOPT, set) {
|
|
|
19411
19396
|
var opt = {
|
|
19412
19397
|
codex: feature.featureNo,
|
|
19413
19398
|
catalogOPT: catOPT,
|
|
19414
|
-
articleOptionValues:
|
|
19399
|
+
articleOptionValues: {},
|
|
19415
19400
|
pos: feature.sequenceNo,
|
|
19416
19401
|
articlePlaceholder: false,
|
|
19417
19402
|
hasOPG: false,
|
|
19403
|
+
hasImages: false,
|
|
19418
19404
|
invisible: !!(featureClass !== null && featureClass !== void 0 && featureClass.featureRefs[feature.featureNo]),
|
|
19419
19405
|
tabGroup: tabgroup !== null && tabgroup !== void 0 && tabgroup.name ? DivaUtils.getLocals(tabgroup.name, set.api.getLanguage()) : undefined,
|
|
19420
19406
|
tabGroup_locales: tabgroup === null || tabgroup === void 0 ? void 0 : tabgroup.name
|
|
@@ -19440,7 +19426,7 @@ function getArticleFeatureType(feature, catalogArticleData, catOPT, set) {
|
|
|
19440
19426
|
//option in IDM language so in Diva World its OptionValue
|
|
19441
19427
|
function initOption(feature, articleFeature, catalogArticle, set) {
|
|
19442
19428
|
var options = feature.options;
|
|
19443
|
-
var allOptionsOfFeature =
|
|
19429
|
+
var allOptionsOfFeature = {};
|
|
19444
19430
|
//Items initalisieren
|
|
19445
19431
|
var _loop2 = function _loop2() {
|
|
19446
19432
|
var option = options[j];
|
|
@@ -19449,7 +19435,7 @@ function initOption(feature, articleFeature, catalogArticle, set) {
|
|
|
19449
19435
|
});
|
|
19450
19436
|
if (!catOption) catOption = getCatalogOptionType(option, set);
|
|
19451
19437
|
var articleIDMOption = new ArticleOptionValueData(getArticleOption(option, catOption, articleFeature, catalogArticle));
|
|
19452
|
-
allOptionsOfFeature
|
|
19438
|
+
allOptionsOfFeature[articleIDMOption.codex] = articleIDMOption;
|
|
19453
19439
|
};
|
|
19454
19440
|
for (var j = 0; j < options.length; j++) {
|
|
19455
19441
|
_loop2();
|
|
@@ -19832,8 +19818,8 @@ function initCatalogPlannerArticleView(catalogData, catPlanArticle, catalogProps
|
|
|
19832
19818
|
});
|
|
19833
19819
|
}
|
|
19834
19820
|
|
|
19835
|
-
function ownKeys$
|
|
19836
|
-
function _objectSpread$
|
|
19821
|
+
function ownKeys$j(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; }
|
|
19822
|
+
function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$j(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19837
19823
|
|
|
19838
19824
|
/*
|
|
19839
19825
|
Diese KLasse enthält Inforamtion zu einem Catalog (C)
|
|
@@ -20872,7 +20858,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
20872
20858
|
}, {
|
|
20873
20859
|
key: "setVariantsPriceByHash",
|
|
20874
20860
|
value: function setVariantsPriceByHash(hash, data) {
|
|
20875
|
-
this.variantsPriceHashObj[hash] = _objectSpread$
|
|
20861
|
+
this.variantsPriceHashObj[hash] = _objectSpread$j(_objectSpread$j({}, data), {}, {
|
|
20876
20862
|
calcTime: -1
|
|
20877
20863
|
});
|
|
20878
20864
|
}
|
|
@@ -21137,12 +21123,12 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
21137
21123
|
break;
|
|
21138
21124
|
case 'SHOW_PRICEPREVIEW_ON_OPTIONS':
|
|
21139
21125
|
_this5.catalogProps.showPricePreviewOnlyOnOptions = item.Value.split(';').map(function (t) {
|
|
21140
|
-
return
|
|
21126
|
+
return t;
|
|
21141
21127
|
});
|
|
21142
21128
|
break;
|
|
21143
21129
|
case 'HIDE_PRICEPREVIEW_ON_OPTIONS':
|
|
21144
21130
|
_this5.catalogProps.hidePricePreviewOnlyOnOptions = item.Value.split(';').map(function (t) {
|
|
21145
|
-
return
|
|
21131
|
+
return t;
|
|
21146
21132
|
});
|
|
21147
21133
|
break;
|
|
21148
21134
|
case 'INIT_OPTIONTREE_TWICE':
|
|
@@ -21371,7 +21357,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
21371
21357
|
var mapMask = function mapMask(mask) {
|
|
21372
21358
|
var _mappedMask$catalog;
|
|
21373
21359
|
if (!mask) return undefined;
|
|
21374
|
-
var mappedMask = _objectSpread$
|
|
21360
|
+
var mappedMask = _objectSpread$j({}, mask);
|
|
21375
21361
|
var mapProperties = function mapProperties(props) {
|
|
21376
21362
|
if (Array.isArray(props)) return props;
|
|
21377
21363
|
var mappedProps = [];
|
|
@@ -21400,8 +21386,8 @@ var mapMask = function mapMask(mask) {
|
|
|
21400
21386
|
return mappedMask;
|
|
21401
21387
|
};
|
|
21402
21388
|
|
|
21403
|
-
function ownKeys$
|
|
21404
|
-
function _objectSpread$
|
|
21389
|
+
function ownKeys$i(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; }
|
|
21390
|
+
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$i(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21405
21391
|
//import IDMCatalogData from '../model/Catalog/IDMCatalogData';
|
|
21406
21392
|
|
|
21407
21393
|
var LOG$h = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
@@ -21619,7 +21605,7 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
|
|
|
21619
21605
|
}
|
|
21620
21606
|
throw new Error('Serie not found: ' + serieNo);
|
|
21621
21607
|
case 11:
|
|
21622
|
-
catalogData = new DivaCatalogData(_objectSpread$
|
|
21608
|
+
catalogData = new DivaCatalogData(_objectSpread$i(_objectSpread$i({}, serieData[0]), {}, {
|
|
21623
21609
|
catalogData: catalogApiData
|
|
21624
21610
|
}), serieNo, orderSet, state.api, itemsList, undefined, true, additionalModelInfos);
|
|
21625
21611
|
return _context4.abrupt("return", catalogData);
|
|
@@ -21666,11 +21652,8 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
|
|
|
21666
21652
|
}();
|
|
21667
21653
|
var catalogHandlerInstance = new DivaCatalogHandler();
|
|
21668
21654
|
|
|
21669
|
-
function ownKeys$
|
|
21670
|
-
function _objectSpread$
|
|
21671
|
-
function _createForOfIteratorHelper$9(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$9(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; } } }; }
|
|
21672
|
-
function _unsupportedIterableToArray$9(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$9(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$9(r, a) : void 0; } }
|
|
21673
|
-
function _arrayLikeToArray$9(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; }
|
|
21655
|
+
function ownKeys$h(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; }
|
|
21656
|
+
function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$h(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21674
21657
|
var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
21675
21658
|
function ArticleOptionStateData(option, getIsConfigSingle, defaultOPV, useIsOptionDefinedWarning) {
|
|
21676
21659
|
_classCallCheck(this, ArticleOptionStateData);
|
|
@@ -21682,9 +21665,9 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
21682
21665
|
name: '',
|
|
21683
21666
|
origName: '',
|
|
21684
21667
|
imageOPVs: {},
|
|
21685
|
-
visibleOPVs:
|
|
21668
|
+
visibleOPVs: {},
|
|
21686
21669
|
visibleOPVKeys: [],
|
|
21687
|
-
visibleOPVsImages:
|
|
21670
|
+
visibleOPVsImages: {},
|
|
21688
21671
|
favoriteOPVs: {},
|
|
21689
21672
|
disabled: false,
|
|
21690
21673
|
doShow: false,
|
|
@@ -21772,44 +21755,23 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
21772
21755
|
return opv.codex;
|
|
21773
21756
|
})) !== null && _this$articleOptionSt !== void 0 ? _this$articleOptionSt : [];
|
|
21774
21757
|
var option = this.option;
|
|
21775
|
-
var
|
|
21776
|
-
|
|
21777
|
-
|
|
21778
|
-
|
|
21779
|
-
var
|
|
21780
|
-
key = _step$value[0],
|
|
21781
|
-
value = _step$value[1];
|
|
21782
|
-
if (value.isOPVG) {
|
|
21758
|
+
for (var key in option.articleOptionValues) {
|
|
21759
|
+
if (option.articleOptionValues[key].isOPVG) {
|
|
21760
|
+
var _option$articleOption;
|
|
21761
|
+
var opg = (_option$articleOption = option.articleOptionValues) === null || _option$articleOption === void 0 ? void 0 : _option$articleOption[key];
|
|
21762
|
+
for (var opvCodex in (_opg$articleOptionVal = opg.articleOptionValues) !== null && _opg$articleOptionVal !== void 0 ? _opg$articleOptionVal : {}) {
|
|
21783
21763
|
var _opg$articleOptionVal;
|
|
21784
|
-
var
|
|
21785
|
-
|
|
21786
|
-
|
|
21787
|
-
try {
|
|
21788
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
21789
|
-
var _step2$value = _slicedToArray(_step2.value, 2),
|
|
21790
|
-
opvCodex = _step2$value[0],
|
|
21791
|
-
opvValue = _step2$value[1];
|
|
21792
|
-
var found = opvKeys.includes(opvCodex);
|
|
21793
|
-
if (found) {
|
|
21794
|
-
values.push(opvValue);
|
|
21795
|
-
}
|
|
21796
|
-
}
|
|
21797
|
-
} catch (err) {
|
|
21798
|
-
_iterator2.e(err);
|
|
21799
|
-
} finally {
|
|
21800
|
-
_iterator2.f();
|
|
21801
|
-
}
|
|
21802
|
-
} else {
|
|
21803
|
-
var _found = opvKeys.includes(key);
|
|
21804
|
-
if (_found) {
|
|
21805
|
-
values.push(value);
|
|
21764
|
+
var found = opvKeys.includes(opvCodex);
|
|
21765
|
+
if (found) {
|
|
21766
|
+
values.push(opg.articleOptionValues[opvCodex]);
|
|
21806
21767
|
}
|
|
21807
21768
|
}
|
|
21769
|
+
} else {
|
|
21770
|
+
var _found = opvKeys.includes(key);
|
|
21771
|
+
if (_found) {
|
|
21772
|
+
values.push(option.articleOptionValues[key]);
|
|
21773
|
+
}
|
|
21808
21774
|
}
|
|
21809
|
-
} catch (err) {
|
|
21810
|
-
_iterator.e(err);
|
|
21811
|
-
} finally {
|
|
21812
|
-
_iterator.f();
|
|
21813
21775
|
}
|
|
21814
21776
|
return values;
|
|
21815
21777
|
}
|
|
@@ -21920,7 +21882,7 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
21920
21882
|
key: "updateVisibleOptionValues",
|
|
21921
21883
|
value: function updateVisibleOptionValues(visibleOPVs) {
|
|
21922
21884
|
this.articleOptionState.visibleOPVs = visibleOPVs;
|
|
21923
|
-
this.articleOptionState.visibleOPVKeys =
|
|
21885
|
+
this.articleOptionState.visibleOPVKeys = Object.keys(visibleOPVs);
|
|
21924
21886
|
}
|
|
21925
21887
|
}, {
|
|
21926
21888
|
key: "visibleOPVKeys",
|
|
@@ -21930,19 +21892,19 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
21930
21892
|
}, {
|
|
21931
21893
|
key: "getVisibleOptionValue",
|
|
21932
21894
|
value: function getVisibleOptionValue(codex) {
|
|
21933
|
-
var searchValues =
|
|
21895
|
+
var searchValues = Object.values(this.visibleOptionValues);
|
|
21934
21896
|
if (this.option.hasOPG) {
|
|
21935
21897
|
var opgs = searchValues;
|
|
21936
21898
|
for (var i = 0; i < opgs.length; i++) {
|
|
21937
|
-
var _opgs$i$articleOption
|
|
21938
|
-
var valuesInOpg =
|
|
21899
|
+
var _opgs$i$articleOption;
|
|
21900
|
+
var valuesInOpg = Object.values((_opgs$i$articleOption = opgs[i].articleOptionValues) !== null && _opgs$i$articleOption !== void 0 ? _opgs$i$articleOption : {});
|
|
21939
21901
|
var found = valuesInOpg.find(function (opv) {
|
|
21940
21902
|
return opv.codex == codex || opv.ocd === codex;
|
|
21941
21903
|
});
|
|
21942
21904
|
if (found) return found;
|
|
21943
21905
|
}
|
|
21944
21906
|
} else {
|
|
21945
|
-
var visibleValues =
|
|
21907
|
+
var visibleValues = Object.values(this.visibleOptionValues);
|
|
21946
21908
|
var _found2 = visibleValues.find(function (opv) {
|
|
21947
21909
|
return opv.codex == codex || opv.ocd === codex;
|
|
21948
21910
|
});
|
|
@@ -21959,9 +21921,9 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
21959
21921
|
key: "editVisibleOPVsImages",
|
|
21960
21922
|
value: function editVisibleOPVsImages(codex, image) {
|
|
21961
21923
|
if (image) {
|
|
21962
|
-
this.visibleOPVsImages
|
|
21924
|
+
this.visibleOPVsImages[codex] = image;
|
|
21963
21925
|
} else {
|
|
21964
|
-
this.visibleOPVsImages[
|
|
21926
|
+
delete this.visibleOPVsImages[codex];
|
|
21965
21927
|
}
|
|
21966
21928
|
}
|
|
21967
21929
|
}, {
|
|
@@ -21972,7 +21934,7 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
21972
21934
|
if (this.option.hasOPG) {
|
|
21973
21935
|
return this.visibleOPVKeys.reduce(function (acc, key) {
|
|
21974
21936
|
var _this$visibleOptionVa, _this$visibleOptionVa2, _this$visibleOptionVa3;
|
|
21975
|
-
return acc + ((_this$visibleOptionVa = _this.visibleOptionValues
|
|
21937
|
+
return acc + ((_this$visibleOptionVa = _this.visibleOptionValues[key]) !== null && _this$visibleOptionVa !== void 0 && _this$visibleOptionVa.isOPVG ? Object.keys((_this$visibleOptionVa2 = (_this$visibleOptionVa3 = _this.visibleOptionValues[key]) === null || _this$visibleOptionVa3 === void 0 ? void 0 : _this$visibleOptionVa3.articleOptionValues) !== null && _this$visibleOptionVa2 !== void 0 ? _this$visibleOptionVa2 : {}).length : 1);
|
|
21976
21938
|
}, 0);
|
|
21977
21939
|
}
|
|
21978
21940
|
return this.visibleOPVKeys.length;
|
|
@@ -22248,23 +22210,13 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
22248
22210
|
get: function get() {
|
|
22249
22211
|
if (!this.option.onlyVisibleIfNotDocked) return undefined;
|
|
22250
22212
|
var ret = {};
|
|
22251
|
-
var
|
|
22252
|
-
|
|
22253
|
-
|
|
22254
|
-
|
|
22255
|
-
|
|
22256
|
-
|
|
22257
|
-
var dockingPoints = (_this$visibleOptionVa4 = this.visibleOptionValues.get(key)) === null || _this$visibleOptionVa4 === void 0 ? void 0 : _this$visibleOptionVa4.onlyVisibleIfNotDocked;
|
|
22258
|
-
if (dockingPoints) {
|
|
22259
|
-
ret[key] = dockingPoints.split(';');
|
|
22260
|
-
} else {
|
|
22261
|
-
ret[key] = [];
|
|
22262
|
-
}
|
|
22213
|
+
for (var key in this.visibleOptionValues) {
|
|
22214
|
+
var dockingPoints = this.visibleOptionValues[key].onlyVisibleIfNotDocked;
|
|
22215
|
+
if (dockingPoints) {
|
|
22216
|
+
ret[key] = dockingPoints.split(';');
|
|
22217
|
+
} else {
|
|
22218
|
+
ret[key] = [];
|
|
22263
22219
|
}
|
|
22264
|
-
} catch (err) {
|
|
22265
|
-
_iterator3.e(err);
|
|
22266
|
-
} finally {
|
|
22267
|
-
_iterator3.f();
|
|
22268
22220
|
}
|
|
22269
22221
|
return Object.entries(ret).length ? ret : undefined;
|
|
22270
22222
|
}
|
|
@@ -22404,17 +22356,19 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
22404
22356
|
key: "cloneOptionState",
|
|
22405
22357
|
value: function cloneOptionState(getIsConfigSingle) {
|
|
22406
22358
|
var clonedOps = new ArticleOptionStateData(this.option, getIsConfigSingle);
|
|
22407
|
-
clonedOps.articleOptionState = _objectSpread$
|
|
22408
|
-
imageOPVs: _objectSpread$
|
|
22409
|
-
visibleOPVs:
|
|
22410
|
-
visibleOPVsImages:
|
|
22411
|
-
favoriteOPVs: _objectSpread$
|
|
22359
|
+
clonedOps.articleOptionState = _objectSpread$h(_objectSpread$h({}, this.articleOptionState), {}, {
|
|
22360
|
+
imageOPVs: _objectSpread$h({}, this.articleOptionState.imageOPVs),
|
|
22361
|
+
visibleOPVs: _objectSpread$h({}, this.articleOptionState.visibleOPVs),
|
|
22362
|
+
visibleOPVsImages: _objectSpread$h({}, this.articleOptionState.visibleOPVsImages),
|
|
22363
|
+
favoriteOPVs: _objectSpread$h({}, this.articleOptionState.favoriteOPVs)
|
|
22412
22364
|
});
|
|
22413
22365
|
return clonedOps;
|
|
22414
22366
|
}
|
|
22415
22367
|
}]);
|
|
22416
22368
|
}();
|
|
22417
22369
|
|
|
22370
|
+
function ownKeys$g(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; }
|
|
22371
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22418
22372
|
function _createForOfIteratorHelper$8(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$8(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; } } }; }
|
|
22419
22373
|
function _unsupportedIterableToArray$8(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$8(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$8(r, a) : void 0; } }
|
|
22420
22374
|
function _arrayLikeToArray$8(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; }
|
|
@@ -22436,7 +22390,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22436
22390
|
var maxPriceOfGroup = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
22437
22391
|
var maxPriceOfGroupCodex = ['', '', '', '', '', '', '', '', '', ''];
|
|
22438
22392
|
var previousVaraintValues = this.article.VariantValues;
|
|
22439
|
-
var _iterator = _createForOfIteratorHelper$8(this.article.articleOptionStates
|
|
22393
|
+
var _iterator = _createForOfIteratorHelper$8(this.article.articleOptionStates),
|
|
22440
22394
|
_step;
|
|
22441
22395
|
try {
|
|
22442
22396
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -22451,79 +22405,48 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22451
22405
|
|
|
22452
22406
|
var foundFirstItem = false;
|
|
22453
22407
|
var setDefaultOPV = ops.defaultOPV;
|
|
22454
|
-
ops.updateVisibleOptionValues(
|
|
22455
|
-
var visibleOptionValues =
|
|
22408
|
+
ops.updateVisibleOptionValues({});
|
|
22409
|
+
var visibleOptionValues = {};
|
|
22456
22410
|
if (myOpt.hasOPG) {
|
|
22457
22411
|
var myOPGs = myOpt.articleOptionValues;
|
|
22458
|
-
var
|
|
22459
|
-
|
|
22460
|
-
|
|
22461
|
-
|
|
22462
|
-
var
|
|
22463
|
-
|
|
22464
|
-
|
|
22465
|
-
|
|
22466
|
-
|
|
22467
|
-
|
|
22468
|
-
|
|
22469
|
-
|
|
22470
|
-
|
|
22471
|
-
|
|
22472
|
-
|
|
22473
|
-
opvCodex = _step3$value[0],
|
|
22474
|
-
tmpOPV = _step3$value[1];
|
|
22475
|
-
if (tmpOPV.hiddenByMask) continue;
|
|
22476
|
-
visibleItems[OP + '#' + opvCodex] = tmpOPV;
|
|
22477
|
-
if (!ops.getConstructionRulesIsDisablingByOPVCodex(opvCodex)) {
|
|
22478
|
-
if (setDefaultOPV && setDefaultOPV == opvCodex) {
|
|
22479
|
-
firstVisibleItem = tmpOPV;
|
|
22480
|
-
foundFirstItem = true;
|
|
22481
|
-
} else if (!foundFirstItem) {
|
|
22482
|
-
firstVisibleItem = tmpOPV;
|
|
22483
|
-
foundFirstItem = true;
|
|
22484
|
-
}
|
|
22485
|
-
}
|
|
22412
|
+
for (var lKey in myOPGs) {
|
|
22413
|
+
var myOPVsInOPG = myOPGs[lKey].articleOptionValues;
|
|
22414
|
+
if (this.checkItemVisibility(myOPGs[lKey], ops) && myOPVsInOPG) {
|
|
22415
|
+
visibleOptionValues[myOPGs[lKey].codex] = myOPGs[lKey];
|
|
22416
|
+
for (var opvCodex in myOPVsInOPG) {
|
|
22417
|
+
var tmpOPV = myOPVsInOPG[opvCodex];
|
|
22418
|
+
if (tmpOPV.hiddenByMask) continue;
|
|
22419
|
+
visibleItems[OP + '#' + opvCodex] = tmpOPV;
|
|
22420
|
+
if (!ops.getConstructionRulesIsDisablingByOPVCodex(opvCodex)) {
|
|
22421
|
+
if (setDefaultOPV && setDefaultOPV == opvCodex) {
|
|
22422
|
+
firstVisibleItem = tmpOPV;
|
|
22423
|
+
foundFirstItem = true;
|
|
22424
|
+
} else if (!foundFirstItem) {
|
|
22425
|
+
firstVisibleItem = tmpOPV;
|
|
22426
|
+
foundFirstItem = true;
|
|
22486
22427
|
}
|
|
22487
|
-
} catch (err) {
|
|
22488
|
-
_iterator3.e(err);
|
|
22489
|
-
} finally {
|
|
22490
|
-
_iterator3.f();
|
|
22491
22428
|
}
|
|
22492
22429
|
}
|
|
22493
22430
|
}
|
|
22494
|
-
} catch (err) {
|
|
22495
|
-
_iterator2.e(err);
|
|
22496
|
-
} finally {
|
|
22497
|
-
_iterator2.f();
|
|
22498
22431
|
}
|
|
22499
22432
|
} else {
|
|
22500
22433
|
var myOPVs = myOpt.articleOptionValues;
|
|
22501
22434
|
if (myOPVs) {
|
|
22502
|
-
var
|
|
22503
|
-
|
|
22504
|
-
|
|
22505
|
-
|
|
22506
|
-
|
|
22507
|
-
|
|
22508
|
-
|
|
22509
|
-
|
|
22510
|
-
|
|
22511
|
-
|
|
22512
|
-
|
|
22513
|
-
|
|
22514
|
-
firstVisibleItem = _tmpOPV;
|
|
22515
|
-
foundFirstItem = true;
|
|
22516
|
-
} else if (!foundFirstItem) {
|
|
22517
|
-
firstVisibleItem = _tmpOPV;
|
|
22518
|
-
foundFirstItem = true;
|
|
22519
|
-
}
|
|
22435
|
+
for (var opvCodex in myOPVs) {
|
|
22436
|
+
var tmpOPV = myOPVs[opvCodex];
|
|
22437
|
+
if (!tmpOPV.hiddenByMask && this.checkItemVisibility(tmpOPV, ops)) {
|
|
22438
|
+
visibleOptionValues[tmpOPV.codex] = tmpOPV;
|
|
22439
|
+
visibleItems[OP + '#' + opvCodex] = tmpOPV;
|
|
22440
|
+
if (!ops.getConstructionRulesIsDisablingByOPVCodex(opvCodex)) {
|
|
22441
|
+
if (setDefaultOPV && setDefaultOPV == opvCodex) {
|
|
22442
|
+
firstVisibleItem = tmpOPV;
|
|
22443
|
+
foundFirstItem = true;
|
|
22444
|
+
} else if (!foundFirstItem) {
|
|
22445
|
+
firstVisibleItem = tmpOPV;
|
|
22446
|
+
foundFirstItem = true;
|
|
22520
22447
|
}
|
|
22521
22448
|
}
|
|
22522
22449
|
}
|
|
22523
|
-
} catch (err) {
|
|
22524
|
-
_iterator4.e(err);
|
|
22525
|
-
} finally {
|
|
22526
|
-
_iterator4.f();
|
|
22527
22450
|
}
|
|
22528
22451
|
}
|
|
22529
22452
|
}
|
|
@@ -22566,7 +22489,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22566
22489
|
if (_ops !== null && _ops !== void 0 && _ops.valCodex) {
|
|
22567
22490
|
var foundItem = _this.article.checkOptionAndOptionValue(_ops.optionCodex, _ops.valCodex);
|
|
22568
22491
|
if ((foundItem === null || foundItem === void 0 ? void 0 : foundItem.opv) instanceof ArticleOptionValueData) {
|
|
22569
|
-
if (_ops.visibleOptionValues
|
|
22492
|
+
if (_ops.visibleOptionValues[foundItem.opv.codex] || _ops.visibleOptionValues[foundItem.opv.parentCodex]) {
|
|
22570
22493
|
myItem = foundItem.opv;
|
|
22571
22494
|
}
|
|
22572
22495
|
}
|
|
@@ -22581,8 +22504,8 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22581
22504
|
//sonst myItem aus default sibling option versuchen zu verwenden
|
|
22582
22505
|
if (myItem == null && ops.option.isDefaultSiblingOption) {
|
|
22583
22506
|
var siblingsPreviousOpv = previousVaraintValues['OPT' + ops.option.isDefaultSiblingOption];
|
|
22584
|
-
if (siblingsPreviousOpv && ops.visibleOptionValues
|
|
22585
|
-
myItem = ops.visibleOptionValues
|
|
22507
|
+
if (siblingsPreviousOpv && ops.visibleOptionValues[siblingsPreviousOpv]) {
|
|
22508
|
+
myItem = ops.visibleOptionValues[siblingsPreviousOpv];
|
|
22586
22509
|
}
|
|
22587
22510
|
}
|
|
22588
22511
|
if (myItem == null && !ops.defaultOPV) {
|
|
@@ -22665,19 +22588,8 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22665
22588
|
//R (Anschlusstyp R) - AVR
|
|
22666
22589
|
var newAVRFilter = [],
|
|
22667
22590
|
visibleOPVs = ops.visibleOptionValues;
|
|
22668
|
-
var
|
|
22669
|
-
|
|
22670
|
-
try {
|
|
22671
|
-
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
22672
|
-
var _step5$value = _slicedToArray(_step5.value, 2),
|
|
22673
|
-
key = _step5$value[0],
|
|
22674
|
-
value = _step5$value[1];
|
|
22675
|
-
newAVRFilter.push(value.codex.substring(3));
|
|
22676
|
-
}
|
|
22677
|
-
} catch (err) {
|
|
22678
|
-
_iterator5.e(err);
|
|
22679
|
-
} finally {
|
|
22680
|
-
_iterator5.f();
|
|
22591
|
+
for (var key in visibleOPVs) {
|
|
22592
|
+
newAVRFilter.push(visibleOPVs[key].codex.substring(3));
|
|
22681
22593
|
}
|
|
22682
22594
|
this.article.newPossibleAVRFilters = newAVRFilter;
|
|
22683
22595
|
}
|
|
@@ -22685,19 +22597,8 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22685
22597
|
//L (Anschlusstyp L) - AVL
|
|
22686
22598
|
var newAVLFilter = [],
|
|
22687
22599
|
_visibleOPVs = ops.visibleOptionValues;
|
|
22688
|
-
var
|
|
22689
|
-
|
|
22690
|
-
try {
|
|
22691
|
-
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
22692
|
-
var _step6$value = _slicedToArray(_step6.value, 2),
|
|
22693
|
-
_key = _step6$value[0],
|
|
22694
|
-
_value = _step6$value[1];
|
|
22695
|
-
newAVLFilter.push(_value.codex.substring(3));
|
|
22696
|
-
}
|
|
22697
|
-
} catch (err) {
|
|
22698
|
-
_iterator6.e(err);
|
|
22699
|
-
} finally {
|
|
22700
|
-
_iterator6.f();
|
|
22600
|
+
for (var key in _visibleOPVs) {
|
|
22601
|
+
newAVLFilter.push(_visibleOPVs[key].codex.substring(3));
|
|
22701
22602
|
}
|
|
22702
22603
|
this.article.newPossibleAVLFilters = newAVLFilter;
|
|
22703
22604
|
}
|
|
@@ -22916,18 +22817,18 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22916
22817
|
myDecisions[i].disableHistory = [];
|
|
22917
22818
|
myDecisions[i].activeCombination = undefined;
|
|
22918
22819
|
}
|
|
22919
|
-
var
|
|
22920
|
-
|
|
22820
|
+
var _iterator2 = _createForOfIteratorHelper$8(this.article.articleOptionStates),
|
|
22821
|
+
_step2;
|
|
22921
22822
|
try {
|
|
22922
|
-
for (
|
|
22923
|
-
var ops =
|
|
22924
|
-
ops.updateVisibleOptionValues(ops.option.articleOptionValues);
|
|
22823
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
22824
|
+
var ops = _step2.value;
|
|
22825
|
+
ops.updateVisibleOptionValues(_objectSpread$g({}, ops.option.articleOptionValues));
|
|
22925
22826
|
ops.definedBySetFeatureFixed = false;
|
|
22926
22827
|
}
|
|
22927
22828
|
} catch (err) {
|
|
22928
|
-
|
|
22829
|
+
_iterator2.e(err);
|
|
22929
22830
|
} finally {
|
|
22930
|
-
|
|
22831
|
+
_iterator2.f();
|
|
22931
22832
|
}
|
|
22932
22833
|
this.decisionDebugStack = [];
|
|
22933
22834
|
var beforeSnapshot = this.article.set.logDecisions ? this.article.snapshot : undefined;
|
|
@@ -23055,18 +22956,18 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23055
22956
|
key: "updateIDMSpecificFeatures",
|
|
23056
22957
|
value: function updateIDMSpecificFeatures() {
|
|
23057
22958
|
//updaten idm planner specific options
|
|
23058
|
-
var
|
|
23059
|
-
|
|
22959
|
+
var _iterator3 = _createForOfIteratorHelper$8(this.article.articleOptionStates),
|
|
22960
|
+
_step3;
|
|
23060
22961
|
try {
|
|
23061
|
-
for (
|
|
23062
|
-
var ops =
|
|
22962
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
22963
|
+
var ops = _step3.value;
|
|
23063
22964
|
//when an option has no decisions the first visible optionValue has to be selected per default
|
|
23064
22965
|
if (ops.val === undefined && ops.visibleCount && !this.article.CatalogData.useDiomexConfigLogic) {
|
|
23065
22966
|
this.assignOptionValue(ops.optionCodex, ops.visibleOPVKeys[0]);
|
|
23066
22967
|
}
|
|
23067
22968
|
if (ops.visibleCount && ops.IsIDMSpecialFeature) {
|
|
23068
22969
|
var _validOpv;
|
|
23069
|
-
var validOpvs =
|
|
22970
|
+
var validOpvs = Object.values(ops.visibleOptionValues);
|
|
23070
22971
|
if (ops.val) validOpvs.unshift(ops.val);
|
|
23071
22972
|
var validOpv = undefined;
|
|
23072
22973
|
for (var i = 0; i < validOpvs.length; i++) {
|
|
@@ -23080,9 +22981,9 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23080
22981
|
}
|
|
23081
22982
|
}
|
|
23082
22983
|
} catch (err) {
|
|
23083
|
-
|
|
22984
|
+
_iterator3.e(err);
|
|
23084
22985
|
} finally {
|
|
23085
|
-
|
|
22986
|
+
_iterator3.f();
|
|
23086
22987
|
}
|
|
23087
22988
|
}
|
|
23088
22989
|
}, {
|
|
@@ -23245,219 +23146,201 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23245
23146
|
}, {
|
|
23246
23147
|
key: "evalType1Decision",
|
|
23247
23148
|
value: function evalType1Decision(myDecision) {
|
|
23248
|
-
var _this2 = this;
|
|
23249
23149
|
var validOPVs = {};
|
|
23250
23150
|
var doAlsoCheckOPTs = [];
|
|
23251
|
-
if (myDecision.Options && myDecision.DOC) {
|
|
23252
|
-
var
|
|
23253
|
-
|
|
23254
|
-
|
|
23255
|
-
|
|
23256
|
-
|
|
23257
|
-
|
|
23258
|
-
//welche Optionen sind auch zu prüfen?
|
|
23151
|
+
if (myDecision.Options && myDecision.DOC) for (var p = 0; p < myDecision.Options.length; p++) {
|
|
23152
|
+
var OPT = myDecision.Options[p];
|
|
23153
|
+
var ops = this.article.getArticleOptionStateFlat(OPT);
|
|
23154
|
+
if (!ops) break;
|
|
23155
|
+
if (!validOPVs[OPT]) validOPVs[OPT] = {};
|
|
23156
|
+
var possibleOPVs = ops.visibleOptionValues;
|
|
23157
|
+
//welche Optionen sind auch zu prüfen?
|
|
23259
23158
|
|
|
23260
|
-
|
|
23261
|
-
|
|
23262
|
-
|
|
23159
|
+
for (var j = 0; j < myDecision.DOC.length; j++) {
|
|
23160
|
+
//DecisionOptionCombination
|
|
23161
|
+
//wenn diese Row mehrere Optionen hat, dann müssen die bisher gesetzten schon übereinstimmen
|
|
23263
23162
|
|
|
23264
|
-
|
|
23265
|
-
|
|
23266
|
-
|
|
23163
|
+
var doUseDoc = true;
|
|
23164
|
+
var myDoc = myDecision.DOC[j];
|
|
23165
|
+
if (doAlsoCheckOPTs.length > 0) {
|
|
23166
|
+
for (var f = 0; f < doAlsoCheckOPTs.length; f++) {
|
|
23267
23167
|
var _myDoc$Row;
|
|
23268
|
-
|
|
23269
|
-
|
|
23270
|
-
|
|
23271
|
-
|
|
23272
|
-
|
|
23273
|
-
|
|
23274
|
-
|
|
23275
|
-
|
|
23276
|
-
|
|
23168
|
+
var checkOptX = doAlsoCheckOPTs[f];
|
|
23169
|
+
var _ops3 = this.article.getArticleOptionState(checkOptX);
|
|
23170
|
+
if (_ops3 && (_myDoc$Row = myDoc.Row) !== null && _myDoc$Row !== void 0 && _myDoc$Row[checkOptX] && _ops3.valCodex && !myDoc.Row[checkOptX].includes(_ops3.valCodex)) {
|
|
23171
|
+
if (!myDoc.Row[checkOptX].find(function (o) {
|
|
23172
|
+
return !o.startsWith('!');
|
|
23173
|
+
})) {
|
|
23174
|
+
//all is inverted
|
|
23175
|
+
if (myDoc.Row[checkOptX].includes('!' + _ops3.valCodex)) {
|
|
23176
|
+
doUseDoc = false;
|
|
23177
|
+
break;
|
|
23178
|
+
}
|
|
23179
|
+
} else {
|
|
23180
|
+
doUseDoc = false;
|
|
23181
|
+
break;
|
|
23182
|
+
}
|
|
23183
|
+
}
|
|
23184
|
+
}
|
|
23185
|
+
}
|
|
23186
|
+
if (doUseDoc) {
|
|
23187
|
+
var _myDoc$Row2;
|
|
23188
|
+
myDecision.activeCombination = j;
|
|
23189
|
+
if ((_myDoc$Row2 = myDoc.Row) !== null && _myDoc$Row2 !== void 0 && _myDoc$Row2[OPT]) {
|
|
23190
|
+
var ruleWasValidOnce = false;
|
|
23191
|
+
for (var m = 0; m < myDoc.Row[OPT].length; m++) {
|
|
23192
|
+
var opvCodex = myDoc.Row[OPT][m];
|
|
23193
|
+
if (opvCodex.startsWith('!')) {
|
|
23194
|
+
//this should only delete the value when all the following options match the values
|
|
23195
|
+
//https://app.asana.com/0/search?q=nin&child=1203078926793962
|
|
23196
|
+
//https://app.asana.com/0/1203759050701666/1203780404115819
|
|
23197
|
+
|
|
23198
|
+
var ruleValid = true;
|
|
23199
|
+
var _loop2 = function _loop2() {
|
|
23200
|
+
if (key === OPT) return 0; // continue
|
|
23277
23201
|
|
|
23278
|
-
|
|
23279
|
-
|
|
23280
|
-
if (key === OPT) continue;
|
|
23202
|
+
// Cache the row values array
|
|
23203
|
+
var rowValues = myDoc.Row[key];
|
|
23281
23204
|
|
|
23282
|
-
//
|
|
23283
|
-
var
|
|
23284
|
-
|
|
23285
|
-
return ops.visibleOptionValues.has(v);
|
|
23205
|
+
// Use some() to break early when match found
|
|
23206
|
+
var hasMatch = ops.visibleOPVKeys.some(function (opv) {
|
|
23207
|
+
return rowValues.includes(opv);
|
|
23286
23208
|
});
|
|
23287
23209
|
if (!hasMatch) {
|
|
23288
23210
|
ruleValid = false;
|
|
23289
|
-
break
|
|
23211
|
+
return 1; // break
|
|
23290
23212
|
}
|
|
23291
|
-
}
|
|
23292
|
-
|
|
23293
|
-
|
|
23294
|
-
|
|
23295
|
-
|
|
23296
|
-
|
|
23297
|
-
|
|
23298
|
-
|
|
23213
|
+
},
|
|
23214
|
+
_ret;
|
|
23215
|
+
for (var key in myDoc.Row) {
|
|
23216
|
+
_ret = _loop2();
|
|
23217
|
+
if (_ret === 0) continue;
|
|
23218
|
+
if (_ret === 1) break;
|
|
23219
|
+
}
|
|
23220
|
+
if (ruleValid) {
|
|
23299
23221
|
ruleWasValidOnce = true;
|
|
23300
|
-
|
|
23301
|
-
|
|
23222
|
+
if (m == 0) validOPVs[OPT] = _objectSpread$g({}, possibleOPVs);
|
|
23223
|
+
opvCodex = opvCodex.slice(1);
|
|
23224
|
+
if (possibleOPVs[opvCodex] != null) delete validOPVs[OPT][opvCodex];
|
|
23302
23225
|
}
|
|
23226
|
+
} else {
|
|
23227
|
+
ruleWasValidOnce = true;
|
|
23228
|
+
if (possibleOPVs[opvCodex] != null) validOPVs[OPT][opvCodex] = possibleOPVs[opvCodex];
|
|
23303
23229
|
}
|
|
23304
|
-
|
|
23305
|
-
|
|
23306
|
-
|
|
23307
|
-
|
|
23308
|
-
|
|
23309
|
-
|
|
23310
|
-
|
|
23311
|
-
_step9;
|
|
23312
|
-
try {
|
|
23313
|
-
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
23314
|
-
var _step9$value = _slicedToArray(_step9.value, 2),
|
|
23315
|
-
opvKey = _step9$value[0],
|
|
23316
|
-
_opv = _step9$value[1];
|
|
23317
|
-
if (!negatedValues.has(opvKey)) {
|
|
23318
|
-
validOPVs[OPT].set(opvKey, _opv);
|
|
23319
|
-
}
|
|
23320
|
-
}
|
|
23321
|
-
} catch (err) {
|
|
23322
|
-
_iterator9.e(err);
|
|
23323
|
-
} finally {
|
|
23324
|
-
_iterator9.f();
|
|
23325
|
-
}
|
|
23326
|
-
} else {
|
|
23327
|
-
validOPVs[OPT] = new Map(ops.visibleOptionValues);
|
|
23230
|
+
}
|
|
23231
|
+
if (!ruleWasValidOnce) {
|
|
23232
|
+
//add the rest
|
|
23233
|
+
if (myDoc.Row[OPT][0].includes('!')) {
|
|
23234
|
+
for (var opv in ops.visibleOptionValues) {
|
|
23235
|
+
var doesNotExists = myDoc.Row[OPT].includes('!' + opv);
|
|
23236
|
+
if (!doesNotExists) validOPVs[OPT][opv] = ops.visibleOptionValues[opv];
|
|
23328
23237
|
}
|
|
23238
|
+
} else {
|
|
23239
|
+
validOPVs[OPT] = Object.assign({}, ops.visibleOptionValues);
|
|
23329
23240
|
}
|
|
23330
|
-
} else {
|
|
23331
|
-
validOPVs[OPT] = possibleOPVs;
|
|
23332
23241
|
}
|
|
23333
|
-
}
|
|
23334
|
-
}
|
|
23335
|
-
var schnittmenge = new Map(Array.from(possibleOPVs).filter(function (_ref2) {
|
|
23336
|
-
var _ref3 = _slicedToArray(_ref2, 1),
|
|
23337
|
-
key = _ref3[0];
|
|
23338
|
-
return validOPVs[OPT].has(key);
|
|
23339
|
-
}));
|
|
23340
|
-
ops.updateVisibleOptionValues(new Map(schnittmenge));
|
|
23341
|
-
var valCodex = ops.valCodex;
|
|
23342
|
-
if ((!valCodex || !schnittmenge.get(valCodex)) && ops.visibleOPVKeys.length > 0) {
|
|
23343
|
-
if (_this2.article.CatalogData.useDiomexConfigLogic) {
|
|
23344
|
-
_this2.clearOP(OPT, true);
|
|
23345
23242
|
} else {
|
|
23346
|
-
|
|
23243
|
+
validOPVs[OPT] = possibleOPVs;
|
|
23347
23244
|
}
|
|
23348
23245
|
}
|
|
23349
|
-
doAlsoCheckOPTs.push(OPT);
|
|
23350
|
-
//Hier führende Optionen prüfen
|
|
23351
|
-
};
|
|
23352
|
-
for (var p = 0; p < myDecision.Options.length; p++) {
|
|
23353
|
-
if (_loop2()) break;
|
|
23354
23246
|
}
|
|
23355
|
-
|
|
23356
|
-
|
|
23357
|
-
|
|
23358
|
-
|
|
23359
|
-
|
|
23360
|
-
|
|
23361
|
-
|
|
23362
|
-
var
|
|
23363
|
-
|
|
23364
|
-
|
|
23365
|
-
|
|
23366
|
-
if (!myDoc.Row[checkOptX].find(function (o) {
|
|
23367
|
-
return !o.startsWith('!');
|
|
23368
|
-
})) {
|
|
23369
|
-
//all is inverted
|
|
23370
|
-
if (myDoc.Row[checkOptX].includes('!' + ops.valCodex)) {
|
|
23371
|
-
return false;
|
|
23372
|
-
}
|
|
23247
|
+
var schnittmenge = {};
|
|
23248
|
+
for (var _key in possibleOPVs) {
|
|
23249
|
+
if (validOPVs[OPT][_key]) {
|
|
23250
|
+
schnittmenge[_key] = possibleOPVs[_key];
|
|
23251
|
+
}
|
|
23252
|
+
}
|
|
23253
|
+
ops.updateVisibleOptionValues(_objectSpread$g({}, schnittmenge));
|
|
23254
|
+
var valCodex = ops.valCodex;
|
|
23255
|
+
if ((!valCodex || !schnittmenge[valCodex]) && ops.visibleOPVKeys.length > 0) {
|
|
23256
|
+
if (this.article.CatalogData.useDiomexConfigLogic) {
|
|
23257
|
+
this.clearOP(OPT, true);
|
|
23373
23258
|
} else {
|
|
23374
|
-
|
|
23259
|
+
this.updateArtOPV(this.article.getDefaultOpv(schnittmenge), OPT, ops, undefined);
|
|
23375
23260
|
}
|
|
23376
23261
|
}
|
|
23262
|
+
doAlsoCheckOPTs.push(OPT);
|
|
23263
|
+
//Hier führende Optionen prüfen
|
|
23377
23264
|
}
|
|
23378
|
-
return true;
|
|
23379
23265
|
}
|
|
23380
23266
|
}, {
|
|
23381
23267
|
key: "evalType0Decision",
|
|
23382
23268
|
value: function evalType0Decision(myDecision) {
|
|
23383
|
-
var _this3 = this;
|
|
23384
23269
|
var invalidOPVs = {},
|
|
23385
23270
|
doAlsoCheckOPTs = [];
|
|
23386
|
-
if (myDecision.Options && myDecision.Options.length > 1 && myDecision.DOC) {
|
|
23387
|
-
var
|
|
23388
|
-
|
|
23389
|
-
|
|
23390
|
-
|
|
23391
|
-
|
|
23392
|
-
|
|
23393
|
-
|
|
23394
|
-
|
|
23395
|
-
|
|
23396
|
-
|
|
23397
|
-
|
|
23398
|
-
|
|
23399
|
-
|
|
23400
|
-
|
|
23401
|
-
|
|
23402
|
-
|
|
23403
|
-
|
|
23404
|
-
|
|
23405
|
-
|
|
23406
|
-
|
|
23407
|
-
|
|
23408
|
-
|
|
23409
|
-
break;
|
|
23410
|
-
}
|
|
23271
|
+
if (myDecision.Options && myDecision.Options.length > 1 && myDecision.DOC) for (var p = 0; p < myDecision.Options.length; p++) {
|
|
23272
|
+
var OPT = myDecision.Options[p];
|
|
23273
|
+
var ops = this.article.getArticleOptionStateFlat(OPT);
|
|
23274
|
+
if (!ops) break;
|
|
23275
|
+
if (!invalidOPVs[OPT]) invalidOPVs[OPT] = {};
|
|
23276
|
+
var possibleOPVs = ops.visibleOptionValues;
|
|
23277
|
+
//Erste Option ist immer eine Bedingung!
|
|
23278
|
+
if (p === myDecision.Options.length - 1 && myDecision.DOC) {
|
|
23279
|
+
for (var j = 0; j < myDecision.DOC.length; j++) {
|
|
23280
|
+
//DecisionOptionCombination
|
|
23281
|
+
//wenn diese Row mehrere Optionen hat, dann müssen die bisher gesetzten schon übereinstimmen
|
|
23282
|
+
// z.B. bei OPT2 muss OPT1 stimmen
|
|
23283
|
+
// und bei OPT3 muss OPT1 und OPT2 stimmen
|
|
23284
|
+
var doUseDoc = true,
|
|
23285
|
+
myDoc = myDecision.DOC[j];
|
|
23286
|
+
if (doAlsoCheckOPTs.length > 0) {
|
|
23287
|
+
for (var f = 0; f < doAlsoCheckOPTs.length; f++) {
|
|
23288
|
+
var _myDoc$Row3;
|
|
23289
|
+
var checkOptX = doAlsoCheckOPTs[f];
|
|
23290
|
+
var _ops4 = this.article.getArticleOptionState(checkOptX);
|
|
23291
|
+
if (_ops4 && (_myDoc$Row3 = myDoc.Row) !== null && _myDoc$Row3 !== void 0 && _myDoc$Row3[checkOptX] && _ops4.valCodex && !myDoc.Row[checkOptX].includes(_ops4.valCodex)) {
|
|
23292
|
+
doUseDoc = false;
|
|
23293
|
+
break;
|
|
23411
23294
|
}
|
|
23412
23295
|
}
|
|
23413
|
-
|
|
23414
|
-
|
|
23415
|
-
|
|
23416
|
-
|
|
23417
|
-
|
|
23418
|
-
|
|
23419
|
-
|
|
23420
|
-
|
|
23421
|
-
|
|
23296
|
+
}
|
|
23297
|
+
if (doUseDoc && myDoc.Row) {
|
|
23298
|
+
myDecision.activeCombination = j;
|
|
23299
|
+
if (myDoc.Row[OPT]) {
|
|
23300
|
+
for (var m = 0; m < myDoc.Row[OPT].length; m++) {
|
|
23301
|
+
var opvCodex = myDoc.Row[OPT][m];
|
|
23302
|
+
var myOPVData = possibleOPVs[opvCodex];
|
|
23303
|
+
if (myOPVData != null) {
|
|
23304
|
+
invalidOPVs[OPT][opvCodex] = myOPVData; //wenn es eine DecisionType 0 ist muss ich diese OPV von den gültigen entfernen
|
|
23422
23305
|
}
|
|
23423
23306
|
}
|
|
23424
23307
|
}
|
|
23425
23308
|
}
|
|
23426
|
-
|
|
23427
|
-
|
|
23428
|
-
|
|
23429
|
-
|
|
23430
|
-
|
|
23431
|
-
ops.updateVisibleOptionValues(schnittmenge);
|
|
23432
|
-
var valCodex = ops.valCodex;
|
|
23433
|
-
if ((!valCodex || !schnittmenge.get(valCodex)) && ops.visibleOPVKeys.length > 0) {
|
|
23434
|
-
if (_this3.article.CatalogData.useDiomexConfigLogic) {
|
|
23435
|
-
_this3.clearOP(OPT, true);
|
|
23436
|
-
} else {
|
|
23437
|
-
_this3.updateArtOPV(_this3.article.getDefaultOpv(schnittmenge), OPT, ops, undefined);
|
|
23438
|
-
}
|
|
23309
|
+
}
|
|
23310
|
+
var schnittmenge = {};
|
|
23311
|
+
for (var key in possibleOPVs) {
|
|
23312
|
+
if (!invalidOPVs[OPT][key]) {
|
|
23313
|
+
schnittmenge[key] = possibleOPVs[key];
|
|
23439
23314
|
}
|
|
23440
|
-
} else if (p < myDecision.Options.length - 1) {
|
|
23441
|
-
doAlsoCheckOPTs.push(OPT);
|
|
23442
23315
|
}
|
|
23443
|
-
|
|
23444
|
-
|
|
23445
|
-
|
|
23316
|
+
// someDecisionExistsForOption = true;
|
|
23317
|
+
|
|
23318
|
+
ops.updateVisibleOptionValues(_objectSpread$g({}, schnittmenge));
|
|
23319
|
+
var valCodex = ops.valCodex;
|
|
23320
|
+
if ((!valCodex || !schnittmenge[valCodex]) && ops.visibleOPVKeys.length > 0) {
|
|
23321
|
+
if (this.article.CatalogData.useDiomexConfigLogic) {
|
|
23322
|
+
this.clearOP(OPT, true);
|
|
23323
|
+
} else {
|
|
23324
|
+
this.updateArtOPV(this.article.getDefaultOpv(schnittmenge), OPT, ops, undefined);
|
|
23325
|
+
}
|
|
23326
|
+
}
|
|
23327
|
+
} else if (p < myDecision.Options.length - 1) {
|
|
23328
|
+
doAlsoCheckOPTs.push(OPT);
|
|
23446
23329
|
}
|
|
23447
23330
|
}
|
|
23448
23331
|
}
|
|
23449
23332
|
}, {
|
|
23450
23333
|
key: "evalShowOnlyWhenHasPrice",
|
|
23451
23334
|
value: function evalShowOnlyWhenHasPrice() {
|
|
23452
|
-
var
|
|
23453
|
-
|
|
23335
|
+
var _iterator4 = _createForOfIteratorHelper$8(this.article.articleOptionStates),
|
|
23336
|
+
_step4;
|
|
23454
23337
|
try {
|
|
23455
|
-
for (
|
|
23456
|
-
var ops =
|
|
23338
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
23339
|
+
var ops = _step4.value;
|
|
23457
23340
|
for (var jKey in ops.visibleOptionValues) {
|
|
23458
|
-
var opv = ops.visibleOptionValues
|
|
23341
|
+
var opv = ops.visibleOptionValues[jKey];
|
|
23459
23342
|
if (opv.showOnlyWhenHasPrice && opv.price == 0) {
|
|
23460
|
-
ops.visibleOptionValues[
|
|
23343
|
+
delete ops.visibleOptionValues[opv.codex];
|
|
23461
23344
|
if (ops.valCodex === opv.codex) {
|
|
23462
23345
|
this.assignOptionValue(ops.optionCodex, ops.visibleOPVKeys[0]);
|
|
23463
23346
|
}
|
|
@@ -23465,9 +23348,9 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23465
23348
|
}
|
|
23466
23349
|
}
|
|
23467
23350
|
} catch (err) {
|
|
23468
|
-
|
|
23351
|
+
_iterator4.e(err);
|
|
23469
23352
|
} finally {
|
|
23470
|
-
|
|
23353
|
+
_iterator4.f();
|
|
23471
23354
|
}
|
|
23472
23355
|
}
|
|
23473
23356
|
|
|
@@ -23582,8 +23465,8 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23582
23465
|
firstItem = null;
|
|
23583
23466
|
if (this.article.getArticleOptionState(checkOPT)) {
|
|
23584
23467
|
var ops = this.article.getArticleOptionState(checkOPT);
|
|
23585
|
-
firstItem = ops === null || ops === void 0 ? void 0 : ops.visibleOptionValues
|
|
23586
|
-
if (checkOPV && ops !== null && ops !== void 0 && ops.visibleOptionValues
|
|
23468
|
+
firstItem = ops === null || ops === void 0 ? void 0 : ops.visibleOptionValues[ops.visibleOPVKeys[0]]; //hole ersten eintrag für aus den Dictionary
|
|
23469
|
+
if (checkOPV && ops !== null && ops !== void 0 && ops.visibleOptionValues[checkOPV]) foundItem = ops.visibleOptionValues[checkOPV];
|
|
23587
23470
|
}
|
|
23588
23471
|
return {
|
|
23589
23472
|
foundItem: foundItem,
|
|
@@ -23709,20 +23592,20 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23709
23592
|
key: "addPartilstToPartlistArticlesToLoad",
|
|
23710
23593
|
value: function addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues, myDecisionVal, groupDecisionVal, decisionNumber) {
|
|
23711
23594
|
var _myPartListPos$Option,
|
|
23712
|
-
|
|
23595
|
+
_this2 = this;
|
|
23713
23596
|
var allDecisions = this.article.catalogArticle.articleDecisions;
|
|
23714
23597
|
var decisions = myPartListPos.PartListPosDecisionsAndPosCounts;
|
|
23715
23598
|
var optionsForPrint = (_myPartListPos$Option = myPartListPos.OptionsForPrint) === null || _myPartListPos$Option === void 0 ? void 0 : _myPartListPos$Option.split(';');
|
|
23716
23599
|
var optionImgForPrint = myPartListPos.OptionImgForPrint ? 'OPT' + myPartListPos.OptionImgForPrint : undefined;
|
|
23717
|
-
var
|
|
23600
|
+
var _loop3 = function _loop3() {
|
|
23718
23601
|
var myRuleDesc = '';
|
|
23719
23602
|
var myRuleDesc_locales = undefined;
|
|
23720
23603
|
var articleCodex = myPartListPos.ItemRefArticles[d].ArticleCodex;
|
|
23721
23604
|
var catalogCodex = myPartListPos.ItemRefArticles[d].CatalogCodex;
|
|
23722
23605
|
var retailArticleNr = myPartListPos.RetailArticleNr && myPartListPos.RetailArticleNr != '' ? myPartListPos.RetailArticleNr : undefined;
|
|
23723
|
-
if (myDecisionVal && (myDecisionVal.Rule && myDecisionVal.Rule != '' &&
|
|
23724
|
-
myRuleDesc = DivaUtils.getRuleDescription(myDecisionVal.Rule,
|
|
23725
|
-
myRuleDesc_locales = DivaUtils.getRuleDescription_locales(myDecisionVal.Rule,
|
|
23606
|
+
if (myDecisionVal && (myDecisionVal.Rule && myDecisionVal.Rule != '' && _this2.article.CatalogData.doUseRuleDescForPartListArticles() || myPartListPos.RetailArticleNr == 'CUST')) {
|
|
23607
|
+
myRuleDesc = DivaUtils.getRuleDescription(myDecisionVal.Rule, _this2.article.articleOptionStates, _this2.article.set.api.ruleDescSeperator());
|
|
23608
|
+
myRuleDesc_locales = DivaUtils.getRuleDescription_locales(myDecisionVal.Rule, _this2.article.articleOptionStates, _this2.article.set.api.ruleDescSeperator());
|
|
23726
23609
|
}
|
|
23727
23610
|
var initDecisions = decisions.filter(function (decision) {
|
|
23728
23611
|
return decision.RelationType !== 'PosCount';
|
|
@@ -23732,7 +23615,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23732
23615
|
});
|
|
23733
23616
|
});
|
|
23734
23617
|
var quanitity = 1;
|
|
23735
|
-
if (
|
|
23618
|
+
if (_this2.article.CatalogData.useDecisionPosCountValue) {
|
|
23736
23619
|
var _decision$DOC;
|
|
23737
23620
|
// get SetPosCountValue from decsion action if defined and else use myPartListPos.PosCountValue;
|
|
23738
23621
|
var decision = decisionNumber ? allDecisions.find(function (d) {
|
|
@@ -23747,13 +23630,13 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23747
23630
|
return a.SetPosCountValue !== undefined;
|
|
23748
23631
|
})) === null || _decision$DOC === void 0 ? void 0 : _decision$DOC.SetPosCountValue;
|
|
23749
23632
|
quanitity = setPosCountValue !== undefined ? setPosCountValue : myPartListPos.PosCountValue;
|
|
23750
|
-
} else if (
|
|
23633
|
+
} else if (_this2.article.CatalogData.usePosCountValue) {
|
|
23751
23634
|
quanitity = myPartListPos.PosCountValue;
|
|
23752
23635
|
}
|
|
23753
|
-
quanitity = quanitity *
|
|
23754
|
-
var previousPartlistArticle =
|
|
23636
|
+
quanitity = quanitity * _this2.article.quantity;
|
|
23637
|
+
var previousPartlistArticle = _this2.article.getPreviousPartlistArticle(articleCodex);
|
|
23755
23638
|
var initDecisionsFiltered = [];
|
|
23756
|
-
var
|
|
23639
|
+
var _loop4 = function _loop4(i) {
|
|
23757
23640
|
if (initDecisions[i] && !initDecisionsFiltered.find(function (d) {
|
|
23758
23641
|
return d.Number == initDecisions[i].Number;
|
|
23759
23642
|
})) {
|
|
@@ -23761,18 +23644,18 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23761
23644
|
}
|
|
23762
23645
|
};
|
|
23763
23646
|
for (var i = 0; i < initDecisions.length; i++) {
|
|
23764
|
-
|
|
23647
|
+
_loop4(i);
|
|
23765
23648
|
}
|
|
23766
23649
|
if (quanitity >= 1) {
|
|
23767
23650
|
var _myDecisionVal$Rule;
|
|
23768
23651
|
partlistArticlesToLoad.push({
|
|
23769
|
-
CatalogCodex: catalogCodex !== null && catalogCodex !== void 0 ? catalogCodex :
|
|
23652
|
+
CatalogCodex: catalogCodex !== null && catalogCodex !== void 0 ? catalogCodex : _this2.article.catalogCodex,
|
|
23770
23653
|
BasketID: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.basketId,
|
|
23771
23654
|
ArticleCodex: articleCodex,
|
|
23772
23655
|
RetailArticleNr: retailArticleNr,
|
|
23773
23656
|
RetailPrefix: myPartListPos.RetailPrefix,
|
|
23774
23657
|
Quantity: quanitity,
|
|
23775
|
-
PartlistRule: (groupDecisionVal ? groupDecisionVal.Rule + ' && ' : '') + myDecisionVal ? DivaUtils.getOptionValuePairsByRule((_myDecisionVal$Rule = myDecisionVal === null || myDecisionVal === void 0 ? void 0 : myDecisionVal.Rule) !== null && _myDecisionVal$Rule !== void 0 ? _myDecisionVal$Rule : '',
|
|
23658
|
+
PartlistRule: (groupDecisionVal ? groupDecisionVal.Rule + ' && ' : '') + myDecisionVal ? DivaUtils.getOptionValuePairsByRule((_myDecisionVal$Rule = myDecisionVal === null || myDecisionVal === void 0 ? void 0 : myDecisionVal.Rule) !== null && _myDecisionVal$Rule !== void 0 ? _myDecisionVal$Rule : '', _this2.article.VariantValues) : undefined,
|
|
23776
23659
|
partlistDecisionNo: decisionNumber,
|
|
23777
23660
|
SupplierOrderCodex: myPartListPos.SupplierOrderCodex,
|
|
23778
23661
|
initDecisions: initDecisionsFiltered,
|
|
@@ -23781,7 +23664,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23781
23664
|
RuleDesc_locales: myRuleDesc_locales,
|
|
23782
23665
|
PosInvisibility: myPartListPos.PosInvisibility,
|
|
23783
23666
|
ConfigurationMode: myPartListPos.ConfigurationMode,
|
|
23784
|
-
VariantValues:
|
|
23667
|
+
VariantValues: _this2.article.variantValuesForPla(myPartListPos.ConfigurationMode, previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantValues, newConfigValues),
|
|
23785
23668
|
VariantItemData: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantItemData,
|
|
23786
23669
|
optionImgForPrint: optionImgForPrint,
|
|
23787
23670
|
optionsForPrint: optionsForPrint
|
|
@@ -23790,7 +23673,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23790
23673
|
}
|
|
23791
23674
|
};
|
|
23792
23675
|
for (var d = 0; d < myPartListPos.ItemRefArticles.length; d++) {
|
|
23793
|
-
|
|
23676
|
+
_loop3();
|
|
23794
23677
|
}
|
|
23795
23678
|
return partlistArticlesToLoad;
|
|
23796
23679
|
}
|
|
@@ -23829,7 +23712,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23829
23712
|
}, {
|
|
23830
23713
|
key: "calcConfigPrice",
|
|
23831
23714
|
value: function calcConfigPrice(maxPriceOfGroupCodex, digits) {
|
|
23832
|
-
var
|
|
23715
|
+
var _this3 = this,
|
|
23833
23716
|
_this$article$catalog4;
|
|
23834
23717
|
//Wenn im Planer für dieses Shape mehere Rules gibt, müssen wir diese jetzt prüfen, ob jetzt ein anderes shape gültig ist.
|
|
23835
23718
|
//wenn ja, hier neues shape übergeben
|
|
@@ -23862,12 +23745,12 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23862
23745
|
}
|
|
23863
23746
|
|
|
23864
23747
|
//mengen und größenabhängige Preisberechungn.
|
|
23865
|
-
var
|
|
23866
|
-
|
|
23748
|
+
var _iterator5 = _createForOfIteratorHelper$8(this.article.articleOptionStates),
|
|
23749
|
+
_step5;
|
|
23867
23750
|
try {
|
|
23868
|
-
for (
|
|
23751
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
23869
23752
|
var _ops$addToMeasure;
|
|
23870
|
-
var ops =
|
|
23753
|
+
var ops = _step5.value;
|
|
23871
23754
|
var OP = ops.optionCodex;
|
|
23872
23755
|
var mUnit = ops.measureUnit;
|
|
23873
23756
|
var pUnit = ops.priceUnit;
|
|
@@ -23950,61 +23833,61 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23950
23833
|
}
|
|
23951
23834
|
//jetzt nochmal prozentuelle Preise mit TargetOption berechnen
|
|
23952
23835
|
} catch (err) {
|
|
23953
|
-
|
|
23836
|
+
_iterator5.e(err);
|
|
23954
23837
|
} finally {
|
|
23955
|
-
|
|
23838
|
+
_iterator5.f();
|
|
23956
23839
|
}
|
|
23957
|
-
var
|
|
23958
|
-
|
|
23840
|
+
var _iterator6 = _createForOfIteratorHelper$8(this.article.articleOptionStates),
|
|
23841
|
+
_step6;
|
|
23959
23842
|
try {
|
|
23960
|
-
for (
|
|
23961
|
-
var
|
|
23962
|
-
var targetPPGPrefixes =
|
|
23843
|
+
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
23844
|
+
var _ops5 = _step6.value;
|
|
23845
|
+
var targetPPGPrefixes = _ops5.targetPPGPrefixes;
|
|
23963
23846
|
if (!targetPPGPrefixes) continue;
|
|
23964
|
-
var
|
|
23847
|
+
var _loop6 = function _loop6() {
|
|
23965
23848
|
var targetPrefix = targetPPGPrefixes[_i6];
|
|
23966
|
-
var priceRef =
|
|
23849
|
+
var priceRef = _this3.article.priceRefs.find(function (item) {
|
|
23967
23850
|
var _item$PPG;
|
|
23968
23851
|
return ((_item$PPG = item.PPG) === null || _item$PPG === void 0 ? void 0 : _item$PPG.split('_')[0]) == targetPrefix;
|
|
23969
23852
|
});
|
|
23970
23853
|
if (priceRef) {
|
|
23971
|
-
if (
|
|
23972
|
-
priceRef.calcPrice = priceRef.Price * (1 +
|
|
23854
|
+
if (_ops5.isPercentage) {
|
|
23855
|
+
priceRef.calcPrice = priceRef.Price * (1 + _ops5.calcPrice);
|
|
23973
23856
|
}
|
|
23974
23857
|
}
|
|
23975
23858
|
};
|
|
23976
23859
|
for (var _i6 = 0; _i6 < targetPPGPrefixes.length; _i6++) {
|
|
23977
|
-
|
|
23860
|
+
_loop6();
|
|
23978
23861
|
}
|
|
23979
23862
|
}
|
|
23980
23863
|
} catch (err) {
|
|
23981
|
-
|
|
23864
|
+
_iterator6.e(err);
|
|
23982
23865
|
} finally {
|
|
23983
|
-
|
|
23866
|
+
_iterator6.f();
|
|
23984
23867
|
}
|
|
23985
23868
|
for (var _i3 = 0; _i3 < this.article.priceRefs.length; _i3++) {
|
|
23986
23869
|
var basePriceRef = this.article.priceRefs[_i3];
|
|
23987
23870
|
if (!basePriceRef.TargetPPGPrefixes) continue;
|
|
23988
|
-
var
|
|
23871
|
+
var _loop5 = function _loop5() {
|
|
23989
23872
|
var targetPrefix = basePriceRef.TargetPPGPrefixes[_j];
|
|
23990
23873
|
var myArtOpv;
|
|
23991
|
-
var priceRef =
|
|
23874
|
+
var priceRef = _this3.article.priceRefs.find(function (item) {
|
|
23992
23875
|
return item.PPG && item.PPG.split('_')[0] == targetPrefix;
|
|
23993
23876
|
});
|
|
23994
23877
|
if (!priceRef) {
|
|
23995
|
-
var
|
|
23996
|
-
|
|
23878
|
+
var _iterator7 = _createForOfIteratorHelper$8(_this3.article.articleOptionStates),
|
|
23879
|
+
_step7;
|
|
23997
23880
|
try {
|
|
23998
|
-
for (
|
|
23999
|
-
var ops =
|
|
23881
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
|
23882
|
+
var ops = _step7.value;
|
|
24000
23883
|
if (ops.ppg && ops.ppg.split('_')[0] == targetPrefix) {
|
|
24001
23884
|
myArtOpv = ops;
|
|
24002
23885
|
}
|
|
24003
23886
|
}
|
|
24004
23887
|
} catch (err) {
|
|
24005
|
-
|
|
23888
|
+
_iterator7.e(err);
|
|
24006
23889
|
} finally {
|
|
24007
|
-
|
|
23890
|
+
_iterator7.f();
|
|
24008
23891
|
}
|
|
24009
23892
|
}
|
|
24010
23893
|
|
|
@@ -24020,7 +23903,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24020
23903
|
}
|
|
24021
23904
|
};
|
|
24022
23905
|
for (var _j = 0; _j < basePriceRef.TargetPPGPrefixes.length; _j++) {
|
|
24023
|
-
|
|
23906
|
+
_loop5();
|
|
24024
23907
|
}
|
|
24025
23908
|
}
|
|
24026
23909
|
for (var _i4 = 0; _i4 < this.article.priceRefs.length; _i4++) {
|
|
@@ -24030,36 +23913,36 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24030
23913
|
myArticleBasePrice += priceRef.Price ? DivaUtils.decimalAdjust('round', (_priceRef$calcPrice = priceRef.calcPrice) !== null && _priceRef$calcPrice !== void 0 ? _priceRef$calcPrice : priceRef.Price, digits) : 0.0;
|
|
24031
23914
|
}
|
|
24032
23915
|
var articleUsedCalcPrice = myArticleBasePrice;
|
|
24033
|
-
var
|
|
24034
|
-
|
|
23916
|
+
var _iterator8 = _createForOfIteratorHelper$8(this.article.articleOptionStates),
|
|
23917
|
+
_step8;
|
|
24035
23918
|
try {
|
|
24036
|
-
for (
|
|
24037
|
-
var tmpOps =
|
|
23919
|
+
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
23920
|
+
var tmpOps = _step8.value;
|
|
24038
23921
|
articleUsedCalcPrice = this.getOptionPrice(articleUsedCalcPrice, tmpOps.option, digits);
|
|
24039
23922
|
}
|
|
24040
23923
|
|
|
24041
23924
|
//jetzt nochmal prozentuelle Preise mit GLOBAL tarbetoption berechnen
|
|
24042
23925
|
/* TODO ABklären mit Franz - ops hat nie die Optionen - targetPPGPrefixes - ich glaube hier sollte article.priceRefs durchlaufen werden. */
|
|
24043
23926
|
} catch (err) {
|
|
24044
|
-
|
|
23927
|
+
_iterator8.e(err);
|
|
24045
23928
|
} finally {
|
|
24046
|
-
|
|
23929
|
+
_iterator8.f();
|
|
24047
23930
|
}
|
|
24048
|
-
var
|
|
24049
|
-
|
|
23931
|
+
var _iterator9 = _createForOfIteratorHelper$8(this.article.articleOptionStates),
|
|
23932
|
+
_step9;
|
|
24050
23933
|
try {
|
|
24051
|
-
for (
|
|
24052
|
-
var
|
|
24053
|
-
var
|
|
24054
|
-
var targetOption = (
|
|
24055
|
-
if (
|
|
24056
|
-
articleUsedCalcPrice = articleUsedCalcPrice * (1 +
|
|
23934
|
+
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
23935
|
+
var _ops6$targetPPGPrefix, _ops6$targetPPGPrefix2;
|
|
23936
|
+
var _ops6 = _step9.value;
|
|
23937
|
+
var targetOption = (_ops6$targetPPGPrefix = (_ops6$targetPPGPrefix2 = _ops6.targetPPGPrefixes) === null || _ops6$targetPPGPrefix2 === void 0 ? void 0 : _ops6$targetPPGPrefix2[0]) !== null && _ops6$targetPPGPrefix !== void 0 ? _ops6$targetPPGPrefix : _ops6.targetOption;
|
|
23938
|
+
if (_ops6.isPercentage && targetOption == 'GLOBAL') {
|
|
23939
|
+
articleUsedCalcPrice = articleUsedCalcPrice * (1 + _ops6.calcPrice);
|
|
24057
23940
|
}
|
|
24058
23941
|
}
|
|
24059
23942
|
} catch (err) {
|
|
24060
|
-
|
|
23943
|
+
_iterator9.e(err);
|
|
24061
23944
|
} finally {
|
|
24062
|
-
|
|
23945
|
+
_iterator9.f();
|
|
24063
23946
|
}
|
|
24064
23947
|
for (var _i5 = 0; _i5 < this.article.priceRefs.length; _i5++) {
|
|
24065
23948
|
var _priceRef = this.article.priceRefs[_i5];
|
|
@@ -24201,22 +24084,22 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24201
24084
|
if (a[i].trim() != '') {
|
|
24202
24085
|
var searchOpt = 'OPT' + a[i].trim();
|
|
24203
24086
|
//Optionsbaum des Artikels durchsuchen
|
|
24204
|
-
var
|
|
24205
|
-
|
|
24087
|
+
var _iterator10 = _createForOfIteratorHelper$8(this.article.articleOptionStates),
|
|
24088
|
+
_step10;
|
|
24206
24089
|
try {
|
|
24207
|
-
for (
|
|
24208
|
-
var
|
|
24209
|
-
if (
|
|
24210
|
-
if (
|
|
24211
|
-
myPercBasePrice +=
|
|
24090
|
+
for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
|
|
24091
|
+
var _ops7 = _step10.value;
|
|
24092
|
+
if (_ops7.ocd == searchOpt || _ops7.optionCodex == searchOpt) {
|
|
24093
|
+
if (_ops7 && _ops7.price > 0) {
|
|
24094
|
+
myPercBasePrice += _ops7.price * _ops7.quantity;
|
|
24212
24095
|
break;
|
|
24213
24096
|
}
|
|
24214
24097
|
}
|
|
24215
24098
|
}
|
|
24216
24099
|
} catch (err) {
|
|
24217
|
-
|
|
24100
|
+
_iterator10.e(err);
|
|
24218
24101
|
} finally {
|
|
24219
|
-
|
|
24102
|
+
_iterator10.f();
|
|
24220
24103
|
}
|
|
24221
24104
|
}
|
|
24222
24105
|
}
|
|
@@ -24236,7 +24119,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24236
24119
|
value: function updateConfigDependentMedia() {
|
|
24237
24120
|
var _this$article$catalog5,
|
|
24238
24121
|
_this$article$catalog6,
|
|
24239
|
-
|
|
24122
|
+
_this4 = this;
|
|
24240
24123
|
var catalogData = this.article.CatalogData;
|
|
24241
24124
|
//articlebild berechnung
|
|
24242
24125
|
|
|
@@ -24262,48 +24145,38 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24262
24145
|
}
|
|
24263
24146
|
|
|
24264
24147
|
// this functions updates the images of OPVs that depend on rules
|
|
24265
|
-
var
|
|
24266
|
-
|
|
24148
|
+
var _iterator11 = _createForOfIteratorHelper$8(this.article.articleOptionStates),
|
|
24149
|
+
_step11;
|
|
24267
24150
|
try {
|
|
24268
|
-
for (
|
|
24269
|
-
var ops =
|
|
24270
|
-
var
|
|
24271
|
-
|
|
24272
|
-
|
|
24273
|
-
|
|
24274
|
-
var
|
|
24275
|
-
|
|
24276
|
-
|
|
24277
|
-
|
|
24278
|
-
|
|
24279
|
-
|
|
24280
|
-
|
|
24281
|
-
|
|
24282
|
-
|
|
24283
|
-
|
|
24284
|
-
}
|
|
24285
|
-
if (rule && this.article.evalRule(rule)) {
|
|
24286
|
-
ops.editVisibleOPVsImages(opv.codex, catalogData.getCatImageURL(image.fileName, ''));
|
|
24287
|
-
imageFound = true;
|
|
24288
|
-
break;
|
|
24289
|
-
}
|
|
24151
|
+
for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
|
|
24152
|
+
var ops = _step11.value;
|
|
24153
|
+
for (var jKey in ops.visibleOptionValues) {
|
|
24154
|
+
var opv = ops.visibleOptionValues[jKey];
|
|
24155
|
+
if (opv.images) {
|
|
24156
|
+
var imageFound = false;
|
|
24157
|
+
for (var _i8 = 0; _i8 < opv.images.length; _i8++) {
|
|
24158
|
+
var image = opv.images[_i8];
|
|
24159
|
+
var rule = image.jsFormula;
|
|
24160
|
+
if (rule.includes('ARTICLECODEX')) {
|
|
24161
|
+
rule = rule.replace(/ARTICLECODEX/g, "'" + this.article.articleCodex + "'");
|
|
24162
|
+
}
|
|
24163
|
+
if (rule && this.article.evalRule(rule)) {
|
|
24164
|
+
ops.editVisibleOPVsImages(opv.codex, catalogData.getCatImageURL(image.fileName, ''));
|
|
24165
|
+
imageFound = true;
|
|
24166
|
+
break;
|
|
24290
24167
|
}
|
|
24291
|
-
if (!imageFound) ops.editVisibleOPVsImages(opv.codex);
|
|
24292
24168
|
}
|
|
24169
|
+
if (!imageFound) ops.editVisibleOPVsImages(opv.codex);
|
|
24293
24170
|
}
|
|
24294
|
-
} catch (err) {
|
|
24295
|
-
_iterator18.e(err);
|
|
24296
|
-
} finally {
|
|
24297
|
-
_iterator18.f();
|
|
24298
24171
|
}
|
|
24299
24172
|
}
|
|
24300
24173
|
|
|
24301
24174
|
// this function calculates an Svg to the current configuration if neccessary (SVG Tausch)
|
|
24302
24175
|
// if the Article has no SVG Tausch nothing is done
|
|
24303
24176
|
} catch (err) {
|
|
24304
|
-
|
|
24177
|
+
_iterator11.e(err);
|
|
24305
24178
|
} finally {
|
|
24306
|
-
|
|
24179
|
+
_iterator11.f();
|
|
24307
24180
|
}
|
|
24308
24181
|
var newSVGFile = null;
|
|
24309
24182
|
var svgChangedViaSvgTausch = false;
|
|
@@ -24365,7 +24238,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24365
24238
|
code: 'WC_0011',
|
|
24366
24239
|
custom: {
|
|
24367
24240
|
formulas: (_plannerCatArt$topSvg = plannerCatArt.topSvgsWithFormula) === null || _plannerCatArt$topSvg === void 0 ? void 0 : _plannerCatArt$topSvg.map(function (item) {
|
|
24368
|
-
return DivaUtils.getRuleByFormula(item.JsFormula,
|
|
24241
|
+
return DivaUtils.getRuleByFormula(item.JsFormula, _this4.article.catalogCodex, catalogData.multiselectOptions);
|
|
24369
24242
|
}),
|
|
24370
24243
|
catalogName: catalogData.catalogName,
|
|
24371
24244
|
catalogCodex: this.article.catalogCodex,
|
|
@@ -24390,8 +24263,8 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24390
24263
|
}]);
|
|
24391
24264
|
}();
|
|
24392
24265
|
|
|
24393
|
-
function ownKeys$
|
|
24394
|
-
function _objectSpread$
|
|
24266
|
+
function ownKeys$f(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; }
|
|
24267
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24395
24268
|
function _createForOfIteratorHelper$7(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$7(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; } } }; }
|
|
24396
24269
|
function _unsupportedIterableToArray$7(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$7(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$7(r, a) : void 0; } }
|
|
24397
24270
|
function _arrayLikeToArray$7(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; }
|
|
@@ -24446,12 +24319,12 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24446
24319
|
decisions[i].disableHistory = [];
|
|
24447
24320
|
decisions[i].activeCombination = undefined;
|
|
24448
24321
|
}
|
|
24449
|
-
var _iterator = _createForOfIteratorHelper$7(this.article.articleOptionStates
|
|
24322
|
+
var _iterator = _createForOfIteratorHelper$7(this.article.articleOptionStates),
|
|
24450
24323
|
_step;
|
|
24451
24324
|
try {
|
|
24452
24325
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
24453
24326
|
var ops = _step.value;
|
|
24454
|
-
ops.updateVisibleOptionValues(ops.option.articleOptionValues);
|
|
24327
|
+
ops.updateVisibleOptionValues(_objectSpread$f({}, ops.option.articleOptionValues));
|
|
24455
24328
|
if (!ops.val) this.updateArtOPV(this.article.getDefaultOpv(ops.visibleOptionValues), ops.optionCodex, ops, undefined);
|
|
24456
24329
|
ops.definedBySetFeatureFixed = false;
|
|
24457
24330
|
}
|
|
@@ -24517,15 +24390,14 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24517
24390
|
value: function sortFeatures(featureNos) {
|
|
24518
24391
|
var _this = this;
|
|
24519
24392
|
return featureNos.sort(function (a, b) {
|
|
24520
|
-
var
|
|
24521
|
-
var aIndex = opsArray.findIndex(function (ops) {
|
|
24393
|
+
var aIndex = _this.article.articleOptionStates.findIndex(function (ops) {
|
|
24522
24394
|
return ops.optionCodex == a;
|
|
24523
24395
|
});
|
|
24524
|
-
var bIndex =
|
|
24396
|
+
var bIndex = _this.article.articleOptionStates.findIndex(function (ops) {
|
|
24525
24397
|
return ops.optionCodex == b;
|
|
24526
24398
|
});
|
|
24527
|
-
if (aIndex == -1) aIndex =
|
|
24528
|
-
if (bIndex == -1) bIndex =
|
|
24399
|
+
if (aIndex == -1) aIndex = _this.article.articleOptionStates.length;
|
|
24400
|
+
if (bIndex == -1) bIndex = _this.article.articleOptionStates.length;
|
|
24529
24401
|
return aIndex - bIndex;
|
|
24530
24402
|
});
|
|
24531
24403
|
}
|
|
@@ -24541,7 +24413,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24541
24413
|
var _loop = function _loop() {
|
|
24542
24414
|
var featureNo = sortedDeatureRefs[p];
|
|
24543
24415
|
var ops = _this2.article.getArticleOptionState(featureNo);
|
|
24544
|
-
if (!validOptions[featureNo]) validOptions[featureNo] =
|
|
24416
|
+
if (!validOptions[featureNo]) validOptions[featureNo] = {};
|
|
24545
24417
|
if (!ops) return 1; // break
|
|
24546
24418
|
var possibleOPVs = ops.visibleOptionValues;
|
|
24547
24419
|
|
|
@@ -24603,12 +24475,12 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24603
24475
|
}
|
|
24604
24476
|
if (ruleValid) {
|
|
24605
24477
|
ruleWasValidOnce = true;
|
|
24606
|
-
validOptions[featureNo] =
|
|
24607
|
-
if (possibleOPVs
|
|
24478
|
+
validOptions[featureNo] = _objectSpread$f({}, possibleOPVs);
|
|
24479
|
+
if (possibleOPVs[optionNo] != null) delete validOptions[featureNo][optionNo];
|
|
24608
24480
|
}
|
|
24609
24481
|
} else {
|
|
24610
24482
|
ruleWasValidOnce = true;
|
|
24611
|
-
if (possibleOPVs
|
|
24483
|
+
if (possibleOPVs[optionNo] != null) validOptions[featureNo][optionNo] = possibleOPVs[optionNo];
|
|
24612
24484
|
}
|
|
24613
24485
|
}
|
|
24614
24486
|
if (!ruleWasValidOnce) {
|
|
@@ -24616,7 +24488,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24616
24488
|
for (var x = 0; x < ops.visibleOPVKeys.length; x++) {
|
|
24617
24489
|
var _opv = ops.visibleOPVKeys[x];
|
|
24618
24490
|
var doesNotExists = !!(ref.options.includes(_opv) && (ref.operator == 1 || ref.operator == 3));
|
|
24619
|
-
if (!doesNotExists) validOptions[featureNo]
|
|
24491
|
+
if (!doesNotExists) validOptions[featureNo][_opv] = ops.visibleOptionValues[_opv];
|
|
24620
24492
|
}
|
|
24621
24493
|
}
|
|
24622
24494
|
} else {
|
|
@@ -24624,15 +24496,16 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24624
24496
|
}
|
|
24625
24497
|
}
|
|
24626
24498
|
}
|
|
24627
|
-
var schnittmenge =
|
|
24628
|
-
|
|
24629
|
-
|
|
24630
|
-
|
|
24631
|
-
|
|
24499
|
+
var schnittmenge = {};
|
|
24500
|
+
for (var _key in possibleOPVs) {
|
|
24501
|
+
if (validOptions[featureNo][_key]) {
|
|
24502
|
+
schnittmenge[_key] = possibleOPVs[_key];
|
|
24503
|
+
}
|
|
24504
|
+
}
|
|
24632
24505
|
possibleOPVs = schnittmenge;
|
|
24633
|
-
ops.updateVisibleOptionValues(possibleOPVs);
|
|
24506
|
+
ops.updateVisibleOptionValues(Object.assign({}, possibleOPVs));
|
|
24634
24507
|
var valCodex = ops.valCodex;
|
|
24635
|
-
if ((!valCodex || !ops.visibleOptionValues
|
|
24508
|
+
if ((!valCodex || !ops.visibleOptionValues[valCodex]) && ops.visibleOPVKeys.length > 0) {
|
|
24636
24509
|
if (_this2.article.CatalogData.useDiomexConfigLogic) {
|
|
24637
24510
|
_this2.clearOP(featureNo, true);
|
|
24638
24511
|
} else {
|
|
@@ -24661,7 +24534,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24661
24534
|
var featureNo = sortedDeatureRefs[p];
|
|
24662
24535
|
var ops = _this3.article.getArticleOptionStateFlat(featureNo);
|
|
24663
24536
|
if (!ops) return 1; // break
|
|
24664
|
-
if (!invalidOptions[featureNo]) invalidOptions[featureNo] =
|
|
24537
|
+
if (!invalidOptions[featureNo]) invalidOptions[featureNo] = {};
|
|
24665
24538
|
var possibleOPVs = ops.visibleOptionValues;
|
|
24666
24539
|
//Erste Option ist immer eine Bedingung!
|
|
24667
24540
|
if (p === sortedDeatureRefs.length - 1) {
|
|
@@ -24699,23 +24572,25 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24699
24572
|
if (ref) {
|
|
24700
24573
|
for (var i = 0; i < ref.options.length; i++) {
|
|
24701
24574
|
var optionNo = ref.options[i];
|
|
24702
|
-
var myOPVData = possibleOPVs
|
|
24575
|
+
var myOPVData = possibleOPVs[optionNo];
|
|
24703
24576
|
if (myOPVData != null) {
|
|
24704
|
-
invalidOptions[featureNo]
|
|
24577
|
+
invalidOptions[featureNo][optionNo] = myOPVData; //wenn es eine DecisionType 0 ist muss ich diese OPV von den gültigen entfernen
|
|
24705
24578
|
}
|
|
24706
24579
|
}
|
|
24707
24580
|
}
|
|
24708
24581
|
}
|
|
24709
24582
|
}
|
|
24710
|
-
var schnittmenge =
|
|
24711
|
-
|
|
24712
|
-
|
|
24713
|
-
|
|
24714
|
-
|
|
24583
|
+
var schnittmenge = {};
|
|
24584
|
+
for (var key in possibleOPVs) {
|
|
24585
|
+
if (!invalidOptions[featureNo][key]) {
|
|
24586
|
+
schnittmenge[key] = possibleOPVs[key];
|
|
24587
|
+
}
|
|
24588
|
+
}
|
|
24589
|
+
// someDecisionExistsForOption = true;
|
|
24715
24590
|
possibleOPVs = schnittmenge;
|
|
24716
|
-
ops.updateVisibleOptionValues(possibleOPVs);
|
|
24591
|
+
ops.updateVisibleOptionValues(Object.assign({}, possibleOPVs));
|
|
24717
24592
|
var valCodex = ops.valCodex;
|
|
24718
|
-
if ((!valCodex || !ops.visibleOptionValues
|
|
24593
|
+
if ((!valCodex || !ops.visibleOptionValues[valCodex]) && ops.visibleOPVKeys.length > 0) {
|
|
24719
24594
|
if (_this3.article.CatalogData.useDiomexConfigLogic) {
|
|
24720
24595
|
_this3.clearOP(featureNo, true);
|
|
24721
24596
|
} else {
|
|
@@ -24733,22 +24608,11 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24733
24608
|
}, {
|
|
24734
24609
|
key: "evalValueWithOperator",
|
|
24735
24610
|
value: function evalValueWithOperator(op, value, check) {
|
|
24736
|
-
|
|
24737
|
-
|
|
24738
|
-
|
|
24739
|
-
|
|
24740
|
-
|
|
24741
|
-
case 3:
|
|
24742
|
-
return !value.includes(check);
|
|
24743
|
-
case 4:
|
|
24744
|
-
case 5:
|
|
24745
|
-
throw new Error('gt and lt not implemented');
|
|
24746
|
-
case 6:
|
|
24747
|
-
case 7:
|
|
24748
|
-
throw new Error('ge and le not implemented');
|
|
24749
|
-
default:
|
|
24750
|
-
throw new Error('decisions operator ' + op + ' not implemented');
|
|
24751
|
-
}
|
|
24611
|
+
if (op == 0 || op == 2) return value.includes(check);
|
|
24612
|
+
if (op == 1 || op == 3) return !value.includes(check);
|
|
24613
|
+
if (op == 4 || op == 5) throw new Error('gt and lt not implemented');
|
|
24614
|
+
if (op == 6 || op == 7) throw new Error('ge and le not implemented');
|
|
24615
|
+
throw new Error('decisions operator ' + op + ' not implemented');
|
|
24752
24616
|
}
|
|
24753
24617
|
}, {
|
|
24754
24618
|
key: "evalType2Decision",
|
|
@@ -24756,9 +24620,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24756
24620
|
var _decision$optionCombi2;
|
|
24757
24621
|
var hasSetFeatureInvisible = {};
|
|
24758
24622
|
if (!((_decision$optionCombi2 = decision.optionCombinations) !== null && _decision$optionCombi2 !== void 0 && _decision$optionCombi2.length)) return;
|
|
24759
|
-
var
|
|
24760
|
-
|
|
24761
|
-
combination =
|
|
24623
|
+
var _ref = this.getMatchingOptionCombination(decision.optionCombinations),
|
|
24624
|
+
_ref2 = _slicedToArray(_ref, 1),
|
|
24625
|
+
combination = _ref2[0];
|
|
24762
24626
|
if (combination) decision.activeCombination = combination.sequence;
|
|
24763
24627
|
if (combination !== null && combination !== void 0 && combination.projectActions) {
|
|
24764
24628
|
if (combination.projectActions.disableDecision) this.evalDisableDecision(combination.projectActions.disableDecision, decision, allDecisions, true);
|
|
@@ -24899,7 +24763,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24899
24763
|
value: function assignOptionValue(featureNo, optionNo, setBy, freeText) {
|
|
24900
24764
|
var ops = this.article.getArticleOptionState(featureNo);
|
|
24901
24765
|
if (!ops) throw new Error('myOptionState ' + featureNo + ' is undefined');
|
|
24902
|
-
var option = ops.visibleOptionValues
|
|
24766
|
+
var option = ops.visibleOptionValues[optionNo];
|
|
24903
24767
|
if (option) {
|
|
24904
24768
|
if (setBy == 'fix') ops.definedBySetFeatureFixed = true;
|
|
24905
24769
|
ops.valueWasSet = true;
|
|
@@ -25005,7 +24869,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25005
24869
|
nr: priceFeatureGroup.priceFeatureGroupNo,
|
|
25006
24870
|
variantValues: this.article.VariantValues,
|
|
25007
24871
|
text: DivaUtils.getLocals(priceFeatureGroup.priceFeatureGroupText, this.article.set.api.getLanguage()) + ' ' + (finish ? (_this$article$catalog3 = this.article.catalogArticle.idmPrices) === null || _this$article$catalog3 === void 0 || (_this$article$catalog3 = _this$article$catalog3.prices['PRFG' + priceFeatureGroup.priceFeatureGroupNo + '_' + finish.priceField]) === null || _this$article$catalog3 === void 0 ? void 0 : _this$article$catalog3.toString() : ''),
|
|
25008
|
-
priceFeatureGroup: _objectSpread$
|
|
24872
|
+
priceFeatureGroup: _objectSpread$f(_objectSpread$f({}, priceFeatureGroup), {}, {
|
|
25009
24873
|
activeCombination: finish === null || finish === void 0 ? void 0 : finish.sequence
|
|
25010
24874
|
})
|
|
25011
24875
|
});
|
|
@@ -25112,9 +24976,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25112
24976
|
if (myPartListPos.decisionPosCount) {
|
|
25113
24977
|
// get SetPosCountValue from decsion action if defined and else use myPartListPos.PosCountValue;
|
|
25114
24978
|
var decision = this.article.CatalogData.getDecisionsByNo([myPartListPos.decisionPosCount])[0];
|
|
25115
|
-
var
|
|
25116
|
-
|
|
25117
|
-
combination =
|
|
24979
|
+
var _ref3 = this.getMatchingOptionCombination(decision.optionCombinations),
|
|
24980
|
+
_ref4 = _slicedToArray(_ref3, 1),
|
|
24981
|
+
combination = _ref4[0];
|
|
25118
24982
|
if (combination) {
|
|
25119
24983
|
var _combination$projectA;
|
|
25120
24984
|
var posCountValueAction = (_combination$projectA = combination.projectActions) === null || _combination$projectA === void 0 ? void 0 : _combination$projectA.setPosCountValue;
|
|
@@ -25233,7 +25097,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25233
25097
|
key: "updateIDMSpecificFeatures",
|
|
25234
25098
|
value: function updateIDMSpecificFeatures() {
|
|
25235
25099
|
//updaten idm planner specific options
|
|
25236
|
-
var _iterator6 = _createForOfIteratorHelper$7(this.article.articleOptionStates
|
|
25100
|
+
var _iterator6 = _createForOfIteratorHelper$7(this.article.articleOptionStates),
|
|
25237
25101
|
_step6;
|
|
25238
25102
|
try {
|
|
25239
25103
|
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
@@ -25244,7 +25108,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25244
25108
|
}
|
|
25245
25109
|
if (ops.visibleCount && ops.IsIDMSpecialFeature) {
|
|
25246
25110
|
var _validOpv;
|
|
25247
|
-
var validOpvs =
|
|
25111
|
+
var validOpvs = Object.values(ops.visibleOptionValues);
|
|
25248
25112
|
if (ops.val) validOpvs.unshift(ops.val);
|
|
25249
25113
|
var validOpv = undefined;
|
|
25250
25114
|
for (var i = 0; i < validOpvs.length; i++) {
|
|
@@ -25278,27 +25142,27 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25278
25142
|
}
|
|
25279
25143
|
if ([97, 1097].includes((_myArtOPS$option$idmV3 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV3 !== void 0 ? _myArtOPS$option$idmV3 : 0)) {
|
|
25280
25144
|
try {
|
|
25281
|
-
var
|
|
25145
|
+
var _ref5, _myArtOPS$measureValu;
|
|
25282
25146
|
this.article.doUpdatePlannerSize = true;
|
|
25283
|
-
this.article.calcHeight = Math.round((Number((
|
|
25147
|
+
this.article.calcHeight = Math.round((Number((_ref5 = (_myArtOPS$measureValu = myArtOPS.measureValue) !== null && _myArtOPS$measureValu !== void 0 ? _myArtOPS$measureValu : myArtOPS.value) !== null && _ref5 !== void 0 ? _ref5 : myArtOPS.valueFromName) + Number.EPSILON) * 100) / 100;
|
|
25284
25148
|
} catch (e) {
|
|
25285
25149
|
LOG$f.warn('Invalid Planungdepth - IDMVariantenArt 97: ' + myArtOPS.option.name + ' ' + myArtOPS.valName, e);
|
|
25286
25150
|
}
|
|
25287
25151
|
}
|
|
25288
25152
|
if ([96, 1096].includes((_myArtOPS$option$idmV4 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV4 !== void 0 ? _myArtOPS$option$idmV4 : 0) || myArtOPS.option.diameter) {
|
|
25289
25153
|
try {
|
|
25290
|
-
var
|
|
25154
|
+
var _ref6, _myArtOPS$measureValu2;
|
|
25291
25155
|
this.article.doUpdatePlannerSize = true;
|
|
25292
|
-
this.article.calcDepth = Math.round((Number((
|
|
25156
|
+
this.article.calcDepth = Math.round((Number((_ref6 = (_myArtOPS$measureValu2 = myArtOPS.measureValue) !== null && _myArtOPS$measureValu2 !== void 0 ? _myArtOPS$measureValu2 : myArtOPS.value) !== null && _ref6 !== void 0 ? _ref6 : myArtOPS.valueFromName) + Number.EPSILON) * 100) / 100;
|
|
25293
25157
|
} catch (e) {
|
|
25294
25158
|
LOG$f.warn('Invalid Planungdepth - IDMVariantenArt 96: ' + myArtOPS.option.name + ' ' + myArtOPS.valName, e);
|
|
25295
25159
|
}
|
|
25296
25160
|
}
|
|
25297
25161
|
if ([95, 1095].includes((_myArtOPS$option$idmV5 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV5 !== void 0 ? _myArtOPS$option$idmV5 : 0) || myArtOPS.option.diameter) {
|
|
25298
25162
|
try {
|
|
25299
|
-
var
|
|
25163
|
+
var _ref7, _myArtOPS$measureValu3;
|
|
25300
25164
|
this.article.doUpdatePlannerSize = true;
|
|
25301
|
-
this.article.calcWidth = Math.round((Number((
|
|
25165
|
+
this.article.calcWidth = Math.round((Number((_ref7 = (_myArtOPS$measureValu3 = myArtOPS.measureValue) !== null && _myArtOPS$measureValu3 !== void 0 ? _myArtOPS$measureValu3 : myArtOPS.value) !== null && _ref7 !== void 0 ? _ref7 : myArtOPS.valueFromName) + Number.EPSILON) * 100) / 100;
|
|
25302
25166
|
} catch (e) {
|
|
25303
25167
|
LOG$f.warn('Invalid Planungdepth - IDMVariantenArt 95: ' + myArtOPS.option.name + ' ' + myArtOPS.valName, e);
|
|
25304
25168
|
}
|
|
@@ -25363,9 +25227,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25363
25227
|
while (allKeys.find(function (key) {
|
|
25364
25228
|
return formula.includes(key);
|
|
25365
25229
|
})) {
|
|
25366
|
-
var
|
|
25367
|
-
if (
|
|
25368
|
-
origFormula = origFormula.replaceAll(
|
|
25230
|
+
var _key2 = allKeys.shift();
|
|
25231
|
+
if (_key2 === undefined) break;
|
|
25232
|
+
origFormula = origFormula.replaceAll(_key2, keysMap[_key2].toString());
|
|
25369
25233
|
}
|
|
25370
25234
|
try {
|
|
25371
25235
|
return eval(origFormula);
|
|
@@ -25417,50 +25281,40 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25417
25281
|
}
|
|
25418
25282
|
|
|
25419
25283
|
// this functions updates the images of OPVs that depend on rules
|
|
25420
|
-
var _iterator8 = _createForOfIteratorHelper$7(this.article.articleOptionStates
|
|
25284
|
+
var _iterator8 = _createForOfIteratorHelper$7(this.article.articleOptionStates),
|
|
25421
25285
|
_step8;
|
|
25422
25286
|
try {
|
|
25423
25287
|
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
25424
25288
|
var ops = _step8.value;
|
|
25425
|
-
var
|
|
25426
|
-
|
|
25427
|
-
|
|
25428
|
-
|
|
25429
|
-
var
|
|
25430
|
-
|
|
25431
|
-
|
|
25432
|
-
|
|
25433
|
-
|
|
25434
|
-
|
|
25435
|
-
|
|
25436
|
-
|
|
25437
|
-
|
|
25438
|
-
|
|
25439
|
-
|
|
25440
|
-
|
|
25441
|
-
|
|
25442
|
-
|
|
25443
|
-
_this$getMatchingOpti10 = _slicedToArray(_this$getMatchingOpti9, 1),
|
|
25444
|
-
_combination2 = _this$getMatchingOpti10[0];
|
|
25445
|
-
if (_combination2) {
|
|
25446
|
-
_doUse = true;
|
|
25447
|
-
break;
|
|
25448
|
-
}
|
|
25289
|
+
for (var jKey in ops.visibleOptionValues) {
|
|
25290
|
+
var opv = ops.visibleOptionValues[jKey];
|
|
25291
|
+
if (opv.images) {
|
|
25292
|
+
var imageFound = false;
|
|
25293
|
+
for (var _i2 = 0; _i2 < opv.images.length; _i2++) {
|
|
25294
|
+
var _image$decisionNos2, _image$decisionNos3;
|
|
25295
|
+
var _image = opv.images[_i2];
|
|
25296
|
+
var _doUse = !((_image$decisionNos2 = _image.decisionNos) !== null && _image$decisionNos2 !== void 0 && _image$decisionNos2.length);
|
|
25297
|
+
if ((_image$decisionNos3 = _image.decisionNos) !== null && _image$decisionNos3 !== void 0 && _image$decisionNos3.length) {
|
|
25298
|
+
for (var _j2 = 0; _j2 < _image.decisionNos.length; _j2++) {
|
|
25299
|
+
var _decision2 = catalogData.getDecisionByNo(_image.decisionNos[_j2]);
|
|
25300
|
+
if (!_decision2) throw new Error('decision ' + _image.decisionNos[_j2] + ' not found');
|
|
25301
|
+
var _this$getMatchingOpti9 = this.getMatchingOptionCombination(_decision2.optionCombinations),
|
|
25302
|
+
_this$getMatchingOpti10 = _slicedToArray(_this$getMatchingOpti9, 1),
|
|
25303
|
+
_combination2 = _this$getMatchingOpti10[0];
|
|
25304
|
+
if (_combination2) {
|
|
25305
|
+
_doUse = true;
|
|
25306
|
+
break;
|
|
25449
25307
|
}
|
|
25450
25308
|
}
|
|
25451
|
-
if (_doUse) {
|
|
25452
|
-
ops.editVisibleOPVsImages(opv.codex, _image.url);
|
|
25453
|
-
imageFound = true;
|
|
25454
|
-
break;
|
|
25455
|
-
}
|
|
25456
25309
|
}
|
|
25457
|
-
if (
|
|
25310
|
+
if (_doUse) {
|
|
25311
|
+
ops.editVisibleOPVsImages(opv.codex, _image.url);
|
|
25312
|
+
imageFound = true;
|
|
25313
|
+
break;
|
|
25314
|
+
}
|
|
25458
25315
|
}
|
|
25316
|
+
if (!imageFound) ops.editVisibleOPVsImages(opv.codex);
|
|
25459
25317
|
}
|
|
25460
|
-
} catch (err) {
|
|
25461
|
-
_iterator9.e(err);
|
|
25462
|
-
} finally {
|
|
25463
|
-
_iterator9.f();
|
|
25464
25318
|
}
|
|
25465
25319
|
}
|
|
25466
25320
|
|
|
@@ -25566,8 +25420,8 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25566
25420
|
function _createForOfIteratorHelper$6(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$6(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
25567
25421
|
function _unsupportedIterableToArray$6(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$6(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$6(r, a) : void 0; } }
|
|
25568
25422
|
function _arrayLikeToArray$6(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
25569
|
-
function ownKeys$
|
|
25570
|
-
function _objectSpread$
|
|
25423
|
+
function ownKeys$e(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; }
|
|
25424
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25571
25425
|
var LOG$e = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
25572
25426
|
var DivaArticle = /*#__PURE__*/function () {
|
|
25573
25427
|
function DivaArticle(set, _basketId, initParams, articleData, catalogData) {
|
|
@@ -25658,7 +25512,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
25658
25512
|
this.doorPlannerData = this.shelfPlanData.DoorPlannerData;
|
|
25659
25513
|
}
|
|
25660
25514
|
this.initPlannerData(articleData);
|
|
25661
|
-
this.articleOptionStatesData =
|
|
25515
|
+
this.articleOptionStatesData = []; //Dieses Objekt speichert den aktuellen Werte, Zustand eines Optionsbaumes und Preise
|
|
25662
25516
|
}
|
|
25663
25517
|
return _createClass(DivaArticle, [{
|
|
25664
25518
|
key: "initEngine",
|
|
@@ -25807,7 +25661,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
25807
25661
|
var partlistArticle = this.partlistArticles[basketId];
|
|
25808
25662
|
if (!onlyVisible || partlistArticle.partlistArticleVisibleInTree || !excludeStandalonePla && partlistArticle.partlistArticleStandalone) partlistArticles[basketId] = partlistArticle;
|
|
25809
25663
|
if (partlistArticle.hasPartlistArticle) {
|
|
25810
|
-
partlistArticles = _objectSpread$
|
|
25664
|
+
partlistArticles = _objectSpread$e(_objectSpread$e({}, partlistArticles), partlistArticle.getRecursivePartlistArticles(onlyVisible, excludeStandalonePla));
|
|
25811
25665
|
}
|
|
25812
25666
|
}
|
|
25813
25667
|
return partlistArticles;
|
|
@@ -25816,8 +25670,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
25816
25670
|
key: "variantValuesForPla",
|
|
25817
25671
|
value: function variantValuesForPla(configurationMode, previousPartlistArticleVariantValues, newConfigValues) {
|
|
25818
25672
|
//if configurationMode is true its previous values are more important than the values of the parentelement because its standalone configurable
|
|
25819
|
-
if (configurationMode) return _objectSpread$
|
|
25820
|
-
return _objectSpread$
|
|
25673
|
+
if (configurationMode) return _objectSpread$e(_objectSpread$e({}, newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {}), previousPartlistArticleVariantValues !== null && previousPartlistArticleVariantValues !== void 0 ? previousPartlistArticleVariantValues : {});
|
|
25674
|
+
return _objectSpread$e(_objectSpread$e({}, previousPartlistArticleVariantValues !== null && previousPartlistArticleVariantValues !== void 0 ? previousPartlistArticleVariantValues : {}), newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {});
|
|
25821
25675
|
}
|
|
25822
25676
|
}, {
|
|
25823
25677
|
key: "partlistArticlesAsArray",
|
|
@@ -26049,7 +25903,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26049
25903
|
key: "getTabgroupsAsString",
|
|
26050
25904
|
get: function get() {
|
|
26051
25905
|
var ret = '';
|
|
26052
|
-
var _iterator = _createForOfIteratorHelper$6(this.articleOptionStates
|
|
25906
|
+
var _iterator = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
26053
25907
|
_step;
|
|
26054
25908
|
try {
|
|
26055
25909
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -26071,7 +25925,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26071
25925
|
key: "articleVariantValues",
|
|
26072
25926
|
get: function get() {
|
|
26073
25927
|
var ret = '';
|
|
26074
|
-
var _iterator2 = _createForOfIteratorHelper$6(this.articleOptionStates
|
|
25928
|
+
var _iterator2 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
26075
25929
|
_step2;
|
|
26076
25930
|
try {
|
|
26077
25931
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -26147,18 +26001,26 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26147
26001
|
}, {
|
|
26148
26002
|
key: "getArticleOptionStatesWithOptionsForPrint",
|
|
26149
26003
|
value: function getArticleOptionStatesWithOptionsForPrint() {
|
|
26150
|
-
var
|
|
26004
|
+
var _this2 = this;
|
|
26005
|
+
var opsArray = _toConsumableArray(this.articleOptionStates);
|
|
26151
26006
|
var optionsForPrint = this.optionsForPrint;
|
|
26152
26007
|
if (optionsForPrint) {
|
|
26153
|
-
|
|
26154
|
-
var ops =
|
|
26008
|
+
var _loop = function _loop() {
|
|
26009
|
+
var ops = _this2.getArticleOptionState(optionsForPrint[i]);
|
|
26155
26010
|
if (ops) {
|
|
26156
|
-
if (
|
|
26157
|
-
|
|
26011
|
+
if (opsArray.find(function (o) {
|
|
26012
|
+
return o.optionCodex == ops.optionCodex;
|
|
26013
|
+
})) opsArray.splice(opsArray.findIndex(function (o) {
|
|
26014
|
+
return o.optionCodex == ops.optionCodex;
|
|
26015
|
+
}));
|
|
26016
|
+
opsArray.push(ops);
|
|
26158
26017
|
}
|
|
26018
|
+
};
|
|
26019
|
+
for (var i = 0; i < optionsForPrint.length; i++) {
|
|
26020
|
+
_loop();
|
|
26159
26021
|
}
|
|
26160
26022
|
}
|
|
26161
|
-
return
|
|
26023
|
+
return opsArray;
|
|
26162
26024
|
}
|
|
26163
26025
|
}, {
|
|
26164
26026
|
key: "articleVariantDesc",
|
|
@@ -26166,7 +26028,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26166
26028
|
var newLine = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ', ';
|
|
26167
26029
|
var articleOptions = this.getArticleOptionStatesWithOptionsForPrint();
|
|
26168
26030
|
var ret = '';
|
|
26169
|
-
var _iterator3 = _createForOfIteratorHelper$6(articleOptions
|
|
26031
|
+
var _iterator3 = _createForOfIteratorHelper$6(articleOptions),
|
|
26170
26032
|
_step3;
|
|
26171
26033
|
try {
|
|
26172
26034
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
@@ -26199,7 +26061,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26199
26061
|
value: function articleVariantDesc_locales() {
|
|
26200
26062
|
var newLine = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ', ';
|
|
26201
26063
|
var ret = {};
|
|
26202
|
-
var _iterator4 = _createForOfIteratorHelper$6(this.articleOptionStates
|
|
26064
|
+
var _iterator4 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
26203
26065
|
_step4;
|
|
26204
26066
|
try {
|
|
26205
26067
|
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
@@ -26405,7 +26267,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26405
26267
|
}, {
|
|
26406
26268
|
key: "hasArticleOptionStates",
|
|
26407
26269
|
get: function get() {
|
|
26408
|
-
|
|
26270
|
+
var _this$articleOptionSt;
|
|
26271
|
+
return !!((_this$articleOptionSt = this.articleOptionStatesData) !== null && _this$articleOptionSt !== void 0 && _this$articleOptionSt.length);
|
|
26409
26272
|
}
|
|
26410
26273
|
}, {
|
|
26411
26274
|
key: "articleOptionStates",
|
|
@@ -26415,23 +26278,25 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26415
26278
|
}, {
|
|
26416
26279
|
key: "articleOptionStatesKeys",
|
|
26417
26280
|
get: function get() {
|
|
26418
|
-
return
|
|
26281
|
+
return this.articleOptionStatesData.map(function (ops) {
|
|
26282
|
+
return ops.optionCodex;
|
|
26283
|
+
});
|
|
26419
26284
|
}
|
|
26420
26285
|
}, {
|
|
26421
26286
|
key: "articleOptionStatesWithParents",
|
|
26422
26287
|
get: function get() {
|
|
26423
|
-
return [].concat(_toConsumableArray(this.getReqursiveArticleOptionStates()), _toConsumableArray(this.
|
|
26288
|
+
return [].concat(_toConsumableArray(this.getReqursiveArticleOptionStates()), _toConsumableArray(this.articleOptionStatesData));
|
|
26424
26289
|
}
|
|
26425
26290
|
}, {
|
|
26426
26291
|
key: "getReqursiveArticleOptionStates",
|
|
26427
26292
|
value: function getReqursiveArticleOptionStates() {
|
|
26428
26293
|
var _this$partListParentA5, _this$partListParentA6, _this$partListParentA7, _this$partListParentA8, _this$accessoireParen3, _this$accessoireParen4, _this$accessoireParen5, _this$accessoireParen6;
|
|
26429
|
-
return [].concat(_toConsumableArray((_this$partListParentA5 = (_this$partListParentA6 = this.partListParentArticle) === null || _this$partListParentA6 === void 0 ? void 0 : _this$partListParentA6.
|
|
26294
|
+
return [].concat(_toConsumableArray((_this$partListParentA5 = (_this$partListParentA6 = this.partListParentArticle) === null || _this$partListParentA6 === void 0 ? void 0 : _this$partListParentA6.articleOptionStatesData) !== null && _this$partListParentA5 !== void 0 ? _this$partListParentA5 : []), _toConsumableArray((_this$partListParentA7 = (_this$partListParentA8 = this.partListParentArticle) === null || _this$partListParentA8 === void 0 ? void 0 : _this$partListParentA8.getReqursiveArticleOptionStates()) !== null && _this$partListParentA7 !== void 0 ? _this$partListParentA7 : []), _toConsumableArray((_this$accessoireParen3 = (_this$accessoireParen4 = this.accessoireParentArticle) === null || _this$accessoireParen4 === void 0 ? void 0 : _this$accessoireParen4.articleOptionStatesData) !== null && _this$accessoireParen3 !== void 0 ? _this$accessoireParen3 : []), _toConsumableArray((_this$accessoireParen5 = (_this$accessoireParen6 = this.accessoireParentArticle) === null || _this$accessoireParen6 === void 0 ? void 0 : _this$accessoireParen6.getReqursiveArticleOptionStates()) !== null && _this$accessoireParen5 !== void 0 ? _this$accessoireParen5 : []));
|
|
26430
26295
|
}
|
|
26431
26296
|
}, {
|
|
26432
26297
|
key: "getAllArticleOptionsStates",
|
|
26433
26298
|
value: function getAllArticleOptionsStates() {
|
|
26434
|
-
var opss = _toConsumableArray(this.articleOptionStates
|
|
26299
|
+
var opss = _toConsumableArray(this.articleOptionStates);
|
|
26435
26300
|
for (var key in this.partlistArticles) {
|
|
26436
26301
|
opss = [].concat(_toConsumableArray(opss), _toConsumableArray(this.partlistArticles[key].getAllArticleOptionsStates()));
|
|
26437
26302
|
}
|
|
@@ -26440,7 +26305,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26440
26305
|
}, {
|
|
26441
26306
|
key: "clearArticleOptionStates",
|
|
26442
26307
|
value: function clearArticleOptionStates() {
|
|
26443
|
-
this.articleOptionStatesData
|
|
26308
|
+
this.articleOptionStatesData = [];
|
|
26444
26309
|
}
|
|
26445
26310
|
}, {
|
|
26446
26311
|
key: "articleGUID",
|
|
@@ -26455,13 +26320,17 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26455
26320
|
}, {
|
|
26456
26321
|
key: "getArticleOptionStateFlat",
|
|
26457
26322
|
value: function getArticleOptionStateFlat(codex) {
|
|
26458
|
-
return this.articleOptionStatesData.
|
|
26323
|
+
return this.articleOptionStatesData.find(function (ops) {
|
|
26324
|
+
return ops.optionCodex == codex;
|
|
26325
|
+
});
|
|
26459
26326
|
}
|
|
26460
26327
|
}, {
|
|
26461
26328
|
key: "getArticleOptionState",
|
|
26462
26329
|
value: function getArticleOptionState(codex, from, checkOnAccessoireParent) {
|
|
26463
26330
|
var _this$partlistArticle3;
|
|
26464
|
-
var firstMatch = this.articleOptionStatesData.
|
|
26331
|
+
var firstMatch = this.articleOptionStatesData.find(function (ops) {
|
|
26332
|
+
return ops.optionCodex == codex;
|
|
26333
|
+
});
|
|
26465
26334
|
if (firstMatch) return firstMatch;
|
|
26466
26335
|
var parentArticle = this.partListParentArticle;
|
|
26467
26336
|
if (from !== (parentArticle === null || parentArticle === void 0 ? void 0 : parentArticle.basketId) && parentArticle !== null && parentArticle !== void 0 && parentArticle.getArticleOptionState(codex, undefined, checkOnAccessoireParent)) {
|
|
@@ -26476,7 +26345,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26476
26345
|
if (_ops) return _ops;
|
|
26477
26346
|
}
|
|
26478
26347
|
}
|
|
26479
|
-
var _iterator5 = _createForOfIteratorHelper$6(this.
|
|
26348
|
+
var _iterator5 = _createForOfIteratorHelper$6(this.articleOptionStatesData),
|
|
26480
26349
|
_step5;
|
|
26481
26350
|
try {
|
|
26482
26351
|
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
@@ -26508,7 +26377,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26508
26377
|
}, {
|
|
26509
26378
|
key: "getValueByMeasureKey",
|
|
26510
26379
|
value: function getValueByMeasureKey(measureKey) {
|
|
26511
|
-
var _iterator6 = _createForOfIteratorHelper$6(this.articleOptionStates
|
|
26380
|
+
var _iterator6 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
26512
26381
|
_step6;
|
|
26513
26382
|
try {
|
|
26514
26383
|
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
@@ -26533,7 +26402,10 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26533
26402
|
}, {
|
|
26534
26403
|
key: "uploadOptionState",
|
|
26535
26404
|
value: function uploadOptionState(articleOptionState) {
|
|
26536
|
-
this.articleOptionStatesData.
|
|
26405
|
+
var oldIndex = this.articleOptionStatesData.findIndex(function (ops) {
|
|
26406
|
+
return ops.optionCodex == articleOptionState.optionCodex;
|
|
26407
|
+
});
|
|
26408
|
+
if (oldIndex !== -1) this.articleOptionStatesData[oldIndex] = articleOptionState;else this.articleOptionStatesData.push(articleOptionState);
|
|
26537
26409
|
}
|
|
26538
26410
|
}, {
|
|
26539
26411
|
key: "partlistArticlesRules",
|
|
@@ -26592,7 +26464,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26592
26464
|
key: "typeNr",
|
|
26593
26465
|
get: function get() {
|
|
26594
26466
|
if (this.supplierOrderCodex) return this.supplierOrderCodex;
|
|
26595
|
-
var _iterator7 = _createForOfIteratorHelper$6(this.articleOptionStates
|
|
26467
|
+
var _iterator7 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
26596
26468
|
_step7;
|
|
26597
26469
|
try {
|
|
26598
26470
|
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
|
@@ -27160,7 +27032,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27160
27032
|
key: "VariantValues",
|
|
27161
27033
|
get: function get() {
|
|
27162
27034
|
var ret = {};
|
|
27163
|
-
var _iterator8 = _createForOfIteratorHelper$6(this.articleOptionStates
|
|
27035
|
+
var _iterator8 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
27164
27036
|
_step8;
|
|
27165
27037
|
try {
|
|
27166
27038
|
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
@@ -27183,7 +27055,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27183
27055
|
key: "snapshot",
|
|
27184
27056
|
get: function get() {
|
|
27185
27057
|
var ret = {};
|
|
27186
|
-
var _iterator9 = _createForOfIteratorHelper$6(this.articleOptionStates
|
|
27058
|
+
var _iterator9 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
27187
27059
|
_step9;
|
|
27188
27060
|
try {
|
|
27189
27061
|
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
@@ -27261,7 +27133,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27261
27133
|
key: "VariantValuesWithoutFreetext",
|
|
27262
27134
|
get: function get() {
|
|
27263
27135
|
var ret = {};
|
|
27264
|
-
var _iterator12 = _createForOfIteratorHelper$6(this.articleOptionStates
|
|
27136
|
+
var _iterator12 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
27265
27137
|
_step12;
|
|
27266
27138
|
try {
|
|
27267
27139
|
for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
|
|
@@ -27281,7 +27153,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27281
27153
|
key: "VariantValuesParentOption",
|
|
27282
27154
|
get: function get() {
|
|
27283
27155
|
var ret = {};
|
|
27284
|
-
var _iterator13 = _createForOfIteratorHelper$6(this.articleOptionStates
|
|
27156
|
+
var _iterator13 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
27285
27157
|
_step13;
|
|
27286
27158
|
try {
|
|
27287
27159
|
for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
|
|
@@ -27316,7 +27188,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27316
27188
|
}, {
|
|
27317
27189
|
key: "setDifferentOptions",
|
|
27318
27190
|
value: function setDifferentOptions(options) {
|
|
27319
|
-
var _iterator14 = _createForOfIteratorHelper$6(this.articleOptionStates
|
|
27191
|
+
var _iterator14 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
27320
27192
|
_step14;
|
|
27321
27193
|
try {
|
|
27322
27194
|
for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
|
|
@@ -27350,7 +27222,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27350
27222
|
get: function get() {
|
|
27351
27223
|
var hash = this.catalogCodex + '_' + this.articleCodex + '_' + this.quantity + '_';
|
|
27352
27224
|
var variantValues = [];
|
|
27353
|
-
var _iterator15 = _createForOfIteratorHelper$6(this.articleOptionStates
|
|
27225
|
+
var _iterator15 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
27354
27226
|
_step15;
|
|
27355
27227
|
try {
|
|
27356
27228
|
for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
|
|
@@ -27371,7 +27243,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27371
27243
|
key: "VariantValuesWithoutOPTandOPV",
|
|
27372
27244
|
get: function get() {
|
|
27373
27245
|
var ret = {};
|
|
27374
|
-
var _iterator16 = _createForOfIteratorHelper$6(this.articleOptionStates
|
|
27246
|
+
var _iterator16 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
27375
27247
|
_step16;
|
|
27376
27248
|
try {
|
|
27377
27249
|
for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
|
|
@@ -27405,7 +27277,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27405
27277
|
key: "getVariantValuesTillOPT",
|
|
27406
27278
|
value: function getVariantValuesTillOPT(opt) {
|
|
27407
27279
|
var ret = {};
|
|
27408
|
-
var _iterator17 = _createForOfIteratorHelper$6(this.articleOptionStates
|
|
27280
|
+
var _iterator17 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
27409
27281
|
_step17;
|
|
27410
27282
|
try {
|
|
27411
27283
|
for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
|
|
@@ -27429,14 +27301,14 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27429
27301
|
key: "areAllOptionsDefined",
|
|
27430
27302
|
get: function get() {
|
|
27431
27303
|
if (this.CatalogData.ignoreIsDefinedCheck) return true;
|
|
27432
|
-
return !
|
|
27304
|
+
return !this.articleOptionStates.find(function (ops) {
|
|
27433
27305
|
return !ops.isDefined;
|
|
27434
27306
|
});
|
|
27435
27307
|
}
|
|
27436
27308
|
}, {
|
|
27437
27309
|
key: "optionStatesWithAddToMeasure",
|
|
27438
27310
|
value: function optionStatesWithAddToMeasure(opt) {
|
|
27439
|
-
return
|
|
27311
|
+
return this.articleOptionStates.filter(function (ops) {
|
|
27440
27312
|
var _ops$addToMeasure, _ops$addToMeasure2;
|
|
27441
27313
|
return ((_ops$addToMeasure = ops.addToMeasure) === null || _ops$addToMeasure === void 0 ? void 0 : _ops$addToMeasure.find(function (o) {
|
|
27442
27314
|
return o.opt == opt;
|
|
@@ -27447,7 +27319,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27447
27319
|
key: "requiredUserInputOptions",
|
|
27448
27320
|
get: function get() {
|
|
27449
27321
|
var options = [];
|
|
27450
|
-
var _iterator18 = _createForOfIteratorHelper$6(this.articleOptionStates
|
|
27322
|
+
var _iterator18 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
27451
27323
|
_step18;
|
|
27452
27324
|
try {
|
|
27453
27325
|
for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
|
|
@@ -27547,7 +27419,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27547
27419
|
key: "getMetaData",
|
|
27548
27420
|
value: function getMetaData(locales) {
|
|
27549
27421
|
var metaDatas = locales ? this.article.catalogArticle.metaData_locales : this.article.catalogArticle.metaData;
|
|
27550
|
-
var _iterator19 = _createForOfIteratorHelper$6(this.articleOptionStates
|
|
27422
|
+
var _iterator19 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
27551
27423
|
_step19;
|
|
27552
27424
|
try {
|
|
27553
27425
|
for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
|
|
@@ -27619,67 +27491,46 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27619
27491
|
opvDoesExist = false;
|
|
27620
27492
|
var opvsInOption = refOptData.articleOptionValues;
|
|
27621
27493
|
if (refOptData.hasOPG && opvsInOption) {
|
|
27622
|
-
var
|
|
27623
|
-
|
|
27624
|
-
|
|
27625
|
-
|
|
27626
|
-
|
|
27627
|
-
|
|
27628
|
-
|
|
27629
|
-
|
|
27630
|
-
|
|
27631
|
-
if (
|
|
27632
|
-
|
|
27633
|
-
|
|
27494
|
+
for (var iKey in opvsInOption) {
|
|
27495
|
+
if (opvIsValid && anyDoShowFound) break;
|
|
27496
|
+
var opg = opvsInOption[iKey];
|
|
27497
|
+
var opvsFromOpg = opg.articleOptionValues;
|
|
27498
|
+
if (!opvsFromOpg) continue;
|
|
27499
|
+
if (refOps.visibleOptionValues[iKey]) {
|
|
27500
|
+
anyDoShowFound = true;
|
|
27501
|
+
}
|
|
27502
|
+
for (var jKey in opvsFromOpg) {
|
|
27503
|
+
if (refOps.visibleOptionValues[iKey]) {
|
|
27504
|
+
var parentName = opvsFromOpg[jKey].parentName;
|
|
27505
|
+
if (parentName) {
|
|
27506
|
+
alternativeOPV[jKey] = parentName;
|
|
27507
|
+
} else {
|
|
27508
|
+
alternativeOPV[jKey] = opvsFromOpg[jKey].name;
|
|
27509
|
+
}
|
|
27634
27510
|
}
|
|
27635
|
-
|
|
27636
|
-
|
|
27637
|
-
|
|
27638
|
-
|
|
27639
|
-
|
|
27640
|
-
|
|
27641
|
-
|
|
27642
|
-
if (refOps.visibleOptionValues.get(iKey)) {
|
|
27643
|
-
var parentName = opv.parentName;
|
|
27644
|
-
if (parentName) {
|
|
27645
|
-
alternativeOPV[jKey] = parentName;
|
|
27646
|
-
} else {
|
|
27647
|
-
alternativeOPV[jKey] = opv.name;
|
|
27648
|
-
}
|
|
27649
|
-
}
|
|
27650
|
-
if (jKey == curOpvValue) {
|
|
27651
|
-
//Der Artikel darf den Optionswert von der BaseOption übernehmen
|
|
27652
|
-
opvDoesExist = true;
|
|
27653
|
-
if (refOps.visibleOptionValues.get(iKey)) {
|
|
27654
|
-
refOps.defaultOPV = curOpvValue;
|
|
27655
|
-
optToChange[refOptCodex] = curOpvValue;
|
|
27656
|
-
opvIsValid = true;
|
|
27657
|
-
}
|
|
27658
|
-
break;
|
|
27659
|
-
}
|
|
27511
|
+
if (jKey == curOpvValue) {
|
|
27512
|
+
//Der Artikel darf den Optionswert von der BaseOption übernehmen
|
|
27513
|
+
opvDoesExist = true;
|
|
27514
|
+
if (refOps.visibleOptionValues[iKey]) {
|
|
27515
|
+
refOps.defaultOPV = curOpvValue;
|
|
27516
|
+
optToChange[refOptCodex] = curOpvValue;
|
|
27517
|
+
opvIsValid = true;
|
|
27660
27518
|
}
|
|
27661
|
-
|
|
27662
|
-
_iterator21.e(err);
|
|
27663
|
-
} finally {
|
|
27664
|
-
_iterator21.f();
|
|
27519
|
+
break;
|
|
27665
27520
|
}
|
|
27666
27521
|
}
|
|
27667
|
-
} catch (err) {
|
|
27668
|
-
_iterator20.e(err);
|
|
27669
|
-
} finally {
|
|
27670
|
-
_iterator20.f();
|
|
27671
27522
|
}
|
|
27672
27523
|
} else if (opvsInOption) {
|
|
27673
27524
|
for (var _iKey in opvsInOption) {
|
|
27674
27525
|
if (opvIsValid && anyDoShowFound) break;
|
|
27675
|
-
if (refOps.visibleOptionValues
|
|
27526
|
+
if (refOps.visibleOptionValues[_iKey]) {
|
|
27676
27527
|
anyDoShowFound = true;
|
|
27677
|
-
alternativeOPV[_iKey] = opvsInOption
|
|
27528
|
+
alternativeOPV[_iKey] = opvsInOption[_iKey].name;
|
|
27678
27529
|
}
|
|
27679
27530
|
if (_iKey == curOpvValue || this.hasType1Dependencies && curOpvValue.replace('OPV' + opt.substring(3), '') == _iKey.replace('OPV' + refOps.optionCodex.substring(3), '')) {
|
|
27680
27531
|
//Der Artikel darf den Optionswert von der BaseOption übernehmen
|
|
27681
27532
|
opvDoesExist = true;
|
|
27682
|
-
if (refOps.visibleOptionValues
|
|
27533
|
+
if (refOps.visibleOptionValues[_iKey]) {
|
|
27683
27534
|
refOps.defaultOPV = _iKey;
|
|
27684
27535
|
optToChange[refOptCodex] = _iKey;
|
|
27685
27536
|
if (optToChange[opt + '_val']) {
|
|
@@ -27738,11 +27589,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27738
27589
|
for (var _i3 = 0; _i3 < articles.length; _i3++) {
|
|
27739
27590
|
var variantValues = {};
|
|
27740
27591
|
var accessoire = articles[_i3];
|
|
27741
|
-
var
|
|
27742
|
-
|
|
27592
|
+
var _iterator20 = _createForOfIteratorHelper$6(accessoire.articleOptionStates),
|
|
27593
|
+
_step20;
|
|
27743
27594
|
try {
|
|
27744
|
-
for (
|
|
27745
|
-
var ops =
|
|
27595
|
+
for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
|
|
27596
|
+
var ops = _step20.value;
|
|
27746
27597
|
if (singleOpts.includes(ops.optionCodex)) {
|
|
27747
27598
|
if (accessoire.hasType1Dependencies) {
|
|
27748
27599
|
variantValues[ops.optionCodex] = curOpvValue.replace('OPV' + opt.substring(3), 'OPV' + ops.optionCodex.substring(3));
|
|
@@ -27752,9 +27603,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27752
27603
|
}
|
|
27753
27604
|
}
|
|
27754
27605
|
} catch (err) {
|
|
27755
|
-
|
|
27606
|
+
_iterator20.e(err);
|
|
27756
27607
|
} finally {
|
|
27757
|
-
|
|
27608
|
+
_iterator20.f();
|
|
27758
27609
|
}
|
|
27759
27610
|
if (Object.entries(variantValues).length > 0) accessoiresToUpdate[accessoire.basketId] = {
|
|
27760
27611
|
accessoire: accessoire,
|
|
@@ -27770,11 +27621,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27770
27621
|
value: function getGlobalOptions() {
|
|
27771
27622
|
var ret = {};
|
|
27772
27623
|
var opss = this.articleOptionStatesWithParents;
|
|
27773
|
-
var
|
|
27774
|
-
|
|
27624
|
+
var _iterator21 = _createForOfIteratorHelper$6(opss),
|
|
27625
|
+
_step21;
|
|
27775
27626
|
try {
|
|
27776
|
-
for (
|
|
27777
|
-
var ops =
|
|
27627
|
+
for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
|
|
27628
|
+
var ops = _step21.value;
|
|
27778
27629
|
var value = ops.option.isDefaultValueForOptions;
|
|
27779
27630
|
if (value) {
|
|
27780
27631
|
var entires = value.split(';');
|
|
@@ -27783,9 +27634,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27783
27634
|
}
|
|
27784
27635
|
}
|
|
27785
27636
|
} catch (err) {
|
|
27786
|
-
|
|
27637
|
+
_iterator21.e(err);
|
|
27787
27638
|
} finally {
|
|
27788
|
-
|
|
27639
|
+
_iterator21.f();
|
|
27789
27640
|
}
|
|
27790
27641
|
return ret;
|
|
27791
27642
|
}
|
|
@@ -27825,34 +27676,34 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27825
27676
|
}
|
|
27826
27677
|
if (Object.keys(ret.opt).length === 0) {
|
|
27827
27678
|
//nicht gefunden - jetzt OCD kontrollieren
|
|
27828
|
-
var
|
|
27829
|
-
|
|
27679
|
+
var _iterator22 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
27680
|
+
_step22;
|
|
27830
27681
|
try {
|
|
27831
|
-
for (
|
|
27832
|
-
var _ops4 =
|
|
27682
|
+
for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
|
|
27683
|
+
var _ops4 = _step22.value;
|
|
27833
27684
|
if (_ops4.option.ocd == optionCodex && _ops4.isDoShow && (parentOptionCodex == '' || parentOptionCodex == _ops4.option.parentOptionCodex)) {
|
|
27834
27685
|
ret = this.checkOptionSearchOPV(_ops4.option, optionValueCodex, ret);
|
|
27835
27686
|
}
|
|
27836
27687
|
}
|
|
27837
27688
|
//fallback for pfister classification usecase
|
|
27838
27689
|
} catch (err) {
|
|
27839
|
-
|
|
27690
|
+
_iterator22.e(err);
|
|
27840
27691
|
} finally {
|
|
27841
|
-
|
|
27692
|
+
_iterator22.f();
|
|
27842
27693
|
}
|
|
27843
|
-
var
|
|
27844
|
-
|
|
27694
|
+
var _iterator23 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
27695
|
+
_step23;
|
|
27845
27696
|
try {
|
|
27846
|
-
for (
|
|
27847
|
-
var _ops5 =
|
|
27697
|
+
for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {
|
|
27698
|
+
var _ops5 = _step23.value;
|
|
27848
27699
|
if (_ops5.option.ocd == optionCodex && optionCodex !== null && optionCodex !== void 0 && optionCodex.startsWith('OPTOPT') && (parentOptionCodex == '' || parentOptionCodex == _ops5.option.parentOptionCodex)) {
|
|
27849
27700
|
return this.checkOptionSearchOPV(_ops5.option, optionValueCodex, ret);
|
|
27850
27701
|
}
|
|
27851
27702
|
}
|
|
27852
27703
|
} catch (err) {
|
|
27853
|
-
|
|
27704
|
+
_iterator23.e(err);
|
|
27854
27705
|
} finally {
|
|
27855
|
-
|
|
27706
|
+
_iterator23.f();
|
|
27856
27707
|
}
|
|
27857
27708
|
}
|
|
27858
27709
|
}
|
|
@@ -27868,89 +27719,46 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27868
27719
|
}
|
|
27869
27720
|
if (myOPT.hasOPG) {
|
|
27870
27721
|
var myOPGs = myOPT.articleOptionValues;
|
|
27871
|
-
var
|
|
27872
|
-
|
|
27873
|
-
|
|
27874
|
-
|
|
27875
|
-
|
|
27876
|
-
|
|
27877
|
-
|
|
27878
|
-
var myOPVs
|
|
27879
|
-
|
|
27880
|
-
|
|
27881
|
-
|
|
27882
|
-
|
|
27883
|
-
if (!found) {
|
|
27884
|
-
var _iterator27 = _createForOfIteratorHelper$6(myOPVs),
|
|
27885
|
-
_step27;
|
|
27886
|
-
try {
|
|
27887
|
-
for (_iterator27.s(); !(_step27 = _iterator27.n()).done;) {
|
|
27888
|
-
var _step27$value = _slicedToArray(_step27.value, 2),
|
|
27889
|
-
jKey = _step27$value[0],
|
|
27890
|
-
opv = _step27$value[1];
|
|
27891
|
-
if (opv.ocd == optionValueCodex || opv.codex == optionValueCodex || optionValueCodex === 'OPVOPV_NICHT_RELEVANT' && jKey.startsWith('OPVOPV_NICHT_RELEVANT')) {
|
|
27892
|
-
ret.opv = opv;
|
|
27893
|
-
found = true;
|
|
27894
|
-
break;
|
|
27895
|
-
}
|
|
27896
|
-
}
|
|
27897
|
-
} catch (err) {
|
|
27898
|
-
_iterator27.e(err);
|
|
27899
|
-
} finally {
|
|
27900
|
-
_iterator27.f();
|
|
27722
|
+
for (var iKey in myOPGs) {
|
|
27723
|
+
var myOPVs = myOPGs[iKey].articleOptionValues;
|
|
27724
|
+
if (myOPVs && myOPVs[optionValueCodex]) {
|
|
27725
|
+
ret.opv = myOPVs[optionValueCodex];
|
|
27726
|
+
found = true;
|
|
27727
|
+
}
|
|
27728
|
+
if (!found) {
|
|
27729
|
+
for (var jKey in myOPVs) {
|
|
27730
|
+
if (myOPVs[jKey].ocd == optionValueCodex || myOPVs[jKey].codex == optionValueCodex || optionValueCodex === 'OPVOPV_NICHT_RELEVANT' && jKey.startsWith('OPVOPV_NICHT_RELEVANT')) {
|
|
27731
|
+
ret.opv = myOPVs[jKey];
|
|
27732
|
+
found = true;
|
|
27733
|
+
break;
|
|
27901
27734
|
}
|
|
27902
27735
|
}
|
|
27903
|
-
|
|
27904
|
-
|
|
27905
|
-
|
|
27906
|
-
|
|
27907
|
-
|
|
27908
|
-
|
|
27909
|
-
|
|
27910
|
-
|
|
27911
|
-
if (_opv.ocd && _opv.ocd.startsWith(optionValueCodex) || _opv.codex.startsWith(optionValueCodex)) {
|
|
27912
|
-
ret.opv = _opv;
|
|
27913
|
-
found = true;
|
|
27914
|
-
break;
|
|
27915
|
-
}
|
|
27916
|
-
}
|
|
27917
|
-
} catch (err) {
|
|
27918
|
-
_iterator28.e(err);
|
|
27919
|
-
} finally {
|
|
27920
|
-
_iterator28.f();
|
|
27736
|
+
}
|
|
27737
|
+
if (!found && myOPT.parentOptionCodex) {
|
|
27738
|
+
for (var _jKey in myOPVs) {
|
|
27739
|
+
var opv = myOPVs[_jKey];
|
|
27740
|
+
if (opv.ocd && opv.ocd.startsWith(optionValueCodex) || opv.codex.startsWith(optionValueCodex)) {
|
|
27741
|
+
ret.opv = myOPVs[_jKey];
|
|
27742
|
+
found = true;
|
|
27743
|
+
break;
|
|
27921
27744
|
}
|
|
27922
27745
|
}
|
|
27923
|
-
if (ret.opv && Object.entries(ret.opv).length != 0) break;
|
|
27924
27746
|
}
|
|
27925
|
-
|
|
27926
|
-
_iterator26.e(err);
|
|
27927
|
-
} finally {
|
|
27928
|
-
_iterator26.f();
|
|
27747
|
+
if (ret.opv && Object.entries(ret.opv).length != 0) break;
|
|
27929
27748
|
}
|
|
27930
27749
|
} else {
|
|
27931
27750
|
var _myOPVs = myOPT.articleOptionValues;
|
|
27932
|
-
if (_myOPVs && _myOPVs
|
|
27933
|
-
ret.opv = _myOPVs
|
|
27751
|
+
if (_myOPVs && _myOPVs[optionValueCodex]) {
|
|
27752
|
+
ret.opv = _myOPVs[optionValueCodex];
|
|
27934
27753
|
found = true;
|
|
27935
27754
|
}
|
|
27936
27755
|
if (!found) {
|
|
27937
|
-
var
|
|
27938
|
-
|
|
27939
|
-
|
|
27940
|
-
|
|
27941
|
-
|
|
27942
|
-
_jKey2 = _step29$value[0],
|
|
27943
|
-
_opv2 = _step29$value[1];
|
|
27944
|
-
if (_opv2.ocd == optionValueCodex || optionValueCodex === 'OPVOPV_NICHT_RELEVANT' && _jKey2.startsWith('OPVOPV_NICHT_RELEVANT')) {
|
|
27945
|
-
ret.opv = _opv2;
|
|
27946
|
-
found = true;
|
|
27947
|
-
break;
|
|
27948
|
-
}
|
|
27756
|
+
for (var _jKey2 in _myOPVs) {
|
|
27757
|
+
if (_myOPVs[_jKey2].ocd == optionValueCodex || optionValueCodex === 'OPVOPV_NICHT_RELEVANT' && _jKey2.startsWith('OPVOPV_NICHT_RELEVANT')) {
|
|
27758
|
+
ret.opv = _myOPVs[_jKey2];
|
|
27759
|
+
found = true;
|
|
27760
|
+
break;
|
|
27949
27761
|
}
|
|
27950
|
-
} catch (err) {
|
|
27951
|
-
_iterator29.e(err);
|
|
27952
|
-
} finally {
|
|
27953
|
-
_iterator29.f();
|
|
27954
27762
|
}
|
|
27955
27763
|
}
|
|
27956
27764
|
}
|
|
@@ -27960,11 +27768,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27960
27768
|
key: "getArticleJsonVariantValues",
|
|
27961
27769
|
value: function getArticleJsonVariantValues() {
|
|
27962
27770
|
var retval = {};
|
|
27963
|
-
var
|
|
27964
|
-
|
|
27771
|
+
var _iterator24 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
27772
|
+
_step24;
|
|
27965
27773
|
try {
|
|
27966
|
-
for (
|
|
27967
|
-
var ops =
|
|
27774
|
+
for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {
|
|
27775
|
+
var ops = _step24.value;
|
|
27968
27776
|
if (ops.valCodex) {
|
|
27969
27777
|
retval[ops.optionCodex] = ops.valCodex;
|
|
27970
27778
|
var opsVal = this.getArticleOptionStateFlat(ops.optionCodex + '_val');
|
|
@@ -27977,9 +27785,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27977
27785
|
}
|
|
27978
27786
|
}
|
|
27979
27787
|
} catch (err) {
|
|
27980
|
-
|
|
27788
|
+
_iterator24.e(err);
|
|
27981
27789
|
} finally {
|
|
27982
|
-
|
|
27790
|
+
_iterator24.f();
|
|
27983
27791
|
}
|
|
27984
27792
|
return retval;
|
|
27985
27793
|
}
|
|
@@ -27997,13 +27805,13 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27997
27805
|
}, {
|
|
27998
27806
|
key: "handleMultiselect",
|
|
27999
27807
|
value: function handleMultiselect(ops, newConfigValues, key) {
|
|
28000
|
-
var
|
|
27808
|
+
var _this3 = this;
|
|
28001
27809
|
var _this$parentOptionCod3 = this.parentOptionCodex(key),
|
|
28002
27810
|
optionCodex = _this$parentOptionCod3.optionCodex,
|
|
28003
27811
|
partenOptionCodex = _this$parentOptionCod3.partenOptionCodex;
|
|
28004
27812
|
var codexes = newConfigValues[key].split(';');
|
|
28005
27813
|
var values = codexes.map(function (c) {
|
|
28006
|
-
return
|
|
27814
|
+
return _this3.checkOptionAndOptionValue(optionCodex, c, partenOptionCodex);
|
|
28007
27815
|
}).filter(function (c) {
|
|
28008
27816
|
return Object.keys(c.opv).length;
|
|
28009
27817
|
});
|
|
@@ -28026,11 +27834,10 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28026
27834
|
if (codexes[0] === 'EMPTY_MULTISELECT') {
|
|
28027
27835
|
var firstOPV;
|
|
28028
27836
|
if (ops.option.hasOPG) {
|
|
28029
|
-
var
|
|
28030
|
-
|
|
28031
|
-
firstOPV = Array.from((_opg$articleOptionVal = (_opg$articleOptionVal2 = opg.articleOptionValues) === null || _opg$articleOptionVal2 === void 0 ? void 0 : _opg$articleOptionVal2.values()) !== null && _opg$articleOptionVal !== void 0 ? _opg$articleOptionVal : [])[0];
|
|
27837
|
+
var opg = ops.option.articleOptionValues[Object.keys(ops.option.articleOptionValues)[0]];
|
|
27838
|
+
firstOPV = opg.articleOptionValues[Object.keys(opg.articleOptionValues)[0]];
|
|
28032
27839
|
} else {
|
|
28033
|
-
firstOPV =
|
|
27840
|
+
firstOPV = ops.option.articleOptionValues[Object.keys(ops.option.articleOptionValues)[0]];
|
|
28034
27841
|
}
|
|
28035
27842
|
ops.multiSelects = [firstOPV];
|
|
28036
27843
|
newConfigValues[ops.option.codex] = firstOPV.codex;
|
|
@@ -28064,47 +27871,28 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28064
27871
|
var _this$checkOptionAndO = this.checkOptionAndOptionValue(optionCodex, newConfigValues[key], partenOptionCodex),
|
|
28065
27872
|
opv = _this$checkOptionAndO.opv;
|
|
28066
27873
|
if (!Object.keys(opv).length) {
|
|
28067
|
-
var
|
|
28068
|
-
if (
|
|
27874
|
+
var _opv = this.findFreeTextOpv(ops);
|
|
27875
|
+
if (_opv) newConfigValues[key] = _opv.codex;
|
|
28069
27876
|
}
|
|
28070
27877
|
}
|
|
28071
27878
|
}
|
|
28072
27879
|
}, {
|
|
28073
27880
|
key: "findFreeTextOpv",
|
|
28074
27881
|
value: function findFreeTextOpv(ops) {
|
|
28075
|
-
var
|
|
28076
|
-
|
|
28077
|
-
|
|
28078
|
-
|
|
28079
|
-
var _step31$value = _slicedToArray(_step31.value, 2),
|
|
28080
|
-
key = _step31$value[0],
|
|
28081
|
-
opv = _step31$value[1];
|
|
28082
|
-
if (opv.isFreeText) {
|
|
28083
|
-
return opv;
|
|
28084
|
-
}
|
|
27882
|
+
for (var key in ops.visibleOptionValues) {
|
|
27883
|
+
var opv = ops.visibleOptionValues[key];
|
|
27884
|
+
if (opv.isFreeText) {
|
|
27885
|
+
return opv;
|
|
28085
27886
|
}
|
|
28086
|
-
} catch (err) {
|
|
28087
|
-
_iterator31.e(err);
|
|
28088
|
-
} finally {
|
|
28089
|
-
_iterator31.f();
|
|
28090
27887
|
}
|
|
28091
27888
|
return undefined;
|
|
28092
27889
|
}
|
|
28093
27890
|
}, {
|
|
28094
27891
|
key: "defineAllOptions",
|
|
28095
27892
|
value: function defineAllOptions() {
|
|
28096
|
-
|
|
28097
|
-
|
|
28098
|
-
|
|
28099
|
-
for (_iterator32.s(); !(_step32 = _iterator32.n()).done;) {
|
|
28100
|
-
var ops = _step32.value;
|
|
28101
|
-
ops.isDefined = true;
|
|
28102
|
-
}
|
|
28103
|
-
} catch (err) {
|
|
28104
|
-
_iterator32.e(err);
|
|
28105
|
-
} finally {
|
|
28106
|
-
_iterator32.f();
|
|
28107
|
-
}
|
|
27893
|
+
this.articleOptionStates.map(function (ops) {
|
|
27894
|
+
return ops.isDefined = true;
|
|
27895
|
+
});
|
|
28108
27896
|
}
|
|
28109
27897
|
}, {
|
|
28110
27898
|
key: "defineOP",
|
|
@@ -28115,32 +27903,22 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28115
27903
|
}, {
|
|
28116
27904
|
key: "getDefaultOpv",
|
|
28117
27905
|
value: function getDefaultOpv(visibleOptionValues) {
|
|
28118
|
-
var
|
|
28119
|
-
|
|
28120
|
-
|
|
28121
|
-
|
|
28122
|
-
var
|
|
28123
|
-
|
|
28124
|
-
|
|
28125
|
-
if (
|
|
28126
|
-
|
|
28127
|
-
var defaultOPV = Array.from((_opv$articleOptionVal = (_opv$articleOptionVal2 = opv.articleOptionValues) === null || _opv$articleOptionVal2 === void 0 ? void 0 : _opv$articleOptionVal2.values()) !== null && _opv$articleOptionVal !== void 0 ? _opv$articleOptionVal : []).find(function (opv) {
|
|
28128
|
-
return opv.defaultValue;
|
|
28129
|
-
});
|
|
28130
|
-
if (defaultOPV) {
|
|
28131
|
-
return defaultOPV;
|
|
28132
|
-
}
|
|
28133
|
-
}
|
|
28134
|
-
if (opv.defaultValue) {
|
|
28135
|
-
return opv;
|
|
27906
|
+
for (var iKey in visibleOptionValues) {
|
|
27907
|
+
var opv = visibleOptionValues[iKey];
|
|
27908
|
+
if (opv.isOPVG) {
|
|
27909
|
+
var _opv$articleOptionVal;
|
|
27910
|
+
var defaultOPV = Object.values((_opv$articleOptionVal = opv.articleOptionValues) !== null && _opv$articleOptionVal !== void 0 ? _opv$articleOptionVal : {}).find(function (opv) {
|
|
27911
|
+
return opv.defaultValue;
|
|
27912
|
+
});
|
|
27913
|
+
if (defaultOPV) {
|
|
27914
|
+
return defaultOPV;
|
|
28136
27915
|
}
|
|
28137
27916
|
}
|
|
28138
|
-
|
|
28139
|
-
|
|
28140
|
-
|
|
28141
|
-
_iterator33.f();
|
|
27917
|
+
if (opv.defaultValue) {
|
|
27918
|
+
return opv;
|
|
27919
|
+
}
|
|
28142
27920
|
}
|
|
28143
|
-
return
|
|
27921
|
+
return visibleOptionValues[Object.keys(visibleOptionValues)[0]];
|
|
28144
27922
|
}
|
|
28145
27923
|
}, {
|
|
28146
27924
|
key: "getVariantValuesInfluencingOptions",
|
|
@@ -28167,7 +27945,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28167
27945
|
var newVvs2 = this.engine.getValuesInfluencingOPT(key, vv[key]);
|
|
28168
27946
|
if (newVvs2.length) {
|
|
28169
27947
|
for (var j = 0; j < newVvs2.length; j++) {
|
|
28170
|
-
newVvs[j] = _objectSpread$
|
|
27948
|
+
newVvs[j] = _objectSpread$e(_objectSpread$e({}, vv), newVvs2[j]);
|
|
28171
27949
|
}
|
|
28172
27950
|
}
|
|
28173
27951
|
}
|
|
@@ -28246,7 +28024,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28246
28024
|
break;
|
|
28247
28025
|
}
|
|
28248
28026
|
_context.next = 4;
|
|
28249
|
-
return import('./ShelfPlanner-
|
|
28027
|
+
return import('./ShelfPlanner-467314ca.js');
|
|
28250
28028
|
case 4:
|
|
28251
28029
|
_yield$import = _context.sent;
|
|
28252
28030
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -28323,19 +28101,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28323
28101
|
value: function afterInit() {
|
|
28324
28102
|
if (!this.CatalogData.useDiomexConfigLogic) return {};
|
|
28325
28103
|
var variantValues = {};
|
|
28326
|
-
var
|
|
28327
|
-
|
|
28328
|
-
|
|
28329
|
-
|
|
28330
|
-
var ops = _step34.value;
|
|
28331
|
-
if (ops.val === undefined && ops.visibleOPVKeys.length && !ops.isInvisible) {
|
|
28332
|
-
variantValues[ops.optionCodex] = ops.visibleOPVKeys[0];
|
|
28333
|
-
}
|
|
28104
|
+
for (var i = 0; i < this.articleOptionStates.length; i++) {
|
|
28105
|
+
var ops = this.articleOptionStates[i];
|
|
28106
|
+
if (ops.val === undefined && ops.visibleOPVKeys.length && !ops.isInvisible) {
|
|
28107
|
+
variantValues[ops.optionCodex] = ops.visibleOPVKeys[0];
|
|
28334
28108
|
}
|
|
28335
|
-
} catch (err) {
|
|
28336
|
-
_iterator34.e(err);
|
|
28337
|
-
} finally {
|
|
28338
|
-
_iterator34.f();
|
|
28339
28109
|
}
|
|
28340
28110
|
return variantValues;
|
|
28341
28111
|
}
|
|
@@ -28359,40 +28129,30 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28359
28129
|
for (var _key in myValues) {
|
|
28360
28130
|
var ops = this.getArticleOptionState(_key);
|
|
28361
28131
|
if (!ops) continue;
|
|
28362
|
-
var opv = ops === null || ops === void 0 ? void 0 : ops.visibleOptionValues
|
|
28132
|
+
var opv = ops === null || ops === void 0 ? void 0 : ops.visibleOptionValues[myValues[_key]];
|
|
28363
28133
|
if (opv) {
|
|
28364
28134
|
var value = opv.setConfig;
|
|
28365
28135
|
if (value) {
|
|
28366
28136
|
for (var _i4 = 0; _i4 < value.split(';').length; _i4++) {
|
|
28367
28137
|
var opt = (!this.CatalogData.isIDMFormat ? 'OPT' : '') + value.split(';')[_i4].split(':')[0];
|
|
28368
|
-
var
|
|
28138
|
+
var _opv2 = (!this.CatalogData.isIDMFormat ? 'OPV' : '') + value.split(';')[_i4].split(':')[1];
|
|
28369
28139
|
if (!myValues[opt] || setConfigDoesOverWrite) {
|
|
28370
|
-
myValues[opt] =
|
|
28140
|
+
myValues[opt] = _opv2;
|
|
28371
28141
|
}
|
|
28372
28142
|
}
|
|
28373
28143
|
}
|
|
28374
28144
|
}
|
|
28375
|
-
var catalogopv = ops.option.articleOptionValues
|
|
28145
|
+
var catalogopv = ops.option.articleOptionValues[myValues[_key]];
|
|
28376
28146
|
if (catalogopv !== null && catalogopv !== void 0 && catalogopv.sameopv) {
|
|
28377
28147
|
var opvs = ops.option.articleOptionValues;
|
|
28378
|
-
var
|
|
28379
|
-
|
|
28380
|
-
|
|
28381
|
-
|
|
28382
|
-
|
|
28383
|
-
|
|
28384
|
-
checkingOpv = _step35$value[1];
|
|
28385
|
-
if (opvKey === catalogopv.codex) continue;
|
|
28386
|
-
if (checkingOpv !== null && checkingOpv !== void 0 && checkingOpv.sameopv && catalogopv.sameopv == checkingOpv.sameopv) {
|
|
28387
|
-
if (!ops.visibleOptionValues.get(catalogopv.codex) && ops.visibleOptionValues.get(checkingOpv.codex)) {
|
|
28388
|
-
myValues[_key] = checkingOpv.codex;
|
|
28389
|
-
}
|
|
28148
|
+
for (var opvKey in opvs) {
|
|
28149
|
+
var checkingOpv = opvs[opvKey];
|
|
28150
|
+
if (opvKey === catalogopv.codex) continue;
|
|
28151
|
+
if (checkingOpv !== null && checkingOpv !== void 0 && checkingOpv.sameopv && catalogopv.sameopv == checkingOpv.sameopv) {
|
|
28152
|
+
if (!ops.visibleOptionValues[catalogopv.codex] && ops.visibleOptionValues[checkingOpv.codex]) {
|
|
28153
|
+
myValues[_key] = checkingOpv.codex;
|
|
28390
28154
|
}
|
|
28391
28155
|
}
|
|
28392
|
-
} catch (err) {
|
|
28393
|
-
_iterator35.e(err);
|
|
28394
|
-
} finally {
|
|
28395
|
-
_iterator35.f();
|
|
28396
28156
|
}
|
|
28397
28157
|
}
|
|
28398
28158
|
}
|
|
@@ -28403,20 +28163,20 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28403
28163
|
} else if (_key2.endsWith('_val') && this.getArticleOptionState(_key2.replace(/_val/g, ''))) {
|
|
28404
28164
|
validValues[_key2] = myValues[_key2];
|
|
28405
28165
|
} else {
|
|
28406
|
-
var
|
|
28407
|
-
|
|
28166
|
+
var _iterator25 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
28167
|
+
_step25;
|
|
28408
28168
|
try {
|
|
28409
|
-
for (
|
|
28410
|
-
var _ops7 =
|
|
28169
|
+
for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {
|
|
28170
|
+
var _ops7 = _step25.value;
|
|
28411
28171
|
if (_ops7.optionOcd == _key2) {
|
|
28412
28172
|
var values = this.checkOptionSearchOPV(_ops7.option, myValues[_key2], {});
|
|
28413
28173
|
if (values !== null && values !== void 0 && values.opv) validValues[_ops7.optionCodex] = values.opv.codex;
|
|
28414
28174
|
}
|
|
28415
28175
|
}
|
|
28416
28176
|
} catch (err) {
|
|
28417
|
-
|
|
28177
|
+
_iterator25.e(err);
|
|
28418
28178
|
} finally {
|
|
28419
|
-
|
|
28179
|
+
_iterator25.f();
|
|
28420
28180
|
}
|
|
28421
28181
|
}
|
|
28422
28182
|
//for classification usecase when suboption and option have the same name like OPTOPT_MATERIAL_1_00 and OPTOPT_MATERIAL_1_00.OPTOPT_MATERIAL_1_00
|
|
@@ -28480,17 +28240,17 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28480
28240
|
key: "addOptionStateFromArticleToPlannerData",
|
|
28481
28241
|
value: function addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo) {
|
|
28482
28242
|
var articleOptions = this.getArticleOptionStatesWithOptionsForPrint();
|
|
28483
|
-
var
|
|
28484
|
-
|
|
28243
|
+
var _iterator26 = _createForOfIteratorHelper$6(articleOptions),
|
|
28244
|
+
_step26;
|
|
28485
28245
|
try {
|
|
28486
|
-
for (
|
|
28487
|
-
var ops =
|
|
28246
|
+
for (_iterator26.s(); !(_step26 = _iterator26.n()).done;) {
|
|
28247
|
+
var ops = _step26.value;
|
|
28488
28248
|
this.addOptionStateToPlannerData(ret, ops, alternateRenderInfo);
|
|
28489
28249
|
}
|
|
28490
28250
|
} catch (err) {
|
|
28491
|
-
|
|
28251
|
+
_iterator26.e(err);
|
|
28492
28252
|
} finally {
|
|
28493
|
-
|
|
28253
|
+
_iterator26.f();
|
|
28494
28254
|
}
|
|
28495
28255
|
for (var key in this.article.partlistArticles) {
|
|
28496
28256
|
var partlistArticle = this.article.partlistArticles[key];
|
|
@@ -28542,11 +28302,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28542
28302
|
key: "getAccessoireMATData",
|
|
28543
28303
|
value: function getAccessoireMATData(onString) {
|
|
28544
28304
|
var MAT = [];
|
|
28545
|
-
var
|
|
28546
|
-
|
|
28305
|
+
var _iterator27 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
28306
|
+
_step27;
|
|
28547
28307
|
try {
|
|
28548
|
-
for (
|
|
28549
|
-
var ops =
|
|
28308
|
+
for (_iterator27.s(); !(_step27 = _iterator27.n()).done;) {
|
|
28309
|
+
var ops = _step27.value;
|
|
28550
28310
|
var opt = void 0;
|
|
28551
28311
|
if (!ops.val) continue;
|
|
28552
28312
|
opt = ops.optionCodex;
|
|
@@ -28559,9 +28319,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28559
28319
|
});
|
|
28560
28320
|
}
|
|
28561
28321
|
} catch (err) {
|
|
28562
|
-
|
|
28322
|
+
_iterator27.e(err);
|
|
28563
28323
|
} finally {
|
|
28564
|
-
|
|
28324
|
+
_iterator27.f();
|
|
28565
28325
|
}
|
|
28566
28326
|
return MAT;
|
|
28567
28327
|
}
|
|
@@ -28603,11 +28363,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28603
28363
|
value: function getVariantBasketData() {
|
|
28604
28364
|
var variantBasketData = [];
|
|
28605
28365
|
var articleOptions = this.getArticleOptionStatesWithOptionsForPrint();
|
|
28606
|
-
var
|
|
28607
|
-
|
|
28366
|
+
var _iterator28 = _createForOfIteratorHelper$6(articleOptions),
|
|
28367
|
+
_step28;
|
|
28608
28368
|
try {
|
|
28609
|
-
for (
|
|
28610
|
-
var ops =
|
|
28369
|
+
for (_iterator28.s(); !(_step28 = _iterator28.n()).done;) {
|
|
28370
|
+
var ops = _step28.value;
|
|
28611
28371
|
var OP = ops.optionCodex;
|
|
28612
28372
|
if (ops) {
|
|
28613
28373
|
var _ops$idmVariantenArt2;
|
|
@@ -28674,9 +28434,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28674
28434
|
}
|
|
28675
28435
|
}
|
|
28676
28436
|
} catch (err) {
|
|
28677
|
-
|
|
28437
|
+
_iterator28.e(err);
|
|
28678
28438
|
} finally {
|
|
28679
|
-
|
|
28439
|
+
_iterator28.f();
|
|
28680
28440
|
}
|
|
28681
28441
|
return variantBasketData;
|
|
28682
28442
|
}
|
|
@@ -28845,19 +28605,19 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28845
28605
|
}, {
|
|
28846
28606
|
key: "cloneArticle",
|
|
28847
28607
|
value: function cloneArticle(set) {
|
|
28848
|
-
var clonedArticle = new DivaArticle(set, this.basketId, _objectSpread$
|
|
28849
|
-
clonedArticle.articleOptionStatesData =
|
|
28850
|
-
var
|
|
28851
|
-
|
|
28608
|
+
var clonedArticle = new DivaArticle(set, this.basketId, _objectSpread$e({}, this.article), this.article.catalogArticle, set.CatalogData);
|
|
28609
|
+
clonedArticle.articleOptionStatesData = [];
|
|
28610
|
+
var _iterator29 = _createForOfIteratorHelper$6(this.articleOptionStates),
|
|
28611
|
+
_step29;
|
|
28852
28612
|
try {
|
|
28853
|
-
for (
|
|
28854
|
-
var ops =
|
|
28855
|
-
clonedArticle.articleOptionStatesData.
|
|
28613
|
+
for (_iterator29.s(); !(_step29 = _iterator29.n()).done;) {
|
|
28614
|
+
var ops = _step29.value;
|
|
28615
|
+
clonedArticle.articleOptionStatesData.push(ops.cloneOptionState(clonedArticle.getIsConfigSingle));
|
|
28856
28616
|
}
|
|
28857
28617
|
} catch (err) {
|
|
28858
|
-
|
|
28618
|
+
_iterator29.e(err);
|
|
28859
28619
|
} finally {
|
|
28860
|
-
|
|
28620
|
+
_iterator29.f();
|
|
28861
28621
|
}
|
|
28862
28622
|
clonedArticle.initEngine();
|
|
28863
28623
|
clonedArticle.article.partlistArticles = {};
|
|
@@ -28873,8 +28633,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28873
28633
|
function _createForOfIteratorHelper$5(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$5(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; } } }; }
|
|
28874
28634
|
function _unsupportedIterableToArray$5(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$5(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$5(r, a) : void 0; } }
|
|
28875
28635
|
function _arrayLikeToArray$5(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; }
|
|
28876
|
-
function ownKeys$
|
|
28877
|
-
function _objectSpread$
|
|
28636
|
+
function ownKeys$d(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; }
|
|
28637
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28878
28638
|
var LOG$d = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
28879
28639
|
|
|
28880
28640
|
//Diese Klasse verwaltet den Optionsbaum und ladelogik etc. eines Artikels
|
|
@@ -28893,7 +28653,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28893
28653
|
while (1) switch (_context.prev = _context.next) {
|
|
28894
28654
|
case 0:
|
|
28895
28655
|
_context.next = 2;
|
|
28896
|
-
return this.preLoadArticles(set, [_objectSpread$
|
|
28656
|
+
return this.preLoadArticles(set, [_objectSpread$d(_objectSpread$d({}, initParams), {}, {
|
|
28897
28657
|
articleCodex: articleCodex
|
|
28898
28658
|
})]);
|
|
28899
28659
|
case 2:
|
|
@@ -29153,7 +28913,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29153
28913
|
return _context6.abrupt("continue", 37);
|
|
29154
28914
|
case 12:
|
|
29155
28915
|
if (targetArticlesWithNewValues.includes(targetArticlesToUpdate[i])) {
|
|
29156
|
-
valuesArray[i] = actArticle.getValidValues(_objectSpread$
|
|
28916
|
+
valuesArray[i] = actArticle.getValidValues(_objectSpread$d({}, myValues), actArticle.CatalogData.mergeOptionsToSameOption);
|
|
29157
28917
|
}
|
|
29158
28918
|
|
|
29159
28919
|
//only set config if valuesArray are not empty or the article is initializing
|
|
@@ -29357,7 +29117,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29357
29117
|
for (var key in articles) {
|
|
29358
29118
|
var checkArticle = articles[key];
|
|
29359
29119
|
//und jetzt in allen Optionsbäumen nach GroupedUsedOPVs suchen
|
|
29360
|
-
var _iterator = _createForOfIteratorHelper$5(checkArticle.articleOptionStates
|
|
29120
|
+
var _iterator = _createForOfIteratorHelper$5(checkArticle.articleOptionStates),
|
|
29361
29121
|
_step;
|
|
29362
29122
|
try {
|
|
29363
29123
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -29406,7 +29166,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29406
29166
|
for (var i = keys.length - 1; i >= 0; i--) {
|
|
29407
29167
|
var article = articles[keys[i]];
|
|
29408
29168
|
if (article.hasArticleOptionStates) {
|
|
29409
|
-
var _iterator2 = _createForOfIteratorHelper$5(article.articleOptionStates
|
|
29169
|
+
var _iterator2 = _createForOfIteratorHelper$5(article.articleOptionStates),
|
|
29410
29170
|
_step2;
|
|
29411
29171
|
try {
|
|
29412
29172
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -29435,24 +29195,50 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29435
29195
|
var _initCfgValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(article, variantValues,
|
|
29436
29196
|
// Werte aus einem Basiskonfigurat,
|
|
29437
29197
|
variantItems) {
|
|
29438
|
-
var myCatalogArticleOptions,
|
|
29439
|
-
return _regeneratorRuntime.wrap(function _callee9$(
|
|
29440
|
-
while (1) switch (
|
|
29198
|
+
var myCatalogArticleOptions, _loop2, i, attr, foundItem, _foundItem$opt, freeText, opss, _i, ops, opv, _iterator3, _step3, _ops, value, optionValueCodex, _i2, variantItem, possibleValues, j, possibleValue, _i3, _variantItem, val;
|
|
29199
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context11) {
|
|
29200
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
29441
29201
|
case 0:
|
|
29442
29202
|
myCatalogArticleOptions = Object.values(article.catalogArticleOptions).sort(function (a, b) {
|
|
29443
29203
|
var _a$sequenceNo, _b$sequenceNo;
|
|
29444
29204
|
return ((_a$sequenceNo = a.sequenceNo) !== null && _a$sequenceNo !== void 0 ? _a$sequenceNo : 0) - ((_b$sequenceNo = b.sequenceNo) !== null && _b$sequenceNo !== void 0 ? _b$sequenceNo : 0);
|
|
29445
29205
|
});
|
|
29446
|
-
if (myCatalogArticleOptions) {
|
|
29447
|
-
|
|
29448
|
-
|
|
29449
|
-
|
|
29450
|
-
|
|
29206
|
+
if (!myCatalogArticleOptions) {
|
|
29207
|
+
_context11.next = 9;
|
|
29208
|
+
break;
|
|
29209
|
+
}
|
|
29210
|
+
_loop2 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop2(i) {
|
|
29211
|
+
var _article$set$ViewConf, optionState;
|
|
29212
|
+
return _regeneratorRuntime.wrap(function _loop2$(_context10) {
|
|
29213
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
29214
|
+
case 0:
|
|
29215
|
+
//Hier wird mal geschaut, ob der aktuelle Artikel alle Optionen schon initialisiert hat.
|
|
29216
|
+
if (!article.articleOptionStates.find(function (ops) {
|
|
29217
|
+
return ops.optionCodex == myCatalogArticleOptions[i].codex;
|
|
29218
|
+
})) {
|
|
29219
|
+
optionState = new ArticleOptionStateData(myCatalogArticleOptions[i], article.getIsConfigSingle, undefined, (_article$set$ViewConf = article.set.ViewConfig) === null || _article$set$ViewConf === void 0 ? void 0 : _article$set$ViewConf.useIsOptionDefinedWarning);
|
|
29220
|
+
article.uploadOptionState(optionState); //alle Optionen erstellen
|
|
29221
|
+
}
|
|
29222
|
+
case 1:
|
|
29223
|
+
case "end":
|
|
29224
|
+
return _context10.stop();
|
|
29451
29225
|
}
|
|
29452
|
-
}
|
|
29226
|
+
}, _loop2);
|
|
29227
|
+
});
|
|
29228
|
+
i = 0;
|
|
29229
|
+
case 4:
|
|
29230
|
+
if (!(i < myCatalogArticleOptions.length)) {
|
|
29231
|
+
_context11.next = 9;
|
|
29232
|
+
break;
|
|
29453
29233
|
}
|
|
29454
|
-
|
|
29455
|
-
|
|
29234
|
+
return _context11.delegateYield(_loop2(i), "t0", 6);
|
|
29235
|
+
case 6:
|
|
29236
|
+
i++;
|
|
29237
|
+
_context11.next = 4;
|
|
29238
|
+
break;
|
|
29239
|
+
case 9:
|
|
29240
|
+
if (!article.articleOptionStates.length) {
|
|
29241
|
+
_context11.next = 33;
|
|
29456
29242
|
break;
|
|
29457
29243
|
}
|
|
29458
29244
|
//infos eines Basisconfigurats initialisieren
|
|
@@ -29481,23 +29267,23 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29481
29267
|
}
|
|
29482
29268
|
|
|
29483
29269
|
//defaultValues for FreeText
|
|
29484
|
-
_iterator3 = _createForOfIteratorHelper$5(article.articleOptionStates
|
|
29485
|
-
|
|
29270
|
+
_iterator3 = _createForOfIteratorHelper$5(article.articleOptionStates);
|
|
29271
|
+
_context11.prev = 12;
|
|
29486
29272
|
_iterator3.s();
|
|
29487
|
-
case
|
|
29273
|
+
case 14:
|
|
29488
29274
|
if ((_step3 = _iterator3.n()).done) {
|
|
29489
|
-
|
|
29275
|
+
_context11.next = 25;
|
|
29490
29276
|
break;
|
|
29491
29277
|
}
|
|
29492
29278
|
_ops = _step3.value;
|
|
29493
29279
|
if (!variantValues[_ops.optionCodex + '_val']) {
|
|
29494
|
-
|
|
29280
|
+
_context11.next = 18;
|
|
29495
29281
|
break;
|
|
29496
29282
|
}
|
|
29497
|
-
return
|
|
29498
|
-
case
|
|
29283
|
+
return _context11.abrupt("continue", 23);
|
|
29284
|
+
case 18:
|
|
29499
29285
|
value = undefined;
|
|
29500
|
-
optionValueCodex =
|
|
29286
|
+
optionValueCodex = Object.keys(_ops.option.articleOptionValues)[0];
|
|
29501
29287
|
if (variantItems && _ops.isFreeText && _ops.measureUnit) {
|
|
29502
29288
|
for (_i2 = 0; _i2 < variantItems.length && value == undefined; _i2++) {
|
|
29503
29289
|
variantItem = variantItems[_i2];
|
|
@@ -29534,28 +29320,28 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29534
29320
|
_ops.freeText = val;
|
|
29535
29321
|
}
|
|
29536
29322
|
}
|
|
29537
|
-
if (value != undefined) article.engine.setOP(_ops.option.codex, _ops.option.articleOptionValues
|
|
29538
|
-
case
|
|
29539
|
-
|
|
29323
|
+
if (value != undefined) article.engine.setOP(_ops.option.codex, _ops.option.articleOptionValues[optionValueCodex], value, true);
|
|
29324
|
+
case 23:
|
|
29325
|
+
_context11.next = 14;
|
|
29540
29326
|
break;
|
|
29541
|
-
case
|
|
29542
|
-
|
|
29327
|
+
case 25:
|
|
29328
|
+
_context11.next = 30;
|
|
29543
29329
|
break;
|
|
29544
|
-
case
|
|
29545
|
-
|
|
29546
|
-
|
|
29547
|
-
_iterator3.e(
|
|
29548
|
-
case
|
|
29549
|
-
|
|
29330
|
+
case 27:
|
|
29331
|
+
_context11.prev = 27;
|
|
29332
|
+
_context11.t1 = _context11["catch"](12);
|
|
29333
|
+
_iterator3.e(_context11.t1);
|
|
29334
|
+
case 30:
|
|
29335
|
+
_context11.prev = 30;
|
|
29550
29336
|
_iterator3.f();
|
|
29551
|
-
return
|
|
29552
|
-
case
|
|
29337
|
+
return _context11.finish(30);
|
|
29338
|
+
case 33:
|
|
29553
29339
|
if (article.plannerData) article.plannerData.varaintValuesInfluencingAVLAVRFilter = article.getVariantValuesInfluencingOptions([(!article.CatalogData.isIDMFormat ? 'OPT' : '') + '89', (!article.CatalogData.isIDMFormat ? 'OPT' : '') + '90']);
|
|
29554
|
-
case
|
|
29340
|
+
case 34:
|
|
29555
29341
|
case "end":
|
|
29556
|
-
return
|
|
29342
|
+
return _context11.stop();
|
|
29557
29343
|
}
|
|
29558
|
-
}, _callee9, null, [[
|
|
29344
|
+
}, _callee9, null, [[12, 27, 30, 33]]);
|
|
29559
29345
|
}));
|
|
29560
29346
|
function initCfgValues(_x24, _x25, _x26) {
|
|
29561
29347
|
return _initCfgValues.apply(this, arguments);
|
|
@@ -29577,8 +29363,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29577
29363
|
value: (function () {
|
|
29578
29364
|
var _updateCfgValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(article, newConfigValues, alreadyInitializedValues, dontCalcPrice, dontLoadPartlist, calcVariantPrice, onlyUpdateOnce) {
|
|
29579
29365
|
var maxPriceOfGroupCodex, setByFeatureVariantValues, key, partlistArticlesToLoad;
|
|
29580
|
-
return _regeneratorRuntime.wrap(function _callee10$(
|
|
29581
|
-
while (1) switch (
|
|
29366
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context12) {
|
|
29367
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
29582
29368
|
case 0:
|
|
29583
29369
|
if (!!article.CatalogData.bundleRules) dontLoadPartlist = true;
|
|
29584
29370
|
//es wird versucht die neuen Optionswerte zu setzten
|
|
@@ -29604,24 +29390,24 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29604
29390
|
article.engine.evalDecisions(onlyUpdateOnce);
|
|
29605
29391
|
}
|
|
29606
29392
|
if (calcVariantPrice) {
|
|
29607
|
-
|
|
29393
|
+
_context12.next = 9;
|
|
29608
29394
|
break;
|
|
29609
29395
|
}
|
|
29610
|
-
|
|
29396
|
+
_context12.next = 9;
|
|
29611
29397
|
return article.updateShelfPlannerState(newConfigValues);
|
|
29612
29398
|
case 9:
|
|
29613
29399
|
if (!(!dontCalcPrice && !calcVariantPrice)) {
|
|
29614
|
-
|
|
29400
|
+
_context12.next = 12;
|
|
29615
29401
|
break;
|
|
29616
29402
|
}
|
|
29617
|
-
|
|
29403
|
+
_context12.next = 12;
|
|
29618
29404
|
return this.updateLastElement(article);
|
|
29619
29405
|
case 12:
|
|
29620
|
-
|
|
29406
|
+
_context12.next = 14;
|
|
29621
29407
|
return this.evalAndLoadPartlistArticles(article, dontLoadPartlist, newConfigValues);
|
|
29622
29408
|
case 14:
|
|
29623
|
-
partlistArticlesToLoad =
|
|
29624
|
-
|
|
29409
|
+
partlistArticlesToLoad = _context12.sent;
|
|
29410
|
+
_context12.next = 17;
|
|
29625
29411
|
return this.evalOpvsOnOpvsConstructionRules(article);
|
|
29626
29412
|
case 17:
|
|
29627
29413
|
//danach Preise berechnen
|
|
@@ -29632,10 +29418,10 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29632
29418
|
article.engine.updateConfigDependentMedia();
|
|
29633
29419
|
}
|
|
29634
29420
|
}
|
|
29635
|
-
return
|
|
29421
|
+
return _context12.abrupt("return", partlistArticlesToLoad);
|
|
29636
29422
|
case 19:
|
|
29637
29423
|
case "end":
|
|
29638
|
-
return
|
|
29424
|
+
return _context12.stop();
|
|
29639
29425
|
}
|
|
29640
29426
|
}, _callee10, this);
|
|
29641
29427
|
}));
|
|
@@ -29649,17 +29435,17 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29649
29435
|
value: function () {
|
|
29650
29436
|
var _updateLastElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(article) {
|
|
29651
29437
|
var isIDM, opsLastElement, lastElement, opsLastPlannedAccessoire, opsFirstAccessoire, _article$accessoirePa, _article$accessoirePa2, accessoires, i;
|
|
29652
|
-
return _regeneratorRuntime.wrap(function _callee11$(
|
|
29653
|
-
while (1) switch (
|
|
29438
|
+
return _regeneratorRuntime.wrap(function _callee11$(_context13) {
|
|
29439
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
29654
29440
|
case 0:
|
|
29655
29441
|
isIDM = article.CatalogData.isIDMFormat;
|
|
29656
29442
|
opsLastElement = article.getArticleOptionState((!isIDM ? 'OPT' : '') + 'ELEMENTPOSITION');
|
|
29657
29443
|
if (opsLastElement) {
|
|
29658
29444
|
lastElement = setHandlerInstance.getLastElementInGroup(article);
|
|
29659
29445
|
if (lastElement && lastElement.elementId == article.elementId) {
|
|
29660
|
-
opsLastElement.val = opsLastElement.visibleOptionValues
|
|
29446
|
+
opsLastElement.val = opsLastElement.visibleOptionValues[(!isIDM ? 'OPV' : '') + 'LASTELEMENT'];
|
|
29661
29447
|
} else {
|
|
29662
|
-
opsLastElement.val = opsLastElement.visibleOptionValues
|
|
29448
|
+
opsLastElement.val = opsLastElement.visibleOptionValues[(!isIDM ? 'OPV' : '') + 'NOTLASTELEMENT'];
|
|
29663
29449
|
}
|
|
29664
29450
|
}
|
|
29665
29451
|
opsLastPlannedAccessoire = article.getArticleOptionState((!isIDM ? 'OPT' : '') + 'LASTSTACKEDARTICLE');
|
|
@@ -29667,32 +29453,32 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29667
29453
|
if (Object.values(article.accessoires).find(function (accessoire) {
|
|
29668
29454
|
return accessoire.hasCatalogPlannerArticle;
|
|
29669
29455
|
})) {
|
|
29670
|
-
opsLastPlannedAccessoire.val = opsLastPlannedAccessoire.visibleOptionValues
|
|
29456
|
+
opsLastPlannedAccessoire.val = opsLastPlannedAccessoire.visibleOptionValues[(!isIDM ? 'OPV' : '') + 'NOTLASTSTACKEDARTICLE'];
|
|
29671
29457
|
} else {
|
|
29672
|
-
opsLastPlannedAccessoire.val = opsLastPlannedAccessoire.visibleOptionValues
|
|
29458
|
+
opsLastPlannedAccessoire.val = opsLastPlannedAccessoire.visibleOptionValues[(!isIDM ? 'OPV' : '') + 'LASTSTACKEDARTICLE'];
|
|
29673
29459
|
}
|
|
29674
29460
|
}
|
|
29675
29461
|
opsFirstAccessoire = article.getArticleOptionState((!isIDM ? 'OPT' : '') + 'FIRSTACCESSOIRE');
|
|
29676
29462
|
if (!opsFirstAccessoire) {
|
|
29677
|
-
|
|
29463
|
+
_context13.next = 15;
|
|
29678
29464
|
break;
|
|
29679
29465
|
}
|
|
29680
29466
|
accessoires = (_article$accessoirePa = (_article$accessoirePa2 = article.accessoireParentArticle) === null || _article$accessoirePa2 === void 0 ? void 0 : _article$accessoirePa2.getAccessoireByArticleCodex(article.articleCodex)) !== null && _article$accessoirePa !== void 0 ? _article$accessoirePa : [];
|
|
29681
29467
|
i = 0;
|
|
29682
29468
|
case 9:
|
|
29683
29469
|
if (!(i < accessoires.length)) {
|
|
29684
|
-
|
|
29470
|
+
_context13.next = 15;
|
|
29685
29471
|
break;
|
|
29686
29472
|
}
|
|
29687
|
-
|
|
29473
|
+
_context13.next = 12;
|
|
29688
29474
|
return this.updateOption(accessoires[i], (!isIDM ? 'OPT' : '') + 'FIRSTACCESSOIRE', (!isIDM ? 'OPV' : '') + (i + 1).toString(), i === 0 ? (!isIDM ? 'OPV' : '') + 'FIRSTACCESSOIRE' : (!isIDM ? 'OPV' : '') + 'NOTFIRSTACCESSOIRE');
|
|
29689
29475
|
case 12:
|
|
29690
29476
|
i++;
|
|
29691
|
-
|
|
29477
|
+
_context13.next = 9;
|
|
29692
29478
|
break;
|
|
29693
29479
|
case 15:
|
|
29694
29480
|
case "end":
|
|
29695
|
-
return
|
|
29481
|
+
return _context13.stop();
|
|
29696
29482
|
}
|
|
29697
29483
|
}, _callee11, this);
|
|
29698
29484
|
}));
|
|
@@ -29707,34 +29493,34 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29707
29493
|
var _updateOption = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(article, optionCodex, newCodex, fallbackNewCodex) {
|
|
29708
29494
|
var _ops$val, _ops$visibleOptionVal;
|
|
29709
29495
|
var ops, oldCodex, newVal;
|
|
29710
|
-
return _regeneratorRuntime.wrap(function _callee12$(
|
|
29711
|
-
while (1) switch (
|
|
29496
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context14) {
|
|
29497
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
29712
29498
|
case 0:
|
|
29713
29499
|
ops = article.getArticleOptionState(optionCodex);
|
|
29714
29500
|
if (ops) {
|
|
29715
|
-
|
|
29501
|
+
_context14.next = 3;
|
|
29716
29502
|
break;
|
|
29717
29503
|
}
|
|
29718
|
-
return
|
|
29504
|
+
return _context14.abrupt("return");
|
|
29719
29505
|
case 3:
|
|
29720
29506
|
oldCodex = (_ops$val = ops.val) === null || _ops$val === void 0 ? void 0 : _ops$val.codex;
|
|
29721
|
-
newVal = (_ops$visibleOptionVal = ops.visibleOptionValues
|
|
29507
|
+
newVal = (_ops$visibleOptionVal = ops.visibleOptionValues[newCodex]) !== null && _ops$visibleOptionVal !== void 0 ? _ops$visibleOptionVal : fallbackNewCodex ? ops.visibleOptionValues[fallbackNewCodex] : undefined;
|
|
29722
29508
|
if (!(oldCodex === (newVal === null || newVal === void 0 ? void 0 : newVal.codex))) {
|
|
29723
|
-
|
|
29509
|
+
_context14.next = 7;
|
|
29724
29510
|
break;
|
|
29725
29511
|
}
|
|
29726
|
-
return
|
|
29512
|
+
return _context14.abrupt("return");
|
|
29727
29513
|
case 7:
|
|
29728
29514
|
if (!newVal) {
|
|
29729
|
-
|
|
29515
|
+
_context14.next = 11;
|
|
29730
29516
|
break;
|
|
29731
29517
|
}
|
|
29732
29518
|
ops.val = newVal;
|
|
29733
|
-
|
|
29519
|
+
_context14.next = 11;
|
|
29734
29520
|
return setHandlerInstance.updateArticlesOptionStatesOfActSet(article.set, {}, []);
|
|
29735
29521
|
case 11:
|
|
29736
29522
|
case "end":
|
|
29737
|
-
return
|
|
29523
|
+
return _context14.stop();
|
|
29738
29524
|
}
|
|
29739
29525
|
}, _callee12);
|
|
29740
29526
|
}));
|
|
@@ -29750,12 +29536,12 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29750
29536
|
value: (function () {
|
|
29751
29537
|
var _evalAndLoadPartlistArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(article, dontLoadPartlist, newConfigValues) {
|
|
29752
29538
|
var partlistArticlesToLoad;
|
|
29753
|
-
return _regeneratorRuntime.wrap(function _callee13$(
|
|
29754
|
-
while (1) switch (
|
|
29539
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context15) {
|
|
29540
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
29755
29541
|
case 0:
|
|
29756
29542
|
partlistArticlesToLoad = [];
|
|
29757
29543
|
if (!article.hasPartlistArticle) {
|
|
29758
|
-
|
|
29544
|
+
_context15.next = 9;
|
|
29759
29545
|
break;
|
|
29760
29546
|
}
|
|
29761
29547
|
article.deletePartlistArticles(); //alle aktellen PartlistArticles des Articles löschen!
|
|
@@ -29765,10 +29551,10 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29765
29551
|
return ((_a$sequenceNo2 = a.sequenceNo) !== null && _a$sequenceNo2 !== void 0 ? _a$sequenceNo2 : 0) - ((_b$sequenceNo2 = b.sequenceNo) !== null && _b$sequenceNo2 !== void 0 ? _b$sequenceNo2 : 0);
|
|
29766
29552
|
});
|
|
29767
29553
|
if (dontLoadPartlist) {
|
|
29768
|
-
|
|
29554
|
+
_context15.next = 9;
|
|
29769
29555
|
break;
|
|
29770
29556
|
}
|
|
29771
|
-
|
|
29557
|
+
_context15.next = 8;
|
|
29772
29558
|
return this.loadPartlistArticles(partlistArticlesToLoad, article, article.VariantValues);
|
|
29773
29559
|
case 8:
|
|
29774
29560
|
partlistArticlesToLoad = [];
|
|
@@ -29777,10 +29563,10 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29777
29563
|
partlistArticlesToLoad = this.bundlePartlistArticles(partlistArticlesToLoad, article.bundleRules, _defineProperty({}, article.basketId, article));
|
|
29778
29564
|
}
|
|
29779
29565
|
article.hasPartlistArticleInitialized = true;
|
|
29780
|
-
return
|
|
29566
|
+
return _context15.abrupt("return", partlistArticlesToLoad);
|
|
29781
29567
|
case 12:
|
|
29782
29568
|
case "end":
|
|
29783
|
-
return
|
|
29569
|
+
return _context15.stop();
|
|
29784
29570
|
}
|
|
29785
29571
|
}, _callee13, this);
|
|
29786
29572
|
}));
|
|
@@ -29795,10 +29581,10 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29795
29581
|
var _loadPartlistArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(partlistArticlesToLoad, article, newConfigValues) {
|
|
29796
29582
|
var _this = this;
|
|
29797
29583
|
var i;
|
|
29798
|
-
return _regeneratorRuntime.wrap(function _callee14$(
|
|
29799
|
-
while (1) switch (
|
|
29584
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context16) {
|
|
29585
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
29800
29586
|
case 0:
|
|
29801
|
-
|
|
29587
|
+
_context16.next = 2;
|
|
29802
29588
|
return this.preLoadArticles(article.set, partlistArticlesToLoad.map(function (p) {
|
|
29803
29589
|
return _this.partlistArticleInitData(article, p);
|
|
29804
29590
|
}));
|
|
@@ -29806,20 +29592,20 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29806
29592
|
i = 0;
|
|
29807
29593
|
case 3:
|
|
29808
29594
|
if (!(i < partlistArticlesToLoad.length)) {
|
|
29809
|
-
|
|
29595
|
+
_context16.next = 9;
|
|
29810
29596
|
break;
|
|
29811
29597
|
}
|
|
29812
|
-
|
|
29598
|
+
_context16.next = 6;
|
|
29813
29599
|
return this.loadPartlistArticle(partlistArticlesToLoad[i], article, newConfigValues);
|
|
29814
29600
|
case 6:
|
|
29815
29601
|
i++;
|
|
29816
|
-
|
|
29602
|
+
_context16.next = 3;
|
|
29817
29603
|
break;
|
|
29818
29604
|
case 9:
|
|
29819
29605
|
article.sortPartlistArticles(partlistArticlesToLoad);
|
|
29820
29606
|
case 10:
|
|
29821
29607
|
case "end":
|
|
29822
|
-
return
|
|
29608
|
+
return _context16.stop();
|
|
29823
29609
|
}
|
|
29824
29610
|
}, _callee14, this);
|
|
29825
29611
|
}));
|
|
@@ -29834,25 +29620,25 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29834
29620
|
value: function () {
|
|
29835
29621
|
var _loadPartlistArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(doLoadItem, article, newConfigValues) {
|
|
29836
29622
|
var nArticle, _doLoadItem$VariantVa;
|
|
29837
|
-
return _regeneratorRuntime.wrap(function _callee15$(
|
|
29838
|
-
while (1) switch (
|
|
29623
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context17) {
|
|
29624
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
29839
29625
|
case 0:
|
|
29840
|
-
|
|
29626
|
+
_context17.next = 2;
|
|
29841
29627
|
return this.loadArticle(article.set, doLoadItem.ArticleCodex, this.partlistArticleInitData(article, doLoadItem));
|
|
29842
29628
|
case 2:
|
|
29843
|
-
nArticle =
|
|
29629
|
+
nArticle = _context17.sent;
|
|
29844
29630
|
if (!nArticle) {
|
|
29845
|
-
|
|
29631
|
+
_context17.next = 8;
|
|
29846
29632
|
break;
|
|
29847
29633
|
}
|
|
29848
29634
|
doLoadItem.BasketID = nArticle.basketId;
|
|
29849
|
-
|
|
29635
|
+
_context17.next = 7;
|
|
29850
29636
|
return this.toDoAfterArticleLoaded(nArticle, {}, nArticle.variantValuesForPla(nArticle.partlistArticleStandalone, (_doLoadItem$VariantVa = doLoadItem.VariantValues) !== null && _doLoadItem$VariantVa !== void 0 ? _doLoadItem$VariantVa : {}, newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {}), 'initializingPartlist', doLoadItem.VariantItemData);
|
|
29851
29637
|
case 7:
|
|
29852
29638
|
article.addPartlistArticle(nArticle);
|
|
29853
29639
|
case 8:
|
|
29854
29640
|
case "end":
|
|
29855
|
-
return
|
|
29641
|
+
return _context17.stop();
|
|
29856
29642
|
}
|
|
29857
29643
|
}, _callee15, this);
|
|
29858
29644
|
}));
|
|
@@ -29898,9 +29684,9 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29898
29684
|
value: (function () {
|
|
29899
29685
|
var _evalOpvsOnOpvsConstructionRules = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(article) {
|
|
29900
29686
|
var _article$CatalogData$;
|
|
29901
|
-
var somethingChanged, previousRules, _key, actRules, item, _iterator4, _step4, ops, myOPVs,
|
|
29902
|
-
return _regeneratorRuntime.wrap(function _callee16$(
|
|
29903
|
-
while (1) switch (
|
|
29687
|
+
var somethingChanged, previousRules, _key, actRules, item, _iterator4, _step4, ops, myOPVs, key2, opv, opvGroupName, _article$catalogArtic, _article$catalogArtic2, disable, onOpv, onOpvArr, invaliOPVs, invalidOPVArr, j, opvRule, ops2, i, invalidOpv, ops3, key, constructionRule, notifications, _i4, _item;
|
|
29688
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context18) {
|
|
29689
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
29904
29690
|
case 0:
|
|
29905
29691
|
somethingChanged = false;
|
|
29906
29692
|
previousRules = {};
|
|
@@ -29919,59 +29705,52 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29919
29705
|
}
|
|
29920
29706
|
}
|
|
29921
29707
|
}
|
|
29922
|
-
_iterator4 = _createForOfIteratorHelper$5(article.articleOptionStates
|
|
29708
|
+
_iterator4 = _createForOfIteratorHelper$5(article.articleOptionStates);
|
|
29923
29709
|
try {
|
|
29924
29710
|
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
29925
29711
|
ops = _step4.value;
|
|
29926
29712
|
if (ops.optionCodex.toUpperCase().endsWith('OPTCONSTRUCTIONRULES')) {
|
|
29927
29713
|
myOPVs = ops.option.articleOptionValues;
|
|
29928
|
-
|
|
29929
|
-
|
|
29930
|
-
|
|
29931
|
-
|
|
29932
|
-
|
|
29933
|
-
if (opvGroupName
|
|
29934
|
-
disable =
|
|
29935
|
-
|
|
29936
|
-
|
|
29937
|
-
|
|
29938
|
-
|
|
29939
|
-
|
|
29940
|
-
|
|
29941
|
-
|
|
29942
|
-
|
|
29943
|
-
|
|
29944
|
-
|
|
29945
|
-
ops2
|
|
29946
|
-
|
|
29947
|
-
|
|
29948
|
-
|
|
29949
|
-
|
|
29950
|
-
|
|
29951
|
-
|
|
29952
|
-
|
|
29953
|
-
|
|
29954
|
-
|
|
29955
|
-
|
|
29956
|
-
|
|
29957
|
-
|
|
29958
|
-
|
|
29959
|
-
|
|
29960
|
-
|
|
29961
|
-
|
|
29962
|
-
article.addUpdatedOPVbyOPVConstructionRules(key, article.updateOPVConstruction(invalidOpv[0], invalidOpv[1], constructionRule));
|
|
29963
|
-
somethingChanged = true;
|
|
29964
|
-
}
|
|
29714
|
+
for (key2 in myOPVs) {
|
|
29715
|
+
opv = myOPVs[key2];
|
|
29716
|
+
opvGroupName = opv.groupName;
|
|
29717
|
+
if (opvGroupName && opvGroupName.startsWith('ON_OPV_SET_OPV')) {
|
|
29718
|
+
disable = false;
|
|
29719
|
+
if (opvGroupName.endsWith('DISABLE')) {
|
|
29720
|
+
disable = true;
|
|
29721
|
+
}
|
|
29722
|
+
onOpv = (_article$catalogArtic = article.catalogArticle.onConfigOption) !== null && _article$catalogArtic !== void 0 ? _article$catalogArtic : '';
|
|
29723
|
+
onOpvArr = onOpv.split(',');
|
|
29724
|
+
invaliOPVs = (_article$catalogArtic2 = article.catalogArticle.onSetConfigOtpion) !== null && _article$catalogArtic2 !== void 0 ? _article$catalogArtic2 : '';
|
|
29725
|
+
invalidOPVArr = invaliOPVs.split(',');
|
|
29726
|
+
for (j = 0; j < onOpvArr.length; j++) {
|
|
29727
|
+
//alle OPVs auf welche zu prüfen ist durchlaufen
|
|
29728
|
+
opvRule = onOpvArr[j].split(':');
|
|
29729
|
+
ops2 = article.getArticleOptionStateFlat(opvRule[0]);
|
|
29730
|
+
if (ops2) {
|
|
29731
|
+
if (ops2.valCodex == opvRule[1]) {
|
|
29732
|
+
for (i = 0; i < invalidOPVArr.length; i++) {
|
|
29733
|
+
//alle zu deaktivierende OPVs durchgehen
|
|
29734
|
+
invalidOpv = invalidOPVArr[i].split(':');
|
|
29735
|
+
ops3 = article.getArticleOptionStateFlat(invalidOpv[0]);
|
|
29736
|
+
if (ops3) {
|
|
29737
|
+
key = onOpvArr[j];
|
|
29738
|
+
constructionRule = {
|
|
29739
|
+
message: {
|
|
29740
|
+
DE: opv.name,
|
|
29741
|
+
IT: opv.name,
|
|
29742
|
+
FR: opv.name
|
|
29743
|
+
},
|
|
29744
|
+
type: disable ? 'DISABLE' : 'WARNING'
|
|
29745
|
+
};
|
|
29746
|
+
article.addUpdatedOPVbyOPVConstructionRules(key, article.updateOPVConstruction(invalidOpv[0], invalidOpv[1], constructionRule));
|
|
29747
|
+
somethingChanged = true;
|
|
29965
29748
|
}
|
|
29966
29749
|
}
|
|
29967
29750
|
}
|
|
29968
29751
|
}
|
|
29969
29752
|
}
|
|
29970
29753
|
}
|
|
29971
|
-
} catch (err) {
|
|
29972
|
-
_iterator5.e(err);
|
|
29973
|
-
} finally {
|
|
29974
|
-
_iterator5.f();
|
|
29975
29754
|
}
|
|
29976
29755
|
}
|
|
29977
29756
|
}
|
|
@@ -29981,26 +29760,26 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29981
29760
|
_iterator4.f();
|
|
29982
29761
|
}
|
|
29983
29762
|
if (!((_article$CatalogData$ = article.CatalogData.warningRules) !== null && _article$CatalogData$ !== void 0 && _article$CatalogData$.length)) {
|
|
29984
|
-
|
|
29763
|
+
_context18.next = 20;
|
|
29985
29764
|
break;
|
|
29986
29765
|
}
|
|
29987
29766
|
notifications = this.checkNotificationRules(article.CatalogData.warningRules, _defineProperty({}, article.basketId, article), {});
|
|
29988
29767
|
if (!(notifications !== null && notifications !== void 0 && notifications.length)) {
|
|
29989
|
-
|
|
29768
|
+
_context18.next = 20;
|
|
29990
29769
|
break;
|
|
29991
29770
|
}
|
|
29992
29771
|
_i4 = 0;
|
|
29993
29772
|
case 11:
|
|
29994
29773
|
if (!(_i4 < notifications.length)) {
|
|
29995
|
-
|
|
29774
|
+
_context18.next = 19;
|
|
29996
29775
|
break;
|
|
29997
29776
|
}
|
|
29998
29777
|
_item = notifications[_i4];
|
|
29999
29778
|
if (_item.showAsWarning) {
|
|
30000
|
-
|
|
29779
|
+
_context18.next = 15;
|
|
30001
29780
|
break;
|
|
30002
29781
|
}
|
|
30003
|
-
return
|
|
29782
|
+
return _context18.abrupt("continue", 16);
|
|
30004
29783
|
case 15:
|
|
30005
29784
|
article.addUpdatedOPVbyOPVConstructionRules(_item.showAsWarning.option + ';' + _item.showAsWarning.optionValue, article.updateOPVConstruction((!article.CatalogData.isIDMFormat ? 'OPT' : '') + _item.showAsWarning.option, (!article.CatalogData.isIDMFormat ? 'OPV' : '') + _item.showAsWarning.optionValue, {
|
|
30006
29785
|
message: _item.message,
|
|
@@ -30008,20 +29787,20 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
30008
29787
|
}));
|
|
30009
29788
|
case 16:
|
|
30010
29789
|
_i4++;
|
|
30011
|
-
|
|
29790
|
+
_context18.next = 11;
|
|
30012
29791
|
break;
|
|
30013
29792
|
case 19:
|
|
30014
29793
|
somethingChanged = true;
|
|
30015
29794
|
case 20:
|
|
30016
29795
|
if (!(somethingChanged && JSON.stringify(previousRules) != JSON.stringify(article.updatedOPVbyOPVConstructionRules))) {
|
|
30017
|
-
|
|
29796
|
+
_context18.next = 23;
|
|
30018
29797
|
break;
|
|
30019
29798
|
}
|
|
30020
|
-
|
|
29799
|
+
_context18.next = 23;
|
|
30021
29800
|
return this.updateCfgValues(article, {}, {});
|
|
30022
29801
|
case 23:
|
|
30023
29802
|
case "end":
|
|
30024
|
-
return
|
|
29803
|
+
return _context18.stop();
|
|
30025
29804
|
}
|
|
30026
29805
|
}, _callee16, this);
|
|
30027
29806
|
}));
|
|
@@ -30060,7 +29839,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
30060
29839
|
if (ruleValid) break;
|
|
30061
29840
|
}
|
|
30062
29841
|
if (ruleValid) {
|
|
30063
|
-
returnValue.push(_objectSpread$
|
|
29842
|
+
returnValue.push(_objectSpread$d(_objectSpread$d({}, entry), {}, {
|
|
30064
29843
|
index: i
|
|
30065
29844
|
}));
|
|
30066
29845
|
break;
|
|
@@ -30133,7 +29912,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
30133
29912
|
value: function checkIfAllOptionsAreDefined(articles) {
|
|
30134
29913
|
var articleNames = [];
|
|
30135
29914
|
var options = [];
|
|
30136
|
-
var
|
|
29915
|
+
var _loop3 = function _loop3(baksetId) {
|
|
30137
29916
|
var article = articles[baksetId];
|
|
30138
29917
|
if (!article.areAllOptionsDefined) {
|
|
30139
29918
|
var requiredUserInputOptions = article.requiredUserInputOptions;
|
|
@@ -30149,7 +29928,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
30149
29928
|
}
|
|
30150
29929
|
};
|
|
30151
29930
|
for (var baksetId in articles) {
|
|
30152
|
-
|
|
29931
|
+
_loop3(baksetId);
|
|
30153
29932
|
}
|
|
30154
29933
|
return {
|
|
30155
29934
|
articleNames: articleNames,
|
|
@@ -30177,8 +29956,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
30177
29956
|
var filter = article.plannerData.AVLFilter[i];
|
|
30178
29957
|
if (dockedToArticle.plannerData.AVRFilter.includes(filter)) {
|
|
30179
29958
|
var ops = article.getArticleOptionState((!article.CatalogData.isIDMFormat ? 'OPT' : '') + '89');
|
|
30180
|
-
if (ops !== null && ops !== void 0 && ops.visibleOptionValues
|
|
30181
|
-
article.engine.setOP(ops.optionCodex, ops.visibleOptionValues
|
|
29959
|
+
if (ops !== null && ops !== void 0 && ops.visibleOptionValues[(!article.CatalogData.isIDMFormat ? 'OPV' : '') + filter]) {
|
|
29960
|
+
article.engine.setOP(ops.optionCodex, ops.visibleOptionValues[(!article.CatalogData.isIDMFormat ? 'OPV' : '') + filter]);
|
|
30182
29961
|
somethingChanged = true;
|
|
30183
29962
|
break;
|
|
30184
29963
|
}
|
|
@@ -30190,8 +29969,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
30190
29969
|
var _filter = article.plannerData.AVRFilter[_i5];
|
|
30191
29970
|
if (dockedToArticle.plannerData.AVLFilter.includes(_filter)) {
|
|
30192
29971
|
var _ops2 = article.getArticleOptionState((!article.CatalogData.isIDMFormat ? 'OPT' : '') + '90');
|
|
30193
|
-
if (_ops2 !== null && _ops2 !== void 0 && _ops2.visibleOptionValues
|
|
30194
|
-
article.engine.setOP(_ops2.optionCodex, _ops2.visibleOptionValues
|
|
29972
|
+
if (_ops2 !== null && _ops2 !== void 0 && _ops2.visibleOptionValues[(!article.CatalogData.isIDMFormat ? 'OPV' : '') + _filter]) {
|
|
29973
|
+
article.engine.setOP(_ops2.optionCodex, _ops2.visibleOptionValues[(!article.CatalogData.isIDMFormat ? 'OPV' : '') + _filter]);
|
|
30195
29974
|
somethingChanged = true;
|
|
30196
29975
|
break;
|
|
30197
29976
|
}
|
|
@@ -30206,25 +29985,25 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
30206
29985
|
value: function () {
|
|
30207
29986
|
var _triggerShelfplannerVisibility = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(artices, gridGroup) {
|
|
30208
29987
|
var key, _artice$shelfPlanner, artice;
|
|
30209
|
-
return _regeneratorRuntime.wrap(function _callee17$(
|
|
30210
|
-
while (1) switch (
|
|
29988
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context19) {
|
|
29989
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
30211
29990
|
case 0:
|
|
30212
|
-
|
|
29991
|
+
_context19.t0 = _regeneratorRuntime.keys(artices);
|
|
30213
29992
|
case 1:
|
|
30214
|
-
if ((
|
|
30215
|
-
|
|
29993
|
+
if ((_context19.t1 = _context19.t0()).done) {
|
|
29994
|
+
_context19.next = 8;
|
|
30216
29995
|
break;
|
|
30217
29996
|
}
|
|
30218
|
-
key =
|
|
29997
|
+
key = _context19.t1.value;
|
|
30219
29998
|
artice = artices[key];
|
|
30220
|
-
|
|
29999
|
+
_context19.next = 6;
|
|
30221
30000
|
return (_artice$shelfPlanner = artice.shelfPlanner) === null || _artice$shelfPlanner === void 0 ? void 0 : _artice$shelfPlanner.triggerVisibility(gridGroup);
|
|
30222
30001
|
case 6:
|
|
30223
|
-
|
|
30002
|
+
_context19.next = 1;
|
|
30224
30003
|
break;
|
|
30225
30004
|
case 8:
|
|
30226
30005
|
case "end":
|
|
30227
|
-
return
|
|
30006
|
+
return _context19.stop();
|
|
30228
30007
|
}
|
|
30229
30008
|
}, _callee17);
|
|
30230
30009
|
}));
|
|
@@ -30250,7 +30029,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
30250
30029
|
var hasFavorites = arguments.length > 3 ? arguments[3] : undefined;
|
|
30251
30030
|
var ret = [];
|
|
30252
30031
|
if (Object.values(articles).length == 0) return ret;
|
|
30253
|
-
var
|
|
30032
|
+
var _loop4 = function _loop4() {
|
|
30254
30033
|
var _article$shelfPlanner3, _article$shelfPlanner4, _article$doorPlanner;
|
|
30255
30034
|
var article = articles[key];
|
|
30256
30035
|
var catalogData = article.CatalogData;
|
|
@@ -30334,7 +30113,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
30334
30113
|
ret = ret.concat(_this2.getOptiontreeAccessoiresArr(article.set.getSetId(), article));
|
|
30335
30114
|
};
|
|
30336
30115
|
for (var key in articles) {
|
|
30337
|
-
|
|
30116
|
+
_loop4();
|
|
30338
30117
|
}
|
|
30339
30118
|
return ret;
|
|
30340
30119
|
}
|
|
@@ -30379,11 +30158,11 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
30379
30158
|
value: function getOptiontreeAccessoiresArr(setId, article) {
|
|
30380
30159
|
var s = 0;
|
|
30381
30160
|
var accessoires = [];
|
|
30382
|
-
var
|
|
30383
|
-
|
|
30161
|
+
var _iterator5 = _createForOfIteratorHelper$5(article.articleOptionStates),
|
|
30162
|
+
_step5;
|
|
30384
30163
|
try {
|
|
30385
|
-
for (
|
|
30386
|
-
var ops =
|
|
30164
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
30165
|
+
var ops = _step5.value;
|
|
30387
30166
|
if (ops.option.articlePlaceholder) {
|
|
30388
30167
|
//ArticlePlaceholder bestimmt, ob Optionswert als eigene SAPOrderline ausgegeben wird
|
|
30389
30168
|
if (ops.isAccessoirArtNr && ops.isAccessoirArtNr != '') {
|
|
@@ -30399,9 +30178,9 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
30399
30178
|
}
|
|
30400
30179
|
}
|
|
30401
30180
|
} catch (err) {
|
|
30402
|
-
|
|
30181
|
+
_iterator5.e(err);
|
|
30403
30182
|
} finally {
|
|
30404
|
-
|
|
30183
|
+
_iterator5.f();
|
|
30405
30184
|
}
|
|
30406
30185
|
return accessoires;
|
|
30407
30186
|
}
|
|
@@ -30500,20 +30279,20 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
30500
30279
|
key: "correctPartlistArticlesByGlobalRules",
|
|
30501
30280
|
value: (function () {
|
|
30502
30281
|
var _correctPartlistArticlesByGlobalRules = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(set, partlistArticlesToLoad, bundleRules, doChangeRetailArticleNumbers) {
|
|
30503
|
-
var
|
|
30504
|
-
return _regeneratorRuntime.wrap(function _callee18$(
|
|
30505
|
-
while (1) switch (
|
|
30282
|
+
var _loop5, i, article;
|
|
30283
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context21) {
|
|
30284
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
30506
30285
|
case 0:
|
|
30507
30286
|
if (bundleRules) partlistArticlesToLoad = this.bundlePartlistArticles(partlistArticlesToLoad, bundleRules, set.getDivaArticles());
|
|
30508
30287
|
//Correct RetailArticleNumbers
|
|
30509
30288
|
if (!(doChangeRetailArticleNumbers !== null && doChangeRetailArticleNumbers !== void 0 && doChangeRetailArticleNumbers.doChange && doChangeRetailArticleNumbers.retailArticleRules)) {
|
|
30510
|
-
|
|
30289
|
+
_context21.next = 9;
|
|
30511
30290
|
break;
|
|
30512
30291
|
}
|
|
30513
|
-
|
|
30292
|
+
_loop5 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop5(i) {
|
|
30514
30293
|
var rule;
|
|
30515
|
-
return _regeneratorRuntime.wrap(function
|
|
30516
|
-
while (1) switch (
|
|
30294
|
+
return _regeneratorRuntime.wrap(function _loop5$(_context20) {
|
|
30295
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
30517
30296
|
case 0:
|
|
30518
30297
|
//Run through articleCodexes to repair:
|
|
30519
30298
|
rule = doChangeRetailArticleNumbers.retailArticleRules.find(function (item) {
|
|
@@ -30525,30 +30304,30 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
30525
30304
|
}
|
|
30526
30305
|
case 2:
|
|
30527
30306
|
case "end":
|
|
30528
|
-
return
|
|
30307
|
+
return _context20.stop();
|
|
30529
30308
|
}
|
|
30530
|
-
},
|
|
30309
|
+
}, _loop5);
|
|
30531
30310
|
});
|
|
30532
30311
|
i = 0;
|
|
30533
30312
|
case 4:
|
|
30534
30313
|
if (!(i < partlistArticlesToLoad.length)) {
|
|
30535
|
-
|
|
30314
|
+
_context21.next = 9;
|
|
30536
30315
|
break;
|
|
30537
30316
|
}
|
|
30538
|
-
return
|
|
30317
|
+
return _context21.delegateYield(_loop5(i), "t0", 6);
|
|
30539
30318
|
case 6:
|
|
30540
30319
|
i++;
|
|
30541
|
-
|
|
30320
|
+
_context21.next = 4;
|
|
30542
30321
|
break;
|
|
30543
30322
|
case 9:
|
|
30544
30323
|
article = Object.values(set.getDivaArticles()).find(function (article) {
|
|
30545
30324
|
return article.hasPartlistArticle && !article.deleted;
|
|
30546
30325
|
});
|
|
30547
|
-
|
|
30326
|
+
_context21.next = 12;
|
|
30548
30327
|
return this.loadPartlistArticles(partlistArticlesToLoad, article, {});
|
|
30549
30328
|
case 12:
|
|
30550
30329
|
case "end":
|
|
30551
|
-
return
|
|
30330
|
+
return _context21.stop();
|
|
30552
30331
|
}
|
|
30553
30332
|
}, _callee18, this);
|
|
30554
30333
|
}));
|
|
@@ -30561,7 +30340,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
30561
30340
|
key: "bundlePartlistArticles",
|
|
30562
30341
|
value: function bundlePartlistArticles(partlistArticlesToLoad, bundleRules, articles) {
|
|
30563
30342
|
var partlistArticlesToLoadGrouped = [];
|
|
30564
|
-
var
|
|
30343
|
+
var _loop6 = function _loop6(i) {
|
|
30565
30344
|
var index = partlistArticlesToLoadGrouped.findIndex(function (item, j) {
|
|
30566
30345
|
if (item.CatalogCodex == partlistArticlesToLoad[i].CatalogCodex && item.ArticleCodex == partlistArticlesToLoad[i].ArticleCodex && item.RetailArticleNr == partlistArticlesToLoad[i].RetailArticleNr && item.RetailPrefix == partlistArticlesToLoad[i].RetailPrefix) {
|
|
30567
30346
|
return true;
|
|
@@ -30575,7 +30354,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
30575
30354
|
}
|
|
30576
30355
|
};
|
|
30577
30356
|
for (var i = 0; i < partlistArticlesToLoad.length; i++) {
|
|
30578
|
-
|
|
30357
|
+
_loop6(i);
|
|
30579
30358
|
}
|
|
30580
30359
|
//bundle Partlistarticles
|
|
30581
30360
|
for (var _i6 = 0; _i6 < bundleRules.length; _i6++) {
|
|
@@ -31100,7 +30879,10 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
31100
30879
|
var paletteType = (_set$api$getViewConfi = (_set$api$getViewConfi2 = set.api.getViewConfig()) === null || _set$api$getViewConfi2 === void 0 ? void 0 : _set$api$getViewConfi2.defaultOptionType) !== null && _set$api$getViewConfi !== void 0 ? _set$api$getViewConfi : 'SMALL';
|
|
31101
30880
|
if (configStep && optionStep) {
|
|
31102
30881
|
if (configStep.option == 'OPTVINYL' || configStep.option == 'OPTVINYL_1' || configStep.option == 'OPTFABRIC' || configStep.option == 'OPTBE' || configStep.option == 'OPTBE_AUSSEN' || configStep.option == 'OPTBE_INNEN' || configStep.option == 'OPTBE_PANEELE' || configStep.option == 'OPTMATRATZE_BE' || configStep.option == 'OPTBE_UG' || configStep.option == 'OPTBEZUG' || configStep.option == 'OPTKO' || configStep.option == 'OPTFR' || configStep.option == 'OPTNI' || configStep.option == 'OPTUF_FA' || configStep.option == 'OPTBE_NETZ' || configStep.option == 'OPTBE_AL' || configStep.option == 'OPTKISSEN_BE' || configStep.option == 'OPTKP_BE' || configStep.option == 'OPTARM_BE' || configStep.option == 'OPTBE_KT' || configStep.option == 'OPT3' || configStep.option == 'OPT5' || configStep.option == 'OPTBE_KNOEPFE' || configStep.option == 'OPTSK_FARBE' || configStep.option == 'OPTBANDFARBE' || configStep.option == 'OPTBE_BOX' || configStep.option == 'OPTMA_AF_BE' || configStep.option == 'OPTTOPPER_BE' || optionState !== null && optionState !== void 0 && optionState.option.hasOPG && optionState.hasImages || optionStep.mergesToOPG) {
|
|
31103
|
-
paletteType = 'GAL_TEXT';
|
|
30882
|
+
if (!paletteType.includes('GAL_')) paletteType = 'GAL_TEXT';
|
|
30883
|
+
}
|
|
30884
|
+
if (paletteType.includes('GAL_') && !(optionState !== null && optionState !== void 0 && optionState.hasImages)) {
|
|
30885
|
+
paletteType = 'SMALL';
|
|
31104
30886
|
}
|
|
31105
30887
|
if (configStep.option == 'OPTBA' && !(optionState !== null && optionState !== void 0 && optionState.option.layout)) {
|
|
31106
30888
|
paletteType = 'VERY_SMALL';
|
|
@@ -31440,8 +31222,8 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
31440
31222
|
function _createForOfIteratorHelper$4(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$4(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; } } }; }
|
|
31441
31223
|
function _unsupportedIterableToArray$4(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$4(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$4(r, a) : void 0; } }
|
|
31442
31224
|
function _arrayLikeToArray$4(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; }
|
|
31443
|
-
function ownKeys$
|
|
31444
|
-
function _objectSpread$
|
|
31225
|
+
function ownKeys$c(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; }
|
|
31226
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31445
31227
|
var LOG$b = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
31446
31228
|
//plz delete me
|
|
31447
31229
|
var DivaSet = /*#__PURE__*/function () {
|
|
@@ -31541,7 +31323,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
31541
31323
|
_context.next = 10;
|
|
31542
31324
|
break;
|
|
31543
31325
|
}
|
|
31544
|
-
validValues = repairVariantValuesAndPlanner ? article.getValidValues(_objectSpread$
|
|
31326
|
+
validValues = repairVariantValuesAndPlanner ? article.getValidValues(_objectSpread$c({}, variantValues), article.CatalogData.mergeOptionsToSameOption) : {};
|
|
31545
31327
|
_context.t0 = partlistArticlesToLoad;
|
|
31546
31328
|
_context.next = 8;
|
|
31547
31329
|
return articleHandlerInstance.updateCfgValues(article, repairVariantValuesAndPlanner ? validValues : variantValues, {}, undefined, loadPlas);
|
|
@@ -32111,8 +31893,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
32111
31893
|
var articles = {};
|
|
32112
31894
|
for (var basketId in this.divaArticles) {
|
|
32113
31895
|
articles[basketId] = this.divaArticles[basketId];
|
|
32114
|
-
if (allPartlistArticlesAlso) articles = _objectSpread$
|
|
32115
|
-
if (visiblePartlistArticlesAlso) articles = _objectSpread$
|
|
31896
|
+
if (allPartlistArticlesAlso) articles = _objectSpread$c(_objectSpread$c({}, articles), articles[basketId].getRecursivePartlistArticles());
|
|
31897
|
+
if (visiblePartlistArticlesAlso) articles = _objectSpread$c(_objectSpread$c({}, articles), articles[basketId].getRecursivePartlistArticles(true));
|
|
32116
31898
|
}
|
|
32117
31899
|
return articles;
|
|
32118
31900
|
}
|
|
@@ -32272,7 +32054,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
32272
32054
|
var cleanedDimensions = [];
|
|
32273
32055
|
for (var basketId in articles) {
|
|
32274
32056
|
var artice = articles[basketId];
|
|
32275
|
-
var _iterator3 = _createForOfIteratorHelper$4(artice.articleOptionStates
|
|
32057
|
+
var _iterator3 = _createForOfIteratorHelper$4(artice.articleOptionStates),
|
|
32276
32058
|
_step3;
|
|
32277
32059
|
try {
|
|
32278
32060
|
var _loop2 = function _loop2() {
|
|
@@ -32483,7 +32265,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
32483
32265
|
var options = [];
|
|
32484
32266
|
for (var key in this.divaArticles) {
|
|
32485
32267
|
var article = this.divaArticles[key];
|
|
32486
|
-
var _iterator4 = _createForOfIteratorHelper$4(article.articleOptionStates
|
|
32268
|
+
var _iterator4 = _createForOfIteratorHelper$4(article.articleOptionStates),
|
|
32487
32269
|
_step4;
|
|
32488
32270
|
try {
|
|
32489
32271
|
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
@@ -32744,7 +32526,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
32744
32526
|
break;
|
|
32745
32527
|
}
|
|
32746
32528
|
_context5.next = 3;
|
|
32747
|
-
return import('./DoorPlanner-
|
|
32529
|
+
return import('./DoorPlanner-bb580288.js');
|
|
32748
32530
|
case 3:
|
|
32749
32531
|
_yield$import = _context5.sent;
|
|
32750
32532
|
DoorPlanner = _yield$import["default"];
|
|
@@ -32933,8 +32715,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
32933
32715
|
}, {
|
|
32934
32716
|
key: "cloneSet",
|
|
32935
32717
|
value: function cloneSet() {
|
|
32936
|
-
var clonedSet = new DivaSet(this.CatalogData, this.setId, {}, _objectSpread$
|
|
32937
|
-
clonedSet.setData = _objectSpread$
|
|
32718
|
+
var clonedSet = new DivaSet(this.CatalogData, this.setId, {}, _objectSpread$c({}, this.setState));
|
|
32719
|
+
clonedSet.setData = _objectSpread$c({}, this.setData);
|
|
32938
32720
|
clonedSet.configSingle = this.configSingle;
|
|
32939
32721
|
clonedSet.logTotalStateForVariants = this.logTotalStateForVariants;
|
|
32940
32722
|
var articles = this.getDivaArticles();
|
|
@@ -32967,7 +32749,7 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
32967
32749
|
for (var basketId in articles) {
|
|
32968
32750
|
//add config Steps
|
|
32969
32751
|
var article = articles[basketId];
|
|
32970
|
-
var _iterator = _createForOfIteratorHelper$3(article.articleOptionStates
|
|
32752
|
+
var _iterator = _createForOfIteratorHelper$3(article.articleOptionStates),
|
|
32971
32753
|
_step;
|
|
32972
32754
|
try {
|
|
32973
32755
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -33781,8 +33563,8 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
33781
33563
|
}();
|
|
33782
33564
|
var summaryHandlerInstance = new SummaryHandler();
|
|
33783
33565
|
|
|
33784
|
-
function ownKeys$
|
|
33785
|
-
function _objectSpread$
|
|
33566
|
+
function ownKeys$b(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; }
|
|
33567
|
+
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33786
33568
|
DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
33787
33569
|
var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
33788
33570
|
function DivaFavoritesHandler() {
|
|
@@ -34471,7 +34253,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
34471
34253
|
if (targetArticle[opt] && !variantValues[opt]) variantValues[opt] = targetArticle[opt];
|
|
34472
34254
|
}
|
|
34473
34255
|
}
|
|
34474
|
-
configVariant = new ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils.encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$
|
|
34256
|
+
configVariant = new ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils.encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$b(_objectSpread$b({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils.encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set, dimensions), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils.stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
|
|
34475
34257
|
set.basketConfigVariants.push(configVariant);
|
|
34476
34258
|
case 31:
|
|
34477
34259
|
case "end":
|
|
@@ -34566,6 +34348,8 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
34566
34348
|
}();
|
|
34567
34349
|
var favoritesHandlerInstance = new DivaFavoritesHandler();
|
|
34568
34350
|
|
|
34351
|
+
function ownKeys$a(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; }
|
|
34352
|
+
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34569
34353
|
function _createForOfIteratorHelper$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(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; } } }; }
|
|
34570
34354
|
function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(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$2(r, a) : void 0; } }
|
|
34571
34355
|
function _arrayLikeToArray$2(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; }
|
|
@@ -34665,7 +34449,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
34665
34449
|
for (var basketId in optionStatesOfArticles) {
|
|
34666
34450
|
//hier evtl. die Article mit einer gewissen reihenfolge durchlaufen!
|
|
34667
34451
|
var optionsStates = optionStatesOfArticles[basketId];
|
|
34668
|
-
var _iterator = _createForOfIteratorHelper$2(optionsStates
|
|
34452
|
+
var _iterator = _createForOfIteratorHelper$2(optionsStates),
|
|
34669
34453
|
_step;
|
|
34670
34454
|
try {
|
|
34671
34455
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -34904,7 +34688,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
34904
34688
|
if (o && !!o.isDifferentOption && !((_o$valCodex = o.valCodex) !== null && _o$valCodex !== void 0 && _o$valCodex.includes('OPVSUB'))) {
|
|
34905
34689
|
return true;
|
|
34906
34690
|
}
|
|
34907
|
-
var rul = (_ops$visibleOptionVal = ops.visibleOptionValues
|
|
34691
|
+
var rul = (_ops$visibleOptionVal = ops.visibleOptionValues[ops.visibleOPVKeys[0]]) === null || _ops$visibleOptionVal === void 0 ? void 0 : _ops$visibleOptionVal.rul;
|
|
34908
34692
|
if (rul) {
|
|
34909
34693
|
var parentOptions = DivaUtils.getOptionsByRule(rul);
|
|
34910
34694
|
return !!parentOptions.find(function (o) {
|
|
@@ -34972,7 +34756,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
34972
34756
|
key: "getConifgItemsForView",
|
|
34973
34757
|
value: function () {
|
|
34974
34758
|
var _getConifgItemsForView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(set, configStepKey) {
|
|
34975
|
-
var articles, step, retValues, optionCodex, configItems, selectedItems, optionState,
|
|
34759
|
+
var articles, step, retValues, optionCodex, configItems, selectedItems, optionState, key, _configItem$parent$oc, configItem, configItemsInOPG, retVal, _retVal, totalTime, configStepOPG, configStepOPV, targetArticle, opg, ops, selectedOpv, originalVariantValues, seomethingChanged, variantValues, _key, _set$favorites$Varian, _set$favorites, startTime, alreadyCalcedVisibleOPVs, i, _ops$optionOcd2, _retVal2, clonedConfigItemsForView, _i, timeDiff, _configItems;
|
|
34976
34760
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
34977
34761
|
while (1) switch (_context.prev = _context.next) {
|
|
34978
34762
|
case 0:
|
|
@@ -34981,7 +34765,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
34981
34765
|
retValues = this.getConfigItems(configStepKey, articles, set.configTree);
|
|
34982
34766
|
optionCodex = undefined;
|
|
34983
34767
|
if (!(retValues && step != null)) {
|
|
34984
|
-
_context.next =
|
|
34768
|
+
_context.next = 65;
|
|
34985
34769
|
break;
|
|
34986
34770
|
}
|
|
34987
34771
|
configItems = [];
|
|
@@ -34995,157 +34779,115 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
34995
34779
|
case 10:
|
|
34996
34780
|
optionCodex = optionState.optionCodex;
|
|
34997
34781
|
if (!retValues.isOPG) {
|
|
34998
|
-
_context.next =
|
|
34999
|
-
break;
|
|
35000
|
-
}
|
|
35001
|
-
_iterator2 = _createForOfIteratorHelper$2(retValues.configItems.keys());
|
|
35002
|
-
_context.prev = 13;
|
|
35003
|
-
_iterator2.s();
|
|
35004
|
-
case 15:
|
|
35005
|
-
if ((_step2 = _iterator2.n()).done) {
|
|
35006
|
-
_context.next = 25;
|
|
35007
|
-
break;
|
|
35008
|
-
}
|
|
35009
|
-
key = _step2.value;
|
|
35010
|
-
configItem = retValues.configItems.get(key);
|
|
35011
|
-
if (configItem) {
|
|
35012
|
-
_context.next = 20;
|
|
34782
|
+
_context.next = 15;
|
|
35013
34783
|
break;
|
|
35014
34784
|
}
|
|
35015
|
-
|
|
35016
|
-
|
|
35017
|
-
|
|
35018
|
-
|
|
35019
|
-
|
|
35020
|
-
|
|
35021
|
-
|
|
34785
|
+
for (key in retValues.configItems) {
|
|
34786
|
+
configItem = retValues.configItems[key];
|
|
34787
|
+
optionCodex = (_configItem$parent$oc = configItem.parent.ocd) !== null && _configItem$parent$oc !== void 0 ? _configItem$parent$oc : configItem.parent.codex;
|
|
34788
|
+
configItemsInOPG = configItem.articleOptionValues;
|
|
34789
|
+
if (configItemsInOPG) {
|
|
34790
|
+
retVal = this.prepareConfigItemsForView(set, optionState, configItemsInOPG, retValues.constructionRules, selectedItems, step.configStep.targetArticles, optionCodex);
|
|
34791
|
+
configItems = configItems.concat(retVal.myConfigItemsForView);
|
|
34792
|
+
}
|
|
35022
34793
|
}
|
|
35023
|
-
|
|
35024
|
-
_context.next = 15;
|
|
35025
|
-
break;
|
|
35026
|
-
case 25:
|
|
35027
|
-
_context.next = 30;
|
|
35028
|
-
break;
|
|
35029
|
-
case 27:
|
|
35030
|
-
_context.prev = 27;
|
|
35031
|
-
_context.t0 = _context["catch"](13);
|
|
35032
|
-
_iterator2.e(_context.t0);
|
|
35033
|
-
case 30:
|
|
35034
|
-
_context.prev = 30;
|
|
35035
|
-
_iterator2.f();
|
|
35036
|
-
return _context.finish(30);
|
|
35037
|
-
case 33:
|
|
35038
|
-
_context.next = 92;
|
|
34794
|
+
_context.next = 62;
|
|
35039
34795
|
break;
|
|
35040
|
-
case
|
|
34796
|
+
case 15:
|
|
35041
34797
|
if (!(step.optionStep.mergesToOPG == undefined)) {
|
|
35042
|
-
_context.next =
|
|
34798
|
+
_context.next = 20;
|
|
35043
34799
|
break;
|
|
35044
34800
|
}
|
|
35045
34801
|
_retVal = this.prepareConfigItemsForView(set, optionState, retValues.configItems, retValues.constructionRules, selectedItems, step.configStep.targetArticles, undefined, undefined, undefined, undefined, retValues.freeTextValue, retValues.freeTextLang);
|
|
35046
34802
|
configItems = _retVal.myConfigItemsForView;
|
|
35047
|
-
_context.next =
|
|
34803
|
+
_context.next = 62;
|
|
35048
34804
|
break;
|
|
35049
|
-
case
|
|
34805
|
+
case 20:
|
|
35050
34806
|
if (!(typeof step.optionStep.mergesToOPG == 'string' && step.tabGroup.options[step.optionStep.mergesToOPG])) {
|
|
35051
|
-
_context.next =
|
|
34807
|
+
_context.next = 62;
|
|
35052
34808
|
break;
|
|
35053
34809
|
}
|
|
35054
34810
|
//IDM Bezugschritte werden zusammengefasst zu OPG und OPV
|
|
35055
34811
|
totalTime = Date.now();
|
|
35056
34812
|
configStepOPG = step.configStep, configStepOPV = set.configTree.getConfigStepBasketIdAndOptionCodex(configStepOPG.targetArticles[0], step.optionStep.mergesToOPG); //falls mehrere Artikel im Schritt sind werden trotzdem nur die Values des erster verwendet um die z.B. OPT2 und OPT3 zu vereinen
|
|
35057
34813
|
if (!configStepOPV) {
|
|
35058
|
-
_context.next =
|
|
34814
|
+
_context.next = 62;
|
|
35059
34815
|
break;
|
|
35060
34816
|
}
|
|
35061
34817
|
targetArticle = articles[configStepOPG.targetArticles[0]];
|
|
35062
34818
|
opg = targetArticle.getArticleOptionState(configStepOPG.option);
|
|
35063
34819
|
ops = targetArticle.getArticleOptionState(configStepOPV.option);
|
|
35064
34820
|
if (opg) {
|
|
35065
|
-
_context.next =
|
|
34821
|
+
_context.next = 29;
|
|
35066
34822
|
break;
|
|
35067
34823
|
}
|
|
35068
34824
|
throw new Error('myOptionState ' + configStepOPG.option + ' is undefined');
|
|
35069
|
-
case
|
|
34825
|
+
case 29:
|
|
35070
34826
|
if (ops) {
|
|
35071
|
-
_context.next =
|
|
34827
|
+
_context.next = 31;
|
|
35072
34828
|
break;
|
|
35073
34829
|
}
|
|
35074
34830
|
throw new Error('myOptionState ' + configStepOPV.option + ' is undefined');
|
|
35075
|
-
case
|
|
34831
|
+
case 31:
|
|
35076
34832
|
selectedOpv = ops.val;
|
|
35077
34833
|
originalVariantValues = targetArticle.VariantValues;
|
|
35078
34834
|
seomethingChanged = false;
|
|
35079
34835
|
variantValues = {};
|
|
35080
|
-
|
|
35081
|
-
|
|
35082
|
-
|
|
35083
|
-
|
|
35084
|
-
if ((_step3 = _iterator3.n()).done) {
|
|
35085
|
-
_context.next = 78;
|
|
34836
|
+
_context.t0 = _regeneratorRuntime.keys(opg.visibleOptionValues);
|
|
34837
|
+
case 36:
|
|
34838
|
+
if ((_context.t1 = _context.t0()).done) {
|
|
34839
|
+
_context.next = 56;
|
|
35086
34840
|
break;
|
|
35087
34841
|
}
|
|
35088
|
-
_key =
|
|
34842
|
+
_key = _context.t1.value;
|
|
35089
34843
|
startTime = Date.now(); //die sichtbaren gruppen werden nun nacheinander beim Artikel gesetzt und die Validen bezüge jeder gruppe geholt -> visibleOptionValues;
|
|
35090
|
-
variantValues[opg.optionCodex] = opg.visibleOptionValues
|
|
35091
|
-
alreadyCalcedVisibleOPVs = targetArticle.getMergesToOPG(opg.optionCodex + '_' + opg.visibleOptionValues
|
|
34844
|
+
variantValues[opg.optionCodex] = opg.visibleOptionValues[_key].codex;
|
|
34845
|
+
alreadyCalcedVisibleOPVs = targetArticle.getMergesToOPG(opg.optionCodex + '_' + opg.visibleOptionValues[_key].codex, JSON.stringify(targetArticle.getVariantValuesTillOPT(opg.optionCodex)));
|
|
35092
34846
|
if (!(alreadyCalcedVisibleOPVs != undefined && Object.keys((_set$favorites$Varian = (_set$favorites = set.favorites) === null || _set$favorites === void 0 ? void 0 : _set$favorites.VariantValues) !== null && _set$favorites$Varian !== void 0 ? _set$favorites$Varian : {}).length == 0)) {
|
|
35093
|
-
_context.next =
|
|
34847
|
+
_context.next = 46;
|
|
35094
34848
|
break;
|
|
35095
34849
|
}
|
|
35096
34850
|
//die merged OPG wurde bereist ausgerechnet und kann wiederverwendet werden. nur die Selected value muss repariert werden
|
|
35097
|
-
if ((originalVariantValues === null || originalVariantValues === void 0 ? void 0 : originalVariantValues[opg.optionCodex]) == opg.visibleOptionValues
|
|
35098
|
-
for (
|
|
35099
|
-
if (alreadyCalcedVisibleOPVs[
|
|
35100
|
-
alreadyCalcedVisibleOPVs[
|
|
34851
|
+
if ((originalVariantValues === null || originalVariantValues === void 0 ? void 0 : originalVariantValues[opg.optionCodex]) == opg.visibleOptionValues[_key].codex) {
|
|
34852
|
+
for (i = 0; i < alreadyCalcedVisibleOPVs.length; i++) {
|
|
34853
|
+
if (alreadyCalcedVisibleOPVs[i].codex == ops.valCodex) {
|
|
34854
|
+
alreadyCalcedVisibleOPVs[i].sel = true;
|
|
35101
34855
|
}
|
|
35102
34856
|
}
|
|
35103
34857
|
}
|
|
35104
34858
|
configItems = configItems.concat(alreadyCalcedVisibleOPVs);
|
|
35105
|
-
_context.next =
|
|
34859
|
+
_context.next = 53;
|
|
35106
34860
|
break;
|
|
35107
|
-
case
|
|
34861
|
+
case 46:
|
|
35108
34862
|
seomethingChanged = true;
|
|
35109
|
-
_context.next =
|
|
34863
|
+
_context.next = 49;
|
|
35110
34864
|
return articleHandlerInstance.updateCfgValues(targetArticle, variantValues, {}, true, true, true, true);
|
|
35111
|
-
case
|
|
35112
|
-
_retVal2 = this.prepareConfigItemsForView(set, optionState, targetArticle.getArticleOptionState(ops.optionCodex).visibleOptionValues, retValues.constructionRules, [], step.configStep.targetArticles, (_ops$optionOcd2 = ops.optionOcd) !== null && _ops$optionOcd2 !== void 0 ? _ops$optionOcd2 : ops.optionCodex, opg.visibleOptionValues
|
|
34865
|
+
case 49:
|
|
34866
|
+
_retVal2 = this.prepareConfigItemsForView(set, optionState, targetArticle.getArticleOptionState(ops.optionCodex).visibleOptionValues, retValues.constructionRules, [], step.configStep.targetArticles, (_ops$optionOcd2 = ops.optionOcd) !== null && _ops$optionOcd2 !== void 0 ? _ops$optionOcd2 : ops.optionCodex, opg.visibleOptionValues[_key].name, opg.visibleOptionValues[_key].codex, opg.optionCodex);
|
|
35113
34867
|
configItems = configItems.concat(_retVal2.myConfigItemsForView);
|
|
35114
34868
|
clonedConfigItemsForView = JSON.parse(JSON.stringify(_retVal2.myConfigItemsForView));
|
|
35115
|
-
targetArticle.addMergesToOPG(opg.optionCodex + '_' + opg.visibleOptionValues
|
|
35116
|
-
case
|
|
34869
|
+
targetArticle.addMergesToOPG(opg.optionCodex + '_' + opg.visibleOptionValues[_key].codex, JSON.stringify(targetArticle.getVariantValuesTillOPT(opg.optionCodex)), clonedConfigItemsForView);
|
|
34870
|
+
case 53:
|
|
35117
34871
|
LOG$a.debug('calculating for merge to opg', _key, Date.now() - startTime + 'ms');
|
|
35118
|
-
|
|
35119
|
-
_context.next = 58;
|
|
34872
|
+
_context.next = 36;
|
|
35120
34873
|
break;
|
|
35121
|
-
case
|
|
35122
|
-
_context.next = 83;
|
|
35123
|
-
break;
|
|
35124
|
-
case 80:
|
|
35125
|
-
_context.prev = 80;
|
|
35126
|
-
_context.t1 = _context["catch"](56);
|
|
35127
|
-
_iterator3.e(_context.t1);
|
|
35128
|
-
case 83:
|
|
35129
|
-
_context.prev = 83;
|
|
35130
|
-
_iterator3.f();
|
|
35131
|
-
return _context.finish(83);
|
|
35132
|
-
case 86:
|
|
34874
|
+
case 56:
|
|
35133
34875
|
if (!seomethingChanged) {
|
|
35134
|
-
_context.next =
|
|
34876
|
+
_context.next = 59;
|
|
35135
34877
|
break;
|
|
35136
34878
|
}
|
|
35137
|
-
_context.next =
|
|
34879
|
+
_context.next = 59;
|
|
35138
34880
|
return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, originalVariantValues, [targetArticle.basketId], true, 'calcVariant');
|
|
35139
|
-
case
|
|
35140
|
-
for (
|
|
35141
|
-
if (configItems[
|
|
34881
|
+
case 59:
|
|
34882
|
+
for (_i = 0; _i < configItems.length; _i++) {
|
|
34883
|
+
if (configItems[_i].codex == (selectedOpv === null || selectedOpv === void 0 ? void 0 : selectedOpv.codex)) {
|
|
35142
34884
|
selectedItems = [selectedOpv.codex];
|
|
35143
|
-
configItems[
|
|
34885
|
+
configItems[_i].sel = true;
|
|
35144
34886
|
}
|
|
35145
34887
|
}
|
|
35146
34888
|
timeDiff = Date.now() - totalTime;
|
|
35147
34889
|
LOG$a.debug('calculating for merge to opg', 'totalTime', timeDiff + 'ms');
|
|
35148
|
-
case
|
|
34890
|
+
case 62:
|
|
35149
34891
|
return _context.abrupt("return", {
|
|
35150
34892
|
configItems: configItems,
|
|
35151
34893
|
option: optionCodex ? set.CatalogData.getOption(optionCodex) : undefined,
|
|
@@ -35156,16 +34898,17 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
35156
34898
|
}),
|
|
35157
34899
|
notTotallyMatichingOPVs: !set.CatalogData.articleConfigAll ? retValues.notTotallyMatichingOPVs : undefined
|
|
35158
34900
|
});
|
|
35159
|
-
case
|
|
34901
|
+
case 65:
|
|
34902
|
+
_configItems = [];
|
|
35160
34903
|
return _context.abrupt("return", {
|
|
35161
|
-
configItems:
|
|
34904
|
+
configItems: _configItems,
|
|
35162
34905
|
selectedItems: []
|
|
35163
34906
|
});
|
|
35164
|
-
case
|
|
34907
|
+
case 67:
|
|
35165
34908
|
case "end":
|
|
35166
34909
|
return _context.stop();
|
|
35167
34910
|
}
|
|
35168
|
-
}, _callee, this
|
|
34911
|
+
}, _callee, this);
|
|
35169
34912
|
}));
|
|
35170
34913
|
function getConifgItemsForView(_x, _x2) {
|
|
35171
34914
|
return _getConifgItemsForView.apply(this, arguments);
|
|
@@ -35177,7 +34920,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
35177
34920
|
value: function getConfigItems(key, articles, configTree) {
|
|
35178
34921
|
var step = configTree.getAllByKey(key);
|
|
35179
34922
|
if (step != null) {
|
|
35180
|
-
var configItems =
|
|
34923
|
+
var configItems = {},
|
|
35181
34924
|
visibleOptionValuesOfArticles = [],
|
|
35182
34925
|
constructionRules = {},
|
|
35183
34926
|
selectedVals = [],
|
|
@@ -35205,37 +34948,28 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
35205
34948
|
//get schnittmenge of all the articles
|
|
35206
34949
|
if (i === 0) {
|
|
35207
34950
|
constructionRules = myOptionState.constructionRules;
|
|
35208
|
-
configItems =
|
|
34951
|
+
configItems = _objectSpread$a({}, myOptionState.visibleOptionValues);
|
|
35209
34952
|
} else {
|
|
35210
|
-
var
|
|
35211
|
-
|
|
35212
|
-
|
|
35213
|
-
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
35214
|
-
var _key2 = _step4.value;
|
|
35215
|
-
if (!myOptionState.visibleOptionValues.get(_key2)) {
|
|
35216
|
-
configItems["delete"](_key2);
|
|
35217
|
-
}
|
|
34953
|
+
for (var _key2 in configItems) {
|
|
34954
|
+
if (!myOptionState.visibleOptionValues[_key2]) {
|
|
34955
|
+
delete configItems[_key2];
|
|
35218
34956
|
}
|
|
35219
|
-
} catch (err) {
|
|
35220
|
-
_iterator4.e(err);
|
|
35221
|
-
} finally {
|
|
35222
|
-
_iterator4.f();
|
|
35223
34957
|
}
|
|
35224
34958
|
}
|
|
35225
34959
|
} else if (i == 0 && configStep.targetArticles.length == 1) {
|
|
35226
34960
|
constructionRules = myOptionState.constructionRules;
|
|
35227
|
-
configItems =
|
|
34961
|
+
configItems = myOptionState.visibleOptionValues;
|
|
35228
34962
|
} else {
|
|
35229
34963
|
visibleOptionValuesOfArticles.push(myOptionState.visibleOptionValues);
|
|
35230
34964
|
}
|
|
35231
34965
|
}
|
|
35232
34966
|
if (visibleOptionValuesOfArticles.length > 0) {
|
|
35233
|
-
configItems =
|
|
34967
|
+
configItems = Object.assign({}, visibleOptionValuesOfArticles[0]);
|
|
35234
34968
|
var _loop4 = function _loop4(_i2) {
|
|
35235
34969
|
var _articles$configStep$;
|
|
35236
34970
|
if ((_articles$configStep$ = articles[configStep.targetArticles[_i2]].getArticleOptionStateFlat(configStep.option)) !== null && _articles$configStep$ !== void 0 && _articles$configStep$.definedBySetFeatureFixed) return 1; // continue
|
|
35237
|
-
var keys =
|
|
35238
|
-
var newKeys =
|
|
34971
|
+
var keys = Object.keys(configItems);
|
|
34972
|
+
var newKeys = Object.keys(visibleOptionValuesOfArticles[_i2]);
|
|
35239
34973
|
var opvsOnlyInA = keys.filter(function (x) {
|
|
35240
34974
|
return !newKeys.includes(x);
|
|
35241
34975
|
});
|
|
@@ -35244,11 +34978,9 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
35244
34978
|
});
|
|
35245
34979
|
if (opvsOnlyInA.length && opvsOnlyInB.length) {
|
|
35246
34980
|
var _loop5 = function _loop5() {
|
|
35247
|
-
var opva = configItems
|
|
35248
|
-
if (!opva) return 1; // continue
|
|
34981
|
+
var opva = configItems[opvsOnlyInA[j]];
|
|
35249
34982
|
var sameOPVExists = opvsOnlyInB.find(function (opvb) {
|
|
35250
|
-
|
|
35251
|
-
return opva.sameopv && opva.sameopv == ((_visibleOptionValuesO = visibleOptionValuesOfArticles[_i2].get(opvb)) === null || _visibleOptionValuesO === void 0 ? void 0 : _visibleOptionValuesO.sameopv);
|
|
34983
|
+
return opva.sameopv && opva.sameopv == visibleOptionValuesOfArticles[_i2][opvb].sameopv;
|
|
35252
34984
|
});
|
|
35253
34985
|
if (sameOPVExists) {
|
|
35254
34986
|
opvsOnlyInA.splice(j, 1);
|
|
@@ -35256,15 +34988,14 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
35256
34988
|
}
|
|
35257
34989
|
};
|
|
35258
34990
|
for (var j = opvsOnlyInA.length - 1; j >= 0; j--) {
|
|
35259
|
-
|
|
34991
|
+
_loop5();
|
|
35260
34992
|
}
|
|
35261
34993
|
} else if (opvsOnlyInA.length) {
|
|
35262
34994
|
var _loop6 = function _loop6() {
|
|
35263
|
-
var opva = configItems
|
|
34995
|
+
var opva = configItems[opvsOnlyInA[_j]];
|
|
35264
34996
|
if (!opva) return 1; // continue
|
|
35265
34997
|
var sameOPVExists = newKeys.find(function (opvb) {
|
|
35266
|
-
|
|
35267
|
-
return opva.sameopv && opva.sameopv == ((_visibleOptionValuesO2 = visibleOptionValuesOfArticles[_i2].get(opvb)) === null || _visibleOptionValuesO2 === void 0 ? void 0 : _visibleOptionValuesO2.sameopv);
|
|
34998
|
+
return opva.sameopv && opva.sameopv == visibleOptionValuesOfArticles[_i2][opvb].sameopv;
|
|
35268
34999
|
});
|
|
35269
35000
|
if (sameOPVExists) {
|
|
35270
35001
|
opvsOnlyInA.splice(_j, 1);
|
|
@@ -35275,11 +35006,10 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
35275
35006
|
}
|
|
35276
35007
|
} else if (opvsOnlyInB.length) {
|
|
35277
35008
|
var _loop7 = function _loop7() {
|
|
35278
|
-
var opva = configItems
|
|
35009
|
+
var opva = configItems[opvsOnlyInB[_j2]];
|
|
35279
35010
|
if (!opva) return 1; // continue
|
|
35280
35011
|
var sameOPVExists = keys.find(function (opvb) {
|
|
35281
|
-
|
|
35282
|
-
return opva.sameopv && opva.sameopv == ((_visibleOptionValuesO3 = visibleOptionValuesOfArticles[_i2].get(opvb)) === null || _visibleOptionValuesO3 === void 0 ? void 0 : _visibleOptionValuesO3.sameopv);
|
|
35012
|
+
return opva.sameopv && opva.sameopv == visibleOptionValuesOfArticles[_i2][opvb].sameopv;
|
|
35283
35013
|
});
|
|
35284
35014
|
if (sameOPVExists) {
|
|
35285
35015
|
opvsOnlyInB.splice(_j2, 1);
|
|
@@ -35324,11 +35054,11 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
35324
35054
|
ret = false;
|
|
35325
35055
|
var articles = set.getDivaArticles();
|
|
35326
35056
|
for (var basketId in articles) {
|
|
35327
|
-
var
|
|
35328
|
-
|
|
35057
|
+
var _iterator2 = _createForOfIteratorHelper$2(articles[basketId].articleOptionStates),
|
|
35058
|
+
_step2;
|
|
35329
35059
|
try {
|
|
35330
|
-
for (
|
|
35331
|
-
var ops =
|
|
35060
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
35061
|
+
var ops = _step2.value;
|
|
35332
35062
|
if (ops.headerPosVariationType == 'K') {
|
|
35333
35063
|
if (optionValues[ops.optionCodex] == undefined) {
|
|
35334
35064
|
optionValues[ops.optionCodex] = ops.valCodex ? ops.valCodex : null;
|
|
@@ -35341,9 +35071,9 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
35341
35071
|
}
|
|
35342
35072
|
}
|
|
35343
35073
|
} catch (err) {
|
|
35344
|
-
|
|
35074
|
+
_iterator2.e(err);
|
|
35345
35075
|
} finally {
|
|
35346
|
-
|
|
35076
|
+
_iterator2.f();
|
|
35347
35077
|
}
|
|
35348
35078
|
if (ret == true) break;
|
|
35349
35079
|
}
|
|
@@ -35355,17 +35085,16 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
35355
35085
|
//bei einer OPG wird hier dessen hauptoptionCodex Übergeben
|
|
35356
35086
|
idmOpgGroupName, idmOpgValCodex, idmOpgOptionCodex, freeTextValue, freeTextLang) {
|
|
35357
35087
|
var myConfigItemsForView = [];
|
|
35358
|
-
var objectKeys =
|
|
35359
|
-
var groupContentItemIdObject = this.getGroupContentItemIdObject(
|
|
35088
|
+
var objectKeys = Object.keys(myConfigItems);
|
|
35089
|
+
var groupContentItemIdObject = this.getGroupContentItemIdObject(Object.values(myConfigItems), idmOpgGroupName);
|
|
35360
35090
|
var _loop8 = function _loop8() {
|
|
35361
35091
|
var _ops$optionOcd3, _item$images, _item$colorGroups, _item$pdfUrl, _item$url;
|
|
35362
|
-
var item = myConfigItems
|
|
35363
|
-
if (!item) throw new Error('item ' + objectKeys[i] + ' not found in myConfigItems');
|
|
35092
|
+
var item = myConfigItems[objectKeys[i]];
|
|
35364
35093
|
var key = objectKeys[i];
|
|
35365
35094
|
var groupName = item.groupName ? item.groupName : idmOpgGroupName;
|
|
35366
35095
|
if (!selectedVals.find(function (opv) {
|
|
35367
|
-
var _myConfigItems$
|
|
35368
|
-
return opv == item.codex || ((_myConfigItems$
|
|
35096
|
+
var _myConfigItems$opv, _myConfigItems$opv2;
|
|
35097
|
+
return opv == item.codex || ((_myConfigItems$opv = myConfigItems[opv]) === null || _myConfigItems$opv === void 0 ? void 0 : _myConfigItems$opv.ocd) && ((_myConfigItems$opv2 = myConfigItems[opv]) === null || _myConfigItems$opv2 === void 0 ? void 0 : _myConfigItems$opv2.ocd) === item.codex;
|
|
35369
35098
|
}) && (ops.definedBySetFeatureFixed || item.hiddenByMask)) return 1; // continue
|
|
35370
35099
|
var image = item.image ? set.CatalogData.getCatImageURL(item.image, '_gal') : '';
|
|
35371
35100
|
var zoomImage = undefined;
|
|
@@ -35373,9 +35102,8 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
35373
35102
|
zoomImage = image;
|
|
35374
35103
|
image = set.CatalogData.getCatImageURL(item.zoomImage, '_gal');
|
|
35375
35104
|
}
|
|
35376
|
-
|
|
35377
|
-
|
|
35378
|
-
image = imageFromVisibleOPVsImages;
|
|
35105
|
+
if (ops.visibleOPVsImages[item.codex]) {
|
|
35106
|
+
image = ops.visibleOPVsImages[item.codex];
|
|
35379
35107
|
}
|
|
35380
35108
|
var isFav = favoritesHandlerInstance.isFavorite(set, targetArticles, item, (_ops$optionOcd3 = ops.optionOcd) !== null && _ops$optionOcd3 !== void 0 ? _ops$optionOcd3 : optionCodex);
|
|
35381
35109
|
var isSelected = !!selectedVals.find(function (opv) {
|
|
@@ -35464,12 +35192,12 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
35464
35192
|
for (var iKey in optionStatesOfArticles) {
|
|
35465
35193
|
//hier evtl. die Article mit einer gewissen reihenfolge durchlaufen!
|
|
35466
35194
|
var optionsStates = optionStatesOfArticles[iKey];
|
|
35467
|
-
var
|
|
35468
|
-
|
|
35195
|
+
var _iterator3 = _createForOfIteratorHelper$2(optionsStates),
|
|
35196
|
+
_step3;
|
|
35469
35197
|
try {
|
|
35470
|
-
for (
|
|
35198
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
35471
35199
|
var _ops$addToMeasure2;
|
|
35472
|
-
var ops =
|
|
35200
|
+
var ops = _step3.value;
|
|
35473
35201
|
var selectionmode = ops.selectionmode;
|
|
35474
35202
|
if (set.CatalogData.forceConfigSingle && (selectionmode == 1 || selectionmode == 2)) selectionmode = 3;
|
|
35475
35203
|
if (ops.isInvisible || selectionmode == 0 || !ops.isDoShow || ops.visibleCount == 0 || !!((_ops$addToMeasure2 = ops.addToMeasure) !== null && _ops$addToMeasure2 !== void 0 && _ops$addToMeasure2.length)) {
|
|
@@ -35477,9 +35205,9 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
35477
35205
|
}
|
|
35478
35206
|
}
|
|
35479
35207
|
} catch (err) {
|
|
35480
|
-
|
|
35208
|
+
_iterator3.e(err);
|
|
35481
35209
|
} finally {
|
|
35482
|
-
|
|
35210
|
+
_iterator3.f();
|
|
35483
35211
|
}
|
|
35484
35212
|
}
|
|
35485
35213
|
return configTree;
|
|
@@ -39600,7 +39328,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
39600
39328
|
var article = set.getDivaArticles()[Object.keys(set.getDivaArticles())[0]];
|
|
39601
39329
|
var opsKeys = article.articleOptionStatesKeys;
|
|
39602
39330
|
var sapCount = 0;
|
|
39603
|
-
var _iterator = _createForOfIteratorHelper$1(article.articleOptionStates
|
|
39331
|
+
var _iterator = _createForOfIteratorHelper$1(article.articleOptionStates),
|
|
39604
39332
|
_step;
|
|
39605
39333
|
try {
|
|
39606
39334
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -39724,7 +39452,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
39724
39452
|
break;
|
|
39725
39453
|
case 3:
|
|
39726
39454
|
_context12.next = 5;
|
|
39727
|
-
return import('./PfisterWWSHandler-
|
|
39455
|
+
return import('./PfisterWWSHandler-bc7dd1da.js');
|
|
39728
39456
|
case 5:
|
|
39729
39457
|
_yield$import = _context12.sent;
|
|
39730
39458
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -39732,7 +39460,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
39732
39460
|
return _context12.abrupt("break", 27);
|
|
39733
39461
|
case 9:
|
|
39734
39462
|
_context12.next = 11;
|
|
39735
|
-
return import('./LiviqueWWSHandler-
|
|
39463
|
+
return import('./LiviqueWWSHandler-962b5822.js');
|
|
39736
39464
|
case 11:
|
|
39737
39465
|
_yield$import2 = _context12.sent;
|
|
39738
39466
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -39740,7 +39468,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
39740
39468
|
return _context12.abrupt("break", 27);
|
|
39741
39469
|
case 15:
|
|
39742
39470
|
_context12.next = 17;
|
|
39743
|
-
return import('./SeriousBasketHandler-
|
|
39471
|
+
return import('./SeriousBasketHandler-0205a0d5.js');
|
|
39744
39472
|
case 17:
|
|
39745
39473
|
_yield$import3 = _context12.sent;
|
|
39746
39474
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -39748,7 +39476,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
39748
39476
|
return _context12.abrupt("break", 27);
|
|
39749
39477
|
case 21:
|
|
39750
39478
|
_context12.next = 23;
|
|
39751
|
-
return import('./StandardWWSHandler-
|
|
39479
|
+
return import('./StandardWWSHandler-5304778e.js');
|
|
39752
39480
|
case 23:
|
|
39753
39481
|
_yield$import4 = _context12.sent;
|
|
39754
39482
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -41177,7 +40905,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
41177
40905
|
while (1) switch (_context3.prev = _context3.next) {
|
|
41178
40906
|
case 0:
|
|
41179
40907
|
_context3.next = 2;
|
|
41180
|
-
return import('./Host3DSignalR-
|
|
40908
|
+
return import('./Host3DSignalR-61f6fb99.js');
|
|
41181
40909
|
case 2:
|
|
41182
40910
|
_yield$import = _context3.sent;
|
|
41183
40911
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -42735,7 +42463,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
42735
42463
|
break;
|
|
42736
42464
|
case 8:
|
|
42737
42465
|
_context4.next = 10;
|
|
42738
|
-
return import('./DivaStandardPlanner-
|
|
42466
|
+
return import('./DivaStandardPlanner-76627de9.js');
|
|
42739
42467
|
case 10:
|
|
42740
42468
|
_yield$import = _context4.sent;
|
|
42741
42469
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -42746,7 +42474,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
42746
42474
|
return _context4.abrupt("break", 21);
|
|
42747
42475
|
case 15:
|
|
42748
42476
|
_context4.next = 17;
|
|
42749
|
-
return import('./DivaBoxPlanner-
|
|
42477
|
+
return import('./DivaBoxPlanner-67c08b94.js');
|
|
42750
42478
|
case 17:
|
|
42751
42479
|
_yield$import2 = _context4.sent;
|
|
42752
42480
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -47887,7 +47615,7 @@ var Grid = /*#__PURE__*/function () {
|
|
|
47887
47615
|
_context4.next = 18;
|
|
47888
47616
|
break;
|
|
47889
47617
|
}
|
|
47890
|
-
if (montageOptionState) montageOptionState.val = montageOptionState.visibleOptionValues
|
|
47618
|
+
if (montageOptionState) montageOptionState.val = montageOptionState.visibleOptionValues[mitCodex];
|
|
47891
47619
|
_context4.next = 15;
|
|
47892
47620
|
return _this.updateAccessoireMontageOption((!isIDM ? 'OPT' : '') + optionCodex, mitCodex, specificAccessoire);
|
|
47893
47621
|
case 15:
|
|
@@ -47895,7 +47623,7 @@ var Grid = /*#__PURE__*/function () {
|
|
|
47895
47623
|
_context4.next = 21;
|
|
47896
47624
|
break;
|
|
47897
47625
|
case 18:
|
|
47898
|
-
if (montageOptionState) montageOptionState.val = montageOptionState.visibleOptionValues
|
|
47626
|
+
if (montageOptionState) montageOptionState.val = montageOptionState.visibleOptionValues[ohneCodex];
|
|
47899
47627
|
_context4.next = 21;
|
|
47900
47628
|
return _this.updateAccessoireMontageOption((!isIDM ? 'OPT' : '') + optionCodex, ohneCodex, []);
|
|
47901
47629
|
case 21:
|
|
@@ -64043,7 +63771,6 @@ var a$5 = {
|
|
|
64043
63771
|
},
|
|
64044
63772
|
settings: {
|
|
64045
63773
|
dontLoadAdditionalModelInfos: true,
|
|
64046
|
-
dontLoadCatalogEditorLiteMask: true,
|
|
64047
63774
|
identifier: 'PfisterWebPlanner',
|
|
64048
63775
|
type: 'DIVA_WEBPLANNER',
|
|
64049
63776
|
configParams: {
|
|
@@ -64114,7 +63841,6 @@ var a$4 = {
|
|
|
64114
63841
|
},
|
|
64115
63842
|
settings: {
|
|
64116
63843
|
dontLoadAdditionalModelInfos: true,
|
|
64117
|
-
dontLoadCatalogEditorLiteMask: true,
|
|
64118
63844
|
identifier: 'Seller',
|
|
64119
63845
|
type: 'DIVA_WEBPLANNER',
|
|
64120
63846
|
configParams: {
|
|
@@ -64174,7 +63900,6 @@ var a$3 = {
|
|
|
64174
63900
|
},
|
|
64175
63901
|
settings: {
|
|
64176
63902
|
dontLoadAdditionalModelInfos: true,
|
|
64177
|
-
dontLoadCatalogEditorLiteMask: true,
|
|
64178
63903
|
configParams: {
|
|
64179
63904
|
mediaServiceApiKey: '620e074df81de00012ef47ed.wUyoXTbh4tR3DklrzvvdxFveVK9zcj4H',
|
|
64180
63905
|
// api2devKey: '627b71be68f4c30011dd25e2.I2RdwvdHG4gruMNr6l810tTU5x7afNMm',
|