@crystaldesign/web-planner-logic 25.3.0-beta.4 → 25.3.0-beta.43
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-230a7343.js → DivaBoxPlanner-46402c20.js} +2 -2
- package/build/cjs/{DivaStandardPlanner-3b70656f.js → DivaStandardPlanner-17883180.js} +2 -2
- package/build/cjs/{DoorPlanner-85f5df3d.js → DoorPlanner-221c9c49.js} +1 -1
- package/build/cjs/{Host3DSignalR-06a86be8.js → Host3DSignalR-69b30afc.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-8e9cc61c.js → LiviqueWWSHandler-aa404722.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-786700cb.js → PfisterWWSHandler-876282db.js} +1 -1
- package/build/cjs/{PlannerHandler2D-d4305a93.js → PlannerHandler2D-8cd953e2.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-70977945.js → SeriousBasketHandler-4cb76b03.js} +1 -1
- package/build/cjs/{ShelfPlanner-89d47e5e.js → ShelfPlanner-6de97cfd.js} +39 -22
- package/build/cjs/{StandardWWSHandler-4e8f472a.js → StandardWWSHandler-6e3f9da2.js} +1 -1
- package/build/cjs/{index-1df7482f.js → index-2c9c3b61.js} +543 -404
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-ef50f3c1.js → DivaBoxPlanner-9d2e1053.js} +2 -2
- package/build/esm/{DivaStandardPlanner-50298918.js → DivaStandardPlanner-b022892b.js} +2 -2
- package/build/esm/{DoorPlanner-43de473a.js → DoorPlanner-fffee417.js} +1 -1
- package/build/esm/{Host3DSignalR-b772e3b5.js → Host3DSignalR-6656425e.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-e63f276f.js → LiviqueWWSHandler-bda7977e.js} +1 -1
- package/build/esm/{PfisterWWSHandler-7f7996a7.js → PfisterWWSHandler-9e3b6845.js} +1 -1
- package/build/esm/{PlannerHandler2D-4e72c491.js → PlannerHandler2D-edea4da7.js} +1 -1
- package/build/esm/{SeriousBasketHandler-1a4186bd.js → SeriousBasketHandler-d833f66b.js} +1 -1
- package/build/esm/{ShelfPlanner-152084c3.js → ShelfPlanner-3deb1e8d.js} +39 -22
- package/build/esm/{StandardWWSHandler-a5d84eb8.js → StandardWWSHandler-e656dc82.js} +1 -1
- package/build/esm/{index-474fc67f.js → index-65f9b1c8.js} +543 -404
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +2 -1
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Configuration.d.ts +5 -0
- package/build/types/web-planner-logic/src/interface/Configuration.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +2 -0
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +1 -7
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts +0 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +5 -0
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts +4 -0
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts +2 -2
- package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +5 -0
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +4 -0
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts +1 -0
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts +5 -0
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +3 -0
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -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/Rendering/PlannerHandler3D.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/ViewPointHandler.d.ts +0 -4
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/ViewPointHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/repairBasket.d.ts +2 -2
- package/build/types/web-planner-logic/src/logic/repairBasket.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts +2 -0
- package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts +5 -0
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts +5 -0
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/datas/environments/scripts/pfister-prod.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/datas/environments/scripts/pfister-quality.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/datas/environments/testing/retail-test.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -434,6 +434,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
434
434
|
barrierConfig: data.barrierConfig,
|
|
435
435
|
dontLoadAdditionalModelInfos: data.dontLoadAdditionalModelInfos,
|
|
436
436
|
arViewerUrl: data.arViewerUrl,
|
|
437
|
+
arViewerIframe: data.arViewerIframe,
|
|
437
438
|
useMask: data.useMask,
|
|
438
439
|
loadProductBasketParams: data.loadProductBasketParams,
|
|
439
440
|
addOrganizationIdToCacheKey: data.addOrganizationIdToCacheKey
|
|
@@ -1676,7 +1677,6 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
|
|
|
1676
1677
|
parent: parent,
|
|
1677
1678
|
ocd: jsonOPV.OCD,
|
|
1678
1679
|
quantity: jsonOPV.Quantity ? Number(jsonOPV.Quantity) : 1,
|
|
1679
|
-
isDefault: jsonOPV.IsDefault,
|
|
1680
1680
|
isPIMFlatValue: jsonOPV.PIMFlatValues === 'True',
|
|
1681
1681
|
isVariantAttribute: jsonOPV.IsVariantAttribute
|
|
1682
1682
|
};
|
|
@@ -1933,6 +1933,11 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
|
|
|
1933
1933
|
get: function get() {
|
|
1934
1934
|
return this.opv.subArticleTypeNr;
|
|
1935
1935
|
}
|
|
1936
|
+
}, {
|
|
1937
|
+
key: "addToMeasure",
|
|
1938
|
+
get: function get() {
|
|
1939
|
+
return this.opv.catalogOPV.addToMeasure;
|
|
1940
|
+
}
|
|
1936
1941
|
}, {
|
|
1937
1942
|
key: "hideSubarticleDescription",
|
|
1938
1943
|
get: function get() {
|
|
@@ -16094,6 +16099,15 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16094
16099
|
case 'SET_BY_RULE':
|
|
16095
16100
|
this.opv.setByRule = prop.Value;
|
|
16096
16101
|
break;
|
|
16102
|
+
case 'ADD_TO_MEASURE':
|
|
16103
|
+
this.opv.addToMeasure = prop.Value.split(';').map(function (v) {
|
|
16104
|
+
return {
|
|
16105
|
+
op: v.split(':')[0],
|
|
16106
|
+
value: Number(v.split(':')[1]),
|
|
16107
|
+
opt: 'OPT' + v.split(':')[2]
|
|
16108
|
+
};
|
|
16109
|
+
});
|
|
16110
|
+
break;
|
|
16097
16111
|
default:
|
|
16098
16112
|
if (key.includes('__')) break;
|
|
16099
16113
|
var values_locales = [];
|
|
@@ -16389,6 +16403,11 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16389
16403
|
get: function get() {
|
|
16390
16404
|
return this.opv.customDimension;
|
|
16391
16405
|
}
|
|
16406
|
+
}, {
|
|
16407
|
+
key: "addToMeasure",
|
|
16408
|
+
get: function get() {
|
|
16409
|
+
return this.opv.addToMeasure;
|
|
16410
|
+
}
|
|
16392
16411
|
}]);
|
|
16393
16412
|
}();
|
|
16394
16413
|
|
|
@@ -17986,10 +18005,10 @@ var OptionCatalogData = /*#__PURE__*/function () {
|
|
|
17986
18005
|
case 'ONLY_VISIBLE_IF_NOT_UNDOCK':
|
|
17987
18006
|
this.opt.onlyVisibleIfNotDocked = prop.Value;
|
|
17988
18007
|
break;
|
|
17989
|
-
case '
|
|
18008
|
+
case 'ONLY_VISIBLE_IF_CONFIG_SINGLE':
|
|
17990
18009
|
this.opt.onlyVisibleIfConfigSingle = prop.Value;
|
|
17991
18010
|
break;
|
|
17992
|
-
case '
|
|
18011
|
+
case 'ONLY_VISIBLE_IF_CONFIG_ALL':
|
|
17993
18012
|
this.opt.onlyVisibleIfConfigAll = prop.Value;
|
|
17994
18013
|
break;
|
|
17995
18014
|
case 'ISDEFAULTVALUEFOROPTIONS':
|
|
@@ -18297,6 +18316,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18297
18316
|
offlineData: json.OfflineData,
|
|
18298
18317
|
offlineFilesLastUpdate: offlinFileLastUpdateTimestamp,
|
|
18299
18318
|
offlineVersion: json.OfflineVersion,
|
|
18319
|
+
retailCatalogNr: json.RetailCatalogNr,
|
|
18300
18320
|
description: orderSet.Description,
|
|
18301
18321
|
mainCategory: (_json$MainCategory = json.MainCategory) !== null && _json$MainCategory !== void 0 ? _json$MainCategory : json.Name,
|
|
18302
18322
|
supplierCatalogName: json.SupplierCatalogName,
|
|
@@ -18333,7 +18353,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18333
18353
|
headerDimensionIds: [],
|
|
18334
18354
|
dontShowBasePrice: false,
|
|
18335
18355
|
// wenn true - dann sollte Preis Ab im Planner nicht angezeigt werden
|
|
18336
|
-
|
|
18356
|
+
autoOpenContentItem: false,
|
|
18337
18357
|
//KatalogProperties - Planner Themen
|
|
18338
18358
|
divaPlanerDigits: 0,
|
|
18339
18359
|
// Anzahl der Kommastellen bei Masslinien im Planer (Jutzler mit mm)
|
|
@@ -18721,6 +18741,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18721
18741
|
}
|
|
18722
18742
|
} else if (key == 'ARTICLECONFIGALL') {
|
|
18723
18743
|
_this.catalogData.articleConfigAll = item.Value == '1';
|
|
18744
|
+
} else if (key == 'AUTO_OPEN_CONTENTITEM') {
|
|
18745
|
+
_this.catalogData.autoOpenContentItem = item.Value == '1';
|
|
18724
18746
|
} else if (key == 'HIDE_PRICE_GROUPS_OF_OPGS') {
|
|
18725
18747
|
_this.catalogData.hidePriceGroupsOfOPGs = item.Value == '1';
|
|
18726
18748
|
} else if (key == 'DONTHIDEOPTION') {
|
|
@@ -19442,6 +19464,11 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
19442
19464
|
get: function get() {
|
|
19443
19465
|
return this.catalogData.offlineFilesLastUpdate;
|
|
19444
19466
|
}
|
|
19467
|
+
}, {
|
|
19468
|
+
key: "retailCatalogNr",
|
|
19469
|
+
get: function get() {
|
|
19470
|
+
return this.catalogData.retailCatalogNr;
|
|
19471
|
+
}
|
|
19445
19472
|
}, {
|
|
19446
19473
|
key: "description",
|
|
19447
19474
|
get: function get() {
|
|
@@ -19656,6 +19683,11 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
19656
19683
|
get: function get() {
|
|
19657
19684
|
return this.catalogData.alternateRenderings;
|
|
19658
19685
|
}
|
|
19686
|
+
}, {
|
|
19687
|
+
key: "autoOpenContentItem",
|
|
19688
|
+
get: function get() {
|
|
19689
|
+
return this.catalogData.autoOpenContentItem;
|
|
19690
|
+
}
|
|
19659
19691
|
}, {
|
|
19660
19692
|
key: "alternateRenderingsForSummary",
|
|
19661
19693
|
get: function get() {
|
|
@@ -20642,6 +20674,12 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
20642
20674
|
var _this$val$customDimen, _this$val24;
|
|
20643
20675
|
return this.val && ((_this$val$customDimen = (_this$val24 = this.val) === null || _this$val24 === void 0 ? void 0 : _this$val24.customDimension) !== null && _this$val$customDimen !== void 0 ? _this$val$customDimen : this.option.customDimension);
|
|
20644
20676
|
}
|
|
20677
|
+
}, {
|
|
20678
|
+
key: "addToMeasure",
|
|
20679
|
+
get: function get() {
|
|
20680
|
+
var _this$val25;
|
|
20681
|
+
return (_this$val25 = this.val) === null || _this$val25 === void 0 ? void 0 : _this$val25.addToMeasure;
|
|
20682
|
+
}
|
|
20645
20683
|
}, {
|
|
20646
20684
|
key: "showWarningForRequiresUserInput",
|
|
20647
20685
|
get: function get() {
|
|
@@ -22219,6 +22257,16 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22219
22257
|
}
|
|
22220
22258
|
return true;
|
|
22221
22259
|
}
|
|
22260
|
+
}, {
|
|
22261
|
+
key: "optionStatesWithAddToMeasure",
|
|
22262
|
+
value: function optionStatesWithAddToMeasure(opt) {
|
|
22263
|
+
return Object.values(this.articleOptionStates).filter(function (ops) {
|
|
22264
|
+
var _ops$addToMeasure, _ops$addToMeasure2;
|
|
22265
|
+
return ((_ops$addToMeasure = ops.addToMeasure) === null || _ops$addToMeasure === void 0 ? void 0 : _ops$addToMeasure.find(function (o) {
|
|
22266
|
+
return o.opt == opt;
|
|
22267
|
+
})) || ops.optionCodex == opt && ((_ops$addToMeasure2 = ops.addToMeasure) === null || _ops$addToMeasure2 === void 0 ? void 0 : _ops$addToMeasure2.length);
|
|
22268
|
+
});
|
|
22269
|
+
}
|
|
22222
22270
|
}, {
|
|
22223
22271
|
key: "requiredUserInputOptions",
|
|
22224
22272
|
get: function get() {
|
|
@@ -22954,6 +23002,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22954
23002
|
}
|
|
22955
23003
|
this.updateIDMSpecificFeature(myArtOPS);
|
|
22956
23004
|
}
|
|
23005
|
+
this.updateOptionsWithAddToMeasure(OP);
|
|
22957
23006
|
}
|
|
22958
23007
|
}, {
|
|
22959
23008
|
key: "updateIDMSpecificFeature",
|
|
@@ -23109,6 +23158,61 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23109
23158
|
return myDesc;
|
|
23110
23159
|
}
|
|
23111
23160
|
}
|
|
23161
|
+
}, {
|
|
23162
|
+
key: "updateOptionsWithAddToMeasure",
|
|
23163
|
+
value: function updateOptionsWithAddToMeasure(optionCodex) {
|
|
23164
|
+
var opsWithAddToMeasure = this.optionStatesWithAddToMeasure(optionCodex);
|
|
23165
|
+
var result = undefined;
|
|
23166
|
+
var optionsUsedFreetext = {};
|
|
23167
|
+
for (var i = 0; i < opsWithAddToMeasure.length; i++) {
|
|
23168
|
+
var _result2;
|
|
23169
|
+
var addToMeasureOps = opsWithAddToMeasure[i];
|
|
23170
|
+
for (var j = 0; j < addToMeasureOps.addToMeasure.length; j++) {
|
|
23171
|
+
var _Number, _this$getArticleOptio4;
|
|
23172
|
+
var addToMeasure = addToMeasureOps.addToMeasure[j];
|
|
23173
|
+
var value = optionsUsedFreetext[addToMeasure.opt] ? 0 : (_Number = Number((_this$getArticleOptio4 = this.getArticleOptionState(addToMeasure.opt)) === null || _this$getArticleOptio4 === void 0 ? void 0 : _this$getArticleOptio4.freeText)) !== null && _Number !== void 0 ? _Number : 0;
|
|
23174
|
+
optionsUsedFreetext[addToMeasure.opt] = true;
|
|
23175
|
+
if (!addToMeasureOps.val) continue;
|
|
23176
|
+
if (isNaN(value)) {
|
|
23177
|
+
result = undefined;
|
|
23178
|
+
break;
|
|
23179
|
+
} else {
|
|
23180
|
+
var _result;
|
|
23181
|
+
result = this.calculateMeasure(addToMeasure, ((_result = result) !== null && _result !== void 0 ? _result : 0) + value);
|
|
23182
|
+
}
|
|
23183
|
+
}
|
|
23184
|
+
this.setOP(addToMeasureOps.optionCodex, addToMeasureOps.val, (_result2 = result) === null || _result2 === void 0 ? void 0 : _result2.toString());
|
|
23185
|
+
}
|
|
23186
|
+
}
|
|
23187
|
+
}, {
|
|
23188
|
+
key: "calcAddToMeasure",
|
|
23189
|
+
value: function calcAddToMeasure(optionCodex, value) {
|
|
23190
|
+
var opsWithAddToMeasure = this.optionStatesWithAddToMeasure(optionCodex);
|
|
23191
|
+
for (var j = 0; j < opsWithAddToMeasure.length; j++) {
|
|
23192
|
+
for (var i = 0; i < opsWithAddToMeasure[j].addToMeasure.length; i++) {
|
|
23193
|
+
var measure = opsWithAddToMeasure[j].addToMeasure[i];
|
|
23194
|
+
if (measure.opt != optionCodex) continue;
|
|
23195
|
+
value = this.calculateMeasure(measure, value);
|
|
23196
|
+
}
|
|
23197
|
+
}
|
|
23198
|
+
return value;
|
|
23199
|
+
}
|
|
23200
|
+
}, {
|
|
23201
|
+
key: "calculateMeasure",
|
|
23202
|
+
value: function calculateMeasure(measure, value) {
|
|
23203
|
+
switch (measure.op) {
|
|
23204
|
+
case '+':
|
|
23205
|
+
return Math.round(value + measure.value);
|
|
23206
|
+
case '-':
|
|
23207
|
+
return Math.round(value - measure.value);
|
|
23208
|
+
case '*':
|
|
23209
|
+
return Math.round(value * measure.value);
|
|
23210
|
+
case '/':
|
|
23211
|
+
return Math.round(value / measure.value);
|
|
23212
|
+
}
|
|
23213
|
+
LOG$d.error(new Error('operator ' + measure.op + ' not implemented'));
|
|
23214
|
+
return value;
|
|
23215
|
+
}
|
|
23112
23216
|
}, {
|
|
23113
23217
|
key: "clearOP",
|
|
23114
23218
|
value: function clearOP(optionCodex) {
|
|
@@ -23999,7 +24103,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23999
24103
|
break;
|
|
24000
24104
|
}
|
|
24001
24105
|
_context.next = 4;
|
|
24002
|
-
return import('./ShelfPlanner-
|
|
24106
|
+
return import('./ShelfPlanner-3deb1e8d.js');
|
|
24003
24107
|
case 4:
|
|
24004
24108
|
_yield$import = _context.sent;
|
|
24005
24109
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -24130,6 +24234,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24130
24234
|
}
|
|
24131
24235
|
if ((mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') && this.parentHasSameOption(OP)) {
|
|
24132
24236
|
var freeTextMeasure = parseFloat(myArtOPS.freeText ? myArtOPS.freeText : '');
|
|
24237
|
+
var newFreeTextMeasure = this.calcAddToMeasure(OP, freeTextMeasure);
|
|
24238
|
+
LOG$d.debug('freetext changed by addToMeasure at price calculation', newFreeTextMeasure, freeTextMeasure, myArtOPS.addToMeasure);
|
|
24239
|
+
freeTextMeasure = newFreeTextMeasure;
|
|
24133
24240
|
if (freeTextMeasure || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
|
|
24134
24241
|
if (calcUnitPrice != 0) {
|
|
24135
24242
|
var quantity = 0;
|
|
@@ -24443,6 +24550,13 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24443
24550
|
}
|
|
24444
24551
|
}
|
|
24445
24552
|
}
|
|
24553
|
+
//for classification usecase when suboption and option have the same name like OPTOPT_MATERIAL_1_00 and OPTOPT_MATERIAL_1_00.OPTOPT_MATERIAL_1_00
|
|
24554
|
+
if (_ops8) {
|
|
24555
|
+
var _ops8$valCodex;
|
|
24556
|
+
if ((_ops8$valCodex = _ops8.valCodex) !== null && _ops8$valCodex !== void 0 && _ops8$valCodex.startsWith('OPVSUB_') && !validValues[_key4 + '.' + _key4] && this.getArticleOptionState(_key4 + '.' + _key4)) {
|
|
24557
|
+
validValues[_key4 + '.' + _key4] = myValues[_key4];
|
|
24558
|
+
}
|
|
24559
|
+
}
|
|
24446
24560
|
}
|
|
24447
24561
|
return validValues;
|
|
24448
24562
|
}
|
|
@@ -24643,8 +24757,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24643
24757
|
}, {
|
|
24644
24758
|
key: "addOptionStateFromArticleToPlannerData",
|
|
24645
24759
|
value: function addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo) {
|
|
24646
|
-
|
|
24647
|
-
|
|
24760
|
+
var articleOptions = this.getArticleOptionStatesWithOptionsForPrint();
|
|
24761
|
+
for (var key in articleOptions) {
|
|
24762
|
+
this.addOptionStateToPlannerData(ret, articleOptions[key], alternateRenderInfo);
|
|
24648
24763
|
}
|
|
24649
24764
|
for (var _key5 in this.article.partlistArticles) {
|
|
24650
24765
|
var partlistArticle = this.article.partlistArticles[_key5];
|
|
@@ -24956,7 +25071,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
24956
25071
|
value: //Initialisiert eventuell Option Tree und Infos im CatalogArticle
|
|
24957
25072
|
function () {
|
|
24958
25073
|
var _loadArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(set, articleCodex, initParams) {
|
|
24959
|
-
var _yield$this$preLoadAr, catalog, catalogArticle, newBasketId
|
|
25074
|
+
var _yield$this$preLoadAr, catalog, catalogArticle, newBasketId;
|
|
24960
25075
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
24961
25076
|
while (1) switch (_context.prev = _context.next) {
|
|
24962
25077
|
case 0:
|
|
@@ -24980,12 +25095,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
24980
25095
|
articleCodex: articleCodex
|
|
24981
25096
|
}
|
|
24982
25097
|
}));
|
|
24983
|
-
(
|
|
24984
|
-
|
|
24985
|
-
title: set.i18n.t('modals.error_accured')
|
|
24986
|
-
});
|
|
24987
|
-
return _context.abrupt("return", false);
|
|
24988
|
-
case 13:
|
|
25098
|
+
throw new Error('articleCodex not found in article list. Could be due to exclusivity or a bug in the application!');
|
|
25099
|
+
case 12:
|
|
24989
25100
|
case "end":
|
|
24990
25101
|
return _context.stop();
|
|
24991
25102
|
}
|
|
@@ -28684,7 +28795,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28684
28795
|
break;
|
|
28685
28796
|
}
|
|
28686
28797
|
_context5.next = 3;
|
|
28687
|
-
return import('./DoorPlanner-
|
|
28798
|
+
return import('./DoorPlanner-fffee417.js');
|
|
28688
28799
|
case 3:
|
|
28689
28800
|
_yield$import = _context5.sent;
|
|
28690
28801
|
DoorPlanner = _yield$import["default"];
|
|
@@ -30595,10 +30706,11 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
30595
30706
|
//hier evtl. die Article mit einer gewissen reihenfolge durchlaufen!
|
|
30596
30707
|
var optionsStates = optionStatesOfArticles[basketId];
|
|
30597
30708
|
for (var optionCodex in optionsStates) {
|
|
30709
|
+
var _ops$addToMeasure;
|
|
30598
30710
|
var ops = optionsStates[optionCodex];
|
|
30599
30711
|
var selectionmode = ops.selectionmode;
|
|
30600
30712
|
if (set.CatalogData.forceConfigSingle && (selectionmode == 1 || selectionmode == 2)) selectionmode = 3;
|
|
30601
|
-
if (!ops.isInvisible && (selectionmode != 0 || (ops.visibleCount > 1 || ops.isFreeText) && set.api.showSelectionModeZero()) && ops.isDoShow && ops.visibleCount > 0) {
|
|
30713
|
+
if (!ops.isInvisible && (selectionmode != 0 || (ops.visibleCount > 1 || ops.isFreeText) && set.api.showSelectionModeZero()) && ops.isDoShow && !((_ops$addToMeasure = ops.addToMeasure) !== null && _ops$addToMeasure !== void 0 && _ops$addToMeasure.length) && ops.visibleCount > 0) {
|
|
30602
30714
|
this.addOptionsStateToConfigTree(set, set.configTree, articles, basketId, ops, optionCodex, selectionmode, addToTabGroup);
|
|
30603
30715
|
}
|
|
30604
30716
|
}
|
|
@@ -31187,8 +31299,9 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
31187
31299
|
value: function prepareConfigItemsForView(set, ops, myConfigItems, constructionRules, selectedVals, targetArticles, optionCodex,
|
|
31188
31300
|
//bei einer OPG wird hier dessen hauptoptionCodex Übergeben
|
|
31189
31301
|
idmOpgGroupName, idmOpgValCodex, idmOpgOptionCodex, freeTextValue, freeTextLang) {
|
|
31190
|
-
var myConfigItemsForView = []
|
|
31191
|
-
|
|
31302
|
+
var myConfigItemsForView = [];
|
|
31303
|
+
var objectKeys = Object.keys(myConfigItems);
|
|
31304
|
+
var groupContentItemIdObject = this.getGroupContentItemIdObject(Object.values(myConfigItems), idmOpgGroupName);
|
|
31192
31305
|
var _loop8 = function _loop8() {
|
|
31193
31306
|
var _ops$optionOcd3, _item$images, _item$colorGroups, _item$pdfUrl, _item$url;
|
|
31194
31307
|
var item = myConfigItems[objectKeys[i]];
|
|
@@ -31237,10 +31350,10 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
31237
31350
|
//for freeText
|
|
31238
31351
|
//if a opv has isFreeText = true and its selected a Textbox sould appear in the OptionValue
|
|
31239
31352
|
//if the text is empty the opv is really selected
|
|
31240
|
-
contentItemId: item.contentItemId,
|
|
31241
31353
|
isOPVG: item.isOPVG,
|
|
31242
31354
|
isParentOPVG: item.parent.codex.startsWith('OPV'),
|
|
31243
|
-
|
|
31355
|
+
contentItemId: item.contentItemId,
|
|
31356
|
+
groupContentItemId: groupName ? groupContentItemIdObject[groupName] : undefined,
|
|
31244
31357
|
idmOpgOptionCodex: idmOpgOptionCodex,
|
|
31245
31358
|
idmOpgValCodex: idmOpgValCodex,
|
|
31246
31359
|
isFreeText: item.isFreeText,
|
|
@@ -31265,6 +31378,18 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
31265
31378
|
myConfigItemsForView: myConfigItemsForView
|
|
31266
31379
|
};
|
|
31267
31380
|
}
|
|
31381
|
+
}, {
|
|
31382
|
+
key: "getGroupContentItemIdObject",
|
|
31383
|
+
value: function getGroupContentItemIdObject(configItems, alternativeGroupName) {
|
|
31384
|
+
var groupContentItemIdObject = {};
|
|
31385
|
+
for (var i = 0; i < configItems.length; i++) {
|
|
31386
|
+
var _item$groupName;
|
|
31387
|
+
var item = configItems[i];
|
|
31388
|
+
var groupName = (_item$groupName = item.groupName) !== null && _item$groupName !== void 0 ? _item$groupName : alternativeGroupName;
|
|
31389
|
+
if (groupName && item.groupContentItemId) groupContentItemIdObject[groupName] = item.groupContentItemId;
|
|
31390
|
+
}
|
|
31391
|
+
return groupContentItemIdObject;
|
|
31392
|
+
}
|
|
31268
31393
|
}, {
|
|
31269
31394
|
key: "getProductList",
|
|
31270
31395
|
value: function getProductList() {
|
|
@@ -31282,10 +31407,11 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
31282
31407
|
//hier evtl. die Article mit einer gewissen reihenfolge durchlaufen!
|
|
31283
31408
|
var optionsStates = optionStatesOfArticles[iKey];
|
|
31284
31409
|
for (var jKey in optionsStates) {
|
|
31410
|
+
var _ops$addToMeasure2;
|
|
31285
31411
|
var ops = optionsStates[jKey];
|
|
31286
31412
|
var selectionmode = ops.selectionmode;
|
|
31287
31413
|
if (set.CatalogData.forceConfigSingle && (selectionmode == 1 || selectionmode == 2)) selectionmode = 3;
|
|
31288
|
-
if (ops.isInvisible || selectionmode == 0 || !ops.isDoShow || ops.visibleCount == 0) {
|
|
31414
|
+
if (ops.isInvisible || selectionmode == 0 || !ops.isDoShow || ops.visibleCount == 0 || !!((_ops$addToMeasure2 = ops.addToMeasure) !== null && _ops$addToMeasure2 !== void 0 && _ops$addToMeasure2.length)) {
|
|
31289
31415
|
this.addOptionsStateToConfigTree(set, configTree, articles, iKey, ops, jKey, selectionmode);
|
|
31290
31416
|
}
|
|
31291
31417
|
}
|
|
@@ -34047,6 +34173,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34047
34173
|
origOrderSet.AccountLogo = actOrderSet.AccountLogo;
|
|
34048
34174
|
origOrderSet.CatalogOfflineVersion = actOrderSet.CatalogOfflineVersion;
|
|
34049
34175
|
origOrderSet.CatalogGUID = actOrderSet.CatalogGUID;
|
|
34176
|
+
origOrderSet.RetailCatalogNr = actOrderSet.RetailCatalogNr;
|
|
34050
34177
|
origOrderSet.CollectionGUID = actOrderSet.CollectionGUID;
|
|
34051
34178
|
origOrderSet.OrderLines = actOrderSet.OrderLines;
|
|
34052
34179
|
origOrderSet.OrderSetDesc = actOrderSet.OrderSetDesc;
|
|
@@ -34059,6 +34186,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34059
34186
|
origOrderSet.SetVariantBasketDatas = actOrderSet.SetVariantBasketDatas;
|
|
34060
34187
|
origOrderSet.BBox = actOrderSet.BBox;
|
|
34061
34188
|
origOrderSet.VariantDescription = actOrderSet.VariantDescription;
|
|
34189
|
+
origOrderSet.OfflineData = actOrderSet.OfflineData;
|
|
34062
34190
|
if (actOrderSet.ConfigVariants && origOrderSet.ConfigVariants) origOrderSet.ConfigVariants = actOrderSet.ConfigVariants.map(function (variant, index) {
|
|
34063
34191
|
var _origOrderSet$ConfigV;
|
|
34064
34192
|
var configVariant = (_origOrderSet$ConfigV = origOrderSet.ConfigVariants) === null || _origOrderSet$ConfigV === void 0 ? void 0 : _origOrderSet$ConfigV[index];
|
|
@@ -34152,6 +34280,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34152
34280
|
CatalogName_locales: catalogData.name_locales,
|
|
34153
34281
|
CatalogOfflineVersion: catalogData.offlineVersion,
|
|
34154
34282
|
CatalogOfflineFilesLastUpdate: catalogData.offlineFilesLastUpdate,
|
|
34283
|
+
RetailCatalogNr: catalogData.retailCatalogNr,
|
|
34155
34284
|
Description: catalogData.description,
|
|
34156
34285
|
GroupType: GroupType,
|
|
34157
34286
|
OfflineData: catalogData.offlineData,
|
|
@@ -34172,6 +34301,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34172
34301
|
SetName: set.setName,
|
|
34173
34302
|
SetName_locales: set.setName_locales,
|
|
34174
34303
|
ProductSetName: set.ProductSetName,
|
|
34304
|
+
SupplierGUID: catalogData.supplierGuid,
|
|
34175
34305
|
SetPrice: set.getSetPrice(),
|
|
34176
34306
|
BruttoSetPrice: bruttoPrice,
|
|
34177
34307
|
SetQuantity: 1,
|
|
@@ -34477,7 +34607,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34477
34607
|
this.plannerConfig = plannerConfig;
|
|
34478
34608
|
this.assignNewDivaNr = !!this.plannerConfig.assignNewDivaNr;
|
|
34479
34609
|
this._handler = plannerConfig.handler;
|
|
34480
|
-
if (this.plannerConfig.divaNr == undefined && this.plannerConfig.basketData == undefined && this.plannerConfig.catalogCodex == undefined && this.plannerConfig.productId == undefined && this.plannerConfig.customProductId == undefined && this.plannerConfig.returnTo != 'TEST_CONFIGURATORLOGIC' && !((_this$plannerConfig$s = this.plannerConfig.settings) !== null && _this$plannerConfig$s !== void 0 && (_this$plannerConfig$s = _this$plannerConfig$s.
|
|
34610
|
+
if (this.plannerConfig.divaNr == undefined && this.plannerConfig.basketData == undefined && this.plannerConfig.catalogCodex == undefined && this.plannerConfig.productId == undefined && this.plannerConfig.customProductId == undefined && this.plannerConfig.returnTo != 'TEST_CONFIGURATORLOGIC' && !((_this$plannerConfig$s = this.plannerConfig.settings) !== null && _this$plannerConfig$s !== void 0 && (_this$plannerConfig$s = _this$plannerConfig$s.viewConfig) !== null && _this$plannerConfig$s !== void 0 && (_this$plannerConfig$s = _this$plannerConfig$s.plannerType) !== null && _this$plannerConfig$s !== void 0 && _this$plannerConfig$s.includes('PRODUCTS') || (_this$plannerConfig$s2 = this.plannerConfig.settings) !== null && _this$plannerConfig$s2 !== void 0 && (_this$plannerConfig$s2 = _this$plannerConfig$s2.viewConfig) !== null && _this$plannerConfig$s2 !== void 0 && (_this$plannerConfig$s2 = _this$plannerConfig$s2.plannerType) !== null && _this$plannerConfig$s2 !== void 0 && _this$plannerConfig$s2.includes('PROMOTED'))) {
|
|
34481
34611
|
LOG$8.error(new DivaError('Keine Öffnungsparameter', {
|
|
34482
34612
|
code: 'WC_0003'
|
|
34483
34613
|
}));
|
|
@@ -34680,7 +34810,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34680
34810
|
case 60:
|
|
34681
34811
|
return _context.abrupt("return", _context.sent);
|
|
34682
34812
|
case 63:
|
|
34683
|
-
if (!((_this$plannerConfig$s3 = this.plannerConfig.settings) !== null && _this$plannerConfig$s3 !== void 0 && (_this$plannerConfig$s3 = _this$plannerConfig$s3.
|
|
34813
|
+
if (!((_this$plannerConfig$s3 = this.plannerConfig.settings) !== null && _this$plannerConfig$s3 !== void 0 && (_this$plannerConfig$s3 = _this$plannerConfig$s3.viewConfig) !== null && _this$plannerConfig$s3 !== void 0 && _this$plannerConfig$s3.loadStartProduct)) {
|
|
34684
34814
|
_context.next = 86;
|
|
34685
34815
|
break;
|
|
34686
34816
|
}
|
|
@@ -34712,7 +34842,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34712
34842
|
return _context.abrupt("return", _context.sent);
|
|
34713
34843
|
case 75:
|
|
34714
34844
|
successfully = false;
|
|
34715
|
-
if (!((_this$plannerConfig$s4 = this.plannerConfig.settings) !== null && _this$plannerConfig$s4 !== void 0 && (_this$plannerConfig$s4 = _this$plannerConfig$s4.
|
|
34845
|
+
if (!((_this$plannerConfig$s4 = this.plannerConfig.settings) !== null && _this$plannerConfig$s4 !== void 0 && (_this$plannerConfig$s4 = _this$plannerConfig$s4.viewConfig) !== null && _this$plannerConfig$s4 !== void 0 && _this$plannerConfig$s4.initFirstCatalog)) {
|
|
34716
34846
|
_context.next = 80;
|
|
34717
34847
|
break;
|
|
34718
34848
|
}
|
|
@@ -34739,7 +34869,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34739
34869
|
_context.next = 91;
|
|
34740
34870
|
break;
|
|
34741
34871
|
case 86:
|
|
34742
|
-
if (!((_this$plannerConfig$s5 = this.plannerConfig.settings) !== null && _this$plannerConfig$s5 !== void 0 && (_this$plannerConfig$s5 = _this$plannerConfig$s5.
|
|
34872
|
+
if (!((_this$plannerConfig$s5 = this.plannerConfig.settings) !== null && _this$plannerConfig$s5 !== void 0 && (_this$plannerConfig$s5 = _this$plannerConfig$s5.viewConfig) !== null && _this$plannerConfig$s5 !== void 0 && _this$plannerConfig$s5.initFirstCatalog)) {
|
|
34743
34873
|
_context.next = 91;
|
|
34744
34874
|
break;
|
|
34745
34875
|
}
|
|
@@ -35292,7 +35422,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35292
35422
|
key: "saveToBasket",
|
|
35293
35423
|
value: function () {
|
|
35294
35424
|
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(api, actBasket, returnTo) {
|
|
35295
|
-
var _this$plannerConfig$c4, _this$_basketHandler, _api$getJwt;
|
|
35425
|
+
var _this$plannerConfig$s9, _this$plannerConfig$c4, _this$_basketHandler, _api$getJwt;
|
|
35296
35426
|
var response;
|
|
35297
35427
|
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
35298
35428
|
while (1) switch (_context11.prev = _context11.next) {
|
|
@@ -35303,7 +35433,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35303
35433
|
actBasket.PrintOptions = api.getPrintOptions(this.reportConfig);
|
|
35304
35434
|
actBasket.ClientLanguage = api.getLanguage();
|
|
35305
35435
|
_context11.next = 7;
|
|
35306
|
-
return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser, this.plannerConfig.settings.keepSalesPersonDataInBasket);
|
|
35436
|
+
return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser, (_this$plannerConfig$s9 = this.plannerConfig.settings) === null || _this$plannerConfig$s9 === void 0 ? void 0 : _this$plannerConfig$s9.keepSalesPersonDataInBasket);
|
|
35307
35437
|
case 7:
|
|
35308
35438
|
actBasket.UserLanguage = api.getLanguage();
|
|
35309
35439
|
actBasket.PrintRetailLogo = (_this$plannerConfig$c4 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c4 === void 0 ? void 0 : _this$plannerConfig$c4.logoUrl;
|
|
@@ -35474,7 +35604,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35474
35604
|
break;
|
|
35475
35605
|
case 3:
|
|
35476
35606
|
_context12.next = 5;
|
|
35477
|
-
return import('./PfisterWWSHandler-
|
|
35607
|
+
return import('./PfisterWWSHandler-9e3b6845.js');
|
|
35478
35608
|
case 5:
|
|
35479
35609
|
_yield$import = _context12.sent;
|
|
35480
35610
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -35482,7 +35612,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35482
35612
|
return _context12.abrupt("break", 27);
|
|
35483
35613
|
case 9:
|
|
35484
35614
|
_context12.next = 11;
|
|
35485
|
-
return import('./LiviqueWWSHandler-
|
|
35615
|
+
return import('./LiviqueWWSHandler-bda7977e.js');
|
|
35486
35616
|
case 11:
|
|
35487
35617
|
_yield$import2 = _context12.sent;
|
|
35488
35618
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -35490,7 +35620,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35490
35620
|
return _context12.abrupt("break", 27);
|
|
35491
35621
|
case 15:
|
|
35492
35622
|
_context12.next = 17;
|
|
35493
|
-
return import('./SeriousBasketHandler-
|
|
35623
|
+
return import('./SeriousBasketHandler-d833f66b.js');
|
|
35494
35624
|
case 17:
|
|
35495
35625
|
_yield$import3 = _context12.sent;
|
|
35496
35626
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -35498,7 +35628,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35498
35628
|
return _context12.abrupt("break", 27);
|
|
35499
35629
|
case 21:
|
|
35500
35630
|
_context12.next = 23;
|
|
35501
|
-
return import('./StandardWWSHandler-
|
|
35631
|
+
return import('./StandardWWSHandler-e656dc82.js');
|
|
35502
35632
|
case 23:
|
|
35503
35633
|
_yield$import4 = _context12.sent;
|
|
35504
35634
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -35783,28 +35913,6 @@ var ViewPointHandler = /*#__PURE__*/function () {
|
|
|
35783
35913
|
value: function zoomToStep(zoomStep) {
|
|
35784
35914
|
this.navInfo3D.zoom = zoomStep;
|
|
35785
35915
|
}
|
|
35786
|
-
}, {
|
|
35787
|
-
key: "swipeLeft",
|
|
35788
|
-
value: function swipeLeft() {
|
|
35789
|
-
this.navInfo3D.rotHori -= 15;
|
|
35790
|
-
}
|
|
35791
|
-
}, {
|
|
35792
|
-
key: "swipRight",
|
|
35793
|
-
value: function swipRight() {
|
|
35794
|
-
this.navInfo3D.rotHori += 15;
|
|
35795
|
-
}
|
|
35796
|
-
}, {
|
|
35797
|
-
key: "swipeUp",
|
|
35798
|
-
value: function swipeUp() {
|
|
35799
|
-
if (this.navInfo3D.rotVert == -15) return;
|
|
35800
|
-
this.navInfo3D.rotVert -= 15;
|
|
35801
|
-
}
|
|
35802
|
-
}, {
|
|
35803
|
-
key: "swipeDown",
|
|
35804
|
-
value: function swipeDown() {
|
|
35805
|
-
if (this.navInfo3D.rotVert == 45) return;
|
|
35806
|
-
this.navInfo3D.rotVert += 15;
|
|
35807
|
-
}
|
|
35808
35916
|
}, {
|
|
35809
35917
|
key: "setVpName",
|
|
35810
35918
|
value: function setVpName(vpName) {
|
|
@@ -35859,6 +35967,7 @@ var ViewPointHandler = /*#__PURE__*/function () {
|
|
|
35859
35967
|
key: "initRoomList",
|
|
35860
35968
|
value: function initRoomList(roomlist, defaultBackgroundWidth, defaultBackgroundHeight) {
|
|
35861
35969
|
this.roomListInfo = [];
|
|
35970
|
+
if (!roomlist) return;
|
|
35862
35971
|
var roomListObj = JSON.parse(roomlist);
|
|
35863
35972
|
var roomIsSel = true;
|
|
35864
35973
|
for (var roomCodex in roomListObj) {
|
|
@@ -36941,7 +37050,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36941
37050
|
while (1) switch (_context3.prev = _context3.next) {
|
|
36942
37051
|
case 0:
|
|
36943
37052
|
_context3.next = 2;
|
|
36944
|
-
return import('./Host3DSignalR-
|
|
37053
|
+
return import('./Host3DSignalR-6656425e.js');
|
|
36945
37054
|
case 2:
|
|
36946
37055
|
_yield$import = _context3.sent;
|
|
36947
37056
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -37642,7 +37751,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37642
37751
|
}, {
|
|
37643
37752
|
key: "handle3DVisualizationChanged",
|
|
37644
37753
|
value: function handle3DVisualizationChanged(mode, params) {
|
|
37645
|
-
var _params$nav3DZoom, _params$nav3DZoom2, _params$nav3DZoom3
|
|
37754
|
+
var _params$nav3DZoom, _params$nav3DZoom2, _params$nav3DZoom3;
|
|
37646
37755
|
switch (mode) {
|
|
37647
37756
|
case 'Nav3DFullScreen':
|
|
37648
37757
|
break;
|
|
@@ -37655,17 +37764,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37655
37764
|
this.viewPointHandler.zoomToStep(params.nav3DZoom.zoomVal);
|
|
37656
37765
|
}
|
|
37657
37766
|
break;
|
|
37658
|
-
case 'Nav3DSwipe':
|
|
37659
|
-
if ((_params$nav3DSwipe = params.nav3DSwipe) !== null && _params$nav3DSwipe !== void 0 && _params$nav3DSwipe.doSwipeRight) {
|
|
37660
|
-
this.viewPointHandler.swipRight();
|
|
37661
|
-
} else if ((_params$nav3DSwipe2 = params.nav3DSwipe) !== null && _params$nav3DSwipe2 !== void 0 && _params$nav3DSwipe2.doSwipeLeft) {
|
|
37662
|
-
this.viewPointHandler.swipeLeft();
|
|
37663
|
-
} else if ((_params$nav3DSwipe3 = params.nav3DSwipe) !== null && _params$nav3DSwipe3 !== void 0 && _params$nav3DSwipe3.doSwipeDown) {
|
|
37664
|
-
this.viewPointHandler.swipeDown();
|
|
37665
|
-
} else if ((_params$nav3DSwipe4 = params.nav3DSwipe) !== null && _params$nav3DSwipe4 !== void 0 && _params$nav3DSwipe4.doSwipeUp) {
|
|
37666
|
-
this.viewPointHandler.swipeUp();
|
|
37667
|
-
}
|
|
37668
|
-
break;
|
|
37669
37767
|
case 'Nav3DFocus':
|
|
37670
37768
|
this.viewPointHandler.focusOnElementId(params.nav3DFocus.setId, params.nav3DFocus.focusElementId);
|
|
37671
37769
|
break;
|
|
@@ -38506,7 +38604,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38506
38604
|
break;
|
|
38507
38605
|
case 8:
|
|
38508
38606
|
_context4.next = 10;
|
|
38509
|
-
return import('./DivaStandardPlanner-
|
|
38607
|
+
return import('./DivaStandardPlanner-b022892b.js');
|
|
38510
38608
|
case 10:
|
|
38511
38609
|
_yield$import = _context4.sent;
|
|
38512
38610
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -38517,7 +38615,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38517
38615
|
return _context4.abrupt("break", 21);
|
|
38518
38616
|
case 15:
|
|
38519
38617
|
_context4.next = 17;
|
|
38520
|
-
return import('./DivaBoxPlanner-
|
|
38618
|
+
return import('./DivaBoxPlanner-9d2e1053.js');
|
|
38521
38619
|
case 17:
|
|
38522
38620
|
_yield$import2 = _context4.sent;
|
|
38523
38621
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -39275,7 +39373,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39275
39373
|
planner3DGridEnabled: false,
|
|
39276
39374
|
mediaServiceSaveMode: 'STREAM',
|
|
39277
39375
|
doShow3DDimensionLines: !!doShow3DDimensionLines
|
|
39278
|
-
}, undefined);
|
|
39376
|
+
}, undefined, true);
|
|
39279
39377
|
} else {
|
|
39280
39378
|
this.handler3D.handle3DVisualizationChanged(mode, params);
|
|
39281
39379
|
}
|
|
@@ -40271,7 +40369,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40271
40369
|
key: "initialize",
|
|
40272
40370
|
value: function () {
|
|
40273
40371
|
var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
|
|
40274
|
-
var viewReadyPromise, loadSuccessful
|
|
40372
|
+
var viewReadyPromise, loadSuccessful;
|
|
40275
40373
|
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
40276
40374
|
while (1) switch (_context14.prev = _context14.next) {
|
|
40277
40375
|
case 0:
|
|
@@ -40300,59 +40398,97 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40300
40398
|
DivaUtils.businessMetrics.setConfiguratorSessionId();
|
|
40301
40399
|
}
|
|
40302
40400
|
if (!loadSuccessful) {
|
|
40303
|
-
_context14.next =
|
|
40401
|
+
_context14.next = 27;
|
|
40304
40402
|
break;
|
|
40305
40403
|
}
|
|
40404
|
+
_context14.prev = 15;
|
|
40405
|
+
_context14.next = 18;
|
|
40406
|
+
return this.initializeSets(loadSuccessful, viewReadyPromise);
|
|
40407
|
+
case 18:
|
|
40408
|
+
return _context14.abrupt("return", _context14.sent);
|
|
40409
|
+
case 21:
|
|
40410
|
+
_context14.prev = 21;
|
|
40411
|
+
_context14.t0 = _context14["catch"](15);
|
|
40412
|
+
this.onInitializationError();
|
|
40413
|
+
return _context14.abrupt("return", false);
|
|
40414
|
+
case 25:
|
|
40415
|
+
_context14.next = 30;
|
|
40416
|
+
break;
|
|
40417
|
+
case 27:
|
|
40418
|
+
this.onInitializationError();
|
|
40419
|
+
//fehler beim laden vom basket..
|
|
40420
|
+
LOG$1.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {}, true);
|
|
40421
|
+
return _context14.abrupt("return", false);
|
|
40422
|
+
case 30:
|
|
40423
|
+
case "end":
|
|
40424
|
+
return _context14.stop();
|
|
40425
|
+
}
|
|
40426
|
+
}, _callee14, this, [[15, 21]]);
|
|
40427
|
+
}));
|
|
40428
|
+
function initialize() {
|
|
40429
|
+
return _initialize.apply(this, arguments);
|
|
40430
|
+
}
|
|
40431
|
+
return initialize;
|
|
40432
|
+
}()
|
|
40433
|
+
}, {
|
|
40434
|
+
key: "initializeSets",
|
|
40435
|
+
value: function () {
|
|
40436
|
+
var _initializeSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(loadSuccessful, viewReadyPromise) {
|
|
40437
|
+
var _this$actions16, _set$getDivaArticles;
|
|
40438
|
+
var _this$actions15, _this$actions15$toggl, initSetState, set, oldProductId, result, _this$actions17, catalogData, initializationId, _this$plannerConfig$a;
|
|
40439
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
40440
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
40441
|
+
case 0:
|
|
40306
40442
|
if (!(typeof loadSuccessful != 'boolean')) {
|
|
40307
|
-
|
|
40443
|
+
_context15.next = 9;
|
|
40308
40444
|
break;
|
|
40309
40445
|
}
|
|
40310
40446
|
if (!(loadSuccessful.type == 'ProductList')) {
|
|
40311
|
-
|
|
40447
|
+
_context15.next = 9;
|
|
40312
40448
|
break;
|
|
40313
40449
|
}
|
|
40314
|
-
|
|
40450
|
+
_context15.next = 4;
|
|
40315
40451
|
return viewReadyPromise;
|
|
40316
|
-
case
|
|
40317
|
-
|
|
40452
|
+
case 4:
|
|
40453
|
+
_context15.next = 6;
|
|
40318
40454
|
return this.initView();
|
|
40319
|
-
case
|
|
40455
|
+
case 6:
|
|
40320
40456
|
this.subscribeToWebPlannerEvents();
|
|
40321
40457
|
(_this$actions15 = this.actions) === null || _this$actions15 === void 0 || (_this$actions15$toggl = _this$actions15.toggleLoading) === null || _this$actions15$toggl === void 0 || _this$actions15$toggl.call(_this$actions15, 'Planner_Loading', false, false);
|
|
40322
|
-
return
|
|
40323
|
-
case
|
|
40458
|
+
return _context15.abrupt("return", true);
|
|
40459
|
+
case 9:
|
|
40324
40460
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
40325
40461
|
initSetState = this.getInitStateForSet();
|
|
40326
40462
|
this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
40327
|
-
|
|
40463
|
+
_context15.next = 14;
|
|
40328
40464
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
40329
|
-
case
|
|
40465
|
+
case 14:
|
|
40330
40466
|
set = this.actSet();
|
|
40331
40467
|
oldProductId = this.divaBasketHandler.actBasket.MatchingProductId || this.divaBasketHandler.actBasket.OrigProductId;
|
|
40332
40468
|
if (!(oldProductId && set && set !== null && set !== void 0 && set.api.doCheckForProductsPrice())) {
|
|
40333
|
-
|
|
40469
|
+
_context15.next = 23;
|
|
40334
40470
|
break;
|
|
40335
40471
|
}
|
|
40336
|
-
|
|
40472
|
+
_context15.next = 19;
|
|
40337
40473
|
return this.divaBasketHandler.getProduct(this.api, oldProductId);
|
|
40338
|
-
case
|
|
40339
|
-
result =
|
|
40474
|
+
case 19:
|
|
40475
|
+
result = _context15.sent;
|
|
40340
40476
|
if (result) productHandlerInstance.handleFountMatchingProducts(set, [result], set.setHash);
|
|
40341
|
-
|
|
40477
|
+
_context15.next = 24;
|
|
40342
40478
|
break;
|
|
40343
|
-
case
|
|
40479
|
+
case 23:
|
|
40344
40480
|
if (typeof loadSuccessful != 'boolean' && set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
40345
40481
|
if (loadSuccessful.type != 'ProductList') {
|
|
40346
40482
|
productHandlerInstance.handleFountMatchingProducts(set, [loadSuccessful], set.setHash);
|
|
40347
40483
|
}
|
|
40348
40484
|
}
|
|
40349
|
-
case
|
|
40350
|
-
|
|
40485
|
+
case 24:
|
|
40486
|
+
_context15.next = 26;
|
|
40351
40487
|
return viewReadyPromise;
|
|
40352
|
-
case
|
|
40353
|
-
|
|
40488
|
+
case 26:
|
|
40489
|
+
_context15.next = 28;
|
|
40354
40490
|
return this.initView();
|
|
40355
|
-
case
|
|
40491
|
+
case 28:
|
|
40356
40492
|
(_this$actions16 = this.actions) === null || _this$actions16 === void 0 || _this$actions16.onEvent({
|
|
40357
40493
|
type: 'onConfiguratorReady'
|
|
40358
40494
|
});
|
|
@@ -40362,7 +40498,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40362
40498
|
});
|
|
40363
40499
|
}
|
|
40364
40500
|
this.subscribeToWebPlannerEvents();
|
|
40365
|
-
this.divaBasketHandler.actBasket;
|
|
40366
40501
|
catalogData = set === null || set === void 0 ? void 0 : set.CatalogData;
|
|
40367
40502
|
initializationId = undefined;
|
|
40368
40503
|
if (this.divaBasketHandler.initializationTypeGetter == 'PRODUCT_ID') {
|
|
@@ -40387,25 +40522,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40387
40522
|
initializationType: this.divaBasketHandler.initializationTypeGetter,
|
|
40388
40523
|
initializationId: initializationId
|
|
40389
40524
|
}, false);
|
|
40390
|
-
|
|
40525
|
+
_context15.next = 37;
|
|
40391
40526
|
return this.fillBaksetforOnWebPlanerConfigChange(undefined, true);
|
|
40392
|
-
case
|
|
40393
|
-
return
|
|
40394
|
-
case
|
|
40395
|
-
this.onInitializationError();
|
|
40396
|
-
//fehler beim laden vom basket..
|
|
40397
|
-
LOG$1.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {}, true);
|
|
40398
|
-
return _context14.abrupt("return", false);
|
|
40399
|
-
case 59:
|
|
40527
|
+
case 37:
|
|
40528
|
+
return _context15.abrupt("return", true);
|
|
40529
|
+
case 38:
|
|
40400
40530
|
case "end":
|
|
40401
|
-
return
|
|
40531
|
+
return _context15.stop();
|
|
40402
40532
|
}
|
|
40403
|
-
},
|
|
40533
|
+
}, _callee15, this);
|
|
40404
40534
|
}));
|
|
40405
|
-
function
|
|
40406
|
-
return
|
|
40535
|
+
function initializeSets(_x53, _x54) {
|
|
40536
|
+
return _initializeSets.apply(this, arguments);
|
|
40407
40537
|
}
|
|
40408
|
-
return
|
|
40538
|
+
return initializeSets;
|
|
40409
40539
|
}()
|
|
40410
40540
|
}, {
|
|
40411
40541
|
key: "updatePlannerConfig",
|
|
@@ -40464,11 +40594,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40464
40594
|
var _this$plannerConfig$a3;
|
|
40465
40595
|
if (!(onErrorHandling !== null && onErrorHandling !== void 0 && onErrorHandling.hideErrorMsg)) {
|
|
40466
40596
|
var _this$plannerConfig$a2, _this$i18n$t, _this$i18n4, _onErrorHandling$erro;
|
|
40597
|
+
var isWeb = this.api.getApplicationEnvironment() == 'WEB';
|
|
40467
40598
|
(_this$plannerConfig$a2 = this.plannerConfig.actions) === null || _this$plannerConfig$a2 === void 0 || _this$plannerConfig$a2.openModal({
|
|
40468
40599
|
title: (_this$i18n$t = (_this$i18n4 = this.i18n()) === null || _this$i18n4 === void 0 ? void 0 : _this$i18n4.t((_onErrorHandling$erro = onErrorHandling.errorMsg) !== null && _onErrorHandling$erro !== void 0 ? _onErrorHandling$erro : 'modals.error_accured')) !== null && _this$i18n$t !== void 0 ? _this$i18n$t : 'An error occured. Please try again later.',
|
|
40469
40600
|
accept: true,
|
|
40470
40601
|
callback: function callback(accepted) {
|
|
40471
|
-
if (accepted &&
|
|
40602
|
+
if (accepted && isWeb) {
|
|
40472
40603
|
var _this2$state;
|
|
40473
40604
|
_this2.callEvent('onWebPlanerClose');
|
|
40474
40605
|
((_this2$state = _this2.state) === null || _this2$state === void 0 ? void 0 : _this2$state.isFullscreenComponent) && _this2.callEvent('onFullscreenClose');
|
|
@@ -40532,23 +40663,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40532
40663
|
}, {
|
|
40533
40664
|
key: "initView",
|
|
40534
40665
|
value: (function () {
|
|
40535
|
-
var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40666
|
+
var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16() {
|
|
40536
40667
|
var set, plannerMode, _this$initConfigurato, _this$initPlannerView, _this$initConfigurato2, _this$updateViewPlann9;
|
|
40537
|
-
return _regeneratorRuntime.wrap(function
|
|
40538
|
-
while (1) switch (
|
|
40668
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
40669
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
40539
40670
|
case 0:
|
|
40540
40671
|
set = this.actSet();
|
|
40541
40672
|
plannerMode = this.getPlannerMode();
|
|
40542
40673
|
this.initConfiguratorMode(plannerMode);
|
|
40543
40674
|
if (!(plannerMode == 'ProductList')) {
|
|
40544
|
-
|
|
40675
|
+
_context16.next = 7;
|
|
40545
40676
|
break;
|
|
40546
40677
|
}
|
|
40547
40678
|
(_this$initConfigurato = this.initConfiguratorStructure) === null || _this$initConfigurato === void 0 || _this$initConfigurato.call(this, setHandlerInstance.loadConfigStructureForOnlyProductsList());
|
|
40548
|
-
|
|
40679
|
+
_context16.next = 17;
|
|
40549
40680
|
break;
|
|
40550
40681
|
case 7:
|
|
40551
|
-
|
|
40682
|
+
_context16.next = 9;
|
|
40552
40683
|
return (_this$initPlannerView = this.initPlannerView) === null || _this$initPlannerView === void 0 ? void 0 : _this$initPlannerView.call(this);
|
|
40553
40684
|
case 9:
|
|
40554
40685
|
//first load the Configuratorstructure STARTCONFIG
|
|
@@ -40562,13 +40693,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40562
40693
|
this.onBasketInitialized();
|
|
40563
40694
|
this.checkMatchingProducts('onInit');
|
|
40564
40695
|
case 17:
|
|
40565
|
-
|
|
40696
|
+
_context16.next = 19;
|
|
40566
40697
|
return this.runInitMode(plannerMode);
|
|
40567
40698
|
case 19:
|
|
40568
40699
|
case "end":
|
|
40569
|
-
return
|
|
40700
|
+
return _context16.stop();
|
|
40570
40701
|
}
|
|
40571
|
-
},
|
|
40702
|
+
}, _callee16, this);
|
|
40572
40703
|
}));
|
|
40573
40704
|
function initView() {
|
|
40574
40705
|
return _initView.apply(this, arguments);
|
|
@@ -40589,26 +40720,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40589
40720
|
}, {
|
|
40590
40721
|
key: "runInitMode",
|
|
40591
40722
|
value: function () {
|
|
40592
|
-
var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40723
|
+
var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(plannerMode) {
|
|
40593
40724
|
var _this$state3;
|
|
40594
40725
|
var doDefault, _this$navigateToTabGr2, configStepKey, _this$actSet5, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
|
|
40595
|
-
return _regeneratorRuntime.wrap(function
|
|
40596
|
-
while (1) switch (
|
|
40726
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
40727
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
40597
40728
|
case 0:
|
|
40598
40729
|
doDefault = true;
|
|
40599
40730
|
if (!(this.plannerConfig.initMode == 'OPEN_LEAFLET_BARRIER' || this.plannerConfig.initMode == 'SHOW_PDF')) {
|
|
40600
|
-
|
|
40731
|
+
_context17.next = 10;
|
|
40601
40732
|
break;
|
|
40602
40733
|
}
|
|
40603
40734
|
if (this.plannerConfig.initMode == 'OPEN_LEAFLET_BARRIER') this.ReturnTo = 'OPEN_LEAFLET_BARRIER';
|
|
40604
40735
|
if (this.plannerConfig.initMode == 'SHOW_PDF') this.ReturnTo = 'OPEN_PDF';
|
|
40605
40736
|
(_this$navigateToTabGr2 = this.navigateToTabGroup) === null || _this$navigateToTabGr2 === void 0 || _this$navigateToTabGr2.call(this, 'SUMMARY', undefined, true);
|
|
40606
40737
|
//TODO lea bug das hier ist nur ein temporäre lößung https://app.asana.com/0/1200869909950432/1200998848659806
|
|
40607
|
-
|
|
40738
|
+
_context17.next = 7;
|
|
40608
40739
|
return this.saveToBasketWrapper();
|
|
40609
40740
|
case 7:
|
|
40610
40741
|
doDefault = false;
|
|
40611
|
-
|
|
40742
|
+
_context17.next = 11;
|
|
40612
40743
|
break;
|
|
40613
40744
|
case 10:
|
|
40614
40745
|
if (this.plannerConfig.initMode == 'OPENCONFIGTABGROUP' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER_ONLY_MOBILE' && (_this$state3 = this.state) !== null && _this$state3 !== void 0 && _this$state3.dimensions.isMobile) {
|
|
@@ -40632,11 +40763,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40632
40763
|
}
|
|
40633
40764
|
case 12:
|
|
40634
40765
|
case "end":
|
|
40635
|
-
return
|
|
40766
|
+
return _context17.stop();
|
|
40636
40767
|
}
|
|
40637
|
-
},
|
|
40768
|
+
}, _callee17, this);
|
|
40638
40769
|
}));
|
|
40639
|
-
function runInitMode(
|
|
40770
|
+
function runInitMode(_x55) {
|
|
40640
40771
|
return _runInitMode.apply(this, arguments);
|
|
40641
40772
|
}
|
|
40642
40773
|
return runInitMode;
|
|
@@ -40644,16 +40775,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40644
40775
|
}, {
|
|
40645
40776
|
key: "addSetToActPlanningByDivaNr",
|
|
40646
40777
|
value: function () {
|
|
40647
|
-
var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40778
|
+
var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(divaNr) {
|
|
40648
40779
|
var _this$updateViewPlann10;
|
|
40649
40780
|
var set, orderSets, i, orderset, lastSetToInitialize, loadedSet, articlesKeys;
|
|
40650
|
-
return _regeneratorRuntime.wrap(function
|
|
40651
|
-
while (1) switch (
|
|
40781
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
40782
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
40652
40783
|
case 0:
|
|
40653
40784
|
set = this.actSet();
|
|
40654
40785
|
this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
40655
40786
|
this.divaBasketHandler.setIgnoreInitObjectWhenInitializing();
|
|
40656
|
-
|
|
40787
|
+
_context18.next = 5;
|
|
40657
40788
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
40658
40789
|
case 5:
|
|
40659
40790
|
orderSets = this.divaBasketHandler.actBasket.OrderSets;
|
|
@@ -40661,30 +40792,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40661
40792
|
i = 0;
|
|
40662
40793
|
case 8:
|
|
40663
40794
|
if (!(i < orderSets.length)) {
|
|
40664
|
-
|
|
40795
|
+
_context18.next = 24;
|
|
40665
40796
|
break;
|
|
40666
40797
|
}
|
|
40667
40798
|
orderset = orderSets[i];
|
|
40668
40799
|
lastSetToInitialize = setHandlerInstance.getOrderSetShouldInitPlanner(orderSets, i);
|
|
40669
40800
|
loadedSet = setHandlerInstance.findLoadedSet(this.sets, orderset.CatalogCodex, orderset.AccountGUID);
|
|
40670
40801
|
if (!loadedSet) {
|
|
40671
|
-
|
|
40802
|
+
_context18.next = 18;
|
|
40672
40803
|
break;
|
|
40673
40804
|
}
|
|
40674
|
-
|
|
40805
|
+
_context18.next = 15;
|
|
40675
40806
|
return setHandlerInstance.addOrderSetArticlesToExistingSet(loadedSet, orderset, lastSetToInitialize);
|
|
40676
40807
|
case 15:
|
|
40677
40808
|
this.checkMatchingProducts('onAdd');
|
|
40678
|
-
|
|
40809
|
+
_context18.next = 20;
|
|
40679
40810
|
break;
|
|
40680
40811
|
case 18:
|
|
40681
|
-
|
|
40812
|
+
_context18.next = 20;
|
|
40682
40813
|
return setHandlerInstance.initSet(orderset, this.getInitStateForSet(), lastSetToInitialize);
|
|
40683
40814
|
case 20:
|
|
40684
40815
|
this.cleanUpEmptySets(true);
|
|
40685
40816
|
case 21:
|
|
40686
40817
|
i++;
|
|
40687
|
-
|
|
40818
|
+
_context18.next = 8;
|
|
40688
40819
|
break;
|
|
40689
40820
|
case 24:
|
|
40690
40821
|
this.divaBasketHandler.actBasket.OrderSets = [];
|
|
@@ -40696,11 +40827,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40696
40827
|
this.loadPaletteInfos(undefined, [articlesKeys[0]], articlesKeys);
|
|
40697
40828
|
case 31:
|
|
40698
40829
|
case "end":
|
|
40699
|
-
return
|
|
40830
|
+
return _context18.stop();
|
|
40700
40831
|
}
|
|
40701
|
-
},
|
|
40832
|
+
}, _callee18, this);
|
|
40702
40833
|
}));
|
|
40703
|
-
function addSetToActPlanningByDivaNr(
|
|
40834
|
+
function addSetToActPlanningByDivaNr(_x56) {
|
|
40704
40835
|
return _addSetToActPlanningByDivaNr.apply(this, arguments);
|
|
40705
40836
|
}
|
|
40706
40837
|
return addSetToActPlanningByDivaNr;
|
|
@@ -40733,28 +40864,28 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40733
40864
|
}, {
|
|
40734
40865
|
key: "setActSetCurConfigStepKey",
|
|
40735
40866
|
value: function () {
|
|
40736
|
-
var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40867
|
+
var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(curConfigStepKey) {
|
|
40737
40868
|
var set;
|
|
40738
|
-
return _regeneratorRuntime.wrap(function
|
|
40739
|
-
while (1) switch (
|
|
40869
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
40870
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
40740
40871
|
case 0:
|
|
40741
40872
|
set = this.actSet();
|
|
40742
40873
|
if (set) {
|
|
40743
|
-
|
|
40874
|
+
_context19.next = 3;
|
|
40744
40875
|
break;
|
|
40745
40876
|
}
|
|
40746
|
-
return
|
|
40877
|
+
return _context19.abrupt("return");
|
|
40747
40878
|
case 3:
|
|
40748
40879
|
set.ActConfigStepKey = curConfigStepKey;
|
|
40749
|
-
|
|
40880
|
+
_context19.next = 6;
|
|
40750
40881
|
return setHandlerInstance.updateNavigation(set);
|
|
40751
40882
|
case 6:
|
|
40752
40883
|
case "end":
|
|
40753
|
-
return
|
|
40884
|
+
return _context19.stop();
|
|
40754
40885
|
}
|
|
40755
|
-
},
|
|
40886
|
+
}, _callee19, this);
|
|
40756
40887
|
}));
|
|
40757
|
-
function setActSetCurConfigStepKey(
|
|
40888
|
+
function setActSetCurConfigStepKey(_x57) {
|
|
40758
40889
|
return _setActSetCurConfigStepKey.apply(this, arguments);
|
|
40759
40890
|
}
|
|
40760
40891
|
return setActSetCurConfigStepKey;
|
|
@@ -40903,17 +41034,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40903
41034
|
}, {
|
|
40904
41035
|
key: "deletePlannerElement",
|
|
40905
41036
|
value: function () {
|
|
40906
|
-
var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41037
|
+
var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(setId, elementId, denyElementSelectionClear) {
|
|
40907
41038
|
var _this$updateViewPlann11;
|
|
40908
41039
|
var set, result, _this$updateElementSe5, _this$updateElementSe6;
|
|
40909
|
-
return _regeneratorRuntime.wrap(function
|
|
40910
|
-
while (1) switch (
|
|
41040
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
41041
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
40911
41042
|
case 0:
|
|
40912
41043
|
set = this.sets[setId];
|
|
40913
|
-
|
|
41044
|
+
_context20.next = 3;
|
|
40914
41045
|
return setHandlerInstance.deleteElementFromSetByElemId(set, elementId, true);
|
|
40915
41046
|
case 3:
|
|
40916
|
-
result =
|
|
41047
|
+
result = _context20.sent;
|
|
40917
41048
|
this.updateConfigStructure();
|
|
40918
41049
|
(_this$updateViewPlann11 = this.updateViewPlannerElements) === null || _this$updateViewPlann11 === void 0 || _this$updateViewPlann11.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
40919
41050
|
this.updatePlannerView('DELETE_PLANNER_ELEMENT');
|
|
@@ -40924,17 +41055,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40924
41055
|
}
|
|
40925
41056
|
this.updatePriceInView();
|
|
40926
41057
|
this.checkMatchingProducts('onDelete');
|
|
40927
|
-
|
|
41058
|
+
_context20.next = 14;
|
|
40928
41059
|
return this.getFreePlacesOnGrids(undefined, 'deleteElement');
|
|
40929
41060
|
case 14:
|
|
40930
41061
|
this.plannerChangeLog('onDeletePlanner');
|
|
40931
41062
|
case 15:
|
|
40932
41063
|
case "end":
|
|
40933
|
-
return
|
|
41064
|
+
return _context20.stop();
|
|
40934
41065
|
}
|
|
40935
|
-
},
|
|
41066
|
+
}, _callee20, this);
|
|
40936
41067
|
}));
|
|
40937
|
-
function deletePlannerElement(
|
|
41068
|
+
function deletePlannerElement(_x58, _x59, _x60) {
|
|
40938
41069
|
return _deletePlannerElement.apply(this, arguments);
|
|
40939
41070
|
}
|
|
40940
41071
|
return deletePlannerElement;
|
|
@@ -40948,17 +41079,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40948
41079
|
}, {
|
|
40949
41080
|
key: "copyPlannerElement",
|
|
40950
41081
|
value: (function () {
|
|
40951
|
-
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41082
|
+
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(setId, elementId, curConfigKey, copyInfo) {
|
|
40952
41083
|
var _this$updateViewPlann12;
|
|
40953
41084
|
var set, newSelectedArticle, newConfigStepKey, _this$updateElementSe7, baseArticle;
|
|
40954
|
-
return _regeneratorRuntime.wrap(function
|
|
40955
|
-
while (1) switch (
|
|
41085
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
41086
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
40956
41087
|
case 0:
|
|
40957
41088
|
set = this.sets[setId];
|
|
40958
|
-
|
|
41089
|
+
_context21.next = 3;
|
|
40959
41090
|
return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
|
|
40960
41091
|
case 3:
|
|
40961
|
-
newSelectedArticle =
|
|
41092
|
+
newSelectedArticle = _context21.sent;
|
|
40962
41093
|
this.updateConfigStructure();
|
|
40963
41094
|
(_this$updateViewPlann12 = this.updateViewPlannerElements) === null || _this$updateViewPlann12 === void 0 || _this$updateViewPlann12.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
40964
41095
|
this.updatePlannerView('COPY_PLANNER_ELEMENT');
|
|
@@ -40972,14 +41103,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40972
41103
|
(_this$updateElementSe7 = this.updateElementSelectionPlanner) === null || _this$updateElementSe7 === void 0 || _this$updateElementSe7.call(this, [baseArticle.setId], [baseArticle.elementId], true);
|
|
40973
41104
|
}
|
|
40974
41105
|
this.checkMatchingProducts('onCopy');
|
|
40975
|
-
return
|
|
41106
|
+
return _context21.abrupt("return", newConfigStepKey);
|
|
40976
41107
|
case 13:
|
|
40977
41108
|
case "end":
|
|
40978
|
-
return
|
|
41109
|
+
return _context21.stop();
|
|
40979
41110
|
}
|
|
40980
|
-
},
|
|
41111
|
+
}, _callee21, this);
|
|
40981
41112
|
}));
|
|
40982
|
-
function copyPlannerElement(
|
|
41113
|
+
function copyPlannerElement(_x61, _x62, _x63, _x64) {
|
|
40983
41114
|
return _copyPlannerElement.apply(this, arguments);
|
|
40984
41115
|
}
|
|
40985
41116
|
return copyPlannerElement;
|
|
@@ -41008,33 +41139,33 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41008
41139
|
}, {
|
|
41009
41140
|
key: "getFreePlacesOnGrids",
|
|
41010
41141
|
value: function () {
|
|
41011
|
-
var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41142
|
+
var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(gridGroup, from) {
|
|
41012
41143
|
var _this$updateFreePlace;
|
|
41013
41144
|
var set, freeShelfGrids, plannedShelfGrids;
|
|
41014
|
-
return _regeneratorRuntime.wrap(function
|
|
41015
|
-
while (1) switch (
|
|
41145
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
41146
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
41016
41147
|
case 0:
|
|
41017
41148
|
set = this.actSet();
|
|
41018
41149
|
if (set) {
|
|
41019
|
-
|
|
41150
|
+
_context22.next = 3;
|
|
41020
41151
|
break;
|
|
41021
41152
|
}
|
|
41022
41153
|
throw new Error('getFreePlacesOnGrids: act set is not defined!');
|
|
41023
41154
|
case 3:
|
|
41024
41155
|
if (!gridGroup) {
|
|
41025
|
-
|
|
41156
|
+
_context22.next = 9;
|
|
41026
41157
|
break;
|
|
41027
41158
|
}
|
|
41028
|
-
|
|
41159
|
+
_context22.next = 6;
|
|
41029
41160
|
return setHandlerInstance.getFreeShelfGrids(set, gridGroup);
|
|
41030
41161
|
case 6:
|
|
41031
|
-
|
|
41032
|
-
|
|
41162
|
+
_context22.t0 = _context22.sent;
|
|
41163
|
+
_context22.next = 10;
|
|
41033
41164
|
break;
|
|
41034
41165
|
case 9:
|
|
41035
|
-
|
|
41166
|
+
_context22.t0 = undefined;
|
|
41036
41167
|
case 10:
|
|
41037
|
-
freeShelfGrids =
|
|
41168
|
+
freeShelfGrids = _context22.t0;
|
|
41038
41169
|
plannedShelfGrids = setHandlerInstance.getPlannedShelfGrids(set);
|
|
41039
41170
|
LOG$1.debug('TOULA', 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
|
|
41040
41171
|
LOG$1.debug('update free from: ' + from, 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
|
|
@@ -41042,17 +41173,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41042
41173
|
freeShelfGrids: freeShelfGrids,
|
|
41043
41174
|
plannedShelfGrids: plannedShelfGrids
|
|
41044
41175
|
});
|
|
41045
|
-
return
|
|
41176
|
+
return _context22.abrupt("return", {
|
|
41046
41177
|
freeShelfGrids: freeShelfGrids,
|
|
41047
41178
|
plannedShelfGrids: plannedShelfGrids
|
|
41048
41179
|
});
|
|
41049
41180
|
case 16:
|
|
41050
41181
|
case "end":
|
|
41051
|
-
return
|
|
41182
|
+
return _context22.stop();
|
|
41052
41183
|
}
|
|
41053
|
-
},
|
|
41184
|
+
}, _callee22, this);
|
|
41054
41185
|
}));
|
|
41055
|
-
function getFreePlacesOnGrids(
|
|
41186
|
+
function getFreePlacesOnGrids(_x65, _x66) {
|
|
41056
41187
|
return _getFreePlacesOnGrids.apply(this, arguments);
|
|
41057
41188
|
}
|
|
41058
41189
|
return getFreePlacesOnGrids;
|
|
@@ -41069,36 +41200,36 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41069
41200
|
}, {
|
|
41070
41201
|
key: "moveShelfItemToGrid",
|
|
41071
41202
|
value: function () {
|
|
41072
|
-
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41203
|
+
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(accessoireBasketId, parentBasketId, gridName, cellIndex) {
|
|
41073
41204
|
var set, newGridId;
|
|
41074
|
-
return _regeneratorRuntime.wrap(function
|
|
41075
|
-
while (1) switch (
|
|
41205
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
41206
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
41076
41207
|
case 0:
|
|
41077
41208
|
set = this.actSet();
|
|
41078
41209
|
if (set) {
|
|
41079
|
-
|
|
41210
|
+
_context23.next = 3;
|
|
41080
41211
|
break;
|
|
41081
41212
|
}
|
|
41082
|
-
return
|
|
41213
|
+
return _context23.abrupt("return");
|
|
41083
41214
|
case 3:
|
|
41084
|
-
|
|
41215
|
+
_context23.next = 5;
|
|
41085
41216
|
return setHandlerInstance.moveShelfItemToGrid(set, accessoireBasketId, parentBasketId, gridName, cellIndex);
|
|
41086
41217
|
case 5:
|
|
41087
|
-
newGridId =
|
|
41218
|
+
newGridId = _context23.sent;
|
|
41088
41219
|
this.updatePlannerView('MOVE_SHELF_ITEM');
|
|
41089
41220
|
if (!newGridId) {
|
|
41090
|
-
|
|
41221
|
+
_context23.next = 10;
|
|
41091
41222
|
break;
|
|
41092
41223
|
}
|
|
41093
|
-
|
|
41224
|
+
_context23.next = 10;
|
|
41094
41225
|
return this.getFreePlacesOnGrids(newGridId, 'move shelf');
|
|
41095
41226
|
case 10:
|
|
41096
41227
|
case "end":
|
|
41097
|
-
return
|
|
41228
|
+
return _context23.stop();
|
|
41098
41229
|
}
|
|
41099
|
-
},
|
|
41230
|
+
}, _callee23, this);
|
|
41100
41231
|
}));
|
|
41101
|
-
function moveShelfItemToGrid(
|
|
41232
|
+
function moveShelfItemToGrid(_x67, _x68, _x69, _x70) {
|
|
41102
41233
|
return _moveShelfItemToGrid.apply(this, arguments);
|
|
41103
41234
|
}
|
|
41104
41235
|
return moveShelfItemToGrid;
|
|
@@ -41106,27 +41237,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41106
41237
|
}, {
|
|
41107
41238
|
key: "resetArticle",
|
|
41108
41239
|
value: function () {
|
|
41109
|
-
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41240
|
+
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(basketId) {
|
|
41110
41241
|
var set;
|
|
41111
|
-
return _regeneratorRuntime.wrap(function
|
|
41112
|
-
while (1) switch (
|
|
41242
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
41243
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
41113
41244
|
case 0:
|
|
41114
41245
|
set = this.actSet();
|
|
41115
41246
|
if (set) {
|
|
41116
|
-
|
|
41247
|
+
_context24.next = 3;
|
|
41117
41248
|
break;
|
|
41118
41249
|
}
|
|
41119
|
-
return
|
|
41250
|
+
return _context24.abrupt("return");
|
|
41120
41251
|
case 3:
|
|
41121
|
-
|
|
41252
|
+
_context24.next = 5;
|
|
41122
41253
|
return setHandlerInstance.resetArticle(set, basketId);
|
|
41123
41254
|
case 5:
|
|
41124
41255
|
case "end":
|
|
41125
|
-
return
|
|
41256
|
+
return _context24.stop();
|
|
41126
41257
|
}
|
|
41127
|
-
},
|
|
41258
|
+
}, _callee24, this);
|
|
41128
41259
|
}));
|
|
41129
|
-
function resetArticle(
|
|
41260
|
+
function resetArticle(_x71) {
|
|
41130
41261
|
return _resetArticle.apply(this, arguments);
|
|
41131
41262
|
}
|
|
41132
41263
|
return resetArticle;
|
|
@@ -41156,10 +41287,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41156
41287
|
}, {
|
|
41157
41288
|
key: "checkMatchingProducts",
|
|
41158
41289
|
value: function () {
|
|
41159
|
-
var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41290
|
+
var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(from) {
|
|
41160
41291
|
var set, _set$getMatchingProdu, _set$getMatchingOrigP, _set$getMatchingOrigP2, _set$getMatchingProdu2;
|
|
41161
|
-
return _regeneratorRuntime.wrap(function
|
|
41162
|
-
while (1) switch (
|
|
41292
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
41293
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
41163
41294
|
case 0:
|
|
41164
41295
|
set = this.actSet();
|
|
41165
41296
|
if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
@@ -41173,20 +41304,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41173
41304
|
}
|
|
41174
41305
|
}
|
|
41175
41306
|
if (!(set !== null && set !== void 0 && set.api.doCheckForProductsMatch())) {
|
|
41176
|
-
|
|
41307
|
+
_context25.next = 6;
|
|
41177
41308
|
break;
|
|
41178
41309
|
}
|
|
41179
|
-
|
|
41310
|
+
_context25.next = 5;
|
|
41180
41311
|
return productHandlerInstance.updateProducts(this.setsAsArray, this.api, this.divaBasketHandler.divaWWSHandler, from);
|
|
41181
41312
|
case 5:
|
|
41182
41313
|
this.updatePriceInView();
|
|
41183
41314
|
case 6:
|
|
41184
41315
|
case "end":
|
|
41185
|
-
return
|
|
41316
|
+
return _context25.stop();
|
|
41186
41317
|
}
|
|
41187
|
-
},
|
|
41318
|
+
}, _callee25, this);
|
|
41188
41319
|
}));
|
|
41189
|
-
function checkMatchingProducts(
|
|
41320
|
+
function checkMatchingProducts(_x72) {
|
|
41190
41321
|
return _checkMatchingProducts.apply(this, arguments);
|
|
41191
41322
|
}
|
|
41192
41323
|
return checkMatchingProducts;
|
|
@@ -41263,7 +41394,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41263
41394
|
}, {
|
|
41264
41395
|
key: "saveToBasketWrapper",
|
|
41265
41396
|
value: function () {
|
|
41266
|
-
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41397
|
+
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(event, repairOnly, force) {
|
|
41267
41398
|
var _this$actions27,
|
|
41268
41399
|
_this$actions27$toggl,
|
|
41269
41400
|
_this$actions28,
|
|
@@ -41272,8 +41403,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41272
41403
|
_this$actions32,
|
|
41273
41404
|
_this$i18n14;
|
|
41274
41405
|
var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product, _this$actSet9, url, _result, _this$actions26, result, _this$actions29, _this$i18n8, _this$i18n9, _this$actions30, _this$i18n10, _this$i18n11, _this$actions31, _this$i18n12, _this$i18n13, _this$updatePlannerMs2;
|
|
41275
|
-
return _regeneratorRuntime.wrap(function
|
|
41276
|
-
while (1) switch (
|
|
41406
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
41407
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
41277
41408
|
case 0:
|
|
41278
41409
|
returnTo = this.getReturnTo(event);
|
|
41279
41410
|
finalEvent = {
|
|
@@ -41281,50 +41412,50 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41281
41412
|
saveBasket: true
|
|
41282
41413
|
};
|
|
41283
41414
|
if (!(returnTo == 'OPEN_LEAFLET_BARRIER')) {
|
|
41284
|
-
|
|
41415
|
+
_context26.next = 21;
|
|
41285
41416
|
break;
|
|
41286
41417
|
}
|
|
41287
41418
|
product = undefined;
|
|
41288
41419
|
if (!((_this$api$getBarrierC = this.api.getBarrierConfig()) !== null && _this$api$getBarrierC !== void 0 && _this$api$getBarrierC.affiliate)) {
|
|
41289
|
-
|
|
41420
|
+
_context26.next = 10;
|
|
41290
41421
|
break;
|
|
41291
41422
|
}
|
|
41292
41423
|
url = this.api.getCatalogProductUrl(this.actSet().getCatalogCodex());
|
|
41293
|
-
|
|
41424
|
+
_context26.next = 8;
|
|
41294
41425
|
return this.api.getDataCache(url, url, undefined, 'catalog');
|
|
41295
41426
|
case 8:
|
|
41296
|
-
_result =
|
|
41427
|
+
_result = _context26.sent;
|
|
41297
41428
|
product = productHandlerInstance.getBestMatch((_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.getDivaArticles(), _result);
|
|
41298
41429
|
case 10:
|
|
41299
|
-
|
|
41430
|
+
_context26.next = 12;
|
|
41300
41431
|
return (_this$openLeafeltBarr = this.openLeafeltBarrier) === null || _this$openLeafeltBarr === void 0 ? void 0 : _this$openLeafeltBarr.call(this, this.divaBasketHandler, this.api.getBarrierConfig(), product);
|
|
41301
41432
|
case 12:
|
|
41302
|
-
finalEvent =
|
|
41433
|
+
finalEvent = _context26.sent;
|
|
41303
41434
|
if (finalEvent) {
|
|
41304
|
-
|
|
41435
|
+
_context26.next = 17;
|
|
41305
41436
|
break;
|
|
41306
41437
|
}
|
|
41307
|
-
return
|
|
41438
|
+
return _context26.abrupt("return", 'canceled');
|
|
41308
41439
|
case 17:
|
|
41309
41440
|
if (!(!finalEvent.saveBasket && finalEvent.event)) {
|
|
41310
|
-
|
|
41441
|
+
_context26.next = 20;
|
|
41311
41442
|
break;
|
|
41312
41443
|
}
|
|
41313
41444
|
(_this$actions26 = this.actions) === null || _this$actions26 === void 0 || _this$actions26.onEvent({
|
|
41314
41445
|
type: finalEvent.event
|
|
41315
41446
|
});
|
|
41316
|
-
return
|
|
41447
|
+
return _context26.abrupt("return", 'canceled');
|
|
41317
41448
|
case 20:
|
|
41318
41449
|
returnTo = finalEvent.event == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
|
|
41319
41450
|
case 21:
|
|
41320
41451
|
(_this$actions27 = this.actions) === null || _this$actions27 === void 0 || (_this$actions27$toggl = _this$actions27.toggleLoading) === null || _this$actions27$toggl === void 0 || _this$actions27$toggl.call(_this$actions27, 'Planner_Saving', false, true);
|
|
41321
|
-
|
|
41452
|
+
_context26.next = 24;
|
|
41322
41453
|
return this.saveToBasket(finalEvent.event, repairOnly, force);
|
|
41323
41454
|
case 24:
|
|
41324
|
-
result =
|
|
41455
|
+
result = _context26.sent;
|
|
41325
41456
|
(_this$actions28 = this.actions) === null || _this$actions28 === void 0 || (_this$actions28$toggl = _this$actions28.toggleLoading) === null || _this$actions28$toggl === void 0 || _this$actions28$toggl.call(_this$actions28, 'Planner_Saving', false, false);
|
|
41326
41457
|
if (!(result === 'canceled')) {
|
|
41327
|
-
|
|
41458
|
+
_context26.next = 30;
|
|
41328
41459
|
break;
|
|
41329
41460
|
}
|
|
41330
41461
|
LOG$1.error(new DivaError('failed to save Basket'));
|
|
@@ -41332,10 +41463,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41332
41463
|
text: ((_this$i18n8 = this.i18n()) === null || _this$i18n8 === void 0 ? void 0 : _this$i18n8.t('modal.general_error')) + ' --- ' + DivaUtils.formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils.getCurrentTraceId() ? ((_this$i18n9 = this.i18n()) === null || _this$i18n9 === void 0 ? void 0 : _this$i18n9.t('modal.errorcode')) + ': ' + DivaUtils.getCurrentTraceId() : '',
|
|
41333
41464
|
accept: true
|
|
41334
41465
|
});
|
|
41335
|
-
return
|
|
41466
|
+
return _context26.abrupt("return", result);
|
|
41336
41467
|
case 30:
|
|
41337
|
-
|
|
41338
|
-
|
|
41468
|
+
_context26.t0 = returnTo;
|
|
41469
|
+
_context26.next = _context26.t0 === 'OPEN_PDF' ? 33 : _context26.t0 === 'SAVE_BASKET_WITH_MODAL' ? 35 : _context26.t0 === 'OPEN_CONTACT_FORM' ? 36 : 36;
|
|
41339
41470
|
break;
|
|
41340
41471
|
case 33:
|
|
41341
41472
|
if (!this.getBasket().PDFDocumentURL) {
|
|
@@ -41355,7 +41486,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41355
41486
|
}
|
|
41356
41487
|
});
|
|
41357
41488
|
}
|
|
41358
|
-
return
|
|
41489
|
+
return _context26.abrupt("break", 36);
|
|
41359
41490
|
case 35:
|
|
41360
41491
|
(_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.openModal({
|
|
41361
41492
|
text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
|
|
@@ -41363,20 +41494,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41363
41494
|
});
|
|
41364
41495
|
case 36:
|
|
41365
41496
|
if (!(result == 'noArticleToSave')) {
|
|
41366
|
-
|
|
41497
|
+
_context26.next = 39;
|
|
41367
41498
|
break;
|
|
41368
41499
|
}
|
|
41369
41500
|
(_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
|
|
41370
|
-
return
|
|
41501
|
+
return _context26.abrupt("return", 'canceled');
|
|
41371
41502
|
case 39:
|
|
41372
|
-
return
|
|
41503
|
+
return _context26.abrupt("return", result);
|
|
41373
41504
|
case 40:
|
|
41374
41505
|
case "end":
|
|
41375
|
-
return
|
|
41506
|
+
return _context26.stop();
|
|
41376
41507
|
}
|
|
41377
|
-
},
|
|
41508
|
+
}, _callee26, this);
|
|
41378
41509
|
}));
|
|
41379
|
-
function saveToBasketWrapper(
|
|
41510
|
+
function saveToBasketWrapper(_x73, _x74, _x75) {
|
|
41380
41511
|
return _saveToBasketWrapper.apply(this, arguments);
|
|
41381
41512
|
}
|
|
41382
41513
|
return saveToBasketWrapper;
|
|
@@ -41384,43 +41515,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41384
41515
|
}, {
|
|
41385
41516
|
key: "saveToBasket",
|
|
41386
41517
|
value: function () {
|
|
41387
|
-
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41518
|
+
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(event, repairOnly, force) {
|
|
41388
41519
|
var _returnTo, _returnTo2, _returnTo3, _this$actions33, _this$actions34, _this$actions35, _this$divaBasketHandl2;
|
|
41389
41520
|
var set, actBasket, returnTo, oldReturnTo, result, newDivaNr, _result2, product;
|
|
41390
|
-
return _regeneratorRuntime.wrap(function
|
|
41391
|
-
while (1) switch (
|
|
41521
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
41522
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
41392
41523
|
case 0:
|
|
41393
41524
|
set = this.actSet();
|
|
41394
41525
|
if (!(setHandlerInstance.isNoArticleToSave(this.sets) && !force)) {
|
|
41395
|
-
|
|
41526
|
+
_context27.next = 3;
|
|
41396
41527
|
break;
|
|
41397
41528
|
}
|
|
41398
|
-
return
|
|
41529
|
+
return _context27.abrupt("return", 'noArticleToSave');
|
|
41399
41530
|
case 3:
|
|
41400
41531
|
actBasket = this.divaBasketHandler.actBasket;
|
|
41401
41532
|
returnTo = this.getReturnTo(event);
|
|
41402
41533
|
if (!((_returnTo = returnTo) !== null && _returnTo !== void 0 && _returnTo.startsWith('FAVORITS') && favoritesHandlerInstance.FavoritesDefined(set))) {
|
|
41403
|
-
|
|
41534
|
+
_context27.next = 13;
|
|
41404
41535
|
break;
|
|
41405
41536
|
}
|
|
41406
41537
|
oldReturnTo = returnTo;
|
|
41407
41538
|
this.ReturnTo = returnTo.replace('FAVORITS_', '');
|
|
41408
|
-
|
|
41539
|
+
_context27.next = 10;
|
|
41409
41540
|
return this.handleFavorites('SAVE');
|
|
41410
41541
|
case 10:
|
|
41411
|
-
result =
|
|
41542
|
+
result = _context27.sent;
|
|
41412
41543
|
if (result === 'canceled') {
|
|
41413
41544
|
this.ReturnTo = oldReturnTo;
|
|
41414
41545
|
}
|
|
41415
|
-
return
|
|
41546
|
+
return _context27.abrupt("return", result);
|
|
41416
41547
|
case 13:
|
|
41417
|
-
|
|
41418
|
-
|
|
41419
|
-
|
|
41548
|
+
_context27.t0 = this.divaBasketHandler;
|
|
41549
|
+
_context27.t1 = this.divaBasketHandler.actDivaNr;
|
|
41550
|
+
_context27.next = 17;
|
|
41420
41551
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
|
|
41421
41552
|
case 17:
|
|
41422
|
-
|
|
41423
|
-
|
|
41553
|
+
_context27.t2 = _context27.sent;
|
|
41554
|
+
_context27.t0.setBasketData.call(_context27.t0, _context27.t1, _context27.t2);
|
|
41424
41555
|
if ((_returnTo2 = returnTo) !== null && _returnTo2 !== void 0 && _returnTo2.endsWith('OPEN_SELLER_BASKET')) {
|
|
41425
41556
|
this.ReturnTo = 'OPEN_SELLER_BASKET';
|
|
41426
41557
|
returnTo = this.ReturnTo;
|
|
@@ -41435,11 +41566,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41435
41566
|
this.divaBasketHandler.fillOrigConfigurations();
|
|
41436
41567
|
actBasket.Updated = Date.now();
|
|
41437
41568
|
if (!returnTo) {
|
|
41438
|
-
|
|
41569
|
+
_context27.next = 52;
|
|
41439
41570
|
break;
|
|
41440
41571
|
}
|
|
41441
|
-
|
|
41442
|
-
|
|
41572
|
+
_context27.t3 = returnTo;
|
|
41573
|
+
_context27.next = _context27.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 28 : _context27.t3 === 'OPEN_SELLER_BASKET' ? 31 : _context27.t3 === 'OPEN_PDF' ? 33 : _context27.t3 === 'SAVE_BASKET_WITH_MODAL' ? 33 : _context27.t3 === 'SAVE_BASKET' ? 33 : _context27.t3 === 'SAVE_BASKET_SYNC' ? 33 : _context27.t3 === 'OPEN_LEAFLET_BARRIER' ? 33 : 52;
|
|
41443
41574
|
break;
|
|
41444
41575
|
case 28:
|
|
41445
41576
|
(_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.toggleLoading('buildScene', false, false);
|
|
@@ -41453,7 +41584,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41453
41584
|
basketData: actBasket
|
|
41454
41585
|
}
|
|
41455
41586
|
});
|
|
41456
|
-
return
|
|
41587
|
+
return _context27.abrupt("break", 52);
|
|
41457
41588
|
case 31:
|
|
41458
41589
|
(_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.openComponent({
|
|
41459
41590
|
type: 'SELLER',
|
|
@@ -41465,23 +41596,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41465
41596
|
basketData: actBasket
|
|
41466
41597
|
}
|
|
41467
41598
|
});
|
|
41468
|
-
return
|
|
41599
|
+
return _context27.abrupt("break", 52);
|
|
41469
41600
|
case 33:
|
|
41470
41601
|
if (!(event == 'onSaveProduct')) {
|
|
41471
|
-
|
|
41602
|
+
_context27.next = 43;
|
|
41472
41603
|
break;
|
|
41473
41604
|
}
|
|
41474
41605
|
//copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
|
|
41475
41606
|
actBasket = new BasketData(JSON.parse(JSON.stringify(actBasket)));
|
|
41476
|
-
|
|
41607
|
+
_context27.next = 37;
|
|
41477
41608
|
return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
|
|
41478
41609
|
case 37:
|
|
41479
|
-
|
|
41610
|
+
_context27.next = 39;
|
|
41480
41611
|
return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
|
|
41481
41612
|
case 39:
|
|
41482
|
-
newDivaNr =
|
|
41613
|
+
newDivaNr = _context27.sent;
|
|
41483
41614
|
actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
|
|
41484
|
-
|
|
41615
|
+
_context27.next = 51;
|
|
41485
41616
|
break;
|
|
41486
41617
|
case 43:
|
|
41487
41618
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
@@ -41490,32 +41621,32 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41490
41621
|
}
|
|
41491
41622
|
this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
|
|
41492
41623
|
actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
|
|
41493
|
-
|
|
41624
|
+
_context27.next = 48;
|
|
41494
41625
|
return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo);
|
|
41495
41626
|
case 48:
|
|
41496
|
-
_result2 =
|
|
41627
|
+
_result2 = _context27.sent;
|
|
41497
41628
|
if (!(_result2 === 'ERROR_NO_BASKET_SAVED' || _result2 === 'ERROR_BASKET_AFTER_SAVE')) {
|
|
41498
|
-
|
|
41629
|
+
_context27.next = 51;
|
|
41499
41630
|
break;
|
|
41500
41631
|
}
|
|
41501
|
-
return
|
|
41632
|
+
return _context27.abrupt("return", 'canceled');
|
|
41502
41633
|
case 51:
|
|
41503
|
-
return
|
|
41634
|
+
return _context27.abrupt("break", 52);
|
|
41504
41635
|
case 52:
|
|
41505
41636
|
if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
|
|
41506
41637
|
actBasket = (_this$divaBasketHandl2 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl2 !== void 0 ? _this$divaBasketHandl2 : actBasket; //get pdf documenturl from saved basket
|
|
41507
|
-
|
|
41638
|
+
_context27.next = 56;
|
|
41508
41639
|
return this.addToBasket(actBasket, event);
|
|
41509
41640
|
case 56:
|
|
41510
|
-
product =
|
|
41511
|
-
return
|
|
41641
|
+
product = _context27.sent;
|
|
41642
|
+
return _context27.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
|
|
41512
41643
|
case 58:
|
|
41513
41644
|
case "end":
|
|
41514
|
-
return
|
|
41645
|
+
return _context27.stop();
|
|
41515
41646
|
}
|
|
41516
|
-
},
|
|
41647
|
+
}, _callee27, this);
|
|
41517
41648
|
}));
|
|
41518
|
-
function saveToBasket(
|
|
41649
|
+
function saveToBasket(_x76, _x77, _x78) {
|
|
41519
41650
|
return _saveToBasket.apply(this, arguments);
|
|
41520
41651
|
}
|
|
41521
41652
|
return saveToBasket;
|
|
@@ -41651,6 +41782,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41651
41782
|
value: function getEmailConfig() {
|
|
41652
41783
|
return this.api.getEmailConfig();
|
|
41653
41784
|
}
|
|
41785
|
+
}, {
|
|
41786
|
+
key: "getAllConfig",
|
|
41787
|
+
value: function getAllConfig() {
|
|
41788
|
+
return this.plannerConfig.settings;
|
|
41789
|
+
}
|
|
41654
41790
|
}, {
|
|
41655
41791
|
key: "getTemplateConfig",
|
|
41656
41792
|
value: function getTemplateConfig() {
|
|
@@ -41679,62 +41815,68 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41679
41815
|
var _this$actSet18;
|
|
41680
41816
|
return (_this$actSet18 = this.actSet()) === null || _this$actSet18 === void 0 || (_this$actSet18 = _this$actSet18.CatalogData) === null || _this$actSet18 === void 0 ? void 0 : _this$actSet18.defaultDimensionsActive;
|
|
41681
41817
|
}
|
|
41818
|
+
}, {
|
|
41819
|
+
key: "autoOpenContentItem",
|
|
41820
|
+
value: function autoOpenContentItem() {
|
|
41821
|
+
var _this$actSet19;
|
|
41822
|
+
return (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 || (_this$actSet19 = _this$actSet19.CatalogData) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.autoOpenContentItem;
|
|
41823
|
+
}
|
|
41682
41824
|
}, {
|
|
41683
41825
|
key: "hidePlannerUiIcons",
|
|
41684
41826
|
value: function hidePlannerUiIcons() {
|
|
41685
|
-
var _this$
|
|
41686
|
-
return (_this$
|
|
41827
|
+
var _this$actSet20;
|
|
41828
|
+
return (_this$actSet20 = this.actSet()) === null || _this$actSet20 === void 0 || (_this$actSet20 = _this$actSet20.CatalogData) === null || _this$actSet20 === void 0 ? void 0 : _this$actSet20.hidePlannerUiIcons;
|
|
41687
41829
|
}
|
|
41688
41830
|
}, {
|
|
41689
41831
|
key: "doShowPlannerReplaceMode",
|
|
41690
41832
|
value: function doShowPlannerReplaceMode() {
|
|
41691
|
-
var _this$
|
|
41692
|
-
var catalogData = (_this$
|
|
41833
|
+
var _this$actSet21, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
|
|
41834
|
+
var catalogData = (_this$actSet21 = this.actSet()) === null || _this$actSet21 === void 0 ? void 0 : _this$actSet21.CatalogData;
|
|
41693
41835
|
return (catalogData === null || catalogData === void 0 ? void 0 : catalogData.replaceModeActive) && ((_this$api$getViewConf2 = this.api.getViewConfig()) === null || _this$api$getViewConf2 === void 0 ? void 0 : _this$api$getViewConf2.showReplaceFunctionInPlanner) && Object.entries(catalogData.allCatalogPlannerArticles).length > 1 && Object.entries((_catalogData$PlannerP = (_catalogData$PlannerP2 = catalogData.PlannerPaletteViewInfo) === null || _catalogData$PlannerP2 === void 0 ? void 0 : _catalogData$PlannerP2.catalogPlannerArticles) !== null && _catalogData$PlannerP !== void 0 ? _catalogData$PlannerP : {}).length > 1;
|
|
41694
41836
|
}
|
|
41695
41837
|
}, {
|
|
41696
41838
|
key: "doPlannerReplaceAutoSwitch",
|
|
41697
41839
|
value: function doPlannerReplaceAutoSwitch() {
|
|
41698
|
-
var _this$
|
|
41699
|
-
var catalogData = (_this$
|
|
41840
|
+
var _this$actSet22, _this$api$getViewConf3;
|
|
41841
|
+
var catalogData = (_this$actSet22 = this.actSet()) === null || _this$actSet22 === void 0 ? void 0 : _this$actSet22.CatalogData;
|
|
41700
41842
|
return (catalogData === null || catalogData === void 0 ? void 0 : catalogData.catalogPlannsCompletely) && this.doShowPlannerReplaceMode() && ((_this$api$getViewConf3 = this.api.getViewConfig()) === null || _this$api$getViewConf3 === void 0 ? void 0 : _this$api$getViewConf3.allowAutoSwitchInReplaceFunctionInPlanner);
|
|
41701
41843
|
}
|
|
41702
41844
|
}, {
|
|
41703
41845
|
key: "getHidePlanner",
|
|
41704
41846
|
value: function getHidePlanner() {
|
|
41705
|
-
var _this$
|
|
41706
|
-
return this.api.getHidePlanner() || !!((_this$
|
|
41847
|
+
var _this$actSet23;
|
|
41848
|
+
return this.api.getHidePlanner() || !!((_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.useBoxPlanner);
|
|
41707
41849
|
}
|
|
41708
41850
|
}, {
|
|
41709
41851
|
key: "getAllowRTV",
|
|
41710
41852
|
value: function getAllowRTV() {
|
|
41711
|
-
var _this$state5, _this$
|
|
41853
|
+
var _this$state5, _this$actSet24, _this$state6, _this$actSet25;
|
|
41712
41854
|
if (this.getEnableUnityRtvKombi()) return false;
|
|
41713
41855
|
if ((_this$state5 = this.state) !== null && _this$state5 !== void 0 && _this$state5.organization.settings.forceRTV) return true;
|
|
41714
|
-
if ((_this$
|
|
41715
|
-
if ((_this$state6 = this.state) !== null && _this$state6 !== void 0 && _this$state6.organization.settings.enableRTV && (_this$
|
|
41856
|
+
if ((_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaForceRTV) return true;
|
|
41857
|
+
if ((_this$state6 = this.state) !== null && _this$state6 !== void 0 && _this$state6.organization.settings.enableRTV && (_this$actSet25 = this.actSet()) !== null && _this$actSet25 !== void 0 && _this$actSet25.CatalogData.divaArReady) return true;
|
|
41716
41858
|
return false;
|
|
41717
41859
|
}
|
|
41718
41860
|
}, {
|
|
41719
41861
|
key: "getAllowQRCodeAR",
|
|
41720
41862
|
value: function getAllowQRCodeAR() {
|
|
41721
|
-
var _this$
|
|
41722
|
-
if (this.api.enableAR && (_this$
|
|
41863
|
+
var _this$actSet26;
|
|
41864
|
+
if (this.api.enableAR && (_this$actSet26 = this.actSet()) !== null && _this$actSet26 !== void 0 && _this$actSet26.CatalogData.divaArReady) return true;
|
|
41723
41865
|
return false;
|
|
41724
41866
|
}
|
|
41725
41867
|
}, {
|
|
41726
41868
|
key: "getEnableUnityRtvKombi",
|
|
41727
41869
|
value: function getEnableUnityRtvKombi() {
|
|
41728
|
-
var _this$
|
|
41870
|
+
var _this$actSet27, _this$actSet28;
|
|
41729
41871
|
// if force rtv disable unity kombi - biohort
|
|
41730
|
-
if ((_this$
|
|
41731
|
-
return ((_this$
|
|
41872
|
+
if ((_this$actSet27 = this.actSet()) !== null && _this$actSet27 !== void 0 && _this$actSet27.CatalogData.divaForceRTV) return false;
|
|
41873
|
+
return ((_this$actSet28 = this.actSet()) === null || _this$actSet28 === void 0 ? void 0 : _this$actSet28.CatalogData.divaArReady) == true && this.api.getEnableRTVUnityKombi();
|
|
41732
41874
|
}
|
|
41733
41875
|
}, {
|
|
41734
41876
|
key: "getShelfPlannerRTV",
|
|
41735
41877
|
value: function getShelfPlannerRTV() {
|
|
41736
|
-
var _this$
|
|
41737
|
-
return (_this$
|
|
41878
|
+
var _this$actSet29;
|
|
41879
|
+
return (_this$actSet29 = this.actSet()) === null || _this$actSet29 === void 0 ? void 0 : _this$actSet29.CatalogData.useShelfPlannerRTV;
|
|
41738
41880
|
}
|
|
41739
41881
|
}, {
|
|
41740
41882
|
key: "getBasketData",
|
|
@@ -41749,23 +41891,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41749
41891
|
}, {
|
|
41750
41892
|
key: "getBasketDataWithEkText",
|
|
41751
41893
|
value: function () {
|
|
41752
|
-
var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41753
|
-
return _regeneratorRuntime.wrap(function
|
|
41754
|
-
while (1) switch (
|
|
41894
|
+
var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28() {
|
|
41895
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
41896
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
41755
41897
|
case 0:
|
|
41756
|
-
|
|
41757
|
-
|
|
41758
|
-
|
|
41898
|
+
_context28.t0 = this.divaBasketHandler;
|
|
41899
|
+
_context28.t1 = this.divaBasketHandler.actDivaNr;
|
|
41900
|
+
_context28.next = 4;
|
|
41759
41901
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, true, this.doAllowSetPlanner(), this.ReturnTo);
|
|
41760
41902
|
case 4:
|
|
41761
|
-
|
|
41762
|
-
|
|
41763
|
-
return
|
|
41903
|
+
_context28.t2 = _context28.sent;
|
|
41904
|
+
_context28.t0.setBasketData.call(_context28.t0, _context28.t1, _context28.t2);
|
|
41905
|
+
return _context28.abrupt("return", this.divaBasketHandler.actBasket);
|
|
41764
41906
|
case 7:
|
|
41765
41907
|
case "end":
|
|
41766
|
-
return
|
|
41908
|
+
return _context28.stop();
|
|
41767
41909
|
}
|
|
41768
|
-
},
|
|
41910
|
+
}, _callee28, this);
|
|
41769
41911
|
}));
|
|
41770
41912
|
function getBasketDataWithEkText() {
|
|
41771
41913
|
return _getBasketDataWithEkText.apply(this, arguments);
|
|
@@ -41775,8 +41917,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41775
41917
|
}, {
|
|
41776
41918
|
key: "getCatalogData",
|
|
41777
41919
|
value: function getCatalogData() {
|
|
41778
|
-
var _this$
|
|
41779
|
-
return (_this$
|
|
41920
|
+
var _this$actSet30;
|
|
41921
|
+
return (_this$actSet30 = this.actSet()) === null || _this$actSet30 === void 0 ? void 0 : _this$actSet30.CatalogData;
|
|
41780
41922
|
}
|
|
41781
41923
|
}, {
|
|
41782
41924
|
key: "ReturnTo",
|
|
@@ -41791,7 +41933,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41791
41933
|
}, {
|
|
41792
41934
|
key: "addToBasket",
|
|
41793
41935
|
value: function () {
|
|
41794
|
-
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41936
|
+
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(actBasket) {
|
|
41795
41937
|
var _this$actions36,
|
|
41796
41938
|
_this$actions37,
|
|
41797
41939
|
_this$actions38,
|
|
@@ -41811,44 +41953,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41811
41953
|
to,
|
|
41812
41954
|
variants,
|
|
41813
41955
|
products,
|
|
41814
|
-
|
|
41815
|
-
return _regeneratorRuntime.wrap(function
|
|
41816
|
-
while (1) switch (
|
|
41956
|
+
_args29 = arguments;
|
|
41957
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
41958
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
41817
41959
|
case 0:
|
|
41818
|
-
event =
|
|
41819
|
-
|
|
41820
|
-
|
|
41960
|
+
event = _args29.length > 1 && _args29[1] !== undefined ? _args29[1] : 'onAddToBasket';
|
|
41961
|
+
_context29.t0 = event;
|
|
41962
|
+
_context29.next = _context29.t0 === 'onWebPlanerPrint' ? 5 : _context29.t0 === 'onWebPlanerSave' ? 7 : _context29.t0 === 'onWebPlanerShare' ? 9 : _context29.t0 === 'onRequestConsulation' ? 11 : _context29.t0 === 'onSave' ? 13 : _context29.t0 === 'onSendEmail' ? 15 : _context29.t0 === 'onSaveProduct' ? 20 : _context29.t0 === 'dontSaveBasket' ? 27 : _context29.t0 === 'onAddToBasket' ? 28 : _context29.t0 === 'onSendContactForm' ? 30 : 33;
|
|
41821
41963
|
break;
|
|
41822
41964
|
case 5:
|
|
41823
41965
|
(_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
|
|
41824
41966
|
type: 'onWebPlanerPrint',
|
|
41825
41967
|
data: actBasket.getAsJson()
|
|
41826
41968
|
});
|
|
41827
|
-
return
|
|
41969
|
+
return _context29.abrupt("break", 35);
|
|
41828
41970
|
case 7:
|
|
41829
41971
|
(_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
|
|
41830
41972
|
type: 'onWebPlanerSave',
|
|
41831
41973
|
data: actBasket.getAsJson()
|
|
41832
41974
|
});
|
|
41833
|
-
return
|
|
41975
|
+
return _context29.abrupt("break", 35);
|
|
41834
41976
|
case 9:
|
|
41835
41977
|
(_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
|
|
41836
41978
|
type: 'onWebPlanerShare',
|
|
41837
41979
|
data: actBasket.getAsJson()
|
|
41838
41980
|
});
|
|
41839
|
-
return
|
|
41981
|
+
return _context29.abrupt("break", 35);
|
|
41840
41982
|
case 11:
|
|
41841
41983
|
(_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
|
|
41842
41984
|
type: 'onRequestConsulation',
|
|
41843
41985
|
data: actBasket.getAsJson()
|
|
41844
41986
|
});
|
|
41845
|
-
return
|
|
41987
|
+
return _context29.abrupt("break", 35);
|
|
41846
41988
|
case 13:
|
|
41847
41989
|
(_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
|
|
41848
41990
|
type: 'onSave',
|
|
41849
41991
|
data: actBasket.getAsJson()
|
|
41850
41992
|
});
|
|
41851
|
-
return
|
|
41993
|
+
return _context29.abrupt("break", 35);
|
|
41852
41994
|
case 15:
|
|
41853
41995
|
emailConfig = (_this$divaBasketHandl4 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : this.getEmailConfig(); //reset the emailConfig
|
|
41854
41996
|
this.divaBasketHandler.emailConfig = undefined;
|
|
@@ -41883,51 +42025,51 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41883
42025
|
type: 'onAddToBasket',
|
|
41884
42026
|
data: actBasket.getAsJson()
|
|
41885
42027
|
});
|
|
41886
|
-
return
|
|
42028
|
+
return _context29.abrupt("break", 35);
|
|
41887
42029
|
case 20:
|
|
41888
42030
|
this.actSet().CatalogData;
|
|
41889
|
-
|
|
42031
|
+
_context29.next = 23;
|
|
41890
42032
|
return this.api.saveAsProduct(this.sets, actBasket);
|
|
41891
42033
|
case 23:
|
|
41892
|
-
products =
|
|
42034
|
+
products = _context29.sent;
|
|
41893
42035
|
(_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
|
|
41894
42036
|
type: 'onAddToBasket',
|
|
41895
42037
|
data: actBasket.getAsJson()
|
|
41896
42038
|
});
|
|
41897
42039
|
if (!products) {
|
|
41898
|
-
|
|
42040
|
+
_context29.next = 27;
|
|
41899
42041
|
break;
|
|
41900
42042
|
}
|
|
41901
|
-
return
|
|
42043
|
+
return _context29.abrupt("return", products[0]);
|
|
41902
42044
|
case 27:
|
|
41903
42045
|
case 28:
|
|
41904
42046
|
(_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
|
|
41905
42047
|
type: 'onAddToBasket',
|
|
41906
42048
|
data: actBasket.getAsJson()
|
|
41907
42049
|
});
|
|
41908
|
-
return
|
|
42050
|
+
return _context29.abrupt("break", 35);
|
|
41909
42051
|
case 30:
|
|
41910
42052
|
(_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
|
|
41911
42053
|
type: 'onAddToBasket',
|
|
41912
42054
|
data: actBasket.getAsJson()
|
|
41913
42055
|
});
|
|
41914
42056
|
this.openContactForm(this.divaBasketHandler);
|
|
41915
|
-
return
|
|
42057
|
+
return _context29.abrupt("break", 35);
|
|
41916
42058
|
case 33:
|
|
41917
42059
|
(_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.onEvent({
|
|
41918
42060
|
type: event,
|
|
41919
42061
|
data: actBasket.getAsJson()
|
|
41920
42062
|
});
|
|
41921
|
-
return
|
|
42063
|
+
return _context29.abrupt("break", 35);
|
|
41922
42064
|
case 35:
|
|
41923
|
-
return
|
|
42065
|
+
return _context29.abrupt("return");
|
|
41924
42066
|
case 36:
|
|
41925
42067
|
case "end":
|
|
41926
|
-
return
|
|
42068
|
+
return _context29.stop();
|
|
41927
42069
|
}
|
|
41928
|
-
},
|
|
42070
|
+
}, _callee29, this);
|
|
41929
42071
|
}));
|
|
41930
|
-
function addToBasket(
|
|
42072
|
+
function addToBasket(_x79) {
|
|
41931
42073
|
return _addToBasket.apply(this, arguments);
|
|
41932
42074
|
}
|
|
41933
42075
|
return addToBasket;
|
|
@@ -42202,9 +42344,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42202
42344
|
key: "initApiForLogicOnly",
|
|
42203
42345
|
value: //just for testing purposes
|
|
42204
42346
|
function () {
|
|
42205
|
-
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42206
|
-
return _regeneratorRuntime.wrap(function
|
|
42207
|
-
while (1) switch (
|
|
42347
|
+
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
|
|
42348
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
42349
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
42208
42350
|
case 0:
|
|
42209
42351
|
//empty services
|
|
42210
42352
|
this.api = new DivaApiHandler(_objectSpread$5(_objectSpread$5({}, this.plannerConfig), {}, {
|
|
@@ -42217,17 +42359,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42217
42359
|
jwt: jwt,
|
|
42218
42360
|
apiKey: apiKey
|
|
42219
42361
|
}), handler);
|
|
42220
|
-
|
|
42362
|
+
_context30.next = 3;
|
|
42221
42363
|
return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
|
|
42222
42364
|
case 3:
|
|
42223
42365
|
this.plannerHandler = new DivaPlannerHandler(true);
|
|
42224
42366
|
case 4:
|
|
42225
42367
|
case "end":
|
|
42226
|
-
return
|
|
42368
|
+
return _context30.stop();
|
|
42227
42369
|
}
|
|
42228
|
-
},
|
|
42370
|
+
}, _callee30, this);
|
|
42229
42371
|
}));
|
|
42230
|
-
function initApiForLogicOnly(
|
|
42372
|
+
function initApiForLogicOnly(_x80, _x81, _x82, _x83, _x84, _x85, _x86) {
|
|
42231
42373
|
return _initApiForLogicOnly.apply(this, arguments);
|
|
42232
42374
|
}
|
|
42233
42375
|
return initApiForLogicOnly;
|
|
@@ -42240,16 +42382,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42240
42382
|
}, {
|
|
42241
42383
|
key: "loadBasket",
|
|
42242
42384
|
value: function () {
|
|
42243
|
-
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42244
|
-
return _regeneratorRuntime.wrap(function
|
|
42245
|
-
while (1) switch (
|
|
42385
|
+
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31() {
|
|
42386
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
42387
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
42246
42388
|
case 0:
|
|
42247
|
-
return
|
|
42389
|
+
return _context31.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
|
|
42248
42390
|
case 1:
|
|
42249
42391
|
case "end":
|
|
42250
|
-
return
|
|
42392
|
+
return _context31.stop();
|
|
42251
42393
|
}
|
|
42252
|
-
},
|
|
42394
|
+
}, _callee31, this);
|
|
42253
42395
|
}));
|
|
42254
42396
|
function loadBasket() {
|
|
42255
42397
|
return _loadBasket.apply(this, arguments);
|
|
@@ -42264,39 +42406,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42264
42406
|
}, {
|
|
42265
42407
|
key: "initBasket",
|
|
42266
42408
|
value: function () {
|
|
42267
|
-
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42409
|
+
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32(init3D, ignoreFavorites) {
|
|
42268
42410
|
var initSetState, set, basket;
|
|
42269
|
-
return _regeneratorRuntime.wrap(function
|
|
42270
|
-
while (1) switch (
|
|
42411
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
42412
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
42271
42413
|
case 0:
|
|
42272
42414
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
42273
42415
|
initSetState = this.getInitStateForSet(!init3D);
|
|
42274
42416
|
this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
42275
|
-
|
|
42417
|
+
_context32.next = 5;
|
|
42276
42418
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
42277
42419
|
case 5:
|
|
42278
42420
|
//TODO check if when basket gets repaired the product match gets called
|
|
42279
42421
|
set = this.actSet();
|
|
42280
42422
|
setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
|
|
42281
42423
|
if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
|
|
42282
|
-
|
|
42424
|
+
_context32.next = 10;
|
|
42283
42425
|
break;
|
|
42284
42426
|
}
|
|
42285
|
-
|
|
42427
|
+
_context32.next = 10;
|
|
42286
42428
|
return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
|
|
42287
42429
|
case 10:
|
|
42288
|
-
|
|
42430
|
+
_context32.next = 12;
|
|
42289
42431
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
|
|
42290
42432
|
case 12:
|
|
42291
|
-
basket =
|
|
42292
|
-
return
|
|
42433
|
+
basket = _context32.sent;
|
|
42434
|
+
return _context32.abrupt("return", basket);
|
|
42293
42435
|
case 14:
|
|
42294
42436
|
case "end":
|
|
42295
|
-
return
|
|
42437
|
+
return _context32.stop();
|
|
42296
42438
|
}
|
|
42297
|
-
},
|
|
42439
|
+
}, _callee32, this);
|
|
42298
42440
|
}));
|
|
42299
|
-
function initBasket(
|
|
42441
|
+
function initBasket(_x87, _x88) {
|
|
42300
42442
|
return _initBasket.apply(this, arguments);
|
|
42301
42443
|
}
|
|
42302
42444
|
return initBasket;
|
|
@@ -42310,21 +42452,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42310
42452
|
}, {
|
|
42311
42453
|
key: "getValidVariantsLength",
|
|
42312
42454
|
value: function () {
|
|
42313
|
-
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42455
|
+
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33() {
|
|
42314
42456
|
var set;
|
|
42315
|
-
return _regeneratorRuntime.wrap(function
|
|
42316
|
-
while (1) switch (
|
|
42457
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
42458
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
42317
42459
|
case 0:
|
|
42318
42460
|
set = this.actSet();
|
|
42319
|
-
|
|
42461
|
+
_context33.next = 3;
|
|
42320
42462
|
return favoritesHandlerInstance.getValidVariants(set, true);
|
|
42321
42463
|
case 3:
|
|
42322
|
-
return
|
|
42464
|
+
return _context33.abrupt("return", _context33.sent.length);
|
|
42323
42465
|
case 4:
|
|
42324
42466
|
case "end":
|
|
42325
|
-
return
|
|
42467
|
+
return _context33.stop();
|
|
42326
42468
|
}
|
|
42327
|
-
},
|
|
42469
|
+
}, _callee33, this);
|
|
42328
42470
|
}));
|
|
42329
42471
|
function getValidVariantsLength() {
|
|
42330
42472
|
return _getValidVariantsLength.apply(this, arguments);
|
|
@@ -42334,46 +42476,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42334
42476
|
}, {
|
|
42335
42477
|
key: "handleFavorites",
|
|
42336
42478
|
value: function () {
|
|
42337
|
-
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42479
|
+
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(mode) {
|
|
42338
42480
|
var _this5 = this;
|
|
42339
42481
|
var set, i;
|
|
42340
|
-
return _regeneratorRuntime.wrap(function
|
|
42341
|
-
while (1) switch (
|
|
42482
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
42483
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
42342
42484
|
case 0:
|
|
42343
42485
|
set = this.actSet();
|
|
42344
42486
|
i = 0;
|
|
42345
42487
|
case 2:
|
|
42346
42488
|
if (!favoritesHandlerInstance.IsCalcForSummary) {
|
|
42347
|
-
|
|
42489
|
+
_context34.next = 11;
|
|
42348
42490
|
break;
|
|
42349
42491
|
}
|
|
42350
|
-
|
|
42492
|
+
_context34.next = 5;
|
|
42351
42493
|
return DivaUtils.Sleep(200);
|
|
42352
42494
|
case 5:
|
|
42353
42495
|
i++;
|
|
42354
42496
|
if (!(i > 1000)) {
|
|
42355
|
-
|
|
42497
|
+
_context34.next = 9;
|
|
42356
42498
|
break;
|
|
42357
42499
|
}
|
|
42358
42500
|
LOG$1.error(new DivaError('error on generating Variants of Summary'));
|
|
42359
|
-
return
|
|
42501
|
+
return _context34.abrupt("break", 11);
|
|
42360
42502
|
case 9:
|
|
42361
|
-
|
|
42503
|
+
_context34.next = 2;
|
|
42362
42504
|
break;
|
|
42363
42505
|
case 11:
|
|
42364
|
-
|
|
42506
|
+
_context34.next = 13;
|
|
42365
42507
|
return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
|
|
42366
42508
|
return _this5.update2DGrid(set);
|
|
42367
42509
|
}, this.actions);
|
|
42368
42510
|
case 13:
|
|
42369
|
-
return
|
|
42511
|
+
return _context34.abrupt("return", _context34.sent);
|
|
42370
42512
|
case 14:
|
|
42371
42513
|
case "end":
|
|
42372
|
-
return
|
|
42514
|
+
return _context34.stop();
|
|
42373
42515
|
}
|
|
42374
|
-
},
|
|
42516
|
+
}, _callee34, this);
|
|
42375
42517
|
}));
|
|
42376
|
-
function handleFavorites(
|
|
42518
|
+
function handleFavorites(_x89) {
|
|
42377
42519
|
return _handleFavorites.apply(this, arguments);
|
|
42378
42520
|
}
|
|
42379
42521
|
return handleFavorites;
|
|
@@ -42386,48 +42528,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42386
42528
|
}, {
|
|
42387
42529
|
key: "initSapOrderLinesFromBasket",
|
|
42388
42530
|
value: function () {
|
|
42389
|
-
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42531
|
+
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35(divaNr, init3D, onlyLoadOldBakset) {
|
|
42390
42532
|
var result, oldBasket, basket;
|
|
42391
|
-
return _regeneratorRuntime.wrap(function
|
|
42392
|
-
while (1) switch (
|
|
42533
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
42534
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
42393
42535
|
case 0:
|
|
42394
42536
|
if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
42395
|
-
|
|
42537
|
+
_context35.next = 3;
|
|
42396
42538
|
return this.loadBasket();
|
|
42397
42539
|
case 3:
|
|
42398
|
-
result =
|
|
42540
|
+
result = _context35.sent;
|
|
42399
42541
|
if (!onlyLoadOldBakset) {
|
|
42400
|
-
|
|
42542
|
+
_context35.next = 6;
|
|
42401
42543
|
break;
|
|
42402
42544
|
}
|
|
42403
|
-
return
|
|
42545
|
+
return _context35.abrupt("return", {
|
|
42404
42546
|
oldBasket: new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
|
|
42405
42547
|
cache: {}
|
|
42406
42548
|
});
|
|
42407
42549
|
case 6:
|
|
42408
42550
|
if (!(result === false)) {
|
|
42409
|
-
|
|
42551
|
+
_context35.next = 8;
|
|
42410
42552
|
break;
|
|
42411
42553
|
}
|
|
42412
42554
|
throw new Error('Could not load basket! ' + divaNr);
|
|
42413
42555
|
case 8:
|
|
42414
42556
|
oldBasket = new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
|
|
42415
|
-
|
|
42557
|
+
_context35.next = 11;
|
|
42416
42558
|
return this.initBasket(init3D);
|
|
42417
42559
|
case 11:
|
|
42418
|
-
basket =
|
|
42419
|
-
return
|
|
42560
|
+
basket = _context35.sent;
|
|
42561
|
+
return _context35.abrupt("return", {
|
|
42420
42562
|
basket: basket,
|
|
42421
42563
|
oldBasket: oldBasket,
|
|
42422
42564
|
cache: this.api.getJsonDataCache()
|
|
42423
42565
|
});
|
|
42424
42566
|
case 13:
|
|
42425
42567
|
case "end":
|
|
42426
|
-
return
|
|
42568
|
+
return _context35.stop();
|
|
42427
42569
|
}
|
|
42428
|
-
},
|
|
42570
|
+
}, _callee35, this);
|
|
42429
42571
|
}));
|
|
42430
|
-
function initSapOrderLinesFromBasket(
|
|
42572
|
+
function initSapOrderLinesFromBasket(_x90, _x91, _x92) {
|
|
42431
42573
|
return _initSapOrderLinesFromBasket.apply(this, arguments);
|
|
42432
42574
|
}
|
|
42433
42575
|
return initSapOrderLinesFromBasket;
|
|
@@ -43084,6 +43226,7 @@ var Grid = /*#__PURE__*/function () {
|
|
|
43084
43226
|
//all the different accessoires selectable to place in the grid. can be absolute defined in grid.ArticleRelations or can change due to the heightGridCellCountOnRule where we rule is depending on the current configuration of the article.
|
|
43085
43227
|
_defineProperty(this, "articleRelations", void 0);
|
|
43086
43228
|
_defineProperty(this, "articleRelationsForOtherGroups", void 0);
|
|
43229
|
+
_defineProperty(this, "disableCellsByRules", void 0);
|
|
43087
43230
|
//if in theis grid an shelfaccessoire is planned laod this article aswell
|
|
43088
43231
|
_defineProperty(this, "montageOptions", void 0);
|
|
43089
43232
|
//disableCellsByFreeText
|
|
@@ -43114,6 +43257,7 @@ var Grid = /*#__PURE__*/function () {
|
|
|
43114
43257
|
this.showOnRule = grid.ShowOnRule;
|
|
43115
43258
|
this.montageOptions = grid.MontageOptions;
|
|
43116
43259
|
this.disableCellsByMeasures = grid.DisableCellsByMeasures;
|
|
43260
|
+
this.disableCellsByRules = grid.DisableCellsByRules;
|
|
43117
43261
|
this.visitOption = grid.VisitOption;
|
|
43118
43262
|
this.shelfId = 'SHELFARTICLE_' + article.basketId + '_' + index;
|
|
43119
43263
|
this.heightGridCellCountOnRule = data.ShelfPlanner[index].HeightGridCellCountOnRule;
|
|
@@ -44082,6 +44226,21 @@ var Grid = /*#__PURE__*/function () {
|
|
|
44082
44226
|
}
|
|
44083
44227
|
return count;
|
|
44084
44228
|
}
|
|
44229
|
+
}, {
|
|
44230
|
+
key: "getDisabledCellsByRule",
|
|
44231
|
+
value: function getDisabledCellsByRule() {
|
|
44232
|
+
var _this$disableCellsByR;
|
|
44233
|
+
var cellsToDisable = [];
|
|
44234
|
+
if (!((_this$disableCellsByR = this.disableCellsByRules) !== null && _this$disableCellsByR !== void 0 && _this$disableCellsByR.length)) return cellsToDisable;
|
|
44235
|
+
var article = this.article;
|
|
44236
|
+
for (var i = 0; i < this.disableCellsByRules.length; i++) {
|
|
44237
|
+
var rule = this.disableCellsByRules[i];
|
|
44238
|
+
if (!rule.rule || this.article.evalRule(DivaUtils.getRuleByFormula(rule.rule, this.article.catalogCodex, article.CatalogData.multiselectOptions))) {
|
|
44239
|
+
cellsToDisable = [].concat(_toConsumableArray(cellsToDisable), _toConsumableArray(rule.cells));
|
|
44240
|
+
}
|
|
44241
|
+
}
|
|
44242
|
+
return cellsToDisable;
|
|
44243
|
+
}
|
|
44085
44244
|
}, {
|
|
44086
44245
|
key: "ShelfId",
|
|
44087
44246
|
get: function get() {
|
|
@@ -59775,8 +59934,6 @@ var a$3 = {
|
|
|
59775
59934
|
},
|
|
59776
59935
|
settings: {
|
|
59777
59936
|
dontLoadAdditionalModelInfos: true,
|
|
59778
|
-
identifier: 'Seller',
|
|
59779
|
-
type: 'DIVA_WEBPLANNER',
|
|
59780
59937
|
configParams: {
|
|
59781
59938
|
mediaServiceApiKey: '620e074df81de00012ef47ed.wUyoXTbh4tR3DklrzvvdxFveVK9zcj4H',
|
|
59782
59939
|
// api2devKey: '627b71be68f4c30011dd25e2.I2RdwvdHG4gruMNr6l810tTU5x7afNMm',
|
|
@@ -59836,13 +59993,10 @@ var a$2 = {
|
|
|
59836
59993
|
}
|
|
59837
59994
|
},
|
|
59838
59995
|
settings: {
|
|
59839
|
-
identifier: 'PfisterWebPlanner',
|
|
59840
|
-
type: 'DIVA_WEBPLANNER',
|
|
59841
59996
|
configParams: {
|
|
59842
59997
|
mediaServiceApiKey: '5fb62c8251d161001142faec.TIxFhaibnlLORFzuRO0sqmYV6EnStvIg',
|
|
59843
59998
|
apiKey: '628c84397f7ae3001155004a.ccRvikkGQZqmVHUHIwUDDSIBmrSBm/3V'
|
|
59844
59999
|
},
|
|
59845
|
-
description: '',
|
|
59846
60000
|
applicationEnvironment: 'SELLER',
|
|
59847
60001
|
priceInfo: 'LAYOUT_LISTPRICE',
|
|
59848
60002
|
PriceFormat: {
|
|
@@ -59909,26 +60063,11 @@ var a$1 = {
|
|
|
59909
60063
|
}
|
|
59910
60064
|
},
|
|
59911
60065
|
settings: {
|
|
59912
|
-
identifier: 'PfisterWebPlanner',
|
|
59913
|
-
type: 'DIVA_WEBPLANNER',
|
|
59914
60066
|
configParams: {
|
|
59915
60067
|
mediaServiceApiKey: '5fb396c986d73f0011e1c482.WKxhYaXxMhn9SmPPAK6tZa4oFnFjlSux',
|
|
59916
60068
|
apiKey: '628c849377593d00119a87a0.CKOGmsd6LOjWGZtYk+9gB138lXCoOVBn'
|
|
59917
60069
|
},
|
|
59918
|
-
description: '',
|
|
59919
60070
|
applicationEnvironment: 'SELLER',
|
|
59920
|
-
priceInfo: 'LAYOUT_LISTPRICE',
|
|
59921
|
-
PriceFormat: {
|
|
59922
|
-
currency: 'CHF',
|
|
59923
|
-
spacing: true,
|
|
59924
|
-
currencyPosition: 'LEFT',
|
|
59925
|
-
showDecimals: 'IF_NEEDED',
|
|
59926
|
-
thousandSeparator: "'",
|
|
59927
|
-
decimalSeparator: '.',
|
|
59928
|
-
decimalsDigits: 2,
|
|
59929
|
-
addIfNoDecimal: '.–'
|
|
59930
|
-
},
|
|
59931
|
-
divaMediaServiceApiKey: '5fb396c986d73f0011e1c482.WKxhYaXxMhn9SmPPAK6tZa4oFnFjlSux',
|
|
59932
60071
|
diva3dServerMode: 'SignalR',
|
|
59933
60072
|
diva3dRenderGroup: 'QDIVA' // "QDIVA2"
|
|
59934
60073
|
},
|