@crystaldesign/web-planner-logic 25.1.0-beta.8 → 25.1.0-rc.0
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-57bdc557.js → DivaBoxPlanner-419deff0.js} +1756 -896
- package/build/cjs/{DivaStandardPlanner-61b70e1a.js → DivaStandardPlanner-452a7c54.js} +17 -6
- package/build/cjs/{DoorPlanner-a7d48a7a.js → DoorPlanner-f3f26c1d.js} +1 -1
- package/build/cjs/{Host3DSignalR-fa0154b6.js → Host3DSignalR-97efb5ee.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-00b6d2e3.js → LiviqueWWSHandler-dc0bf512.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-f7c657da.js → PfisterWWSHandler-9a9e6041.js} +1 -1
- package/build/cjs/{PlannerHandler2D-b6e95cb1.js → PlannerHandler2D-f63a421a.js} +53 -6
- package/build/cjs/{SeriousBasketHandler-4f9f6746.js → SeriousBasketHandler-f21d468a.js} +17 -13
- package/build/cjs/{ShelfPlanner-0ee99038.js → ShelfPlanner-1165e6f2.js} +5 -5
- package/build/cjs/{StandardWWSHandler-2adead07.js → StandardWWSHandler-899f51d5.js} +1 -1
- package/build/cjs/{index-33b7d8f6.js → index-eb6ae406.js} +196 -117
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-ae772099.js → DivaBoxPlanner-ecd0e7d9.js} +1755 -895
- package/build/esm/{DivaStandardPlanner-74a7a303.js → DivaStandardPlanner-fd494faa.js} +17 -6
- package/build/esm/{DoorPlanner-3d5c6695.js → DoorPlanner-c811330f.js} +1 -1
- package/build/esm/{Host3DSignalR-b6bc8b77.js → Host3DSignalR-2bfc7356.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-4fad5328.js → LiviqueWWSHandler-2f2c63a7.js} +1 -1
- package/build/esm/{PfisterWWSHandler-9ab4947e.js → PfisterWWSHandler-b7dd5d62.js} +1 -1
- package/build/esm/{PlannerHandler2D-cd1b49dc.js → PlannerHandler2D-de8dd1f2.js} +53 -6
- package/build/esm/{SeriousBasketHandler-cfa3acb7.js → SeriousBasketHandler-a0a3258f.js} +17 -13
- package/build/esm/{ShelfPlanner-9db5a7d8.js → ShelfPlanner-f47cd0f7.js} +5 -5
- package/build/esm/{StandardWWSHandler-daabaf26.js → StandardWWSHandler-8b675fe0.js} +1 -1
- package/build/esm/{index-d11d5210.js → index-14b412d8.js} +196 -117
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts +3 -1
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts +3 -1
- package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +5 -0
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +4 -2
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/DecisionType.d.ts +2 -0
- package/build/types/web-planner-logic/src/interface/OptionTypes/DecisionType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Planner/IDivaPlanner.d.ts +3 -1
- package/build/types/web-planner-logic/src/interface/Planner/IDivaPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Planner/PlannerElementDataType.d.ts +4 -0
- package/build/types/web-planner-logic/src/interface/Planner/PlannerElementDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/ReturnTypes/index.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/ReturnTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +13 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.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/Basket/SeriousBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +0 -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 +148 -33
- 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/BoxPlannerPartlistHelper.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts +2 -2
- 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 +3 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts +3 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts +4 -2
- package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/PlannerHandler2D.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +7 -0
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/CatalogArticleData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts +1 -1
- package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Planner/BoxPlannerData.d.ts +28 -0
- package/build/types/web-planner-logic/src/model/Planner/BoxPlannerData.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts +5 -0
- package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Planner/PlannerInteractionData.d.ts +29 -0
- package/build/types/web-planner-logic/src/model/Planner/PlannerInteractionData.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/datas/idm_text_routine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/datas/pfister_test_routine.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -17068,11 +17068,8 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17068
17068
|
}, {
|
|
17069
17069
|
key: "getOPTDefaultInVisible",
|
|
17070
17070
|
value: function getOPTDefaultInVisible(optionCodex) {
|
|
17071
|
-
|
|
17072
|
-
|
|
17073
|
-
return this.catalogArticle.articleOptions[optionCodex].isInvisible;
|
|
17074
|
-
}
|
|
17075
|
-
return false;*/
|
|
17071
|
+
var _this$catalogArticle$4;
|
|
17072
|
+
return (_this$catalogArticle$4 = this.catalogArticle.articleOptions[optionCodex]) === null || _this$catalogArticle$4 === void 0 ? void 0 : _this$catalogArticle$4.isInvisible;
|
|
17076
17073
|
}
|
|
17077
17074
|
|
|
17078
17075
|
/*following functions contain Loadingprocess of the ArticleData recived by the API. It includes
|
|
@@ -17373,7 +17370,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17373
17370
|
var optionsDeletedCount = 0;
|
|
17374
17371
|
for (var m = 0; m < myDecision.Options.length; m++) {
|
|
17375
17372
|
if (!myOptOrder.includes(myDecision.Options[m])) {
|
|
17376
|
-
var text = 'Attention: a Decision refers to a Option that does not exist on the article';
|
|
17373
|
+
var text = 'Attention: a Decision refers to a Option that does not exist on the article. DecNr: ' + myDecision.Number + ' option: ' + myDecision.Options[m] + ' articleCodex: ' + this.articleCodex;
|
|
17377
17374
|
var stack = {
|
|
17378
17375
|
decisionNr: myDecision.Number,
|
|
17379
17376
|
Option: myDecision.Options[m],
|
|
@@ -19210,7 +19207,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
19210
19207
|
}
|
|
19211
19208
|
}, {
|
|
19212
19209
|
key: "repairVariantValues",
|
|
19213
|
-
value: function repairVariantValues(variantValues) {
|
|
19210
|
+
value: function repairVariantValues(variantValues, articleCodex) {
|
|
19211
|
+
if (variantValues['OPTPLANNERSWITCH']) variantValues['OPTPLANNERSWITCH'] = 'OPV' + articleCodex;
|
|
19214
19212
|
if (!this.catalogData.repairVariantValues) return variantValues;
|
|
19215
19213
|
for (var key in variantValues) {
|
|
19216
19214
|
var opt_opv = key + ':' + variantValues[key];
|
|
@@ -20654,8 +20652,6 @@ function ownKeys$e(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
|
20654
20652
|
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20655
20653
|
var LOG$d = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
20656
20654
|
var DivaArticle = /*#__PURE__*/function () {
|
|
20657
|
-
//Hier steht die aktuelle Konfiguration
|
|
20658
|
-
|
|
20659
20655
|
function DivaArticle(set, _basketId, initParams, articleData, catalogData) {
|
|
20660
20656
|
var _this = this,
|
|
20661
20657
|
_initParams$noPrice,
|
|
@@ -20666,6 +20662,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
20666
20662
|
_defineProperty(this, "articleOptionStatesData", void 0);
|
|
20667
20663
|
//Dieses Objekt speichert den aktuellen Werte, Zustand eines Optionsbaumes und Preise
|
|
20668
20664
|
_defineProperty(this, "actPlannerData", void 0);
|
|
20665
|
+
//Hier steht die aktuelle Konfiguration
|
|
20666
|
+
_defineProperty(this, "decisionDebugStacks", []);
|
|
20669
20667
|
_defineProperty(this, "getPreviousPartlistArticle", function (articleCodex) {
|
|
20670
20668
|
var _this$article$previou;
|
|
20671
20669
|
var prevPartlistArticles = (_this$article$previou = _this.article.previousPartlistArticles) !== null && _this$article$previou !== void 0 ? _this$article$previou : {};
|
|
@@ -22978,8 +22976,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22978
22976
|
}, {
|
|
22979
22977
|
key: "setOP",
|
|
22980
22978
|
value: function setOP(OptionCodex, myOPVItem, freeText, doDefine) {
|
|
22981
|
-
var
|
|
22982
|
-
var myArtOPS = myOptionStates[OptionCodex];
|
|
22979
|
+
var myArtOPS = this.getArticleOptionState(OptionCodex);
|
|
22983
22980
|
if (!myArtOPS) {
|
|
22984
22981
|
LOG$d.error(new DivaError('OptionCodex: ' + OptionCodex + ' in articleCodex: ' + this.articleCodex + ' not found!'));
|
|
22985
22982
|
return;
|
|
@@ -23087,13 +23084,13 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23087
23084
|
if (myPartListPos.ItemRefArticles) {
|
|
23088
23085
|
var decisions = myPartListPos.PartListPosDecisionsAndPosCounts;
|
|
23089
23086
|
if (decisions) {
|
|
23090
|
-
var _decisions$;
|
|
23091
|
-
var relationTypeNone = ((_decisions$ = decisions[0]) === null || _decisions$ === void 0 ? void 0 : _decisions$.RelationType) !== 'PosCount';
|
|
23092
23087
|
var partlistAdded = false;
|
|
23093
23088
|
for (var c = 0; c < decisions.length; c++) {
|
|
23089
|
+
var _decisions$c, _myDecisionVal;
|
|
23090
|
+
var relationTypeNone = ((_decisions$c = decisions[c]) === null || _decisions$c === void 0 ? void 0 : _decisions$c.RelationType) !== 'PosCount';
|
|
23094
23091
|
var myDecisionNumber = decisions[c].DecisionNumber;
|
|
23095
|
-
var myDecisionVal = this.checkDecisionNumber(myDecisionNumber);
|
|
23096
|
-
if (myDecisionVal.isValidDOC || relationTypeNone) {
|
|
23092
|
+
var myDecisionVal = relationTypeNone ? undefined : this.checkDecisionNumber(myDecisionNumber);
|
|
23093
|
+
if ((_myDecisionVal = myDecisionVal) !== null && _myDecisionVal !== void 0 && _myDecisionVal.isValidDOC || relationTypeNone) {
|
|
23097
23094
|
// wenn die Decision gültig, gelten die ItemRefArticles
|
|
23098
23095
|
partlistAdded = true;
|
|
23099
23096
|
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues, myDecisionVal, groupDecisionVal, myDecisionNumber);
|
|
@@ -23117,22 +23114,23 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23117
23114
|
}, {
|
|
23118
23115
|
key: "addPartilstToPartlistArticlesToLoad",
|
|
23119
23116
|
value: function addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues, myDecisionVal, groupDecisionVal, decisionNumber) {
|
|
23120
|
-
var _myPartListPos$Option
|
|
23117
|
+
var _myPartListPos$Option,
|
|
23118
|
+
_this3 = this;
|
|
23121
23119
|
var allDecisions = this.article.catalogArticle.articleDecisions;
|
|
23122
23120
|
var decisions = myPartListPos.PartListPosDecisionsAndPosCounts;
|
|
23123
23121
|
var optionsForPrint = (_myPartListPos$Option = myPartListPos.OptionsForPrint) === null || _myPartListPos$Option === void 0 ? void 0 : _myPartListPos$Option.split(';').map(function (o) {
|
|
23124
23122
|
return 'OPT' + o;
|
|
23125
23123
|
});
|
|
23126
23124
|
var optionImgForPrint = myPartListPos.OptionImgForPrint ? 'OPT' + myPartListPos.OptionImgForPrint : undefined;
|
|
23127
|
-
|
|
23125
|
+
var _loop = function _loop() {
|
|
23128
23126
|
var myRuleDesc = '';
|
|
23129
23127
|
var myRuleDesc_locales = undefined;
|
|
23130
23128
|
var articleCodex = myPartListPos.ItemRefArticles[d].ArticleCodex;
|
|
23131
23129
|
var catalogCodex = myPartListPos.ItemRefArticles[d].CatalogCodex;
|
|
23132
23130
|
var retailArticleNr = myPartListPos.RetailArticleNr && myPartListPos.RetailArticleNr != '' ? myPartListPos.RetailArticleNr : undefined;
|
|
23133
|
-
if (myDecisionVal && (myDecisionVal.Rule && myDecisionVal.Rule != '' &&
|
|
23134
|
-
myRuleDesc = DivaUtils.getRuleDescription(myDecisionVal.Rule,
|
|
23135
|
-
myRuleDesc_locales = DivaUtils.getRuleDescription_locales(myDecisionVal.Rule,
|
|
23131
|
+
if (myDecisionVal && (myDecisionVal.Rule && myDecisionVal.Rule != '' && _this3.CatalogData.doUseRuleDescForPartListArticles() || myPartListPos.RetailArticleNr == 'CUST')) {
|
|
23132
|
+
myRuleDesc = DivaUtils.getRuleDescription(myDecisionVal.Rule, _this3.articleOptionStates, _this3.set.api.ruleDescSeperator());
|
|
23133
|
+
myRuleDesc_locales = DivaUtils.getRuleDescription_locales(myDecisionVal.Rule, _this3.articleOptionStates, _this3.set.api.ruleDescSeperator());
|
|
23136
23134
|
}
|
|
23137
23135
|
var initDecisions = decisions.filter(function (decision) {
|
|
23138
23136
|
return decision.RelationType !== 'PosCount';
|
|
@@ -23141,8 +23139,19 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23141
23139
|
return dec.Number == decision.DecisionNumber.toString();
|
|
23142
23140
|
});
|
|
23143
23141
|
});
|
|
23142
|
+
var initDecisionsFiltered = [];
|
|
23143
|
+
var _loop2 = function _loop2(i) {
|
|
23144
|
+
if (initDecisions[i] && !initDecisionsFiltered.find(function (d) {
|
|
23145
|
+
return d.Number == initDecisions[i].Number;
|
|
23146
|
+
})) {
|
|
23147
|
+
initDecisionsFiltered.push(initDecisions[i]);
|
|
23148
|
+
}
|
|
23149
|
+
};
|
|
23150
|
+
for (var i = 0; i < initDecisions.length; i++) {
|
|
23151
|
+
_loop2(i);
|
|
23152
|
+
}
|
|
23144
23153
|
var quanitity = 1;
|
|
23145
|
-
if (
|
|
23154
|
+
if (_this3.CatalogData.useDecisionPosCountValue) {
|
|
23146
23155
|
var _decision$DOC;
|
|
23147
23156
|
// get SetPosCountValue from decsion action if defined and else use myPartListPos.PosCountValue;
|
|
23148
23157
|
var decision = decisionNumber ? allDecisions.find(function (d) {
|
|
@@ -23157,24 +23166,24 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23157
23166
|
return a.SetPosCountValue !== undefined;
|
|
23158
23167
|
})) === null || _decision$DOC === void 0 ? void 0 : _decision$DOC.SetPosCountValue;
|
|
23159
23168
|
quanitity = setPosCountValue !== undefined ? setPosCountValue : myPartListPos.PosCountValue;
|
|
23160
|
-
} else if (
|
|
23169
|
+
} else if (_this3.CatalogData.usePosCountValue) {
|
|
23161
23170
|
quanitity = myPartListPos.PosCountValue;
|
|
23162
23171
|
}
|
|
23163
|
-
quanitity = quanitity *
|
|
23164
|
-
var previousPartlistArticle =
|
|
23172
|
+
quanitity = quanitity * _this3.quantity;
|
|
23173
|
+
var previousPartlistArticle = _this3.getPreviousPartlistArticle(articleCodex);
|
|
23165
23174
|
if (quanitity >= 1) {
|
|
23166
|
-
var _previousPartlistArti;
|
|
23175
|
+
var _myDecisionVal$Rule, _previousPartlistArti;
|
|
23167
23176
|
partlistArticlesToLoad.push({
|
|
23168
|
-
CatalogCodex: catalogCodex !== null && catalogCodex !== void 0 ? catalogCodex :
|
|
23177
|
+
CatalogCodex: catalogCodex !== null && catalogCodex !== void 0 ? catalogCodex : _this3.catalogCodex,
|
|
23169
23178
|
BasketID: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.basketId,
|
|
23170
23179
|
ArticleCodex: articleCodex,
|
|
23171
23180
|
RefLevel: myDecisionVal === null || myDecisionVal === void 0 ? void 0 : myDecisionVal.RefLevel,
|
|
23172
23181
|
RetailArticleNr: retailArticleNr,
|
|
23173
23182
|
RetailPrefix: myPartListPos.RetailPrefix,
|
|
23174
23183
|
Quantity: quanitity,
|
|
23175
|
-
PartlistRule: (groupDecisionVal ? groupDecisionVal.Rule + ' && ' : '') + myDecisionVal ? myDecisionVal === null || myDecisionVal === void 0 ? void 0 : myDecisionVal.Rule : '',
|
|
23184
|
+
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 : '', _this3.VariantValues) : undefined,
|
|
23176
23185
|
SupplierOrderCodex: myPartListPos.SupplierOrderCodex,
|
|
23177
|
-
initDecisions:
|
|
23186
|
+
initDecisions: initDecisionsFiltered,
|
|
23178
23187
|
RuleDesc: myRuleDesc,
|
|
23179
23188
|
RuleDesc_locales: myRuleDesc_locales,
|
|
23180
23189
|
PosInvisibility: myPartListPos.PosInvisibility,
|
|
@@ -23186,6 +23195,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23186
23195
|
} else {
|
|
23187
23196
|
LOG$d.debug('not loading partlistarticle: ' + articleCodex + ' cause quantity is zero');
|
|
23188
23197
|
}
|
|
23198
|
+
};
|
|
23199
|
+
for (var d = 0; d < myPartListPos.ItemRefArticles.length; d++) {
|
|
23200
|
+
_loop();
|
|
23189
23201
|
}
|
|
23190
23202
|
return partlistArticlesToLoad;
|
|
23191
23203
|
}
|
|
@@ -23246,11 +23258,15 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23246
23258
|
}, {
|
|
23247
23259
|
key: "evalAllDecisions",
|
|
23248
23260
|
value: function evalAllDecisions() {
|
|
23261
|
+
var _myDecision$DisableHi, _myDecision$DisableHi2, _myDecision$DisableHi3;
|
|
23249
23262
|
var myDecisions = this.article.catalogArticle.articleDecisions;
|
|
23263
|
+
|
|
23250
23264
|
//add the partlist spesific decisions to the normal decisions
|
|
23251
23265
|
if (this.article.initDecisions) myDecisions = myDecisions.concat(this.article.initDecisions);
|
|
23252
23266
|
for (var i = 0; i < myDecisions.length; i++) {
|
|
23253
|
-
myDecisions[i]
|
|
23267
|
+
myDecisions[i].Enabled = true;
|
|
23268
|
+
myDecisions[i].DisableHistory = [];
|
|
23269
|
+
myDecisions[i].ActiveCombination = undefined;
|
|
23254
23270
|
}
|
|
23255
23271
|
for (var key in this.articleOptionStates) {
|
|
23256
23272
|
var myOPS = this.articleOptionStates[key];
|
|
@@ -23258,6 +23274,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23258
23274
|
myOPS.visibleCount = Object.keys(myOPS.option.articleOptionValues).length;
|
|
23259
23275
|
myOPS.definedBySetFeatureFixed = false;
|
|
23260
23276
|
}
|
|
23277
|
+
var decisionDebugStack = [];
|
|
23261
23278
|
for (var m = 0; m < myDecisions.length; m++) {
|
|
23262
23279
|
//Alle Optionen Mit DOC Type 1 ermitten - diese zunächst alle ausblenden, werden dann später über Formeln wieder eingeschaltet
|
|
23263
23280
|
var myDecision = myDecisions[m];
|
|
@@ -23266,16 +23283,43 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23266
23283
|
case '2':
|
|
23267
23284
|
//Aktionsregel. Wenn das erste JsRule erfüllt ist muss man die restlichen DecisionOptionCombinations nicht mehr kontrollieren.
|
|
23268
23285
|
this.evalType2Decision(myDecision, myDecisions);
|
|
23286
|
+
decisionDebugStack.push({
|
|
23287
|
+
text: myDecision.Number + ' type: 2 ' + ((_myDecision$DisableHi = myDecision.DisableHistory) === null || _myDecision$DisableHi === void 0 ? void 0 : _myDecision$DisableHi.join(',')),
|
|
23288
|
+
nr: myDecision.Number,
|
|
23289
|
+
decision: JSON.parse(JSON.stringify(myDecision))
|
|
23290
|
+
});
|
|
23269
23291
|
break;
|
|
23270
23292
|
case '1':
|
|
23271
23293
|
this.evalType1Decision(myDecision);
|
|
23294
|
+
decisionDebugStack.push({
|
|
23295
|
+
text: myDecision.Number + ' type: 1 ' + ((_myDecision$DisableHi2 = myDecision.DisableHistory) === null || _myDecision$DisableHi2 === void 0 ? void 0 : _myDecision$DisableHi2.join(',')),
|
|
23296
|
+
nr: myDecision.Number,
|
|
23297
|
+
decision: JSON.parse(JSON.stringify(myDecision))
|
|
23298
|
+
});
|
|
23272
23299
|
break;
|
|
23273
23300
|
case '0':
|
|
23274
23301
|
this.evalType0Decision(myDecision);
|
|
23302
|
+
decisionDebugStack.push({
|
|
23303
|
+
text: myDecision.Number + ' type: 0 ' + ((_myDecision$DisableHi3 = myDecision.DisableHistory) === null || _myDecision$DisableHi3 === void 0 ? void 0 : _myDecision$DisableHi3.join(',')),
|
|
23304
|
+
nr: myDecision.Number,
|
|
23305
|
+
decision: JSON.parse(JSON.stringify(myDecision))
|
|
23306
|
+
});
|
|
23275
23307
|
break;
|
|
23276
23308
|
}
|
|
23309
|
+
} else {
|
|
23310
|
+
var _myDecision$DisableHi4;
|
|
23311
|
+
decisionDebugStack.push({
|
|
23312
|
+
text: myDecision.Number + ' ' + ((_myDecision$DisableHi4 = myDecision.DisableHistory) === null || _myDecision$DisableHi4 === void 0 ? void 0 : _myDecision$DisableHi4.join(',')),
|
|
23313
|
+
nr: myDecision.Number,
|
|
23314
|
+
decision: JSON.parse(JSON.stringify(myDecision))
|
|
23315
|
+
});
|
|
23277
23316
|
}
|
|
23278
23317
|
}
|
|
23318
|
+
if (this.decisionDebugStacks.length > 6) this.decisionDebugStacks.shift();
|
|
23319
|
+
this.decisionDebugStacks.push({
|
|
23320
|
+
stack: decisionDebugStack,
|
|
23321
|
+
variantValues: this.VariantValues
|
|
23322
|
+
});
|
|
23279
23323
|
this.evalShowOnlyWhenHasPrice();
|
|
23280
23324
|
this.updateIDMSpecificFeatures();
|
|
23281
23325
|
}
|
|
@@ -23319,6 +23363,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23319
23363
|
for (var i = 0; i < myDoc.DA.length; i++) {
|
|
23320
23364
|
var myDA = myDoc.DA[i];
|
|
23321
23365
|
var myOptionCodex = myDA.OptionCodex ? 'OPT' + myDA.OptionCodex : '';
|
|
23366
|
+
if (!myDoc.JsFormula || myDoc.JsFormula == '' || this.evalRule(myDoc.JsFormula)) {
|
|
23367
|
+
myDecision.ActiveCombination = j;
|
|
23368
|
+
}
|
|
23322
23369
|
if (this.getArticleOptionState(myOptionCodex) || myOptionCodex == '') {
|
|
23323
23370
|
switch (myDA.Type) {
|
|
23324
23371
|
case '0':
|
|
@@ -23373,7 +23420,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23373
23420
|
}
|
|
23374
23421
|
for (var _m = 0; _m < myDecisions.length; _m++) {
|
|
23375
23422
|
if (SearchDecNumber.includes(Number(myDecisions[_m].Number))) {
|
|
23423
|
+
var _myDecisions$_m$Disab;
|
|
23376
23424
|
myDecisions[_m].Enabled = false;
|
|
23425
|
+
(_myDecisions$_m$Disab = myDecisions[_m].DisableHistory) === null || _myDecisions$_m$Disab === void 0 || _myDecisions$_m$Disab.push('disabled By ' + myDecision.Number);
|
|
23377
23426
|
}
|
|
23378
23427
|
}
|
|
23379
23428
|
}
|
|
@@ -23391,7 +23440,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23391
23440
|
}
|
|
23392
23441
|
for (var _m3 = 0; _m3 < myDecisions.length; _m3++) {
|
|
23393
23442
|
if (_SearchDecNumber.includes(Number(myDecisions[_m3].Number))) {
|
|
23443
|
+
var _myDecisions$_m3$Disa;
|
|
23394
23444
|
myDecisions[_m3].Enabled = true;
|
|
23445
|
+
(_myDecisions$_m3$Disa = myDecisions[_m3].DisableHistory) === null || _myDecisions$_m3$Disa === void 0 || _myDecisions$_m3$Disa.push('enabled By ' + myDecision.Number);
|
|
23395
23446
|
}
|
|
23396
23447
|
}
|
|
23397
23448
|
}
|
|
@@ -23460,6 +23511,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23460
23511
|
}
|
|
23461
23512
|
if (doUseDoc) {
|
|
23462
23513
|
var _myDoc$Row2;
|
|
23514
|
+
myDecision.ActiveCombination = j;
|
|
23463
23515
|
if ((_myDoc$Row2 = myDoc.Row) !== null && _myDoc$Row2 !== void 0 && _myDoc$Row2[OPT]) {
|
|
23464
23516
|
var ruleWasValidOnce = false;
|
|
23465
23517
|
for (var m = 0; m < myDoc.Row[OPT].length; m++) {
|
|
@@ -23555,6 +23607,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23555
23607
|
}
|
|
23556
23608
|
}
|
|
23557
23609
|
if (doUseDoc && myDoc.Row) {
|
|
23610
|
+
myDecision.ActiveCombination = j;
|
|
23558
23611
|
if (myDoc.Row[OPT]) {
|
|
23559
23612
|
for (var m = 0; m < myDoc.Row[OPT].length; m++) {
|
|
23560
23613
|
var opvCodex = myDoc.Row[OPT][m];
|
|
@@ -23881,7 +23934,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23881
23934
|
break;
|
|
23882
23935
|
}
|
|
23883
23936
|
_context.next = 4;
|
|
23884
|
-
return import('./ShelfPlanner-
|
|
23937
|
+
return import('./ShelfPlanner-f47cd0f7.js');
|
|
23885
23938
|
case 4:
|
|
23886
23939
|
_yield$import = _context.sent;
|
|
23887
23940
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -23933,7 +23986,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23933
23986
|
}, {
|
|
23934
23987
|
key: "calcConfigPrice",
|
|
23935
23988
|
value: function calcConfigPrice(maxPriceOfGroupCodex, digits) {
|
|
23936
|
-
var
|
|
23989
|
+
var _this4 = this,
|
|
23937
23990
|
_this$catalogArticle$;
|
|
23938
23991
|
//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.
|
|
23939
23992
|
//wenn ja, hier neues shape übergeben
|
|
@@ -24049,9 +24102,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24049
24102
|
var _myArtOPS = myArtOPSs[_iKey3];
|
|
24050
24103
|
var targetPPGPrefixes = _myArtOPS.targetPPGPrefixes;
|
|
24051
24104
|
if (!targetPPGPrefixes) continue;
|
|
24052
|
-
var
|
|
24105
|
+
var _loop3 = function _loop3() {
|
|
24053
24106
|
var targetPrefix = targetPPGPrefixes[_i5];
|
|
24054
|
-
var priceRef =
|
|
24107
|
+
var priceRef = _this4.article.priceRefs.find(function (item) {
|
|
24055
24108
|
var _item$PPG;
|
|
24056
24109
|
return ((_item$PPG = item.PPG) === null || _item$PPG === void 0 ? void 0 : _item$PPG.split('_')[0]) == targetPrefix;
|
|
24057
24110
|
});
|
|
@@ -24062,21 +24115,21 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24062
24115
|
}
|
|
24063
24116
|
};
|
|
24064
24117
|
for (var _i5 = 0; _i5 < targetPPGPrefixes.length; _i5++) {
|
|
24065
|
-
|
|
24118
|
+
_loop3();
|
|
24066
24119
|
}
|
|
24067
24120
|
}
|
|
24068
24121
|
for (var _i6 = 0; _i6 < this.article.priceRefs.length; _i6++) {
|
|
24069
24122
|
if (!this.article.priceRefs[_i6].TargetPPGPrefixes) continue;
|
|
24070
24123
|
var basePriceRef = this.article.priceRefs[_i6];
|
|
24071
|
-
var
|
|
24124
|
+
var _loop4 = function _loop4() {
|
|
24072
24125
|
var targetPrefix = basePriceRef.TargetPPGPrefixes[_j];
|
|
24073
24126
|
var myArtOpv;
|
|
24074
|
-
var priceRef =
|
|
24127
|
+
var priceRef = _this4.article.priceRefs.find(function (item) {
|
|
24075
24128
|
return item.PPG && item.PPG.split('_')[0] == targetPrefix;
|
|
24076
24129
|
});
|
|
24077
24130
|
if (!priceRef) {
|
|
24078
|
-
for (var key in
|
|
24079
|
-
var artOPS =
|
|
24131
|
+
for (var key in _this4.articleOptionStates) {
|
|
24132
|
+
var artOPS = _this4.articleOptionStates[key];
|
|
24080
24133
|
if (artOPS.ppg && artOPS.ppg.split('_')[0] == targetPrefix) {
|
|
24081
24134
|
myArtOpv = artOPS;
|
|
24082
24135
|
}
|
|
@@ -24095,7 +24148,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24095
24148
|
}
|
|
24096
24149
|
};
|
|
24097
24150
|
for (var _j = 0; _j < basePriceRef.TargetPPGPrefixes.length; _j++) {
|
|
24098
|
-
|
|
24151
|
+
_loop4();
|
|
24099
24152
|
}
|
|
24100
24153
|
}
|
|
24101
24154
|
for (var _i7 = 0; _i7 < this.article.priceRefs.length; _i7++) {
|
|
@@ -24384,7 +24437,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24384
24437
|
value: function updateArticleSVG() {
|
|
24385
24438
|
var _this$article$catalog2,
|
|
24386
24439
|
_this$article$catalog3,
|
|
24387
|
-
|
|
24440
|
+
_this5 = this;
|
|
24388
24441
|
var newSVGFile = null;
|
|
24389
24442
|
var svgChangedViaSvgTausch = false;
|
|
24390
24443
|
if (!this.hasCatalogPlannerArticle || ((_this$article$catalog2 = this.article.catalogArticle.catalogPlannerArticle) === null || _this$article$catalog2 === void 0 ? void 0 : _this$article$catalog2.topSvg) == undefined && ((_this$article$catalog3 = this.article.catalogArticle.catalogPlannerArticle) === null || _this$article$catalog3 === void 0 ? void 0 : _this$article$catalog3.topSvgsWithFormula) == undefined) {
|
|
@@ -24445,7 +24498,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24445
24498
|
code: 'WC_0011',
|
|
24446
24499
|
custom: {
|
|
24447
24500
|
formulas: (_plannerCatArt$topSvg = plannerCatArt.topSvgsWithFormula) === null || _plannerCatArt$topSvg === void 0 ? void 0 : _plannerCatArt$topSvg.map(function (item) {
|
|
24448
|
-
return DivaUtils.getRuleByFormula(item.JsFormula,
|
|
24501
|
+
return DivaUtils.getRuleByFormula(item.JsFormula, _this5.catalogCodex, _this5.CatalogData.multiselectOptions);
|
|
24449
24502
|
}),
|
|
24450
24503
|
catalogName: this.CatalogData.catalogName,
|
|
24451
24504
|
catalogCodex: this.catalogCodex,
|
|
@@ -28454,15 +28507,15 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28454
28507
|
var ending = i !== variants.length - 1 ? ',\n' : '';
|
|
28455
28508
|
if (variant.isFreeText) {
|
|
28456
28509
|
if (variant.MeasureUnit) {
|
|
28457
|
-
var _variant$OPTName_loca;
|
|
28458
|
-
ret[lang] += ((_variant$OPTName_loca = variant.OPTName_locales) === null || _variant$
|
|
28510
|
+
var _variant$OPTName_loca, _variant$OPTName_loca2;
|
|
28511
|
+
ret[lang] += ((_variant$OPTName_loca = (_variant$OPTName_loca2 = variant.OPTName_locales) === null || _variant$OPTName_loca2 === void 0 ? void 0 : _variant$OPTName_loca2[lang]) !== null && _variant$OPTName_loca !== void 0 ? _variant$OPTName_loca : variant.OPTName) + ': ' + variant.FreeText + variant.MeasureUnit + ending;
|
|
28459
28512
|
} else {
|
|
28460
|
-
var _variant$
|
|
28461
|
-
ret[lang] += ((_variant$
|
|
28513
|
+
var _variant$OPTName_loca3, _variant$OPTName_loca4;
|
|
28514
|
+
ret[lang] += ((_variant$OPTName_loca3 = (_variant$OPTName_loca4 = variant.OPTName_locales) === null || _variant$OPTName_loca4 === void 0 ? void 0 : _variant$OPTName_loca4[lang]) !== null && _variant$OPTName_loca3 !== void 0 ? _variant$OPTName_loca3 : variant.OPTName) + ': ' + variant.FreeText + ending;
|
|
28462
28515
|
}
|
|
28463
28516
|
} else {
|
|
28464
|
-
var _variant$
|
|
28465
|
-
ret[lang] += ((_variant$
|
|
28517
|
+
var _variant$OPTName_loca5, _variant$OPTName_loca6, _variant$OPVName_loca, _variant$OPVName_loca2;
|
|
28518
|
+
ret[lang] += ((_variant$OPTName_loca5 = (_variant$OPTName_loca6 = variant.OPTName_locales) === null || _variant$OPTName_loca6 === void 0 ? void 0 : _variant$OPTName_loca6[lang]) !== null && _variant$OPTName_loca5 !== void 0 ? _variant$OPTName_loca5 : variant.OPTName) + ': ' + ((_variant$OPVName_loca = (_variant$OPVName_loca2 = variant.OPVName_locales) === null || _variant$OPVName_loca2 === void 0 ? void 0 : _variant$OPVName_loca2[lang]) !== null && _variant$OPVName_loca !== void 0 ? _variant$OPVName_loca : variant.OPVName) + ending;
|
|
28466
28519
|
}
|
|
28467
28520
|
}
|
|
28468
28521
|
}
|
|
@@ -28558,7 +28611,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28558
28611
|
break;
|
|
28559
28612
|
}
|
|
28560
28613
|
_context5.next = 3;
|
|
28561
|
-
return import('./DoorPlanner-
|
|
28614
|
+
return import('./DoorPlanner-c811330f.js');
|
|
28562
28615
|
case 3:
|
|
28563
28616
|
_yield$import = _context5.sent;
|
|
28564
28617
|
DoorPlanner = _yield$import["default"];
|
|
@@ -28732,7 +28785,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28732
28785
|
key: "cloneSet",
|
|
28733
28786
|
value: function cloneSet() {
|
|
28734
28787
|
var clonedSet = new DivaSet(this.CatalogData, this.setId, {}, _objectSpread$c({}, this.setState));
|
|
28735
|
-
clonedSet.setData = this.setData;
|
|
28788
|
+
clonedSet.setData = _objectSpread$c({}, this.setData);
|
|
28736
28789
|
clonedSet.configSingle = this.configSingle;
|
|
28737
28790
|
var articles = this.getDivaArticles();
|
|
28738
28791
|
//if boxplanner needs to be working, the planner needs to be cloned too
|
|
@@ -31263,7 +31316,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31263
31316
|
return _context2.abrupt("return", 1);
|
|
31264
31317
|
case 3:
|
|
31265
31318
|
if (!orderline.IsPartlistArticle) {
|
|
31266
|
-
variantValues = catalogData.repairVariantValues(orderline.getVariantValues());
|
|
31319
|
+
variantValues = catalogData.repairVariantValues(orderline.getVariantValues(), orderline.ArticleCodex);
|
|
31267
31320
|
toLoadArticles.push({
|
|
31268
31321
|
catalogCodex: catalogData.catalogCodex,
|
|
31269
31322
|
articleCodex: orderline.ArticleCodex,
|
|
@@ -32180,7 +32233,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32180
32233
|
_context16.next = 15;
|
|
32181
32234
|
break;
|
|
32182
32235
|
}
|
|
32183
|
-
allElementsToDelete = set.plannerHandler.getPlannerElementsInfluencedByDeletion(setId, article.elementId);
|
|
32236
|
+
allElementsToDelete = set.plannerHandler.getPlannerElementsInfluencedByDeletion(setId, article.elementId, deletionType);
|
|
32184
32237
|
i = 0;
|
|
32185
32238
|
case 8:
|
|
32186
32239
|
if (!(i < allElementsToDelete.length)) {
|
|
@@ -32189,7 +32242,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32189
32242
|
}
|
|
32190
32243
|
art = set.getArticleByElementId(allElementsToDelete[i]);
|
|
32191
32244
|
_context16.next = 12;
|
|
32192
|
-
return this.deleteElementFromSet(set, art, undefined,
|
|
32245
|
+
return this.deleteElementFromSet(set, art, undefined, 'STD_DONTUPDATE', true, true);
|
|
32193
32246
|
case 12:
|
|
32194
32247
|
i++;
|
|
32195
32248
|
_context16.next = 8;
|
|
@@ -32629,6 +32682,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32629
32682
|
}
|
|
32630
32683
|
return groupedArticles;
|
|
32631
32684
|
}
|
|
32685
|
+
|
|
32686
|
+
/**
|
|
32687
|
+
* This function returns all planner Interaction informations for a specific set
|
|
32688
|
+
* @param set
|
|
32689
|
+
* @returns
|
|
32690
|
+
*/
|
|
32691
|
+
}, {
|
|
32692
|
+
key: "getPlannerInteractionInformation",
|
|
32693
|
+
value: function getPlannerInteractionInformation(set) {
|
|
32694
|
+
return set.plannerHandler.getPlannerInteractionInformation(set.getSetId());
|
|
32695
|
+
}
|
|
32632
32696
|
}, {
|
|
32633
32697
|
key: "getLastElementInGroup",
|
|
32634
32698
|
value: function getLastElementInGroup(article) {
|
|
@@ -33314,7 +33378,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33314
33378
|
value: (function () {
|
|
33315
33379
|
var _updateArticlesOptionStatesOfActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(set, myValues, targetArticlesWithNewValues, ignorePlanner, from, partlistDiff) {
|
|
33316
33380
|
var _Object$keys, _resultPlannerUpdate;
|
|
33317
|
-
var elementsToDeleteById, targetArticlesToUpdateOnly, retValues, diff, resultPlannerUpdate, targetElementIds, i, articleToDel, index, articleCopyRelation, newArticle;
|
|
33381
|
+
var elementsToDeleteById, targetArticlesToUpdateOnly, retValues, diff, resultPlannerUpdate, targetElementIds, i, articleToDel, index, result, articleCopyRelation, newArticle;
|
|
33318
33382
|
return _regeneratorRuntime.wrap(function _callee27$(_context29) {
|
|
33319
33383
|
while (1) switch (_context29.prev = _context29.next) {
|
|
33320
33384
|
case 0:
|
|
@@ -33364,7 +33428,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33364
33428
|
|
|
33365
33429
|
//Update Planner - check if planner data changed
|
|
33366
33430
|
if (!(!ignorePlanner && from != 'calcVariant')) {
|
|
33367
|
-
_context29.next =
|
|
33431
|
+
_context29.next = 55;
|
|
33368
33432
|
break;
|
|
33369
33433
|
}
|
|
33370
33434
|
targetElementIds = this.getElementIdsOfArticles(set, targetArticlesWithNewValues);
|
|
@@ -33372,56 +33436,74 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33372
33436
|
return set.plannerHandler.updatePlanner(set.getSetId(), myValues, targetElementIds);
|
|
33373
33437
|
case 24:
|
|
33374
33438
|
resultPlannerUpdate = _context29.sent;
|
|
33439
|
+
elementsToDeleteById = resultPlannerUpdate.elemIdsToDelete;
|
|
33440
|
+
for (i = 0; i < resultPlannerUpdate.elemIdsToDelete.length; i++) {
|
|
33441
|
+
articleToDel = set.getArticleByElementId(resultPlannerUpdate.elemIdsToDelete[i]);
|
|
33442
|
+
index = targetArticlesWithNewValues.indexOf(articleToDel.basketId, 0);
|
|
33443
|
+
if (index > -1) {
|
|
33444
|
+
targetArticlesWithNewValues.splice(index, 1);
|
|
33445
|
+
}
|
|
33446
|
+
}
|
|
33447
|
+
if (!resultPlannerUpdate.doDeleteBackGrid) {
|
|
33448
|
+
_context29.next = 34;
|
|
33449
|
+
break;
|
|
33450
|
+
}
|
|
33451
|
+
_context29.next = 30;
|
|
33452
|
+
return this.deleteElementFromSetByElemId(set, resultPlannerUpdate.elemIdsToDelete[0], false, resultPlannerUpdate.deletionType);
|
|
33453
|
+
case 30:
|
|
33454
|
+
result = _context29.sent;
|
|
33455
|
+
//Others are deleted recursive
|
|
33456
|
+
if (result.selectElementId) {
|
|
33457
|
+
resultPlannerUpdate.elementIdsToUpdateSelection = [result.selectElementId];
|
|
33458
|
+
}
|
|
33459
|
+
_context29.next = 41;
|
|
33460
|
+
break;
|
|
33461
|
+
case 34:
|
|
33375
33462
|
i = 0;
|
|
33376
|
-
case
|
|
33463
|
+
case 35:
|
|
33377
33464
|
if (!(i < resultPlannerUpdate.elemIdsToDelete.length)) {
|
|
33378
|
-
_context29.next =
|
|
33465
|
+
_context29.next = 41;
|
|
33379
33466
|
break;
|
|
33380
33467
|
}
|
|
33381
|
-
|
|
33382
|
-
index = targetArticlesWithNewValues.indexOf(articleToDel.basketId, 0);
|
|
33383
|
-
if (index > -1) {
|
|
33384
|
-
targetArticlesWithNewValues.splice(index, 1);
|
|
33385
|
-
}
|
|
33386
|
-
_context29.next = 32;
|
|
33468
|
+
_context29.next = 38;
|
|
33387
33469
|
return this.deleteElementFromSetByElemId(set, resultPlannerUpdate.elemIdsToDelete[i], false, resultPlannerUpdate.deletionType);
|
|
33388
|
-
case
|
|
33470
|
+
case 38:
|
|
33389
33471
|
i++;
|
|
33390
|
-
_context29.next =
|
|
33472
|
+
_context29.next = 35;
|
|
33391
33473
|
break;
|
|
33392
|
-
case
|
|
33474
|
+
case 41:
|
|
33393
33475
|
if (!(resultPlannerUpdate.elementIdToCopy && resultPlannerUpdate.elementIdToCopy.length > 0)) {
|
|
33394
|
-
_context29.next =
|
|
33476
|
+
_context29.next = 54;
|
|
33395
33477
|
break;
|
|
33396
33478
|
}
|
|
33397
33479
|
//Todo copy these elements
|
|
33398
33480
|
articleCopyRelation = new Map();
|
|
33399
33481
|
i = 0;
|
|
33400
|
-
case
|
|
33482
|
+
case 44:
|
|
33401
33483
|
if (!(i < resultPlannerUpdate.elementIdToCopy.length)) {
|
|
33402
|
-
_context29.next =
|
|
33484
|
+
_context29.next = 52;
|
|
33403
33485
|
break;
|
|
33404
33486
|
}
|
|
33405
|
-
_context29.next =
|
|
33487
|
+
_context29.next = 47;
|
|
33406
33488
|
return this.copyArticleByElementId(set, resultPlannerUpdate.elementIdToCopy[i], resultPlannerUpdate.ignoreOptionsToCopy);
|
|
33407
|
-
case
|
|
33489
|
+
case 47:
|
|
33408
33490
|
newArticle = _context29.sent;
|
|
33409
33491
|
articleCopyRelation.set(resultPlannerUpdate.elementIdToCopy[i], newArticle.basketId);
|
|
33410
|
-
case
|
|
33492
|
+
case 49:
|
|
33411
33493
|
i++;
|
|
33412
|
-
_context29.next =
|
|
33494
|
+
_context29.next = 44;
|
|
33413
33495
|
break;
|
|
33414
|
-
case
|
|
33415
|
-
_context29.next =
|
|
33496
|
+
case 52:
|
|
33497
|
+
_context29.next = 54;
|
|
33416
33498
|
return set.plannerHandler.copyPlannerElements(set.getSetId(), articleCopyRelation, {
|
|
33417
33499
|
dpType: resultPlannerUpdate.copyDPType ? resultPlannerUpdate.copyDPType : 'NO',
|
|
33418
33500
|
copyType: resultPlannerUpdate.copyType,
|
|
33419
33501
|
changedOPT: resultPlannerUpdate.changedOPT,
|
|
33420
33502
|
targetElements: resultPlannerUpdate.targetElements
|
|
33421
33503
|
});
|
|
33422
|
-
case
|
|
33504
|
+
case 54:
|
|
33423
33505
|
this.updatePosNrOfAccessoiresOfTargetArticles(set, targetArticlesWithNewValues);
|
|
33424
|
-
case
|
|
33506
|
+
case 55:
|
|
33425
33507
|
if (from == 'FromViewClick' && (_Object$keys = Object.keys(myValues)) !== null && _Object$keys !== void 0 && _Object$keys.length) {
|
|
33426
33508
|
this.confirmOptionsInMetric(set, [Object.keys(myValues)[0]]);
|
|
33427
33509
|
}
|
|
@@ -33430,7 +33512,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33430
33512
|
elementIdsToUpdateSelection: (_resultPlannerUpdate = resultPlannerUpdate) === null || _resultPlannerUpdate === void 0 ? void 0 : _resultPlannerUpdate.elementIdsToUpdateSelection,
|
|
33431
33513
|
setId: set.getSetId()
|
|
33432
33514
|
});
|
|
33433
|
-
case
|
|
33515
|
+
case 57:
|
|
33434
33516
|
case "end":
|
|
33435
33517
|
return _context29.stop();
|
|
33436
33518
|
}
|
|
@@ -34371,7 +34453,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34371
34453
|
value: function () {
|
|
34372
34454
|
var _initializeBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(api) {
|
|
34373
34455
|
var _this$plannerConfig$s3, _this$plannerConfig$s5, _api$getPlannerType, _this$plannerConfig$r;
|
|
34374
|
-
var
|
|
34456
|
+
var returnSuccessfully, divaNr, i, os, _this$plannerConfig$a4, params, _params$customFieldsT, _this$plannerConfig$h, _this$plannerConfig$c, _this$plannerConfig$c2, _this$plannerConfig$c3, _result$data$, result, _result$data$2, _this$plannerConfig$s4, _this$plannerConfig$a5, _api$getI18n, _api$getI18n2, successfully;
|
|
34375
34457
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
34376
34458
|
while (1) switch (_context.prev = _context.next) {
|
|
34377
34459
|
case 0:
|
|
@@ -34450,15 +34532,15 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34450
34532
|
divaNr: this.divaNr
|
|
34451
34533
|
});
|
|
34452
34534
|
}
|
|
34535
|
+
if (!returnSuccessfully) {
|
|
34536
|
+
_context.next = 37;
|
|
34537
|
+
break;
|
|
34538
|
+
}
|
|
34453
34539
|
if ((_this$plannerConfig$a4 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a4 !== void 0 && _this$plannerConfig$a4.length) {
|
|
34454
34540
|
this.initializationType = 'ARTICLELIST';
|
|
34455
34541
|
} else {
|
|
34456
34542
|
this.initializationType = 'MODELINFO';
|
|
34457
34543
|
}
|
|
34458
|
-
if (!returnSuccessfully) {
|
|
34459
|
-
_context.next = 37;
|
|
34460
|
-
break;
|
|
34461
|
-
}
|
|
34462
34544
|
return _context.abrupt("return", returnSuccessfully);
|
|
34463
34545
|
case 37:
|
|
34464
34546
|
if (!this.loadDivaNr) {
|
|
@@ -34478,15 +34560,15 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34478
34560
|
this.assignNewDivaNr = true;
|
|
34479
34561
|
params = api.getLoadProductBasketParams();
|
|
34480
34562
|
if (!params) {
|
|
34481
|
-
_context.next =
|
|
34563
|
+
_context.next = 52;
|
|
34482
34564
|
break;
|
|
34483
34565
|
}
|
|
34484
|
-
|
|
34566
|
+
this.initializationType = 'CUSTOM_PRODUCT_ID';
|
|
34567
|
+
_context.next = 51;
|
|
34485
34568
|
return this.loadBasketByCustomProductId(api, params.customProductField, this.plannerConfig.customProductId, (_params$customFieldsT = params.customFieldsToLoad) !== null && _params$customFieldsT !== void 0 && _params$customFieldsT.length ? params.customFieldsToLoad : []);
|
|
34486
|
-
case 50:
|
|
34487
|
-
return _context.abrupt("return", _context.sent);
|
|
34488
34569
|
case 51:
|
|
34489
|
-
|
|
34570
|
+
return _context.abrupt("return", _context.sent);
|
|
34571
|
+
case 52:
|
|
34490
34572
|
return _context.abrupt("return", false);
|
|
34491
34573
|
case 55:
|
|
34492
34574
|
if (!this.plannerConfig.productId) {
|
|
@@ -35294,7 +35376,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35294
35376
|
break;
|
|
35295
35377
|
case 3:
|
|
35296
35378
|
_context12.next = 5;
|
|
35297
|
-
return import('./PfisterWWSHandler-
|
|
35379
|
+
return import('./PfisterWWSHandler-b7dd5d62.js');
|
|
35298
35380
|
case 5:
|
|
35299
35381
|
_yield$import = _context12.sent;
|
|
35300
35382
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -35302,7 +35384,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35302
35384
|
return _context12.abrupt("break", 27);
|
|
35303
35385
|
case 9:
|
|
35304
35386
|
_context12.next = 11;
|
|
35305
|
-
return import('./LiviqueWWSHandler-
|
|
35387
|
+
return import('./LiviqueWWSHandler-2f2c63a7.js');
|
|
35306
35388
|
case 11:
|
|
35307
35389
|
_yield$import2 = _context12.sent;
|
|
35308
35390
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -35310,7 +35392,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35310
35392
|
return _context12.abrupt("break", 27);
|
|
35311
35393
|
case 15:
|
|
35312
35394
|
_context12.next = 17;
|
|
35313
|
-
return import('./SeriousBasketHandler-
|
|
35395
|
+
return import('./SeriousBasketHandler-a0a3258f.js');
|
|
35314
35396
|
case 17:
|
|
35315
35397
|
_yield$import3 = _context12.sent;
|
|
35316
35398
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -35318,7 +35400,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35318
35400
|
return _context12.abrupt("break", 27);
|
|
35319
35401
|
case 21:
|
|
35320
35402
|
_context12.next = 23;
|
|
35321
|
-
return import('./StandardWWSHandler-
|
|
35403
|
+
return import('./StandardWWSHandler-8b675fe0.js');
|
|
35322
35404
|
case 23:
|
|
35323
35405
|
_yield$import4 = _context12.sent;
|
|
35324
35406
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -36761,7 +36843,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36761
36843
|
while (1) switch (_context3.prev = _context3.next) {
|
|
36762
36844
|
case 0:
|
|
36763
36845
|
_context3.next = 2;
|
|
36764
|
-
return import('./Host3DSignalR-
|
|
36846
|
+
return import('./Host3DSignalR-2bfc7356.js');
|
|
36765
36847
|
case 2:
|
|
36766
36848
|
_yield$import = _context3.sent;
|
|
36767
36849
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -38203,7 +38285,8 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38203
38285
|
break;
|
|
38204
38286
|
}
|
|
38205
38287
|
return _context2.abrupt("return", {
|
|
38206
|
-
elemIdsToDelete: []
|
|
38288
|
+
elemIdsToDelete: [],
|
|
38289
|
+
doDeleteBackGrid: false
|
|
38207
38290
|
});
|
|
38208
38291
|
case 2:
|
|
38209
38292
|
//Nothing changes, so do nothing
|
|
@@ -38325,7 +38408,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38325
38408
|
break;
|
|
38326
38409
|
case 8:
|
|
38327
38410
|
_context4.next = 10;
|
|
38328
|
-
return import('./DivaStandardPlanner-
|
|
38411
|
+
return import('./DivaStandardPlanner-fd494faa.js');
|
|
38329
38412
|
case 10:
|
|
38330
38413
|
_yield$import = _context4.sent;
|
|
38331
38414
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -38336,7 +38419,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38336
38419
|
return _context4.abrupt("break", 21);
|
|
38337
38420
|
case 15:
|
|
38338
38421
|
_context4.next = 17;
|
|
38339
|
-
return import('./DivaBoxPlanner-
|
|
38422
|
+
return import('./DivaBoxPlanner-ecd0e7d9.js');
|
|
38340
38423
|
case 17:
|
|
38341
38424
|
_yield$import2 = _context4.sent;
|
|
38342
38425
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -38959,11 +39042,11 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38959
39042
|
*/
|
|
38960
39043
|
}, {
|
|
38961
39044
|
key: "getPlannerElementsInfluencedByDeletion",
|
|
38962
|
-
value: function getPlannerElementsInfluencedByDeletion(setId, elementId) {
|
|
39045
|
+
value: function getPlannerElementsInfluencedByDeletion(setId, elementId, deletionType) {
|
|
38963
39046
|
if (!this.plannerList.has(setId)) {
|
|
38964
39047
|
return [];
|
|
38965
39048
|
}
|
|
38966
|
-
return this.plannerList.get(setId).getPlannerElementsInfluencedByDeletion(elementId);
|
|
39049
|
+
return this.plannerList.get(setId).getPlannerElementsInfluencedByDeletion(elementId, deletionType);
|
|
38967
39050
|
}
|
|
38968
39051
|
|
|
38969
39052
|
/**
|
|
@@ -39075,6 +39158,14 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39075
39158
|
}
|
|
39076
39159
|
return [];
|
|
39077
39160
|
}
|
|
39161
|
+
}, {
|
|
39162
|
+
key: "getPlannerInteractionInformation",
|
|
39163
|
+
value: function getPlannerInteractionInformation(setId) {
|
|
39164
|
+
if (this.plannerList.has(setId)) {
|
|
39165
|
+
return this.plannerList.get(setId).getPlannerInteractionInformation();
|
|
39166
|
+
}
|
|
39167
|
+
return undefined;
|
|
39168
|
+
}
|
|
39078
39169
|
}, {
|
|
39079
39170
|
key: "handle3DVisualizationChanged",
|
|
39080
39171
|
value: function handle3DVisualizationChanged(mode, params, doShow3DDimensionLines, alternateRenderingsExist) {
|
|
@@ -39379,7 +39470,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39379
39470
|
_defineProperty(this, "api", void 0);
|
|
39380
39471
|
_defineProperty(this, "setHQRenderScript", void 0);
|
|
39381
39472
|
_defineProperty(this, "setCamInfo", void 0);
|
|
39382
|
-
_defineProperty(this, "initializationType", void 0);
|
|
39383
39473
|
_defineProperty(this, "getPlannerHandlerFunctions", function () {
|
|
39384
39474
|
return {
|
|
39385
39475
|
updateCamInfo: _this.setCamInfo,
|
|
@@ -39648,7 +39738,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39648
39738
|
deletionResult = _context4.sent;
|
|
39649
39739
|
(_this$actions7 = _this.actions) === null || _this$actions7 === void 0 || (_this$actions7$toggle = _this$actions7.toggleLoading) === null || _this$actions7$toggle === void 0 || _this$actions7$toggle.call(_this$actions7, 'plannerswitch' + articleCodex, false, true);
|
|
39650
39740
|
initParams.oldPlannerTransform = deletionResult.oldTransform;
|
|
39651
|
-
initParams.variantValues = variantValues
|
|
39741
|
+
initParams.variantValues = _objectSpread$5(_objectSpread$5({}, variantValues), {}, {
|
|
39742
|
+
OPTPLANNERSWITCH: 'OPV' + articleCodex
|
|
39743
|
+
});
|
|
39652
39744
|
_context4.next = 11;
|
|
39653
39745
|
return setHandlerInstance.addPlannerElement(set, articleCodex, initParams);
|
|
39654
39746
|
case 11:
|
|
@@ -39925,7 +40017,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39925
40017
|
_defineProperty(this, "doConfigure", /*#__PURE__*/function () {
|
|
39926
40018
|
var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents) {
|
|
39927
40019
|
var _this$actions13, _this$actions13$toggl, _this$actions14, _this$actions14$toggl;
|
|
39928
|
-
var set, returnValues, structure, _returnValues$element, _this$updateViewPlann8, _this$updateElementSe4;
|
|
40020
|
+
var set, returnValues, structure, _returnValues$element, _this$updateViewPlann8, _this$updateElementSe4, info;
|
|
39929
40021
|
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
39930
40022
|
while (1) switch (_context11.prev = _context11.next) {
|
|
39931
40023
|
case 0:
|
|
@@ -39964,7 +40056,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39964
40056
|
return _this.fillBaksetforOnWebPlanerConfigChange(myValues);
|
|
39965
40057
|
case 21:
|
|
39966
40058
|
_this.configuratorChangeLog('onConfiguratorStep', myValues);
|
|
39967
|
-
|
|
40059
|
+
info = setHandlerInstance.getPlannerInteractionInformation(set);
|
|
40060
|
+
if (info) LOG$1.debug(info.boxPlannerInteractionInformationPerElement.keys.length.toString());
|
|
40061
|
+
case 24:
|
|
39968
40062
|
case "end":
|
|
39969
40063
|
return _context11.stop();
|
|
39970
40064
|
}
|
|
@@ -40089,7 +40183,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40089
40183
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
40090
40184
|
case 12:
|
|
40091
40185
|
loadSuccessful = _context13.sent;
|
|
40092
|
-
if (!this.divaBasketHandler.hasConfiguratorSessionIdGetter || DivaUtils.businessMetrics.getConfiguratorSessionId()
|
|
40186
|
+
if (this.plannerConfig.configuratorSessionId === undefined && (!this.divaBasketHandler.hasConfiguratorSessionIdGetter || DivaUtils.businessMetrics.getConfiguratorSessionId() === undefined)) {
|
|
40093
40187
|
DivaUtils.businessMetrics.setConfiguratorSessionId();
|
|
40094
40188
|
}
|
|
40095
40189
|
if (!loadSuccessful) {
|
|
@@ -56433,16 +56527,6 @@ var a$9 = [{
|
|
|
56433
56527
|
name: 'System 4',
|
|
56434
56528
|
speciality: 'black border',
|
|
56435
56529
|
url: 'https://cdn.diva-portal.com/media/9408e932-10ca-4a96-84e3-2aba07e52624/MOC/bc44222a-693c-4278-a977-d2899a97b6c5/catQUADRO_V2/DivaNrDIVA-6870908-1-1662105883430.txt'
|
|
56436
|
-
}, {
|
|
56437
|
-
divaNr: 'DIVA-990926-1',
|
|
56438
|
-
name: 'System 4',
|
|
56439
|
-
speciality: 'doppelmodul einfach',
|
|
56440
|
-
url: 'https://cdn.diva-portal.com/media/9408e932-10ca-4a96-84e3-2aba07e52624/MOC/bc44222a-693c-4278-a977-d2899a97b6c5/catQUADRO_V2/DivaNrDIVA-990926-1-1662105885615.txt'
|
|
56441
|
-
}, {
|
|
56442
|
-
divaNr: 'DIVA-5371884-1',
|
|
56443
|
-
name: 'System 4',
|
|
56444
|
-
speciality: 'doppelmodul komplex',
|
|
56445
|
-
url: 'https://cdn.diva-portal.com/media/9408e932-10ca-4a96-84e3-2aba07e52624/MOC/bc44222a-693c-4278-a977-d2899a97b6c5/catQUADRO_V2/DivaNrDIVA-5371884-1-1662105888677.txt'
|
|
56446
56530
|
}];
|
|
56447
56531
|
|
|
56448
56532
|
var a$8 = [{
|
|
@@ -56635,11 +56719,6 @@ var a$8 = [{
|
|
|
56635
56719
|
name: 'Steinpol Poco VME Carolina XC',
|
|
56636
56720
|
speciality: '',
|
|
56637
56721
|
url: 'https://cdn.diva-portal.com/media/874b9f97-66bb-4ba5-9bcd-8044331c33f6/MOC/1fe5397e-9969-4baf-b891-bcb799e8c59d/cat6234/DivaNrDIVA-373156-1.txt'
|
|
56638
|
-
}, {
|
|
56639
|
-
divaNr: 'DIVA-83970-1',
|
|
56640
|
-
name: 'Steinpol Poco VME Limone',
|
|
56641
|
-
speciality: '',
|
|
56642
|
-
url: 'https://cdn.diva-portal.com/media/874b9f97-66bb-4ba5-9bcd-8044331c33f6/MOC/1fe5397e-9969-4baf-b891-bcb799e8c59d/cat5936/DivaNrDIVA-83970-1.txt'
|
|
56643
56722
|
}, {
|
|
56644
56723
|
divaNr: 'DIVA-438941-1',
|
|
56645
56724
|
name: 'Steinpol Poco VME Westpoint ',
|