@crystaldesign/web-planner-logic 24.13.0-beta.12 → 24.13.0-beta.13
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-df030103.js → DivaBoxPlanner-8014a683.js} +2 -2
- package/build/cjs/{DivaStandardPlanner-ec161f05.js → DivaStandardPlanner-a31c4fcd.js} +2 -2
- package/build/cjs/{DoorPlanner-d649d3e0.js → DoorPlanner-8d079ddb.js} +1 -1
- package/build/cjs/{Host3DSignalR-4ff8a82c.js → Host3DSignalR-7b21d1e9.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-8b969a35.js → LiviqueWWSHandler-4136ccdd.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-67f6f800.js → PfisterWWSHandler-2dfc936a.js} +1 -1
- package/build/cjs/{PlannerHandler2D-2123a819.js → PlannerHandler2D-aec63404.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-cecca329.js → SeriousBasketHandler-64d5e5ac.js} +1 -1
- package/build/cjs/{ShelfPlanner-1f6c17bd.js → ShelfPlanner-87ddb7cf.js} +1 -1
- package/build/cjs/{StandardWWSHandler-84c14168.js → StandardWWSHandler-f7f0f838.js} +1 -1
- package/build/cjs/{index-55163fb5.js → index-f7ce608d.js} +230 -140
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-c5f19be3.js → DivaBoxPlanner-256f6673.js} +2 -2
- package/build/esm/{DivaStandardPlanner-b5403631.js → DivaStandardPlanner-15069451.js} +2 -2
- package/build/esm/{DoorPlanner-53e38ab9.js → DoorPlanner-b9f3c272.js} +1 -1
- package/build/esm/{Host3DSignalR-be8b605a.js → Host3DSignalR-45e86f11.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-d88c02c3.js → LiviqueWWSHandler-7aae2b64.js} +1 -1
- package/build/esm/{PfisterWWSHandler-5458c5ab.js → PfisterWWSHandler-1affb9d8.js} +1 -1
- package/build/esm/{PlannerHandler2D-61827907.js → PlannerHandler2D-87d42a9b.js} +1 -1
- package/build/esm/{SeriousBasketHandler-d4db882d.js → SeriousBasketHandler-928f3aac.js} +1 -1
- package/build/esm/{ShelfPlanner-2ea25ecc.js → ShelfPlanner-48c3e993.js} +1 -1
- package/build/esm/{StandardWWSHandler-5391f27a.js → StandardWWSHandler-56b87098.js} +1 -1
- package/build/esm/{index-d51f7edd.js → index-8f2db083.js} +230 -140
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/interface/Basket/BasketEvent.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/Basket/BasketEvent.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Configuration.d.ts +2 -2
- 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 +0 -1
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +2 -0
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts +2 -4
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +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 +6 -5
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Product/DivaProductHandler.d.ts +5 -0
- package/build/types/web-planner-logic/src/logic/Product/DivaProductHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +3 -0
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/FavoritesHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts +2 -0
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts +2 -0
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -900,8 +900,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
900
900
|
return '/v1/products/' + productId + '/list';
|
|
901
901
|
}
|
|
902
902
|
}, {
|
|
903
|
-
key: "
|
|
904
|
-
value: function
|
|
903
|
+
key: "getProductByKeyValueUrl",
|
|
904
|
+
value: function getProductByKeyValueUrl(key, value) {
|
|
905
905
|
return "/v1/products/basket?key=".concat(key, "&value=").concat(value);
|
|
906
906
|
}
|
|
907
907
|
}, {
|
|
@@ -1614,6 +1614,16 @@ var ArticleOptionData = /*#__PURE__*/function () {
|
|
|
1614
1614
|
get: function get() {
|
|
1615
1615
|
return this.opt.catalogOPT.contentItemId;
|
|
1616
1616
|
}
|
|
1617
|
+
}, {
|
|
1618
|
+
key: "showSearchbar",
|
|
1619
|
+
get: function get() {
|
|
1620
|
+
return this.opt.catalogOPT.showSearchbar;
|
|
1621
|
+
}
|
|
1622
|
+
}, {
|
|
1623
|
+
key: "showFilter",
|
|
1624
|
+
get: function get() {
|
|
1625
|
+
return this.opt.catalogOPT.showFilter;
|
|
1626
|
+
}
|
|
1617
1627
|
}, {
|
|
1618
1628
|
key: "pdfUrl",
|
|
1619
1629
|
get: function get() {
|
|
@@ -17847,6 +17857,12 @@ var OptionCatalogData = /*#__PURE__*/function () {
|
|
|
17847
17857
|
case 'INFO_URL':
|
|
17848
17858
|
this.opt.url = prop.Value;
|
|
17849
17859
|
break;
|
|
17860
|
+
case 'SHOW_SEARCHBAR':
|
|
17861
|
+
this.opt.showSearchbar = prop.Value;
|
|
17862
|
+
break;
|
|
17863
|
+
case 'SHOW_FILTER':
|
|
17864
|
+
this.opt.showFilter = prop.Value;
|
|
17865
|
+
break;
|
|
17850
17866
|
case 'INFO_PDF':
|
|
17851
17867
|
this.opt.pdfUrl = prop.Value;
|
|
17852
17868
|
break;
|
|
@@ -18047,6 +18063,16 @@ var OptionCatalogData = /*#__PURE__*/function () {
|
|
|
18047
18063
|
get: function get() {
|
|
18048
18064
|
return this.opt.url;
|
|
18049
18065
|
}
|
|
18066
|
+
}, {
|
|
18067
|
+
key: "showSearchbar",
|
|
18068
|
+
get: function get() {
|
|
18069
|
+
return this.opt.showSearchbar;
|
|
18070
|
+
}
|
|
18071
|
+
}, {
|
|
18072
|
+
key: "showFilter",
|
|
18073
|
+
get: function get() {
|
|
18074
|
+
return this.opt.showFilter;
|
|
18075
|
+
}
|
|
18050
18076
|
}, {
|
|
18051
18077
|
key: "pdfUrl",
|
|
18052
18078
|
get: function get() {
|
|
@@ -18143,7 +18169,6 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18143
18169
|
brandName: json.Brandname,
|
|
18144
18170
|
mediaUrl: '',
|
|
18145
18171
|
// https://retail.diva-portal.de/files/33/9680c4a3-fc60-4541-8738-4859d9b24e9d/";
|
|
18146
|
-
imageBaseUrl: '',
|
|
18147
18172
|
subFolder: json.SubFolder,
|
|
18148
18173
|
longDescription: json.LongDescription,
|
|
18149
18174
|
longDescription_locales: json.LongDescription_locales,
|
|
@@ -18345,9 +18370,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18345
18370
|
key: "getMediaURL",
|
|
18346
18371
|
value: function getMediaURL(subFolder) {
|
|
18347
18372
|
var retval = '';
|
|
18348
|
-
if (this.
|
|
18349
|
-
retval = this.catalogData.imageBaseUrl;
|
|
18350
|
-
} else if (this.api.getBaseUrl().substring(0, 4) == 'http') {
|
|
18373
|
+
if (this.api.getBaseUrl().substring(0, 4) == 'http') {
|
|
18351
18374
|
retval = this.api.getBaseUrl() + '/' + this.api.getServerId() + '/';
|
|
18352
18375
|
}
|
|
18353
18376
|
if (subFolder != '') retval += subFolder + '/';
|
|
@@ -23578,7 +23601,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23578
23601
|
break;
|
|
23579
23602
|
}
|
|
23580
23603
|
_context.next = 4;
|
|
23581
|
-
return Promise.resolve().then(function () { return require('./ShelfPlanner-
|
|
23604
|
+
return Promise.resolve().then(function () { return require('./ShelfPlanner-87ddb7cf.js'); });
|
|
23582
23605
|
case 4:
|
|
23583
23606
|
_yield$import = _context.sent;
|
|
23584
23607
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -26921,6 +26944,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
26921
26944
|
_defineProperty__default["default"](this, "setId", void 0);
|
|
26922
26945
|
_defineProperty__default["default"](this, "_isActSet", false);
|
|
26923
26946
|
_defineProperty__default["default"](this, "setData", void 0);
|
|
26947
|
+
_defineProperty__default["default"](this, "_onlyCalcVariants", void 0);
|
|
26924
26948
|
_defineProperty__default["default"](this, "divaArticles", void 0);
|
|
26925
26949
|
//Schlüssel ist basketId
|
|
26926
26950
|
_defineProperty__default["default"](this, "configSingleData", void 0);
|
|
@@ -28110,7 +28134,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28110
28134
|
break;
|
|
28111
28135
|
}
|
|
28112
28136
|
_context4.next = 3;
|
|
28113
|
-
return Promise.resolve().then(function () { return require('./DoorPlanner-
|
|
28137
|
+
return Promise.resolve().then(function () { return require('./DoorPlanner-8d079ddb.js'); });
|
|
28114
28138
|
case 3:
|
|
28115
28139
|
_yield$import = _context4.sent;
|
|
28116
28140
|
DoorPlanner = _yield$import["default"];
|
|
@@ -28175,6 +28199,14 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28175
28199
|
get: function get() {
|
|
28176
28200
|
return this.setState;
|
|
28177
28201
|
}
|
|
28202
|
+
}, {
|
|
28203
|
+
key: "onlyCalcVariants",
|
|
28204
|
+
get: function get() {
|
|
28205
|
+
return this._onlyCalcVariants;
|
|
28206
|
+
},
|
|
28207
|
+
set: function set(val) {
|
|
28208
|
+
this._onlyCalcVariants = val;
|
|
28209
|
+
}
|
|
28178
28210
|
|
|
28179
28211
|
/**
|
|
28180
28212
|
*
|
|
@@ -29615,7 +29647,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
29615
29647
|
key: "getValidVariants",
|
|
29616
29648
|
value: function () {
|
|
29617
29649
|
var _getValidVariants = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(set, useCache) {
|
|
29618
|
-
var allvariants, validVariants, i;
|
|
29650
|
+
var allvariants, validVariants, i, _set$onlyCalcVariants;
|
|
29619
29651
|
return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context4) {
|
|
29620
29652
|
while (1) switch (_context4.prev = _context4.next) {
|
|
29621
29653
|
case 0:
|
|
@@ -29636,7 +29668,9 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
29636
29668
|
validVariants = [];
|
|
29637
29669
|
for (i = 0; i < allvariants.length; i++) {
|
|
29638
29670
|
if (!set.disabledVariants.includes(allvariants[i].id)) {
|
|
29639
|
-
|
|
29671
|
+
if (!((_set$onlyCalcVariants = set.onlyCalcVariants) !== null && _set$onlyCalcVariants !== void 0 && _set$onlyCalcVariants.length) || set.onlyCalcVariants.includes(allvariants[i].id)) {
|
|
29672
|
+
validVariants.push(allvariants[i]);
|
|
29673
|
+
}
|
|
29640
29674
|
}
|
|
29641
29675
|
}
|
|
29642
29676
|
return _context4.abrupt("return", validVariants);
|
|
@@ -30741,6 +30775,34 @@ var DivaProductHandler = /*#__PURE__*/function () {
|
|
|
30741
30775
|
}
|
|
30742
30776
|
return updateProducts;
|
|
30743
30777
|
}()
|
|
30778
|
+
}, {
|
|
30779
|
+
key: "getBestMatch",
|
|
30780
|
+
value: function getBestMatch(articles, products) {
|
|
30781
|
+
var OPTION_CODEX = 'KOPFTEIL';
|
|
30782
|
+
if (!articles) return;
|
|
30783
|
+
for (var key in articles) {
|
|
30784
|
+
var _article$VariantValue;
|
|
30785
|
+
var article = articles[key];
|
|
30786
|
+
var opv = (_article$VariantValue = article.VariantValues['OPT' + OPTION_CODEX]) === null || _article$VariantValue === void 0 ? void 0 : _article$VariantValue.replace('OPV', '');
|
|
30787
|
+
if (!products || !opv) continue;
|
|
30788
|
+
for (var i = 0; i < products.length; i++) {
|
|
30789
|
+
var _products$i$affiliate;
|
|
30790
|
+
if ((_products$i$affiliate = products[i].affiliate) !== null && _products$i$affiliate !== void 0 && _products$i$affiliate.length) if (this.findOPVCodexInVariantValues(products[i], OPTION_CODEX, opv)) {
|
|
30791
|
+
return products[i];
|
|
30792
|
+
}
|
|
30793
|
+
}
|
|
30794
|
+
}
|
|
30795
|
+
return undefined;
|
|
30796
|
+
}
|
|
30797
|
+
}, {
|
|
30798
|
+
key: "findOPVCodexInVariantValues",
|
|
30799
|
+
value: function findOPVCodexInVariantValues(product, opt, opv) {
|
|
30800
|
+
return product.articles.find(function (article) {
|
|
30801
|
+
return article.variantValues.find(function (variant) {
|
|
30802
|
+
return variant.OPT === opt && variant.OPV === opv;
|
|
30803
|
+
});
|
|
30804
|
+
});
|
|
30805
|
+
}
|
|
30744
30806
|
}]);
|
|
30745
30807
|
}();
|
|
30746
30808
|
var productHandlerInstance = new DivaProductHandler();
|
|
@@ -32565,7 +32627,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32565
32627
|
value: (function () {
|
|
32566
32628
|
var _variantsEvaluator = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee23(set, configItems, configStepKey, paletteType) {
|
|
32567
32629
|
var _set$ViewConfig, _configItems$;
|
|
32568
|
-
var opt, calcVariantsForPricePreview, previewType, _set$CatalogData$show, targetArticles, startTime, variants, endTime;
|
|
32630
|
+
var opt, calcVariantsForPricePreview, previewType, _set$api$ReturnToFrom, _set$CatalogData$show, targetArticles, startTime, variants, endTime;
|
|
32569
32631
|
return _regeneratorRuntime__default["default"].wrap(function _callee23$(_context25) {
|
|
32570
32632
|
while (1) switch (_context25.prev = _context25.next) {
|
|
32571
32633
|
case 0:
|
|
@@ -32579,7 +32641,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32579
32641
|
calcVariantsForPricePreview = false;
|
|
32580
32642
|
previewType = (_set$ViewConfig = set.ViewConfig) === null || _set$ViewConfig === void 0 ? void 0 : _set$ViewConfig.pricePreview;
|
|
32581
32643
|
if (previewType) {
|
|
32582
|
-
calcVariantsForPricePreview = !set.dontCalcPricePreviewDueToPerformanceIssues && !opt.showOnSeparatTabgroup && (!((_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length) || set.CatalogData.showPricePreviewOnlyOnOptions.includes(opt.codex));
|
|
32644
|
+
calcVariantsForPricePreview = !set.dontCalcPricePreviewDueToPerformanceIssues && !((_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.includes('PRODUCTCREATOR')) && !opt.showOnSeparatTabgroup && (!((_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length) || set.CatalogData.showPricePreviewOnlyOnOptions.includes(opt.codex));
|
|
32583
32645
|
}
|
|
32584
32646
|
if (set.PlannerMode === 'BoxPlanner') calcVariantsForPricePreview = false;
|
|
32585
32647
|
if (paletteType == 'GAL' && ((_configItems$ = configItems[0]) === null || _configItems$ === void 0 ? void 0 : _configItems$.groupName) === undefined || paletteType == 'TEXTBOX' || paletteType == 'NUMBERBOX' || paletteType == 'RANGE') {
|
|
@@ -34069,7 +34131,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34069
34131
|
key: "initProductId",
|
|
34070
34132
|
value: function () {
|
|
34071
34133
|
var _initProductId = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(api, productId) {
|
|
34072
|
-
var result;
|
|
34134
|
+
var result, successful;
|
|
34073
34135
|
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
34074
34136
|
while (1) switch (_context2.prev = _context2.next) {
|
|
34075
34137
|
case 0:
|
|
@@ -34081,10 +34143,17 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34081
34143
|
_context2.next = 6;
|
|
34082
34144
|
return this.initBasket(api, result.divaNr, {
|
|
34083
34145
|
basket: result.configuration
|
|
34084
|
-
}, false);
|
|
34146
|
+
}, false, productId);
|
|
34085
34147
|
case 6:
|
|
34086
|
-
|
|
34087
|
-
|
|
34148
|
+
successful = _context2.sent;
|
|
34149
|
+
if (!successful) {
|
|
34150
|
+
_context2.next = 9;
|
|
34151
|
+
break;
|
|
34152
|
+
}
|
|
34153
|
+
return _context2.abrupt("return", result);
|
|
34154
|
+
case 9:
|
|
34155
|
+
return _context2.abrupt("return", false);
|
|
34156
|
+
case 10:
|
|
34088
34157
|
case "end":
|
|
34089
34158
|
return _context2.stop();
|
|
34090
34159
|
}
|
|
@@ -34431,7 +34500,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34431
34500
|
case 0:
|
|
34432
34501
|
_context8.prev = 0;
|
|
34433
34502
|
_context8.next = 3;
|
|
34434
|
-
return api.getDataCache(api.
|
|
34503
|
+
return api.getDataCache(api.getProductByKeyValueUrl(key, productId), undefined, undefined, 'catalog', 'POST', {
|
|
34435
34504
|
fields: fields !== null && fields !== void 0 && fields.length ? fields : undefined
|
|
34436
34505
|
});
|
|
34437
34506
|
case 3:
|
|
@@ -34764,7 +34833,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34764
34833
|
break;
|
|
34765
34834
|
case 3:
|
|
34766
34835
|
_context12.next = 5;
|
|
34767
|
-
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-
|
|
34836
|
+
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-2dfc936a.js'); });
|
|
34768
34837
|
case 5:
|
|
34769
34838
|
_yield$import = _context12.sent;
|
|
34770
34839
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -34772,7 +34841,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34772
34841
|
return _context12.abrupt("break", 27);
|
|
34773
34842
|
case 9:
|
|
34774
34843
|
_context12.next = 11;
|
|
34775
|
-
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-
|
|
34844
|
+
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-4136ccdd.js'); });
|
|
34776
34845
|
case 11:
|
|
34777
34846
|
_yield$import2 = _context12.sent;
|
|
34778
34847
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -34780,7 +34849,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34780
34849
|
return _context12.abrupt("break", 27);
|
|
34781
34850
|
case 15:
|
|
34782
34851
|
_context12.next = 17;
|
|
34783
|
-
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-
|
|
34852
|
+
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-64d5e5ac.js'); });
|
|
34784
34853
|
case 17:
|
|
34785
34854
|
_yield$import3 = _context12.sent;
|
|
34786
34855
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -34788,7 +34857,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34788
34857
|
return _context12.abrupt("break", 27);
|
|
34789
34858
|
case 21:
|
|
34790
34859
|
_context12.next = 23;
|
|
34791
|
-
return Promise.resolve().then(function () { return require('./StandardWWSHandler-
|
|
34860
|
+
return Promise.resolve().then(function () { return require('./StandardWWSHandler-f7f0f838.js'); });
|
|
34792
34861
|
case 23:
|
|
34793
34862
|
_yield$import4 = _context12.sent;
|
|
34794
34863
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -36178,7 +36247,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36178
36247
|
while (1) switch (_context3.prev = _context3.next) {
|
|
36179
36248
|
case 0:
|
|
36180
36249
|
_context3.next = 2;
|
|
36181
|
-
return Promise.resolve().then(function () { return require('./Host3DSignalR-
|
|
36250
|
+
return Promise.resolve().then(function () { return require('./Host3DSignalR-7b21d1e9.js'); });
|
|
36182
36251
|
case 2:
|
|
36183
36252
|
_yield$import = _context3.sent;
|
|
36184
36253
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -37730,7 +37799,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
37730
37799
|
break;
|
|
37731
37800
|
case 8:
|
|
37732
37801
|
_context4.next = 10;
|
|
37733
|
-
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-
|
|
37802
|
+
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-a31c4fcd.js'); });
|
|
37734
37803
|
case 10:
|
|
37735
37804
|
_yield$import = _context4.sent;
|
|
37736
37805
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -37741,7 +37810,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
37741
37810
|
return _context4.abrupt("break", 21);
|
|
37742
37811
|
case 15:
|
|
37743
37812
|
_context4.next = 17;
|
|
37744
|
-
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-
|
|
37813
|
+
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-8014a683.js'); });
|
|
37745
37814
|
case 17:
|
|
37746
37815
|
_yield$import2 = _context4.sent;
|
|
37747
37816
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -40418,76 +40487,90 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40418
40487
|
key: "saveToBasketWrapper",
|
|
40419
40488
|
value: function () {
|
|
40420
40489
|
var _saveToBasketWrapper = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee25(event, repairOnly, force) {
|
|
40421
|
-
var _this$
|
|
40422
|
-
_this$actions25$toggl,
|
|
40423
|
-
_this$actions26,
|
|
40490
|
+
var _this$actions26,
|
|
40424
40491
|
_this$actions26$toggl,
|
|
40492
|
+
_this$actions27,
|
|
40493
|
+
_this$actions27$toggl,
|
|
40425
40494
|
_this2 = this,
|
|
40426
|
-
_this$
|
|
40495
|
+
_this$actions31,
|
|
40427
40496
|
_this$i18n14;
|
|
40428
|
-
var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product, result, _this$
|
|
40497
|
+
var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product, _this$actSet9, url, _result, _this$actions25, result, _this$actions28, _this$i18n8, _this$i18n9, _this$actions29, _this$i18n10, _this$i18n11, _this$actions30, _this$i18n12, _this$i18n13, _this$updatePlannerMs2;
|
|
40429
40498
|
return _regeneratorRuntime__default["default"].wrap(function _callee25$(_context25) {
|
|
40430
40499
|
while (1) switch (_context25.prev = _context25.next) {
|
|
40431
40500
|
case 0:
|
|
40432
40501
|
returnTo = this.getReturnTo(event);
|
|
40433
|
-
finalEvent =
|
|
40502
|
+
finalEvent = {
|
|
40503
|
+
event: event,
|
|
40504
|
+
saveBasket: true
|
|
40505
|
+
};
|
|
40434
40506
|
if (!(returnTo == 'OPEN_LEAFLET_BARRIER')) {
|
|
40435
|
-
_context25.next =
|
|
40507
|
+
_context25.next = 21;
|
|
40436
40508
|
break;
|
|
40437
40509
|
}
|
|
40438
40510
|
product = undefined;
|
|
40439
40511
|
if (!((_this$api$getBarrierC = this.api.getBarrierConfig()) !== null && _this$api$getBarrierC !== void 0 && _this$api$getBarrierC.affiliate)) {
|
|
40440
|
-
_context25.next =
|
|
40512
|
+
_context25.next = 10;
|
|
40441
40513
|
break;
|
|
40442
40514
|
}
|
|
40443
|
-
|
|
40444
|
-
|
|
40445
|
-
|
|
40446
|
-
_context25.sent;
|
|
40515
|
+
url = this.api.getCatalogProductUrl(this.actSet().getCatalogCodex());
|
|
40516
|
+
_context25.next = 8;
|
|
40517
|
+
return this.api.getDataCache(url, url, undefined, 'catalog');
|
|
40447
40518
|
case 8:
|
|
40448
|
-
|
|
40449
|
-
|
|
40519
|
+
_result = _context25.sent;
|
|
40520
|
+
product = productHandlerInstance.getBestMatch((_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.getDivaArticles(), _result);
|
|
40450
40521
|
case 10:
|
|
40522
|
+
_context25.next = 12;
|
|
40523
|
+
return (_this$openLeafeltBarr = this.openLeafeltBarrier) === null || _this$openLeafeltBarr === void 0 ? void 0 : _this$openLeafeltBarr.call(this, this.divaBasketHandler, this.api.getBarrierConfig(), product);
|
|
40524
|
+
case 12:
|
|
40451
40525
|
finalEvent = _context25.sent;
|
|
40452
40526
|
if (finalEvent) {
|
|
40453
|
-
_context25.next =
|
|
40527
|
+
_context25.next = 17;
|
|
40454
40528
|
break;
|
|
40455
40529
|
}
|
|
40456
40530
|
return _context25.abrupt("return", 'canceled');
|
|
40457
|
-
case 13:
|
|
40458
|
-
returnTo = finalEvent == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
|
|
40459
|
-
case 14:
|
|
40460
|
-
(_this$actions25 = this.actions) === null || _this$actions25 === void 0 || (_this$actions25$toggl = _this$actions25.toggleLoading) === null || _this$actions25$toggl === void 0 || _this$actions25$toggl.call(_this$actions25, 'Planner_Saving', false, true);
|
|
40461
|
-
_context25.next = 17;
|
|
40462
|
-
return this.saveToBasket(finalEvent, repairOnly, force);
|
|
40463
40531
|
case 17:
|
|
40532
|
+
if (!(!finalEvent.saveBasket && finalEvent.event)) {
|
|
40533
|
+
_context25.next = 20;
|
|
40534
|
+
break;
|
|
40535
|
+
}
|
|
40536
|
+
(_this$actions25 = this.actions) === null || _this$actions25 === void 0 || _this$actions25.onEvent({
|
|
40537
|
+
type: finalEvent.event
|
|
40538
|
+
});
|
|
40539
|
+
return _context25.abrupt("return", 'canceled');
|
|
40540
|
+
case 20:
|
|
40541
|
+
returnTo = finalEvent.event == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
|
|
40542
|
+
case 21:
|
|
40543
|
+
(_this$actions26 = this.actions) === null || _this$actions26 === void 0 || (_this$actions26$toggl = _this$actions26.toggleLoading) === null || _this$actions26$toggl === void 0 || _this$actions26$toggl.call(_this$actions26, 'Planner_Saving', false, true);
|
|
40544
|
+
_context25.next = 24;
|
|
40545
|
+
return this.saveToBasket(finalEvent.event, repairOnly, force);
|
|
40546
|
+
case 24:
|
|
40464
40547
|
result = _context25.sent;
|
|
40465
|
-
(_this$
|
|
40548
|
+
(_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, false);
|
|
40466
40549
|
if (!(result === 'canceled')) {
|
|
40467
|
-
_context25.next =
|
|
40550
|
+
_context25.next = 30;
|
|
40468
40551
|
break;
|
|
40469
40552
|
}
|
|
40470
40553
|
LOG$1.error(new DivaUtils.DivaError('failed to save Basket'));
|
|
40471
|
-
(_this$
|
|
40554
|
+
(_this$actions28 = this.actions) === null || _this$actions28 === void 0 || _this$actions28.openModal({
|
|
40472
40555
|
text: ((_this$i18n8 = this.i18n()) === null || _this$i18n8 === void 0 ? void 0 : _this$i18n8.t('modal.general_error')) + ' --- ' + DivaUtils__default["default"].formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils__default["default"].getCurrentTraceId() ? ((_this$i18n9 = this.i18n()) === null || _this$i18n9 === void 0 ? void 0 : _this$i18n9.t('modal.errorcode')) + ': ' + DivaUtils__default["default"].getCurrentTraceId() : '',
|
|
40473
40556
|
accept: true
|
|
40474
40557
|
});
|
|
40475
40558
|
return _context25.abrupt("return", result);
|
|
40476
|
-
case
|
|
40559
|
+
case 30:
|
|
40477
40560
|
_context25.t0 = returnTo;
|
|
40478
|
-
_context25.next = _context25.t0 === 'OPEN_PDF' ?
|
|
40561
|
+
_context25.next = _context25.t0 === 'OPEN_PDF' ? 33 : _context25.t0 === 'SAVE_BASKET_WITH_MODAL' ? 35 : 36;
|
|
40479
40562
|
break;
|
|
40480
|
-
case
|
|
40563
|
+
case 33:
|
|
40481
40564
|
if (!this.getBasket().PDFDocumentURL) {
|
|
40482
40565
|
LOG$1.error(new DivaUtils.DivaError('PDF url is missing in basket', {
|
|
40483
40566
|
code: 'WC_0010'
|
|
40484
40567
|
}));
|
|
40485
|
-
(_this$
|
|
40568
|
+
(_this$actions29 = this.actions) === null || _this$actions29 === void 0 || _this$actions29.openModal({
|
|
40486
40569
|
text: ((_this$i18n10 = this.i18n()) === null || _this$i18n10 === void 0 ? void 0 : _this$i18n10.t('modal.general_error')) + ' --- ' + DivaUtils__default["default"].formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils__default["default"].getCurrentTraceId() ? ((_this$i18n11 = this.i18n()) === null || _this$i18n11 === void 0 ? void 0 : _this$i18n11.t('modal.errorcode')) + ': ' + DivaUtils__default["default"].getCurrentTraceId() : '',
|
|
40487
40570
|
accept: true
|
|
40488
40571
|
});
|
|
40489
40572
|
} else {
|
|
40490
|
-
(_this$
|
|
40573
|
+
(_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.openModal({
|
|
40491
40574
|
text: (_this$i18n12 = this.i18n()) === null || _this$i18n12 === void 0 ? void 0 : _this$i18n12.t(this.divaBasketHandler.actBasket.Status === 'ORDER' ? 'modal.open_order_pdf_now' : 'modal.open_leaflet_pdf_now'),
|
|
40492
40575
|
accept: (_this$i18n13 = this.i18n()) === null || _this$i18n13 === void 0 ? void 0 : _this$i18n13.t('modals.open_now'),
|
|
40493
40576
|
callback: function callback() {
|
|
@@ -40495,22 +40578,22 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40495
40578
|
}
|
|
40496
40579
|
});
|
|
40497
40580
|
}
|
|
40498
|
-
return _context25.abrupt("break",
|
|
40499
|
-
case
|
|
40500
|
-
(_this$
|
|
40581
|
+
return _context25.abrupt("break", 36);
|
|
40582
|
+
case 35:
|
|
40583
|
+
(_this$actions31 = this.actions) === null || _this$actions31 === void 0 || _this$actions31.openModal({
|
|
40501
40584
|
text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
|
|
40502
40585
|
accept: true
|
|
40503
40586
|
});
|
|
40504
|
-
case
|
|
40587
|
+
case 36:
|
|
40505
40588
|
if (!(result == 'noArticleToSave')) {
|
|
40506
|
-
_context25.next =
|
|
40589
|
+
_context25.next = 39;
|
|
40507
40590
|
break;
|
|
40508
40591
|
}
|
|
40509
40592
|
(_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
|
|
40510
40593
|
return _context25.abrupt("return", 'canceled');
|
|
40511
|
-
case
|
|
40594
|
+
case 39:
|
|
40512
40595
|
return _context25.abrupt("return", result);
|
|
40513
|
-
case
|
|
40596
|
+
case 40:
|
|
40514
40597
|
case "end":
|
|
40515
40598
|
return _context25.stop();
|
|
40516
40599
|
}
|
|
@@ -40525,7 +40608,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40525
40608
|
key: "saveToBasket",
|
|
40526
40609
|
value: function () {
|
|
40527
40610
|
var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee26(event, repairOnly, force) {
|
|
40528
|
-
var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$
|
|
40611
|
+
var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$actions32, _this$actions33, _this$actions34;
|
|
40529
40612
|
var set, actBasket, returnTo, oldReturnTo, result, newDivaNr, _result2, _event4, product;
|
|
40530
40613
|
return _regeneratorRuntime__default["default"].wrap(function _callee26$(_context26) {
|
|
40531
40614
|
while (1) switch (_context26.prev = _context26.next) {
|
|
@@ -40597,8 +40680,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40597
40680
|
_context26.next = _context26.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 30 : _context26.t3 === 'OPEN_SELLER_BASKET' ? 33 : _context26.t3 === 'OPEN_PDF' ? 35 : _context26.t3 === 'SAVE_BASKET_WITH_MODAL' ? 35 : _context26.t3 === 'SAVE_BASKET' ? 35 : _context26.t3 === 'SAVE_BASKET_SYNC' ? 35 : _context26.t3 === 'OPEN_LEAFLET_BARRIER' ? 35 : 55;
|
|
40598
40681
|
break;
|
|
40599
40682
|
case 30:
|
|
40600
|
-
(_this$
|
|
40601
|
-
(_this$
|
|
40683
|
+
(_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.toggleLoading('buildScene', false, false);
|
|
40684
|
+
(_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openComponent({
|
|
40602
40685
|
type: 'SELLER',
|
|
40603
40686
|
parameters: {
|
|
40604
40687
|
module: 'PCreator',
|
|
@@ -40610,7 +40693,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40610
40693
|
});
|
|
40611
40694
|
return _context26.abrupt("break", 55);
|
|
40612
40695
|
case 33:
|
|
40613
|
-
(_this$
|
|
40696
|
+
(_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.openComponent({
|
|
40614
40697
|
type: 'SELLER',
|
|
40615
40698
|
parameters: {
|
|
40616
40699
|
module: 'Basket',
|
|
@@ -40724,8 +40807,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40724
40807
|
|
|
40725
40808
|
//if planner is hidden by config but nothing is planned initially
|
|
40726
40809
|
if (plannerType === 'NONE') {
|
|
40727
|
-
var _this$plannerConfig$a7, _this$
|
|
40728
|
-
if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex && !((_this$plannerConfig$a7 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a7 !== void 0 && _this$plannerConfig$a7.length) && !this.plannerConfig.productId && !this.plannerConfig.customProductId && !this.plannerConfig.basketData && !((_this$
|
|
40810
|
+
var _this$plannerConfig$a7, _this$actSet10;
|
|
40811
|
+
if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex && !((_this$plannerConfig$a7 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a7 !== void 0 && _this$plannerConfig$a7.length) && !this.plannerConfig.productId && !this.plannerConfig.customProductId && !this.plannerConfig.basketData && !((_this$actSet10 = this.actSet()) !== null && _this$actSet10 !== void 0 && (_this$actSet10 = _this$actSet10.CatalogData.startPlannerArticle) !== null && _this$actSet10 !== void 0 && _this$actSet10.length)) {
|
|
40729
40812
|
plannerType = 'PLANNER';
|
|
40730
40813
|
}
|
|
40731
40814
|
}
|
|
@@ -40765,38 +40848,38 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40765
40848
|
}, {
|
|
40766
40849
|
key: "getCurCatalogCodex",
|
|
40767
40850
|
value: function getCurCatalogCodex() {
|
|
40768
|
-
var _this$
|
|
40769
|
-
return (_this$
|
|
40851
|
+
var _this$actSet11;
|
|
40852
|
+
return (_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 ? void 0 : _this$actSet11.getCatalogCodex();
|
|
40770
40853
|
}
|
|
40771
40854
|
}, {
|
|
40772
40855
|
key: "getCurCatalogName",
|
|
40773
40856
|
value: function getCurCatalogName() {
|
|
40774
|
-
var _this$
|
|
40775
|
-
return (_this$
|
|
40857
|
+
var _this$actSet12;
|
|
40858
|
+
return (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.getCatalogName();
|
|
40776
40859
|
}
|
|
40777
40860
|
}, {
|
|
40778
40861
|
key: "getCurAccountName",
|
|
40779
40862
|
value: function getCurAccountName() {
|
|
40780
|
-
var _this$
|
|
40781
|
-
return (_this$
|
|
40863
|
+
var _this$actSet13;
|
|
40864
|
+
return (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.getAccountName();
|
|
40782
40865
|
}
|
|
40783
40866
|
}, {
|
|
40784
40867
|
key: "getCurSupplierGuid",
|
|
40785
40868
|
value: function getCurSupplierGuid() {
|
|
40786
|
-
var _this$
|
|
40787
|
-
return (_this$
|
|
40869
|
+
var _this$actSet14;
|
|
40870
|
+
return (_this$actSet14 = this.actSet()) === null || _this$actSet14 === void 0 ? void 0 : _this$actSet14.getSupplierGuid();
|
|
40788
40871
|
}
|
|
40789
40872
|
}, {
|
|
40790
40873
|
key: "getCurSetPrice",
|
|
40791
40874
|
value: function getCurSetPrice() {
|
|
40792
|
-
var _this$actSet$getSetPr, _this$
|
|
40793
|
-
return (_this$actSet$getSetPr = (_this$
|
|
40875
|
+
var _this$actSet$getSetPr, _this$actSet15;
|
|
40876
|
+
return (_this$actSet$getSetPr = (_this$actSet15 = this.actSet()) === null || _this$actSet15 === void 0 ? void 0 : _this$actSet15.getSetPrice()) !== null && _this$actSet$getSetPr !== void 0 ? _this$actSet$getSetPr : 0;
|
|
40794
40877
|
}
|
|
40795
40878
|
}, {
|
|
40796
40879
|
key: "getCurImageMode",
|
|
40797
40880
|
value: function getCurImageMode() {
|
|
40798
|
-
var _this$
|
|
40799
|
-
return (_this$
|
|
40881
|
+
var _this$actSet16;
|
|
40882
|
+
return (_this$actSet16 = this.actSet()) !== null && _this$actSet16 !== void 0 && (_this$actSet16 = _this$actSet16.CatalogData) !== null && _this$actSet16 !== void 0 && _this$actSet16.has3dModels ? '3D' : '2D';
|
|
40800
40883
|
}
|
|
40801
40884
|
}, {
|
|
40802
40885
|
key: "getViewConfig",
|
|
@@ -40827,65 +40910,65 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40827
40910
|
}, {
|
|
40828
40911
|
key: "doShow3DDimensionLines",
|
|
40829
40912
|
value: function doShow3DDimensionLines() {
|
|
40830
|
-
var _this$
|
|
40831
|
-
return (_this$
|
|
40913
|
+
var _this$actSet17;
|
|
40914
|
+
return (_this$actSet17 = this.actSet()) === null || _this$actSet17 === void 0 || (_this$actSet17 = _this$actSet17.CatalogData) === null || _this$actSet17 === void 0 ? void 0 : _this$actSet17.doShow3DDimensionLines;
|
|
40832
40915
|
}
|
|
40833
40916
|
}, {
|
|
40834
40917
|
key: "hidePlannerUiIcons",
|
|
40835
40918
|
value: function hidePlannerUiIcons() {
|
|
40836
|
-
var _this$
|
|
40837
|
-
return (_this$
|
|
40919
|
+
var _this$actSet18;
|
|
40920
|
+
return (_this$actSet18 = this.actSet()) === null || _this$actSet18 === void 0 || (_this$actSet18 = _this$actSet18.CatalogData) === null || _this$actSet18 === void 0 ? void 0 : _this$actSet18.hidePlannerUiIcons;
|
|
40838
40921
|
}
|
|
40839
40922
|
}, {
|
|
40840
40923
|
key: "doShowPlannerReplaceMode",
|
|
40841
40924
|
value: function doShowPlannerReplaceMode() {
|
|
40842
|
-
var _this$
|
|
40843
|
-
var catalogData = (_this$
|
|
40925
|
+
var _this$actSet19, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
|
|
40926
|
+
var catalogData = (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.CatalogData;
|
|
40844
40927
|
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;
|
|
40845
40928
|
}
|
|
40846
40929
|
}, {
|
|
40847
40930
|
key: "doPlannerReplaceAutoSwitch",
|
|
40848
40931
|
value: function doPlannerReplaceAutoSwitch() {
|
|
40849
|
-
var _this$
|
|
40850
|
-
var catalogData = (_this$
|
|
40932
|
+
var _this$actSet20, _this$api$getViewConf3;
|
|
40933
|
+
var catalogData = (_this$actSet20 = this.actSet()) === null || _this$actSet20 === void 0 ? void 0 : _this$actSet20.CatalogData;
|
|
40851
40934
|
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);
|
|
40852
40935
|
}
|
|
40853
40936
|
}, {
|
|
40854
40937
|
key: "getHidePlanner",
|
|
40855
40938
|
value: function getHidePlanner() {
|
|
40856
|
-
var _this$
|
|
40857
|
-
return this.api.getHidePlanner() || !!((_this$
|
|
40939
|
+
var _this$actSet21;
|
|
40940
|
+
return this.api.getHidePlanner() || !!((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.useBoxPlanner);
|
|
40858
40941
|
}
|
|
40859
40942
|
}, {
|
|
40860
40943
|
key: "getAllowRTV",
|
|
40861
40944
|
value: function getAllowRTV() {
|
|
40862
|
-
var _this$
|
|
40945
|
+
var _this$actSet22, _this$actSet23;
|
|
40863
40946
|
if (this.getEnableUnityRtvKombi()) return false;
|
|
40864
40947
|
if (this.api.forceShowRTV()) return true;
|
|
40865
|
-
if ((_this$
|
|
40866
|
-
if (this.api.getDoShowRTV() && (_this$
|
|
40948
|
+
if ((_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaForceRTV) return true;
|
|
40949
|
+
if (this.api.getDoShowRTV() && (_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaArReady) return true;
|
|
40867
40950
|
return false;
|
|
40868
40951
|
}
|
|
40869
40952
|
}, {
|
|
40870
40953
|
key: "geAllowQRCodeAR",
|
|
40871
40954
|
value: function geAllowQRCodeAR() {
|
|
40872
|
-
var _this$
|
|
40873
|
-
if (this.api.getDoShowAR() && (_this$
|
|
40955
|
+
var _this$actSet24;
|
|
40956
|
+
if (this.api.getDoShowAR() && (_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaArReady) return true;
|
|
40874
40957
|
return false;
|
|
40875
40958
|
}
|
|
40876
40959
|
}, {
|
|
40877
40960
|
key: "getEnableUnityRtvKombi",
|
|
40878
40961
|
value: function getEnableUnityRtvKombi() {
|
|
40879
|
-
var _this$
|
|
40962
|
+
var _this$actSet25, _this$actSet26;
|
|
40880
40963
|
// if force rtv disable unity kombi - biohort
|
|
40881
|
-
if ((_this$
|
|
40882
|
-
return ((_this$
|
|
40964
|
+
if ((_this$actSet25 = this.actSet()) !== null && _this$actSet25 !== void 0 && _this$actSet25.CatalogData.divaForceRTV) return false;
|
|
40965
|
+
return ((_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.CatalogData.divaArReady) == true && this.api.getEnableRTVUnityKombi();
|
|
40883
40966
|
}
|
|
40884
40967
|
}, {
|
|
40885
40968
|
key: "getShelfPlannerRTV",
|
|
40886
40969
|
value: function getShelfPlannerRTV() {
|
|
40887
|
-
var _this$
|
|
40888
|
-
return (_this$
|
|
40970
|
+
var _this$actSet27;
|
|
40971
|
+
return (_this$actSet27 = this.actSet()) === null || _this$actSet27 === void 0 ? void 0 : _this$actSet27.CatalogData.useShelfPlannerRTV;
|
|
40889
40972
|
}
|
|
40890
40973
|
}, {
|
|
40891
40974
|
key: "getBasketData",
|
|
@@ -40926,8 +41009,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40926
41009
|
}, {
|
|
40927
41010
|
key: "getCatalogData",
|
|
40928
41011
|
value: function getCatalogData() {
|
|
40929
|
-
var _this$
|
|
40930
|
-
return (_this$
|
|
41012
|
+
var _this$actSet28;
|
|
41013
|
+
return (_this$actSet28 = this.actSet()) === null || _this$actSet28 === void 0 ? void 0 : _this$actSet28.CatalogData;
|
|
40931
41014
|
}
|
|
40932
41015
|
}, {
|
|
40933
41016
|
key: "ReturnTo",
|
|
@@ -40943,16 +41026,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40943
41026
|
key: "addToBasket",
|
|
40944
41027
|
value: function () {
|
|
40945
41028
|
var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee28(actBasket) {
|
|
40946
|
-
var _this$
|
|
40947
|
-
_this$actions35,
|
|
41029
|
+
var _this$actions35,
|
|
40948
41030
|
_this$actions36,
|
|
40949
41031
|
_this$actions37,
|
|
40950
41032
|
_this$actions38,
|
|
41033
|
+
_this$actions39,
|
|
40951
41034
|
_this$divaBasketHandl3,
|
|
40952
41035
|
_this3 = this,
|
|
40953
|
-
_this$actions39,
|
|
40954
41036
|
_this$actions40,
|
|
40955
|
-
_this$actions41
|
|
41037
|
+
_this$actions41,
|
|
41038
|
+
_this$actions42,
|
|
41039
|
+
_this$actions43;
|
|
40956
41040
|
var event,
|
|
40957
41041
|
addToBasketLog,
|
|
40958
41042
|
emailConfig,
|
|
@@ -40968,43 +41052,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40968
41052
|
event = _args28.length > 1 && _args28[1] !== undefined ? _args28[1] : 'onAddToBasket';
|
|
40969
41053
|
addToBasketLog = true;
|
|
40970
41054
|
_context28.t0 = event;
|
|
40971
|
-
_context28.next = _context28.t0 === 'onWebPlanerPrint' ? 5 : _context28.t0 === 'onWebPlanerSave' ? 8 : _context28.t0 === 'onWebPlanerShare' ? 11 : _context28.t0 === 'onRequestConsulation' ? 14 : _context28.t0 === 'onSave' ? 17 : _context28.t0 === 'onSendEmail' ? 20 : _context28.t0 === 'onSaveProduct' ? 25 : _context28.t0 === 'dontSaveBasket' ? 33 : _context28.t0 === 'onAddToBasket' ? 35 :
|
|
41055
|
+
_context28.next = _context28.t0 === 'onWebPlanerPrint' ? 5 : _context28.t0 === 'onWebPlanerSave' ? 8 : _context28.t0 === 'onWebPlanerShare' ? 11 : _context28.t0 === 'onRequestConsulation' ? 14 : _context28.t0 === 'onSave' ? 17 : _context28.t0 === 'onSendEmail' ? 20 : _context28.t0 === 'onSaveProduct' ? 25 : _context28.t0 === 'dontSaveBasket' ? 33 : _context28.t0 === 'onAddToBasket' ? 35 : 38;
|
|
40972
41056
|
break;
|
|
40973
41057
|
case 5:
|
|
40974
41058
|
this.handleSuccessTransaction('onPrintBasket', actBasket);
|
|
40975
|
-
(_this$
|
|
41059
|
+
(_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.onEvent({
|
|
40976
41060
|
type: 'onWebPlanerPrint',
|
|
40977
41061
|
data: actBasket.getAsJson()
|
|
40978
41062
|
});
|
|
40979
|
-
return _context28.abrupt("break",
|
|
41063
|
+
return _context28.abrupt("break", 40);
|
|
40980
41064
|
case 8:
|
|
40981
41065
|
this.handleSuccessTransaction('onSaveBasket', actBasket);
|
|
40982
|
-
(_this$
|
|
41066
|
+
(_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
|
|
40983
41067
|
type: 'onWebPlanerSave',
|
|
40984
41068
|
data: actBasket.getAsJson()
|
|
40985
41069
|
});
|
|
40986
|
-
return _context28.abrupt("break",
|
|
41070
|
+
return _context28.abrupt("break", 40);
|
|
40987
41071
|
case 11:
|
|
40988
41072
|
this.handleSuccessTransaction('onShareBasket', actBasket);
|
|
40989
|
-
(_this$
|
|
41073
|
+
(_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
|
|
40990
41074
|
type: 'onWebPlanerShare',
|
|
40991
41075
|
data: actBasket.getAsJson()
|
|
40992
41076
|
});
|
|
40993
|
-
return _context28.abrupt("break",
|
|
41077
|
+
return _context28.abrupt("break", 40);
|
|
40994
41078
|
case 14:
|
|
40995
41079
|
this.handleSuccessTransaction('onRequestConsulation', actBasket);
|
|
40996
|
-
(_this$
|
|
41080
|
+
(_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
|
|
40997
41081
|
type: 'onRequestConsulation',
|
|
40998
41082
|
data: actBasket.getAsJson()
|
|
40999
41083
|
});
|
|
41000
|
-
return _context28.abrupt("break",
|
|
41084
|
+
return _context28.abrupt("break", 40);
|
|
41001
41085
|
case 17:
|
|
41002
41086
|
this.handleSuccessTransaction('onSave', actBasket);
|
|
41003
|
-
(_this$
|
|
41087
|
+
(_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
|
|
41004
41088
|
type: 'onSave',
|
|
41005
41089
|
data: actBasket.getAsJson()
|
|
41006
41090
|
});
|
|
41007
|
-
return _context28.abrupt("break",
|
|
41091
|
+
return _context28.abrupt("break", 40);
|
|
41008
41092
|
case 20:
|
|
41009
41093
|
emailConfig = (_this$divaBasketHandl3 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl3 !== void 0 ? _this$divaBasketHandl3 : this.getEmailConfig(); //reset the emailConfig
|
|
41010
41094
|
this.divaBasketHandler.emailConfig = undefined;
|
|
@@ -41036,11 +41120,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41036
41120
|
});
|
|
41037
41121
|
this.handleSuccessTransaction('onSendEmail', actBasket);
|
|
41038
41122
|
}
|
|
41039
|
-
(_this$
|
|
41123
|
+
(_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
|
|
41040
41124
|
type: 'onAddToBasket',
|
|
41041
41125
|
data: actBasket.getAsJson()
|
|
41042
41126
|
});
|
|
41043
|
-
return _context28.abrupt("break",
|
|
41127
|
+
return _context28.abrupt("break", 40);
|
|
41044
41128
|
case 25:
|
|
41045
41129
|
this.actSet().CatalogData;
|
|
41046
41130
|
_context28.next = 28;
|
|
@@ -41048,7 +41132,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41048
41132
|
case 28:
|
|
41049
41133
|
products = _context28.sent;
|
|
41050
41134
|
this.handleSuccessTransaction('onSaveProduct', actBasket);
|
|
41051
|
-
(_this$
|
|
41135
|
+
(_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
|
|
41052
41136
|
type: 'onAddToBasket',
|
|
41053
41137
|
data: actBasket.getAsJson()
|
|
41054
41138
|
});
|
|
@@ -41062,14 +41146,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41062
41146
|
addToBasketLog = false;
|
|
41063
41147
|
case 35:
|
|
41064
41148
|
if (addToBasketLog) this.handleSuccessTransaction('onAddToBasket', actBasket);
|
|
41065
|
-
(_this$
|
|
41149
|
+
(_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
|
|
41066
41150
|
type: 'onAddToBasket',
|
|
41067
41151
|
data: actBasket.getAsJson()
|
|
41068
41152
|
});
|
|
41069
|
-
return _context28.abrupt("break",
|
|
41153
|
+
return _context28.abrupt("break", 40);
|
|
41070
41154
|
case 38:
|
|
41155
|
+
(_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
|
|
41156
|
+
type: event,
|
|
41157
|
+
data: actBasket.getAsJson()
|
|
41158
|
+
});
|
|
41159
|
+
return _context28.abrupt("break", 40);
|
|
41160
|
+
case 40:
|
|
41071
41161
|
return _context28.abrupt("return");
|
|
41072
|
-
case
|
|
41162
|
+
case 41:
|
|
41073
41163
|
case "end":
|
|
41074
41164
|
return _context28.stop();
|
|
41075
41165
|
}
|
|
@@ -41094,8 +41184,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41094
41184
|
}, {
|
|
41095
41185
|
key: "openPDFpostAsEvent",
|
|
41096
41186
|
value: function openPDFpostAsEvent(mongoDBId) {
|
|
41097
|
-
var _this$
|
|
41098
|
-
(_this$
|
|
41187
|
+
var _this$actions44, _this$actions45, _this$actions46;
|
|
41188
|
+
(_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.updateBreadcrumbs({
|
|
41099
41189
|
type: 'update',
|
|
41100
41190
|
param: {
|
|
41101
41191
|
groupId: 'SHOWROOM',
|
|
@@ -41109,7 +41199,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41109
41199
|
}
|
|
41110
41200
|
}
|
|
41111
41201
|
});
|
|
41112
|
-
(_this$
|
|
41202
|
+
(_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.updateBreadcrumbs({
|
|
41113
41203
|
type: 'update',
|
|
41114
41204
|
param: {
|
|
41115
41205
|
groupId: 'SHOWROOM',
|
|
@@ -41123,7 +41213,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41123
41213
|
}
|
|
41124
41214
|
}
|
|
41125
41215
|
});
|
|
41126
|
-
(_this$
|
|
41216
|
+
(_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.openComponent({
|
|
41127
41217
|
type: 'REPORT',
|
|
41128
41218
|
parameters: {
|
|
41129
41219
|
id: mongoDBId
|
|
@@ -41343,14 +41433,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41343
41433
|
}, {
|
|
41344
41434
|
key: "subscribeToWebPlannerEvents",
|
|
41345
41435
|
value: function subscribeToWebPlannerEvents() {
|
|
41346
|
-
var _this$
|
|
41347
|
-
(_this$
|
|
41436
|
+
var _this$actions47;
|
|
41437
|
+
(_this$actions47 = this.actions) === null || _this$actions47 === void 0 || _this$actions47.subscribeEvents(this.addToBasketEventFunction);
|
|
41348
41438
|
}
|
|
41349
41439
|
}, {
|
|
41350
41440
|
key: "unsubscribeFromWebPlannerEvents",
|
|
41351
41441
|
value: function unsubscribeFromWebPlannerEvents() {
|
|
41352
|
-
var _this$
|
|
41353
|
-
(_this$
|
|
41442
|
+
var _this$actions48;
|
|
41443
|
+
(_this$actions48 = this.actions) === null || _this$actions48 === void 0 || _this$actions48.unSubscribeEvents(this.addToBasketEventFunction);
|
|
41354
41444
|
}
|
|
41355
41445
|
}, {
|
|
41356
41446
|
key: "initApiForLogicOnly",
|
|
@@ -41418,7 +41508,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41418
41508
|
}, {
|
|
41419
41509
|
key: "initBasket",
|
|
41420
41510
|
value: function () {
|
|
41421
|
-
var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31(init3D, ignoreFavorites) {
|
|
41511
|
+
var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31(init3D, ignoreFavorites, onlyCalcVariants) {
|
|
41422
41512
|
var _initSetState$api$web2;
|
|
41423
41513
|
var initSetState, sets, result, _sets$, set, basket;
|
|
41424
41514
|
return _regeneratorRuntime__default["default"].wrap(function _callee31$(_context31) {
|
|
@@ -41447,28 +41537,28 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41447
41537
|
(_sets$ = sets[0]) === null || _sets$ === void 0 || _sets$.remindPriceForHash(result);
|
|
41448
41538
|
}
|
|
41449
41539
|
case 12:
|
|
41450
|
-
//TODO: GLOBAL STUFF
|
|
41451
41540
|
set = this.actSet();
|
|
41541
|
+
if (set) set.onlyCalcVariants = onlyCalcVariants;
|
|
41452
41542
|
setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
|
|
41453
41543
|
if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
|
|
41454
|
-
_context31.next =
|
|
41544
|
+
_context31.next = 18;
|
|
41455
41545
|
break;
|
|
41456
41546
|
}
|
|
41457
|
-
_context31.next =
|
|
41547
|
+
_context31.next = 18;
|
|
41458
41548
|
return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
|
|
41459
|
-
case
|
|
41460
|
-
_context31.next =
|
|
41549
|
+
case 18:
|
|
41550
|
+
_context31.next = 20;
|
|
41461
41551
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
|
|
41462
|
-
case
|
|
41552
|
+
case 20:
|
|
41463
41553
|
basket = _context31.sent;
|
|
41464
41554
|
return _context31.abrupt("return", basket);
|
|
41465
|
-
case
|
|
41555
|
+
case 22:
|
|
41466
41556
|
case "end":
|
|
41467
41557
|
return _context31.stop();
|
|
41468
41558
|
}
|
|
41469
41559
|
}, _callee31, this);
|
|
41470
41560
|
}));
|
|
41471
|
-
function initBasket(_x78, _x79) {
|
|
41561
|
+
function initBasket(_x78, _x79, _x80) {
|
|
41472
41562
|
return _initBasket.apply(this, arguments);
|
|
41473
41563
|
}
|
|
41474
41564
|
return initBasket;
|
|
@@ -41545,7 +41635,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41545
41635
|
}
|
|
41546
41636
|
}, _callee33, this);
|
|
41547
41637
|
}));
|
|
41548
|
-
function handleFavorites(
|
|
41638
|
+
function handleFavorites(_x81) {
|
|
41549
41639
|
return _handleFavorites.apply(this, arguments);
|
|
41550
41640
|
}
|
|
41551
41641
|
return handleFavorites;
|
|
@@ -41599,7 +41689,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41599
41689
|
}
|
|
41600
41690
|
}, _callee34, this);
|
|
41601
41691
|
}));
|
|
41602
|
-
function initSapOrderLinesFromBasket(
|
|
41692
|
+
function initSapOrderLinesFromBasket(_x82, _x83, _x84) {
|
|
41603
41693
|
return _initSapOrderLinesFromBasket.apply(this, arguments);
|
|
41604
41694
|
}
|
|
41605
41695
|
return initSapOrderLinesFromBasket;
|