@crystaldesign/web-planner-logic 24.13.0-beta.12 → 24.13.0-beta.14
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-62ae8c3d.js} +80 -6
- package/build/cjs/{DivaStandardPlanner-ec161f05.js → DivaStandardPlanner-e431ce7c.js} +14 -3
- package/build/cjs/{DoorPlanner-d649d3e0.js → DoorPlanner-33299e6b.js} +1 -1
- package/build/cjs/{Host3DSignalR-4ff8a82c.js → Host3DSignalR-694281ef.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-8b969a35.js → LiviqueWWSHandler-00e56666.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-67f6f800.js → PfisterWWSHandler-6a249328.js} +1 -1
- package/build/cjs/{PlannerHandler2D-2123a819.js → PlannerHandler2D-d92d10ba.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-cecca329.js → SeriousBasketHandler-05b6c560.js} +1 -1
- package/build/cjs/{ShelfPlanner-1f6c17bd.js → ShelfPlanner-1f0ad013.js} +1 -1
- package/build/cjs/{StandardWWSHandler-84c14168.js → StandardWWSHandler-a69ee926.js} +1 -1
- package/build/cjs/{index-55163fb5.js → index-fc87bc19.js} +280 -163
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-c5f19be3.js → DivaBoxPlanner-ef40824e.js} +80 -6
- package/build/esm/{DivaStandardPlanner-b5403631.js → DivaStandardPlanner-cb2a20dd.js} +14 -3
- package/build/esm/{DoorPlanner-53e38ab9.js → DoorPlanner-530f2474.js} +1 -1
- package/build/esm/{Host3DSignalR-be8b605a.js → Host3DSignalR-8006f253.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-d88c02c3.js → LiviqueWWSHandler-8f2e906e.js} +1 -1
- package/build/esm/{PfisterWWSHandler-5458c5ab.js → PfisterWWSHandler-f7d8d811.js} +1 -1
- package/build/esm/{PlannerHandler2D-61827907.js → PlannerHandler2D-171e3246.js} +1 -1
- package/build/esm/{SeriousBasketHandler-d4db882d.js → SeriousBasketHandler-10891b7b.js} +1 -1
- package/build/esm/{ShelfPlanner-2ea25ecc.js → ShelfPlanner-c6f81e51.js} +1 -1
- package/build/esm/{StandardWWSHandler-5391f27a.js → StandardWWSHandler-e270d54d.js} +1 -1
- package/build/esm/{index-d51f7edd.js → index-afab35d7.js} +280 -163
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +3 -0
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +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/interface/Planner/IDivaPlanner.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/Planner/IDivaPlanner.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/Planner/BoxPlanner/BoxPlannerGrid.d.ts +13 -0
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/BoxPlannerGrid.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts +5 -0
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts +7 -0
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts +6 -0
- package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts +6 -0
- package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.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-1f0ad013.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-33299e6b.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();
|
|
@@ -31716,8 +31778,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31716
31778
|
key: "deleteElementFromSet",
|
|
31717
31779
|
value: function () {
|
|
31718
31780
|
var _deleteElementFromSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(set, article, autoCorrectAVL_AVR, deletionType, dontReload) {
|
|
31719
|
-
var _deletedArticle$doorP, _set$CatalogData;
|
|
31720
|
-
var setId, deletedArticle, articles, key, newSelectedElement, oldTransform, result, _set$getArticleByBask3, elementDeleted;
|
|
31781
|
+
var setId, allElementsToDelete, success, newSelectedElement, i, _deletedArticle$doorP, _set$CatalogData, deletedArticle, articles, key, oldTransform, result, _set$getArticleByBask3;
|
|
31721
31782
|
return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context16) {
|
|
31722
31783
|
while (1) switch (_context16.prev = _context16.next) {
|
|
31723
31784
|
case 0:
|
|
@@ -31732,35 +31793,44 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31732
31793
|
setId: setId
|
|
31733
31794
|
});
|
|
31734
31795
|
case 3:
|
|
31796
|
+
allElementsToDelete = set.plannerHandler.getPlannerElementsInfluencedByDeletion(setId, article.elementId);
|
|
31797
|
+
success = false;
|
|
31798
|
+
newSelectedElement = undefined;
|
|
31799
|
+
i = 0;
|
|
31800
|
+
case 7:
|
|
31801
|
+
if (!(i < allElementsToDelete.length)) {
|
|
31802
|
+
_context16.next = 35;
|
|
31803
|
+
break;
|
|
31804
|
+
}
|
|
31805
|
+
article = set.getArticleByElementId(allElementsToDelete[i]);
|
|
31735
31806
|
deletedArticle = article; //accessoires löschen
|
|
31736
31807
|
articles = set.getAccessoiresOfBasketId(article.basketId);
|
|
31737
31808
|
_context16.t0 = _regeneratorRuntime__default["default"].keys(articles);
|
|
31738
|
-
case
|
|
31809
|
+
case 12:
|
|
31739
31810
|
if ((_context16.t1 = _context16.t0()).done) {
|
|
31740
|
-
_context16.next =
|
|
31811
|
+
_context16.next = 18;
|
|
31741
31812
|
break;
|
|
31742
31813
|
}
|
|
31743
31814
|
key = _context16.t1.value;
|
|
31744
|
-
_context16.next =
|
|
31815
|
+
_context16.next = 16;
|
|
31745
31816
|
return this.deleteElementFromSet(set, articles[key]);
|
|
31746
|
-
case
|
|
31747
|
-
_context16.next =
|
|
31817
|
+
case 16:
|
|
31818
|
+
_context16.next = 12;
|
|
31748
31819
|
break;
|
|
31749
|
-
case
|
|
31750
|
-
newSelectedElement = undefined;
|
|
31820
|
+
case 18:
|
|
31751
31821
|
oldTransform = undefined;
|
|
31752
31822
|
if (deletedArticle) deletedArticle.deleted = true;
|
|
31753
31823
|
if (!(deletedArticle !== null && deletedArticle !== void 0 && deletedArticle.hasCatalogPlannerArticle)) {
|
|
31754
|
-
_context16.next =
|
|
31824
|
+
_context16.next = 26;
|
|
31755
31825
|
break;
|
|
31756
31826
|
}
|
|
31757
|
-
_context16.next =
|
|
31827
|
+
_context16.next = 23;
|
|
31758
31828
|
return set.plannerHandler.deletePlannerElement(setId, deletedArticle.elementId, autoCorrectAVL_AVR, deletionType);
|
|
31759
|
-
case
|
|
31829
|
+
case 23:
|
|
31760
31830
|
result = _context16.sent;
|
|
31761
31831
|
newSelectedElement = result.newElementToSelect;
|
|
31762
31832
|
oldTransform = result.transform;
|
|
31763
|
-
case
|
|
31833
|
+
case 26:
|
|
31764
31834
|
//falls ein Accessoire gelöscht wurde wird das Accessoire auch wo es beim Parent hinterlegt war auch gelöscht
|
|
31765
31835
|
if (deletedArticle !== null && deletedArticle !== void 0 && deletedArticle.relatedToBasketId) {
|
|
31766
31836
|
(_set$getArticleByBask3 = set.getArticleByBasketId(deletedArticle.relatedToBasketId)) === null || _set$getArticleByBask3 === void 0 || _set$getArticleByBask3.removeAccessoire(deletedArticle.basketId);
|
|
@@ -31768,21 +31838,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31768
31838
|
|
|
31769
31839
|
//doorplanner resetted
|
|
31770
31840
|
deletedArticle === null || deletedArticle === void 0 || (_deletedArticle$doorP = deletedArticle.doorPlanner) === null || _deletedArticle$doorP === void 0 || _deletedArticle$doorP.deleteElement(deletedArticle.basketId);
|
|
31771
|
-
|
|
31841
|
+
success = set.deleteArticle(article.basketId);
|
|
31772
31842
|
if (!((set.CatalogData.bundleRules || set.CatalogData.reconfigAfterArticleDocked || set !== null && set !== void 0 && (_set$CatalogData = set.CatalogData) !== null && _set$CatalogData !== void 0 && _set$CatalogData.getOption('OPTLASTSTACKEDARTICLE')) && !dontReload)) {
|
|
31773
|
-
_context16.next =
|
|
31843
|
+
_context16.next = 32;
|
|
31774
31844
|
break;
|
|
31775
31845
|
}
|
|
31776
|
-
_context16.next =
|
|
31846
|
+
_context16.next = 32;
|
|
31777
31847
|
return this.updateArticlesOptionStatesOfActSet(set, {}, []);
|
|
31778
|
-
case
|
|
31848
|
+
case 32:
|
|
31849
|
+
i++;
|
|
31850
|
+
_context16.next = 7;
|
|
31851
|
+
break;
|
|
31852
|
+
case 35:
|
|
31779
31853
|
return _context16.abrupt("return", {
|
|
31780
|
-
success:
|
|
31854
|
+
success: success,
|
|
31781
31855
|
selectElementId: newSelectedElement,
|
|
31782
31856
|
setId: setId,
|
|
31783
31857
|
oldTransform: oldTransform
|
|
31784
31858
|
});
|
|
31785
|
-
case
|
|
31859
|
+
case 36:
|
|
31786
31860
|
case "end":
|
|
31787
31861
|
return _context16.stop();
|
|
31788
31862
|
}
|
|
@@ -32565,7 +32639,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32565
32639
|
value: (function () {
|
|
32566
32640
|
var _variantsEvaluator = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee23(set, configItems, configStepKey, paletteType) {
|
|
32567
32641
|
var _set$ViewConfig, _configItems$;
|
|
32568
|
-
var opt, calcVariantsForPricePreview, previewType, _set$CatalogData$show, targetArticles, startTime, variants, endTime;
|
|
32642
|
+
var opt, calcVariantsForPricePreview, previewType, _set$api$ReturnToFrom, _set$CatalogData$show, targetArticles, startTime, variants, endTime;
|
|
32569
32643
|
return _regeneratorRuntime__default["default"].wrap(function _callee23$(_context25) {
|
|
32570
32644
|
while (1) switch (_context25.prev = _context25.next) {
|
|
32571
32645
|
case 0:
|
|
@@ -32579,7 +32653,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32579
32653
|
calcVariantsForPricePreview = false;
|
|
32580
32654
|
previewType = (_set$ViewConfig = set.ViewConfig) === null || _set$ViewConfig === void 0 ? void 0 : _set$ViewConfig.pricePreview;
|
|
32581
32655
|
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));
|
|
32656
|
+
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
32657
|
}
|
|
32584
32658
|
if (set.PlannerMode === 'BoxPlanner') calcVariantsForPricePreview = false;
|
|
32585
32659
|
if (paletteType == 'GAL' && ((_configItems$ = configItems[0]) === null || _configItems$ === void 0 ? void 0 : _configItems$.groupName) === undefined || paletteType == 'TEXTBOX' || paletteType == 'NUMBERBOX' || paletteType == 'RANGE') {
|
|
@@ -34069,7 +34143,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34069
34143
|
key: "initProductId",
|
|
34070
34144
|
value: function () {
|
|
34071
34145
|
var _initProductId = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(api, productId) {
|
|
34072
|
-
var result;
|
|
34146
|
+
var result, successful;
|
|
34073
34147
|
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
34074
34148
|
while (1) switch (_context2.prev = _context2.next) {
|
|
34075
34149
|
case 0:
|
|
@@ -34081,10 +34155,17 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34081
34155
|
_context2.next = 6;
|
|
34082
34156
|
return this.initBasket(api, result.divaNr, {
|
|
34083
34157
|
basket: result.configuration
|
|
34084
|
-
}, false);
|
|
34158
|
+
}, false, productId);
|
|
34085
34159
|
case 6:
|
|
34086
|
-
|
|
34087
|
-
|
|
34160
|
+
successful = _context2.sent;
|
|
34161
|
+
if (!successful) {
|
|
34162
|
+
_context2.next = 9;
|
|
34163
|
+
break;
|
|
34164
|
+
}
|
|
34165
|
+
return _context2.abrupt("return", result);
|
|
34166
|
+
case 9:
|
|
34167
|
+
return _context2.abrupt("return", false);
|
|
34168
|
+
case 10:
|
|
34088
34169
|
case "end":
|
|
34089
34170
|
return _context2.stop();
|
|
34090
34171
|
}
|
|
@@ -34431,7 +34512,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34431
34512
|
case 0:
|
|
34432
34513
|
_context8.prev = 0;
|
|
34433
34514
|
_context8.next = 3;
|
|
34434
|
-
return api.getDataCache(api.
|
|
34515
|
+
return api.getDataCache(api.getProductByKeyValueUrl(key, productId), undefined, undefined, 'catalog', 'POST', {
|
|
34435
34516
|
fields: fields !== null && fields !== void 0 && fields.length ? fields : undefined
|
|
34436
34517
|
});
|
|
34437
34518
|
case 3:
|
|
@@ -34764,7 +34845,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34764
34845
|
break;
|
|
34765
34846
|
case 3:
|
|
34766
34847
|
_context12.next = 5;
|
|
34767
|
-
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-
|
|
34848
|
+
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-6a249328.js'); });
|
|
34768
34849
|
case 5:
|
|
34769
34850
|
_yield$import = _context12.sent;
|
|
34770
34851
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -34772,7 +34853,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34772
34853
|
return _context12.abrupt("break", 27);
|
|
34773
34854
|
case 9:
|
|
34774
34855
|
_context12.next = 11;
|
|
34775
|
-
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-
|
|
34856
|
+
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-00e56666.js'); });
|
|
34776
34857
|
case 11:
|
|
34777
34858
|
_yield$import2 = _context12.sent;
|
|
34778
34859
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -34780,7 +34861,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34780
34861
|
return _context12.abrupt("break", 27);
|
|
34781
34862
|
case 15:
|
|
34782
34863
|
_context12.next = 17;
|
|
34783
|
-
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-
|
|
34864
|
+
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-05b6c560.js'); });
|
|
34784
34865
|
case 17:
|
|
34785
34866
|
_yield$import3 = _context12.sent;
|
|
34786
34867
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -34788,7 +34869,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34788
34869
|
return _context12.abrupt("break", 27);
|
|
34789
34870
|
case 21:
|
|
34790
34871
|
_context12.next = 23;
|
|
34791
|
-
return Promise.resolve().then(function () { return require('./StandardWWSHandler-
|
|
34872
|
+
return Promise.resolve().then(function () { return require('./StandardWWSHandler-a69ee926.js'); });
|
|
34792
34873
|
case 23:
|
|
34793
34874
|
_yield$import4 = _context12.sent;
|
|
34794
34875
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -36178,7 +36259,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36178
36259
|
while (1) switch (_context3.prev = _context3.next) {
|
|
36179
36260
|
case 0:
|
|
36180
36261
|
_context3.next = 2;
|
|
36181
|
-
return Promise.resolve().then(function () { return require('./Host3DSignalR-
|
|
36262
|
+
return Promise.resolve().then(function () { return require('./Host3DSignalR-694281ef.js'); });
|
|
36182
36263
|
case 2:
|
|
36183
36264
|
_yield$import = _context3.sent;
|
|
36184
36265
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -37533,7 +37614,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
37533
37614
|
this.plannerHandlerFunctions = plannerHandlerFunctions;
|
|
37534
37615
|
diva3dServerUrl = initSetState.api.get3DServerUrl();
|
|
37535
37616
|
divaMediaServiceUrl = initSetState.api.getDivaMediaServiceUrl();
|
|
37536
|
-
mediaServiceApiKey = initSetState.api.getDivaMediaServiceApiKey(); //renderGroup = 'LeaTest';
|
|
37617
|
+
mediaServiceApiKey = initSetState.api.getDivaMediaServiceApiKey(); // renderGroup = 'LeaTest';
|
|
37537
37618
|
//diva3dServerUrl = "https://test-einkauf-onboarding.pfister.ch/diva3d/diva3dhost2/";
|
|
37538
37619
|
// diva3dServerUrl = "https://diva3dhost.diva-portal.com/diva3d/diva3dhost2/";
|
|
37539
37620
|
//diva3dServerUrl = 'https://localhost:44315/';
|
|
@@ -37730,7 +37811,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
37730
37811
|
break;
|
|
37731
37812
|
case 8:
|
|
37732
37813
|
_context4.next = 10;
|
|
37733
|
-
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-
|
|
37814
|
+
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-e431ce7c.js'); });
|
|
37734
37815
|
case 10:
|
|
37735
37816
|
_yield$import = _context4.sent;
|
|
37736
37817
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -37741,7 +37822,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
37741
37822
|
return _context4.abrupt("break", 21);
|
|
37742
37823
|
case 15:
|
|
37743
37824
|
_context4.next = 17;
|
|
37744
|
-
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-
|
|
37825
|
+
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-62ae8c3d.js'); });
|
|
37745
37826
|
case 17:
|
|
37746
37827
|
_yield$import2 = _context4.sent;
|
|
37747
37828
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -38357,6 +38438,20 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38357
38438
|
return this.plannerList.get(setId).getPlannerElementsInfluencedByCopy(elementId, copyInfo);
|
|
38358
38439
|
}
|
|
38359
38440
|
|
|
38441
|
+
/**
|
|
38442
|
+
* This function gets all Elements that are deleted when deleting one element.
|
|
38443
|
+
* @param setId
|
|
38444
|
+
* @param elementId
|
|
38445
|
+
*/
|
|
38446
|
+
}, {
|
|
38447
|
+
key: "getPlannerElementsInfluencedByDeletion",
|
|
38448
|
+
value: function getPlannerElementsInfluencedByDeletion(setId, elementId) {
|
|
38449
|
+
if (!this.plannerList.has(setId)) {
|
|
38450
|
+
return [];
|
|
38451
|
+
}
|
|
38452
|
+
return this.plannerList.get(setId).getPlannerElementsInfluencedByDeletion(elementId);
|
|
38453
|
+
}
|
|
38454
|
+
|
|
38360
38455
|
/**
|
|
38361
38456
|
* This function is used to copy an element in the planner
|
|
38362
38457
|
* @param setId
|
|
@@ -40418,76 +40513,90 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40418
40513
|
key: "saveToBasketWrapper",
|
|
40419
40514
|
value: function () {
|
|
40420
40515
|
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,
|
|
40516
|
+
var _this$actions26,
|
|
40424
40517
|
_this$actions26$toggl,
|
|
40518
|
+
_this$actions27,
|
|
40519
|
+
_this$actions27$toggl,
|
|
40425
40520
|
_this2 = this,
|
|
40426
|
-
_this$
|
|
40521
|
+
_this$actions31,
|
|
40427
40522
|
_this$i18n14;
|
|
40428
|
-
var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product, result, _this$
|
|
40523
|
+
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
40524
|
return _regeneratorRuntime__default["default"].wrap(function _callee25$(_context25) {
|
|
40430
40525
|
while (1) switch (_context25.prev = _context25.next) {
|
|
40431
40526
|
case 0:
|
|
40432
40527
|
returnTo = this.getReturnTo(event);
|
|
40433
|
-
finalEvent =
|
|
40528
|
+
finalEvent = {
|
|
40529
|
+
event: event,
|
|
40530
|
+
saveBasket: true
|
|
40531
|
+
};
|
|
40434
40532
|
if (!(returnTo == 'OPEN_LEAFLET_BARRIER')) {
|
|
40435
|
-
_context25.next =
|
|
40533
|
+
_context25.next = 21;
|
|
40436
40534
|
break;
|
|
40437
40535
|
}
|
|
40438
40536
|
product = undefined;
|
|
40439
40537
|
if (!((_this$api$getBarrierC = this.api.getBarrierConfig()) !== null && _this$api$getBarrierC !== void 0 && _this$api$getBarrierC.affiliate)) {
|
|
40440
|
-
_context25.next =
|
|
40538
|
+
_context25.next = 10;
|
|
40441
40539
|
break;
|
|
40442
40540
|
}
|
|
40443
|
-
|
|
40444
|
-
|
|
40445
|
-
|
|
40446
|
-
_context25.sent;
|
|
40541
|
+
url = this.api.getCatalogProductUrl(this.actSet().getCatalogCodex());
|
|
40542
|
+
_context25.next = 8;
|
|
40543
|
+
return this.api.getDataCache(url, url, undefined, 'catalog');
|
|
40447
40544
|
case 8:
|
|
40448
|
-
|
|
40449
|
-
|
|
40545
|
+
_result = _context25.sent;
|
|
40546
|
+
product = productHandlerInstance.getBestMatch((_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.getDivaArticles(), _result);
|
|
40450
40547
|
case 10:
|
|
40548
|
+
_context25.next = 12;
|
|
40549
|
+
return (_this$openLeafeltBarr = this.openLeafeltBarrier) === null || _this$openLeafeltBarr === void 0 ? void 0 : _this$openLeafeltBarr.call(this, this.divaBasketHandler, this.api.getBarrierConfig(), product);
|
|
40550
|
+
case 12:
|
|
40451
40551
|
finalEvent = _context25.sent;
|
|
40452
40552
|
if (finalEvent) {
|
|
40453
|
-
_context25.next =
|
|
40553
|
+
_context25.next = 17;
|
|
40454
40554
|
break;
|
|
40455
40555
|
}
|
|
40456
40556
|
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
40557
|
case 17:
|
|
40558
|
+
if (!(!finalEvent.saveBasket && finalEvent.event)) {
|
|
40559
|
+
_context25.next = 20;
|
|
40560
|
+
break;
|
|
40561
|
+
}
|
|
40562
|
+
(_this$actions25 = this.actions) === null || _this$actions25 === void 0 || _this$actions25.onEvent({
|
|
40563
|
+
type: finalEvent.event
|
|
40564
|
+
});
|
|
40565
|
+
return _context25.abrupt("return", 'canceled');
|
|
40566
|
+
case 20:
|
|
40567
|
+
returnTo = finalEvent.event == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
|
|
40568
|
+
case 21:
|
|
40569
|
+
(_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);
|
|
40570
|
+
_context25.next = 24;
|
|
40571
|
+
return this.saveToBasket(finalEvent.event, repairOnly, force);
|
|
40572
|
+
case 24:
|
|
40464
40573
|
result = _context25.sent;
|
|
40465
|
-
(_this$
|
|
40574
|
+
(_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
40575
|
if (!(result === 'canceled')) {
|
|
40467
|
-
_context25.next =
|
|
40576
|
+
_context25.next = 30;
|
|
40468
40577
|
break;
|
|
40469
40578
|
}
|
|
40470
40579
|
LOG$1.error(new DivaUtils.DivaError('failed to save Basket'));
|
|
40471
|
-
(_this$
|
|
40580
|
+
(_this$actions28 = this.actions) === null || _this$actions28 === void 0 || _this$actions28.openModal({
|
|
40472
40581
|
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
40582
|
accept: true
|
|
40474
40583
|
});
|
|
40475
40584
|
return _context25.abrupt("return", result);
|
|
40476
|
-
case
|
|
40585
|
+
case 30:
|
|
40477
40586
|
_context25.t0 = returnTo;
|
|
40478
|
-
_context25.next = _context25.t0 === 'OPEN_PDF' ?
|
|
40587
|
+
_context25.next = _context25.t0 === 'OPEN_PDF' ? 33 : _context25.t0 === 'SAVE_BASKET_WITH_MODAL' ? 35 : 36;
|
|
40479
40588
|
break;
|
|
40480
|
-
case
|
|
40589
|
+
case 33:
|
|
40481
40590
|
if (!this.getBasket().PDFDocumentURL) {
|
|
40482
40591
|
LOG$1.error(new DivaUtils.DivaError('PDF url is missing in basket', {
|
|
40483
40592
|
code: 'WC_0010'
|
|
40484
40593
|
}));
|
|
40485
|
-
(_this$
|
|
40594
|
+
(_this$actions29 = this.actions) === null || _this$actions29 === void 0 || _this$actions29.openModal({
|
|
40486
40595
|
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
40596
|
accept: true
|
|
40488
40597
|
});
|
|
40489
40598
|
} else {
|
|
40490
|
-
(_this$
|
|
40599
|
+
(_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.openModal({
|
|
40491
40600
|
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
40601
|
accept: (_this$i18n13 = this.i18n()) === null || _this$i18n13 === void 0 ? void 0 : _this$i18n13.t('modals.open_now'),
|
|
40493
40602
|
callback: function callback() {
|
|
@@ -40495,22 +40604,22 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40495
40604
|
}
|
|
40496
40605
|
});
|
|
40497
40606
|
}
|
|
40498
|
-
return _context25.abrupt("break",
|
|
40499
|
-
case
|
|
40500
|
-
(_this$
|
|
40607
|
+
return _context25.abrupt("break", 36);
|
|
40608
|
+
case 35:
|
|
40609
|
+
(_this$actions31 = this.actions) === null || _this$actions31 === void 0 || _this$actions31.openModal({
|
|
40501
40610
|
text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
|
|
40502
40611
|
accept: true
|
|
40503
40612
|
});
|
|
40504
|
-
case
|
|
40613
|
+
case 36:
|
|
40505
40614
|
if (!(result == 'noArticleToSave')) {
|
|
40506
|
-
_context25.next =
|
|
40615
|
+
_context25.next = 39;
|
|
40507
40616
|
break;
|
|
40508
40617
|
}
|
|
40509
40618
|
(_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
|
|
40510
40619
|
return _context25.abrupt("return", 'canceled');
|
|
40511
|
-
case
|
|
40620
|
+
case 39:
|
|
40512
40621
|
return _context25.abrupt("return", result);
|
|
40513
|
-
case
|
|
40622
|
+
case 40:
|
|
40514
40623
|
case "end":
|
|
40515
40624
|
return _context25.stop();
|
|
40516
40625
|
}
|
|
@@ -40525,7 +40634,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40525
40634
|
key: "saveToBasket",
|
|
40526
40635
|
value: function () {
|
|
40527
40636
|
var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee26(event, repairOnly, force) {
|
|
40528
|
-
var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$
|
|
40637
|
+
var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$actions32, _this$actions33, _this$actions34;
|
|
40529
40638
|
var set, actBasket, returnTo, oldReturnTo, result, newDivaNr, _result2, _event4, product;
|
|
40530
40639
|
return _regeneratorRuntime__default["default"].wrap(function _callee26$(_context26) {
|
|
40531
40640
|
while (1) switch (_context26.prev = _context26.next) {
|
|
@@ -40597,8 +40706,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40597
40706
|
_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
40707
|
break;
|
|
40599
40708
|
case 30:
|
|
40600
|
-
(_this$
|
|
40601
|
-
(_this$
|
|
40709
|
+
(_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.toggleLoading('buildScene', false, false);
|
|
40710
|
+
(_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openComponent({
|
|
40602
40711
|
type: 'SELLER',
|
|
40603
40712
|
parameters: {
|
|
40604
40713
|
module: 'PCreator',
|
|
@@ -40610,7 +40719,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40610
40719
|
});
|
|
40611
40720
|
return _context26.abrupt("break", 55);
|
|
40612
40721
|
case 33:
|
|
40613
|
-
(_this$
|
|
40722
|
+
(_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.openComponent({
|
|
40614
40723
|
type: 'SELLER',
|
|
40615
40724
|
parameters: {
|
|
40616
40725
|
module: 'Basket',
|
|
@@ -40664,12 +40773,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40664
40773
|
return _context26.abrupt("break", 55);
|
|
40665
40774
|
case 55:
|
|
40666
40775
|
if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
|
|
40667
|
-
|
|
40776
|
+
actBasket = this.divaBasketHandler.getBasketData(actBasket.DivaNr); //get pdf documenturl from saved basket
|
|
40777
|
+
_context26.next = 59;
|
|
40668
40778
|
return this.addToBasket(actBasket, event);
|
|
40669
|
-
case
|
|
40779
|
+
case 59:
|
|
40670
40780
|
product = _context26.sent;
|
|
40671
40781
|
return _context26.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
|
|
40672
|
-
case
|
|
40782
|
+
case 61:
|
|
40673
40783
|
case "end":
|
|
40674
40784
|
return _context26.stop();
|
|
40675
40785
|
}
|
|
@@ -40724,8 +40834,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40724
40834
|
|
|
40725
40835
|
//if planner is hidden by config but nothing is planned initially
|
|
40726
40836
|
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$
|
|
40837
|
+
var _this$plannerConfig$a7, _this$actSet10;
|
|
40838
|
+
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
40839
|
plannerType = 'PLANNER';
|
|
40730
40840
|
}
|
|
40731
40841
|
}
|
|
@@ -40765,38 +40875,38 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40765
40875
|
}, {
|
|
40766
40876
|
key: "getCurCatalogCodex",
|
|
40767
40877
|
value: function getCurCatalogCodex() {
|
|
40768
|
-
var _this$
|
|
40769
|
-
return (_this$
|
|
40878
|
+
var _this$actSet11;
|
|
40879
|
+
return (_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 ? void 0 : _this$actSet11.getCatalogCodex();
|
|
40770
40880
|
}
|
|
40771
40881
|
}, {
|
|
40772
40882
|
key: "getCurCatalogName",
|
|
40773
40883
|
value: function getCurCatalogName() {
|
|
40774
|
-
var _this$
|
|
40775
|
-
return (_this$
|
|
40884
|
+
var _this$actSet12;
|
|
40885
|
+
return (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.getCatalogName();
|
|
40776
40886
|
}
|
|
40777
40887
|
}, {
|
|
40778
40888
|
key: "getCurAccountName",
|
|
40779
40889
|
value: function getCurAccountName() {
|
|
40780
|
-
var _this$
|
|
40781
|
-
return (_this$
|
|
40890
|
+
var _this$actSet13;
|
|
40891
|
+
return (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.getAccountName();
|
|
40782
40892
|
}
|
|
40783
40893
|
}, {
|
|
40784
40894
|
key: "getCurSupplierGuid",
|
|
40785
40895
|
value: function getCurSupplierGuid() {
|
|
40786
|
-
var _this$
|
|
40787
|
-
return (_this$
|
|
40896
|
+
var _this$actSet14;
|
|
40897
|
+
return (_this$actSet14 = this.actSet()) === null || _this$actSet14 === void 0 ? void 0 : _this$actSet14.getSupplierGuid();
|
|
40788
40898
|
}
|
|
40789
40899
|
}, {
|
|
40790
40900
|
key: "getCurSetPrice",
|
|
40791
40901
|
value: function getCurSetPrice() {
|
|
40792
|
-
var _this$actSet$getSetPr, _this$
|
|
40793
|
-
return (_this$actSet$getSetPr = (_this$
|
|
40902
|
+
var _this$actSet$getSetPr, _this$actSet15;
|
|
40903
|
+
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
40904
|
}
|
|
40795
40905
|
}, {
|
|
40796
40906
|
key: "getCurImageMode",
|
|
40797
40907
|
value: function getCurImageMode() {
|
|
40798
|
-
var _this$
|
|
40799
|
-
return (_this$
|
|
40908
|
+
var _this$actSet16;
|
|
40909
|
+
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
40910
|
}
|
|
40801
40911
|
}, {
|
|
40802
40912
|
key: "getViewConfig",
|
|
@@ -40827,65 +40937,65 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40827
40937
|
}, {
|
|
40828
40938
|
key: "doShow3DDimensionLines",
|
|
40829
40939
|
value: function doShow3DDimensionLines() {
|
|
40830
|
-
var _this$
|
|
40831
|
-
return (_this$
|
|
40940
|
+
var _this$actSet17;
|
|
40941
|
+
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
40942
|
}
|
|
40833
40943
|
}, {
|
|
40834
40944
|
key: "hidePlannerUiIcons",
|
|
40835
40945
|
value: function hidePlannerUiIcons() {
|
|
40836
|
-
var _this$
|
|
40837
|
-
return (_this$
|
|
40946
|
+
var _this$actSet18;
|
|
40947
|
+
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
40948
|
}
|
|
40839
40949
|
}, {
|
|
40840
40950
|
key: "doShowPlannerReplaceMode",
|
|
40841
40951
|
value: function doShowPlannerReplaceMode() {
|
|
40842
|
-
var _this$
|
|
40843
|
-
var catalogData = (_this$
|
|
40952
|
+
var _this$actSet19, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
|
|
40953
|
+
var catalogData = (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.CatalogData;
|
|
40844
40954
|
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
40955
|
}
|
|
40846
40956
|
}, {
|
|
40847
40957
|
key: "doPlannerReplaceAutoSwitch",
|
|
40848
40958
|
value: function doPlannerReplaceAutoSwitch() {
|
|
40849
|
-
var _this$
|
|
40850
|
-
var catalogData = (_this$
|
|
40959
|
+
var _this$actSet20, _this$api$getViewConf3;
|
|
40960
|
+
var catalogData = (_this$actSet20 = this.actSet()) === null || _this$actSet20 === void 0 ? void 0 : _this$actSet20.CatalogData;
|
|
40851
40961
|
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
40962
|
}
|
|
40853
40963
|
}, {
|
|
40854
40964
|
key: "getHidePlanner",
|
|
40855
40965
|
value: function getHidePlanner() {
|
|
40856
|
-
var _this$
|
|
40857
|
-
return this.api.getHidePlanner() || !!((_this$
|
|
40966
|
+
var _this$actSet21;
|
|
40967
|
+
return this.api.getHidePlanner() || !!((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.useBoxPlanner);
|
|
40858
40968
|
}
|
|
40859
40969
|
}, {
|
|
40860
40970
|
key: "getAllowRTV",
|
|
40861
40971
|
value: function getAllowRTV() {
|
|
40862
|
-
var _this$
|
|
40972
|
+
var _this$actSet22, _this$actSet23;
|
|
40863
40973
|
if (this.getEnableUnityRtvKombi()) return false;
|
|
40864
40974
|
if (this.api.forceShowRTV()) return true;
|
|
40865
|
-
if ((_this$
|
|
40866
|
-
if (this.api.getDoShowRTV() && (_this$
|
|
40975
|
+
if ((_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaForceRTV) return true;
|
|
40976
|
+
if (this.api.getDoShowRTV() && (_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaArReady) return true;
|
|
40867
40977
|
return false;
|
|
40868
40978
|
}
|
|
40869
40979
|
}, {
|
|
40870
40980
|
key: "geAllowQRCodeAR",
|
|
40871
40981
|
value: function geAllowQRCodeAR() {
|
|
40872
|
-
var _this$
|
|
40873
|
-
if (this.api.getDoShowAR() && (_this$
|
|
40982
|
+
var _this$actSet24;
|
|
40983
|
+
if (this.api.getDoShowAR() && (_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaArReady) return true;
|
|
40874
40984
|
return false;
|
|
40875
40985
|
}
|
|
40876
40986
|
}, {
|
|
40877
40987
|
key: "getEnableUnityRtvKombi",
|
|
40878
40988
|
value: function getEnableUnityRtvKombi() {
|
|
40879
|
-
var _this$
|
|
40989
|
+
var _this$actSet25, _this$actSet26;
|
|
40880
40990
|
// if force rtv disable unity kombi - biohort
|
|
40881
|
-
if ((_this$
|
|
40882
|
-
return ((_this$
|
|
40991
|
+
if ((_this$actSet25 = this.actSet()) !== null && _this$actSet25 !== void 0 && _this$actSet25.CatalogData.divaForceRTV) return false;
|
|
40992
|
+
return ((_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.CatalogData.divaArReady) == true && this.api.getEnableRTVUnityKombi();
|
|
40883
40993
|
}
|
|
40884
40994
|
}, {
|
|
40885
40995
|
key: "getShelfPlannerRTV",
|
|
40886
40996
|
value: function getShelfPlannerRTV() {
|
|
40887
|
-
var _this$
|
|
40888
|
-
return (_this$
|
|
40997
|
+
var _this$actSet27;
|
|
40998
|
+
return (_this$actSet27 = this.actSet()) === null || _this$actSet27 === void 0 ? void 0 : _this$actSet27.CatalogData.useShelfPlannerRTV;
|
|
40889
40999
|
}
|
|
40890
41000
|
}, {
|
|
40891
41001
|
key: "getBasketData",
|
|
@@ -40926,8 +41036,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40926
41036
|
}, {
|
|
40927
41037
|
key: "getCatalogData",
|
|
40928
41038
|
value: function getCatalogData() {
|
|
40929
|
-
var _this$
|
|
40930
|
-
return (_this$
|
|
41039
|
+
var _this$actSet28;
|
|
41040
|
+
return (_this$actSet28 = this.actSet()) === null || _this$actSet28 === void 0 ? void 0 : _this$actSet28.CatalogData;
|
|
40931
41041
|
}
|
|
40932
41042
|
}, {
|
|
40933
41043
|
key: "ReturnTo",
|
|
@@ -40943,16 +41053,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40943
41053
|
key: "addToBasket",
|
|
40944
41054
|
value: function () {
|
|
40945
41055
|
var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee28(actBasket) {
|
|
40946
|
-
var _this$
|
|
40947
|
-
_this$actions35,
|
|
41056
|
+
var _this$actions35,
|
|
40948
41057
|
_this$actions36,
|
|
40949
41058
|
_this$actions37,
|
|
40950
41059
|
_this$actions38,
|
|
41060
|
+
_this$actions39,
|
|
40951
41061
|
_this$divaBasketHandl3,
|
|
40952
41062
|
_this3 = this,
|
|
40953
|
-
_this$actions39,
|
|
40954
41063
|
_this$actions40,
|
|
40955
|
-
_this$actions41
|
|
41064
|
+
_this$actions41,
|
|
41065
|
+
_this$actions42,
|
|
41066
|
+
_this$actions43;
|
|
40956
41067
|
var event,
|
|
40957
41068
|
addToBasketLog,
|
|
40958
41069
|
emailConfig,
|
|
@@ -40968,43 +41079,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40968
41079
|
event = _args28.length > 1 && _args28[1] !== undefined ? _args28[1] : 'onAddToBasket';
|
|
40969
41080
|
addToBasketLog = true;
|
|
40970
41081
|
_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 :
|
|
41082
|
+
_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
41083
|
break;
|
|
40973
41084
|
case 5:
|
|
40974
41085
|
this.handleSuccessTransaction('onPrintBasket', actBasket);
|
|
40975
|
-
(_this$
|
|
41086
|
+
(_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.onEvent({
|
|
40976
41087
|
type: 'onWebPlanerPrint',
|
|
40977
41088
|
data: actBasket.getAsJson()
|
|
40978
41089
|
});
|
|
40979
|
-
return _context28.abrupt("break",
|
|
41090
|
+
return _context28.abrupt("break", 40);
|
|
40980
41091
|
case 8:
|
|
40981
41092
|
this.handleSuccessTransaction('onSaveBasket', actBasket);
|
|
40982
|
-
(_this$
|
|
41093
|
+
(_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
|
|
40983
41094
|
type: 'onWebPlanerSave',
|
|
40984
41095
|
data: actBasket.getAsJson()
|
|
40985
41096
|
});
|
|
40986
|
-
return _context28.abrupt("break",
|
|
41097
|
+
return _context28.abrupt("break", 40);
|
|
40987
41098
|
case 11:
|
|
40988
41099
|
this.handleSuccessTransaction('onShareBasket', actBasket);
|
|
40989
|
-
(_this$
|
|
41100
|
+
(_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
|
|
40990
41101
|
type: 'onWebPlanerShare',
|
|
40991
41102
|
data: actBasket.getAsJson()
|
|
40992
41103
|
});
|
|
40993
|
-
return _context28.abrupt("break",
|
|
41104
|
+
return _context28.abrupt("break", 40);
|
|
40994
41105
|
case 14:
|
|
40995
41106
|
this.handleSuccessTransaction('onRequestConsulation', actBasket);
|
|
40996
|
-
(_this$
|
|
41107
|
+
(_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
|
|
40997
41108
|
type: 'onRequestConsulation',
|
|
40998
41109
|
data: actBasket.getAsJson()
|
|
40999
41110
|
});
|
|
41000
|
-
return _context28.abrupt("break",
|
|
41111
|
+
return _context28.abrupt("break", 40);
|
|
41001
41112
|
case 17:
|
|
41002
41113
|
this.handleSuccessTransaction('onSave', actBasket);
|
|
41003
|
-
(_this$
|
|
41114
|
+
(_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
|
|
41004
41115
|
type: 'onSave',
|
|
41005
41116
|
data: actBasket.getAsJson()
|
|
41006
41117
|
});
|
|
41007
|
-
return _context28.abrupt("break",
|
|
41118
|
+
return _context28.abrupt("break", 40);
|
|
41008
41119
|
case 20:
|
|
41009
41120
|
emailConfig = (_this$divaBasketHandl3 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl3 !== void 0 ? _this$divaBasketHandl3 : this.getEmailConfig(); //reset the emailConfig
|
|
41010
41121
|
this.divaBasketHandler.emailConfig = undefined;
|
|
@@ -41036,11 +41147,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41036
41147
|
});
|
|
41037
41148
|
this.handleSuccessTransaction('onSendEmail', actBasket);
|
|
41038
41149
|
}
|
|
41039
|
-
(_this$
|
|
41150
|
+
(_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
|
|
41040
41151
|
type: 'onAddToBasket',
|
|
41041
41152
|
data: actBasket.getAsJson()
|
|
41042
41153
|
});
|
|
41043
|
-
return _context28.abrupt("break",
|
|
41154
|
+
return _context28.abrupt("break", 40);
|
|
41044
41155
|
case 25:
|
|
41045
41156
|
this.actSet().CatalogData;
|
|
41046
41157
|
_context28.next = 28;
|
|
@@ -41048,7 +41159,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41048
41159
|
case 28:
|
|
41049
41160
|
products = _context28.sent;
|
|
41050
41161
|
this.handleSuccessTransaction('onSaveProduct', actBasket);
|
|
41051
|
-
(_this$
|
|
41162
|
+
(_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
|
|
41052
41163
|
type: 'onAddToBasket',
|
|
41053
41164
|
data: actBasket.getAsJson()
|
|
41054
41165
|
});
|
|
@@ -41062,14 +41173,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41062
41173
|
addToBasketLog = false;
|
|
41063
41174
|
case 35:
|
|
41064
41175
|
if (addToBasketLog) this.handleSuccessTransaction('onAddToBasket', actBasket);
|
|
41065
|
-
(_this$
|
|
41176
|
+
(_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
|
|
41066
41177
|
type: 'onAddToBasket',
|
|
41067
41178
|
data: actBasket.getAsJson()
|
|
41068
41179
|
});
|
|
41069
|
-
return _context28.abrupt("break",
|
|
41180
|
+
return _context28.abrupt("break", 40);
|
|
41070
41181
|
case 38:
|
|
41182
|
+
(_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
|
|
41183
|
+
type: event,
|
|
41184
|
+
data: actBasket.getAsJson()
|
|
41185
|
+
});
|
|
41186
|
+
return _context28.abrupt("break", 40);
|
|
41187
|
+
case 40:
|
|
41071
41188
|
return _context28.abrupt("return");
|
|
41072
|
-
case
|
|
41189
|
+
case 41:
|
|
41073
41190
|
case "end":
|
|
41074
41191
|
return _context28.stop();
|
|
41075
41192
|
}
|
|
@@ -41094,8 +41211,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41094
41211
|
}, {
|
|
41095
41212
|
key: "openPDFpostAsEvent",
|
|
41096
41213
|
value: function openPDFpostAsEvent(mongoDBId) {
|
|
41097
|
-
var _this$
|
|
41098
|
-
(_this$
|
|
41214
|
+
var _this$actions44, _this$actions45, _this$actions46;
|
|
41215
|
+
(_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.updateBreadcrumbs({
|
|
41099
41216
|
type: 'update',
|
|
41100
41217
|
param: {
|
|
41101
41218
|
groupId: 'SHOWROOM',
|
|
@@ -41109,7 +41226,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41109
41226
|
}
|
|
41110
41227
|
}
|
|
41111
41228
|
});
|
|
41112
|
-
(_this$
|
|
41229
|
+
(_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.updateBreadcrumbs({
|
|
41113
41230
|
type: 'update',
|
|
41114
41231
|
param: {
|
|
41115
41232
|
groupId: 'SHOWROOM',
|
|
@@ -41123,7 +41240,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41123
41240
|
}
|
|
41124
41241
|
}
|
|
41125
41242
|
});
|
|
41126
|
-
(_this$
|
|
41243
|
+
(_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.openComponent({
|
|
41127
41244
|
type: 'REPORT',
|
|
41128
41245
|
parameters: {
|
|
41129
41246
|
id: mongoDBId
|
|
@@ -41343,14 +41460,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41343
41460
|
}, {
|
|
41344
41461
|
key: "subscribeToWebPlannerEvents",
|
|
41345
41462
|
value: function subscribeToWebPlannerEvents() {
|
|
41346
|
-
var _this$
|
|
41347
|
-
(_this$
|
|
41463
|
+
var _this$actions47;
|
|
41464
|
+
(_this$actions47 = this.actions) === null || _this$actions47 === void 0 || _this$actions47.subscribeEvents(this.addToBasketEventFunction);
|
|
41348
41465
|
}
|
|
41349
41466
|
}, {
|
|
41350
41467
|
key: "unsubscribeFromWebPlannerEvents",
|
|
41351
41468
|
value: function unsubscribeFromWebPlannerEvents() {
|
|
41352
|
-
var _this$
|
|
41353
|
-
(_this$
|
|
41469
|
+
var _this$actions48;
|
|
41470
|
+
(_this$actions48 = this.actions) === null || _this$actions48 === void 0 || _this$actions48.unSubscribeEvents(this.addToBasketEventFunction);
|
|
41354
41471
|
}
|
|
41355
41472
|
}, {
|
|
41356
41473
|
key: "initApiForLogicOnly",
|
|
@@ -41418,7 +41535,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41418
41535
|
}, {
|
|
41419
41536
|
key: "initBasket",
|
|
41420
41537
|
value: function () {
|
|
41421
|
-
var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31(init3D, ignoreFavorites) {
|
|
41538
|
+
var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31(init3D, ignoreFavorites, onlyCalcVariants) {
|
|
41422
41539
|
var _initSetState$api$web2;
|
|
41423
41540
|
var initSetState, sets, result, _sets$, set, basket;
|
|
41424
41541
|
return _regeneratorRuntime__default["default"].wrap(function _callee31$(_context31) {
|
|
@@ -41447,28 +41564,28 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41447
41564
|
(_sets$ = sets[0]) === null || _sets$ === void 0 || _sets$.remindPriceForHash(result);
|
|
41448
41565
|
}
|
|
41449
41566
|
case 12:
|
|
41450
|
-
//TODO: GLOBAL STUFF
|
|
41451
41567
|
set = this.actSet();
|
|
41568
|
+
if (set) set.onlyCalcVariants = onlyCalcVariants;
|
|
41452
41569
|
setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
|
|
41453
41570
|
if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
|
|
41454
|
-
_context31.next =
|
|
41571
|
+
_context31.next = 18;
|
|
41455
41572
|
break;
|
|
41456
41573
|
}
|
|
41457
|
-
_context31.next =
|
|
41574
|
+
_context31.next = 18;
|
|
41458
41575
|
return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
|
|
41459
|
-
case
|
|
41460
|
-
_context31.next =
|
|
41576
|
+
case 18:
|
|
41577
|
+
_context31.next = 20;
|
|
41461
41578
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
|
|
41462
|
-
case
|
|
41579
|
+
case 20:
|
|
41463
41580
|
basket = _context31.sent;
|
|
41464
41581
|
return _context31.abrupt("return", basket);
|
|
41465
|
-
case
|
|
41582
|
+
case 22:
|
|
41466
41583
|
case "end":
|
|
41467
41584
|
return _context31.stop();
|
|
41468
41585
|
}
|
|
41469
41586
|
}, _callee31, this);
|
|
41470
41587
|
}));
|
|
41471
|
-
function initBasket(_x78, _x79) {
|
|
41588
|
+
function initBasket(_x78, _x79, _x80) {
|
|
41472
41589
|
return _initBasket.apply(this, arguments);
|
|
41473
41590
|
}
|
|
41474
41591
|
return initBasket;
|
|
@@ -41545,7 +41662,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41545
41662
|
}
|
|
41546
41663
|
}, _callee33, this);
|
|
41547
41664
|
}));
|
|
41548
|
-
function handleFavorites(
|
|
41665
|
+
function handleFavorites(_x81) {
|
|
41549
41666
|
return _handleFavorites.apply(this, arguments);
|
|
41550
41667
|
}
|
|
41551
41668
|
return handleFavorites;
|
|
@@ -41599,7 +41716,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41599
41716
|
}
|
|
41600
41717
|
}, _callee34, this);
|
|
41601
41718
|
}));
|
|
41602
|
-
function initSapOrderLinesFromBasket(
|
|
41719
|
+
function initSapOrderLinesFromBasket(_x82, _x83, _x84) {
|
|
41603
41720
|
return _initSapOrderLinesFromBasket.apply(this, arguments);
|
|
41604
41721
|
}
|
|
41605
41722
|
return initSapOrderLinesFromBasket;
|