@crystaldesign/web-planner-logic 26.14.0-beta.32 → 26.14.0-beta.33
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-67edb68b.js → DivaBoxPlanner-93e40ff6.js} +2 -2
- package/build/cjs/{DivaStandardPlanner-29d25b93.js → DivaStandardPlanner-90493d1b.js} +2 -2
- package/build/cjs/{DoorPlanner-3193abf9.js → DoorPlanner-8cbae86f.js} +1 -1
- package/build/cjs/{Host3DSignalR-c8859493.js → Host3DSignalR-c5052424.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-7804d581.js → LiviqueWWSHandler-ab4ce5c7.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-c6b93520.js → PfisterWWSHandler-6dbfcff4.js} +1 -1
- package/build/cjs/{PlannerHandler2D-7a79e191.js → PlannerHandler2D-4549a20c.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-534a81ba.js → SeriousBasketHandler-b4461030.js} +1 -1
- package/build/cjs/{ShelfPlanner-f6b19965.js → ShelfPlanner-18139c57.js} +1 -1
- package/build/cjs/{StandardWWSHandler-eb367f31.js → StandardWWSHandler-612f003d.js} +1 -1
- package/build/cjs/{index-03575eb4.js → index-11211a0e.js} +755 -639
- package/build/cjs/index.js +2 -1
- package/build/esm/{DivaBoxPlanner-b5817973.js → DivaBoxPlanner-d616cefc.js} +2 -2
- package/build/esm/{DivaStandardPlanner-2084715b.js → DivaStandardPlanner-2a024ff0.js} +2 -2
- package/build/esm/{DoorPlanner-d2a5deac.js → DoorPlanner-1dd81e60.js} +1 -1
- package/build/esm/{Host3DSignalR-ae4a5ae9.js → Host3DSignalR-727454f0.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-7bfacb71.js → LiviqueWWSHandler-23c7b65a.js} +1 -1
- package/build/esm/{PfisterWWSHandler-cc745e52.js → PfisterWWSHandler-954b5cda.js} +1 -1
- package/build/esm/{PlannerHandler2D-2bf51f9b.js → PlannerHandler2D-f77d2f78.js} +1 -1
- package/build/esm/{SeriousBasketHandler-817d4898.js → SeriousBasketHandler-53824123.js} +1 -1
- package/build/esm/{ShelfPlanner-e996961c.js → ShelfPlanner-295d17cc.js} +1 -1
- package/build/esm/{StandardWWSHandler-314f6b1f.js → StandardWWSHandler-8debfb39.js} +1 -1
- package/build/esm/{index-51900283.js → index-b070e6c1.js} +755 -640
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/index.d.ts +1 -0
- package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +7 -0
- 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.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/measureUnit.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Article/measureUnit.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts +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 +0 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts +3 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +10 -3
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +12 -0
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts +2 -0
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Properties/propertySchemaRegistry.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/bundleRulesKeepConfigurations.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/bundleRulesKeepConfigurations.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/idmPartsCatalogReports.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/idmPartsCatalogReports.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/measureUnitSymbol.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/measureUnitSymbol.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/pricePreviewConflictingOptions.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/pricePreviewConflictingOptions.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/reopenPartlistLinesLookup.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/reopenPartlistLinesLookup.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/setCatalogOptionLookup.test.d.ts +3 -0
- package/build/types/web-planner-logic/src/test/setCatalogOptionLookup.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/setTitleArticleName.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/setTitleArticleName.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/shelfMoveOverOwnCells.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/shelfMoveOverOwnCells.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/viewActions.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/viewActions.test.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -2068,7 +2068,7 @@ function isPropertyOn(value) {
|
|
|
2068
2068
|
|
|
2069
2069
|
/** The encoding per property codex, for one entity. */
|
|
2070
2070
|
|
|
2071
|
-
/**
|
|
2071
|
+
/** 101 properties parsed on the catalog entity. */
|
|
2072
2072
|
var CATALOG_PROPERTIES = {
|
|
2073
2073
|
'3D_COMPATIBLE_WITH_IMAGE_CACHE': 'boolean:1',
|
|
2074
2074
|
ACCESSOIRE_STEP_AS_PLANNER: 'boolean:1',
|
|
@@ -2165,6 +2165,7 @@ var CATALOG_PROPERTIES = {
|
|
|
2165
2165
|
USEGLOBALSVGSCALE: 'boolean:1',
|
|
2166
2166
|
USEPOSCOUNTVALUE: 'boolean:1',
|
|
2167
2167
|
USEPRGASOPVARTICLENR: 'boolean:1',
|
|
2168
|
+
USE_ARTICLE_NAME_AS_TITLE: 'boolean:1',
|
|
2168
2169
|
USE_DECISION_POS_COUNT_VALUE: 'boolean:1',
|
|
2169
2170
|
USE_DIOMEX_CONFIG_LOGIC: 'boolean:1',
|
|
2170
2171
|
USE_SHELFPLANNER_RTV: 'boolean:1',
|
|
@@ -18144,6 +18145,21 @@ function measureInUnit(centimeters, unit) {
|
|
|
18144
18145
|
return Math.round(centimeters / TO_CENTIMETERS[unit](1) * 1e6) / 1e6;
|
|
18145
18146
|
}
|
|
18146
18147
|
|
|
18148
|
+
/** The symbol of each IDM length code, the same in every language. */
|
|
18149
|
+
var SYMBOL_OF_IDM_CODE = {
|
|
18150
|
+
MMT: 'mm',
|
|
18151
|
+
CMT: 'cm',
|
|
18152
|
+
DMT: 'dm',
|
|
18153
|
+
MTR: 'm',
|
|
18154
|
+
INH: 'in'
|
|
18155
|
+
};
|
|
18156
|
+
|
|
18157
|
+
/** An option's unit as people read it: the symbol of an IDM length code (MMT → mm), any other unit as the catalog writes it. */
|
|
18158
|
+
function measureUnitSymbol(unit) {
|
|
18159
|
+
var code = idmMeasureUnit(unit);
|
|
18160
|
+
return code && Object.prototype.hasOwnProperty.call(SYMBOL_OF_IDM_CODE, code) ? SYMBOL_OF_IDM_CODE[code] : unit;
|
|
18161
|
+
}
|
|
18162
|
+
|
|
18147
18163
|
var LOG$s = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
18148
18164
|
var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
18149
18165
|
function OptionValueCatalogData(opv, catalogData) {
|
|
@@ -22238,7 +22254,7 @@ function _loadMoreFromIDMArticles() {
|
|
|
22238
22254
|
while (1) switch (_context5.prev = _context5.next) {
|
|
22239
22255
|
case 0:
|
|
22240
22256
|
prfgNo = _step6.value;
|
|
22241
|
-
if (!
|
|
22257
|
+
if (!catalogData.getPricefeaturegroup(prfgNo)) {
|
|
22242
22258
|
_context5.next = 3;
|
|
22243
22259
|
break;
|
|
22244
22260
|
}
|
|
@@ -22250,7 +22266,7 @@ function _loadMoreFromIDMArticles() {
|
|
|
22250
22266
|
}).map(function (a) {
|
|
22251
22267
|
return a.articleCodex;
|
|
22252
22268
|
});
|
|
22253
|
-
|
|
22269
|
+
catalogData.reportMissingPricefeaturegroup(prfgNo, {
|
|
22254
22270
|
articleCodices: askedBy
|
|
22255
22271
|
});
|
|
22256
22272
|
case 5:
|
|
@@ -22404,7 +22420,7 @@ function _loadMoreFromIDMArticles() {
|
|
|
22404
22420
|
while (1) switch (_context6.prev = _context6.next) {
|
|
22405
22421
|
case 0:
|
|
22406
22422
|
featureNo = _step7.value;
|
|
22407
|
-
if (!
|
|
22423
|
+
if (!catalogData.loadedFeatures.some(function (f) {
|
|
22408
22424
|
return f.featureNo == featureNo;
|
|
22409
22425
|
})) {
|
|
22410
22426
|
_context6.next = 3;
|
|
@@ -22417,7 +22433,7 @@ function _loadMoreFromIDMArticles() {
|
|
|
22417
22433
|
}).map(function (fc) {
|
|
22418
22434
|
return fc.featureClassNo;
|
|
22419
22435
|
});
|
|
22420
|
-
|
|
22436
|
+
catalogData.reportMissingFeature(Number(featureNo), {
|
|
22421
22437
|
featureClassNos: askedBy
|
|
22422
22438
|
});
|
|
22423
22439
|
case 5:
|
|
@@ -24611,6 +24627,11 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
24611
24627
|
get: function get() {
|
|
24612
24628
|
return this.catalogProps.divaForceRTV;
|
|
24613
24629
|
}
|
|
24630
|
+
}, {
|
|
24631
|
+
key: "useArticleNameAsTitle",
|
|
24632
|
+
get: function get() {
|
|
24633
|
+
return this.catalogProps.useArticleNameAsTitle;
|
|
24634
|
+
}
|
|
24614
24635
|
}, {
|
|
24615
24636
|
key: "PlannerMeasureDigits",
|
|
24616
24637
|
get: function get() {
|
|
@@ -25438,6 +25459,10 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
25438
25459
|
case 'DIVA3D_AR_FORCERTV':
|
|
25439
25460
|
_this2.catalogProps.divaForceRTV = item.Value === true;
|
|
25440
25461
|
break;
|
|
25462
|
+
case 'USE_ARTICLE_NAME_AS_TITLE':
|
|
25463
|
+
// no stored value = not set: the view config keeps deciding
|
|
25464
|
+
_this2.catalogProps.useArticleNameAsTitle = item.Value === undefined ? undefined : item.Value === true;
|
|
25465
|
+
break;
|
|
25441
25466
|
case 'DIVA3D_USE_RTV_NEXT':
|
|
25442
25467
|
_this2.catalogProps.divaUseRtvNext = item.Value === true;
|
|
25443
25468
|
break;
|
|
@@ -28835,20 +28860,18 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
28835
28860
|
}
|
|
28836
28861
|
break;
|
|
28837
28862
|
}
|
|
28838
|
-
|
|
28863
|
+
var perimeter = this.article.getPerimeter(OP);
|
|
28864
|
+
if ((mUnit || perimeter !== undefined) && this.article.parentHasSameOption(OP) && !((_ops$addToMeasure = ops.addToMeasure) !== null && _ops$addToMeasure !== void 0 && _ops$addToMeasure.length)) {
|
|
28839
28865
|
var freeTextMeasure = parseFloat(ops.freeText ? ops.freeText : '');
|
|
28840
28866
|
var newFreeTextMeasure = this.article.calcAddToMeasure(OP, freeTextMeasure);
|
|
28841
28867
|
if (newFreeTextMeasure) LOG$j.debug('freetext changed by addToMeasure at price calculation', newFreeTextMeasure, freeTextMeasure, ops.addToMeasure);
|
|
28842
28868
|
freeTextMeasure = newFreeTextMeasure;
|
|
28843
|
-
if (freeTextMeasure ||
|
|
28869
|
+
if (freeTextMeasure || perimeter !== undefined) {
|
|
28844
28870
|
if (calcUnitPrice != 0) {
|
|
28845
28871
|
var quantity = 0;
|
|
28846
|
-
if (
|
|
28847
|
-
mUnit = 'cm';
|
|
28848
|
-
quantity = this.article.calcWidth * 2 + this.article.calcDepth * 2;
|
|
28849
|
-
} else if (OP == 'OPTUMFANG_KREIS') {
|
|
28872
|
+
if (perimeter !== undefined) {
|
|
28850
28873
|
mUnit = 'cm';
|
|
28851
|
-
quantity =
|
|
28874
|
+
quantity = perimeter;
|
|
28852
28875
|
} else {
|
|
28853
28876
|
quantity = freeTextMeasure;
|
|
28854
28877
|
}
|
|
@@ -33518,6 +33541,14 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
33518
33541
|
this.actPlannerData.depthFromSVG = false;
|
|
33519
33542
|
}
|
|
33520
33543
|
}
|
|
33544
|
+
/** The band length in cm the perimeter options OPTUMFANG and OPTUMFANG_KREIS stand for; undefined for every other option. */
|
|
33545
|
+
}, {
|
|
33546
|
+
key: "getPerimeter",
|
|
33547
|
+
value: function getPerimeter(optionCodex) {
|
|
33548
|
+
if (optionCodex == 'OPTUMFANG') return this.calcWidth * 2 + this.calcDepth * 2;
|
|
33549
|
+
if (optionCodex == 'OPTUMFANG_KREIS') return this.calcWidth * Math.PI;
|
|
33550
|
+
return undefined;
|
|
33551
|
+
}
|
|
33521
33552
|
}, {
|
|
33522
33553
|
key: "height",
|
|
33523
33554
|
get: function get() {
|
|
@@ -33737,25 +33768,57 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
33737
33768
|
}
|
|
33738
33769
|
return ret;
|
|
33739
33770
|
}
|
|
33771
|
+
|
|
33772
|
+
/**
|
|
33773
|
+
* Options that hold different values inside this article's partlist tree, e.g. a frame and a headboard with their
|
|
33774
|
+
* own fabric. The flat VisibleVariantValues can keep only one of those values.
|
|
33775
|
+
*/
|
|
33740
33776
|
}, {
|
|
33741
|
-
key: "
|
|
33777
|
+
key: "conflictingOptionCodices",
|
|
33742
33778
|
get: function get() {
|
|
33743
|
-
var
|
|
33744
|
-
var
|
|
33745
|
-
var _iterator11 = _createForOfIteratorHelper$o(
|
|
33779
|
+
var values = new Map();
|
|
33780
|
+
var conflicting = new Set();
|
|
33781
|
+
var _iterator11 = _createForOfIteratorHelper$o(this.getAllArticleOptionsStates()),
|
|
33746
33782
|
_step11;
|
|
33747
33783
|
try {
|
|
33748
33784
|
for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
|
|
33785
|
+
var _ops$freeText2;
|
|
33749
33786
|
var ops = _step11.value;
|
|
33787
|
+
if (!ops.valCodex) continue;
|
|
33788
|
+
var value = ops.valCodex + ((_ops$freeText2 = ops.freeText) !== null && _ops$freeText2 !== void 0 ? _ops$freeText2 : '');
|
|
33789
|
+
var otherValue = values.get(ops.optionCodex);
|
|
33790
|
+
if (otherValue !== undefined && otherValue !== value) {
|
|
33791
|
+
conflicting.add(ops.optionCodex);
|
|
33792
|
+
conflicting.add(ops.optionCodex + '_val');
|
|
33793
|
+
}
|
|
33794
|
+
values.set(ops.optionCodex, value);
|
|
33795
|
+
}
|
|
33796
|
+
} catch (err) {
|
|
33797
|
+
_iterator11.e(err);
|
|
33798
|
+
} finally {
|
|
33799
|
+
_iterator11.f();
|
|
33800
|
+
}
|
|
33801
|
+
return conflicting;
|
|
33802
|
+
}
|
|
33803
|
+
}, {
|
|
33804
|
+
key: "AllVariantValues",
|
|
33805
|
+
get: function get() {
|
|
33806
|
+
var ret = {};
|
|
33807
|
+
var opss = this.getAllArticleOptionsStates();
|
|
33808
|
+
var _iterator12 = _createForOfIteratorHelper$o(opss),
|
|
33809
|
+
_step12;
|
|
33810
|
+
try {
|
|
33811
|
+
for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
|
|
33812
|
+
var ops = _step12.value;
|
|
33750
33813
|
ret[ops.optionCodex] = ops.valCodex;
|
|
33751
33814
|
if (ops.freeText) {
|
|
33752
33815
|
ret[ops.optionCodex + '_val'] = ops.freeText;
|
|
33753
33816
|
}
|
|
33754
33817
|
}
|
|
33755
33818
|
} catch (err) {
|
|
33756
|
-
|
|
33819
|
+
_iterator12.e(err);
|
|
33757
33820
|
} finally {
|
|
33758
|
-
|
|
33821
|
+
_iterator12.f();
|
|
33759
33822
|
}
|
|
33760
33823
|
return ret;
|
|
33761
33824
|
}
|
|
@@ -33763,12 +33826,12 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
33763
33826
|
key: "VariantValuesWithoutEmptyFreetext",
|
|
33764
33827
|
get: function get() {
|
|
33765
33828
|
var ret = {};
|
|
33766
|
-
var
|
|
33767
|
-
|
|
33829
|
+
var _iterator13 = _createForOfIteratorHelper$o(this.articleOptionStates.values()),
|
|
33830
|
+
_step13;
|
|
33768
33831
|
try {
|
|
33769
|
-
for (
|
|
33832
|
+
for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
|
|
33770
33833
|
var _ops$freeTextLang;
|
|
33771
|
-
var ops =
|
|
33834
|
+
var ops = _step13.value;
|
|
33772
33835
|
// free text entered per language (classification) lives in freeTextLang only, in any of its languages; 'OPV_TEXT_FREI' is the codex, not a text
|
|
33773
33836
|
var hasFreeTextLang = Object.values((_ops$freeTextLang = ops.freeTextLang) !== null && _ops$freeTextLang !== void 0 ? _ops$freeTextLang : {}).some(function (text) {
|
|
33774
33837
|
return !!text && text !== 'OPV_TEXT_FREI';
|
|
@@ -33778,9 +33841,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
33778
33841
|
}
|
|
33779
33842
|
}
|
|
33780
33843
|
} catch (err) {
|
|
33781
|
-
|
|
33844
|
+
_iterator13.e(err);
|
|
33782
33845
|
} finally {
|
|
33783
|
-
|
|
33846
|
+
_iterator13.f();
|
|
33784
33847
|
}
|
|
33785
33848
|
return ret;
|
|
33786
33849
|
}
|
|
@@ -33788,12 +33851,12 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
33788
33851
|
key: "VariantValuesParentOption",
|
|
33789
33852
|
get: function get() {
|
|
33790
33853
|
var ret = {};
|
|
33791
|
-
var
|
|
33792
|
-
|
|
33854
|
+
var _iterator14 = _createForOfIteratorHelper$o(this.articleOptionStates.values()),
|
|
33855
|
+
_step14;
|
|
33793
33856
|
try {
|
|
33794
|
-
for (
|
|
33857
|
+
for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
|
|
33795
33858
|
var _ops$optionOcd;
|
|
33796
|
-
var ops =
|
|
33859
|
+
var ops = _step14.value;
|
|
33797
33860
|
var optionCodex = (ops.option.parentOptionCodex ? ops.option.parentOptionCodex + '.' : '') + ((_ops$optionOcd = ops.optionOcd) !== null && _ops$optionOcd !== void 0 ? _ops$optionOcd : ops.option.codex);
|
|
33798
33861
|
if (ops.isMultiselect && ops.multiSelects) {
|
|
33799
33862
|
ret[optionCodex] = ops.multiSelects.map(function (v) {
|
|
@@ -33814,9 +33877,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
33814
33877
|
}
|
|
33815
33878
|
}
|
|
33816
33879
|
} catch (err) {
|
|
33817
|
-
|
|
33880
|
+
_iterator14.e(err);
|
|
33818
33881
|
} finally {
|
|
33819
|
-
|
|
33882
|
+
_iterator14.f();
|
|
33820
33883
|
}
|
|
33821
33884
|
return ret;
|
|
33822
33885
|
}
|
|
@@ -33836,11 +33899,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
33836
33899
|
key: "setDifferentOptions",
|
|
33837
33900
|
value: function setDifferentOptions(options) {
|
|
33838
33901
|
var _this3 = this;
|
|
33839
|
-
var
|
|
33840
|
-
|
|
33902
|
+
var _iterator15 = _createForOfIteratorHelper$o(this.articleOptionStates.values()),
|
|
33903
|
+
_step15;
|
|
33841
33904
|
try {
|
|
33842
33905
|
var _loop = function _loop() {
|
|
33843
|
-
var ops =
|
|
33906
|
+
var ops = _step15.value;
|
|
33844
33907
|
var found = false;
|
|
33845
33908
|
for (var i = 0; i < options.length; i++) {
|
|
33846
33909
|
var option = options[i];
|
|
@@ -33857,13 +33920,13 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
33857
33920
|
}
|
|
33858
33921
|
if (!found) ops.isDifferentOption = false;
|
|
33859
33922
|
};
|
|
33860
|
-
for (
|
|
33923
|
+
for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
|
|
33861
33924
|
_loop();
|
|
33862
33925
|
}
|
|
33863
33926
|
} catch (err) {
|
|
33864
|
-
|
|
33927
|
+
_iterator15.e(err);
|
|
33865
33928
|
} finally {
|
|
33866
|
-
|
|
33929
|
+
_iterator15.f();
|
|
33867
33930
|
}
|
|
33868
33931
|
}
|
|
33869
33932
|
}, {
|
|
@@ -33876,20 +33939,20 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
33876
33939
|
get: function get() {
|
|
33877
33940
|
var hash = this.catalogCodex + '_' + this.articleCodex + '_' + this.quantity + '_';
|
|
33878
33941
|
var variantValues = [];
|
|
33879
|
-
var
|
|
33880
|
-
|
|
33942
|
+
var _iterator16 = _createForOfIteratorHelper$o(this.articleOptionStates.values()),
|
|
33943
|
+
_step16;
|
|
33881
33944
|
try {
|
|
33882
|
-
for (
|
|
33945
|
+
for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
|
|
33883
33946
|
var _ops$idmVariantenArt;
|
|
33884
|
-
var ops =
|
|
33947
|
+
var ops = _step16.value;
|
|
33885
33948
|
if (ops.isDoShow && (![95, 96, 97, 1095, 1096, 1097].includes((_ops$idmVariantenArt = ops.idmVariantenArt) !== null && _ops$idmVariantenArt !== void 0 ? _ops$idmVariantenArt : 0) || ops.isVisibleFreeText) && ops.val && ops.visibleCount > 0 && !ops.isDescribingState) {
|
|
33886
33949
|
variantValues.push((this.CatalogData.isIDMFormat ? ops.optionCodex : ops.optionCodex.substring(3)) + '_' + (this.CatalogData.isIDMFormat ? ops.val.codex : ops.val.codex.substring(3)) + (ops.freeText ? '_' + ops.freeText : ops.value ? '_' + ops.value : ''));
|
|
33887
33950
|
}
|
|
33888
33951
|
}
|
|
33889
33952
|
} catch (err) {
|
|
33890
|
-
|
|
33953
|
+
_iterator16.e(err);
|
|
33891
33954
|
} finally {
|
|
33892
|
-
|
|
33955
|
+
_iterator16.f();
|
|
33893
33956
|
}
|
|
33894
33957
|
return DivaUtils.md5(hash + variantValues.join());
|
|
33895
33958
|
}
|
|
@@ -33897,11 +33960,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
33897
33960
|
key: "VariantValuesWithoutOPTandOPV",
|
|
33898
33961
|
get: function get() {
|
|
33899
33962
|
var ret = {};
|
|
33900
|
-
var
|
|
33901
|
-
|
|
33963
|
+
var _iterator17 = _createForOfIteratorHelper$o(this.articleOptionStates.values()),
|
|
33964
|
+
_step17;
|
|
33902
33965
|
try {
|
|
33903
|
-
for (
|
|
33904
|
-
var ops =
|
|
33966
|
+
for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
|
|
33967
|
+
var ops = _step17.value;
|
|
33905
33968
|
if (ops.valCodex && !ops.isDescribingState) {
|
|
33906
33969
|
ret[this.CatalogData.isIDMFormat ? ops.optionCodex : ops.optionCodex.substring(3)] = this.CatalogData.isIDMFormat ? ops.valCodex : ops.valCodex.substring(3);
|
|
33907
33970
|
if (ops.freeText) {
|
|
@@ -33910,9 +33973,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
33910
33973
|
}
|
|
33911
33974
|
}
|
|
33912
33975
|
} catch (err) {
|
|
33913
|
-
|
|
33976
|
+
_iterator17.e(err);
|
|
33914
33977
|
} finally {
|
|
33915
|
-
|
|
33978
|
+
_iterator17.f();
|
|
33916
33979
|
}
|
|
33917
33980
|
return ret;
|
|
33918
33981
|
}
|
|
@@ -33931,11 +33994,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
33931
33994
|
key: "getVariantValuesTillOPT",
|
|
33932
33995
|
value: function getVariantValuesTillOPT(opt) {
|
|
33933
33996
|
var ret = {};
|
|
33934
|
-
var
|
|
33935
|
-
|
|
33997
|
+
var _iterator18 = _createForOfIteratorHelper$o(this.articleOptionStates.values()),
|
|
33998
|
+
_step18;
|
|
33936
33999
|
try {
|
|
33937
|
-
for (
|
|
33938
|
-
var ops =
|
|
34000
|
+
for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
|
|
34001
|
+
var ops = _step18.value;
|
|
33939
34002
|
if (opt != ops.optionCodex) {
|
|
33940
34003
|
if (ops.valCodex) {
|
|
33941
34004
|
ret[ops.optionCodex] = ops.valCodex;
|
|
@@ -33945,9 +34008,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
33945
34008
|
}
|
|
33946
34009
|
}
|
|
33947
34010
|
} catch (err) {
|
|
33948
|
-
|
|
34011
|
+
_iterator18.e(err);
|
|
33949
34012
|
} finally {
|
|
33950
|
-
|
|
34013
|
+
_iterator18.f();
|
|
33951
34014
|
}
|
|
33952
34015
|
return ret;
|
|
33953
34016
|
}
|
|
@@ -33982,18 +34045,18 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
33982
34045
|
key: "requiredUserInputOptions",
|
|
33983
34046
|
get: function get() {
|
|
33984
34047
|
var options = [];
|
|
33985
|
-
var
|
|
33986
|
-
|
|
34048
|
+
var _iterator19 = _createForOfIteratorHelper$o(this.openRequiredUserInputOptions),
|
|
34049
|
+
_step19;
|
|
33987
34050
|
try {
|
|
33988
|
-
for (
|
|
33989
|
-
var ops =
|
|
34051
|
+
for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
|
|
34052
|
+
var ops = _step19.value;
|
|
33990
34053
|
ops.showWarningForRequiresUserInput = true;
|
|
33991
34054
|
options.push(ops.optionCodex);
|
|
33992
34055
|
}
|
|
33993
34056
|
} catch (err) {
|
|
33994
|
-
|
|
34057
|
+
_iterator19.e(err);
|
|
33995
34058
|
} finally {
|
|
33996
|
-
|
|
34059
|
+
_iterator19.f();
|
|
33997
34060
|
}
|
|
33998
34061
|
return options;
|
|
33999
34062
|
}
|
|
@@ -34095,20 +34158,20 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34095
34158
|
key: "getMetaData",
|
|
34096
34159
|
value: function getMetaData(locales) {
|
|
34097
34160
|
var metaDatas = locales ? this.article.catalogArticle.metaData_locales : this.article.catalogArticle.metaData;
|
|
34098
|
-
var
|
|
34099
|
-
|
|
34161
|
+
var _iterator20 = _createForOfIteratorHelper$o(this.articleOptionStates.values()),
|
|
34162
|
+
_step20;
|
|
34100
34163
|
try {
|
|
34101
|
-
for (
|
|
34164
|
+
for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
|
|
34102
34165
|
var _ref3;
|
|
34103
|
-
var ops =
|
|
34166
|
+
var ops = _step20.value;
|
|
34104
34167
|
var opv = ops.val;
|
|
34105
34168
|
var opsMetaData = (_ref3 = locales ? opv === null || opv === void 0 ? void 0 : opv.metaData_locales : opv === null || opv === void 0 ? void 0 : opv.metaData) !== null && _ref3 !== void 0 ? _ref3 : {};
|
|
34106
34169
|
this.mergeMetaDatas(metaDatas, opsMetaData);
|
|
34107
34170
|
}
|
|
34108
34171
|
} catch (err) {
|
|
34109
|
-
|
|
34172
|
+
_iterator20.e(err);
|
|
34110
34173
|
} finally {
|
|
34111
|
-
|
|
34174
|
+
_iterator20.f();
|
|
34112
34175
|
}
|
|
34113
34176
|
for (var basketId in this.partlistArticles) {
|
|
34114
34177
|
this.mergeMetaDatas(metaDatas, locales ? this.partlistArticles[basketId].MetaData_locales : this.partlistArticles[basketId].MetaData);
|
|
@@ -34167,11 +34230,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34167
34230
|
opvDoesExist = false;
|
|
34168
34231
|
var opvsInOption = refOptData.articleOptionValues;
|
|
34169
34232
|
if (refOptData.hasOPG && opvsInOption) {
|
|
34170
|
-
var
|
|
34171
|
-
|
|
34233
|
+
var _iterator21 = _createForOfIteratorHelper$o(opvsInOption.keys()),
|
|
34234
|
+
_step21;
|
|
34172
34235
|
try {
|
|
34173
|
-
for (
|
|
34174
|
-
var iKey =
|
|
34236
|
+
for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
|
|
34237
|
+
var iKey = _step21.value;
|
|
34175
34238
|
if (opvIsValid && anyDoShowFound) break;
|
|
34176
34239
|
var opg = opvsInOption.get(iKey);
|
|
34177
34240
|
if (!opg) continue;
|
|
@@ -34180,11 +34243,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34180
34243
|
if (refOps.visibleOptionValues.get(iKey)) {
|
|
34181
34244
|
anyDoShowFound = true;
|
|
34182
34245
|
}
|
|
34183
|
-
var
|
|
34184
|
-
|
|
34246
|
+
var _iterator22 = _createForOfIteratorHelper$o(opvsFromOpg.keys()),
|
|
34247
|
+
_step22;
|
|
34185
34248
|
try {
|
|
34186
|
-
for (
|
|
34187
|
-
var jKey =
|
|
34249
|
+
for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
|
|
34250
|
+
var jKey = _step22.value;
|
|
34188
34251
|
var opv = opvsFromOpg.get(jKey);
|
|
34189
34252
|
if (opv && refOps.visibleOptionValues.get(iKey)) {
|
|
34190
34253
|
var parentName = opv.parentName;
|
|
@@ -34206,22 +34269,22 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34206
34269
|
}
|
|
34207
34270
|
}
|
|
34208
34271
|
} catch (err) {
|
|
34209
|
-
|
|
34272
|
+
_iterator22.e(err);
|
|
34210
34273
|
} finally {
|
|
34211
|
-
|
|
34274
|
+
_iterator22.f();
|
|
34212
34275
|
}
|
|
34213
34276
|
}
|
|
34214
34277
|
} catch (err) {
|
|
34215
|
-
|
|
34278
|
+
_iterator21.e(err);
|
|
34216
34279
|
} finally {
|
|
34217
|
-
|
|
34280
|
+
_iterator21.f();
|
|
34218
34281
|
}
|
|
34219
34282
|
} else if (opvsInOption) {
|
|
34220
|
-
var
|
|
34221
|
-
|
|
34283
|
+
var _iterator23 = _createForOfIteratorHelper$o(opvsInOption.keys()),
|
|
34284
|
+
_step23;
|
|
34222
34285
|
try {
|
|
34223
|
-
for (
|
|
34224
|
-
var _iKey =
|
|
34286
|
+
for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {
|
|
34287
|
+
var _iKey = _step23.value;
|
|
34225
34288
|
if (opvIsValid && anyDoShowFound) break;
|
|
34226
34289
|
if (refOps.visibleOptionValues.get(_iKey)) {
|
|
34227
34290
|
anyDoShowFound = true;
|
|
@@ -34242,9 +34305,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34242
34305
|
}
|
|
34243
34306
|
}
|
|
34244
34307
|
} catch (err) {
|
|
34245
|
-
|
|
34308
|
+
_iterator23.e(err);
|
|
34246
34309
|
} finally {
|
|
34247
|
-
|
|
34310
|
+
_iterator23.f();
|
|
34248
34311
|
}
|
|
34249
34312
|
}
|
|
34250
34313
|
if (!opvIsValid || ignoreOPVIsValid) {
|
|
@@ -34295,11 +34358,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34295
34358
|
var _accessoiresToUpdate$;
|
|
34296
34359
|
var variantValues = {};
|
|
34297
34360
|
var accessoire = articles[_i2];
|
|
34298
|
-
var
|
|
34299
|
-
|
|
34361
|
+
var _iterator24 = _createForOfIteratorHelper$o(accessoire.articleOptionStates.values()),
|
|
34362
|
+
_step24;
|
|
34300
34363
|
try {
|
|
34301
|
-
for (
|
|
34302
|
-
var ops =
|
|
34364
|
+
for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {
|
|
34365
|
+
var ops = _step24.value;
|
|
34303
34366
|
if (singleOpts.includes(ops.optionCodex)) {
|
|
34304
34367
|
if (accessoire.hasType1Dependencies) {
|
|
34305
34368
|
variantValues[ops.optionCodex] = curOpvValue.replace('OPV' + opt.substring(3), 'OPV' + ops.optionCodex.substring(3));
|
|
@@ -34310,9 +34373,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34310
34373
|
}
|
|
34311
34374
|
//an accessoire can get values of several global options, the ones of the previous options must stay
|
|
34312
34375
|
} catch (err) {
|
|
34313
|
-
|
|
34376
|
+
_iterator24.e(err);
|
|
34314
34377
|
} finally {
|
|
34315
|
-
|
|
34378
|
+
_iterator24.f();
|
|
34316
34379
|
}
|
|
34317
34380
|
if (Object.entries(variantValues).length > 0) accessoiresToUpdate[accessoire.basketId] = {
|
|
34318
34381
|
accessoire: accessoire,
|
|
@@ -34328,11 +34391,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34328
34391
|
value: function getGlobalOptions() {
|
|
34329
34392
|
var ret = {};
|
|
34330
34393
|
var opss = this.articleOptionStatesWithParents;
|
|
34331
|
-
var
|
|
34332
|
-
|
|
34394
|
+
var _iterator25 = _createForOfIteratorHelper$o(opss),
|
|
34395
|
+
_step25;
|
|
34333
34396
|
try {
|
|
34334
|
-
for (
|
|
34335
|
-
var ops =
|
|
34397
|
+
for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {
|
|
34398
|
+
var ops = _step25.value;
|
|
34336
34399
|
var value = ops.option.isDefaultValueForOptions;
|
|
34337
34400
|
if (value) {
|
|
34338
34401
|
var entires = value.split(';');
|
|
@@ -34341,9 +34404,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34341
34404
|
}
|
|
34342
34405
|
}
|
|
34343
34406
|
} catch (err) {
|
|
34344
|
-
|
|
34407
|
+
_iterator25.e(err);
|
|
34345
34408
|
} finally {
|
|
34346
|
-
|
|
34409
|
+
_iterator25.f();
|
|
34347
34410
|
}
|
|
34348
34411
|
return ret;
|
|
34349
34412
|
}
|
|
@@ -34383,34 +34446,34 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34383
34446
|
}
|
|
34384
34447
|
if (Object.keys(ret.opt).length === 0) {
|
|
34385
34448
|
//nicht gefunden - jetzt OCD kontrollieren
|
|
34386
|
-
var
|
|
34387
|
-
|
|
34449
|
+
var _iterator26 = _createForOfIteratorHelper$o(this.articleOptionStates.values()),
|
|
34450
|
+
_step26;
|
|
34388
34451
|
try {
|
|
34389
|
-
for (
|
|
34390
|
-
var _ops4 =
|
|
34452
|
+
for (_iterator26.s(); !(_step26 = _iterator26.n()).done;) {
|
|
34453
|
+
var _ops4 = _step26.value;
|
|
34391
34454
|
if (_ops4.option.ocd == optionCodex && _ops4.isDoShow && (parentOptionCodex == '' || parentOptionCodex == _ops4.option.parentOptionCodex)) {
|
|
34392
34455
|
ret = this.checkOptionSearchOPV(_ops4.option, optionValueCodex, ret);
|
|
34393
34456
|
}
|
|
34394
34457
|
}
|
|
34395
34458
|
//fallback for pfister classification usecase
|
|
34396
34459
|
} catch (err) {
|
|
34397
|
-
|
|
34460
|
+
_iterator26.e(err);
|
|
34398
34461
|
} finally {
|
|
34399
|
-
|
|
34462
|
+
_iterator26.f();
|
|
34400
34463
|
}
|
|
34401
|
-
var
|
|
34402
|
-
|
|
34464
|
+
var _iterator27 = _createForOfIteratorHelper$o(this.articleOptionStates.values()),
|
|
34465
|
+
_step27;
|
|
34403
34466
|
try {
|
|
34404
|
-
for (
|
|
34405
|
-
var _ops5 =
|
|
34467
|
+
for (_iterator27.s(); !(_step27 = _iterator27.n()).done;) {
|
|
34468
|
+
var _ops5 = _step27.value;
|
|
34406
34469
|
if (_ops5.option.ocd == optionCodex && optionCodex !== null && optionCodex !== void 0 && optionCodex.startsWith('OPTOPT') && (parentOptionCodex == '' || parentOptionCodex == _ops5.option.parentOptionCodex)) {
|
|
34407
34470
|
return this.checkOptionSearchOPV(_ops5.option, optionValueCodex, ret);
|
|
34408
34471
|
}
|
|
34409
34472
|
}
|
|
34410
34473
|
} catch (err) {
|
|
34411
|
-
|
|
34474
|
+
_iterator27.e(err);
|
|
34412
34475
|
} finally {
|
|
34413
|
-
|
|
34476
|
+
_iterator27.f();
|
|
34414
34477
|
}
|
|
34415
34478
|
}
|
|
34416
34479
|
}
|
|
@@ -34426,26 +34489,26 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34426
34489
|
}
|
|
34427
34490
|
if (myOPT.hasOPG) {
|
|
34428
34491
|
var myOPGs = myOPT.articleOptionValues;
|
|
34429
|
-
var
|
|
34430
|
-
|
|
34492
|
+
var _iterator28 = _createForOfIteratorHelper$o(myOPGs),
|
|
34493
|
+
_step28;
|
|
34431
34494
|
try {
|
|
34432
|
-
for (
|
|
34433
|
-
var
|
|
34434
|
-
iKey =
|
|
34435
|
-
opg =
|
|
34495
|
+
for (_iterator28.s(); !(_step28 = _iterator28.n()).done;) {
|
|
34496
|
+
var _step28$value = _slicedToArray__default["default"](_step28.value, 2),
|
|
34497
|
+
iKey = _step28$value[0],
|
|
34498
|
+
opg = _step28$value[1];
|
|
34436
34499
|
var myOPVs = opg.articleOptionValues;
|
|
34437
34500
|
if (myOPVs && myOPVs.get(optionValueCodex)) {
|
|
34438
34501
|
ret.opv = myOPVs.get(optionValueCodex);
|
|
34439
34502
|
found = true;
|
|
34440
34503
|
}
|
|
34441
34504
|
if (!found) {
|
|
34442
|
-
var
|
|
34443
|
-
|
|
34505
|
+
var _iterator29 = _createForOfIteratorHelper$o(myOPVs),
|
|
34506
|
+
_step29;
|
|
34444
34507
|
try {
|
|
34445
|
-
for (
|
|
34446
|
-
var
|
|
34447
|
-
jKey =
|
|
34448
|
-
opv =
|
|
34508
|
+
for (_iterator29.s(); !(_step29 = _iterator29.n()).done;) {
|
|
34509
|
+
var _step29$value = _slicedToArray__default["default"](_step29.value, 2),
|
|
34510
|
+
jKey = _step29$value[0],
|
|
34511
|
+
opv = _step29$value[1];
|
|
34449
34512
|
if (opv.ocd == optionValueCodex || opv.codex == optionValueCodex || optionValueCodex === 'OPVOPV_NICHT_RELEVANT' && jKey.startsWith('OPVOPV_NICHT_RELEVANT')) {
|
|
34450
34513
|
ret.opv = opv;
|
|
34451
34514
|
found = true;
|
|
@@ -34453,19 +34516,19 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34453
34516
|
}
|
|
34454
34517
|
}
|
|
34455
34518
|
} catch (err) {
|
|
34456
|
-
|
|
34519
|
+
_iterator29.e(err);
|
|
34457
34520
|
} finally {
|
|
34458
|
-
|
|
34521
|
+
_iterator29.f();
|
|
34459
34522
|
}
|
|
34460
34523
|
}
|
|
34461
34524
|
if (!found && myOPT.parentOptionCodex) {
|
|
34462
|
-
var
|
|
34463
|
-
|
|
34525
|
+
var _iterator30 = _createForOfIteratorHelper$o(myOPVs),
|
|
34526
|
+
_step30;
|
|
34464
34527
|
try {
|
|
34465
|
-
for (
|
|
34466
|
-
var
|
|
34467
|
-
_jKey =
|
|
34468
|
-
_opv =
|
|
34528
|
+
for (_iterator30.s(); !(_step30 = _iterator30.n()).done;) {
|
|
34529
|
+
var _step30$value = _slicedToArray__default["default"](_step30.value, 2),
|
|
34530
|
+
_jKey = _step30$value[0],
|
|
34531
|
+
_opv = _step30$value[1];
|
|
34469
34532
|
if (_opv.ocd && _opv.ocd.startsWith(optionValueCodex) || _opv.codex.startsWith(optionValueCodex)) {
|
|
34470
34533
|
ret.opv = _opv;
|
|
34471
34534
|
found = true;
|
|
@@ -34473,17 +34536,17 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34473
34536
|
}
|
|
34474
34537
|
}
|
|
34475
34538
|
} catch (err) {
|
|
34476
|
-
|
|
34539
|
+
_iterator30.e(err);
|
|
34477
34540
|
} finally {
|
|
34478
|
-
|
|
34541
|
+
_iterator30.f();
|
|
34479
34542
|
}
|
|
34480
34543
|
}
|
|
34481
34544
|
if (ret.opv && Object.entries(ret.opv).length != 0) break;
|
|
34482
34545
|
}
|
|
34483
34546
|
} catch (err) {
|
|
34484
|
-
|
|
34547
|
+
_iterator28.e(err);
|
|
34485
34548
|
} finally {
|
|
34486
|
-
|
|
34549
|
+
_iterator28.f();
|
|
34487
34550
|
}
|
|
34488
34551
|
} else {
|
|
34489
34552
|
var _myOPVs = myOPT.articleOptionValues;
|
|
@@ -34492,13 +34555,13 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34492
34555
|
found = true;
|
|
34493
34556
|
}
|
|
34494
34557
|
if (!found) {
|
|
34495
|
-
var
|
|
34496
|
-
|
|
34558
|
+
var _iterator31 = _createForOfIteratorHelper$o(_myOPVs),
|
|
34559
|
+
_step31;
|
|
34497
34560
|
try {
|
|
34498
|
-
for (
|
|
34499
|
-
var
|
|
34500
|
-
_jKey2 =
|
|
34501
|
-
_opv2 =
|
|
34561
|
+
for (_iterator31.s(); !(_step31 = _iterator31.n()).done;) {
|
|
34562
|
+
var _step31$value = _slicedToArray__default["default"](_step31.value, 2),
|
|
34563
|
+
_jKey2 = _step31$value[0],
|
|
34564
|
+
_opv2 = _step31$value[1];
|
|
34502
34565
|
if (_opv2.ocd == optionValueCodex || optionValueCodex === 'OPVOPV_NICHT_RELEVANT' && _jKey2.startsWith('OPVOPV_NICHT_RELEVANT')) {
|
|
34503
34566
|
ret.opv = _opv2;
|
|
34504
34567
|
found = true;
|
|
@@ -34506,9 +34569,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34506
34569
|
}
|
|
34507
34570
|
}
|
|
34508
34571
|
} catch (err) {
|
|
34509
|
-
|
|
34572
|
+
_iterator31.e(err);
|
|
34510
34573
|
} finally {
|
|
34511
|
-
|
|
34574
|
+
_iterator31.f();
|
|
34512
34575
|
}
|
|
34513
34576
|
}
|
|
34514
34577
|
}
|
|
@@ -34518,11 +34581,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34518
34581
|
key: "getArticleJsonVariantValues",
|
|
34519
34582
|
value: function getArticleJsonVariantValues() {
|
|
34520
34583
|
var retval = {};
|
|
34521
|
-
var
|
|
34522
|
-
|
|
34584
|
+
var _iterator32 = _createForOfIteratorHelper$o(this.articleOptionStates.values()),
|
|
34585
|
+
_step32;
|
|
34523
34586
|
try {
|
|
34524
|
-
for (
|
|
34525
|
-
var ops =
|
|
34587
|
+
for (_iterator32.s(); !(_step32 = _iterator32.n()).done;) {
|
|
34588
|
+
var ops = _step32.value;
|
|
34526
34589
|
if (ops.valCodex) {
|
|
34527
34590
|
retval[ops.optionCodex] = ops.valCodex;
|
|
34528
34591
|
var opsVal = this.getArticleOptionStateFlat(ops.optionCodex + '_val');
|
|
@@ -34535,9 +34598,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34535
34598
|
}
|
|
34536
34599
|
}
|
|
34537
34600
|
} catch (err) {
|
|
34538
|
-
|
|
34601
|
+
_iterator32.e(err);
|
|
34539
34602
|
} finally {
|
|
34540
|
-
|
|
34603
|
+
_iterator32.f();
|
|
34541
34604
|
}
|
|
34542
34605
|
return retval;
|
|
34543
34606
|
}
|
|
@@ -34637,38 +34700,38 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34637
34700
|
}, {
|
|
34638
34701
|
key: "findFreeTextOpv",
|
|
34639
34702
|
value: function findFreeTextOpv(ops) {
|
|
34640
|
-
var
|
|
34641
|
-
|
|
34703
|
+
var _iterator33 = _createForOfIteratorHelper$o(ops.visibleOptionValues),
|
|
34704
|
+
_step33;
|
|
34642
34705
|
try {
|
|
34643
|
-
for (
|
|
34644
|
-
var
|
|
34645
|
-
key =
|
|
34646
|
-
opv =
|
|
34706
|
+
for (_iterator33.s(); !(_step33 = _iterator33.n()).done;) {
|
|
34707
|
+
var _step33$value = _slicedToArray__default["default"](_step33.value, 2),
|
|
34708
|
+
key = _step33$value[0],
|
|
34709
|
+
opv = _step33$value[1];
|
|
34647
34710
|
if (opv.isFreeText) {
|
|
34648
34711
|
return opv;
|
|
34649
34712
|
}
|
|
34650
34713
|
}
|
|
34651
34714
|
} catch (err) {
|
|
34652
|
-
|
|
34715
|
+
_iterator33.e(err);
|
|
34653
34716
|
} finally {
|
|
34654
|
-
|
|
34717
|
+
_iterator33.f();
|
|
34655
34718
|
}
|
|
34656
34719
|
return undefined;
|
|
34657
34720
|
}
|
|
34658
34721
|
}, {
|
|
34659
34722
|
key: "defineAllOptions",
|
|
34660
34723
|
value: function defineAllOptions() {
|
|
34661
|
-
var
|
|
34662
|
-
|
|
34724
|
+
var _iterator34 = _createForOfIteratorHelper$o(this.articleOptionStates.values()),
|
|
34725
|
+
_step34;
|
|
34663
34726
|
try {
|
|
34664
|
-
for (
|
|
34665
|
-
var ops =
|
|
34727
|
+
for (_iterator34.s(); !(_step34 = _iterator34.n()).done;) {
|
|
34728
|
+
var ops = _step34.value;
|
|
34666
34729
|
ops.isDefined = true;
|
|
34667
34730
|
}
|
|
34668
34731
|
} catch (err) {
|
|
34669
|
-
|
|
34732
|
+
_iterator34.e(err);
|
|
34670
34733
|
} finally {
|
|
34671
|
-
|
|
34734
|
+
_iterator34.f();
|
|
34672
34735
|
}
|
|
34673
34736
|
}
|
|
34674
34737
|
}, {
|
|
@@ -34680,13 +34743,13 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34680
34743
|
}, {
|
|
34681
34744
|
key: "getDefaultOpv",
|
|
34682
34745
|
value: function getDefaultOpv(visibleOptionValues) {
|
|
34683
|
-
var
|
|
34684
|
-
|
|
34746
|
+
var _iterator35 = _createForOfIteratorHelper$o(visibleOptionValues),
|
|
34747
|
+
_step35;
|
|
34685
34748
|
try {
|
|
34686
|
-
for (
|
|
34687
|
-
var
|
|
34688
|
-
iKey =
|
|
34689
|
-
opv =
|
|
34749
|
+
for (_iterator35.s(); !(_step35 = _iterator35.n()).done;) {
|
|
34750
|
+
var _step35$value = _slicedToArray__default["default"](_step35.value, 2),
|
|
34751
|
+
iKey = _step35$value[0],
|
|
34752
|
+
opv = _step35$value[1];
|
|
34690
34753
|
if (opv.isOPVG) {
|
|
34691
34754
|
var _opv$articleOptionVal, _opv$articleOptionVal2;
|
|
34692
34755
|
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) {
|
|
@@ -34701,9 +34764,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34701
34764
|
}
|
|
34702
34765
|
}
|
|
34703
34766
|
} catch (err) {
|
|
34704
|
-
|
|
34767
|
+
_iterator35.e(err);
|
|
34705
34768
|
} finally {
|
|
34706
|
-
|
|
34769
|
+
_iterator35.f();
|
|
34707
34770
|
}
|
|
34708
34771
|
return Array.from(visibleOptionValues.values())[0];
|
|
34709
34772
|
}
|
|
@@ -34811,7 +34874,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34811
34874
|
break;
|
|
34812
34875
|
}
|
|
34813
34876
|
_context.next = 4;
|
|
34814
|
-
return Promise.resolve().then(function () { return require('./ShelfPlanner-
|
|
34877
|
+
return Promise.resolve().then(function () { return require('./ShelfPlanner-18139c57.js'); });
|
|
34815
34878
|
case 4:
|
|
34816
34879
|
_yield$import = _context.sent;
|
|
34817
34880
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -34900,19 +34963,19 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34900
34963
|
value: function afterInit() {
|
|
34901
34964
|
if (!this.CatalogData.useDiomexConfigLogic) return {};
|
|
34902
34965
|
var variantValues = {};
|
|
34903
|
-
var
|
|
34904
|
-
|
|
34966
|
+
var _iterator36 = _createForOfIteratorHelper$o(this.articleOptionStates.values()),
|
|
34967
|
+
_step36;
|
|
34905
34968
|
try {
|
|
34906
|
-
for (
|
|
34907
|
-
var ops =
|
|
34969
|
+
for (_iterator36.s(); !(_step36 = _iterator36.n()).done;) {
|
|
34970
|
+
var ops = _step36.value;
|
|
34908
34971
|
if (ops.val === undefined && ops.visibleOPVKeys.length && !ops.invisibleWithoutMaskeInfluence) {
|
|
34909
34972
|
variantValues[ops.optionCodex] = ops.visibleOPVKeys[0];
|
|
34910
34973
|
}
|
|
34911
34974
|
}
|
|
34912
34975
|
} catch (err) {
|
|
34913
|
-
|
|
34976
|
+
_iterator36.e(err);
|
|
34914
34977
|
} finally {
|
|
34915
|
-
|
|
34978
|
+
_iterator36.f();
|
|
34916
34979
|
}
|
|
34917
34980
|
return variantValues;
|
|
34918
34981
|
}
|
|
@@ -34953,13 +35016,13 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34953
35016
|
var catalogopv = ops.option.articleOptionValues.get(myValues[_key]);
|
|
34954
35017
|
if (catalogopv !== null && catalogopv !== void 0 && catalogopv.sameopv) {
|
|
34955
35018
|
var opvs = ops.option.articleOptionValues;
|
|
34956
|
-
var
|
|
34957
|
-
|
|
35019
|
+
var _iterator37 = _createForOfIteratorHelper$o(opvs),
|
|
35020
|
+
_step37;
|
|
34958
35021
|
try {
|
|
34959
|
-
for (
|
|
34960
|
-
var
|
|
34961
|
-
opvKey =
|
|
34962
|
-
checkingOpv =
|
|
35022
|
+
for (_iterator37.s(); !(_step37 = _iterator37.n()).done;) {
|
|
35023
|
+
var _step37$value = _slicedToArray__default["default"](_step37.value, 2),
|
|
35024
|
+
opvKey = _step37$value[0],
|
|
35025
|
+
checkingOpv = _step37$value[1];
|
|
34963
35026
|
if (opvKey === catalogopv.codex) continue;
|
|
34964
35027
|
if (checkingOpv !== null && checkingOpv !== void 0 && checkingOpv.sameopv && catalogopv.sameopv == checkingOpv.sameopv) {
|
|
34965
35028
|
if (!ops.visibleOptionValues.get(catalogopv.codex) && ops.visibleOptionValues.get(checkingOpv.codex)) {
|
|
@@ -34968,9 +35031,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34968
35031
|
}
|
|
34969
35032
|
}
|
|
34970
35033
|
} catch (err) {
|
|
34971
|
-
|
|
35034
|
+
_iterator37.e(err);
|
|
34972
35035
|
} finally {
|
|
34973
|
-
|
|
35036
|
+
_iterator37.f();
|
|
34974
35037
|
}
|
|
34975
35038
|
}
|
|
34976
35039
|
}
|
|
@@ -34981,20 +35044,20 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
34981
35044
|
} else if (_key2.endsWith('_val') && this.getArticleOptionState(_key2.replace(/_val/g, ''))) {
|
|
34982
35045
|
validValues[_key2] = myValues[_key2];
|
|
34983
35046
|
} else {
|
|
34984
|
-
var
|
|
34985
|
-
|
|
35047
|
+
var _iterator38 = _createForOfIteratorHelper$o(this.articleOptionStates.values()),
|
|
35048
|
+
_step38;
|
|
34986
35049
|
try {
|
|
34987
|
-
for (
|
|
34988
|
-
var _ops7 =
|
|
35050
|
+
for (_iterator38.s(); !(_step38 = _iterator38.n()).done;) {
|
|
35051
|
+
var _ops7 = _step38.value;
|
|
34989
35052
|
if (_ops7.optionOcd == _key2) {
|
|
34990
35053
|
var values = this.checkOptionSearchOPV(_ops7.option, myValues[_key2], {});
|
|
34991
35054
|
if (values !== null && values !== void 0 && values.opv) validValues[_ops7.optionCodex] = values.opv.codex;
|
|
34992
35055
|
}
|
|
34993
35056
|
}
|
|
34994
35057
|
} catch (err) {
|
|
34995
|
-
|
|
35058
|
+
_iterator38.e(err);
|
|
34996
35059
|
} finally {
|
|
34997
|
-
|
|
35060
|
+
_iterator38.f();
|
|
34998
35061
|
}
|
|
34999
35062
|
}
|
|
35000
35063
|
//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
|
|
@@ -35076,12 +35139,12 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
35076
35139
|
for (var _i4 = 0, _arr = [this].concat(_toConsumableArray__default["default"](this.partlistArticlesReqursive)); _i4 < _arr.length; _i4++) {
|
|
35077
35140
|
var article = _arr[_i4];
|
|
35078
35141
|
if (article.isIDM3DSkipped) continue;
|
|
35079
|
-
var
|
|
35080
|
-
|
|
35142
|
+
var _iterator39 = _createForOfIteratorHelper$o(article.getArticleOptionStatesWithOptionsForPrint().values()),
|
|
35143
|
+
_step39;
|
|
35081
35144
|
try {
|
|
35082
|
-
for (
|
|
35145
|
+
for (_iterator39.s(); !(_step39 = _iterator39.n()).done;) {
|
|
35083
35146
|
var _ops$option$ocd, _ops$val$ocd3, _ops$val$property, _ops$val$properties;
|
|
35084
|
-
var ops =
|
|
35147
|
+
var ops = _step39.value;
|
|
35085
35148
|
if (!ops.val || article.isPartListArticle && ops.val.isNotRelevant) continue;
|
|
35086
35149
|
var opt = (article.CatalogData.isIDMFormat ? 'OPT' : '') + ((_ops$option$ocd = ops.option.ocd) !== null && _ops$option$ocd !== void 0 ? _ops$option$ocd : ops.optionCodex);
|
|
35087
35150
|
if (alternateRenderInfo !== null && alternateRenderInfo !== void 0 && alternateRenderInfo.hideOptionsIn3DImage.includes(opt)) continue;
|
|
@@ -35093,9 +35156,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
35093
35156
|
});
|
|
35094
35157
|
}
|
|
35095
35158
|
} catch (err) {
|
|
35096
|
-
|
|
35159
|
+
_iterator39.e(err);
|
|
35097
35160
|
} finally {
|
|
35098
|
-
|
|
35161
|
+
_iterator39.f();
|
|
35099
35162
|
}
|
|
35100
35163
|
}
|
|
35101
35164
|
return sources;
|
|
@@ -35104,18 +35167,18 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
35104
35167
|
key: "addOptionStateFromArticleToPlannerData",
|
|
35105
35168
|
value: function addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo, partlistPrefix) {
|
|
35106
35169
|
var articleOptions = this.getArticleOptionStatesWithOptionsForPrint();
|
|
35107
|
-
var
|
|
35108
|
-
|
|
35170
|
+
var _iterator40 = _createForOfIteratorHelper$o(articleOptions.values()),
|
|
35171
|
+
_step40;
|
|
35109
35172
|
try {
|
|
35110
|
-
for (
|
|
35173
|
+
for (_iterator40.s(); !(_step40 = _iterator40.n()).done;) {
|
|
35111
35174
|
var _ops$val5;
|
|
35112
|
-
var ops =
|
|
35175
|
+
var ops = _step40.value;
|
|
35113
35176
|
if (!this.article.isPartlistArticle || !((_ops$val5 = ops.val) !== null && _ops$val5 !== void 0 && _ops$val5.isNotRelevant)) this.addOptionStateToPlannerData(ret, ops, alternateRenderInfo, partlistPrefix);
|
|
35114
35177
|
}
|
|
35115
35178
|
} catch (err) {
|
|
35116
|
-
|
|
35179
|
+
_iterator40.e(err);
|
|
35117
35180
|
} finally {
|
|
35118
|
-
|
|
35181
|
+
_iterator40.f();
|
|
35119
35182
|
}
|
|
35120
35183
|
for (var key in this.article.partlistArticles) {
|
|
35121
35184
|
var _pla$partlistGroupPre;
|
|
@@ -35177,11 +35240,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
35177
35240
|
key: "getAccessoireMATData",
|
|
35178
35241
|
value: function getAccessoireMATData(onString) {
|
|
35179
35242
|
var MAT = [];
|
|
35180
|
-
var
|
|
35181
|
-
|
|
35243
|
+
var _iterator41 = _createForOfIteratorHelper$o(this.articleOptionStates.values()),
|
|
35244
|
+
_step41;
|
|
35182
35245
|
try {
|
|
35183
|
-
for (
|
|
35184
|
-
var ops =
|
|
35246
|
+
for (_iterator41.s(); !(_step41 = _iterator41.n()).done;) {
|
|
35247
|
+
var ops = _step41.value;
|
|
35185
35248
|
var opt = void 0;
|
|
35186
35249
|
if (!ops.val) continue;
|
|
35187
35250
|
opt = ops.optionCodex;
|
|
@@ -35194,9 +35257,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
35194
35257
|
});
|
|
35195
35258
|
}
|
|
35196
35259
|
} catch (err) {
|
|
35197
|
-
|
|
35260
|
+
_iterator41.e(err);
|
|
35198
35261
|
} finally {
|
|
35199
|
-
|
|
35262
|
+
_iterator41.f();
|
|
35200
35263
|
}
|
|
35201
35264
|
return MAT;
|
|
35202
35265
|
}
|
|
@@ -35240,11 +35303,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
35240
35303
|
value: function getVariantBasketData() {
|
|
35241
35304
|
var variantBasketData = [];
|
|
35242
35305
|
var articleOptions = this.getArticleOptionStatesWithOptionsForPrint();
|
|
35243
|
-
var
|
|
35244
|
-
|
|
35306
|
+
var _iterator42 = _createForOfIteratorHelper$o(articleOptions.values()),
|
|
35307
|
+
_step42;
|
|
35245
35308
|
try {
|
|
35246
|
-
for (
|
|
35247
|
-
var ops =
|
|
35309
|
+
for (_iterator42.s(); !(_step42 = _iterator42.n()).done;) {
|
|
35310
|
+
var ops = _step42.value;
|
|
35248
35311
|
var OP = ops.optionCodex;
|
|
35249
35312
|
if (ops) {
|
|
35250
35313
|
var _ops$idmVariantenArt2;
|
|
@@ -35271,6 +35334,10 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
35271
35334
|
var opvNames = this.getMergedOPGNames(ops);
|
|
35272
35335
|
// a partlist position prints the options its OptionsForPrint names, even implicit (type I) ones
|
|
35273
35336
|
var isOptionForPrint = this.isPartListArticle && !!((_this$optionsForPrint2 = this.optionsForPrint) !== null && _this$optionsForPrint2 !== void 0 && _this$optionsForPrint2.includes(OP));
|
|
35337
|
+
// the perimeter options name the formula the price is calculated with; print its result instead, rounded up so the
|
|
35338
|
+
// band reaches around the carpet (to 2 decimals first, so float noise like 890.0000001 does not add a centimetre)
|
|
35339
|
+
var perimeter = this.getPerimeter(OP);
|
|
35340
|
+
var perimeterName = perimeter !== undefined && perimeter > 0 ? Math.ceil(DivaUtils__default["default"].decimalAdjust('round', perimeter, 2)) + ' cm' : undefined;
|
|
35274
35341
|
var myOptItem = {
|
|
35275
35342
|
BasketID: this.basketId,
|
|
35276
35343
|
OPT: this.CatalogData.isIDMFormat ? OP : OP.substring(3),
|
|
@@ -35281,9 +35348,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
35281
35348
|
OCD: ops.ocd,
|
|
35282
35349
|
OPV: this.CatalogData.isIDMFormat ? ops.val.codex : ops.val.codex.substring(3),
|
|
35283
35350
|
vOPV: !this.CatalogData.dontUseVCodexInBasket ? ops.vCodex : undefined,
|
|
35284
|
-
OPVName: DivaUtils__default["default"].stripTags(opvNames.origName),
|
|
35285
|
-
MaskOPVName: opvNames.origName !== opvNames.name ? DivaUtils__default["default"].stripTags(opvNames.name) : undefined,
|
|
35286
|
-
OPVName_locales: DivaUtils__default["default"].stripTagsFromDict((_ops$valName_locales2 = ops.valName_locales) !== null && _ops$valName_locales2 !== void 0 ? _ops$valName_locales2 : {}),
|
|
35351
|
+
OPVName: perimeterName !== null && perimeterName !== void 0 ? perimeterName : DivaUtils__default["default"].stripTags(opvNames.origName),
|
|
35352
|
+
MaskOPVName: !perimeterName && opvNames.origName !== opvNames.name ? DivaUtils__default["default"].stripTags(opvNames.name) : undefined,
|
|
35353
|
+
OPVName_locales: perimeterName ? {} : DivaUtils__default["default"].stripTagsFromDict((_ops$valName_locales2 = ops.valName_locales) !== null && _ops$valName_locales2 !== void 0 ? _ops$valName_locales2 : {}),
|
|
35287
35354
|
OPVImage: ops.val.image ? this.CatalogData.getCatImageURL(ops.val.image, '_gal') : '',
|
|
35288
35355
|
FreeText: freeText,
|
|
35289
35356
|
MeasureUnit: ops.measureUnit,
|
|
@@ -35302,7 +35369,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
35302
35369
|
TabGroup_locales: ops.optionTabGroup_locales,
|
|
35303
35370
|
SendToSAP: ops.option.sendToSAP,
|
|
35304
35371
|
ArticlePlaceholder: ops.option.articlePlaceholder,
|
|
35305
|
-
Hidden: !!(ops.headerPosVariationType == 'I' && !isOptionForPrint || ops.invisibleWithoutMaskeInfluence || ops.val.hideInSummary || this.isPartListArticle && (_this$optionsForPrint3 = this.optionsForPrint) !== null && _this$optionsForPrint3 !== void 0 && _this$optionsForPrint3.length && !isOptionForPrint
|
|
35372
|
+
Hidden: !!(ops.headerPosVariationType == 'I' && !isOptionForPrint || ops.invisibleWithoutMaskeInfluence || ops.val.hideInSummary || this.isPartListArticle && (_this$optionsForPrint3 = this.optionsForPrint) !== null && _this$optionsForPrint3 !== void 0 && _this$optionsForPrint3.length && !isOptionForPrint ||
|
|
35373
|
+
// a band position may name both perimeter options; only the one its carpet has is the band's length, as in the price
|
|
35374
|
+
perimeter !== undefined && !this.parentHasSameOption(OP)),
|
|
35306
35375
|
HideInOrderText: ops.hideInOrderText,
|
|
35307
35376
|
IsDescribingState: ops.isDescribingState,
|
|
35308
35377
|
FreeTextLang: ops.freeTextLang,
|
|
@@ -35314,9 +35383,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
35314
35383
|
}
|
|
35315
35384
|
}
|
|
35316
35385
|
} catch (err) {
|
|
35317
|
-
|
|
35386
|
+
_iterator42.e(err);
|
|
35318
35387
|
} finally {
|
|
35319
|
-
|
|
35388
|
+
_iterator42.f();
|
|
35320
35389
|
}
|
|
35321
35390
|
return variantBasketData;
|
|
35322
35391
|
}
|
|
@@ -35507,13 +35576,13 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
35507
35576
|
key: "unresolvedTemplateTokens",
|
|
35508
35577
|
value: function unresolvedTemplateTokens(template) {
|
|
35509
35578
|
var unresolved = [];
|
|
35510
|
-
var
|
|
35511
|
-
|
|
35579
|
+
var _iterator43 = _createForOfIteratorHelper$o(template.matchAll(/\{(.*?)\}/g)),
|
|
35580
|
+
_step43;
|
|
35512
35581
|
try {
|
|
35513
|
-
for (
|
|
35514
|
-
var
|
|
35515
|
-
token =
|
|
35516
|
-
expression =
|
|
35582
|
+
for (_iterator43.s(); !(_step43 = _iterator43.n()).done;) {
|
|
35583
|
+
var _step43$value = _slicedToArray__default["default"](_step43.value, 2),
|
|
35584
|
+
token = _step43$value[0],
|
|
35585
|
+
expression = _step43$value[1];
|
|
35517
35586
|
var resolved = this.resolveTemplateToken(String(expression));
|
|
35518
35587
|
if (resolved === '' || resolved.startsWith('___')) unresolved.push({
|
|
35519
35588
|
token: token,
|
|
@@ -35521,9 +35590,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
35521
35590
|
});
|
|
35522
35591
|
}
|
|
35523
35592
|
} catch (err) {
|
|
35524
|
-
|
|
35593
|
+
_iterator43.e(err);
|
|
35525
35594
|
} finally {
|
|
35526
|
-
|
|
35595
|
+
_iterator43.f();
|
|
35527
35596
|
}
|
|
35528
35597
|
return unresolved;
|
|
35529
35598
|
}
|
|
@@ -35651,18 +35720,18 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
35651
35720
|
value: function cloneArticle(set) {
|
|
35652
35721
|
var clonedArticle = new DivaArticle(set, this.basketId, _objectSpread$p({}, this.article), this.article.catalogArticle, set.CatalogData);
|
|
35653
35722
|
clonedArticle.articleOptionStatesData = new Map();
|
|
35654
|
-
var
|
|
35655
|
-
|
|
35723
|
+
var _iterator44 = _createForOfIteratorHelper$o(this.articleOptionStates.values()),
|
|
35724
|
+
_step44;
|
|
35656
35725
|
try {
|
|
35657
|
-
for (
|
|
35658
|
-
var ops =
|
|
35726
|
+
for (_iterator44.s(); !(_step44 = _iterator44.n()).done;) {
|
|
35727
|
+
var ops = _step44.value;
|
|
35659
35728
|
var clonedOps = ops.cloneOptionState(clonedArticle.getIsConfigSingle);
|
|
35660
35729
|
clonedArticle.articleOptionStatesData.set(ops.optionCodex, clonedOps);
|
|
35661
35730
|
}
|
|
35662
35731
|
} catch (err) {
|
|
35663
|
-
|
|
35732
|
+
_iterator44.e(err);
|
|
35664
35733
|
} finally {
|
|
35665
|
-
|
|
35734
|
+
_iterator44.f();
|
|
35666
35735
|
}
|
|
35667
35736
|
clonedArticle.initEngine();
|
|
35668
35737
|
clonedArticle.hasDecisionsInitialized = true;
|
|
@@ -37532,7 +37601,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
37532
37601
|
key: "correctPartlistArticlesByGlobalRules",
|
|
37533
37602
|
value: (function () {
|
|
37534
37603
|
var _correctPartlistArticlesByGlobalRules = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee18(set, partlistArticlesToLoad, bundleRules, doChangeRetailArticleNumbers) {
|
|
37535
|
-
var article, ownPositions, bundledCodices, _loop4, _i8, _arr,
|
|
37604
|
+
var article, ownPositions, bundledCodices, _iterator8, _step8, position, source, toCompare, _loop4, _i8, _arr, _iterator9, _step9, _step9$value, _source, positions;
|
|
37536
37605
|
return _regeneratorRuntime__default["default"].wrap(function _callee18$(_context20) {
|
|
37537
37606
|
while (1) switch (_context20.prev = _context20.next) {
|
|
37538
37607
|
case 0:
|
|
@@ -37541,26 +37610,78 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
37541
37610
|
}); //a shelf accessoire that can be planned for free keeps the positions no rule names: its noPrice has to waive the parts
|
|
37542
37611
|
//it brings along, and pooled onto the first article they would be charged there. Everything else is pooled.
|
|
37543
37612
|
ownPositions = new Map();
|
|
37544
|
-
if (bundleRules) {
|
|
37545
|
-
|
|
37546
|
-
|
|
37547
|
-
|
|
37548
|
-
|
|
37549
|
-
|
|
37550
|
-
|
|
37551
|
-
|
|
37552
|
-
var _source$accessoirePar, _ownPositions$get;
|
|
37553
|
-
var source = position.SourceBasketID ? set.getArticleByBasketId(position.SourceBasketID) : undefined;
|
|
37554
|
-
if (!source || source.deleted || source === article || bundledCodices.has(position.ArticleCodex)) return true;
|
|
37555
|
-
if (!((_source$accessoirePar = source.accessoireParentArticle) !== null && _source$accessoirePar !== void 0 && (_source$accessoirePar = _source$accessoirePar.shelfPlanner) !== null && _source$accessoirePar !== void 0 && _source$accessoirePar.canBeFree(source.articleCodex))) return true;
|
|
37556
|
-
ownPositions.set(source, [].concat(_toConsumableArray__default["default"]((_ownPositions$get = ownPositions.get(source)) !== null && _ownPositions$get !== void 0 ? _ownPositions$get : []), [position]));
|
|
37557
|
-
return false;
|
|
37613
|
+
if (!bundleRules) {
|
|
37614
|
+
_context20.next = 29;
|
|
37615
|
+
break;
|
|
37616
|
+
}
|
|
37617
|
+
bundledCodices = new Set(bundleRules.flatMap(function (rule) {
|
|
37618
|
+
var _rule$result;
|
|
37619
|
+
return [].concat(_toConsumableArray__default["default"](rule.toBundle), _toConsumableArray__default["default"]((_rule$result = rule.result) !== null && _rule$result !== void 0 ? _rule$result : [])).map(function (entry) {
|
|
37620
|
+
return entry.articleCodex;
|
|
37558
37621
|
});
|
|
37559
|
-
|
|
37622
|
+
})); //pooled positions load onto the first article without their own article's values (loaded on their own they get them
|
|
37623
|
+
//as the parent's values): each takes them along, so a position of the second article is not resolved with the first's
|
|
37624
|
+
_iterator8 = _createForOfIteratorHelper$n(partlistArticlesToLoad);
|
|
37625
|
+
_context20.prev = 5;
|
|
37626
|
+
_iterator8.s();
|
|
37627
|
+
case 7:
|
|
37628
|
+
if ((_step8 = _iterator8.n()).done) {
|
|
37629
|
+
_context20.next = 15;
|
|
37630
|
+
break;
|
|
37560
37631
|
}
|
|
37561
|
-
|
|
37632
|
+
position = _step8.value;
|
|
37633
|
+
source = position.SourceBasketID ? set.getArticleByBasketId(position.SourceBasketID) : undefined;
|
|
37634
|
+
if (!(!source || source.deleted)) {
|
|
37635
|
+
_context20.next = 12;
|
|
37636
|
+
break;
|
|
37637
|
+
}
|
|
37638
|
+
return _context20.abrupt("continue", 13);
|
|
37639
|
+
case 12:
|
|
37640
|
+
position.VariantValues = position.ConfigurationMode ? _objectSpread$o(_objectSpread$o({}, source.VariantValues), position.VariantValues) : _objectSpread$o(_objectSpread$o({}, position.VariantValues), source.VariantValues);
|
|
37641
|
+
case 13:
|
|
37642
|
+
_context20.next = 7;
|
|
37643
|
+
break;
|
|
37644
|
+
case 15:
|
|
37645
|
+
_context20.next = 20;
|
|
37646
|
+
break;
|
|
37647
|
+
case 17:
|
|
37648
|
+
_context20.prev = 17;
|
|
37649
|
+
_context20.t0 = _context20["catch"](5);
|
|
37650
|
+
_iterator8.e(_context20.t0);
|
|
37651
|
+
case 20:
|
|
37652
|
+
_context20.prev = 20;
|
|
37653
|
+
_iterator8.f();
|
|
37654
|
+
return _context20.finish(20);
|
|
37655
|
+
case 23:
|
|
37656
|
+
partlistArticlesToLoad = partlistArticlesToLoad.filter(function (position) {
|
|
37657
|
+
var _source$accessoirePar, _ownPositions$get;
|
|
37658
|
+
var source = position.SourceBasketID ? set.getArticleByBasketId(position.SourceBasketID) : undefined;
|
|
37659
|
+
if (!source || source.deleted || source === article || bundledCodices.has(position.ArticleCodex)) return true;
|
|
37660
|
+
if (!((_source$accessoirePar = source.accessoireParentArticle) !== null && _source$accessoirePar !== void 0 && (_source$accessoirePar = _source$accessoirePar.shelfPlanner) !== null && _source$accessoirePar !== void 0 && _source$accessoirePar.canBeFree(source.articleCodex))) return true;
|
|
37661
|
+
ownPositions.set(source, [].concat(_toConsumableArray__default["default"]((_ownPositions$get = ownPositions.get(source)) !== null && _ownPositions$get !== void 0 ? _ownPositions$get : []), [position]));
|
|
37662
|
+
return false;
|
|
37663
|
+
});
|
|
37664
|
+
//the positions merge by the values of their own features, which a catalog loads with the article on demand: load
|
|
37665
|
+
//them before they are compared (they are loaded right after anyway)
|
|
37666
|
+
toCompare = partlistArticlesToLoad.filter(function (position) {
|
|
37667
|
+
return !bundledCodices.has(position.ArticleCodex);
|
|
37668
|
+
});
|
|
37669
|
+
if (!toCompare.length) {
|
|
37670
|
+
_context20.next = 28;
|
|
37671
|
+
break;
|
|
37672
|
+
}
|
|
37673
|
+
_context20.next = 28;
|
|
37674
|
+
return this.preLoadArticles(set, toCompare.map(function (position) {
|
|
37675
|
+
return {
|
|
37676
|
+
articleCodex: position.ArticleCodex,
|
|
37677
|
+
catalogCodex: position.CatalogCodex
|
|
37678
|
+
};
|
|
37679
|
+
}));
|
|
37680
|
+
case 28:
|
|
37681
|
+
partlistArticlesToLoad = this.bundlePartlistArticles(partlistArticlesToLoad, bundleRules, set.getDivaArticles());
|
|
37682
|
+
case 29:
|
|
37562
37683
|
if (!(doChangeRetailArticleNumbers !== null && doChangeRetailArticleNumbers !== void 0 && doChangeRetailArticleNumbers.doChange && doChangeRetailArticleNumbers.retailArticleRules)) {
|
|
37563
|
-
_context20.next =
|
|
37684
|
+
_context20.next = 37;
|
|
37564
37685
|
break;
|
|
37565
37686
|
}
|
|
37566
37687
|
_loop4 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop4() {
|
|
@@ -37584,50 +37705,50 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
37584
37705
|
}, _loop4);
|
|
37585
37706
|
});
|
|
37586
37707
|
_i8 = 0, _arr = [].concat(_toConsumableArray__default["default"](partlistArticlesToLoad), _toConsumableArray__default["default"](_toConsumableArray__default["default"](ownPositions.values()).flat()));
|
|
37587
|
-
case
|
|
37708
|
+
case 32:
|
|
37588
37709
|
if (!(_i8 < _arr.length)) {
|
|
37589
|
-
_context20.next =
|
|
37710
|
+
_context20.next = 37;
|
|
37590
37711
|
break;
|
|
37591
37712
|
}
|
|
37592
|
-
return _context20.delegateYield(_loop4(), "
|
|
37593
|
-
case
|
|
37713
|
+
return _context20.delegateYield(_loop4(), "t1", 34);
|
|
37714
|
+
case 34:
|
|
37594
37715
|
_i8++;
|
|
37595
|
-
_context20.next =
|
|
37716
|
+
_context20.next = 32;
|
|
37596
37717
|
break;
|
|
37597
|
-
case
|
|
37598
|
-
_context20.next =
|
|
37718
|
+
case 37:
|
|
37719
|
+
_context20.next = 39;
|
|
37599
37720
|
return this.loadPartlistArticles(partlistArticlesToLoad, article, {});
|
|
37600
|
-
case
|
|
37601
|
-
|
|
37602
|
-
_context20.prev =
|
|
37603
|
-
|
|
37604
|
-
case
|
|
37605
|
-
if ((
|
|
37606
|
-
_context20.next =
|
|
37721
|
+
case 39:
|
|
37722
|
+
_iterator9 = _createForOfIteratorHelper$n(ownPositions);
|
|
37723
|
+
_context20.prev = 40;
|
|
37724
|
+
_iterator9.s();
|
|
37725
|
+
case 42:
|
|
37726
|
+
if ((_step9 = _iterator9.n()).done) {
|
|
37727
|
+
_context20.next = 48;
|
|
37607
37728
|
break;
|
|
37608
37729
|
}
|
|
37609
|
-
|
|
37610
|
-
_context20.next =
|
|
37611
|
-
return this.loadPartlistArticles(positions,
|
|
37612
|
-
case
|
|
37613
|
-
_context20.next =
|
|
37730
|
+
_step9$value = _slicedToArray__default["default"](_step9.value, 2), _source = _step9$value[0], positions = _step9$value[1];
|
|
37731
|
+
_context20.next = 46;
|
|
37732
|
+
return this.loadPartlistArticles(positions, _source, {});
|
|
37733
|
+
case 46:
|
|
37734
|
+
_context20.next = 42;
|
|
37614
37735
|
break;
|
|
37615
|
-
case
|
|
37616
|
-
_context20.next =
|
|
37736
|
+
case 48:
|
|
37737
|
+
_context20.next = 53;
|
|
37617
37738
|
break;
|
|
37618
|
-
case
|
|
37619
|
-
_context20.prev =
|
|
37620
|
-
_context20.
|
|
37621
|
-
|
|
37622
|
-
case
|
|
37623
|
-
_context20.prev =
|
|
37624
|
-
|
|
37625
|
-
return _context20.finish(
|
|
37626
|
-
case
|
|
37739
|
+
case 50:
|
|
37740
|
+
_context20.prev = 50;
|
|
37741
|
+
_context20.t2 = _context20["catch"](40);
|
|
37742
|
+
_iterator9.e(_context20.t2);
|
|
37743
|
+
case 53:
|
|
37744
|
+
_context20.prev = 53;
|
|
37745
|
+
_iterator9.f();
|
|
37746
|
+
return _context20.finish(53);
|
|
37747
|
+
case 56:
|
|
37627
37748
|
case "end":
|
|
37628
37749
|
return _context20.stop();
|
|
37629
37750
|
}
|
|
37630
|
-
}, _callee18, this, [[
|
|
37751
|
+
}, _callee18, this, [[5, 17, 20, 23], [40, 50, 53, 56]]);
|
|
37631
37752
|
}));
|
|
37632
37753
|
function correctPartlistArticlesByGlobalRules(_x53, _x54, _x55, _x56) {
|
|
37633
37754
|
return _correctPartlistArticlesByGlobalRules.apply(this, arguments);
|
|
@@ -37637,10 +37758,36 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
37637
37758
|
}, {
|
|
37638
37759
|
key: "bundlePartlistArticles",
|
|
37639
37760
|
value: function bundlePartlistArticles(partlistArticlesToLoad, bundleRules, articles) {
|
|
37761
|
+
var _Object$values$0$set$, _Object$values$;
|
|
37640
37762
|
var partlistArticlesToLoadGrouped = [];
|
|
37763
|
+
// A position resolves its numbers and sub-positions from the values of its own features, so only positions equal in
|
|
37764
|
+
// those merge - a layout of a 3-raster box is not the one of a 1-raster box. The features come from the loaded
|
|
37765
|
+
// catalog articles (the global rules load them first; one not loaded yet merges by number); what a rule bundles
|
|
37766
|
+
// pools by number, so the rule counts it across the articles.
|
|
37767
|
+
var bundledCodices = new Set(bundleRules.flatMap(function (rule) {
|
|
37768
|
+
var _rule$result2;
|
|
37769
|
+
return [].concat(_toConsumableArray__default["default"](rule.toBundle), _toConsumableArray__default["default"]((_rule$result2 = rule.result) !== null && _rule$result2 !== void 0 ? _rule$result2 : [])).map(function (entry) {
|
|
37770
|
+
return entry.articleCodex;
|
|
37771
|
+
});
|
|
37772
|
+
}));
|
|
37773
|
+
var catalogs = Object.values((_Object$values$0$set$ = (_Object$values$ = Object.values(articles)[0]) === null || _Object$values$ === void 0 || (_Object$values$ = _Object$values$.set) === null || _Object$values$ === void 0 || (_Object$values$ = _Object$values$.getSetState) === null || _Object$values$ === void 0 ? void 0 : _Object$values$.divaCatalogs) !== null && _Object$values$0$set$ !== void 0 ? _Object$values$0$set$ : {});
|
|
37774
|
+
var ownFeatures = function ownFeatures(position) {
|
|
37775
|
+
var _catalog$getCatalogAr, _catalog$getCatalogAr2;
|
|
37776
|
+
var catalog = catalogs.find(function (catalogData) {
|
|
37777
|
+
return String(catalogData.catalogCodex) === String(position.CatalogCodex);
|
|
37778
|
+
});
|
|
37779
|
+
return Object.keys((_catalog$getCatalogAr = catalog === null || catalog === void 0 || (_catalog$getCatalogAr2 = catalog.getCatalogArticle(position.ArticleCodex)) === null || _catalog$getCatalogAr2 === void 0 ? void 0 : _catalog$getCatalogAr2.articleOptions) !== null && _catalog$getCatalogAr !== void 0 ? _catalog$getCatalogAr : {});
|
|
37780
|
+
};
|
|
37781
|
+
var sameConfiguration = function sameConfiguration(a, b) {
|
|
37782
|
+
if (bundledCodices.has(a.ArticleCodex)) return true;
|
|
37783
|
+
return ownFeatures(a).every(function (feature) {
|
|
37784
|
+
var _a$VariantValues, _b$VariantValues;
|
|
37785
|
+
return ((_a$VariantValues = a.VariantValues) === null || _a$VariantValues === void 0 ? void 0 : _a$VariantValues[feature]) === ((_b$VariantValues = b.VariantValues) === null || _b$VariantValues === void 0 ? void 0 : _b$VariantValues[feature]);
|
|
37786
|
+
});
|
|
37787
|
+
};
|
|
37641
37788
|
var _loop5 = function _loop5(i) {
|
|
37642
37789
|
var index = partlistArticlesToLoadGrouped.findIndex(function (item, j) {
|
|
37643
|
-
if (item.CatalogCodex == partlistArticlesToLoad[i].CatalogCodex && item.ArticleCodex == partlistArticlesToLoad[i].ArticleCodex && item.RetailArticleNr == partlistArticlesToLoad[i].RetailArticleNr && item.RetailPrefix == partlistArticlesToLoad[i].RetailPrefix) {
|
|
37790
|
+
if (item.CatalogCodex == partlistArticlesToLoad[i].CatalogCodex && item.ArticleCodex == partlistArticlesToLoad[i].ArticleCodex && item.RetailArticleNr == partlistArticlesToLoad[i].RetailArticleNr && item.RetailPrefix == partlistArticlesToLoad[i].RetailPrefix && sameConfiguration(item, partlistArticlesToLoad[i])) {
|
|
37644
37791
|
return true;
|
|
37645
37792
|
}
|
|
37646
37793
|
return false;
|
|
@@ -37679,10 +37826,14 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
37679
37826
|
var _bundleRule$result;
|
|
37680
37827
|
bundleUsedCounter++;
|
|
37681
37828
|
var _toBundleList = bundleRule.toBundle;
|
|
37829
|
+
// the catalog of the bundled positions: where a result no partlist names and no loaded article knows comes from
|
|
37830
|
+
var bundledCatalogCodex = void 0;
|
|
37682
37831
|
for (var _j = 0; _j < _toBundleList.length; _j++) {
|
|
37683
37832
|
var _toBundle = _toBundleList[_j];
|
|
37684
37833
|
for (var _m = 0; _m < partlistArticlesToLoadGrouped.length; _m++) {
|
|
37685
37834
|
if (_toBundle.articleCodex == partlistArticlesToLoadGrouped[_m].ArticleCodex && _toBundle.quantity <= partlistArticlesToLoadGrouped[_m].Quantity) {
|
|
37835
|
+
var _bundledCatalogCodex;
|
|
37836
|
+
(_bundledCatalogCodex = bundledCatalogCodex) !== null && _bundledCatalogCodex !== void 0 ? _bundledCatalogCodex : bundledCatalogCodex = partlistArticlesToLoadGrouped[_m].CatalogCodex;
|
|
37686
37837
|
partlistArticlesToLoadGrouped[_m].Quantity -= _toBundle.quantity;
|
|
37687
37838
|
if (partlistArticlesToLoadGrouped[_m].Quantity == 0) {
|
|
37688
37839
|
partlistArticlesToLoadGrouped.splice(_m, 1);
|
|
@@ -37704,7 +37855,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
37704
37855
|
}
|
|
37705
37856
|
}
|
|
37706
37857
|
if (!resutlAlreadyExists) {
|
|
37707
|
-
partlistArticlesToLoadGrouped.push(this.createNewPartlistArticleByArticleCodex(result.articleCodex, result.quantity, articles));
|
|
37858
|
+
partlistArticlesToLoadGrouped.push(this.createNewPartlistArticleByArticleCodex(result.articleCodex, result.quantity, articles, bundledCatalogCodex));
|
|
37708
37859
|
}
|
|
37709
37860
|
}
|
|
37710
37861
|
}
|
|
@@ -37714,7 +37865,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
37714
37865
|
}
|
|
37715
37866
|
}, {
|
|
37716
37867
|
key: "createNewPartlistArticleByArticleCodex",
|
|
37717
|
-
value: function createNewPartlistArticleByArticleCodex(articleCodex, quantity, articles) {
|
|
37868
|
+
value: function createNewPartlistArticleByArticleCodex(articleCodex, quantity, articles, bundledCatalogCodex) {
|
|
37718
37869
|
var alreadyCheckedArticles = [];
|
|
37719
37870
|
var catalogData = undefined;
|
|
37720
37871
|
for (var iKey in articles) {
|
|
@@ -37742,6 +37893,18 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
37742
37893
|
};
|
|
37743
37894
|
}
|
|
37744
37895
|
}
|
|
37896
|
+
|
|
37897
|
+
// A catalog loads its articles on demand, so the result may be one nobody has asked for yet: it comes from the
|
|
37898
|
+
// catalog of the positions it replaces and is fetched when the partlist loads, with its own numbers.
|
|
37899
|
+
if (bundledCatalogCodex) {
|
|
37900
|
+
return {
|
|
37901
|
+
CatalogCodex: bundledCatalogCodex,
|
|
37902
|
+
ArticleCodex: articleCodex,
|
|
37903
|
+
RetailArticleNr: '',
|
|
37904
|
+
Quantity: quantity,
|
|
37905
|
+
VariantValues: {}
|
|
37906
|
+
};
|
|
37907
|
+
}
|
|
37745
37908
|
throw new Error('Bundle Creation Failed. not Result with the Codex: ' + articleCodex + ' found');
|
|
37746
37909
|
}
|
|
37747
37910
|
}]);
|
|
@@ -38412,10 +38575,10 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
38412
38575
|
}
|
|
38413
38576
|
}, {
|
|
38414
38577
|
key: "getVisibility",
|
|
38415
|
-
value: function getVisibility(configStepKey, visible,
|
|
38578
|
+
value: function getVisibility(configStepKey, visible, set) {
|
|
38416
38579
|
var allSteps = this.getAllByKey(configStepKey);
|
|
38417
38580
|
if (allSteps) {
|
|
38418
|
-
var option =
|
|
38581
|
+
var option = set.getCatalogOption(allSteps.optionStep.codex, allSteps.configStep.targetArticles[0]);
|
|
38419
38582
|
if (allSteps.configStep.singleOPVOnly && option !== null && option !== void 0 && option.hideOptionInConfigurator) {
|
|
38420
38583
|
return false;
|
|
38421
38584
|
}
|
|
@@ -38505,7 +38668,7 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
38505
38668
|
lKey = _step20$value[0],
|
|
38506
38669
|
myOption = _step20$value[1];
|
|
38507
38670
|
if (myOption.idmVariantType) {
|
|
38508
|
-
var
|
|
38671
|
+
var _myOption$configSteps, _set$getCatalogOption;
|
|
38509
38672
|
var opgPairs = [[2, 3], [4, 5], [6, 7], [11, 12]];
|
|
38510
38673
|
for (var i = 0; i < opgPairs.length; i++) {
|
|
38511
38674
|
var optionStep = this.getOptionWhereIDMVariantIs(iKey, opgPairs[i][1]);
|
|
@@ -38514,7 +38677,8 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
38514
38677
|
optionStep.mergesToOPG = true;
|
|
38515
38678
|
}
|
|
38516
38679
|
}
|
|
38517
|
-
var
|
|
38680
|
+
var ownerBasketId = (_myOption$configSteps = myOption.configSteps.values().next().value) === null || _myOption$configSteps === void 0 || (_myOption$configSteps = _myOption$configSteps.targetArticles) === null || _myOption$configSteps === void 0 ? void 0 : _myOption$configSteps[0];
|
|
38681
|
+
var toMergeWithOption = (_set$getCatalogOption = set.getCatalogOption(lKey, ownerBasketId)) === null || _set$getCatalogOption === void 0 ? void 0 : _set$getCatalogOption.mergeIDMToOPG;
|
|
38518
38682
|
var mergeWithOption = (!catalog.isIDMFormat ? 'OPT' : '') + toMergeWithOption;
|
|
38519
38683
|
if (toMergeWithOption && myTabGroup.options.has(mergeWithOption)) {
|
|
38520
38684
|
var _iterator21 = _createForOfIteratorHelper$m(myTabGroup.options),
|
|
@@ -39091,7 +39255,7 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
39091
39255
|
var lookupBasketId = article.partlistArticleVisibleInTree ? (_article$partListPare = (_article$partListPare2 = article.partListParentArticle) === null || _article$partListPare2 === void 0 ? void 0 : _article$partListPare2.basketId) !== null && _article$partListPare !== void 0 ? _article$partListPare : article.basketId : article.basketId;
|
|
39092
39256
|
var configStep = (_set$configTree$getCo = set.configTree.getConfigStepBasketIdAndOptionCodex(lookupBasketId, ops.optionCodex)) !== null && _set$configTree$getCo !== void 0 ? _set$configTree$getCo : (_set$hiddenConfigTree = set.hiddenConfigTree) === null || _set$hiddenConfigTree === void 0 ? void 0 : _set$hiddenConfigTree.getConfigStepBasketIdAndOptionCodex(lookupBasketId, ops.optionCodex);
|
|
39093
39257
|
var itemsInTabGroup = summaryTabItems[tabGroupCodex].summaryItems;
|
|
39094
|
-
var itemImage = ops.val.image ?
|
|
39258
|
+
var itemImage = ops.val.image ? article.CatalogData.getCatImageURL(ops.val.image, '') : undefined;
|
|
39095
39259
|
var opsName = article.getMergedOPGNames(ops).name;
|
|
39096
39260
|
if (configStep && itemsInTabGroup) {
|
|
39097
39261
|
var _ops$val2, _this$getAdditionalPr;
|
|
@@ -39707,7 +39871,7 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
39707
39871
|
key: "getVariantsSummary",
|
|
39708
39872
|
value: function () {
|
|
39709
39873
|
var _getVariantsSummary = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(doConfigure, set) {
|
|
39710
|
-
var summaryVariants, _yield$DivaFavorites$, variants, disabled, singleOptions,
|
|
39874
|
+
var summaryVariants, _yield$DivaFavorites$, variants, disabled, singleOptions, _loop2, i;
|
|
39711
39875
|
return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context5) {
|
|
39712
39876
|
while (1) switch (_context5.prev = _context5.next) {
|
|
39713
39877
|
case 0:
|
|
@@ -39719,7 +39883,6 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
39719
39883
|
variants = _yield$DivaFavorites$.variants;
|
|
39720
39884
|
disabled = _yield$DivaFavorites$.disabled;
|
|
39721
39885
|
singleOptions = _yield$DivaFavorites$.singleOptions;
|
|
39722
|
-
catalogData = set.CatalogData; //index that does not count upo for diabled variants
|
|
39723
39886
|
_loop2 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop2(i) {
|
|
39724
39887
|
var _variant$price, _variant$title;
|
|
39725
39888
|
var variant, result, basketID, variantVals, _loop3, opt, isDisabled;
|
|
@@ -39737,7 +39900,7 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
39737
39900
|
basketID = _context4.t1.value;
|
|
39738
39901
|
variantVals = variant.targetArticles[basketID];
|
|
39739
39902
|
_loop3 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop3(opt) {
|
|
39740
|
-
var _variant$configVarian, _optObject$name, _opvObject$name, optObject, opvObject;
|
|
39903
|
+
var _variant$configVarian, _optObject$name, _opvObject$name, optObject, opvCatalog, opvObject;
|
|
39741
39904
|
return _regeneratorRuntime__default["default"].wrap(function _loop3$(_context2) {
|
|
39742
39905
|
while (1) switch (_context2.prev = _context2.next) {
|
|
39743
39906
|
case 0:
|
|
@@ -39745,14 +39908,15 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
39745
39908
|
return item.opt === opt;
|
|
39746
39909
|
}) && !singleOptions.includes(opt)) {
|
|
39747
39910
|
if (((_variant$configVarian = variant.configVariantValues) === null || _variant$configVarian === void 0 || (_variant$configVarian = _variant$configVarian[basketID]) === null || _variant$configVarian === void 0 ? void 0 : _variant$configVarian[opt.substring(3)]) === variantVals[opt].substring(3)) {
|
|
39748
|
-
optObject =
|
|
39749
|
-
|
|
39911
|
+
optObject = set.getCatalogOption(opt, basketID);
|
|
39912
|
+
opvCatalog = set.getOptionValueCatalog(variantVals[opt], basketID);
|
|
39913
|
+
opvObject = opvCatalog === null || opvCatalog === void 0 ? void 0 : opvCatalog.getOptionValue(variantVals[opt]);
|
|
39750
39914
|
result.push({
|
|
39751
39915
|
opt: opt,
|
|
39752
39916
|
opv: variantVals[opt],
|
|
39753
39917
|
optionName: (_optObject$name = optObject === null || optObject === void 0 ? void 0 : optObject.name) !== null && _optObject$name !== void 0 ? _optObject$name : '',
|
|
39754
39918
|
optionValueName: (_opvObject$name = opvObject === null || opvObject === void 0 ? void 0 : opvObject.name) !== null && _opvObject$name !== void 0 ? _opvObject$name : '',
|
|
39755
|
-
optionValueImage: opvObject !== null && opvObject !== void 0 && opvObject.image ?
|
|
39919
|
+
optionValueImage: opvObject !== null && opvObject !== void 0 && opvObject.image ? opvCatalog === null || opvCatalog === void 0 ? void 0 : opvCatalog.getCatImageURL(opvObject.image, '_gal') : undefined
|
|
39756
39920
|
});
|
|
39757
39921
|
} else {
|
|
39758
39922
|
result.push({
|
|
@@ -39836,17 +40000,17 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
39836
40000
|
}, _loop2);
|
|
39837
40001
|
});
|
|
39838
40002
|
i = 0;
|
|
39839
|
-
case
|
|
40003
|
+
case 9:
|
|
39840
40004
|
if (!(i < variants.length)) {
|
|
39841
|
-
_context5.next =
|
|
40005
|
+
_context5.next = 14;
|
|
39842
40006
|
break;
|
|
39843
40007
|
}
|
|
39844
|
-
return _context5.delegateYield(_loop2(i), "t0",
|
|
39845
|
-
case
|
|
40008
|
+
return _context5.delegateYield(_loop2(i), "t0", 11);
|
|
40009
|
+
case 11:
|
|
39846
40010
|
i++;
|
|
39847
|
-
_context5.next =
|
|
40011
|
+
_context5.next = 9;
|
|
39848
40012
|
break;
|
|
39849
|
-
case
|
|
40013
|
+
case 14:
|
|
39850
40014
|
return _context5.abrupt("return", {
|
|
39851
40015
|
items: summaryVariants,
|
|
39852
40016
|
name: '',
|
|
@@ -39854,7 +40018,7 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
39854
40018
|
quantity: 1,
|
|
39855
40019
|
type: 'VARIANTS'
|
|
39856
40020
|
});
|
|
39857
|
-
case
|
|
40021
|
+
case 15:
|
|
39858
40022
|
case "end":
|
|
39859
40023
|
return _context5.stop();
|
|
39860
40024
|
}
|
|
@@ -40214,7 +40378,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
40214
40378
|
value: function changeOnFavorites(set, opt, opvs, targetArticles, remove, openModal) {
|
|
40215
40379
|
var favorit = undefined;
|
|
40216
40380
|
for (var i = 0; i < opvs.length; i++) {
|
|
40217
|
-
var _set$
|
|
40381
|
+
var _set$getCatalogOption;
|
|
40218
40382
|
if (!remove) {
|
|
40219
40383
|
var _set$favorites2;
|
|
40220
40384
|
favorit = (_set$favorites2 = set.favorites) === null || _set$favorites2 === void 0 || (_set$favorites2 = _set$favorites2.VariantValues[opt]) === null || _set$favorites2 === void 0 ? void 0 : _set$favorites2[opvs[i]];
|
|
@@ -40222,8 +40386,8 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
40222
40386
|
favorit.targetArticles = _toConsumableArray__default["default"](new Set(favorit.targetArticles.concat(targetArticles)));
|
|
40223
40387
|
}
|
|
40224
40388
|
}
|
|
40225
|
-
var optionName = (_set$
|
|
40226
|
-
var optionValue = set.
|
|
40389
|
+
var optionName = (_set$getCatalogOption = set.getCatalogOption(opt, targetArticles[0])) === null || _set$getCatalogOption === void 0 ? void 0 : _set$getCatalogOption.name;
|
|
40390
|
+
var optionValue = set.getCatalogOptionValue(opvs[i], targetArticles[0]);
|
|
40227
40391
|
var optionValueName = optionValue === null || optionValue === void 0 ? void 0 : optionValue.name;
|
|
40228
40392
|
var optionValueImage = optionValue === null || optionValue === void 0 ? void 0 : optionValue.image;
|
|
40229
40393
|
favorit = new basketModel.Favorite(opt, opvs[i], targetArticles, optionName, optionValueName, optionValueImage);
|
|
@@ -40886,180 +41050,6 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
40886
41050
|
} finally {
|
|
40887
41051
|
_iterator2.f();
|
|
40888
41052
|
}
|
|
40889
|
-
this.checkForMergableSelectionModes(set.configTree, set.getDivaArticles());
|
|
40890
|
-
}
|
|
40891
|
-
}, {
|
|
40892
|
-
key: "checkForMergableSelectionModes",
|
|
40893
|
-
value: function checkForMergableSelectionModes(configTree, articles) {
|
|
40894
|
-
if (Object.values(articles).find(function (article) {
|
|
40895
|
-
return article.shelfPlanner;
|
|
40896
|
-
})) return;
|
|
40897
|
-
if (Object.values(articles).find(function (article) {
|
|
40898
|
-
return article.set.CatalogData.useBoxPlanner;
|
|
40899
|
-
})) return;
|
|
40900
|
-
var _iterator3 = _createForOfIteratorHelper$k(configTree.tabGroups),
|
|
40901
|
-
_step3;
|
|
40902
|
-
try {
|
|
40903
|
-
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
40904
|
-
var _step3$value = _slicedToArray__default["default"](_step3.value, 2),
|
|
40905
|
-
tabGroupCodex = _step3$value[0],
|
|
40906
|
-
tabGroup = _step3$value[1];
|
|
40907
|
-
if (tabGroup.type == 'OPTION') {
|
|
40908
|
-
var hasSelectionMode1 = [];
|
|
40909
|
-
var hasSelectionMode2 = [];
|
|
40910
|
-
var hasSelectionMode3 = [];
|
|
40911
|
-
var basketIds = [];
|
|
40912
|
-
var breakTabgroup = false;
|
|
40913
|
-
var _iterator4 = _createForOfIteratorHelper$k(tabGroup.options),
|
|
40914
|
-
_step4;
|
|
40915
|
-
try {
|
|
40916
|
-
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
40917
|
-
var _step4$value = _slicedToArray__default["default"](_step4.value, 2),
|
|
40918
|
-
_optionCodex2 = _step4$value[0],
|
|
40919
|
-
_option2 = _step4$value[1];
|
|
40920
|
-
var configSteps = Array.from(_option2.configSteps.values());
|
|
40921
|
-
if (configSteps.find(function (configStep) {
|
|
40922
|
-
return configStep.notDisplayedInMainConfigTree;
|
|
40923
|
-
})) breakTabgroup = true;
|
|
40924
|
-
switch (_option2.selectionmode) {
|
|
40925
|
-
case 1:
|
|
40926
|
-
hasSelectionMode1.push(_optionCodex2);
|
|
40927
|
-
break;
|
|
40928
|
-
case 2:
|
|
40929
|
-
hasSelectionMode2.push(_optionCodex2);
|
|
40930
|
-
break;
|
|
40931
|
-
case 3:
|
|
40932
|
-
hasSelectionMode3.push(_optionCodex2);
|
|
40933
|
-
break;
|
|
40934
|
-
}
|
|
40935
|
-
var _iterator10 = _createForOfIteratorHelper$k(_option2.configSteps),
|
|
40936
|
-
_step10;
|
|
40937
|
-
try {
|
|
40938
|
-
for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
|
|
40939
|
-
var _step10$value = _slicedToArray__default["default"](_step10.value, 2),
|
|
40940
|
-
x = _step10$value[0],
|
|
40941
|
-
_configStep2 = _step10$value[1];
|
|
40942
|
-
var _iterator11 = _createForOfIteratorHelper$k(_configStep2.targetArticles),
|
|
40943
|
-
_step11;
|
|
40944
|
-
try {
|
|
40945
|
-
for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
|
|
40946
|
-
var basketId = _step11.value;
|
|
40947
|
-
if (!basketIds.includes(basketId)) basketIds.push(basketId);
|
|
40948
|
-
}
|
|
40949
|
-
} catch (err) {
|
|
40950
|
-
_iterator11.e(err);
|
|
40951
|
-
} finally {
|
|
40952
|
-
_iterator11.f();
|
|
40953
|
-
}
|
|
40954
|
-
}
|
|
40955
|
-
} catch (err) {
|
|
40956
|
-
_iterator10.e(err);
|
|
40957
|
-
} finally {
|
|
40958
|
-
_iterator10.f();
|
|
40959
|
-
}
|
|
40960
|
-
}
|
|
40961
|
-
} catch (err) {
|
|
40962
|
-
_iterator4.e(err);
|
|
40963
|
-
} finally {
|
|
40964
|
-
_iterator4.f();
|
|
40965
|
-
}
|
|
40966
|
-
if (breakTabgroup) continue;
|
|
40967
|
-
if (hasSelectionMode2.length > 0 && hasSelectionMode3.length > 0 && hasSelectionMode1.length == 0) {
|
|
40968
|
-
//make the selectionmode 2 options -> selectionmode 3
|
|
40969
|
-
var _iterator5 = _createForOfIteratorHelper$k(hasSelectionMode2),
|
|
40970
|
-
_step5;
|
|
40971
|
-
try {
|
|
40972
|
-
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
40973
|
-
var optionCodex = _step5.value;
|
|
40974
|
-
var option = tabGroup.options.get(optionCodex);
|
|
40975
|
-
option.selectionmode = 3;
|
|
40976
|
-
var newConfigSteps = new Map();
|
|
40977
|
-
var _iterator6 = _createForOfIteratorHelper$k(option.configSteps),
|
|
40978
|
-
_step6;
|
|
40979
|
-
try {
|
|
40980
|
-
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
40981
|
-
var _step6$value = _slicedToArray__default["default"](_step6.value, 2),
|
|
40982
|
-
configStepCodex = _step6$value[0],
|
|
40983
|
-
configStep = _step6$value[1];
|
|
40984
|
-
if (configStep.keyType == 'ALL') {
|
|
40985
|
-
var targetArticles = _toConsumableArray__default["default"](configStep.targetArticles);
|
|
40986
|
-
var _iterator7 = _createForOfIteratorHelper$k(targetArticles),
|
|
40987
|
-
_step7;
|
|
40988
|
-
try {
|
|
40989
|
-
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
|
40990
|
-
var targetArticle = _step7.value;
|
|
40991
|
-
var newConfigStepKey = configStepCodex.replace('_ALL', '') + '_' + targetArticle;
|
|
40992
|
-
newConfigSteps.set(newConfigStepKey, _objectSpread$l(_objectSpread$l({}, configStep), {}, {
|
|
40993
|
-
keyType: 'BasketId',
|
|
40994
|
-
key: newConfigStepKey,
|
|
40995
|
-
targetArticles: [targetArticle]
|
|
40996
|
-
}));
|
|
40997
|
-
}
|
|
40998
|
-
} catch (err) {
|
|
40999
|
-
_iterator7.e(err);
|
|
41000
|
-
} finally {
|
|
41001
|
-
_iterator7.f();
|
|
41002
|
-
}
|
|
41003
|
-
} else {
|
|
41004
|
-
newConfigSteps.set(configStepCodex, configStep);
|
|
41005
|
-
}
|
|
41006
|
-
}
|
|
41007
|
-
} catch (err) {
|
|
41008
|
-
_iterator6.e(err);
|
|
41009
|
-
} finally {
|
|
41010
|
-
_iterator6.f();
|
|
41011
|
-
}
|
|
41012
|
-
option.configSteps = newConfigSteps;
|
|
41013
|
-
}
|
|
41014
|
-
} catch (err) {
|
|
41015
|
-
_iterator5.e(err);
|
|
41016
|
-
} finally {
|
|
41017
|
-
_iterator5.f();
|
|
41018
|
-
}
|
|
41019
|
-
} else if (hasSelectionMode1.length > 0 && hasSelectionMode2.length > 0 && hasSelectionMode3.length == 0 || basketIds.length == 1) {
|
|
41020
|
-
//make the selectionmode 2 options -> selectionmode 1
|
|
41021
|
-
var stepsToConvertToSelectionmode1 = [].concat(hasSelectionMode2, hasSelectionMode3);
|
|
41022
|
-
var _iterator8 = _createForOfIteratorHelper$k(stepsToConvertToSelectionmode1),
|
|
41023
|
-
_step8;
|
|
41024
|
-
try {
|
|
41025
|
-
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
41026
|
-
var _optionCodex = _step8.value;
|
|
41027
|
-
var _option = tabGroup.options.get(_optionCodex);
|
|
41028
|
-
_option.selectionmode = 1;
|
|
41029
|
-
var _newConfigSteps = new Map();
|
|
41030
|
-
var _iterator9 = _createForOfIteratorHelper$k(_option.configSteps),
|
|
41031
|
-
_step9;
|
|
41032
|
-
try {
|
|
41033
|
-
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
41034
|
-
var _step9$value = _slicedToArray__default["default"](_step9.value, 2),
|
|
41035
|
-
_configStepCodex = _step9$value[0],
|
|
41036
|
-
_configStep = _step9$value[1];
|
|
41037
|
-
var _newConfigStepKey = _configStepCodex.replace('_ALL', '').replace('_' + _configStep.targetArticles[0], '') + '_' + 'ALL';
|
|
41038
|
-
_newConfigSteps.set(_newConfigStepKey, _objectSpread$l(_objectSpread$l({}, _configStep), {}, {
|
|
41039
|
-
keyType: 'ALL',
|
|
41040
|
-
key: _newConfigStepKey
|
|
41041
|
-
}));
|
|
41042
|
-
}
|
|
41043
|
-
} catch (err) {
|
|
41044
|
-
_iterator9.e(err);
|
|
41045
|
-
} finally {
|
|
41046
|
-
_iterator9.f();
|
|
41047
|
-
}
|
|
41048
|
-
_option.configSteps = _newConfigSteps;
|
|
41049
|
-
}
|
|
41050
|
-
} catch (err) {
|
|
41051
|
-
_iterator8.e(err);
|
|
41052
|
-
} finally {
|
|
41053
|
-
_iterator8.f();
|
|
41054
|
-
}
|
|
41055
|
-
}
|
|
41056
|
-
}
|
|
41057
|
-
}
|
|
41058
|
-
} catch (err) {
|
|
41059
|
-
_iterator3.e(err);
|
|
41060
|
-
} finally {
|
|
41061
|
-
_iterator3.f();
|
|
41062
|
-
}
|
|
41063
41053
|
}
|
|
41064
41054
|
}, {
|
|
41065
41055
|
key: "addOptionsStateToConfigTree",
|
|
@@ -41367,7 +41357,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
41367
41357
|
key: "getConifgItemsForView",
|
|
41368
41358
|
value: function () {
|
|
41369
41359
|
var _getConifgItemsForView = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(set, configStepKey) {
|
|
41370
|
-
var articles, step, retValues, optionCodex, configItems, selectedItems, optionState,
|
|
41360
|
+
var articles, step, retValues, optionCodex, configItems, selectedItems, optionState, _iterator3, _step3, _configItem$parent$oc, key, configItem, configItemsInOPG, retVal, _retVal, configStepOPG, configStepOPV, staticItems;
|
|
41371
41361
|
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
41372
41362
|
while (1) switch (_context.prev = _context.next) {
|
|
41373
41363
|
case 0:
|
|
@@ -41393,15 +41383,15 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
41393
41383
|
_context.next = 36;
|
|
41394
41384
|
break;
|
|
41395
41385
|
}
|
|
41396
|
-
|
|
41386
|
+
_iterator3 = _createForOfIteratorHelper$k(retValues.configItems.keys());
|
|
41397
41387
|
_context.prev = 13;
|
|
41398
|
-
|
|
41388
|
+
_iterator3.s();
|
|
41399
41389
|
case 15:
|
|
41400
|
-
if ((
|
|
41390
|
+
if ((_step3 = _iterator3.n()).done) {
|
|
41401
41391
|
_context.next = 26;
|
|
41402
41392
|
break;
|
|
41403
41393
|
}
|
|
41404
|
-
key =
|
|
41394
|
+
key = _step3.value;
|
|
41405
41395
|
configItem = retValues.configItems.get(key);
|
|
41406
41396
|
if (configItem) {
|
|
41407
41397
|
_context.next = 20;
|
|
@@ -41430,10 +41420,10 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
41430
41420
|
case 28:
|
|
41431
41421
|
_context.prev = 28;
|
|
41432
41422
|
_context.t0 = _context["catch"](13);
|
|
41433
|
-
|
|
41423
|
+
_iterator3.e(_context.t0);
|
|
41434
41424
|
case 31:
|
|
41435
41425
|
_context.prev = 31;
|
|
41436
|
-
|
|
41426
|
+
_iterator3.f();
|
|
41437
41427
|
return _context.finish(31);
|
|
41438
41428
|
case 34:
|
|
41439
41429
|
_context.next = 52;
|
|
@@ -41516,11 +41506,11 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
41516
41506
|
var owner = targetArticle.articleOptionStates.has(ops.optionCodex) ? targetArticle : (_targetArticle$partli = targetArticle.partlistArticlesAsArray.find(function (child) {
|
|
41517
41507
|
return child.articleOptionStates.get(ops.optionCodex) === ops;
|
|
41518
41508
|
})) !== null && _targetArticle$partli !== void 0 ? _targetArticle$partli : targetArticle;
|
|
41519
|
-
var
|
|
41520
|
-
|
|
41509
|
+
var _iterator4 = _createForOfIteratorHelper$k(owner.articleOptionStates.values()),
|
|
41510
|
+
_step4;
|
|
41521
41511
|
try {
|
|
41522
|
-
for (
|
|
41523
|
-
var state =
|
|
41512
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
41513
|
+
var state = _step4.value;
|
|
41524
41514
|
if (state.optionCodex === opg.optionCodex || state.optionCodex === ops.optionCodex || !state.isInvisible) continue;
|
|
41525
41515
|
var parentValues = state.option.articleOptionValues;
|
|
41526
41516
|
if (!(parentValues !== null && parentValues !== void 0 && parentValues.size)) continue;
|
|
@@ -41528,12 +41518,12 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
41528
41518
|
// a parent family: EVERY option value of the invisible feature is an option group over the value feature
|
|
41529
41519
|
var parentMembers = new Map();
|
|
41530
41520
|
var isFamily = true;
|
|
41531
|
-
var
|
|
41532
|
-
|
|
41521
|
+
var _iterator5 = _createForOfIteratorHelper$k(parentValues.keys()),
|
|
41522
|
+
_step5;
|
|
41533
41523
|
try {
|
|
41534
|
-
for (
|
|
41524
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
41535
41525
|
var _optionGroups$parentC;
|
|
41536
|
-
var parentCodex =
|
|
41526
|
+
var parentCodex = _step5.value;
|
|
41537
41527
|
var members = (_optionGroups$parentC = optionGroups[parentCodex]) === null || _optionGroups$parentC === void 0 ? void 0 : _optionGroups$parentC.map(optionGroupMemberKey);
|
|
41538
41528
|
if (!(members !== null && members !== void 0 && members.length) || !members.every(function (key) {
|
|
41539
41529
|
return valueKeys.has(key);
|
|
@@ -41544,19 +41534,19 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
41544
41534
|
parentMembers.set(parentCodex, new Set(members));
|
|
41545
41535
|
}
|
|
41546
41536
|
} catch (err) {
|
|
41547
|
-
|
|
41537
|
+
_iterator5.e(err);
|
|
41548
41538
|
} finally {
|
|
41549
|
-
|
|
41539
|
+
_iterator5.f();
|
|
41550
41540
|
}
|
|
41551
41541
|
if (!isFamily) continue;
|
|
41552
41542
|
var parentNames = new Map();
|
|
41553
|
-
var
|
|
41554
|
-
|
|
41543
|
+
var _iterator6 = _createForOfIteratorHelper$k(opg.visibleOptionValues),
|
|
41544
|
+
_step6;
|
|
41555
41545
|
try {
|
|
41556
41546
|
var _loop4 = function _loop4() {
|
|
41557
41547
|
var _optionGroups$opgValu, _parentValues$get;
|
|
41558
|
-
var
|
|
41559
|
-
opgValue =
|
|
41548
|
+
var _step6$value = _slicedToArray__default["default"](_step6.value, 2),
|
|
41549
|
+
opgValue = _step6$value[1];
|
|
41560
41550
|
var groupMembers = (_optionGroups$opgValu = optionGroups[opgValue.codex]) === null || _optionGroups$opgValu === void 0 ? void 0 : _optionGroups$opgValu.map(optionGroupMemberKey);
|
|
41561
41551
|
if (!(groupMembers !== null && groupMembers !== void 0 && groupMembers.length)) return 0; // continue
|
|
41562
41552
|
var parent = _toConsumableArray__default["default"](parentMembers.entries()).find(function (_ref2) {
|
|
@@ -41571,21 +41561,21 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
41571
41561
|
if (parentName) parentNames.set(opgValue.codex, parentName);
|
|
41572
41562
|
},
|
|
41573
41563
|
_ret;
|
|
41574
|
-
for (
|
|
41564
|
+
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
41575
41565
|
_ret = _loop4();
|
|
41576
41566
|
if (_ret === 0) continue;
|
|
41577
41567
|
}
|
|
41578
41568
|
} catch (err) {
|
|
41579
|
-
|
|
41569
|
+
_iterator6.e(err);
|
|
41580
41570
|
} finally {
|
|
41581
|
-
|
|
41571
|
+
_iterator6.f();
|
|
41582
41572
|
}
|
|
41583
41573
|
if (parentNames.size) return parentNames;
|
|
41584
41574
|
}
|
|
41585
41575
|
} catch (err) {
|
|
41586
|
-
|
|
41576
|
+
_iterator4.e(err);
|
|
41587
41577
|
} finally {
|
|
41588
|
-
|
|
41578
|
+
_iterator4.f();
|
|
41589
41579
|
}
|
|
41590
41580
|
return undefined;
|
|
41591
41581
|
}
|
|
@@ -41603,22 +41593,22 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
41603
41593
|
if (!opg || !ops) return undefined;
|
|
41604
41594
|
var parentNames = this.idmOpgParentNames(targetArticle, opg, ops);
|
|
41605
41595
|
var configItems = [];
|
|
41606
|
-
var
|
|
41607
|
-
|
|
41596
|
+
var _iterator7 = _createForOfIteratorHelper$k(opg.visibleOptionValues),
|
|
41597
|
+
_step7;
|
|
41608
41598
|
try {
|
|
41609
|
-
for (
|
|
41599
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
|
41610
41600
|
var _targetArticle$engine, _targetArticle$engine2, _ops$optionOcd2;
|
|
41611
|
-
var
|
|
41612
|
-
opgValue =
|
|
41601
|
+
var _step7$value = _slicedToArray__default["default"](_step7.value, 2),
|
|
41602
|
+
opgValue = _step7$value[1];
|
|
41613
41603
|
var pool = (_targetArticle$engine = (_targetArticle$engine2 = targetArticle.engine).staticVisibleOptionValuesForFeature) === null || _targetArticle$engine === void 0 ? void 0 : _targetArticle$engine.call(_targetArticle$engine2, ops.optionCodex, opg.optionCodex, opgValue.codex);
|
|
41614
41604
|
if (!pool) return undefined;
|
|
41615
41605
|
var retVal = this.prepareConfigItemsForView(set, optionState, pool, constructionRules, [], configStepOPG.targetArticles, (_ops$optionOcd2 = ops.optionOcd) !== null && _ops$optionOcd2 !== void 0 ? _ops$optionOcd2 : ops.optionCodex, opgValue.name, opgValue.codex, opg.optionCodex, parentNames === null || parentNames === void 0 ? void 0 : parentNames.get(opgValue.codex));
|
|
41616
41606
|
configItems = configItems.concat(retVal.myConfigItemsForView);
|
|
41617
41607
|
}
|
|
41618
41608
|
} catch (err) {
|
|
41619
|
-
|
|
41609
|
+
_iterator7.e(err);
|
|
41620
41610
|
} finally {
|
|
41621
|
-
|
|
41611
|
+
_iterator7.f();
|
|
41622
41612
|
}
|
|
41623
41613
|
var _loop5 = function _loop5() {
|
|
41624
41614
|
var _articles$configStepO;
|
|
@@ -41642,7 +41632,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
41642
41632
|
key: "mergeOPGItemsByReconfiguration",
|
|
41643
41633
|
value: (function () {
|
|
41644
41634
|
var _mergeOPGItemsByReconfiguration = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(set, step, configStepOPG, configStepOPV, optionState, constructionRules, selectedItems) {
|
|
41645
|
-
var configItems, clonedSet, clonedArticles, targetArticle, opg, ops, selectedOpv, originalVariantValues, parentNames, mergedOptionOnPartlistArticle, useFastPath, fastPathValidated, variantValues,
|
|
41635
|
+
var configItems, clonedSet, clonedArticles, targetArticle, opg, ops, selectedOpv, originalVariantValues, parentNames, mergedOptionOnPartlistArticle, useFastPath, fastPathValidated, variantValues, _iterator8, _step8, _clonedSet$favorites$, _clonedSet$favorites, _step8$value, opgValue, alreadyCalcedVisibleOPVs, _loop7, _i2, _targetArticle$engine3, _targetArticle$engine4, _ops$optionOcd3, visibleOptionValues, updatedOps, fastPathKeys, fullKeys, retVal, clonedConfigItemsForView, _loop6, i;
|
|
41646
41636
|
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context4) {
|
|
41647
41637
|
while (1) switch (_context4.prev = _context4.next) {
|
|
41648
41638
|
case 0:
|
|
@@ -41670,15 +41660,15 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
41670
41660
|
mergedOptionOnPartlistArticle = !targetArticle.getArticleOptionStateFlat(ops.optionCodex);
|
|
41671
41661
|
useFastPath = true, fastPathValidated = false;
|
|
41672
41662
|
variantValues = {};
|
|
41673
|
-
|
|
41663
|
+
_iterator8 = _createForOfIteratorHelper$k(opg.visibleOptionValues);
|
|
41674
41664
|
_context4.prev = 17;
|
|
41675
|
-
|
|
41665
|
+
_iterator8.s();
|
|
41676
41666
|
case 19:
|
|
41677
|
-
if ((
|
|
41667
|
+
if ((_step8 = _iterator8.n()).done) {
|
|
41678
41668
|
_context4.next = 51;
|
|
41679
41669
|
break;
|
|
41680
41670
|
}
|
|
41681
|
-
|
|
41671
|
+
_step8$value = _slicedToArray__default["default"](_step8.value, 2), opgValue = _step8$value[1];
|
|
41682
41672
|
// The visible groups are set on the article one after another and each group's valid values fetched -> visibleOptionValues.
|
|
41683
41673
|
variantValues[opg.optionCodex] = opgValue.codex;
|
|
41684
41674
|
alreadyCalcedVisibleOPVs = targetArticle.getMergesToOPG(opg.optionCodex + '_' + opgValue.codex, JSON.stringify(targetArticle.getVariantValuesTillOPT(opg.optionCodex)));
|
|
@@ -41763,10 +41753,10 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
41763
41753
|
case 53:
|
|
41764
41754
|
_context4.prev = 53;
|
|
41765
41755
|
_context4.t1 = _context4["catch"](17);
|
|
41766
|
-
|
|
41756
|
+
_iterator8.e(_context4.t1);
|
|
41767
41757
|
case 56:
|
|
41768
41758
|
_context4.prev = 56;
|
|
41769
|
-
|
|
41759
|
+
_iterator8.f();
|
|
41770
41760
|
return _context4.finish(56);
|
|
41771
41761
|
case 59:
|
|
41772
41762
|
_loop6 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop6() {
|
|
@@ -41849,11 +41839,11 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
41849
41839
|
constructionRules = myOptionState.constructionRules;
|
|
41850
41840
|
configItems = new Map(myOptionState.visibleOptionValues);
|
|
41851
41841
|
} else {
|
|
41852
|
-
var
|
|
41853
|
-
|
|
41842
|
+
var _iterator9 = _createForOfIteratorHelper$k(configItems.keys()),
|
|
41843
|
+
_step9;
|
|
41854
41844
|
try {
|
|
41855
41845
|
var _loop8 = function _loop8() {
|
|
41856
|
-
var key =
|
|
41846
|
+
var key = _step9.value;
|
|
41857
41847
|
if (!myOptionState.visibleOptionValues.get(key) && !myOptionState.visibleOptionValues.values().find(function (v) {
|
|
41858
41848
|
var _configItems$get;
|
|
41859
41849
|
return v.sameopv && v.sameopv == ((_configItems$get = configItems.get(key)) === null || _configItems$get === void 0 ? void 0 : _configItems$get.sameopv);
|
|
@@ -41861,13 +41851,13 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
41861
41851
|
configItems["delete"](key);
|
|
41862
41852
|
}
|
|
41863
41853
|
};
|
|
41864
|
-
for (
|
|
41854
|
+
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
41865
41855
|
_loop8();
|
|
41866
41856
|
}
|
|
41867
41857
|
} catch (err) {
|
|
41868
|
-
|
|
41858
|
+
_iterator9.e(err);
|
|
41869
41859
|
} finally {
|
|
41870
|
-
|
|
41860
|
+
_iterator9.f();
|
|
41871
41861
|
}
|
|
41872
41862
|
}
|
|
41873
41863
|
} else if (i == 0 && configStep.targetArticles.length == 1) {
|
|
@@ -41982,11 +41972,11 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
41982
41972
|
ret = false;
|
|
41983
41973
|
var articles = set.getDivaArticles();
|
|
41984
41974
|
for (var basketId in articles) {
|
|
41985
|
-
var
|
|
41986
|
-
|
|
41975
|
+
var _iterator10 = _createForOfIteratorHelper$k(articles[basketId].articleOptionStates.values()),
|
|
41976
|
+
_step10;
|
|
41987
41977
|
try {
|
|
41988
|
-
for (
|
|
41989
|
-
var ops =
|
|
41978
|
+
for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
|
|
41979
|
+
var ops = _step10.value;
|
|
41990
41980
|
if (ops.headerPosVariationType == 'K') {
|
|
41991
41981
|
if (optionValues[ops.optionCodex] == undefined) {
|
|
41992
41982
|
optionValues[ops.optionCodex] = ops.valCodex ? ops.valCodex : null;
|
|
@@ -41999,9 +41989,9 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
41999
41989
|
}
|
|
42000
41990
|
}
|
|
42001
41991
|
} catch (err) {
|
|
42002
|
-
|
|
41992
|
+
_iterator10.e(err);
|
|
42003
41993
|
} finally {
|
|
42004
|
-
|
|
41994
|
+
_iterator10.f();
|
|
42005
41995
|
}
|
|
42006
41996
|
if (ret == true) break;
|
|
42007
41997
|
}
|
|
@@ -42249,12 +42239,12 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
42249
42239
|
for (var iKey in optionStatesOfArticles) {
|
|
42250
42240
|
//hier evtl. die Article mit einer gewissen reihenfolge durchlaufen!
|
|
42251
42241
|
var optionsStates = optionStatesOfArticles[iKey];
|
|
42252
|
-
var
|
|
42253
|
-
|
|
42242
|
+
var _iterator11 = _createForOfIteratorHelper$k(optionsStates.values()),
|
|
42243
|
+
_step11;
|
|
42254
42244
|
try {
|
|
42255
|
-
for (
|
|
42245
|
+
for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
|
|
42256
42246
|
var _ops$addToMeasure2;
|
|
42257
|
-
var ops =
|
|
42247
|
+
var ops = _step11.value;
|
|
42258
42248
|
var selectionmode = ops.selectionmode;
|
|
42259
42249
|
if (set.CatalogData.forceConfigSingle && (selectionmode == 1 || selectionmode == 2)) selectionmode = 3;
|
|
42260
42250
|
if (ops.isInvisible || selectionmode == 0 || !ops.isDoShow || ops.visibleCount == 0 || !!((_ops$addToMeasure2 = ops.addToMeasure) !== null && _ops$addToMeasure2 !== void 0 && _ops$addToMeasure2.length)) {
|
|
@@ -42262,9 +42252,9 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
42262
42252
|
}
|
|
42263
42253
|
}
|
|
42264
42254
|
} catch (err) {
|
|
42265
|
-
|
|
42255
|
+
_iterator11.e(err);
|
|
42266
42256
|
} finally {
|
|
42267
|
-
|
|
42257
|
+
_iterator11.f();
|
|
42268
42258
|
}
|
|
42269
42259
|
}
|
|
42270
42260
|
return configTree;
|
|
@@ -42938,12 +42928,14 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
42938
42928
|
}, {
|
|
42939
42929
|
key: "getSetTitle",
|
|
42940
42930
|
value: function getSetTitle() {
|
|
42941
|
-
var _this$ViewConfig, _this$setState$config;
|
|
42942
|
-
|
|
42931
|
+
var _this$catalogData$use, _this$ViewConfig, _this$setState$config;
|
|
42932
|
+
// the series property USE_ARTICLE_NAME_AS_TITLE, when set, replaces the view config value
|
|
42933
|
+
var useArticleNameAsTitle = (_this$catalogData$use = this.catalogData.useArticleNameAsTitle) !== null && _this$catalogData$use !== void 0 ? _this$catalogData$use : (_this$ViewConfig = this.ViewConfig) === null || _this$ViewConfig === void 0 ? void 0 : _this$ViewConfig.useArticleNameAsTitle;
|
|
42934
|
+
if (useArticleNameAsTitle && _toConsumableArray__default["default"](new Set(this.mainArtcles.map(function (a) {
|
|
42943
42935
|
return a.articleCodex;
|
|
42944
42936
|
}))).length == 1) {
|
|
42945
42937
|
var name = this.mainArtcles[0].name.replace(/\(.+?\)/g, '');
|
|
42946
|
-
if (typeof
|
|
42938
|
+
if (typeof useArticleNameAsTitle !== 'number' || name.length < useArticleNameAsTitle) return name;
|
|
42947
42939
|
}
|
|
42948
42940
|
return (_this$setState$config = this.setState.configuratorTitle) !== null && _this$setState$config !== void 0 ? _this$setState$config : this.getSetName();
|
|
42949
42941
|
}
|
|
@@ -43019,6 +43011,76 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
43019
43011
|
}
|
|
43020
43012
|
return articles;
|
|
43021
43013
|
}
|
|
43014
|
+
|
|
43015
|
+
/**
|
|
43016
|
+
* Catalog option of `codex`, from the catalog of the article `basketId` first, then from the set catalog and every
|
|
43017
|
+
* other article's catalog: partlist components of another serie (e.g. serie 0) register theirs in that serie's catalog.
|
|
43018
|
+
*/
|
|
43019
|
+
}, {
|
|
43020
|
+
key: "getCatalogOption",
|
|
43021
|
+
value: function getCatalogOption(codex, basketId) {
|
|
43022
|
+
var _iterator = _createForOfIteratorHelper$j(this.getAllCatalogs(basketId)),
|
|
43023
|
+
_step;
|
|
43024
|
+
try {
|
|
43025
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
43026
|
+
var catalog = _step.value;
|
|
43027
|
+
var option = catalog.getOption(codex);
|
|
43028
|
+
if (option) return option;
|
|
43029
|
+
}
|
|
43030
|
+
} catch (err) {
|
|
43031
|
+
_iterator.e(err);
|
|
43032
|
+
} finally {
|
|
43033
|
+
_iterator.f();
|
|
43034
|
+
}
|
|
43035
|
+
return undefined;
|
|
43036
|
+
}
|
|
43037
|
+
|
|
43038
|
+
/** Catalog option value of `codex`, looked up across the same catalogs as getCatalogOption. */
|
|
43039
|
+
}, {
|
|
43040
|
+
key: "getCatalogOptionValue",
|
|
43041
|
+
value: function getCatalogOptionValue(codex, basketId) {
|
|
43042
|
+
var _this$getOptionValueC;
|
|
43043
|
+
return (_this$getOptionValueC = this.getOptionValueCatalog(codex, basketId)) === null || _this$getOptionValueC === void 0 ? void 0 : _this$getOptionValueC.getOptionValue(codex);
|
|
43044
|
+
}
|
|
43045
|
+
|
|
43046
|
+
/** The catalog holding the option value `codex`; its media settings resolve the value's images. */
|
|
43047
|
+
}, {
|
|
43048
|
+
key: "getOptionValueCatalog",
|
|
43049
|
+
value: function getOptionValueCatalog(codex, basketId) {
|
|
43050
|
+
var _iterator2 = _createForOfIteratorHelper$j(this.getAllCatalogs(basketId)),
|
|
43051
|
+
_step2;
|
|
43052
|
+
try {
|
|
43053
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
43054
|
+
var catalog = _step2.value;
|
|
43055
|
+
if (catalog.getOptionValue(codex)) return catalog;
|
|
43056
|
+
}
|
|
43057
|
+
} catch (err) {
|
|
43058
|
+
_iterator2.e(err);
|
|
43059
|
+
} finally {
|
|
43060
|
+
_iterator2.f();
|
|
43061
|
+
}
|
|
43062
|
+
return undefined;
|
|
43063
|
+
}
|
|
43064
|
+
|
|
43065
|
+
// one walk over articles and partlist components, without building the recursive article map: this runs per looked-up value on every doConfigure
|
|
43066
|
+
}, {
|
|
43067
|
+
key: "getAllCatalogs",
|
|
43068
|
+
value: function getAllCatalogs(basketId) {
|
|
43069
|
+
var catalogs = [this.catalogData];
|
|
43070
|
+
var ownCatalog;
|
|
43071
|
+
var _collect = function collect(articles) {
|
|
43072
|
+
for (var key in articles) {
|
|
43073
|
+
var article = articles[key];
|
|
43074
|
+
if (key === basketId) ownCatalog = article.CatalogData;
|
|
43075
|
+
if (!catalogs.includes(article.CatalogData)) catalogs.push(article.CatalogData);
|
|
43076
|
+
_collect(article.partlistArticles);
|
|
43077
|
+
}
|
|
43078
|
+
};
|
|
43079
|
+
_collect(this.divaArticles);
|
|
43080
|
+
return ownCatalog ? [ownCatalog].concat(_toConsumableArray__default["default"](catalogs.filter(function (catalog) {
|
|
43081
|
+
return catalog !== ownCatalog;
|
|
43082
|
+
}))) : catalogs;
|
|
43083
|
+
}
|
|
43022
43084
|
}, {
|
|
43023
43085
|
key: "getDivaArticlesByGridGroup",
|
|
43024
43086
|
value: function getDivaArticlesByGridGroup(gridGroup) {
|
|
@@ -43070,30 +43132,30 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
43070
43132
|
value: function () {
|
|
43071
43133
|
var _getCustomDimsFromCostructionService = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3() {
|
|
43072
43134
|
var _this2 = this;
|
|
43073
|
-
var dims, dimensions,
|
|
43135
|
+
var dims, dimensions, _iterator3, _step3, article, _iterator4, _step4, dimensionId, dimension, cleanedDimensions;
|
|
43074
43136
|
return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context4) {
|
|
43075
43137
|
while (1) switch (_context4.prev = _context4.next) {
|
|
43076
43138
|
case 0:
|
|
43077
43139
|
dims = [];
|
|
43078
43140
|
dimensions = [];
|
|
43079
|
-
|
|
43141
|
+
_iterator3 = _createForOfIteratorHelper$j(this.getArticleVariantValues());
|
|
43080
43142
|
_context4.prev = 3;
|
|
43081
|
-
|
|
43143
|
+
_iterator3.s();
|
|
43082
43144
|
case 5:
|
|
43083
|
-
if ((
|
|
43145
|
+
if ((_step3 = _iterator3.n()).done) {
|
|
43084
43146
|
_context4.next = 28;
|
|
43085
43147
|
break;
|
|
43086
43148
|
}
|
|
43087
|
-
article =
|
|
43088
|
-
|
|
43149
|
+
article = _step3.value;
|
|
43150
|
+
_iterator4 = _createForOfIteratorHelper$j(article.headerDimensions);
|
|
43089
43151
|
_context4.prev = 8;
|
|
43090
|
-
|
|
43152
|
+
_iterator4.s();
|
|
43091
43153
|
case 10:
|
|
43092
|
-
if ((
|
|
43154
|
+
if ((_step4 = _iterator4.n()).done) {
|
|
43093
43155
|
_context4.next = 18;
|
|
43094
43156
|
break;
|
|
43095
43157
|
}
|
|
43096
|
-
dimensionId =
|
|
43158
|
+
dimensionId = _step4.value;
|
|
43097
43159
|
_context4.next = 14;
|
|
43098
43160
|
return this.api.getDimensionbyId(dimensionId, article.iln, this.getCatalogCodex(), article.variantValues);
|
|
43099
43161
|
case 14:
|
|
@@ -43112,10 +43174,10 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
43112
43174
|
case 20:
|
|
43113
43175
|
_context4.prev = 20;
|
|
43114
43176
|
_context4.t0 = _context4["catch"](8);
|
|
43115
|
-
|
|
43177
|
+
_iterator4.e(_context4.t0);
|
|
43116
43178
|
case 23:
|
|
43117
43179
|
_context4.prev = 23;
|
|
43118
|
-
|
|
43180
|
+
_iterator4.f();
|
|
43119
43181
|
return _context4.finish(23);
|
|
43120
43182
|
case 26:
|
|
43121
43183
|
_context4.next = 5;
|
|
@@ -43126,10 +43188,10 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
43126
43188
|
case 30:
|
|
43127
43189
|
_context4.prev = 30;
|
|
43128
43190
|
_context4.t1 = _context4["catch"](3);
|
|
43129
|
-
|
|
43191
|
+
_iterator3.e(_context4.t1);
|
|
43130
43192
|
case 33:
|
|
43131
43193
|
_context4.prev = 33;
|
|
43132
|
-
|
|
43194
|
+
_iterator3.f();
|
|
43133
43195
|
return _context4.finish(33);
|
|
43134
43196
|
case 36:
|
|
43135
43197
|
if (!(!dims || dims.every(function (r, idx) {
|
|
@@ -43175,11 +43237,11 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
43175
43237
|
var cleanedDimensions = [];
|
|
43176
43238
|
for (var basketId in articles) {
|
|
43177
43239
|
var artice = articles[basketId];
|
|
43178
|
-
var
|
|
43179
|
-
|
|
43240
|
+
var _iterator5 = _createForOfIteratorHelper$j(artice.articleOptionStates.values()),
|
|
43241
|
+
_step5;
|
|
43180
43242
|
try {
|
|
43181
43243
|
var _loop2 = function _loop2() {
|
|
43182
|
-
var ops =
|
|
43244
|
+
var ops = _step5.value;
|
|
43183
43245
|
if (ops.customDimension && artice.posNr !== -1) {
|
|
43184
43246
|
var value;
|
|
43185
43247
|
if (typeof ops.customDimension == 'number') {
|
|
@@ -43209,13 +43271,13 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
43209
43271
|
}
|
|
43210
43272
|
}
|
|
43211
43273
|
};
|
|
43212
|
-
for (
|
|
43274
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
43213
43275
|
_loop2();
|
|
43214
43276
|
}
|
|
43215
43277
|
} catch (err) {
|
|
43216
|
-
|
|
43278
|
+
_iterator5.e(err);
|
|
43217
43279
|
} finally {
|
|
43218
|
-
|
|
43280
|
+
_iterator5.f();
|
|
43219
43281
|
}
|
|
43220
43282
|
}
|
|
43221
43283
|
return cleanedDimensions;
|
|
@@ -43404,20 +43466,20 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
43404
43466
|
var options = [];
|
|
43405
43467
|
for (var key in this.divaArticles) {
|
|
43406
43468
|
var article = this.divaArticles[key];
|
|
43407
|
-
var
|
|
43408
|
-
|
|
43469
|
+
var _iterator6 = _createForOfIteratorHelper$j(article.articleOptionStates.values()),
|
|
43470
|
+
_step6;
|
|
43409
43471
|
try {
|
|
43410
|
-
for (
|
|
43411
|
-
var ops =
|
|
43472
|
+
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
43473
|
+
var ops = _step6.value;
|
|
43412
43474
|
if (!ops.invisibleWithoutMaskeInfluence && ops.isDoShow && ops.val && ops.valCodex != 'OPVNR' && ops.valCodex != 'OPOHNE') {
|
|
43413
43475
|
var _ops$val$setName;
|
|
43414
43476
|
if (ops.option.setName) options.push((_ops$val$setName = ops.val.setName) !== null && _ops$val$setName !== void 0 ? _ops$val$setName : ops.val.name);
|
|
43415
43477
|
}
|
|
43416
43478
|
}
|
|
43417
43479
|
} catch (err) {
|
|
43418
|
-
|
|
43480
|
+
_iterator6.e(err);
|
|
43419
43481
|
} finally {
|
|
43420
|
-
|
|
43482
|
+
_iterator6.f();
|
|
43421
43483
|
}
|
|
43422
43484
|
}
|
|
43423
43485
|
return options;
|
|
@@ -43665,7 +43727,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
43665
43727
|
break;
|
|
43666
43728
|
}
|
|
43667
43729
|
_context5.next = 3;
|
|
43668
|
-
return Promise.resolve().then(function () { return require('./DoorPlanner-
|
|
43730
|
+
return Promise.resolve().then(function () { return require('./DoorPlanner-8cbae86f.js'); });
|
|
43669
43731
|
case 3:
|
|
43670
43732
|
_yield$import = _context5.sent;
|
|
43671
43733
|
DoorPlanner = _yield$import["default"];
|
|
@@ -43800,6 +43862,11 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
43800
43862
|
get: function get() {
|
|
43801
43863
|
return this.setState.actions;
|
|
43802
43864
|
}
|
|
43865
|
+
|
|
43866
|
+
/** Set by the planner when a view adopts or releases it. */,
|
|
43867
|
+
set: function set(actions) {
|
|
43868
|
+
this.setState.actions = actions;
|
|
43869
|
+
}
|
|
43803
43870
|
}, {
|
|
43804
43871
|
key: "getPlanning2DAsJpg",
|
|
43805
43872
|
get: function get() {
|
|
@@ -44517,13 +44584,15 @@ var Grid = /*#__PURE__*/function () {
|
|
|
44517
44584
|
*/
|
|
44518
44585
|
return _createClass__default["default"](Grid, [{
|
|
44519
44586
|
key: "tryFitOnShelf",
|
|
44520
|
-
value: function tryFitOnShelf(accessoire, index, accessorieShelfPlanner, checkParentRuleOnly
|
|
44587
|
+
value: function tryFitOnShelf(accessoire, index, accessorieShelfPlanner, checkParentRuleOnly,
|
|
44588
|
+
// when remove old shelfplanner logic remove this param
|
|
44589
|
+
movingBasketId // the accessoire being moved: its own cells are free for it
|
|
44521
44590
|
) {
|
|
44522
44591
|
var gridAllowedOnCells = accessorieShelfPlanner === null || accessorieShelfPlanner === void 0 ? void 0 : accessorieShelfPlanner.GridAllowedOnCells;
|
|
44523
44592
|
var gridAllowedOntoArticles = accessorieShelfPlanner === null || accessorieShelfPlanner === void 0 ? void 0 : accessorieShelfPlanner.GridAllowedOntoArticles;
|
|
44524
44593
|
var size = accessoire.shelfHeight;
|
|
44525
44594
|
if (gridAllowedOntoArticles) {
|
|
44526
|
-
return this.checkIfFitting(index, size, 'fitsOnToAccessoire', undefined, gridAllowedOntoArticles);
|
|
44595
|
+
return this.checkIfFitting(index, size, 'fitsOnToAccessoire', undefined, gridAllowedOntoArticles, undefined, movingBasketId);
|
|
44527
44596
|
}
|
|
44528
44597
|
if (gridAllowedOnCells && gridAllowedOnCells.length > 0) {
|
|
44529
44598
|
var noSpaceOn = false;
|
|
@@ -44533,11 +44602,11 @@ var Grid = /*#__PURE__*/function () {
|
|
|
44533
44602
|
if (gridAllowedOnCell.onParent == this.article.articleCodex || gridAllowedOnCell.onParent == undefined) {
|
|
44534
44603
|
noSpaceOn = gridAllowedOnCell.Cells;
|
|
44535
44604
|
if (gridAllowedOnCell.Cells.includes(index)) {
|
|
44536
|
-
return this.checkIfFitting(index, size, 'fitsOnParentRule', gridAllowedOnCell.Cells, undefined, checkParentRuleOnly);
|
|
44605
|
+
return this.checkIfFitting(index, size, 'fitsOnParentRule', gridAllowedOnCell.Cells, undefined, checkParentRuleOnly, movingBasketId);
|
|
44537
44606
|
} else {
|
|
44538
44607
|
for (var j = 0; j < gridAllowedOnCell.Cells.length; j++) {
|
|
44539
|
-
if (this.tryFitOnIndex(size, gridAllowedOnCell.Cells[j], undefined, checkParentRuleOnly)) {
|
|
44540
|
-
return this.checkIfFitting(gridAllowedOnCell.Cells[j], size, 'fitsOnParentRuleButOriginalNotAllowed', gridAllowedOnCell.Cells, undefined, checkParentRuleOnly);
|
|
44608
|
+
if (this.tryFitOnIndex(size, gridAllowedOnCell.Cells[j], undefined, checkParentRuleOnly, movingBasketId)) {
|
|
44609
|
+
return this.checkIfFitting(gridAllowedOnCell.Cells[j], size, 'fitsOnParentRuleButOriginalNotAllowed', gridAllowedOnCell.Cells, undefined, checkParentRuleOnly, movingBasketId);
|
|
44541
44610
|
}
|
|
44542
44611
|
}
|
|
44543
44612
|
}
|
|
@@ -44566,7 +44635,7 @@ var Grid = /*#__PURE__*/function () {
|
|
|
44566
44635
|
canOnlyFitOn: noSpaceOn
|
|
44567
44636
|
};
|
|
44568
44637
|
}
|
|
44569
|
-
var ret = this.checkIfFitting(index, size);
|
|
44638
|
+
var ret = this.checkIfFitting(index, size, undefined, undefined, undefined, undefined, movingBasketId);
|
|
44570
44639
|
return ret;
|
|
44571
44640
|
}
|
|
44572
44641
|
}, {
|
|
@@ -44576,25 +44645,26 @@ var Grid = /*#__PURE__*/function () {
|
|
|
44576
44645
|
var gridAllowedOnCell = arguments.length > 3 ? arguments[3] : undefined;
|
|
44577
44646
|
var placedOnToAccessoire = arguments.length > 4 ? arguments[4] : undefined;
|
|
44578
44647
|
var checkParentRuleOnly = arguments.length > 5 ? arguments[5] : undefined;
|
|
44648
|
+
var movingBasketId = arguments.length > 6 ? arguments[6] : undefined;
|
|
44579
44649
|
var count = 0;
|
|
44580
44650
|
var noFitType = 'doesNotFit';
|
|
44581
44651
|
var canOnlyFitOn = undefined;
|
|
44582
44652
|
while (true) {
|
|
44583
|
-
if (!this.cells[index - count] || this.
|
|
44653
|
+
if (!this.cells[index - count] || this.isTakenFor(index - count, movingBasketId) && !checkParentRuleOnly) {
|
|
44584
44654
|
return {
|
|
44585
44655
|
type: noFitType,
|
|
44586
44656
|
size: size,
|
|
44587
44657
|
canOnlyFitOn: canOnlyFitOn
|
|
44588
44658
|
};
|
|
44589
44659
|
}
|
|
44590
|
-
if (this.tryFitOnIndex(size, index - count, gridAllowedOnCell, checkParentRuleOnly)) {
|
|
44591
|
-
if (!placedOnToAccessoire || this.checkIfPlacedOnToAccessoireRule(placedOnToAccessoire, index - count)) {
|
|
44660
|
+
if (this.tryFitOnIndex(size, index - count, gridAllowedOnCell, checkParentRuleOnly, movingBasketId)) {
|
|
44661
|
+
if (!placedOnToAccessoire || this.checkIfPlacedOnToAccessoireRule(placedOnToAccessoire, index - count, movingBasketId)) {
|
|
44592
44662
|
return {
|
|
44593
44663
|
type: type,
|
|
44594
44664
|
size: size,
|
|
44595
44665
|
index: index - count
|
|
44596
44666
|
};
|
|
44597
|
-
} else if (!this.cells[index - (count + 1)] || this.
|
|
44667
|
+
} else if (!this.cells[index - (count + 1)] || this.isTakenFor(index - (count + 1), movingBasketId) && !checkParentRuleOnly) {
|
|
44598
44668
|
noFitType = 'notAllowedByAccessoireRule';
|
|
44599
44669
|
canOnlyFitOn = this.getNamesOfArticles(placedOnToAccessoire);
|
|
44600
44670
|
}
|
|
@@ -44602,11 +44672,20 @@ var Grid = /*#__PURE__*/function () {
|
|
|
44602
44672
|
count++;
|
|
44603
44673
|
}
|
|
44604
44674
|
}
|
|
44675
|
+
|
|
44676
|
+
// Whether cell `index` holds an accessoire other than the one being moved (`movingBasketId`), which leaves its own cells.
|
|
44677
|
+
}, {
|
|
44678
|
+
key: "isTakenFor",
|
|
44679
|
+
value: function isTakenFor(index, movingBasketId) {
|
|
44680
|
+
var _cell$Article;
|
|
44681
|
+
var cell = this.cells[index];
|
|
44682
|
+
return cell.InUse > -1 && (movingBasketId === undefined || ((_cell$Article = cell.Article) === null || _cell$Article === void 0 ? void 0 : _cell$Article.basketId) !== movingBasketId);
|
|
44683
|
+
}
|
|
44605
44684
|
}, {
|
|
44606
44685
|
key: "tryFitOnIndex",
|
|
44607
|
-
value: function tryFitOnIndex(size, index, gridAllowedOnCell, checkParentRuleOnly) {
|
|
44686
|
+
value: function tryFitOnIndex(size, index, gridAllowedOnCell, checkParentRuleOnly, movingBasketId) {
|
|
44608
44687
|
for (var i = index; i < size + index; i++) {
|
|
44609
|
-
if (this.cells[i] == undefined || this.
|
|
44688
|
+
if (this.cells[i] == undefined || this.isTakenFor(i, movingBasketId) && !checkParentRuleOnly || gridAllowedOnCell && !gridAllowedOnCell.includes(i)) {
|
|
44610
44689
|
return false;
|
|
44611
44690
|
}
|
|
44612
44691
|
}
|
|
@@ -44623,11 +44702,14 @@ var Grid = /*#__PURE__*/function () {
|
|
|
44623
44702
|
}
|
|
44624
44703
|
return true;
|
|
44625
44704
|
}
|
|
44705
|
+
|
|
44706
|
+
// The accessoire being moved (`movingBasketId`) leaves its cells, so it is no support for itself.
|
|
44626
44707
|
}, {
|
|
44627
44708
|
key: "checkIfPlacedOnToAccessoireRule",
|
|
44628
|
-
value: function checkIfPlacedOnToAccessoireRule(fitsOnToAccessoire, position) {
|
|
44629
|
-
var
|
|
44630
|
-
|
|
44709
|
+
value: function checkIfPlacedOnToAccessoireRule(fitsOnToAccessoire, position, movingBasketId) {
|
|
44710
|
+
var _this$cells;
|
|
44711
|
+
var article = (_this$cells = this.cells[position - 1]) === null || _this$cells === void 0 ? void 0 : _this$cells.Article;
|
|
44712
|
+
return article && article.basketId !== movingBasketId ? fitsOnToAccessoire.includes(article.articleCodex) : false;
|
|
44631
44713
|
}
|
|
44632
44714
|
}, {
|
|
44633
44715
|
key: "getNamesOfArticles",
|
|
@@ -44933,10 +45015,10 @@ var Grid = /*#__PURE__*/function () {
|
|
|
44933
45015
|
var after = accessoire.shelfHeightAbove;
|
|
44934
45016
|
if (before) {
|
|
44935
45017
|
for (var i = 1; i <= before; i++) {
|
|
44936
|
-
var _this$cells$index, _cell$
|
|
45018
|
+
var _this$cells$index, _cell$Article2;
|
|
44937
45019
|
var index = cellIndex - i;
|
|
44938
45020
|
var cell = this.cells[index];
|
|
44939
|
-
if (this.cells[index] && ((_this$cells$index = this.cells[index]) === null || _this$cells$index === void 0 ? void 0 : _this$cells$index.InUse) != -1 && accessoire.basketId !== ((_cell$
|
|
45021
|
+
if (this.cells[index] && ((_this$cells$index = this.cells[index]) === null || _this$cells$index === void 0 ? void 0 : _this$cells$index.InUse) != -1 && accessoire.basketId !== ((_cell$Article2 = cell.Article) === null || _cell$Article2 === void 0 ? void 0 : _cell$Article2.basketId)) {
|
|
44940
45022
|
return true;
|
|
44941
45023
|
}
|
|
44942
45024
|
}
|
|
@@ -45119,18 +45201,18 @@ var Grid = /*#__PURE__*/function () {
|
|
|
45119
45201
|
//check for all the accessoires that moved during the process if they are allowed to be there
|
|
45120
45202
|
accessoriesMoved = [];
|
|
45121
45203
|
_loop2 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop2() {
|
|
45122
|
-
var cell, _cell$
|
|
45204
|
+
var cell, _cell$Article4;
|
|
45123
45205
|
return _regeneratorRuntime__default["default"].wrap(function _loop2$(_context7) {
|
|
45124
45206
|
while (1) switch (_context7.prev = _context7.next) {
|
|
45125
45207
|
case 0:
|
|
45126
45208
|
cell = _this2.cells[_i13];
|
|
45127
45209
|
if (cell.Type == 'fitsOnParentRule' && cell.InUse > -1 && !accessoriesMoved.find(function (a) {
|
|
45128
|
-
var _cell$
|
|
45129
|
-
return ((_cell$
|
|
45210
|
+
var _cell$Article3;
|
|
45211
|
+
return ((_cell$Article3 = cell.Article) === null || _cell$Article3 === void 0 ? void 0 : _cell$Article3.basketId) == a.basketId;
|
|
45130
45212
|
})) {
|
|
45131
45213
|
accessoriesMoved.push({
|
|
45132
45214
|
article: cell.Article,
|
|
45133
|
-
basketId: (_cell$
|
|
45215
|
+
basketId: (_cell$Article4 = cell.Article) === null || _cell$Article4 === void 0 ? void 0 : _cell$Article4.basketId,
|
|
45134
45216
|
index: cell.InUse
|
|
45135
45217
|
});
|
|
45136
45218
|
}
|
|
@@ -45246,8 +45328,8 @@ var Grid = /*#__PURE__*/function () {
|
|
|
45246
45328
|
var cells = this.cells,
|
|
45247
45329
|
accessoires = this.accessoires;
|
|
45248
45330
|
this.cells = cells.map(function (cell) {
|
|
45249
|
-
var _cell$
|
|
45250
|
-
if (((_cell$
|
|
45331
|
+
var _cell$Article5;
|
|
45332
|
+
if (((_cell$Article5 = cell.Article) === null || _cell$Article5 === void 0 ? void 0 : _cell$Article5.basketId) !== basketId) return cell;
|
|
45251
45333
|
var free = new Cell(cell.Index);
|
|
45252
45334
|
free.IsDisabled = cell.IsDisabled;
|
|
45253
45335
|
return free;
|
|
@@ -45271,11 +45353,11 @@ var Grid = /*#__PURE__*/function () {
|
|
|
45271
45353
|
if (!size || this.disabledByRule || this.checkAccessoireInGridRules(accessoire)) return [];
|
|
45272
45354
|
var freeCells = [];
|
|
45273
45355
|
for (var i = 0; i < this.Cells.length; i++) {
|
|
45274
|
-
var _cell$
|
|
45356
|
+
var _cell$Article6;
|
|
45275
45357
|
var cell = this.Cells[i];
|
|
45276
45358
|
if (!this.getAllArticleRelations().includes(accessoire.articleCodex)) continue;
|
|
45277
|
-
var ret = this.tryFitOnShelf(accessoire, cell.Index, accessoire.shelfPlanner);
|
|
45278
|
-
if (((_cell$
|
|
45359
|
+
var ret = this.tryFitOnShelf(accessoire, cell.Index, accessoire.shelfPlanner, undefined, accessoire.basketId);
|
|
45360
|
+
if (((_cell$Article6 = cell.Article) === null || _cell$Article6 === void 0 ? void 0 : _cell$Article6.basketId) === accessoire.basketId) {
|
|
45279
45361
|
var _ret$canOnlyFitOn;
|
|
45280
45362
|
if (cell.Index == cell.InUse || ret && (_ret$canOnlyFitOn = ret.canOnlyFitOn) !== null && _ret$canOnlyFitOn !== void 0 && _ret$canOnlyFitOn.includes(cell.Index) || ret && ret.type !== 'fitsOnParentRule' && cell.OnlyPlaceHolder) {
|
|
45281
45363
|
ret = {
|
|
@@ -45400,9 +45482,9 @@ var Grid = /*#__PURE__*/function () {
|
|
|
45400
45482
|
if (!neighborGrid) continue;
|
|
45401
45483
|
if (neighborGrid.Direction === this.Direction) {
|
|
45402
45484
|
for (var _j3 = 0; _j3 < size; _j3++) {
|
|
45403
|
-
var _cell$
|
|
45485
|
+
var _cell$Article7;
|
|
45404
45486
|
var cell = neighborGrid.cells[_j3 + index];
|
|
45405
|
-
if ((cell === null || cell === void 0 ? void 0 : cell.InUse) !== -1 && ((_cell$
|
|
45487
|
+
if ((cell === null || cell === void 0 ? void 0 : cell.InUse) !== -1 && ((_cell$Article7 = cell.Article) === null || _cell$Article7 === void 0 ? void 0 : _cell$Article7.basketId) !== accessoire.basketId) {
|
|
45406
45488
|
_ret = true;
|
|
45407
45489
|
}
|
|
45408
45490
|
}
|
|
@@ -46306,7 +46388,8 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
46306
46388
|
}
|
|
46307
46389
|
return _context3.abrupt("return", 1);
|
|
46308
46390
|
case 3:
|
|
46309
|
-
|
|
46391
|
+
// only asked for a line of its own: a partlist line goes to its parent either way, and may come from another serie
|
|
46392
|
+
isPartlistExclusive = !orderline.IsPartlistArticle && ((_catalogData$getCatal = catalogData.getCatalogArticleByArticleCodex(orderline.ArticleCodex)) === null || _catalogData$getCatal === void 0 ? void 0 : _catalogData$getCatal.isPartlistExclusive);
|
|
46310
46393
|
if (!orderline.IsPartlistArticle && (!isPartlistExclusive || !orderline.RelatedToBasketID)) {
|
|
46311
46394
|
variantValues = catalogData.repairVariantValues(orderline.getVariantValues(set.CatalogData.isIDMFormat), orderline.ArticleCodex);
|
|
46312
46395
|
toLoadArticles.push({
|
|
@@ -48792,7 +48875,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
48792
48875
|
return _context32.abrupt("return", _objectSpread$h(_objectSpread$h(_objectSpread$h({
|
|
48793
48876
|
isRenderedNotInSettingPalette: set.configTree.isRenderedNotInSettingPalette(configStepKey),
|
|
48794
48877
|
isRenderedInAccessorieStep: set.configTree.isRenderedInAccessorieStep(configStepKey),
|
|
48795
|
-
visible: set.configTree.getVisibility(configStepKey, visible, set
|
|
48878
|
+
visible: set.configTree.getVisibility(configStepKey, visible, set)
|
|
48796
48879
|
}, configItems), {}, {
|
|
48797
48880
|
paletteType: paletteType,
|
|
48798
48881
|
filterType: filterType,
|
|
@@ -48863,7 +48946,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
48863
48946
|
}
|
|
48864
48947
|
return _context33.abrupt("return", configItems);
|
|
48865
48948
|
case 2:
|
|
48866
|
-
opt = set.
|
|
48949
|
+
opt = set.getCatalogOption((_configItems$0$option = configItems[0].optionOcd) !== null && _configItems$0$option !== void 0 ? _configItems$0$option : configItems[0].op, set.configTree.getTargetArticles(configStepKey)[0]);
|
|
48867
48950
|
previewType = set.api.pricePreview;
|
|
48868
48951
|
if (!(!opt || opt.mergeIDMToOPG || configItems[0].isOPVG || opt.showOnSeparatTabgroup || set.PlannerMode === 'BoxPlanner' || ['TEXTBOX', 'NUMBERBOX', 'RANGE'].includes(paletteType) || (_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.includes('PRODUCTCREATOR'))) {
|
|
48869
48952
|
_context33.next = 6;
|
|
@@ -48934,7 +49017,8 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
48934
49017
|
case 9:
|
|
48935
49018
|
articleConfigs[_basketId3] = {
|
|
48936
49019
|
config: articles[_basketId3].VisibleVariantValues,
|
|
48937
|
-
articleCodex: articles[_basketId3].articleCodex
|
|
49020
|
+
articleCodex: articles[_basketId3].articleCodex,
|
|
49021
|
+
conflictingOptions: articles[_basketId3].conflictingOptionCodices
|
|
48938
49022
|
};
|
|
48939
49023
|
case 10:
|
|
48940
49024
|
i++;
|
|
@@ -48991,7 +49075,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
48991
49075
|
key: "getVariant",
|
|
48992
49076
|
value: function () {
|
|
48993
49077
|
var _getVariant = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee33(set, item, origConfigs, totalConfig, targetArticles, option, origPrice, index, previousPromise) {
|
|
48994
|
-
var firstPrice, prevProm, startTime, doUseConfigs, hashVariantValues, variantValues, i, _basketId4, origConfig, key, hash, dataHash, _i9, reversingCheck, ret, endTime, calcTime, price, priceObj;
|
|
49078
|
+
var firstPrice, prevProm, startTime, doUseConfigs, hashVariantValues, variantValues, i, _basketId4, origConfig, key, _origConfigs$_basketI, hash, dataHash, variantBasketIds, _i9, reversingCheck, ret, endTime, calcTime, price, priceObj;
|
|
48995
49079
|
return _regeneratorRuntime__default["default"].wrap(function _callee33$(_context35) {
|
|
48996
49080
|
while (1) switch (_context35.prev = _context35.next) {
|
|
48997
49081
|
case 0:
|
|
@@ -49032,7 +49116,8 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
49032
49116
|
for (key in origConfig) {
|
|
49033
49117
|
if (key == item.op || key == item.idmOpgOptionCodex) {
|
|
49034
49118
|
doUseConfigs = true;
|
|
49035
|
-
} else if (doUseConfigs) {
|
|
49119
|
+
} else if (doUseConfigs && !((_origConfigs$_basketI = origConfigs[_basketId4].conflictingOptions) !== null && _origConfigs$_basketI !== void 0 && _origConfigs$_basketI.has(key))) {
|
|
49120
|
+
// A value the partlist children disagree on would overwrite the other children, a real click keeps them.
|
|
49036
49121
|
variantValues[i][key] = origConfig[key];
|
|
49037
49122
|
}
|
|
49038
49123
|
hashVariantValues[i][key] = origConfig[key];
|
|
@@ -49055,34 +49140,36 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
49055
49140
|
firstPrice: firstPrice
|
|
49056
49141
|
}));
|
|
49057
49142
|
case 24:
|
|
49143
|
+
// variantValues follow origConfigs, which skips target articles the set no longer holds
|
|
49144
|
+
variantBasketIds = Object.keys(origConfigs);
|
|
49058
49145
|
_i9 = 0;
|
|
49059
|
-
case
|
|
49146
|
+
case 26:
|
|
49060
49147
|
if (!(_i9 < variantValues.length)) {
|
|
49061
|
-
_context35.next =
|
|
49148
|
+
_context35.next = 32;
|
|
49062
49149
|
break;
|
|
49063
49150
|
}
|
|
49064
|
-
_context35.next =
|
|
49065
|
-
return this.updateArticlesOptionStatesOfActSet(set, variantValues[_i9], [
|
|
49066
|
-
case
|
|
49151
|
+
_context35.next = 29;
|
|
49152
|
+
return this.updateArticlesOptionStatesOfActSet(set, variantValues[_i9], [variantBasketIds[_i9]], true, 'calcVariant');
|
|
49153
|
+
case 29:
|
|
49067
49154
|
_i9++;
|
|
49068
|
-
_context35.next =
|
|
49155
|
+
_context35.next = 26;
|
|
49069
49156
|
break;
|
|
49070
|
-
case
|
|
49157
|
+
case 32:
|
|
49071
49158
|
reversingCheck = undefined;
|
|
49072
49159
|
if (!option.checkForReversed) {
|
|
49073
|
-
_context35.next =
|
|
49160
|
+
_context35.next = 38;
|
|
49074
49161
|
break;
|
|
49075
49162
|
}
|
|
49076
|
-
_context35.next =
|
|
49163
|
+
_context35.next = 36;
|
|
49077
49164
|
return this.checkForReversingChanges(set, origConfigs, option, option.checkForReversed.checkOnlyForOptions);
|
|
49078
|
-
case
|
|
49165
|
+
case 36:
|
|
49079
49166
|
ret = _context35.sent;
|
|
49080
49167
|
reversingCheck = {
|
|
49081
49168
|
checkingForReversingChanges: option.checkForReversed.checkForReversingChanges,
|
|
49082
49169
|
hasReversingChanges: ret.hasReversingChanges,
|
|
49083
49170
|
reversingVariantValues: ret.reversingVariantValues
|
|
49084
49171
|
};
|
|
49085
|
-
case
|
|
49172
|
+
case 38:
|
|
49086
49173
|
endTime = new Date();
|
|
49087
49174
|
calcTime = endTime.getTime() - startTime.getTime();
|
|
49088
49175
|
LOG$b.debug('calcingVariant Time from Option:' + option.codex + ' and index: ' + index + ' time is: ' + calcTime + 'ms' + targetArticles.join(';'), [].concat(hashVariantValues, _toConsumableArray__default["default"](Object.values(totalConfig))));
|
|
@@ -49101,7 +49188,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
49101
49188
|
};
|
|
49102
49189
|
set.CatalogData.setVariantsPriceByHash(hash, priceObj);
|
|
49103
49190
|
return _context35.abrupt("return", priceObj);
|
|
49104
|
-
case
|
|
49191
|
+
case 45:
|
|
49105
49192
|
case "end":
|
|
49106
49193
|
return _context35.stop();
|
|
49107
49194
|
}
|
|
@@ -52006,7 +52093,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
52006
52093
|
break;
|
|
52007
52094
|
case 3:
|
|
52008
52095
|
_context13.next = 5;
|
|
52009
|
-
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-
|
|
52096
|
+
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-6dbfcff4.js'); });
|
|
52010
52097
|
case 5:
|
|
52011
52098
|
_yield$import = _context13.sent;
|
|
52012
52099
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -52014,7 +52101,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
52014
52101
|
return _context13.abrupt("break", 27);
|
|
52015
52102
|
case 9:
|
|
52016
52103
|
_context13.next = 11;
|
|
52017
|
-
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-
|
|
52104
|
+
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-ab4ce5c7.js'); });
|
|
52018
52105
|
case 11:
|
|
52019
52106
|
_yield$import2 = _context13.sent;
|
|
52020
52107
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -52022,7 +52109,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
52022
52109
|
return _context13.abrupt("break", 27);
|
|
52023
52110
|
case 15:
|
|
52024
52111
|
_context13.next = 17;
|
|
52025
|
-
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-
|
|
52112
|
+
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-b4461030.js'); });
|
|
52026
52113
|
case 17:
|
|
52027
52114
|
_yield$import3 = _context13.sent;
|
|
52028
52115
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -52030,7 +52117,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
52030
52117
|
return _context13.abrupt("break", 27);
|
|
52031
52118
|
case 21:
|
|
52032
52119
|
_context13.next = 23;
|
|
52033
|
-
return Promise.resolve().then(function () { return require('./StandardWWSHandler-
|
|
52120
|
+
return Promise.resolve().then(function () { return require('./StandardWWSHandler-612f003d.js'); });
|
|
52034
52121
|
case 23:
|
|
52035
52122
|
_yield$import4 = _context13.sent;
|
|
52036
52123
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -53434,7 +53521,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
53434
53521
|
//If we need real time rendering initialize the SignalR and 3D host connection Handler
|
|
53435
53522
|
bootMark('signalr: chunk import start');
|
|
53436
53523
|
_context3.next = 3;
|
|
53437
|
-
return Promise.resolve().then(function () { return require('./Host3DSignalR-
|
|
53524
|
+
return Promise.resolve().then(function () { return require('./Host3DSignalR-c5052424.js'); });
|
|
53438
53525
|
case 3:
|
|
53439
53526
|
_yield$import = _context3.sent;
|
|
53440
53527
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -57881,7 +57968,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
57881
57968
|
break;
|
|
57882
57969
|
case 9:
|
|
57883
57970
|
_context5.next = 11;
|
|
57884
|
-
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-
|
|
57971
|
+
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-90493d1b.js'); });
|
|
57885
57972
|
case 11:
|
|
57886
57973
|
_yield$import = _context5.sent;
|
|
57887
57974
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -57896,7 +57983,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
57896
57983
|
return _context5.abrupt("break", 22);
|
|
57897
57984
|
case 16:
|
|
57898
57985
|
_context5.next = 18;
|
|
57899
|
-
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-
|
|
57986
|
+
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-93e40ff6.js'); });
|
|
57900
57987
|
case 18:
|
|
57901
57988
|
_yield$import2 = _context5.sent;
|
|
57902
57989
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -59659,6 +59746,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
59659
59746
|
_defineProperty__default["default"](this, "plannerConfig", void 0);
|
|
59660
59747
|
_defineProperty__default["default"](this, "lastInitError", void 0);
|
|
59661
59748
|
_defineProperty__default["default"](this, "actions", void 0);
|
|
59749
|
+
/** The actions of whoever created this instance; it reports through them whenever no view has adopted it. */
|
|
59750
|
+
_defineProperty__default["default"](this, "ownActions", void 0);
|
|
59662
59751
|
_defineProperty__default["default"](this, "handler", void 0);
|
|
59663
59752
|
_defineProperty__default["default"](this, "state", void 0);
|
|
59664
59753
|
_defineProperty__default["default"](this, "_doLoadHQR", void 0);
|
|
@@ -60528,7 +60617,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
60528
60617
|
_context18.next = 24;
|
|
60529
60618
|
return _this.fillBaksetforOnWebPlanerConfigChange(myValues, undefined, eventKey);
|
|
60530
60619
|
case 24:
|
|
60531
|
-
_this.configuratorChangeLog('onConfigurationChange', myValues, false, !!isUserAction);
|
|
60620
|
+
_this.configuratorChangeLog('onConfigurationChange', myValues, false, !!isUserAction, targetArticles);
|
|
60532
60621
|
case 25:
|
|
60533
60622
|
case "end":
|
|
60534
60623
|
return _context18.stop();
|
|
@@ -60640,6 +60729,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
60640
60729
|
});
|
|
60641
60730
|
this.plannerConfig = Object.assign(plannerConfig, {});
|
|
60642
60731
|
this.actions = plannerConfig.actions;
|
|
60732
|
+
this.ownActions = plannerConfig.actions;
|
|
60643
60733
|
this.state = plannerConfig.state;
|
|
60644
60734
|
this.handler = plannerConfig.handler;
|
|
60645
60735
|
if (typeof window !== 'undefined') window.webPlanner = this;
|
|
@@ -63288,18 +63378,38 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
63288
63378
|
}()
|
|
63289
63379
|
/*********************************END Functions in Logik called From View END *************************************/
|
|
63290
63380
|
/*********************************** View attachment (Logik -> View) ***************************************/
|
|
63291
|
-
/**
|
|
63381
|
+
/**
|
|
63382
|
+
* Attach the view (initial mount or adoption of an existing, possibly headless instance). With `actions`, the
|
|
63383
|
+
* instance reports through the view's host actions (modals, loading, events) until the view detaches.
|
|
63384
|
+
*/
|
|
63292
63385
|
}, {
|
|
63293
63386
|
key: "attachView",
|
|
63294
|
-
value: function attachView(view) {
|
|
63387
|
+
value: function attachView(view, actions) {
|
|
63295
63388
|
this.view = view;
|
|
63389
|
+
if (actions) this.reportTo(actions);
|
|
63296
63390
|
}
|
|
63297
63391
|
|
|
63298
|
-
/** Detach the view; the instance keeps working headless and can be re-attached later. */
|
|
63392
|
+
/** Detach the view; the instance keeps working headless on its creator's actions and can be re-attached later. */
|
|
63299
63393
|
}, {
|
|
63300
63394
|
key: "detachView",
|
|
63301
63395
|
value: function detachView() {
|
|
63302
63396
|
this.view = undefined;
|
|
63397
|
+
// a destroyed instance gets no actions back
|
|
63398
|
+
if (!this._isDestroyed) this.reportTo(this.ownActions);
|
|
63399
|
+
}
|
|
63400
|
+
|
|
63401
|
+
/** Every holder of the host actions: this planner, its config (the basket handler shares it), the API handler and each set. */
|
|
63402
|
+
}, {
|
|
63403
|
+
key: "reportTo",
|
|
63404
|
+
value: function reportTo(actions) {
|
|
63405
|
+
var _this$api4;
|
|
63406
|
+
this.actions = actions;
|
|
63407
|
+
this.plannerConfig.actions = actions;
|
|
63408
|
+
(_this$api4 = this.api) === null || _this$api4 === void 0 || _this$api4.setActions(actions);
|
|
63409
|
+
for (var _i = 0, _Object$values = Object.values(this.sets); _i < _Object$values.length; _i++) {
|
|
63410
|
+
var set = _Object$values[_i];
|
|
63411
|
+
set.actions = actions;
|
|
63412
|
+
}
|
|
63303
63413
|
}
|
|
63304
63414
|
|
|
63305
63415
|
/** See {@link DivaPlannerHandler.strictArtifactGeneration}. Auto-propagates. */
|
|
@@ -63716,8 +63826,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
63716
63826
|
var actualBasketvalue = 0;
|
|
63717
63827
|
if (set) {
|
|
63718
63828
|
actualBasketvalue = set === null || set === void 0 ? void 0 : set.getSetPrice();
|
|
63719
|
-
for (var
|
|
63720
|
-
var article = _Object$
|
|
63829
|
+
for (var _i2 = 0, _Object$values2 = Object.values(set.getDivaArticles()); _i2 < _Object$values2.length; _i2++) {
|
|
63830
|
+
var article = _Object$values2[_i2];
|
|
63721
63831
|
if (article.relatedToBasketId) {
|
|
63722
63832
|
var toAdd = {
|
|
63723
63833
|
codex: article.configArticleCodex,
|
|
@@ -63763,6 +63873,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
63763
63873
|
value: function configuratorChangeLog(action, myValues) {
|
|
63764
63874
|
var isInit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
63765
63875
|
var isUserAction = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
63876
|
+
var targetArticles = arguments.length > 4 ? arguments[4] : undefined;
|
|
63766
63877
|
var set = this.actSet();
|
|
63767
63878
|
var actualBasketvalue = 0;
|
|
63768
63879
|
//handle Price
|
|
@@ -63773,15 +63884,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
63773
63884
|
//handle user selected
|
|
63774
63885
|
var explicitlySetConfiguration = undefined;
|
|
63775
63886
|
if (myValues && set) {
|
|
63776
|
-
var _set$
|
|
63887
|
+
var _set$getCatalogOption;
|
|
63888
|
+
var optCodex = Object.keys(myValues)[0];
|
|
63889
|
+
var opvCodex = Object.values(myValues)[0];
|
|
63890
|
+
var opvObject = set.getCatalogOptionValue(opvCodex, targetArticles === null || targetArticles === void 0 ? void 0 : targetArticles[0]);
|
|
63777
63891
|
explicitlySetConfiguration = {
|
|
63778
|
-
optCodex:
|
|
63779
|
-
optName: (set === null ||
|
|
63780
|
-
opvCodex:
|
|
63781
|
-
opvName: (
|
|
63892
|
+
optCodex: optCodex,
|
|
63893
|
+
optName: ((_set$getCatalogOption = set.getCatalogOption(optCodex, targetArticles === null || targetArticles === void 0 ? void 0 : targetArticles[0])) === null || _set$getCatalogOption === void 0 ? void 0 : _set$getCatalogOption.name) || '',
|
|
63894
|
+
opvCodex: opvCodex,
|
|
63895
|
+
opvName: (opvObject === null || opvObject === void 0 ? void 0 : opvObject.name) || '',
|
|
63782
63896
|
stage: 'USER_CHANGE'
|
|
63783
63897
|
};
|
|
63784
|
-
var latestColor = (
|
|
63898
|
+
var latestColor = (opvObject === null || opvObject === void 0 ? void 0 : opvObject.colorGroups) || [];
|
|
63785
63899
|
if (latestColor.length > 0) {
|
|
63786
63900
|
explicitlySetConfiguration.optClassification = 'COLOR';
|
|
63787
63901
|
explicitlySetConfiguration.opvClassification = latestColor;
|
|
@@ -63791,25 +63905,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
63791
63905
|
//handle final configuration
|
|
63792
63906
|
var finalConfiguration = [];
|
|
63793
63907
|
if (set) {
|
|
63794
|
-
for (var
|
|
63795
|
-
var article = _Object$
|
|
63908
|
+
for (var _i3 = 0, _Object$values3 = Object.values(set.getDivaArticles()); _i3 < _Object$values3.length; _i3++) {
|
|
63909
|
+
var article = _Object$values3[_i3];
|
|
63796
63910
|
var variantValues = article.AllVariantValues;
|
|
63797
|
-
for (var
|
|
63798
|
-
var _set$
|
|
63799
|
-
var _Object$entries$_i = _slicedToArray__default["default"](_Object$entries[
|
|
63911
|
+
for (var _i4 = 0, _Object$entries = Object.entries(variantValues); _i4 < _Object$entries.length; _i4++) {
|
|
63912
|
+
var _set$getCatalogOption2;
|
|
63913
|
+
var _Object$entries$_i = _slicedToArray__default["default"](_Object$entries[_i4], 2),
|
|
63800
63914
|
opt = _Object$entries$_i[0],
|
|
63801
63915
|
opv = _Object$entries$_i[1];
|
|
63802
|
-
|
|
63916
|
+
var _opvObject = set.getCatalogOptionValue(opv, article.basketId);
|
|
63917
|
+
if (!(_opvObject !== null && _opvObject !== void 0 && _opvObject.name)) {
|
|
63803
63918
|
continue;
|
|
63804
63919
|
}
|
|
63805
63920
|
var finalConfigurationItem = {
|
|
63806
63921
|
optCodex: opt,
|
|
63807
|
-
optName: ((_set$
|
|
63922
|
+
optName: ((_set$getCatalogOption2 = set.getCatalogOption(opt, article.basketId)) === null || _set$getCatalogOption2 === void 0 ? void 0 : _set$getCatalogOption2.name) || '',
|
|
63808
63923
|
opvCodex: opv,
|
|
63809
|
-
opvName:
|
|
63924
|
+
opvName: _opvObject.name,
|
|
63810
63925
|
stage: action == 'onConfigurationChange' ? 'FINAL' : 'INITIAL'
|
|
63811
63926
|
};
|
|
63812
|
-
var color =
|
|
63927
|
+
var color = _opvObject.colorGroups || [];
|
|
63813
63928
|
if (color.length > 0) {
|
|
63814
63929
|
finalConfigurationItem.optClassification = 'COLOR';
|
|
63815
63930
|
finalConfigurationItem.opvClassification = color;
|
|
@@ -83963,6 +84078,7 @@ exports.keepInsideRoom = keepInsideRoom;
|
|
|
83963
84078
|
exports.layersCollide = layersCollide;
|
|
83964
84079
|
exports.loadAndRepairBasket = loadAndRepairBasket;
|
|
83965
84080
|
exports.loadElementPartStepValues = loadElementPartStepValues;
|
|
84081
|
+
exports.measureUnitSymbol = measureUnitSymbol;
|
|
83966
84082
|
exports.measureWithUnit = measureWithUnit;
|
|
83967
84083
|
exports.moveGroupRigidly = moveGroupRigidly;
|
|
83968
84084
|
exports.movePoints = movePoints;
|