@crystaldesign/web-planner-logic 26.5.0-beta.48 → 26.5.0-beta.49
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-176808cf.js → DivaBoxPlanner-a83ddf2d.js} +95 -47
- package/build/cjs/{DivaStandardPlanner-f6aa5074.js → DivaStandardPlanner-6839d35f.js} +2 -2
- package/build/cjs/{DoorPlanner-062bb372.js → DoorPlanner-d9d820b2.js} +1 -1
- package/build/cjs/{Host3DSignalR-96aeeba6.js → Host3DSignalR-7a424c6f.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-c8131605.js → LiviqueWWSHandler-1b4c240f.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-e129a977.js → PfisterWWSHandler-bf4b2af0.js} +1 -1
- package/build/cjs/{PlannerHandler2D-b7afe8f4.js → PlannerHandler2D-4ef7a85f.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-1e030846.js → SeriousBasketHandler-e4e0835e.js} +1 -1
- package/build/cjs/{ShelfPlanner-c53230d3.js → ShelfPlanner-c4449795.js} +1 -1
- package/build/cjs/{StandardWWSHandler-cfe94d8b.js → StandardWWSHandler-7d3feb60.js} +1 -1
- package/build/cjs/{index-c30cb6cd.js → index-9145fe80.js} +120 -156
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-7417fb22.js → DivaBoxPlanner-34141af8.js} +95 -47
- package/build/esm/{DivaStandardPlanner-25408326.js → DivaStandardPlanner-9e6ffa11.js} +2 -2
- package/build/esm/{DoorPlanner-4acb508b.js → DoorPlanner-ad6344a7.js} +1 -1
- package/build/esm/{Host3DSignalR-0515c7b6.js → Host3DSignalR-baf9963c.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-c907d17d.js → LiviqueWWSHandler-56c4d1d2.js} +1 -1
- package/build/esm/{PfisterWWSHandler-c3120b8c.js → PfisterWWSHandler-d0109020.js} +1 -1
- package/build/esm/{PlannerHandler2D-a2636f6e.js → PlannerHandler2D-ebe62b9b.js} +1 -1
- package/build/esm/{SeriousBasketHandler-2cbd6a97.js → SeriousBasketHandler-29af6f6d.js} +1 -1
- package/build/esm/{ShelfPlanner-7805b794.js → ShelfPlanner-7f73ac20.js} +1 -1
- package/build/esm/{StandardWWSHandler-6dcf278c.js → StandardWWSHandler-553bf27b.js} +1 -1
- package/build/esm/{index-c160e407.js → index-66df82ca.js} +120 -156
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/interface/API/Checkout.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/API/Checkout.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +3 -1
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.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/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/BoxPlannerGrid.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -23226,6 +23226,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23226
23226
|
_classCallCheck(this, DivaEngine);
|
|
23227
23227
|
_defineProperty(this, "article", void 0);
|
|
23228
23228
|
_defineProperty(this, "decisionDebugStack", []);
|
|
23229
|
+
_defineProperty(this, "catalogDecisionsByNumber", void 0);
|
|
23229
23230
|
this.article = article;
|
|
23230
23231
|
}
|
|
23231
23232
|
return _createClass(DivaEngine, [{
|
|
@@ -23709,11 +23710,13 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23709
23710
|
key: "evalAllDecisions",
|
|
23710
23711
|
value: function evalAllDecisions() {
|
|
23711
23712
|
var myDecisions = this.article.catalogArticle.articleReferencedDecisions;
|
|
23712
|
-
|
|
23713
|
-
|
|
23714
|
-
|
|
23713
|
+
var writeIdx = 0;
|
|
23714
|
+
for (var i = 0; i < myDecisions.length; i++) {
|
|
23715
|
+
if (!myDecisions[i].addedViaDisableEnableRef) {
|
|
23716
|
+
myDecisions[writeIdx++] = myDecisions[i];
|
|
23715
23717
|
}
|
|
23716
23718
|
}
|
|
23719
|
+
myDecisions.length = writeIdx;
|
|
23717
23720
|
//add the partlist spesific decisions to the normal decisions
|
|
23718
23721
|
if (this.article.initDecisions) {
|
|
23719
23722
|
var sortedInitDecisions = _toConsumableArray(this.article.initDecisions).sort(function (a, b) {
|
|
@@ -23741,6 +23744,9 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23741
23744
|
} finally {
|
|
23742
23745
|
_iterator7.f();
|
|
23743
23746
|
}
|
|
23747
|
+
this.catalogDecisionsByNumber = new Map(this.article.catalogArticle.articleDecisions.map(function (d) {
|
|
23748
|
+
return [d.Number, d];
|
|
23749
|
+
}));
|
|
23744
23750
|
this.decisionDebugStack = [];
|
|
23745
23751
|
var beforeSnapshot = this.article.set.logDecisions ? this.article.snapshot : undefined;
|
|
23746
23752
|
for (var m = 0; m < myDecisions.length; m++) {
|
|
@@ -23953,10 +23959,10 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23953
23959
|
case 'SET_FEATURE_DEFAULT_NULL':
|
|
23954
23960
|
break;
|
|
23955
23961
|
case 'DISABLE_DECISION':
|
|
23956
|
-
this.disableDecision(myDecision,
|
|
23962
|
+
this.disableDecision(myDecision, myDA.DecisionNr, myDecisions);
|
|
23957
23963
|
break;
|
|
23958
23964
|
case 'ENABLE_DECISION':
|
|
23959
|
-
this.enableDecision(myDecision,
|
|
23965
|
+
this.enableDecision(myDecision, myDA.DecisionNr, myDecisions);
|
|
23960
23966
|
break;
|
|
23961
23967
|
default:
|
|
23962
23968
|
LOG$g.error(new DivaError('Action type not supported in DecisionOptionCombination', {
|
|
@@ -24016,114 +24022,63 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24016
24022
|
}
|
|
24017
24023
|
}, {
|
|
24018
24024
|
key: "disableDecision",
|
|
24019
|
-
value: function disableDecision(myDecision,
|
|
24020
|
-
|
|
24021
|
-
if (myDecision.activeCombination == -1) return;
|
|
24022
|
-
var SearchDecNumber = [];
|
|
24023
|
-
if (myDoc.DA) for (var m = 0; m < myDoc.DA.length; m++) {
|
|
24024
|
-
var decisionAction = myDoc.DA[m];
|
|
24025
|
-
if (decisionAction.Type == 'DISABLE_DECISION') {
|
|
24026
|
-
SearchDecNumber.push(Number(decisionAction.DecisionNr));
|
|
24027
|
-
}
|
|
24028
|
-
}
|
|
24029
|
-
SearchDecNumber.map(function (d) {
|
|
24030
|
-
return myDecisions.find(function (de) {
|
|
24031
|
-
return de.Number == d.toString();
|
|
24032
|
-
});
|
|
24033
|
-
}).map(function (d, index) {
|
|
24034
|
-
var _d$disableHistory;
|
|
24035
|
-
var decisionNumber = SearchDecNumber[index];
|
|
24036
|
-
if (!d) {
|
|
24037
|
-
var decision = _this2.article.catalogArticle.articleDecisions.find(function (d) {
|
|
24038
|
-
return d.Number == decisionNumber.toString();
|
|
24039
|
-
});
|
|
24040
|
-
if (!decision) {
|
|
24041
|
-
LOG$g.warn('Decision ' + decisionNumber + ' that is referenced in disable decision ' + myDecision.Number + ' not found.');
|
|
24042
|
-
return;
|
|
24043
|
-
}
|
|
24044
|
-
var insertIndex = 0;
|
|
24045
|
-
var prios = myDecisions.map(function (d) {
|
|
24046
|
-
return d.Prio;
|
|
24047
|
-
});
|
|
24048
|
-
if (decision.Prio <= myDecision.Prio) LOG$g.warn('Decision ' + decisionNumber + ' that is referenced in enable decision ' + myDecision.Number + ' has a lower prio than the enable decision.');
|
|
24049
|
-
for (var i = 0; i < prios.length; i++) {
|
|
24050
|
-
if (Number(prios[i]) >= Number(decision.Prio)) {
|
|
24051
|
-
insertIndex = i;
|
|
24052
|
-
break;
|
|
24053
|
-
}
|
|
24054
|
-
}
|
|
24055
|
-
myDecisions.splice(insertIndex, 0, _objectSpread$h(_objectSpread$h({}, decision), {}, {
|
|
24056
|
-
enabled: false,
|
|
24057
|
-
disableHistory: ['referenced and disabled By ' + myDecision.Number],
|
|
24058
|
-
addedViaDisableEnableRef: true
|
|
24059
|
-
}));
|
|
24060
|
-
return;
|
|
24061
|
-
}
|
|
24062
|
-
d.enabled = false;
|
|
24063
|
-
(_d$disableHistory = d.disableHistory) === null || _d$disableHistory === void 0 || _d$disableHistory.push('disabled By ' + myDecision.Number);
|
|
24064
|
-
});
|
|
24025
|
+
value: function disableDecision(myDecision, targetDecisionNr, myDecisions) {
|
|
24026
|
+
this.toggleDecisionEnabled(myDecision, targetDecisionNr, myDecisions, false);
|
|
24065
24027
|
}
|
|
24066
24028
|
}, {
|
|
24067
24029
|
key: "enableDecision",
|
|
24068
|
-
value: function enableDecision(myDecision,
|
|
24069
|
-
|
|
24030
|
+
value: function enableDecision(myDecision, targetDecisionNr, myDecisions) {
|
|
24031
|
+
this.toggleDecisionEnabled(myDecision, targetDecisionNr, myDecisions, true);
|
|
24032
|
+
}
|
|
24033
|
+
}, {
|
|
24034
|
+
key: "toggleDecisionEnabled",
|
|
24035
|
+
value: function toggleDecisionEnabled(myDecision, targetDecisionNr, myDecisions, enabled) {
|
|
24036
|
+
var _this$catalogDecision, _this$catalogDecision2;
|
|
24070
24037
|
if (myDecision.activeCombination == -1) return;
|
|
24071
|
-
var
|
|
24072
|
-
|
|
24073
|
-
|
|
24074
|
-
|
|
24075
|
-
|
|
24076
|
-
|
|
24077
|
-
|
|
24078
|
-
|
|
24038
|
+
var verb = enabled ? 'enabled' : 'disabled';
|
|
24039
|
+
var existing = myDecisions.find(function (d) {
|
|
24040
|
+
return d.Number == targetDecisionNr;
|
|
24041
|
+
});
|
|
24042
|
+
if (existing) {
|
|
24043
|
+
var _existing$disableHist;
|
|
24044
|
+
existing.enabled = enabled;
|
|
24045
|
+
(_existing$disableHist = existing.disableHistory) === null || _existing$disableHist === void 0 || _existing$disableHist.push("".concat(verb, " By ").concat(myDecision.Number));
|
|
24046
|
+
return;
|
|
24079
24047
|
}
|
|
24080
|
-
|
|
24081
|
-
return
|
|
24082
|
-
return de.Number == d.toString();
|
|
24083
|
-
});
|
|
24084
|
-
}).map(function (d, index) {
|
|
24085
|
-
var _d$disableHistory2;
|
|
24086
|
-
var decisionNumber = SearchDecNumber[index];
|
|
24087
|
-
if (!d) {
|
|
24088
|
-
var decision = _this3.article.catalogArticle.articleDecisions.find(function (d) {
|
|
24089
|
-
return d.Number == decisionNumber.toString();
|
|
24090
|
-
});
|
|
24091
|
-
if (!decision) {
|
|
24092
|
-
LOG$g.warn('Decision ' + decisionNumber + ' that is referenced in enable decision ' + myDecision.Number + ' not found.');
|
|
24093
|
-
return;
|
|
24094
|
-
}
|
|
24095
|
-
var insertIndex = 0;
|
|
24096
|
-
var prios = myDecisions.map(function (d) {
|
|
24097
|
-
return d.Prio;
|
|
24098
|
-
});
|
|
24099
|
-
if (decision.Prio <= myDecision.Prio) LOG$g.warn('Decision ' + decisionNumber + ' that is referenced in enable decision ' + myDecision.Number + ' has a lower prio than the enable decision.');
|
|
24100
|
-
for (var i = 0; i < prios.length; i++) {
|
|
24101
|
-
if (Number(prios[i]) >= Number(decision.Prio)) {
|
|
24102
|
-
insertIndex = i;
|
|
24103
|
-
break;
|
|
24104
|
-
}
|
|
24105
|
-
}
|
|
24106
|
-
myDecisions.splice(insertIndex, 0, _objectSpread$h(_objectSpread$h({}, decision), {}, {
|
|
24107
|
-
enabled: true,
|
|
24108
|
-
disableHistory: ['referenced and enabled By ' + myDecision.Number],
|
|
24109
|
-
addedViaDisableEnableRef: true
|
|
24110
|
-
}));
|
|
24111
|
-
return;
|
|
24112
|
-
}
|
|
24113
|
-
d.enabled = true;
|
|
24114
|
-
(_d$disableHistory2 = d.disableHistory) === null || _d$disableHistory2 === void 0 || _d$disableHistory2.push('enabled By ' + myDecision.Number);
|
|
24048
|
+
var decision = (_this$catalogDecision = (_this$catalogDecision2 = this.catalogDecisionsByNumber) === null || _this$catalogDecision2 === void 0 ? void 0 : _this$catalogDecision2.get(targetDecisionNr)) !== null && _this$catalogDecision !== void 0 ? _this$catalogDecision : this.article.catalogArticle.articleDecisions.find(function (d) {
|
|
24049
|
+
return d.Number == targetDecisionNr;
|
|
24115
24050
|
});
|
|
24051
|
+
if (!decision) {
|
|
24052
|
+
LOG$g.warn("Decision ".concat(targetDecisionNr, " that is referenced in ").concat(verb.replace('d', ''), " decision ").concat(myDecision.Number, " not found."));
|
|
24053
|
+
return;
|
|
24054
|
+
}
|
|
24055
|
+
var decisionPrio = Number(decision.Prio);
|
|
24056
|
+
if (decisionPrio <= Number(myDecision.Prio)) {
|
|
24057
|
+
LOG$g.warn("Decision ".concat(targetDecisionNr, " that is referenced in enable decision ").concat(myDecision.Number, " has a lower prio than the enable decision."));
|
|
24058
|
+
}
|
|
24059
|
+
var insertIndex = 0;
|
|
24060
|
+
for (var i = 0; i < myDecisions.length; i++) {
|
|
24061
|
+
if (Number(myDecisions[i].Prio) >= decisionPrio) {
|
|
24062
|
+
insertIndex = i;
|
|
24063
|
+
break;
|
|
24064
|
+
}
|
|
24065
|
+
}
|
|
24066
|
+
myDecisions.splice(insertIndex, 0, _objectSpread$h(_objectSpread$h({}, decision), {}, {
|
|
24067
|
+
enabled: enabled,
|
|
24068
|
+
disableHistory: ["referenced and ".concat(verb, " By ").concat(myDecision.Number)],
|
|
24069
|
+
addedViaDisableEnableRef: true
|
|
24070
|
+
}));
|
|
24116
24071
|
}
|
|
24117
24072
|
}, {
|
|
24118
24073
|
key: "evalType1Decision",
|
|
24119
24074
|
value: function evalType1Decision(myDecision) {
|
|
24120
|
-
var
|
|
24075
|
+
var _this2 = this;
|
|
24121
24076
|
var validOPVs = {};
|
|
24122
24077
|
var doAlsoCheckOPTs = [];
|
|
24123
24078
|
if (myDecision.Options && myDecision.DOC) {
|
|
24124
24079
|
var _loop2 = function _loop2() {
|
|
24125
24080
|
var OPT = myDecision.Options[p];
|
|
24126
|
-
var ops =
|
|
24081
|
+
var ops = _this2.article.getArticleOptionStateFlat(OPT);
|
|
24127
24082
|
if (!ops) return 1; // break
|
|
24128
24083
|
if (!validOPVs[OPT]) validOPVs[OPT] = new Map();
|
|
24129
24084
|
var possibleOPVs = new Map(ops.visibleOptionValues);
|
|
@@ -24134,7 +24089,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24134
24089
|
//wenn diese Row mehrere Optionen hat, dann müssen die bisher gesetzten schon übereinstimmen
|
|
24135
24090
|
|
|
24136
24091
|
var myDoc = myDecision.DOC[j];
|
|
24137
|
-
var doUseDoc =
|
|
24092
|
+
var doUseDoc = _this2.checkIfDocIsValid(myDoc, doAlsoCheckOPTs);
|
|
24138
24093
|
if (doUseDoc) {
|
|
24139
24094
|
var _myDoc$Row;
|
|
24140
24095
|
myDecision.activeCombination = j;
|
|
@@ -24212,10 +24167,10 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24212
24167
|
ops.updateVisibleOptionValues(new Map(schnittmenge));
|
|
24213
24168
|
var valCodex = ops.valCodex;
|
|
24214
24169
|
if ((!valCodex || !schnittmenge.get(valCodex)) && ops.visibleOPVKeys.length > 0) {
|
|
24215
|
-
if (
|
|
24216
|
-
|
|
24170
|
+
if (_this2.article.CatalogData.useDiomexConfigLogic) {
|
|
24171
|
+
_this2.clearOP(OPT, true);
|
|
24217
24172
|
} else {
|
|
24218
|
-
|
|
24173
|
+
_this2.updateArtOPV(_this2.article.getDefaultOpv(schnittmenge), OPT, ops, undefined);
|
|
24219
24174
|
}
|
|
24220
24175
|
}
|
|
24221
24176
|
doAlsoCheckOPTs.push(OPT);
|
|
@@ -24252,13 +24207,13 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24252
24207
|
}, {
|
|
24253
24208
|
key: "evalType0Decision",
|
|
24254
24209
|
value: function evalType0Decision(myDecision) {
|
|
24255
|
-
var
|
|
24210
|
+
var _this3 = this;
|
|
24256
24211
|
var invalidOPVs = {},
|
|
24257
24212
|
doAlsoCheckOPTs = [];
|
|
24258
24213
|
if (myDecision.Options && myDecision.Options.length > 1 && myDecision.DOC) {
|
|
24259
24214
|
var _loop3 = function _loop3() {
|
|
24260
24215
|
var OPT = myDecision.Options[p];
|
|
24261
|
-
var ops =
|
|
24216
|
+
var ops = _this3.article.getArticleOptionStateFlat(OPT);
|
|
24262
24217
|
if (!ops) return 1; // break
|
|
24263
24218
|
if (!invalidOPVs[OPT]) invalidOPVs[OPT] = new Map();
|
|
24264
24219
|
var possibleOPVs = ops.visibleOptionValues;
|
|
@@ -24275,7 +24230,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24275
24230
|
for (var f = 0; f < doAlsoCheckOPTs.length; f++) {
|
|
24276
24231
|
var _myDoc$Row3;
|
|
24277
24232
|
var checkOptX = doAlsoCheckOPTs[f];
|
|
24278
|
-
var _ops3 =
|
|
24233
|
+
var _ops3 = _this3.article.getArticleOptionState(checkOptX);
|
|
24279
24234
|
if (_ops3 && (_myDoc$Row3 = myDoc.Row) !== null && _myDoc$Row3 !== void 0 && _myDoc$Row3[checkOptX] && _ops3.valCodex && !myDoc.Row[checkOptX].includes(_ops3.valCodex)) {
|
|
24280
24235
|
doUseDoc = false;
|
|
24281
24236
|
break;
|
|
@@ -24303,10 +24258,10 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24303
24258
|
ops.updateVisibleOptionValues(schnittmenge);
|
|
24304
24259
|
var valCodex = ops.valCodex;
|
|
24305
24260
|
if ((!valCodex || !schnittmenge.get(valCodex)) && ops.visibleOPVKeys.length > 0) {
|
|
24306
|
-
if (
|
|
24307
|
-
|
|
24261
|
+
if (_this3.article.CatalogData.useDiomexConfigLogic) {
|
|
24262
|
+
_this3.clearOP(OPT, true);
|
|
24308
24263
|
} else {
|
|
24309
|
-
|
|
24264
|
+
_this3.updateArtOPV(_this3.article.getDefaultOpv(schnittmenge), OPT, ops, undefined);
|
|
24310
24265
|
}
|
|
24311
24266
|
}
|
|
24312
24267
|
} else if (p < myDecision.Options.length - 1) {
|
|
@@ -24634,7 +24589,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24634
24589
|
key: "addPartilstToPartlistArticlesToLoad",
|
|
24635
24590
|
value: function addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues, myDecisionVal, groupDecisionVal, decisionNumber, partlistGroupPrefix, loadReason) {
|
|
24636
24591
|
var _myPartListPos$Option,
|
|
24637
|
-
|
|
24592
|
+
_this4 = this;
|
|
24638
24593
|
var allDecisions = this.article.catalogArticle.articleDecisions;
|
|
24639
24594
|
var decisions = myPartListPos.PartListPosDecisionsAndPosCounts;
|
|
24640
24595
|
var optionsForPrint = (_myPartListPos$Option = myPartListPos.OptionsForPrint) === null || _myPartListPos$Option === void 0 ? void 0 : _myPartListPos$Option.split(';');
|
|
@@ -24645,9 +24600,9 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24645
24600
|
var articleCodex = myPartListPos.ItemRefArticles[d].ArticleCodex;
|
|
24646
24601
|
var catalogCodex = myPartListPos.ItemRefArticles[d].CatalogCodex;
|
|
24647
24602
|
var retailArticleNr = myPartListPos.RetailArticleNr && myPartListPos.RetailArticleNr != '' ? myPartListPos.RetailArticleNr : undefined;
|
|
24648
|
-
if (myDecisionVal && (myDecisionVal.Rule && myDecisionVal.Rule != '' &&
|
|
24649
|
-
myRuleDesc = DivaUtils.getRuleDescription(myDecisionVal.Rule,
|
|
24650
|
-
myRuleDesc_locales = DivaUtils.getRuleDescription_locales(myDecisionVal.Rule,
|
|
24603
|
+
if (myDecisionVal && (myDecisionVal.Rule && myDecisionVal.Rule != '' && _this4.article.CatalogData.doUseRuleDescForPartListArticles() || myPartListPos.RetailArticleNr == 'CUST')) {
|
|
24604
|
+
myRuleDesc = DivaUtils.getRuleDescription(myDecisionVal.Rule, _this4.article.articleOptionStates, _this4.article.set.api.ruleDescSeperator());
|
|
24605
|
+
myRuleDesc_locales = DivaUtils.getRuleDescription_locales(myDecisionVal.Rule, _this4.article.articleOptionStates, _this4.article.set.api.ruleDescSeperator());
|
|
24651
24606
|
}
|
|
24652
24607
|
var initDecisions = decisions.filter(function (decision) {
|
|
24653
24608
|
return decision.RelationType !== 'PosCount';
|
|
@@ -24657,7 +24612,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24657
24612
|
});
|
|
24658
24613
|
});
|
|
24659
24614
|
var quanitity = 1;
|
|
24660
|
-
if (
|
|
24615
|
+
if (_this4.article.CatalogData.useDecisionPosCountValue) {
|
|
24661
24616
|
var _decision$DOC;
|
|
24662
24617
|
// get SetPosCountValue from decsion action if defined and else use myPartListPos.PosCountValue;
|
|
24663
24618
|
var decision = decisionNumber ? allDecisions.find(function (d) {
|
|
@@ -24672,12 +24627,12 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24672
24627
|
return a.SetPosCountValue !== undefined;
|
|
24673
24628
|
})) === null || _decision$DOC === void 0 ? void 0 : _decision$DOC.SetPosCountValue;
|
|
24674
24629
|
quanitity = setPosCountValue !== undefined ? setPosCountValue : myPartListPos.PosCountValue;
|
|
24675
|
-
} else if (
|
|
24630
|
+
} else if (_this4.article.CatalogData.usePosCountValue) {
|
|
24676
24631
|
quanitity = myPartListPos.PosCountValue;
|
|
24677
24632
|
}
|
|
24678
|
-
quanitity = quanitity *
|
|
24679
|
-
var previousPartlistArticle =
|
|
24680
|
-
if (
|
|
24633
|
+
quanitity = quanitity * _this4.article.quantity;
|
|
24634
|
+
var previousPartlistArticle = _this4.article.getPreviousPartlistArticle(articleCodex);
|
|
24635
|
+
if (_this4.article.set.logDecisions) {
|
|
24681
24636
|
var base = {
|
|
24682
24637
|
articleCodex: articleCodex,
|
|
24683
24638
|
catalogCodex: catalogCodex,
|
|
@@ -24685,7 +24640,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24685
24640
|
sequenceNo: myPartListPos.SequenceNo
|
|
24686
24641
|
};
|
|
24687
24642
|
if (quanitity < 1) {
|
|
24688
|
-
|
|
24643
|
+
_this4.pushPartlistDebugEntry(base, {
|
|
24689
24644
|
loaded: false,
|
|
24690
24645
|
reason: 'Quantity < 1',
|
|
24691
24646
|
quantity: quanitity,
|
|
@@ -24693,7 +24648,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24693
24648
|
});
|
|
24694
24649
|
return 1; // continue
|
|
24695
24650
|
}
|
|
24696
|
-
|
|
24651
|
+
_this4.pushPartlistDebugEntry(base, {
|
|
24697
24652
|
loaded: true,
|
|
24698
24653
|
reason: loadReason !== null && loadReason !== void 0 ? loadReason : 'Loaded',
|
|
24699
24654
|
decisionNo: decisionNumber,
|
|
@@ -24716,13 +24671,13 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24716
24671
|
if (quanitity >= 1) {
|
|
24717
24672
|
var _myDecisionVal$Rule;
|
|
24718
24673
|
partlistArticlesToLoad.push({
|
|
24719
|
-
CatalogCodex: catalogCodex !== null && catalogCodex !== void 0 ? catalogCodex :
|
|
24674
|
+
CatalogCodex: catalogCodex !== null && catalogCodex !== void 0 ? catalogCodex : _this4.article.catalogCodex,
|
|
24720
24675
|
BasketID: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.basketId,
|
|
24721
24676
|
ArticleCodex: articleCodex,
|
|
24722
24677
|
RetailArticleNr: retailArticleNr,
|
|
24723
24678
|
RetailPrefix: myPartListPos.RetailPrefix,
|
|
24724
24679
|
Quantity: quanitity,
|
|
24725
|
-
PartlistRule: (groupDecisionVal ? groupDecisionVal.Rule + ' && ' : '') + myDecisionVal ? DivaUtils.getOptionValuePairsByRule((_myDecisionVal$Rule = myDecisionVal === null || myDecisionVal === void 0 ? void 0 : myDecisionVal.Rule) !== null && _myDecisionVal$Rule !== void 0 ? _myDecisionVal$Rule : '',
|
|
24680
|
+
PartlistRule: (groupDecisionVal ? groupDecisionVal.Rule + ' && ' : '') + myDecisionVal ? DivaUtils.getOptionValuePairsByRule((_myDecisionVal$Rule = myDecisionVal === null || myDecisionVal === void 0 ? void 0 : myDecisionVal.Rule) !== null && _myDecisionVal$Rule !== void 0 ? _myDecisionVal$Rule : '', _this4.article.VariantValues) : undefined,
|
|
24726
24681
|
partlistDecisionNo: decisionNumber,
|
|
24727
24682
|
SupplierOrderCodex: myPartListPos.SupplierOrderCodex,
|
|
24728
24683
|
initDecisions: initDecisionsFiltered,
|
|
@@ -24731,7 +24686,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24731
24686
|
RuleDesc_locales: myRuleDesc_locales,
|
|
24732
24687
|
PosInvisibility: myPartListPos.PosInvisibility,
|
|
24733
24688
|
ConfigurationMode: myPartListPos.ConfigurationMode,
|
|
24734
|
-
VariantValues:
|
|
24689
|
+
VariantValues: _this4.article.variantValuesForPla(myPartListPos.ConfigurationMode, previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantValues, newConfigValues),
|
|
24735
24690
|
VariantItemData: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantItemData,
|
|
24736
24691
|
optionImgForPrint: optionImgForPrint,
|
|
24737
24692
|
optionsForPrint: optionsForPrint,
|
|
@@ -24780,7 +24735,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24780
24735
|
}, {
|
|
24781
24736
|
key: "calcConfigPrice",
|
|
24782
24737
|
value: function calcConfigPrice(maxPriceOfGroupCodex, digits) {
|
|
24783
|
-
var
|
|
24738
|
+
var _this5 = this,
|
|
24784
24739
|
_this$article$catalog5;
|
|
24785
24740
|
//Wenn im Planer für dieses Shape mehere Rules gibt, müssen wir diese jetzt prüfen, ob jetzt ein anderes shape gültig ist.
|
|
24786
24741
|
//wenn ja, hier neues shape übergeben
|
|
@@ -24914,7 +24869,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24914
24869
|
if (!targetPPGPrefixes) continue;
|
|
24915
24870
|
var _loop7 = function _loop7() {
|
|
24916
24871
|
var targetPrefix = targetPPGPrefixes[_i8];
|
|
24917
|
-
var priceRef =
|
|
24872
|
+
var priceRef = _this5.article.priceRefs.find(function (item) {
|
|
24918
24873
|
var _item$PPG;
|
|
24919
24874
|
return ((_item$PPG = item.PPG) === null || _item$PPG === void 0 ? void 0 : _item$PPG.split('_')[0]) == targetPrefix;
|
|
24920
24875
|
});
|
|
@@ -24939,11 +24894,11 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24939
24894
|
var _loop6 = function _loop6() {
|
|
24940
24895
|
var targetPrefix = basePriceRef.TargetPPGPrefixes[_j];
|
|
24941
24896
|
var myArtOpv;
|
|
24942
|
-
var priceRef =
|
|
24897
|
+
var priceRef = _this5.article.priceRefs.find(function (item) {
|
|
24943
24898
|
return item.PPG && item.PPG.split('_')[0] == targetPrefix;
|
|
24944
24899
|
});
|
|
24945
24900
|
if (!priceRef) {
|
|
24946
|
-
var _iterator13 = _createForOfIteratorHelper$a(
|
|
24901
|
+
var _iterator13 = _createForOfIteratorHelper$a(_this5.article.articleOptionStates.values()),
|
|
24947
24902
|
_step13;
|
|
24948
24903
|
try {
|
|
24949
24904
|
for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
|
|
@@ -25187,7 +25142,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
25187
25142
|
value: function updateConfigDependentMedia() {
|
|
25188
25143
|
var _this$article$catalog6,
|
|
25189
25144
|
_this$article$catalog7,
|
|
25190
|
-
|
|
25145
|
+
_this6 = this;
|
|
25191
25146
|
var catalogData = this.article.CatalogData;
|
|
25192
25147
|
//articlebild berechnung
|
|
25193
25148
|
|
|
@@ -25314,7 +25269,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
25314
25269
|
var _plannerCatArt$topSvg;
|
|
25315
25270
|
var custom = {
|
|
25316
25271
|
formulas: (_plannerCatArt$topSvg = plannerCatArt.topSvgsWithFormula) === null || _plannerCatArt$topSvg === void 0 ? void 0 : _plannerCatArt$topSvg.map(function (item) {
|
|
25317
|
-
return DivaUtils.getRuleByFormula(item.JsFormula,
|
|
25272
|
+
return DivaUtils.getRuleByFormula(item.JsFormula, _this6.article.catalogCodex, catalogData.multiselectOptions);
|
|
25318
25273
|
}),
|
|
25319
25274
|
catalogName: catalogData.catalogName,
|
|
25320
25275
|
catalogCodex: this.article.catalogCodex,
|
|
@@ -29506,7 +29461,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
29506
29461
|
break;
|
|
29507
29462
|
}
|
|
29508
29463
|
_context.next = 4;
|
|
29509
|
-
return import('./ShelfPlanner-
|
|
29464
|
+
return import('./ShelfPlanner-7f73ac20.js');
|
|
29510
29465
|
case 4:
|
|
29511
29466
|
_yield$import = _context.sent;
|
|
29512
29467
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -33139,10 +33094,10 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
33139
33094
|
value: function getNewConfigStepKeyByBasketId(curConfigStepKey, basketId) {
|
|
33140
33095
|
var steps = this.getAllByKey(curConfigStepKey);
|
|
33141
33096
|
if (steps) {
|
|
33142
|
-
var
|
|
33143
|
-
return (
|
|
33097
|
+
var _Array$from$find;
|
|
33098
|
+
return (_Array$from$find = Array.from(steps.optionStep.configSteps.values()).find(function (step) {
|
|
33144
33099
|
return step.targetArticles.includes(basketId);
|
|
33145
|
-
})) === null ||
|
|
33100
|
+
})) === null || _Array$from$find === void 0 ? void 0 : _Array$from$find.key;
|
|
33146
33101
|
}
|
|
33147
33102
|
return undefined;
|
|
33148
33103
|
}
|
|
@@ -37445,7 +37400,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
37445
37400
|
break;
|
|
37446
37401
|
}
|
|
37447
37402
|
_context5.next = 3;
|
|
37448
|
-
return import('./DoorPlanner-
|
|
37403
|
+
return import('./DoorPlanner-ad6344a7.js');
|
|
37449
37404
|
case 3:
|
|
37450
37405
|
_yield$import = _context5.sent;
|
|
37451
37406
|
DoorPlanner = _yield$import["default"];
|
|
@@ -41477,6 +41432,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41477
41432
|
key: "initProductId",
|
|
41478
41433
|
value: function () {
|
|
41479
41434
|
var _initProductId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(api, productId) {
|
|
41435
|
+
var _this$plannerConfig$c4;
|
|
41480
41436
|
var result, successful;
|
|
41481
41437
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
41482
41438
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -41488,7 +41444,9 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41488
41444
|
this.assignNewDivaNr = true;
|
|
41489
41445
|
_context2.next = 6;
|
|
41490
41446
|
return this.initBasket(api, result.divaNr, {
|
|
41491
|
-
basket: result.configuration
|
|
41447
|
+
basket: _objectSpread$9(_objectSpread$9({}, result.configuration), {}, {
|
|
41448
|
+
OrganizationId: (_this$plannerConfig$c4 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c4 === void 0 ? void 0 : _this$plannerConfig$c4._id
|
|
41449
|
+
})
|
|
41492
41450
|
}, false, productId);
|
|
41493
41451
|
case 6:
|
|
41494
41452
|
successful = _context2.sent;
|
|
@@ -41706,7 +41664,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41706
41664
|
_context5.next = 36;
|
|
41707
41665
|
break;
|
|
41708
41666
|
case 44:
|
|
41709
|
-
this.baskets[newDivaNr] = new BasketData(basket);
|
|
41667
|
+
this.baskets[newDivaNr] = new BasketData(_objectSpread$9({}, basket));
|
|
41710
41668
|
this.baskets[newDivaNr].clearRenderData();
|
|
41711
41669
|
if (!keepOldDivaNr) this.divaNr = newDivaNr;
|
|
41712
41670
|
if (this.assignNewDivaNr) {
|
|
@@ -41849,7 +41807,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41849
41807
|
key: "loadBasketByCustomProductId",
|
|
41850
41808
|
value: function () {
|
|
41851
41809
|
var _loadBasketByCustomProductId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(api, key, productId, fields) {
|
|
41852
|
-
var variantData;
|
|
41810
|
+
var variantData, _this$plannerConfig$c5;
|
|
41853
41811
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
41854
41812
|
while (1) switch (_context8.prev = _context8.next) {
|
|
41855
41813
|
case 0:
|
|
@@ -41879,7 +41837,11 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41879
41837
|
if (variantData.productGroup) {
|
|
41880
41838
|
this.analyticsRelevantData.productGroup = variantData.productGroup;
|
|
41881
41839
|
}
|
|
41882
|
-
return _context8.abrupt("return", this.initBasket(api, variantData.basket.DivaNr,
|
|
41840
|
+
return _context8.abrupt("return", this.initBasket(api, variantData.basket.DivaNr, {
|
|
41841
|
+
basket: _objectSpread$9(_objectSpread$9({}, variantData.basket), {}, {
|
|
41842
|
+
OrganizationId: (_this$plannerConfig$c5 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c5 === void 0 ? void 0 : _this$plannerConfig$c5._id
|
|
41843
|
+
})
|
|
41844
|
+
}, undefined, productId));
|
|
41883
41845
|
case 12:
|
|
41884
41846
|
_context8.next = 18;
|
|
41885
41847
|
break;
|
|
@@ -42006,7 +41968,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
42006
41968
|
key: "saveToBasket",
|
|
42007
41969
|
value: function () {
|
|
42008
41970
|
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(api, actBasket, returnTo, arReady) {
|
|
42009
|
-
var _this$plannerConfig$s10, _this$plannerConfig$
|
|
41971
|
+
var _this$plannerConfig$s10, _this$plannerConfig$c6, _this$_basketHandler, _api$getJwt, _URLSearchParams$get;
|
|
42010
41972
|
var response;
|
|
42011
41973
|
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
42012
41974
|
while (1) switch (_context11.prev = _context11.next) {
|
|
@@ -42021,12 +41983,12 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
42021
41983
|
return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser, (_this$plannerConfig$s10 = this.plannerConfig.settings) === null || _this$plannerConfig$s10 === void 0 ? void 0 : _this$plannerConfig$s10.keepSalesPersonDataInBasket);
|
|
42022
41984
|
case 8:
|
|
42023
41985
|
actBasket.UserLanguage = api.getLanguage();
|
|
42024
|
-
actBasket.PrintRetailLogo = (_this$plannerConfig$
|
|
41986
|
+
actBasket.PrintRetailLogo = (_this$plannerConfig$c6 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c6 === void 0 ? void 0 : _this$plannerConfig$c6.logoUrl;
|
|
42025
41987
|
_context11.next = 12;
|
|
42026
41988
|
return (_this$_basketHandler = this._basketHandler) === null || _this$_basketHandler === void 0 ? void 0 : _this$_basketHandler.saveBasket({
|
|
42027
41989
|
jwt: (_api$getJwt = api.getJwt()) !== null && _api$getJwt !== void 0 ? _api$getJwt : undefined,
|
|
42028
41990
|
basket: actBasket,
|
|
42029
|
-
awaitPDF: true,
|
|
41991
|
+
awaitPDF: returnTo == 'SAVE_BASKET_ASYNC' ? false : true,
|
|
42030
41992
|
utmCampaign: (_URLSearchParams$get = new URLSearchParams(window.location.search).get('utm_campaign')) !== null && _URLSearchParams$get !== void 0 ? _URLSearchParams$get : undefined,
|
|
42031
41993
|
saveToApi2: false,
|
|
42032
41994
|
apiKey: api.getApiKey()
|
|
@@ -42209,7 +42171,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
42209
42171
|
break;
|
|
42210
42172
|
case 3:
|
|
42211
42173
|
_context12.next = 5;
|
|
42212
|
-
return import('./PfisterWWSHandler-
|
|
42174
|
+
return import('./PfisterWWSHandler-d0109020.js');
|
|
42213
42175
|
case 5:
|
|
42214
42176
|
_yield$import = _context12.sent;
|
|
42215
42177
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -42217,7 +42179,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
42217
42179
|
return _context12.abrupt("break", 27);
|
|
42218
42180
|
case 9:
|
|
42219
42181
|
_context12.next = 11;
|
|
42220
|
-
return import('./LiviqueWWSHandler-
|
|
42182
|
+
return import('./LiviqueWWSHandler-56c4d1d2.js');
|
|
42221
42183
|
case 11:
|
|
42222
42184
|
_yield$import2 = _context12.sent;
|
|
42223
42185
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -42225,7 +42187,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
42225
42187
|
return _context12.abrupt("break", 27);
|
|
42226
42188
|
case 15:
|
|
42227
42189
|
_context12.next = 17;
|
|
42228
|
-
return import('./SeriousBasketHandler-
|
|
42190
|
+
return import('./SeriousBasketHandler-29af6f6d.js');
|
|
42229
42191
|
case 17:
|
|
42230
42192
|
_yield$import3 = _context12.sent;
|
|
42231
42193
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -42233,7 +42195,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
42233
42195
|
return _context12.abrupt("break", 27);
|
|
42234
42196
|
case 21:
|
|
42235
42197
|
_context12.next = 23;
|
|
42236
|
-
return import('./StandardWWSHandler-
|
|
42198
|
+
return import('./StandardWWSHandler-553bf27b.js');
|
|
42237
42199
|
case 23:
|
|
42238
42200
|
_yield$import4 = _context12.sent;
|
|
42239
42201
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -43657,7 +43619,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
43657
43619
|
while (1) switch (_context3.prev = _context3.next) {
|
|
43658
43620
|
case 0:
|
|
43659
43621
|
_context3.next = 2;
|
|
43660
|
-
return import('./Host3DSignalR-
|
|
43622
|
+
return import('./Host3DSignalR-baf9963c.js');
|
|
43661
43623
|
case 2:
|
|
43662
43624
|
_yield$import = _context3.sent;
|
|
43663
43625
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -45410,7 +45372,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
45410
45372
|
break;
|
|
45411
45373
|
case 8:
|
|
45412
45374
|
_context4.next = 10;
|
|
45413
|
-
return import('./DivaStandardPlanner-
|
|
45375
|
+
return import('./DivaStandardPlanner-9e6ffa11.js');
|
|
45414
45376
|
case 10:
|
|
45415
45377
|
_yield$import = _context4.sent;
|
|
45416
45378
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -45421,7 +45383,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
45421
45383
|
return _context4.abrupt("break", 21);
|
|
45422
45384
|
case 15:
|
|
45423
45385
|
_context4.next = 17;
|
|
45424
|
-
return import('./DivaBoxPlanner-
|
|
45386
|
+
return import('./DivaBoxPlanner-34141af8.js');
|
|
45425
45387
|
case 17:
|
|
45426
45388
|
_yield$import2 = _context4.sent;
|
|
45427
45389
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -47271,7 +47233,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47271
47233
|
this.api.setState(this.state);
|
|
47272
47234
|
this.ReturnTo = this.plannerConfig.returnTo;
|
|
47273
47235
|
LOG$1.startTransaction({
|
|
47274
|
-
event: 'onInitializeConfigurator',
|
|
47236
|
+
event: cache !== undefined ? 'onReinitializeConfigurator' : 'onInitializeConfigurator',
|
|
47275
47237
|
message: 'Loading Basket',
|
|
47276
47238
|
eventId: 'LOADING_BASKET',
|
|
47277
47239
|
warningTime: 2000,
|
|
@@ -47286,11 +47248,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47286
47248
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
47287
47249
|
case 12:
|
|
47288
47250
|
loadSuccessful = _context14.sent;
|
|
47289
|
-
if (this.plannerConfig.configuratorSessionId
|
|
47290
|
-
DivaUtils.businessMetrics.setConfiguratorSessionId();
|
|
47291
|
-
} else if (this.plannerConfig.configuratorSessionId) {
|
|
47251
|
+
if (this.plannerConfig.configuratorSessionId) {
|
|
47292
47252
|
//force new configurator session id - Landingpage case
|
|
47293
47253
|
DivaUtils.businessMetrics.setConfiguratorSessionId(this.plannerConfig.configuratorSessionId);
|
|
47254
|
+
} else {
|
|
47255
|
+
// Only create a new configurator session if we don't already have one. This keeps the analytics
|
|
47256
|
+
// session stable across re-inits (e.g. switching products inside the same catalog).
|
|
47257
|
+
DivaUtils.businessMetrics.setConfiguratorSessionId(undefined, true);
|
|
47294
47258
|
}
|
|
47295
47259
|
if (!loadSuccessful) {
|
|
47296
47260
|
_context14.next = 31;
|
|
@@ -48533,7 +48497,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48533
48497
|
break;
|
|
48534
48498
|
}
|
|
48535
48499
|
_context28.t3 = returnTo;
|
|
48536
|
-
_context28.next = _context28.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 27 : _context28.t3 === 'OPEN_SELLER_BASKET' ? 29 : _context28.t3 === 'OPEN_PDF' ? 32 : _context28.t3 === 'SAVE_BASKET_WITH_MODAL' ? 32 : _context28.t3 === 'SAVE_BASKET' ? 32 : _context28.t3 === 'SAVE_BASKET_SYNC' ? 32 : 52;
|
|
48500
|
+
_context28.next = _context28.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 27 : _context28.t3 === 'OPEN_SELLER_BASKET' ? 29 : _context28.t3 === 'OPEN_PDF' ? 32 : _context28.t3 === 'SAVE_BASKET_WITH_MODAL' ? 32 : _context28.t3 === 'SAVE_BASKET' ? 32 : _context28.t3 === 'SAVE_BASKET_SYNC' ? 32 : _context28.t3 === 'SAVE_BASKET_ASYNC' ? 32 : 52;
|
|
48537
48501
|
break;
|
|
48538
48502
|
case 27:
|
|
48539
48503
|
(_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.openComponent({
|
|
@@ -48892,8 +48856,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48892
48856
|
}, {
|
|
48893
48857
|
key: "doAllowSetPlanner",
|
|
48894
48858
|
value: function doAllowSetPlanner() {
|
|
48895
|
-
var _this$returnTo, _this$divaBasketHandl3;
|
|
48896
|
-
return this.api.doAllowSetPlanner() || ((_this$returnTo = this.returnTo) === null || _this$returnTo === void 0 ? void 0 : _this$returnTo.startsWith('SETPLANNER')) || !!((_this$divaBasketHandl3 = this.divaBasketHandler) !== null && _this$divaBasketHandl3 !== void 0 && (_this$divaBasketHandl3 = _this$divaBasketHandl3.actBasket) !== null && _this$divaBasketHandl3 !== void 0 && _this$divaBasketHandl3.SetPlannerInfos);
|
|
48859
|
+
var _this$api, _this$returnTo, _this$divaBasketHandl3;
|
|
48860
|
+
return ((_this$api = this.api) === null || _this$api === void 0 ? void 0 : _this$api.doAllowSetPlanner()) || ((_this$returnTo = this.returnTo) === null || _this$returnTo === void 0 ? void 0 : _this$returnTo.startsWith('SETPLANNER')) || !!((_this$divaBasketHandl3 = this.divaBasketHandler) !== null && _this$divaBasketHandl3 !== void 0 && (_this$divaBasketHandl3 = _this$divaBasketHandl3.actBasket) !== null && _this$divaBasketHandl3 !== void 0 && _this$divaBasketHandl3.SetPlannerInfos);
|
|
48897
48861
|
}
|
|
48898
48862
|
}, {
|
|
48899
48863
|
key: "doShow3DDimensionLines",
|
|
@@ -49235,8 +49199,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49235
49199
|
}, {
|
|
49236
49200
|
key: "clearCache",
|
|
49237
49201
|
value: function clearCache() {
|
|
49238
|
-
var _this$
|
|
49239
|
-
(_this$
|
|
49202
|
+
var _this$api2;
|
|
49203
|
+
(_this$api2 = this.api) === null || _this$api2 === void 0 || _this$api2.clearCache();
|
|
49240
49204
|
this.divaCatalogs = {};
|
|
49241
49205
|
}
|
|
49242
49206
|
}, {
|
package/build/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { h as CatalogPlannerArticleData, C as Cell, e as DivaArticle, g as DivaBasketHandler, f as DivaCatalogData, b as DivaSetHandler, D as DockingPoint, G as Grid, O as OptionCatalogData, P as PlannerElementData, R as Rendering, c as Vector2, V as Vector3, i as Vector4, j as creatRenderOrders, d as default, k as getOrigProductId, l as loadAndRepairBasket } from './index-
|
|
1
|
+
export { h as CatalogPlannerArticleData, C as Cell, e as DivaArticle, g as DivaBasketHandler, f as DivaCatalogData, b as DivaSetHandler, D as DockingPoint, G as Grid, O as OptionCatalogData, P as PlannerElementData, R as Rendering, c as Vector2, V as Vector3, i as Vector4, j as creatRenderOrders, d as default, k as getOrigProductId, l as loadAndRepairBasket } from './index-66df82ca.js';
|
|
2
2
|
import '@babel/runtime/helpers/slicedToArray';
|
|
3
3
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
4
4
|
import '@babel/runtime/helpers/classCallCheck';
|