@crystaldesign/web-planner-logic 25.13.0-beta.46 → 25.13.0-beta.48
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-e7ab785a.js → DivaBoxPlanner-95b71e3f.js} +141 -85
- package/build/cjs/{DivaStandardPlanner-5f5991fc.js → DivaStandardPlanner-c3b86d07.js} +8 -2
- package/build/cjs/{DoorPlanner-0e42d83b.js → DoorPlanner-d0a41f4b.js} +1 -1
- package/build/cjs/{Host3DSignalR-4141d491.js → Host3DSignalR-42dc293a.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-47cc5540.js → LiviqueWWSHandler-fd8fda8f.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-14805264.js → PfisterWWSHandler-8b3e8ebb.js} +1 -1
- package/build/cjs/{PlannerHandler2D-8a05adf6.js → PlannerHandler2D-2e0714e3.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-0ac13ae5.js → SeriousBasketHandler-2e569287.js} +1 -1
- package/build/cjs/{ShelfPlanner-9c3115d7.js → ShelfPlanner-db031eb5.js} +1 -1
- package/build/cjs/{StandardWWSHandler-e24d8597.js → StandardWWSHandler-eabcd6df.js} +1 -1
- package/build/cjs/{index-432ba6ff.js → index-d532d2f4.js} +822 -715
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-e475edff.js → DivaBoxPlanner-57e531a6.js} +141 -85
- package/build/esm/{DivaStandardPlanner-47703c34.js → DivaStandardPlanner-43196400.js} +8 -2
- package/build/esm/{DoorPlanner-637f86ff.js → DoorPlanner-6ea41e3e.js} +1 -1
- package/build/esm/{Host3DSignalR-d4ba5141.js → Host3DSignalR-90bfa217.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-2f71cbef.js → LiviqueWWSHandler-67bcaa16.js} +1 -1
- package/build/esm/{PfisterWWSHandler-1e08979b.js → PfisterWWSHandler-9ff2a80f.js} +1 -1
- package/build/esm/{PlannerHandler2D-a7f78918.js → PlannerHandler2D-0449a94e.js} +1 -1
- package/build/esm/{SeriousBasketHandler-8bcf70f1.js → SeriousBasketHandler-4f65e751.js} +1 -1
- package/build/esm/{ShelfPlanner-dacb334f.js → ShelfPlanner-2c60c39b.js} +1 -1
- package/build/esm/{StandardWWSHandler-8c3733bc.js → StandardWWSHandler-ce4d69c2.js} +1 -1
- package/build/esm/{index-9d20093d.js → index-fea1582c.js} +822 -715
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +9 -0
- 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 +9 -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 +1 -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 +4 -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 +10 -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 +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +14 -0
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -28682,7 +28682,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28682
28682
|
break;
|
|
28683
28683
|
}
|
|
28684
28684
|
_context.next = 4;
|
|
28685
|
-
return import('./ShelfPlanner-
|
|
28685
|
+
return import('./ShelfPlanner-2c60c39b.js');
|
|
28686
28686
|
case 4:
|
|
28687
28687
|
_yield$import = _context.sent;
|
|
28688
28688
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -33328,7 +33328,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
33328
33328
|
break;
|
|
33329
33329
|
}
|
|
33330
33330
|
_context5.next = 3;
|
|
33331
|
-
return import('./DoorPlanner-
|
|
33331
|
+
return import('./DoorPlanner-6ea41e3e.js');
|
|
33332
33332
|
case 3:
|
|
33333
33333
|
_yield$import = _context5.sent;
|
|
33334
33334
|
DoorPlanner = _yield$import["default"];
|
|
@@ -36733,6 +36733,38 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36733
36733
|
}
|
|
36734
36734
|
return addPlannerElement;
|
|
36735
36735
|
}()
|
|
36736
|
+
/**
|
|
36737
|
+
* This function moves an Element. Depending on the planner, copying one element can result in copying multiple elements.
|
|
36738
|
+
* It first creates an article for each planner element to copy.
|
|
36739
|
+
* Then it adds the Elements to the planner
|
|
36740
|
+
* @param setId
|
|
36741
|
+
* @param elementId
|
|
36742
|
+
* @param copyInfo
|
|
36743
|
+
*
|
|
36744
|
+
* @returns this function returns the new selected article
|
|
36745
|
+
*/
|
|
36746
|
+
)
|
|
36747
|
+
}, {
|
|
36748
|
+
key: "movePlannerElement",
|
|
36749
|
+
value: (function () {
|
|
36750
|
+
var _movePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(set, elementId, absoluteMoveIndex) {
|
|
36751
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context9) {
|
|
36752
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
36753
|
+
case 0:
|
|
36754
|
+
set.getArticleByElementId(elementId);
|
|
36755
|
+
_context9.next = 3;
|
|
36756
|
+
return set.plannerHandler.movePlannerElements(set.getSetId(), elementId, absoluteMoveIndex);
|
|
36757
|
+
case 3:
|
|
36758
|
+
case "end":
|
|
36759
|
+
return _context9.stop();
|
|
36760
|
+
}
|
|
36761
|
+
}, _callee7);
|
|
36762
|
+
}));
|
|
36763
|
+
function movePlannerElement(_x19, _x20, _x21) {
|
|
36764
|
+
return _movePlannerElement.apply(this, arguments);
|
|
36765
|
+
}
|
|
36766
|
+
return movePlannerElement;
|
|
36767
|
+
}()
|
|
36736
36768
|
/**
|
|
36737
36769
|
* This function copys an Element. Depending on the planner, copying one element can result in copying multiple elements.
|
|
36738
36770
|
* It first creates an article for each planner element to copy.
|
|
@@ -36747,10 +36779,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36747
36779
|
}, {
|
|
36748
36780
|
key: "copyPlannerElement",
|
|
36749
36781
|
value: (function () {
|
|
36750
|
-
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
36782
|
+
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(set, elementId, copyInfo) {
|
|
36751
36783
|
var allElementsToCopy, articleCopyRelation, newSelectedArticle, i, newArticle;
|
|
36752
|
-
return _regeneratorRuntime.wrap(function
|
|
36753
|
-
while (1) switch (
|
|
36784
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context10) {
|
|
36785
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
36754
36786
|
case 0:
|
|
36755
36787
|
allElementsToCopy = set.plannerHandler.getPlannerElementsInfluencedByCopy(set.getSetId(), elementId, copyInfo);
|
|
36756
36788
|
articleCopyRelation = new Map();
|
|
@@ -36758,31 +36790,31 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36758
36790
|
i = 0;
|
|
36759
36791
|
case 4:
|
|
36760
36792
|
if (!(i < allElementsToCopy.length)) {
|
|
36761
|
-
|
|
36793
|
+
_context10.next = 13;
|
|
36762
36794
|
break;
|
|
36763
36795
|
}
|
|
36764
|
-
|
|
36796
|
+
_context10.next = 7;
|
|
36765
36797
|
return this.copyArticleByElementId(set, allElementsToCopy[i]);
|
|
36766
36798
|
case 7:
|
|
36767
|
-
newArticle =
|
|
36799
|
+
newArticle = _context10.sent;
|
|
36768
36800
|
if (newSelectedArticle == undefined) newSelectedArticle = newArticle;
|
|
36769
36801
|
articleCopyRelation.set(allElementsToCopy[i], newArticle.basketId);
|
|
36770
36802
|
case 10:
|
|
36771
36803
|
i++;
|
|
36772
|
-
|
|
36804
|
+
_context10.next = 4;
|
|
36773
36805
|
break;
|
|
36774
36806
|
case 13:
|
|
36775
|
-
|
|
36807
|
+
_context10.next = 15;
|
|
36776
36808
|
return set.plannerHandler.copyPlannerElements(set.getSetId(), articleCopyRelation, copyInfo);
|
|
36777
36809
|
case 15:
|
|
36778
|
-
return
|
|
36810
|
+
return _context10.abrupt("return", newSelectedArticle);
|
|
36779
36811
|
case 16:
|
|
36780
36812
|
case "end":
|
|
36781
|
-
return
|
|
36813
|
+
return _context10.stop();
|
|
36782
36814
|
}
|
|
36783
|
-
},
|
|
36815
|
+
}, _callee8, this);
|
|
36784
36816
|
}));
|
|
36785
|
-
function copyPlannerElement(
|
|
36817
|
+
function copyPlannerElement(_x22, _x23, _x24) {
|
|
36786
36818
|
return _copyPlannerElement.apply(this, arguments);
|
|
36787
36819
|
}
|
|
36788
36820
|
return copyPlannerElement;
|
|
@@ -36842,28 +36874,28 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36842
36874
|
}, {
|
|
36843
36875
|
key: "copyArticleByElementId",
|
|
36844
36876
|
value: (function () {
|
|
36845
|
-
var _copyArticleByElementId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
36877
|
+
var _copyArticleByElementId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(set, elementId, ignoreOptionsToCopy) {
|
|
36846
36878
|
var origArticle, variantValuesToCopy, i, newArticle;
|
|
36847
|
-
return _regeneratorRuntime.wrap(function
|
|
36848
|
-
while (1) switch (
|
|
36879
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context11) {
|
|
36880
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
36849
36881
|
case 0:
|
|
36850
36882
|
origArticle = set.getArticleByElementId(elementId);
|
|
36851
36883
|
variantValuesToCopy = origArticle.VariantValues;
|
|
36852
36884
|
if (ignoreOptionsToCopy !== null && ignoreOptionsToCopy !== void 0 && ignoreOptionsToCopy.length) for (i = 0; i < ignoreOptionsToCopy.length; i++) variantValuesToCopy[ignoreOptionsToCopy[i]] = '';
|
|
36853
|
-
|
|
36885
|
+
_context11.next = 5;
|
|
36854
36886
|
return this.addArticleToActSet(set, set.getArticleCodex(elementId), {
|
|
36855
36887
|
variantValues: variantValuesToCopy
|
|
36856
36888
|
}, true);
|
|
36857
36889
|
case 5:
|
|
36858
|
-
newArticle =
|
|
36859
|
-
return
|
|
36890
|
+
newArticle = _context11.sent;
|
|
36891
|
+
return _context11.abrupt("return", newArticle);
|
|
36860
36892
|
case 7:
|
|
36861
36893
|
case "end":
|
|
36862
|
-
return
|
|
36894
|
+
return _context11.stop();
|
|
36863
36895
|
}
|
|
36864
|
-
},
|
|
36896
|
+
}, _callee9, this);
|
|
36865
36897
|
}));
|
|
36866
|
-
function copyArticleByElementId(
|
|
36898
|
+
function copyArticleByElementId(_x25, _x26, _x27) {
|
|
36867
36899
|
return _copyArticleByElementId.apply(this, arguments);
|
|
36868
36900
|
}
|
|
36869
36901
|
return copyArticleByElementId;
|
|
@@ -36871,22 +36903,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36871
36903
|
}, {
|
|
36872
36904
|
key: "resetArticle",
|
|
36873
36905
|
value: function () {
|
|
36874
|
-
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
36906
|
+
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(set, basketId) {
|
|
36875
36907
|
var article;
|
|
36876
|
-
return _regeneratorRuntime.wrap(function
|
|
36877
|
-
while (1) switch (
|
|
36908
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context12) {
|
|
36909
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
36878
36910
|
case 0:
|
|
36879
36911
|
article = set.getDivaArticles()[basketId];
|
|
36880
36912
|
article.clearArticleOptionStates();
|
|
36881
|
-
|
|
36913
|
+
_context12.next = 4;
|
|
36882
36914
|
return articleHandlerInstance.toDoAfterArticleLoaded(article, {}, {}, 'initializing');
|
|
36883
36915
|
case 4:
|
|
36884
36916
|
case "end":
|
|
36885
|
-
return
|
|
36917
|
+
return _context12.stop();
|
|
36886
36918
|
}
|
|
36887
|
-
},
|
|
36919
|
+
}, _callee10);
|
|
36888
36920
|
}));
|
|
36889
|
-
function resetArticle(
|
|
36921
|
+
function resetArticle(_x28, _x29) {
|
|
36890
36922
|
return _resetArticle.apply(this, arguments);
|
|
36891
36923
|
}
|
|
36892
36924
|
return resetArticle;
|
|
@@ -36894,7 +36926,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36894
36926
|
}, {
|
|
36895
36927
|
key: "addArticleToActSet",
|
|
36896
36928
|
value: function () {
|
|
36897
|
-
var _addArticleToActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
36929
|
+
var _addArticleToActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(set, articleCodex, initParams, ignorePlanner) {
|
|
36898
36930
|
var from,
|
|
36899
36931
|
newArticle,
|
|
36900
36932
|
_set$getArticleByBask2,
|
|
@@ -36904,17 +36936,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36904
36936
|
_newArticle$catalogAr,
|
|
36905
36937
|
rule,
|
|
36906
36938
|
value,
|
|
36907
|
-
|
|
36908
|
-
return _regeneratorRuntime.wrap(function
|
|
36909
|
-
while (1) switch (
|
|
36939
|
+
_args13 = arguments;
|
|
36940
|
+
return _regeneratorRuntime.wrap(function _callee11$(_context13) {
|
|
36941
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
36910
36942
|
case 0:
|
|
36911
|
-
from =
|
|
36912
|
-
|
|
36943
|
+
from = _args13.length > 4 && _args13[4] !== undefined ? _args13[4] : 'initializing';
|
|
36944
|
+
_context13.next = 3;
|
|
36913
36945
|
return articleHandlerInstance.loadArticle(set, articleCodex, initParams);
|
|
36914
36946
|
case 3:
|
|
36915
|
-
newArticle =
|
|
36947
|
+
newArticle = _context13.sent;
|
|
36916
36948
|
if (newArticle) {
|
|
36917
|
-
|
|
36949
|
+
_context13.next = 6;
|
|
36918
36950
|
break;
|
|
36919
36951
|
}
|
|
36920
36952
|
throw new Error("articleCodex '" + articleCodex + "' not found in article list. Could be due to exclusivity or a bug in the application!");
|
|
@@ -36944,11 +36976,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36944
36976
|
}
|
|
36945
36977
|
}
|
|
36946
36978
|
if (!(from !== 'toDeleteShelf')) {
|
|
36947
|
-
|
|
36979
|
+
_context13.next = 15;
|
|
36948
36980
|
break;
|
|
36949
36981
|
}
|
|
36950
36982
|
set.addArticle(newArticle);
|
|
36951
|
-
|
|
36983
|
+
_context13.next = 15;
|
|
36952
36984
|
return articleHandlerInstance.toDoAfterArticleLoaded(newArticle, defaultHeaderValues, {}, from, undefined, ignorePlanner);
|
|
36953
36985
|
case 15:
|
|
36954
36986
|
if (newArticle.relatedToBasketId) {
|
|
@@ -36966,14 +36998,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36966
36998
|
}
|
|
36967
36999
|
});
|
|
36968
37000
|
}
|
|
36969
|
-
return
|
|
37001
|
+
return _context13.abrupt("return", newArticle);
|
|
36970
37002
|
case 17:
|
|
36971
37003
|
case "end":
|
|
36972
|
-
return
|
|
37004
|
+
return _context13.stop();
|
|
36973
37005
|
}
|
|
36974
|
-
},
|
|
37006
|
+
}, _callee11);
|
|
36975
37007
|
}));
|
|
36976
|
-
function addArticleToActSet(
|
|
37008
|
+
function addArticleToActSet(_x30, _x31, _x32, _x33) {
|
|
36977
37009
|
return _addArticleToActSet.apply(this, arguments);
|
|
36978
37010
|
}
|
|
36979
37011
|
return addArticleToActSet;
|
|
@@ -36981,10 +37013,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36981
37013
|
}, {
|
|
36982
37014
|
key: "updateAccessoireQuantity",
|
|
36983
37015
|
value: function () {
|
|
36984
|
-
var _updateAccessoireQuantity = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
37016
|
+
var _updateAccessoireQuantity = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(set, accessoireItem, relatedToBasketId, nQuantity, forceConfigSingle) {
|
|
36985
37017
|
var changed3D, somethingChanged, articleCodex, parentArticle, configSingle, _accessoire$quantity, _accessoire, accessoire, curQuantity, delta, newQuantity;
|
|
36986
|
-
return _regeneratorRuntime.wrap(function
|
|
36987
|
-
while (1) switch (
|
|
37018
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context14) {
|
|
37019
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
36988
37020
|
case 0:
|
|
36989
37021
|
//Falls das Accessoire bereits existiert nur die Quantity Updaten. Ansonsten das Accessoire neu laden.
|
|
36990
37022
|
//Falls die Neue Quantity == 0 ist muss es gelöscht werden
|
|
@@ -36994,7 +37026,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36994
37026
|
parentArticle = set.getArticleByBasketId(relatedToBasketId);
|
|
36995
37027
|
configSingle = forceConfigSingle || set.CatalogData.forceConfigAllAccessoires;
|
|
36996
37028
|
if (!parentArticle) {
|
|
36997
|
-
|
|
37029
|
+
_context14.next = 29;
|
|
36998
37030
|
break;
|
|
36999
37031
|
}
|
|
37000
37032
|
accessoire = parentArticle.getAccessoireByArticleCodex(articleCodex)[0];
|
|
@@ -37002,25 +37034,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37002
37034
|
delta = nQuantity - curQuantity;
|
|
37003
37035
|
newQuantity = !configSingle ? delta : nQuantity;
|
|
37004
37036
|
if (!(delta + ((_accessoire$quantity = (_accessoire = accessoire) === null || _accessoire === void 0 ? void 0 : _accessoire.quantity) !== null && _accessoire$quantity !== void 0 ? _accessoire$quantity : 0) > 0)) {
|
|
37005
|
-
|
|
37037
|
+
_context14.next = 24;
|
|
37006
37038
|
break;
|
|
37007
37039
|
}
|
|
37008
37040
|
if (!(accessoire == undefined || !configSingle)) {
|
|
37009
|
-
|
|
37041
|
+
_context14.next = 17;
|
|
37010
37042
|
break;
|
|
37011
37043
|
}
|
|
37012
|
-
|
|
37044
|
+
_context14.next = 14;
|
|
37013
37045
|
return this.addArticleToActSet(set, articleCodex, {
|
|
37014
37046
|
quantity: newQuantity,
|
|
37015
37047
|
relatedToBasketId: relatedToBasketId,
|
|
37016
37048
|
notDocking: true
|
|
37017
37049
|
});
|
|
37018
37050
|
case 14:
|
|
37019
|
-
accessoire =
|
|
37020
|
-
|
|
37051
|
+
accessoire = _context14.sent;
|
|
37052
|
+
_context14.next = 19;
|
|
37021
37053
|
break;
|
|
37022
37054
|
case 17:
|
|
37023
|
-
|
|
37055
|
+
_context14.next = 19;
|
|
37024
37056
|
return articleHandlerInstance.updateAccessoireQuantity(accessoire, newQuantity);
|
|
37025
37057
|
case 19:
|
|
37026
37058
|
if (accessoireItem.isVisualized && !accessoireItem.isPlannerElement) {
|
|
@@ -37029,11 +37061,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37029
37061
|
}
|
|
37030
37062
|
set.giveAccNewPosNrByBasketId(set.getBaseParentArticleOfAccessoire(relatedToBasketId).basketId);
|
|
37031
37063
|
somethingChanged = true;
|
|
37032
|
-
|
|
37064
|
+
_context14.next = 29;
|
|
37033
37065
|
break;
|
|
37034
37066
|
case 24:
|
|
37035
37067
|
if (!(delta < 0 && accessoire != undefined)) {
|
|
37036
|
-
|
|
37068
|
+
_context14.next = 29;
|
|
37037
37069
|
break;
|
|
37038
37070
|
}
|
|
37039
37071
|
if (accessoireItem.isVisualized && !accessoireItem.isPlannerElement) {
|
|
@@ -37041,20 +37073,20 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37041
37073
|
changed3D = true;
|
|
37042
37074
|
}
|
|
37043
37075
|
somethingChanged = true;
|
|
37044
|
-
|
|
37076
|
+
_context14.next = 29;
|
|
37045
37077
|
return this.deleteElementFromSet(set, accessoire);
|
|
37046
37078
|
case 29:
|
|
37047
|
-
return
|
|
37079
|
+
return _context14.abrupt("return", {
|
|
37048
37080
|
somethingChanged: somethingChanged,
|
|
37049
37081
|
changed3D: changed3D
|
|
37050
37082
|
});
|
|
37051
37083
|
case 30:
|
|
37052
37084
|
case "end":
|
|
37053
|
-
return
|
|
37085
|
+
return _context14.stop();
|
|
37054
37086
|
}
|
|
37055
|
-
},
|
|
37087
|
+
}, _callee12, this);
|
|
37056
37088
|
}));
|
|
37057
|
-
function updateAccessoireQuantity(
|
|
37089
|
+
function updateAccessoireQuantity(_x34, _x35, _x36, _x37, _x38) {
|
|
37058
37090
|
return _updateAccessoireQuantity.apply(this, arguments);
|
|
37059
37091
|
}
|
|
37060
37092
|
return updateAccessoireQuantity;
|
|
@@ -37062,36 +37094,36 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37062
37094
|
}, {
|
|
37063
37095
|
key: "deleteElementFromSetByElemId",
|
|
37064
37096
|
value: function () {
|
|
37065
|
-
var _deleteElementFromSetByElemId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
37097
|
+
var _deleteElementFromSetByElemId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(set, elementId, autoCorrectAVL_AVR, deletionType) {
|
|
37066
37098
|
var article;
|
|
37067
|
-
return _regeneratorRuntime.wrap(function
|
|
37068
|
-
while (1) switch (
|
|
37099
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context15) {
|
|
37100
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
37069
37101
|
case 0:
|
|
37070
37102
|
if (!set) {
|
|
37071
|
-
|
|
37103
|
+
_context15.next = 6;
|
|
37072
37104
|
break;
|
|
37073
37105
|
}
|
|
37074
37106
|
article = set.getArticleByElementId(elementId);
|
|
37075
37107
|
if (!article) {
|
|
37076
|
-
|
|
37108
|
+
_context15.next = 6;
|
|
37077
37109
|
break;
|
|
37078
37110
|
}
|
|
37079
|
-
|
|
37111
|
+
_context15.next = 5;
|
|
37080
37112
|
return this.deleteElementFromSet(set, article, autoCorrectAVL_AVR, deletionType);
|
|
37081
37113
|
case 5:
|
|
37082
|
-
return
|
|
37114
|
+
return _context15.abrupt("return", _context15.sent);
|
|
37083
37115
|
case 6:
|
|
37084
|
-
return
|
|
37116
|
+
return _context15.abrupt("return", {
|
|
37085
37117
|
success: false,
|
|
37086
37118
|
setId: set.getSetId()
|
|
37087
37119
|
});
|
|
37088
37120
|
case 7:
|
|
37089
37121
|
case "end":
|
|
37090
|
-
return
|
|
37122
|
+
return _context15.stop();
|
|
37091
37123
|
}
|
|
37092
|
-
},
|
|
37124
|
+
}, _callee13, this);
|
|
37093
37125
|
}));
|
|
37094
|
-
function deleteElementFromSetByElemId(
|
|
37126
|
+
function deleteElementFromSetByElemId(_x39, _x40, _x41, _x42) {
|
|
37095
37127
|
return _deleteElementFromSetByElemId.apply(this, arguments);
|
|
37096
37128
|
}
|
|
37097
37129
|
return deleteElementFromSetByElemId;
|
|
@@ -37099,18 +37131,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37099
37131
|
}, {
|
|
37100
37132
|
key: "deleteElementFromSet",
|
|
37101
37133
|
value: function () {
|
|
37102
|
-
var _deleteElementFromSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
37134
|
+
var _deleteElementFromSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(set, article, autoCorrectAVL_AVR, deletionType, dontReload, dontCheckInfluencedPlannerElements) {
|
|
37103
37135
|
var _deletedArticle$doorP, _set$CatalogData;
|
|
37104
37136
|
var setId, success, newSelectedElement, allElementsToDelete, i, art, deletedArticle, articles, key, oldTransform, result, _set$getArticleByBask3;
|
|
37105
|
-
return _regeneratorRuntime.wrap(function
|
|
37106
|
-
while (1) switch (
|
|
37137
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context16) {
|
|
37138
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
37107
37139
|
case 0:
|
|
37108
37140
|
setId = set.getSetId();
|
|
37109
37141
|
if (!(set == undefined)) {
|
|
37110
|
-
|
|
37142
|
+
_context16.next = 3;
|
|
37111
37143
|
break;
|
|
37112
37144
|
}
|
|
37113
|
-
return
|
|
37145
|
+
return _context16.abrupt("return", {
|
|
37114
37146
|
success: false,
|
|
37115
37147
|
selectElementId: undefined,
|
|
37116
37148
|
setId: setId
|
|
@@ -37119,49 +37151,49 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37119
37151
|
success = false;
|
|
37120
37152
|
newSelectedElement = undefined;
|
|
37121
37153
|
if (dontCheckInfluencedPlannerElements) {
|
|
37122
|
-
|
|
37154
|
+
_context16.next = 15;
|
|
37123
37155
|
break;
|
|
37124
37156
|
}
|
|
37125
37157
|
allElementsToDelete = set.plannerHandler.getPlannerElementsInfluencedByDeletion(setId, article.elementId, deletionType);
|
|
37126
37158
|
i = 0;
|
|
37127
37159
|
case 8:
|
|
37128
37160
|
if (!(i < allElementsToDelete.length)) {
|
|
37129
|
-
|
|
37161
|
+
_context16.next = 15;
|
|
37130
37162
|
break;
|
|
37131
37163
|
}
|
|
37132
37164
|
art = set.getArticleByElementId(allElementsToDelete[i]);
|
|
37133
|
-
|
|
37165
|
+
_context16.next = 12;
|
|
37134
37166
|
return this.deleteElementFromSet(set, art, undefined, 'STD_DONTUPDATE', true, true);
|
|
37135
37167
|
case 12:
|
|
37136
37168
|
i++;
|
|
37137
|
-
|
|
37169
|
+
_context16.next = 8;
|
|
37138
37170
|
break;
|
|
37139
37171
|
case 15:
|
|
37140
37172
|
deletedArticle = article; //accessoires löschen
|
|
37141
37173
|
articles = set.getAccessoiresOfBasketId(article.basketId);
|
|
37142
|
-
|
|
37174
|
+
_context16.t0 = _regeneratorRuntime.keys(articles);
|
|
37143
37175
|
case 18:
|
|
37144
|
-
if ((
|
|
37145
|
-
|
|
37176
|
+
if ((_context16.t1 = _context16.t0()).done) {
|
|
37177
|
+
_context16.next = 24;
|
|
37146
37178
|
break;
|
|
37147
37179
|
}
|
|
37148
|
-
key =
|
|
37149
|
-
|
|
37180
|
+
key = _context16.t1.value;
|
|
37181
|
+
_context16.next = 22;
|
|
37150
37182
|
return this.deleteElementFromSet(set, articles[key], undefined, undefined, true);
|
|
37151
37183
|
case 22:
|
|
37152
|
-
|
|
37184
|
+
_context16.next = 18;
|
|
37153
37185
|
break;
|
|
37154
37186
|
case 24:
|
|
37155
37187
|
oldTransform = undefined;
|
|
37156
37188
|
if (deletedArticle) deletedArticle.deleted = true;
|
|
37157
37189
|
if (!(deletedArticle !== null && deletedArticle !== void 0 && deletedArticle.hasCatalogPlannerArticle)) {
|
|
37158
|
-
|
|
37190
|
+
_context16.next = 32;
|
|
37159
37191
|
break;
|
|
37160
37192
|
}
|
|
37161
|
-
|
|
37193
|
+
_context16.next = 29;
|
|
37162
37194
|
return set.plannerHandler.deletePlannerElement(setId, deletedArticle.elementId, autoCorrectAVL_AVR, deletionType);
|
|
37163
37195
|
case 29:
|
|
37164
|
-
result =
|
|
37196
|
+
result = _context16.sent;
|
|
37165
37197
|
newSelectedElement = result.newElementToSelect;
|
|
37166
37198
|
oldTransform = result.transform;
|
|
37167
37199
|
case 32:
|
|
@@ -37174,13 +37206,13 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37174
37206
|
deletedArticle === null || deletedArticle === void 0 || (_deletedArticle$doorP = deletedArticle.doorPlanner) === null || _deletedArticle$doorP === void 0 || _deletedArticle$doorP.deleteElement(deletedArticle.basketId);
|
|
37175
37207
|
success = set.deleteArticle(article.basketId);
|
|
37176
37208
|
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)) {
|
|
37177
|
-
|
|
37209
|
+
_context16.next = 38;
|
|
37178
37210
|
break;
|
|
37179
37211
|
}
|
|
37180
|
-
|
|
37212
|
+
_context16.next = 38;
|
|
37181
37213
|
return this.updateArticlesOptionStatesOfActSet(set, {}, []);
|
|
37182
37214
|
case 38:
|
|
37183
|
-
return
|
|
37215
|
+
return _context16.abrupt("return", {
|
|
37184
37216
|
success: success,
|
|
37185
37217
|
selectElementId: newSelectedElement,
|
|
37186
37218
|
setId: setId,
|
|
@@ -37188,11 +37220,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37188
37220
|
});
|
|
37189
37221
|
case 39:
|
|
37190
37222
|
case "end":
|
|
37191
|
-
return
|
|
37223
|
+
return _context16.stop();
|
|
37192
37224
|
}
|
|
37193
|
-
},
|
|
37225
|
+
}, _callee14, this);
|
|
37194
37226
|
}));
|
|
37195
|
-
function deleteElementFromSet(
|
|
37227
|
+
function deleteElementFromSet(_x43, _x44, _x45, _x46, _x47, _x48) {
|
|
37196
37228
|
return _deleteElementFromSet.apply(this, arguments);
|
|
37197
37229
|
}
|
|
37198
37230
|
return deleteElementFromSet;
|
|
@@ -37200,22 +37232,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37200
37232
|
}, {
|
|
37201
37233
|
key: "addAccessorieOnShelfPlanner",
|
|
37202
37234
|
value: function () {
|
|
37203
|
-
var _addAccessorieOnShelfPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
37235
|
+
var _addAccessorieOnShelfPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(set, gridIndex, cellIndex, parentBasketId, params) {
|
|
37204
37236
|
var parentArticle, articleCodex, accessoire, doesFit;
|
|
37205
|
-
return _regeneratorRuntime.wrap(function
|
|
37206
|
-
while (1) switch (
|
|
37237
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context17) {
|
|
37238
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
37207
37239
|
case 0:
|
|
37208
37240
|
parentArticle = set.getArticleByBasketId(parentBasketId);
|
|
37209
37241
|
if (!(parentArticle !== null && parentArticle !== void 0 && parentArticle.shelfPlanner)) {
|
|
37210
|
-
|
|
37242
|
+
_context17.next = 24;
|
|
37211
37243
|
break;
|
|
37212
37244
|
}
|
|
37213
37245
|
articleCodex = parentArticle.shelfPlanner.getActAccessoireOfGrid(gridIndex);
|
|
37214
37246
|
if (!articleCodex) {
|
|
37215
|
-
|
|
37247
|
+
_context17.next = 24;
|
|
37216
37248
|
break;
|
|
37217
37249
|
}
|
|
37218
|
-
|
|
37250
|
+
_context17.next = 6;
|
|
37219
37251
|
return this.addArticleToActSet(set, articleCodex, {
|
|
37220
37252
|
relatedToBasketId: parentBasketId,
|
|
37221
37253
|
relatedToShelf: parentBasketId,
|
|
@@ -37223,52 +37255,52 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37223
37255
|
partlistCodexToInit: params === null || params === void 0 ? void 0 : params.partlistCodexToInit
|
|
37224
37256
|
});
|
|
37225
37257
|
case 6:
|
|
37226
|
-
accessoire =
|
|
37258
|
+
accessoire = _context17.sent;
|
|
37227
37259
|
doesFit = parentArticle.shelfPlanner.tryFitOnShelfOfGrid(gridIndex, cellIndex, accessoire);
|
|
37228
37260
|
if (!(doesFit !== false && doesFit.type != 'doesNotFit' && doesFit.type != 'notAllowedByParentRule' && doesFit.type != 'notAllowedByAccessoireRule' && doesFit.type != 'notAllowedByMaxQuantityReached' && doesFit.index !== undefined)) {
|
|
37229
|
-
|
|
37261
|
+
_context17.next = 20;
|
|
37230
37262
|
break;
|
|
37231
37263
|
}
|
|
37232
|
-
|
|
37264
|
+
_context17.next = 11;
|
|
37233
37265
|
return parentArticle.shelfPlanner.addAccessoireInCellInGrid(accessoire, gridIndex, doesFit.index, doesFit.type, params);
|
|
37234
37266
|
case 11:
|
|
37235
37267
|
set.giveAccNewPosNrByBasketId(set.getBaseParentArticleOfAccessoire(parentBasketId).basketId);
|
|
37236
37268
|
if (!parentArticle.shelfPlanner.allMontageOptions.length) {
|
|
37237
|
-
|
|
37269
|
+
_context17.next = 15;
|
|
37238
37270
|
break;
|
|
37239
37271
|
}
|
|
37240
|
-
|
|
37272
|
+
_context17.next = 15;
|
|
37241
37273
|
return this.updateArticlesOptionStatesOfActSet(set, {}, [parentArticle.basketId], true, 'initializing');
|
|
37242
37274
|
case 15:
|
|
37243
37275
|
if (params !== null && params !== void 0 && params.byInit) {
|
|
37244
|
-
|
|
37276
|
+
_context17.next = 18;
|
|
37245
37277
|
break;
|
|
37246
37278
|
}
|
|
37247
|
-
|
|
37279
|
+
_context17.next = 18;
|
|
37248
37280
|
return parentArticle.shelfPlanner.onConfigChanged({});
|
|
37249
37281
|
case 18:
|
|
37250
|
-
|
|
37282
|
+
_context17.next = 22;
|
|
37251
37283
|
break;
|
|
37252
37284
|
case 20:
|
|
37253
|
-
|
|
37285
|
+
_context17.next = 22;
|
|
37254
37286
|
return this.deleteElementFromSet(set, accessoire);
|
|
37255
37287
|
case 22:
|
|
37256
37288
|
if (!(doesFit !== false)) {
|
|
37257
|
-
|
|
37289
|
+
_context17.next = 24;
|
|
37258
37290
|
break;
|
|
37259
37291
|
}
|
|
37260
|
-
return
|
|
37292
|
+
return _context17.abrupt("return", _objectSpread$a(_objectSpread$a({}, doesFit), {}, {
|
|
37261
37293
|
accessoire: accessoire
|
|
37262
37294
|
}));
|
|
37263
37295
|
case 24:
|
|
37264
|
-
return
|
|
37296
|
+
return _context17.abrupt("return", false);
|
|
37265
37297
|
case 25:
|
|
37266
37298
|
case "end":
|
|
37267
|
-
return
|
|
37299
|
+
return _context17.stop();
|
|
37268
37300
|
}
|
|
37269
|
-
},
|
|
37301
|
+
}, _callee15, this);
|
|
37270
37302
|
}));
|
|
37271
|
-
function addAccessorieOnShelfPlanner(
|
|
37303
|
+
function addAccessorieOnShelfPlanner(_x49, _x50, _x51, _x52, _x53) {
|
|
37272
37304
|
return _addAccessorieOnShelfPlanner.apply(this, arguments);
|
|
37273
37305
|
}
|
|
37274
37306
|
return addAccessorieOnShelfPlanner;
|
|
@@ -37276,29 +37308,29 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37276
37308
|
}, {
|
|
37277
37309
|
key: "moveShelfItem",
|
|
37278
37310
|
value: function () {
|
|
37279
|
-
var _moveShelfItem = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
37311
|
+
var _moveShelfItem = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(set, grid, initialIndex, finalIndex) {
|
|
37280
37312
|
var article;
|
|
37281
|
-
return _regeneratorRuntime.wrap(function
|
|
37282
|
-
while (1) switch (
|
|
37313
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context18) {
|
|
37314
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
37283
37315
|
case 0:
|
|
37284
37316
|
article = set.getArticleByBasketId(grid.basketId);
|
|
37285
37317
|
if (!(article && article.shelfPlanner)) {
|
|
37286
|
-
|
|
37318
|
+
_context18.next = 5;
|
|
37287
37319
|
break;
|
|
37288
37320
|
}
|
|
37289
|
-
|
|
37321
|
+
_context18.next = 4;
|
|
37290
37322
|
return article.shelfPlanner.grids[grid.ShelfIndex].moveCell(initialIndex, finalIndex);
|
|
37291
37323
|
case 4:
|
|
37292
|
-
return
|
|
37324
|
+
return _context18.abrupt("return", _context18.sent);
|
|
37293
37325
|
case 5:
|
|
37294
|
-
return
|
|
37326
|
+
return _context18.abrupt("return", 'NOTHING_CHANGED');
|
|
37295
37327
|
case 6:
|
|
37296
37328
|
case "end":
|
|
37297
|
-
return
|
|
37329
|
+
return _context18.stop();
|
|
37298
37330
|
}
|
|
37299
|
-
},
|
|
37331
|
+
}, _callee16);
|
|
37300
37332
|
}));
|
|
37301
|
-
function moveShelfItem(
|
|
37333
|
+
function moveShelfItem(_x54, _x55, _x56, _x57) {
|
|
37302
37334
|
return _moveShelfItem.apply(this, arguments);
|
|
37303
37335
|
}
|
|
37304
37336
|
return moveShelfItem;
|
|
@@ -37319,11 +37351,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37319
37351
|
}, {
|
|
37320
37352
|
key: "getFreeShelfGrids",
|
|
37321
37353
|
value: function () {
|
|
37322
|
-
var _getFreeShelfGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
37354
|
+
var _getFreeShelfGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(set, gridGroup) {
|
|
37323
37355
|
var _article$shelfPlanner;
|
|
37324
37356
|
var articles, article, articleCodex, accessoire, ret;
|
|
37325
|
-
return _regeneratorRuntime.wrap(function
|
|
37326
|
-
while (1) switch (
|
|
37357
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context19) {
|
|
37358
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
37327
37359
|
case 0:
|
|
37328
37360
|
articles = set.getDivaArticlesByGridGroup(gridGroup);
|
|
37329
37361
|
article = Object.values(articles).find(function (a) {
|
|
@@ -37332,38 +37364,38 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37332
37364
|
});
|
|
37333
37365
|
articleCodex = article === null || article === void 0 || (_article$shelfPlanner = article.shelfPlanner) === null || _article$shelfPlanner === void 0 ? void 0 : _article$shelfPlanner.getSelectedAccessoireById(gridGroup);
|
|
37334
37366
|
if (!(!article || !articleCodex)) {
|
|
37335
|
-
|
|
37367
|
+
_context19.next = 5;
|
|
37336
37368
|
break;
|
|
37337
37369
|
}
|
|
37338
|
-
return
|
|
37370
|
+
return _context19.abrupt("return", undefined);
|
|
37339
37371
|
case 5:
|
|
37340
|
-
|
|
37372
|
+
_context19.next = 7;
|
|
37341
37373
|
return this.addArticleToActSet(set, articleCodex, {
|
|
37342
37374
|
relatedToBasketId: article.basketId,
|
|
37343
37375
|
relatedToShelf: article.basketId,
|
|
37344
37376
|
relatedToShelfGrid: 0
|
|
37345
37377
|
}, false, 'toDeleteShelf');
|
|
37346
37378
|
case 7:
|
|
37347
|
-
accessoire =
|
|
37348
|
-
|
|
37379
|
+
accessoire = _context19.sent;
|
|
37380
|
+
_context19.next = 10;
|
|
37349
37381
|
return accessoire.updateShelfPlannerState({});
|
|
37350
37382
|
case 10:
|
|
37351
37383
|
articleHandlerInstance.initCfgValues(accessoire, {});
|
|
37352
|
-
|
|
37384
|
+
_context19.next = 13;
|
|
37353
37385
|
return articleHandlerInstance.updateCfgValues(accessoire, {}, {}, true, true);
|
|
37354
37386
|
case 13:
|
|
37355
37387
|
ret = this.getFreePlaces(gridGroup, articles, accessoire);
|
|
37356
|
-
|
|
37388
|
+
_context19.next = 16;
|
|
37357
37389
|
return this.deleteElementFromSet(set, accessoire, undefined, undefined, true);
|
|
37358
37390
|
case 16:
|
|
37359
|
-
return
|
|
37391
|
+
return _context19.abrupt("return", ret);
|
|
37360
37392
|
case 17:
|
|
37361
37393
|
case "end":
|
|
37362
|
-
return
|
|
37394
|
+
return _context19.stop();
|
|
37363
37395
|
}
|
|
37364
|
-
},
|
|
37396
|
+
}, _callee17, this);
|
|
37365
37397
|
}));
|
|
37366
|
-
function getFreeShelfGrids(
|
|
37398
|
+
function getFreeShelfGrids(_x58, _x59) {
|
|
37367
37399
|
return _getFreeShelfGrids.apply(this, arguments);
|
|
37368
37400
|
}
|
|
37369
37401
|
return getFreeShelfGrids;
|
|
@@ -37422,62 +37454,62 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37422
37454
|
}, {
|
|
37423
37455
|
key: "moveShelfItemToGrid",
|
|
37424
37456
|
value: function () {
|
|
37425
|
-
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
37457
|
+
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(set, accessoireBasketId, parentBasketId, gridName, cellIndex) {
|
|
37426
37458
|
var _oldGrid$Cells$find;
|
|
37427
37459
|
var artices, accessoire, oldParent, newParent, oldGrid, newGrid, index;
|
|
37428
|
-
return _regeneratorRuntime.wrap(function
|
|
37429
|
-
while (1) switch (
|
|
37460
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context20) {
|
|
37461
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
37430
37462
|
case 0:
|
|
37431
37463
|
artices = set.getDivaArticles();
|
|
37432
37464
|
accessoire = artices[accessoireBasketId];
|
|
37433
37465
|
oldParent = accessoire.accessoireParentArticle;
|
|
37434
37466
|
newParent = artices[parentBasketId];
|
|
37435
37467
|
if (!(accessoire.relatedToShelfGrid === undefined)) {
|
|
37436
|
-
|
|
37468
|
+
_context20.next = 6;
|
|
37437
37469
|
break;
|
|
37438
37470
|
}
|
|
37439
|
-
return
|
|
37471
|
+
return _context20.abrupt("return");
|
|
37440
37472
|
case 6:
|
|
37441
37473
|
if (oldParent !== null && oldParent !== void 0 && oldParent.shelfPlanner) {
|
|
37442
|
-
|
|
37474
|
+
_context20.next = 8;
|
|
37443
37475
|
break;
|
|
37444
37476
|
}
|
|
37445
|
-
return
|
|
37477
|
+
return _context20.abrupt("return");
|
|
37446
37478
|
case 8:
|
|
37447
37479
|
if (newParent !== null && newParent !== void 0 && newParent.shelfPlanner) {
|
|
37448
|
-
|
|
37480
|
+
_context20.next = 10;
|
|
37449
37481
|
break;
|
|
37450
37482
|
}
|
|
37451
|
-
return
|
|
37483
|
+
return _context20.abrupt("return");
|
|
37452
37484
|
case 10:
|
|
37453
37485
|
oldGrid = oldParent.shelfPlanner.getGridByIndex(accessoire.relatedToShelfGrid);
|
|
37454
37486
|
newGrid = newParent.shelfPlanner.getGridByGridName(gridName);
|
|
37455
37487
|
if (oldGrid) {
|
|
37456
|
-
|
|
37488
|
+
_context20.next = 14;
|
|
37457
37489
|
break;
|
|
37458
37490
|
}
|
|
37459
|
-
return
|
|
37491
|
+
return _context20.abrupt("return");
|
|
37460
37492
|
case 14:
|
|
37461
37493
|
if (newGrid) {
|
|
37462
|
-
|
|
37494
|
+
_context20.next = 16;
|
|
37463
37495
|
break;
|
|
37464
37496
|
}
|
|
37465
|
-
return
|
|
37497
|
+
return _context20.abrupt("return");
|
|
37466
37498
|
case 16:
|
|
37467
37499
|
index = oldGrid === null || oldGrid === void 0 || (_oldGrid$Cells$find = oldGrid.Cells.find(function (c, i) {
|
|
37468
37500
|
var _c$Article;
|
|
37469
37501
|
return c.Index === c.InUse && ((_c$Article = c.Article) === null || _c$Article === void 0 ? void 0 : _c$Article.basketId) == accessoire.basketId;
|
|
37470
37502
|
})) === null || _oldGrid$Cells$find === void 0 ? void 0 : _oldGrid$Cells$find.Index;
|
|
37471
37503
|
if (!(index === undefined)) {
|
|
37472
|
-
|
|
37504
|
+
_context20.next = 19;
|
|
37473
37505
|
break;
|
|
37474
37506
|
}
|
|
37475
|
-
return
|
|
37507
|
+
return _context20.abrupt("return");
|
|
37476
37508
|
case 19:
|
|
37477
|
-
|
|
37509
|
+
_context20.next = 21;
|
|
37478
37510
|
return oldParent.shelfPlanner.deleteAccessoireOfCellInGrid(accessoire.relatedToShelfGrid, index);
|
|
37479
37511
|
case 21:
|
|
37480
|
-
|
|
37512
|
+
_context20.next = 23;
|
|
37481
37513
|
return newParent.shelfPlanner.addAccessoireInCellInGrid(accessoire, newGrid.ShelfIndex, cellIndex, 'fitsOn');
|
|
37482
37514
|
case 23:
|
|
37483
37515
|
accessoire.relatedToShelfGrid = newGrid.ShelfIndex;
|
|
@@ -37489,17 +37521,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37489
37521
|
set.giveAccNewPosNrByBasketId(set.getBaseParentArticleOfAccessoire(oldParent.basketId).basketId);
|
|
37490
37522
|
}
|
|
37491
37523
|
set.giveAccNewPosNrByBasketId(set.getBaseParentArticleOfAccessoire(newParent.basketId).basketId);
|
|
37492
|
-
|
|
37524
|
+
_context20.next = 28;
|
|
37493
37525
|
return this.updateArticlesOptionStatesOfActSet(set, {}, [oldParent.basketId, newParent.basketId]);
|
|
37494
37526
|
case 28:
|
|
37495
|
-
return
|
|
37527
|
+
return _context20.abrupt("return", newGrid.getGridIdByArticleCodex(accessoire.articleCodex));
|
|
37496
37528
|
case 29:
|
|
37497
37529
|
case "end":
|
|
37498
|
-
return
|
|
37530
|
+
return _context20.stop();
|
|
37499
37531
|
}
|
|
37500
|
-
},
|
|
37532
|
+
}, _callee18, this);
|
|
37501
37533
|
}));
|
|
37502
|
-
function moveShelfItemToGrid(
|
|
37534
|
+
function moveShelfItemToGrid(_x60, _x61, _x62, _x63, _x64) {
|
|
37503
37535
|
return _moveShelfItemToGrid.apply(this, arguments);
|
|
37504
37536
|
}
|
|
37505
37537
|
return moveShelfItemToGrid;
|
|
@@ -37507,33 +37539,33 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37507
37539
|
}, {
|
|
37508
37540
|
key: "deleteAccessorieOnShelfPlanner",
|
|
37509
37541
|
value: function () {
|
|
37510
|
-
var _deleteAccessorieOnShelfPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
37542
|
+
var _deleteAccessorieOnShelfPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(set, gridIndex, cellIndex, parentBasketId, dontReload) {
|
|
37511
37543
|
var _parentArticle$shelfP2;
|
|
37512
37544
|
var parentArticle, articeToDelete, _parentArticle$shelfP3;
|
|
37513
|
-
return _regeneratorRuntime.wrap(function
|
|
37514
|
-
while (1) switch (
|
|
37545
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context21) {
|
|
37546
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
37515
37547
|
case 0:
|
|
37516
37548
|
parentArticle = set.getArticleByBasketId(parentBasketId);
|
|
37517
|
-
|
|
37549
|
+
_context21.next = 3;
|
|
37518
37550
|
return parentArticle === null || parentArticle === void 0 || (_parentArticle$shelfP2 = parentArticle.shelfPlanner) === null || _parentArticle$shelfP2 === void 0 ? void 0 : _parentArticle$shelfP2.deleteAccessoireOfCellInGrid(gridIndex, cellIndex);
|
|
37519
37551
|
case 3:
|
|
37520
|
-
articeToDelete =
|
|
37552
|
+
articeToDelete = _context21.sent;
|
|
37521
37553
|
if (!articeToDelete) {
|
|
37522
|
-
|
|
37554
|
+
_context21.next = 9;
|
|
37523
37555
|
break;
|
|
37524
37556
|
}
|
|
37525
|
-
|
|
37557
|
+
_context21.next = 7;
|
|
37526
37558
|
return this.deleteElementFromSet(set, articeToDelete, false, undefined, dontReload);
|
|
37527
37559
|
case 7:
|
|
37528
|
-
|
|
37560
|
+
_context21.next = 9;
|
|
37529
37561
|
return parentArticle === null || parentArticle === void 0 || (_parentArticle$shelfP3 = parentArticle.shelfPlanner) === null || _parentArticle$shelfP3 === void 0 ? void 0 : _parentArticle$shelfP3.onConfigChanged({});
|
|
37530
37562
|
case 9:
|
|
37531
37563
|
case "end":
|
|
37532
|
-
return
|
|
37564
|
+
return _context21.stop();
|
|
37533
37565
|
}
|
|
37534
|
-
},
|
|
37566
|
+
}, _callee19, this);
|
|
37535
37567
|
}));
|
|
37536
|
-
function deleteAccessorieOnShelfPlanner(
|
|
37568
|
+
function deleteAccessorieOnShelfPlanner(_x65, _x66, _x67, _x68, _x69) {
|
|
37537
37569
|
return _deleteAccessorieOnShelfPlanner.apply(this, arguments);
|
|
37538
37570
|
}
|
|
37539
37571
|
return deleteAccessorieOnShelfPlanner;
|
|
@@ -37541,25 +37573,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37541
37573
|
}, {
|
|
37542
37574
|
key: "updatePlannerTrans",
|
|
37543
37575
|
value: function () {
|
|
37544
|
-
var _updatePlannerTrans = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
37576
|
+
var _updatePlannerTrans = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(set, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance) {
|
|
37545
37577
|
var updateConfig;
|
|
37546
|
-
return _regeneratorRuntime.wrap(function
|
|
37547
|
-
while (1) switch (
|
|
37578
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context22) {
|
|
37579
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
37548
37580
|
case 0:
|
|
37549
37581
|
updateConfig = set.plannerHandler.updatePlannerTrans(set.getSetId(), plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance);
|
|
37550
37582
|
if (!updateConfig) {
|
|
37551
|
-
|
|
37583
|
+
_context22.next = 4;
|
|
37552
37584
|
break;
|
|
37553
37585
|
}
|
|
37554
|
-
|
|
37586
|
+
_context22.next = 4;
|
|
37555
37587
|
return this.updateArticlesOptionStatesOfActSet(set, {}, [], true, 'initializingAfterTrans');
|
|
37556
37588
|
case 4:
|
|
37557
37589
|
case "end":
|
|
37558
|
-
return
|
|
37590
|
+
return _context22.stop();
|
|
37559
37591
|
}
|
|
37560
|
-
},
|
|
37592
|
+
}, _callee20, this);
|
|
37561
37593
|
}));
|
|
37562
|
-
function updatePlannerTrans(
|
|
37594
|
+
function updatePlannerTrans(_x70, _x71, _x72, _x73, _x74, _x75, _x76) {
|
|
37563
37595
|
return _updatePlannerTrans.apply(this, arguments);
|
|
37564
37596
|
}
|
|
37565
37597
|
return updatePlannerTrans;
|
|
@@ -37641,10 +37673,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37641
37673
|
}, {
|
|
37642
37674
|
key: "deleteAccessoire",
|
|
37643
37675
|
value: function () {
|
|
37644
|
-
var _deleteAccessoire = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
37676
|
+
var _deleteAccessoire = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(set, articleCodex, parentBasketId) {
|
|
37645
37677
|
var divaArticles, articlesToDelete, key, articleToDelete, maxQuantity, i;
|
|
37646
|
-
return _regeneratorRuntime.wrap(function
|
|
37647
|
-
while (1) switch (
|
|
37678
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context23) {
|
|
37679
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
37648
37680
|
case 0:
|
|
37649
37681
|
divaArticles = set.getDivaArticles();
|
|
37650
37682
|
articlesToDelete = [];
|
|
@@ -37656,7 +37688,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37656
37688
|
}
|
|
37657
37689
|
}
|
|
37658
37690
|
if (!(articlesToDelete.length > 0)) {
|
|
37659
|
-
|
|
37691
|
+
_context23.next = 17;
|
|
37660
37692
|
break;
|
|
37661
37693
|
}
|
|
37662
37694
|
articlesToDelete.sort(function (a, b) {
|
|
@@ -37670,27 +37702,27 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37670
37702
|
}
|
|
37671
37703
|
}
|
|
37672
37704
|
if (!(articleToDelete.quantity > 1)) {
|
|
37673
|
-
|
|
37705
|
+
_context23.next = 14;
|
|
37674
37706
|
break;
|
|
37675
37707
|
}
|
|
37676
|
-
|
|
37708
|
+
_context23.next = 11;
|
|
37677
37709
|
return articleHandlerInstance.updateAccessoireQuantity(articleToDelete, articleToDelete.quantity - 1);
|
|
37678
37710
|
case 11:
|
|
37679
|
-
return
|
|
37711
|
+
return _context23.abrupt("return", true);
|
|
37680
37712
|
case 14:
|
|
37681
|
-
|
|
37713
|
+
_context23.next = 16;
|
|
37682
37714
|
return this.deleteElementFromSet(articleToDelete.set, articleToDelete);
|
|
37683
37715
|
case 16:
|
|
37684
|
-
return
|
|
37716
|
+
return _context23.abrupt("return", _context23.sent);
|
|
37685
37717
|
case 17:
|
|
37686
|
-
return
|
|
37718
|
+
return _context23.abrupt("return", false);
|
|
37687
37719
|
case 18:
|
|
37688
37720
|
case "end":
|
|
37689
|
-
return
|
|
37721
|
+
return _context23.stop();
|
|
37690
37722
|
}
|
|
37691
|
-
},
|
|
37723
|
+
}, _callee21, this);
|
|
37692
37724
|
}));
|
|
37693
|
-
function deleteAccessoire(
|
|
37725
|
+
function deleteAccessoire(_x77, _x78, _x79) {
|
|
37694
37726
|
return _deleteAccessoire.apply(this, arguments);
|
|
37695
37727
|
}
|
|
37696
37728
|
return deleteAccessoire;
|
|
@@ -37867,19 +37899,19 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37867
37899
|
}, {
|
|
37868
37900
|
key: "configSingleIsChanged",
|
|
37869
37901
|
value: (function () {
|
|
37870
|
-
var _configSingleIsChanged = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
37902
|
+
var _configSingleIsChanged = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(set, newIsConfigSingle, groupedOptions, groupedArticles) {
|
|
37871
37903
|
var _set$getArticleByBask4, variantValues, key;
|
|
37872
|
-
return _regeneratorRuntime.wrap(function
|
|
37873
|
-
while (1) switch (
|
|
37904
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context24) {
|
|
37905
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
37874
37906
|
case 0:
|
|
37875
37907
|
set.configSingle = newIsConfigSingle;
|
|
37876
37908
|
if (!(!set.configSingle && !set.CatalogData.onConfigSingleDontGeneralize && groupedOptions && groupedArticles)) {
|
|
37877
|
-
|
|
37909
|
+
_context24.next = 7;
|
|
37878
37910
|
break;
|
|
37879
37911
|
}
|
|
37880
37912
|
variantValues = (_set$getArticleByBask4 = set.getArticleByBasketId(groupedArticles[0])) === null || _set$getArticleByBask4 === void 0 ? void 0 : _set$getArticleByBask4.VariantValues;
|
|
37881
37913
|
if (!variantValues) {
|
|
37882
|
-
|
|
37914
|
+
_context24.next = 7;
|
|
37883
37915
|
break;
|
|
37884
37916
|
}
|
|
37885
37917
|
for (key in variantValues) {
|
|
@@ -37887,15 +37919,15 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37887
37919
|
delete variantValues[key];
|
|
37888
37920
|
}
|
|
37889
37921
|
}
|
|
37890
|
-
|
|
37922
|
+
_context24.next = 7;
|
|
37891
37923
|
return this.updateArticlesOptionStatesOfActSet(set, variantValues, groupedArticles);
|
|
37892
37924
|
case 7:
|
|
37893
37925
|
case "end":
|
|
37894
|
-
return
|
|
37926
|
+
return _context24.stop();
|
|
37895
37927
|
}
|
|
37896
|
-
},
|
|
37928
|
+
}, _callee22, this);
|
|
37897
37929
|
}));
|
|
37898
|
-
function configSingleIsChanged(
|
|
37930
|
+
function configSingleIsChanged(_x80, _x81, _x82, _x83) {
|
|
37899
37931
|
return _configSingleIsChanged.apply(this, arguments);
|
|
37900
37932
|
}
|
|
37901
37933
|
return configSingleIsChanged;
|
|
@@ -37993,26 +38025,26 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
37993
38025
|
}, {
|
|
37994
38026
|
key: "loadConfigItemsOfActSetByConfigStepKey",
|
|
37995
38027
|
value: function () {
|
|
37996
|
-
var _loadConfigItemsOfActSetByConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
38028
|
+
var _loadConfigItemsOfActSetByConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(set, configStepKey, visible, hidePricePreview) {
|
|
37997
38029
|
var _configItems$option, _configItems$option2;
|
|
37998
38030
|
var configItems, paletteType, filterType, stepInfo, contentItemId;
|
|
37999
|
-
return _regeneratorRuntime.wrap(function
|
|
38000
|
-
while (1) switch (
|
|
38031
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context25) {
|
|
38032
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
38001
38033
|
case 0:
|
|
38002
|
-
|
|
38034
|
+
_context25.next = 2;
|
|
38003
38035
|
return configTreeHandler.getConifgItemsForView(set, configStepKey);
|
|
38004
38036
|
case 2:
|
|
38005
|
-
configItems =
|
|
38037
|
+
configItems = _context25.sent;
|
|
38006
38038
|
paletteType = set.configTree.getCurPaletteType(set, configStepKey);
|
|
38007
38039
|
configItems.configItems = this.removeDockingInfluencableconfigItems(set, configItems.configItems, configStepKey);
|
|
38008
|
-
|
|
38040
|
+
_context25.next = 7;
|
|
38009
38041
|
return this.variantsEvaluator(set, configItems.configItems, configStepKey, paletteType, hidePricePreview);
|
|
38010
38042
|
case 7:
|
|
38011
|
-
configItems.configItems =
|
|
38043
|
+
configItems.configItems = _context25.sent;
|
|
38012
38044
|
filterType = set.configTree.getCurFilterType(configStepKey, configItems.configItems);
|
|
38013
38045
|
stepInfo = set.configTree.getStepInfo(configStepKey);
|
|
38014
38046
|
contentItemId = (_configItems$option = configItems.option) === null || _configItems$option === void 0 ? void 0 : _configItems$option.contentItemId;
|
|
38015
|
-
return
|
|
38047
|
+
return _context25.abrupt("return", _objectSpread$a(_objectSpread$a(_objectSpread$a({
|
|
38016
38048
|
isRenderedNotInSettingPalette: set.configTree.isRenderedNotInSettingPalette(configStepKey),
|
|
38017
38049
|
isRenderedInAccessorieStep: set.configTree.isRenderedInAccessorieStep(configStepKey),
|
|
38018
38050
|
visible: set.configTree.getVisibility(configStepKey, visible, set.CatalogData)
|
|
@@ -38026,11 +38058,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38026
38058
|
}));
|
|
38027
38059
|
case 12:
|
|
38028
38060
|
case "end":
|
|
38029
|
-
return
|
|
38061
|
+
return _context25.stop();
|
|
38030
38062
|
}
|
|
38031
|
-
},
|
|
38063
|
+
}, _callee23, this);
|
|
38032
38064
|
}));
|
|
38033
|
-
function loadConfigItemsOfActSetByConfigStepKey(
|
|
38065
|
+
function loadConfigItemsOfActSetByConfigStepKey(_x84, _x85, _x86, _x87) {
|
|
38034
38066
|
return _loadConfigItemsOfActSetByConfigStepKey.apply(this, arguments);
|
|
38035
38067
|
}
|
|
38036
38068
|
return loadConfigItemsOfActSetByConfigStepKey;
|
|
@@ -38072,41 +38104,41 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38072
38104
|
}, {
|
|
38073
38105
|
key: "variantsEvaluator",
|
|
38074
38106
|
value: (function () {
|
|
38075
|
-
var _variantsEvaluator = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
38107
|
+
var _variantsEvaluator = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(set, configItems, configStepKey, paletteType, hidePricePreview) {
|
|
38076
38108
|
var _configItems$0$option, _set$api$ReturnToFrom, _set$CatalogData$show, _set$CatalogData$hide;
|
|
38077
38109
|
var opt, previewType, targetArticles, variants, pricesVisible;
|
|
38078
|
-
return _regeneratorRuntime.wrap(function
|
|
38079
|
-
while (1) switch (
|
|
38110
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context26) {
|
|
38111
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
38080
38112
|
case 0:
|
|
38081
38113
|
if (configItems[0]) {
|
|
38082
|
-
|
|
38114
|
+
_context26.next = 2;
|
|
38083
38115
|
break;
|
|
38084
38116
|
}
|
|
38085
|
-
return
|
|
38117
|
+
return _context26.abrupt("return", configItems);
|
|
38086
38118
|
case 2:
|
|
38087
38119
|
opt = set.CatalogData.getOption((_configItems$0$option = configItems[0].optionOcd) !== null && _configItems$0$option !== void 0 ? _configItems$0$option : configItems[0].op);
|
|
38088
38120
|
previewType = set.api.pricePreview;
|
|
38089
38121
|
if (!(!opt || opt.mergeIDMToOPG || configItems[0].isOPVG || opt.showOnSeparatTabgroup || set.PlannerMode === 'BoxPlanner' || ['TEXTBOX', 'NUMBERBOX', 'RANGE'].includes(paletteType) || (_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.includes('PRODUCTCREATOR'))) {
|
|
38090
|
-
|
|
38122
|
+
_context26.next = 6;
|
|
38091
38123
|
break;
|
|
38092
38124
|
}
|
|
38093
|
-
return
|
|
38125
|
+
return _context26.abrupt("return", configItems);
|
|
38094
38126
|
case 6:
|
|
38095
38127
|
if (!(!previewType || previewType == 'off' || configItems.length == 1 || opt.isDescribingState || configItems.length > 300 && !configItems[0].groupName || (_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length && !set.CatalogData.showPricePreviewOnlyOnOptions.includes(opt.codex.substring(3)) || (_set$CatalogData$hide = set.CatalogData.hidePricePreviewOnlyOnOptions) !== null && _set$CatalogData$hide !== void 0 && _set$CatalogData$hide.length && set.CatalogData.hidePricePreviewOnlyOnOptions.includes(opt.codex.substring(3)) || hidePricePreview)) {
|
|
38096
|
-
|
|
38128
|
+
_context26.next = 9;
|
|
38097
38129
|
break;
|
|
38098
38130
|
}
|
|
38099
38131
|
if (set.logTotalStateForVariants) {
|
|
38100
|
-
|
|
38132
|
+
_context26.next = 9;
|
|
38101
38133
|
break;
|
|
38102
38134
|
}
|
|
38103
|
-
return
|
|
38135
|
+
return _context26.abrupt("return", configItems);
|
|
38104
38136
|
case 9:
|
|
38105
38137
|
targetArticles = set.configTree.getTargetArticles(configStepKey);
|
|
38106
|
-
|
|
38138
|
+
_context26.next = 12;
|
|
38107
38139
|
return this.calcVariants(set, configItems, targetArticles, opt.codex);
|
|
38108
38140
|
case 12:
|
|
38109
|
-
variants =
|
|
38141
|
+
variants = _context26.sent;
|
|
38110
38142
|
if (previewType) {
|
|
38111
38143
|
pricesVisible = this.checkIfPriceDiffers(variants);
|
|
38112
38144
|
configItems.map(function (c, index) {
|
|
@@ -38116,14 +38148,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38116
38148
|
};
|
|
38117
38149
|
});
|
|
38118
38150
|
}
|
|
38119
|
-
return
|
|
38151
|
+
return _context26.abrupt("return", configItems);
|
|
38120
38152
|
case 15:
|
|
38121
38153
|
case "end":
|
|
38122
|
-
return
|
|
38154
|
+
return _context26.stop();
|
|
38123
38155
|
}
|
|
38124
|
-
},
|
|
38156
|
+
}, _callee24, this);
|
|
38125
38157
|
}));
|
|
38126
|
-
function variantsEvaluator(
|
|
38158
|
+
function variantsEvaluator(_x88, _x89, _x90, _x91, _x92) {
|
|
38127
38159
|
return _variantsEvaluator.apply(this, arguments);
|
|
38128
38160
|
}
|
|
38129
38161
|
return variantsEvaluator;
|
|
@@ -38131,10 +38163,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38131
38163
|
}, {
|
|
38132
38164
|
key: "calcVariants",
|
|
38133
38165
|
value: function () {
|
|
38134
|
-
var _calcVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
38166
|
+
var _calcVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(realSet, configItems, targetArticles, optionCodex) {
|
|
38135
38167
|
var variantInfo, set, articles, origPrice, articleConfigs, i, basketId, totalConfig, key, parentNames, _i5, configItem, _ref, _ref2;
|
|
38136
|
-
return _regeneratorRuntime.wrap(function
|
|
38137
|
-
while (1) switch (
|
|
38168
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context27) {
|
|
38169
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
38138
38170
|
case 0:
|
|
38139
38171
|
variantInfo = [];
|
|
38140
38172
|
set = realSet.cloneSet();
|
|
@@ -38144,15 +38176,15 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38144
38176
|
i = 0;
|
|
38145
38177
|
case 6:
|
|
38146
38178
|
if (!(i < targetArticles.length)) {
|
|
38147
|
-
|
|
38179
|
+
_context27.next = 14;
|
|
38148
38180
|
break;
|
|
38149
38181
|
}
|
|
38150
38182
|
basketId = targetArticles[i];
|
|
38151
38183
|
if (articles[basketId]) {
|
|
38152
|
-
|
|
38184
|
+
_context27.next = 10;
|
|
38153
38185
|
break;
|
|
38154
38186
|
}
|
|
38155
|
-
return
|
|
38187
|
+
return _context27.abrupt("continue", 11);
|
|
38156
38188
|
case 10:
|
|
38157
38189
|
articleConfigs[basketId] = {
|
|
38158
38190
|
config: articles[basketId].VisibleVariantValues,
|
|
@@ -38160,7 +38192,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38160
38192
|
};
|
|
38161
38193
|
case 11:
|
|
38162
38194
|
i++;
|
|
38163
|
-
|
|
38195
|
+
_context27.next = 6;
|
|
38164
38196
|
break;
|
|
38165
38197
|
case 14:
|
|
38166
38198
|
totalConfig = {};
|
|
@@ -38174,37 +38206,37 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38174
38206
|
_i5 = 0;
|
|
38175
38207
|
case 18:
|
|
38176
38208
|
if (!(_i5 < configItems.length)) {
|
|
38177
|
-
|
|
38209
|
+
_context27.next = 31;
|
|
38178
38210
|
break;
|
|
38179
38211
|
}
|
|
38180
38212
|
configItem = configItems[_i5];
|
|
38181
38213
|
if (!(configItem.isParentOPVG || configItem.idmOpgValCodex)) {
|
|
38182
|
-
|
|
38214
|
+
_context27.next = 27;
|
|
38183
38215
|
break;
|
|
38184
38216
|
}
|
|
38185
38217
|
if (!parentNames.includes((_ref = configItem.isParentOPVG ? configItem.parentName : configItem.idmOpgValCodex) !== null && _ref !== void 0 ? _ref : '')) {
|
|
38186
|
-
|
|
38218
|
+
_context27.next = 26;
|
|
38187
38219
|
break;
|
|
38188
38220
|
}
|
|
38189
38221
|
variantInfo.push(variantInfo[_i5 - 1]);
|
|
38190
|
-
return
|
|
38222
|
+
return _context27.abrupt("continue", 28);
|
|
38191
38223
|
case 26:
|
|
38192
38224
|
parentNames.push((_ref2 = configItem.isParentOPVG ? configItem.parentName : configItem.idmOpgValCodex) !== null && _ref2 !== void 0 ? _ref2 : '');
|
|
38193
38225
|
case 27:
|
|
38194
38226
|
variantInfo.push(this.getVariant(set, configItem, articleConfigs, totalConfig, targetArticles, optionCodex, origPrice, _i5, variantInfo[_i5 - 1]));
|
|
38195
38227
|
case 28:
|
|
38196
38228
|
_i5++;
|
|
38197
|
-
|
|
38229
|
+
_context27.next = 18;
|
|
38198
38230
|
break;
|
|
38199
38231
|
case 31:
|
|
38200
|
-
return
|
|
38232
|
+
return _context27.abrupt("return", variantInfo);
|
|
38201
38233
|
case 32:
|
|
38202
38234
|
case "end":
|
|
38203
|
-
return
|
|
38235
|
+
return _context27.stop();
|
|
38204
38236
|
}
|
|
38205
|
-
},
|
|
38237
|
+
}, _callee25, this);
|
|
38206
38238
|
}));
|
|
38207
|
-
function calcVariants(
|
|
38239
|
+
function calcVariants(_x93, _x94, _x95, _x96) {
|
|
38208
38240
|
return _calcVariants.apply(this, arguments);
|
|
38209
38241
|
}
|
|
38210
38242
|
return calcVariants;
|
|
@@ -38212,32 +38244,32 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38212
38244
|
}, {
|
|
38213
38245
|
key: "getVariant",
|
|
38214
38246
|
value: function () {
|
|
38215
|
-
var _getVariant = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
38247
|
+
var _getVariant = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(set, item, origConfigs, totalConfig, targetArticles, optionCodex, origPrice, index, previousPromise) {
|
|
38216
38248
|
var firstPrice, prevProm, startTime, doUseConfigs, hashVariantValues, variantValues, i, basketId, origConfig, key, hash, dataHash, _i6, endTime, calcTime, price, priceObj;
|
|
38217
|
-
return _regeneratorRuntime.wrap(function
|
|
38218
|
-
while (1) switch (
|
|
38249
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context28) {
|
|
38250
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
38219
38251
|
case 0:
|
|
38220
38252
|
firstPrice = undefined;
|
|
38221
38253
|
prevProm = undefined;
|
|
38222
38254
|
if (!previousPromise) {
|
|
38223
|
-
|
|
38255
|
+
_context28.next = 9;
|
|
38224
38256
|
break;
|
|
38225
38257
|
}
|
|
38226
|
-
|
|
38258
|
+
_context28.next = 5;
|
|
38227
38259
|
return previousPromise;
|
|
38228
38260
|
case 5:
|
|
38229
|
-
prevProm =
|
|
38261
|
+
prevProm = _context28.sent;
|
|
38230
38262
|
firstPrice = prevProm.firstPrice;
|
|
38231
|
-
|
|
38263
|
+
_context28.next = 10;
|
|
38232
38264
|
break;
|
|
38233
38265
|
case 9:
|
|
38234
38266
|
firstPrice = set.getSetPrice();
|
|
38235
38267
|
case 10:
|
|
38236
38268
|
if (!(index == 0)) {
|
|
38237
|
-
|
|
38269
|
+
_context28.next = 13;
|
|
38238
38270
|
break;
|
|
38239
38271
|
}
|
|
38240
|
-
|
|
38272
|
+
_context28.next = 13;
|
|
38241
38273
|
return DivaUtils.Sleep(item.idmOpgOptionCodex ? 200 : 50);
|
|
38242
38274
|
case 13:
|
|
38243
38275
|
startTime = new Date();
|
|
@@ -38268,11 +38300,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38268
38300
|
hash = md5(JSON.stringify([].concat(hashVariantValues, _toConsumableArray(Object.values(totalConfig)))));
|
|
38269
38301
|
dataHash = set.CatalogData.getVariantsPriceByHash(hash);
|
|
38270
38302
|
if (!(dataHash && (!set.logTotalStateForVariants || dataHash.articleSnapshot))) {
|
|
38271
|
-
|
|
38303
|
+
_context28.next = 24;
|
|
38272
38304
|
break;
|
|
38273
38305
|
}
|
|
38274
38306
|
LOG$9.debug('calcingVariant from Option:' + optionCodex + ' and index: ' + index + ' hash hit!', dataHash, [].concat(hashVariantValues, _toConsumableArray(Object.values(totalConfig))), targetArticles);
|
|
38275
|
-
return
|
|
38307
|
+
return _context28.abrupt("return", _objectSpread$a(_objectSpread$a({}, dataHash), {}, {
|
|
38276
38308
|
origPrice: origPrice,
|
|
38277
38309
|
firstPrice: firstPrice
|
|
38278
38310
|
}));
|
|
@@ -38280,14 +38312,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38280
38312
|
_i6 = 0;
|
|
38281
38313
|
case 25:
|
|
38282
38314
|
if (!(_i6 < variantValues.length)) {
|
|
38283
|
-
|
|
38315
|
+
_context28.next = 31;
|
|
38284
38316
|
break;
|
|
38285
38317
|
}
|
|
38286
|
-
|
|
38318
|
+
_context28.next = 28;
|
|
38287
38319
|
return this.updateArticlesOptionStatesOfActSet(set, variantValues[_i6], [targetArticles[_i6]], true, 'calcVariant');
|
|
38288
38320
|
case 28:
|
|
38289
38321
|
_i6++;
|
|
38290
|
-
|
|
38322
|
+
_context28.next = 25;
|
|
38291
38323
|
break;
|
|
38292
38324
|
case 31:
|
|
38293
38325
|
endTime = new Date();
|
|
@@ -38306,14 +38338,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38306
38338
|
articleSnapshot: set.logTotalStateForVariants ? set.cloneSet().getDivaArticles() : undefined
|
|
38307
38339
|
};
|
|
38308
38340
|
set.CatalogData.setVariantsPriceByHash(hash, priceObj);
|
|
38309
|
-
return
|
|
38341
|
+
return _context28.abrupt("return", priceObj);
|
|
38310
38342
|
case 38:
|
|
38311
38343
|
case "end":
|
|
38312
|
-
return
|
|
38344
|
+
return _context28.stop();
|
|
38313
38345
|
}
|
|
38314
|
-
},
|
|
38346
|
+
}, _callee26, this);
|
|
38315
38347
|
}));
|
|
38316
|
-
function getVariant(
|
|
38348
|
+
function getVariant(_x97, _x98, _x99, _x100, _x101, _x102, _x103, _x104, _x105) {
|
|
38317
38349
|
return _getVariant.apply(this, arguments);
|
|
38318
38350
|
}
|
|
38319
38351
|
return getVariant;
|
|
@@ -38321,53 +38353,53 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38321
38353
|
}, {
|
|
38322
38354
|
key: "checkIfPriceDiffers",
|
|
38323
38355
|
value: function () {
|
|
38324
|
-
var _checkIfPriceDiffers = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
38356
|
+
var _checkIfPriceDiffers = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(promises) {
|
|
38325
38357
|
var results, i, price, j;
|
|
38326
|
-
return _regeneratorRuntime.wrap(function
|
|
38327
|
-
while (1) switch (
|
|
38358
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context29) {
|
|
38359
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
38328
38360
|
case 0:
|
|
38329
38361
|
results = [];
|
|
38330
38362
|
i = 0;
|
|
38331
38363
|
case 2:
|
|
38332
38364
|
if (!(i < promises.length)) {
|
|
38333
|
-
|
|
38365
|
+
_context29.next = 19;
|
|
38334
38366
|
break;
|
|
38335
38367
|
}
|
|
38336
|
-
|
|
38337
|
-
|
|
38368
|
+
_context29.t0 = results;
|
|
38369
|
+
_context29.next = 6;
|
|
38338
38370
|
return promises[i];
|
|
38339
38371
|
case 6:
|
|
38340
|
-
|
|
38341
|
-
|
|
38372
|
+
_context29.t1 = _context29.sent;
|
|
38373
|
+
_context29.t0.push.call(_context29.t0, _context29.t1);
|
|
38342
38374
|
price = results[0].price;
|
|
38343
38375
|
j = 1;
|
|
38344
38376
|
case 10:
|
|
38345
38377
|
if (!(j < results.length)) {
|
|
38346
|
-
|
|
38378
|
+
_context29.next = 16;
|
|
38347
38379
|
break;
|
|
38348
38380
|
}
|
|
38349
38381
|
if (!(price !== results[j].price)) {
|
|
38350
|
-
|
|
38382
|
+
_context29.next = 13;
|
|
38351
38383
|
break;
|
|
38352
38384
|
}
|
|
38353
|
-
return
|
|
38385
|
+
return _context29.abrupt("return", true);
|
|
38354
38386
|
case 13:
|
|
38355
38387
|
j++;
|
|
38356
|
-
|
|
38388
|
+
_context29.next = 10;
|
|
38357
38389
|
break;
|
|
38358
38390
|
case 16:
|
|
38359
38391
|
i++;
|
|
38360
|
-
|
|
38392
|
+
_context29.next = 2;
|
|
38361
38393
|
break;
|
|
38362
38394
|
case 19:
|
|
38363
|
-
return
|
|
38395
|
+
return _context29.abrupt("return", false);
|
|
38364
38396
|
case 20:
|
|
38365
38397
|
case "end":
|
|
38366
|
-
return
|
|
38398
|
+
return _context29.stop();
|
|
38367
38399
|
}
|
|
38368
|
-
},
|
|
38400
|
+
}, _callee27);
|
|
38369
38401
|
}));
|
|
38370
|
-
function checkIfPriceDiffers(
|
|
38402
|
+
function checkIfPriceDiffers(_x106) {
|
|
38371
38403
|
return _checkIfPriceDiffers.apply(this, arguments);
|
|
38372
38404
|
}
|
|
38373
38405
|
return checkIfPriceDiffers;
|
|
@@ -38381,11 +38413,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38381
38413
|
}, {
|
|
38382
38414
|
key: "updateArticlesOptionStatesOfActSet",
|
|
38383
38415
|
value: (function () {
|
|
38384
|
-
var _updateArticlesOptionStatesOfActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
38416
|
+
var _updateArticlesOptionStatesOfActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(set, myValues, targetArticlesWithNewValues, ignorePlanner, from, partlistDiff) {
|
|
38385
38417
|
var _resultPlannerUpdate;
|
|
38386
38418
|
var elementsToDeleteById, targetArticlesToUpdateOnly, retValues, diff, resultPlannerUpdate, targetElementIds, i, articleToDel, index, result, articleCopyRelation, newArticle, rpu, copyIndex;
|
|
38387
|
-
return _regeneratorRuntime.wrap(function
|
|
38388
|
-
while (1) switch (
|
|
38419
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context30) {
|
|
38420
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
38389
38421
|
case 0:
|
|
38390
38422
|
elementsToDeleteById = [];
|
|
38391
38423
|
targetArticlesToUpdateOnly = [];
|
|
@@ -38397,50 +38429,50 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38397
38429
|
} else {
|
|
38398
38430
|
targetArticlesToUpdateOnly = targetArticlesWithNewValues;
|
|
38399
38431
|
}
|
|
38400
|
-
|
|
38432
|
+
_context30.next = 5;
|
|
38401
38433
|
return articleHandlerInstance.updateArticlesOptionStates(myValues, targetArticlesWithNewValues, targetArticlesToUpdateOnly, set.getDivaArticles(true), from);
|
|
38402
38434
|
case 5:
|
|
38403
|
-
retValues =
|
|
38435
|
+
retValues = _context30.sent;
|
|
38404
38436
|
targetArticlesWithNewValues = retValues.targetArticlesToUpdate;
|
|
38405
38437
|
if (!(retValues.partlistArticlesToLoad.length > 0)) {
|
|
38406
|
-
|
|
38438
|
+
_context30.next = 16;
|
|
38407
38439
|
break;
|
|
38408
38440
|
}
|
|
38409
38441
|
diff = targetArticlesToUpdateOnly.length - Object.keys(set.getDivaArticles()).length;
|
|
38410
38442
|
if (!(diff == 0 || partlistDiff == diff)) {
|
|
38411
|
-
|
|
38443
|
+
_context30.next = 14;
|
|
38412
38444
|
break;
|
|
38413
38445
|
}
|
|
38414
|
-
|
|
38446
|
+
_context30.next = 12;
|
|
38415
38447
|
return articleHandlerInstance.correctPartlistArticlesByGlobalRules(set, retValues.partlistArticlesToLoad, set.CatalogData.bundleRules, {
|
|
38416
38448
|
doChange: false
|
|
38417
38449
|
});
|
|
38418
38450
|
case 12:
|
|
38419
|
-
|
|
38451
|
+
_context30.next = 16;
|
|
38420
38452
|
break;
|
|
38421
38453
|
case 14:
|
|
38422
|
-
|
|
38454
|
+
_context30.next = 16;
|
|
38423
38455
|
return this.updateArticlesOptionStatesOfActSet(set, {}, targetArticlesWithNewValues, ignorePlanner, from, diff);
|
|
38424
38456
|
case 16:
|
|
38425
38457
|
if (!(from !== 'initializingPartlist')) {
|
|
38426
|
-
|
|
38458
|
+
_context30.next = 19;
|
|
38427
38459
|
break;
|
|
38428
38460
|
}
|
|
38429
|
-
|
|
38461
|
+
_context30.next = 19;
|
|
38430
38462
|
return this.updateEdoArticles(set, retValues.newEDOExtraArticles);
|
|
38431
38463
|
case 19:
|
|
38432
38464
|
if (set.CatalogData.hasAlternateRenderings) set.CatalogData.updateAlternativeRenderings(set.getDivaArticles());
|
|
38433
38465
|
|
|
38434
38466
|
//Update Planner - check if planner data changed
|
|
38435
38467
|
if (!(!ignorePlanner && from != 'calcVariant')) {
|
|
38436
|
-
|
|
38468
|
+
_context30.next = 58;
|
|
38437
38469
|
break;
|
|
38438
38470
|
}
|
|
38439
38471
|
targetElementIds = this.getElementIdsOfArticles(set, targetArticlesWithNewValues);
|
|
38440
|
-
|
|
38472
|
+
_context30.next = 24;
|
|
38441
38473
|
return set.plannerHandler.updatePlanner(set.getSetId(), myValues, targetElementIds);
|
|
38442
38474
|
case 24:
|
|
38443
|
-
resultPlannerUpdate =
|
|
38475
|
+
resultPlannerUpdate = _context30.sent;
|
|
38444
38476
|
elementsToDeleteById = resultPlannerUpdate.elemIdsToDelete;
|
|
38445
38477
|
for (i = 0; i < resultPlannerUpdate.elemIdsToDelete.length; i++) {
|
|
38446
38478
|
articleToDel = set.getArticleByElementId(resultPlannerUpdate.elemIdsToDelete[i]);
|
|
@@ -38450,35 +38482,35 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38450
38482
|
}
|
|
38451
38483
|
}
|
|
38452
38484
|
if (!resultPlannerUpdate.doDeleteBackGrid) {
|
|
38453
|
-
|
|
38485
|
+
_context30.next = 34;
|
|
38454
38486
|
break;
|
|
38455
38487
|
}
|
|
38456
|
-
|
|
38488
|
+
_context30.next = 30;
|
|
38457
38489
|
return this.deleteElementFromSetByElemId(set, resultPlannerUpdate.elemIdsToDelete[0], false, resultPlannerUpdate.deletionType);
|
|
38458
38490
|
case 30:
|
|
38459
|
-
result =
|
|
38491
|
+
result = _context30.sent;
|
|
38460
38492
|
//Others are deleted recursive
|
|
38461
38493
|
if (result.selectElementId) {
|
|
38462
38494
|
resultPlannerUpdate.elementIdsToUpdateSelection = [result.selectElementId];
|
|
38463
38495
|
}
|
|
38464
|
-
|
|
38496
|
+
_context30.next = 41;
|
|
38465
38497
|
break;
|
|
38466
38498
|
case 34:
|
|
38467
38499
|
i = 0;
|
|
38468
38500
|
case 35:
|
|
38469
38501
|
if (!(i < resultPlannerUpdate.elemIdsToDelete.length)) {
|
|
38470
|
-
|
|
38502
|
+
_context30.next = 41;
|
|
38471
38503
|
break;
|
|
38472
38504
|
}
|
|
38473
|
-
|
|
38505
|
+
_context30.next = 38;
|
|
38474
38506
|
return this.deleteElementFromSetByElemId(set, resultPlannerUpdate.elemIdsToDelete[i], false, resultPlannerUpdate.deletionType);
|
|
38475
38507
|
case 38:
|
|
38476
38508
|
i++;
|
|
38477
|
-
|
|
38509
|
+
_context30.next = 35;
|
|
38478
38510
|
break;
|
|
38479
38511
|
case 41:
|
|
38480
38512
|
if (!(resultPlannerUpdate.elementIdToCopy && resultPlannerUpdate.elementIdToCopy.length > 0)) {
|
|
38481
|
-
|
|
38513
|
+
_context30.next = 57;
|
|
38482
38514
|
break;
|
|
38483
38515
|
}
|
|
38484
38516
|
//Todo copy these elements
|
|
@@ -38486,17 +38518,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38486
38518
|
i = 0;
|
|
38487
38519
|
case 44:
|
|
38488
38520
|
if (!(i < resultPlannerUpdate.elementIdToCopy.length)) {
|
|
38489
|
-
|
|
38521
|
+
_context30.next = 52;
|
|
38490
38522
|
break;
|
|
38491
38523
|
}
|
|
38492
|
-
|
|
38524
|
+
_context30.next = 47;
|
|
38493
38525
|
return this.copyArticleByElementId(set, resultPlannerUpdate.elementIdToCopy[i], resultPlannerUpdate.ignoreOptionsToCopy);
|
|
38494
38526
|
case 47:
|
|
38495
|
-
newArticle =
|
|
38527
|
+
newArticle = _context30.sent;
|
|
38496
38528
|
articleCopyRelation.set(resultPlannerUpdate.elementIdToCopy[i], newArticle.basketId);
|
|
38497
38529
|
case 49:
|
|
38498
38530
|
i++;
|
|
38499
|
-
|
|
38531
|
+
_context30.next = 44;
|
|
38500
38532
|
break;
|
|
38501
38533
|
case 52:
|
|
38502
38534
|
rpu = resultPlannerUpdate;
|
|
@@ -38506,10 +38538,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38506
38538
|
z: rpu.copyType == 'BoxPlanner_backside' ? -1 : 0
|
|
38507
38539
|
};
|
|
38508
38540
|
if (!(resultPlannerUpdate.copyType == 'BoxPlanner_backside')) {
|
|
38509
|
-
|
|
38541
|
+
_context30.next = 57;
|
|
38510
38542
|
break;
|
|
38511
38543
|
}
|
|
38512
|
-
|
|
38544
|
+
_context30.next = 57;
|
|
38513
38545
|
return set.plannerHandler.copyPlannerElements(set.getSetId(), articleCopyRelation, {
|
|
38514
38546
|
copyIndex: copyIndex,
|
|
38515
38547
|
copyType: resultPlannerUpdate.copyType,
|
|
@@ -38519,18 +38551,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38519
38551
|
case 57:
|
|
38520
38552
|
this.updatePosNrOfAccessoiresOfTargetArticles(set, targetArticlesWithNewValues);
|
|
38521
38553
|
case 58:
|
|
38522
|
-
return
|
|
38554
|
+
return _context30.abrupt("return", {
|
|
38523
38555
|
articleCountChanged: elementsToDeleteById.length > 0,
|
|
38524
38556
|
elementIdsToUpdateSelection: (_resultPlannerUpdate = resultPlannerUpdate) === null || _resultPlannerUpdate === void 0 ? void 0 : _resultPlannerUpdate.elementIdsToUpdateSelection,
|
|
38525
38557
|
setId: set.getSetId()
|
|
38526
38558
|
});
|
|
38527
38559
|
case 59:
|
|
38528
38560
|
case "end":
|
|
38529
|
-
return
|
|
38561
|
+
return _context30.stop();
|
|
38530
38562
|
}
|
|
38531
|
-
},
|
|
38563
|
+
}, _callee28, this);
|
|
38532
38564
|
}));
|
|
38533
|
-
function updateArticlesOptionStatesOfActSet(
|
|
38565
|
+
function updateArticlesOptionStatesOfActSet(_x107, _x108, _x109, _x110, _x111, _x112) {
|
|
38534
38566
|
return _updateArticlesOptionStatesOfActSet.apply(this, arguments);
|
|
38535
38567
|
}
|
|
38536
38568
|
return updateArticlesOptionStatesOfActSet;
|
|
@@ -38567,32 +38599,32 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38567
38599
|
}, {
|
|
38568
38600
|
key: "updateEdoArticles",
|
|
38569
38601
|
value: function () {
|
|
38570
|
-
var _updateEdoArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
38602
|
+
var _updateEdoArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(set, edoArticlesToLoad) {
|
|
38571
38603
|
var oldBasketIds, i, article, newArticles, _i7, _i8;
|
|
38572
|
-
return _regeneratorRuntime.wrap(function
|
|
38573
|
-
while (1) switch (
|
|
38604
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context31) {
|
|
38605
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
38574
38606
|
case 0:
|
|
38575
38607
|
if (!(set.edoExtraArticles.length > 0 || edoArticlesToLoad.length > 0)) {
|
|
38576
|
-
|
|
38608
|
+
_context31.next = 22;
|
|
38577
38609
|
break;
|
|
38578
38610
|
}
|
|
38579
38611
|
oldBasketIds = _toConsumableArray(set.edoExtraArticles);
|
|
38580
38612
|
i = 0;
|
|
38581
38613
|
case 3:
|
|
38582
38614
|
if (!(i < set.edoExtraArticles.length)) {
|
|
38583
|
-
|
|
38615
|
+
_context31.next = 11;
|
|
38584
38616
|
break;
|
|
38585
38617
|
}
|
|
38586
38618
|
article = set.getArticleByBasketId(set.edoExtraArticles[i]);
|
|
38587
38619
|
if (!article) {
|
|
38588
|
-
|
|
38620
|
+
_context31.next = 8;
|
|
38589
38621
|
break;
|
|
38590
38622
|
}
|
|
38591
|
-
|
|
38623
|
+
_context31.next = 8;
|
|
38592
38624
|
return this.deleteElementFromSet(set, article);
|
|
38593
38625
|
case 8:
|
|
38594
38626
|
i++;
|
|
38595
|
-
|
|
38627
|
+
_context31.next = 3;
|
|
38596
38628
|
break;
|
|
38597
38629
|
case 11:
|
|
38598
38630
|
set.edoExtraArticles = [];
|
|
@@ -38600,18 +38632,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38600
38632
|
_i7 = 0;
|
|
38601
38633
|
case 14:
|
|
38602
38634
|
if (!(_i7 < edoArticlesToLoad.length)) {
|
|
38603
|
-
|
|
38635
|
+
_context31.next = 21;
|
|
38604
38636
|
break;
|
|
38605
38637
|
}
|
|
38606
|
-
|
|
38638
|
+
_context31.next = 17;
|
|
38607
38639
|
return this.addArticleToActSet(set, edoArticlesToLoad[_i7].ArticleCodex, _objectSpread$a(_objectSpread$a({}, edoArticlesToLoad[_i7]), {}, {
|
|
38608
38640
|
basketId: oldBasketIds[_i7]
|
|
38609
38641
|
}), true);
|
|
38610
38642
|
case 17:
|
|
38611
|
-
newArticles[_i7] =
|
|
38643
|
+
newArticles[_i7] = _context31.sent;
|
|
38612
38644
|
case 18:
|
|
38613
38645
|
_i7++;
|
|
38614
|
-
|
|
38646
|
+
_context31.next = 14;
|
|
38615
38647
|
break;
|
|
38616
38648
|
case 21:
|
|
38617
38649
|
for (_i8 = 0; _i8 < newArticles.length; _i8++) {
|
|
@@ -38619,11 +38651,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38619
38651
|
}
|
|
38620
38652
|
case 22:
|
|
38621
38653
|
case "end":
|
|
38622
|
-
return
|
|
38654
|
+
return _context31.stop();
|
|
38623
38655
|
}
|
|
38624
|
-
},
|
|
38656
|
+
}, _callee29, this);
|
|
38625
38657
|
}));
|
|
38626
|
-
function updateEdoArticles(
|
|
38658
|
+
function updateEdoArticles(_x113, _x114) {
|
|
38627
38659
|
return _updateEdoArticles.apply(this, arguments);
|
|
38628
38660
|
}
|
|
38629
38661
|
return updateEdoArticles;
|
|
@@ -38789,11 +38821,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38789
38821
|
}, {
|
|
38790
38822
|
key: "fillOrderLinesAndOrderSets",
|
|
38791
38823
|
value: function () {
|
|
38792
|
-
var _fillOrderLinesAndOrderSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
38824
|
+
var _fillOrderLinesAndOrderSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(sets, divaBasketHandler, repairOnly, setPlanner, returnTo) {
|
|
38793
38825
|
var _set$getMatchingProdu2, _set$getMatchingProdu3;
|
|
38794
38826
|
var orderSets, basketData, set, _set$getMatchingProdu, key, _set$basketConfigVari, _OrderLinesOfActSet$, _set, catalogData, articles, newOrderSet, customDimensions, OrderLinesOfActSet, ret, _key2, i, _basketData$OrderSets, _basketData$SetPlanne, oderSetsIsInActPlanning, setId, j;
|
|
38795
|
-
return _regeneratorRuntime.wrap(function
|
|
38796
|
-
while (1) switch (
|
|
38827
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context32) {
|
|
38828
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
38797
38829
|
case 0:
|
|
38798
38830
|
orderSets = [];
|
|
38799
38831
|
basketData = divaBasketHandler.actBasket;
|
|
@@ -38805,32 +38837,32 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38805
38837
|
}
|
|
38806
38838
|
basketData.MatchingProductId = set === null || set === void 0 || (_set$getMatchingProdu2 = set.getMatchingProduct()) === null || _set$getMatchingProdu2 === void 0 ? void 0 : _set$getMatchingProdu2._id;
|
|
38807
38839
|
basketData.MatchingProductRetailerArticleNr = set === null || set === void 0 || (_set$getMatchingProdu3 = set.getMatchingProduct()) === null || _set$getMatchingProdu3 === void 0 || (_set$getMatchingProdu3 = _set$getMatchingProdu3.retailerArticleNr) === null || _set$getMatchingProdu3 === void 0 ? void 0 : _set$getMatchingProdu3.toString();
|
|
38808
|
-
|
|
38840
|
+
_context32.t0 = _regeneratorRuntime.keys(sets);
|
|
38809
38841
|
case 8:
|
|
38810
|
-
if ((
|
|
38811
|
-
|
|
38842
|
+
if ((_context32.t1 = _context32.t0()).done) {
|
|
38843
|
+
_context32.next = 32;
|
|
38812
38844
|
break;
|
|
38813
38845
|
}
|
|
38814
|
-
key =
|
|
38846
|
+
key = _context32.t1.value;
|
|
38815
38847
|
_set = sets[key];
|
|
38816
38848
|
catalogData = _set.CatalogData;
|
|
38817
38849
|
articles = _set.getDivaArticles();
|
|
38818
|
-
|
|
38850
|
+
_context32.next = 15;
|
|
38819
38851
|
return this.getOrderSet(_set, catalogData, divaBasketHandler.actDivaNr, repairOnly, returnTo);
|
|
38820
38852
|
case 15:
|
|
38821
|
-
newOrderSet =
|
|
38853
|
+
newOrderSet = _context32.sent;
|
|
38822
38854
|
basketData.setIsPlanning(_set.SetType == 'PLANNING' ? '1' : '0');
|
|
38823
|
-
|
|
38855
|
+
_context32.next = 19;
|
|
38824
38856
|
return _set.getCustomDimensionsOfActSet();
|
|
38825
38857
|
case 19:
|
|
38826
|
-
customDimensions =
|
|
38858
|
+
customDimensions = _context32.sent;
|
|
38827
38859
|
OrderLinesOfActSet = articleHandlerInstance.getOrderLinesOfArticles(articles, customDimensions, repairOnly, !!((_set$basketConfigVari = _set.basketConfigVariants) !== null && _set$basketConfigVari !== void 0 && _set$basketConfigVari.length));
|
|
38828
38860
|
articleHandlerInstance.checkForRoundingError(OrderLinesOfActSet, _set);
|
|
38829
38861
|
if (OrderLinesOfActSet.length) {
|
|
38830
|
-
|
|
38862
|
+
_context32.next = 24;
|
|
38831
38863
|
break;
|
|
38832
38864
|
}
|
|
38833
|
-
return
|
|
38865
|
+
return _context32.abrupt("continue", 8);
|
|
38834
38866
|
case 24:
|
|
38835
38867
|
OrderLinesOfActSet = divaBasketHandler.divaWWSHandler.repairWWSFlags(articles, OrderLinesOfActSet);
|
|
38836
38868
|
if (newOrderSet.SetImage == '' && (_OrderLinesOfActSet$ = OrderLinesOfActSet[0]) !== null && _OrderLinesOfActSet$ !== void 0 && _OrderLinesOfActSet$.Image && _set.PlannerMode == 'No') {
|
|
@@ -38852,7 +38884,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38852
38884
|
}
|
|
38853
38885
|
newOrderSet.setOrderLines(OrderLinesOfActSet);
|
|
38854
38886
|
orderSets.push(newOrderSet);
|
|
38855
|
-
|
|
38887
|
+
_context32.next = 8;
|
|
38856
38888
|
break;
|
|
38857
38889
|
case 32:
|
|
38858
38890
|
//fill diva3DProject for renderings & AR Converter
|
|
@@ -38860,7 +38892,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38860
38892
|
i = 0;
|
|
38861
38893
|
case 34:
|
|
38862
38894
|
if (!(i < ((_basketData$OrderSets = basketData.OrderSets) === null || _basketData$OrderSets === void 0 ? void 0 : _basketData$OrderSets.length))) {
|
|
38863
|
-
|
|
38895
|
+
_context32.next = 49;
|
|
38864
38896
|
break;
|
|
38865
38897
|
}
|
|
38866
38898
|
oderSetsIsInActPlanning = false;
|
|
@@ -38868,18 +38900,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38868
38900
|
j = 0;
|
|
38869
38901
|
case 38:
|
|
38870
38902
|
if (!(j < orderSets.length)) {
|
|
38871
|
-
|
|
38903
|
+
_context32.next = 45;
|
|
38872
38904
|
break;
|
|
38873
38905
|
}
|
|
38874
38906
|
if (!(orderSets[j].SetID == setId)) {
|
|
38875
|
-
|
|
38907
|
+
_context32.next = 42;
|
|
38876
38908
|
break;
|
|
38877
38909
|
}
|
|
38878
38910
|
oderSetsIsInActPlanning = true;
|
|
38879
|
-
return
|
|
38911
|
+
return _context32.abrupt("break", 45);
|
|
38880
38912
|
case 42:
|
|
38881
38913
|
j++;
|
|
38882
|
-
|
|
38914
|
+
_context32.next = 38;
|
|
38883
38915
|
break;
|
|
38884
38916
|
case 45:
|
|
38885
38917
|
if (!oderSetsIsInActPlanning && !((_basketData$SetPlanne = basketData.SetPlannerInfos) !== null && _basketData$SetPlanne !== void 0 && _basketData$SetPlanne.InvolvedSetIds.includes(setId))) {
|
|
@@ -38887,7 +38919,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38887
38919
|
}
|
|
38888
38920
|
case 46:
|
|
38889
38921
|
i++;
|
|
38890
|
-
|
|
38922
|
+
_context32.next = 34;
|
|
38891
38923
|
break;
|
|
38892
38924
|
case 49:
|
|
38893
38925
|
basketData.SetPlannerInfos = setPlanner ? this.getSetPlannerInfos(Object.keys(sets), orderSets) : undefined;
|
|
@@ -38899,14 +38931,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38899
38931
|
} else {
|
|
38900
38932
|
basketData.setOrderSets(orderSets);
|
|
38901
38933
|
}
|
|
38902
|
-
return
|
|
38934
|
+
return _context32.abrupt("return", basketData);
|
|
38903
38935
|
case 53:
|
|
38904
38936
|
case "end":
|
|
38905
|
-
return
|
|
38937
|
+
return _context32.stop();
|
|
38906
38938
|
}
|
|
38907
|
-
},
|
|
38939
|
+
}, _callee30, this);
|
|
38908
38940
|
}));
|
|
38909
|
-
function fillOrderLinesAndOrderSets(
|
|
38941
|
+
function fillOrderLinesAndOrderSets(_x115, _x116, _x117, _x118, _x119) {
|
|
38910
38942
|
return _fillOrderLinesAndOrderSets.apply(this, arguments);
|
|
38911
38943
|
}
|
|
38912
38944
|
return fillOrderLinesAndOrderSets;
|
|
@@ -38996,11 +39028,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38996
39028
|
}, {
|
|
38997
39029
|
key: "getOrderSet",
|
|
38998
39030
|
value: function () {
|
|
38999
|
-
var _getOrderSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
39031
|
+
var _getOrderSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31(set, catalogData, divaNr, repairOnly, returnTo) {
|
|
39000
39032
|
var _Object$values$, _set$getDivaArticles, _hqRenderScript, _urlToAiImages, _alternateSetImages, _set$basketConfigVari2, _set$basketConfigVari3;
|
|
39001
39033
|
var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, urlToAiImages, alternateSetImages, hqRenderScript, dimensions, promise3D, promise2D, promiseAiImages, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, plannerWarnings, bruttoPrice;
|
|
39002
|
-
return _regeneratorRuntime.wrap(function
|
|
39003
|
-
while (1) switch (
|
|
39034
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context33) {
|
|
39035
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
39004
39036
|
case 0:
|
|
39005
39037
|
dontGenerateImages = repairOnly || returnTo == 'DONT_SAVE_BASKET' || returnTo == 'TEST_CONFIGURATORLOGIC';
|
|
39006
39038
|
DivaUtils.startSpanOfApm('GetSet3D und 2D Image');
|
|
@@ -39013,7 +39045,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
39013
39045
|
hqRenderScript = undefined;
|
|
39014
39046
|
dimensions = {};
|
|
39015
39047
|
if (dontGenerateImages) {
|
|
39016
|
-
|
|
39048
|
+
_context33.next = 26;
|
|
39017
39049
|
break;
|
|
39018
39050
|
}
|
|
39019
39051
|
promise3D = this.getSetImage(set, typeof window === 'undefined');
|
|
@@ -39024,10 +39056,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
39024
39056
|
if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
|
|
39025
39057
|
promise3DAlternate = this.getAlternateSetImages(set);
|
|
39026
39058
|
}
|
|
39027
|
-
|
|
39059
|
+
_context33.next = 17;
|
|
39028
39060
|
return Promise.all([promise3D, promise2D, promiseAiImages, promise3DAlternate, this.getHQRenderScript(set, divaNr)]);
|
|
39029
39061
|
case 17:
|
|
39030
|
-
_yield$Promise$all =
|
|
39062
|
+
_yield$Promise$all = _context33.sent;
|
|
39031
39063
|
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 5);
|
|
39032
39064
|
_yield$Promise$all2$ = _yield$Promise$all2[0];
|
|
39033
39065
|
setImage = _yield$Promise$all2$.url;
|
|
@@ -39102,14 +39134,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
39102
39134
|
MetaData: !((_set$basketConfigVari2 = set.basketConfigVariants) !== null && _set$basketConfigVari2 !== void 0 && _set$basketConfigVari2.length) ? set.MetaData : undefined,
|
|
39103
39135
|
MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
|
|
39104
39136
|
});
|
|
39105
|
-
return
|
|
39137
|
+
return _context33.abrupt("return", orderSet);
|
|
39106
39138
|
case 32:
|
|
39107
39139
|
case "end":
|
|
39108
|
-
return
|
|
39140
|
+
return _context33.stop();
|
|
39109
39141
|
}
|
|
39110
|
-
},
|
|
39142
|
+
}, _callee31, this);
|
|
39111
39143
|
}));
|
|
39112
|
-
function getOrderSet(
|
|
39144
|
+
function getOrderSet(_x120, _x121, _x122, _x123, _x124) {
|
|
39113
39145
|
return _getOrderSet.apply(this, arguments);
|
|
39114
39146
|
}
|
|
39115
39147
|
return getOrderSet;
|
|
@@ -39122,31 +39154,31 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
39122
39154
|
}, {
|
|
39123
39155
|
key: "getSetImage",
|
|
39124
39156
|
value: (function () {
|
|
39125
|
-
var _getSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
39157
|
+
var _getSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32(set, overwriteLastSavedRendering) {
|
|
39126
39158
|
var is3D, _yield$set$plannerHan, dimensions, url;
|
|
39127
|
-
return _regeneratorRuntime.wrap(function
|
|
39128
|
-
while (1) switch (
|
|
39159
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context34) {
|
|
39160
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
39129
39161
|
case 0:
|
|
39130
39162
|
is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
39131
39163
|
if (!is3D) {
|
|
39132
|
-
|
|
39164
|
+
_context34.next = 10;
|
|
39133
39165
|
break;
|
|
39134
39166
|
}
|
|
39135
|
-
|
|
39167
|
+
_context34.next = 4;
|
|
39136
39168
|
return set.plannerHandler.saveSetImage(overwriteLastSavedRendering);
|
|
39137
39169
|
case 4:
|
|
39138
|
-
|
|
39170
|
+
_context34.next = 6;
|
|
39139
39171
|
return set.plannerHandler.getSetImageAsUrl(set.getSetId());
|
|
39140
39172
|
case 6:
|
|
39141
|
-
_yield$set$plannerHan =
|
|
39173
|
+
_yield$set$plannerHan = _context34.sent;
|
|
39142
39174
|
dimensions = _yield$set$plannerHan.dimensions;
|
|
39143
39175
|
url = _yield$set$plannerHan.url;
|
|
39144
|
-
return
|
|
39176
|
+
return _context34.abrupt("return", {
|
|
39145
39177
|
dimensions: dimensions,
|
|
39146
39178
|
url: url
|
|
39147
39179
|
});
|
|
39148
39180
|
case 10:
|
|
39149
|
-
return
|
|
39181
|
+
return _context34.abrupt("return", {
|
|
39150
39182
|
dimensions: {
|
|
39151
39183
|
w: undefined,
|
|
39152
39184
|
h: undefined,
|
|
@@ -39155,11 +39187,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
39155
39187
|
});
|
|
39156
39188
|
case 11:
|
|
39157
39189
|
case "end":
|
|
39158
|
-
return
|
|
39190
|
+
return _context34.stop();
|
|
39159
39191
|
}
|
|
39160
|
-
},
|
|
39192
|
+
}, _callee32);
|
|
39161
39193
|
}));
|
|
39162
|
-
function getSetImage(
|
|
39194
|
+
function getSetImage(_x125, _x126) {
|
|
39163
39195
|
return _getSetImage.apply(this, arguments);
|
|
39164
39196
|
}
|
|
39165
39197
|
return getSetImage;
|
|
@@ -39167,45 +39199,45 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
39167
39199
|
}, {
|
|
39168
39200
|
key: "getHQRenderScript",
|
|
39169
39201
|
value: function () {
|
|
39170
|
-
var _getHQRenderScript = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
39202
|
+
var _getHQRenderScript = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33(set, divaNr) {
|
|
39171
39203
|
var is3D, hqRenderScript, createdHQRenderScript;
|
|
39172
|
-
return _regeneratorRuntime.wrap(function
|
|
39173
|
-
while (1) switch (
|
|
39204
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context35) {
|
|
39205
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
39174
39206
|
case 0:
|
|
39175
39207
|
//if not 3d
|
|
39176
39208
|
is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
39177
39209
|
if (is3D) {
|
|
39178
|
-
|
|
39210
|
+
_context35.next = 3;
|
|
39179
39211
|
break;
|
|
39180
39212
|
}
|
|
39181
|
-
return
|
|
39213
|
+
return _context35.abrupt("return");
|
|
39182
39214
|
case 3:
|
|
39183
|
-
|
|
39215
|
+
_context35.next = 5;
|
|
39184
39216
|
return set.plannerHandler.saveSetHQRenderScript();
|
|
39185
39217
|
case 5:
|
|
39186
39218
|
hqRenderScript = set.plannerHandler.getSetHQRenderScript();
|
|
39187
39219
|
if (hqRenderScript) {
|
|
39188
|
-
|
|
39220
|
+
_context35.next = 8;
|
|
39189
39221
|
break;
|
|
39190
39222
|
}
|
|
39191
|
-
return
|
|
39223
|
+
return _context35.abrupt("return");
|
|
39192
39224
|
case 8:
|
|
39193
|
-
|
|
39225
|
+
_context35.next = 10;
|
|
39194
39226
|
return set.api.postHQRenderScript({
|
|
39195
39227
|
divaNr: divaNr,
|
|
39196
39228
|
hqRenderscript: hqRenderScript,
|
|
39197
39229
|
organization: set.api.OrganizationId
|
|
39198
39230
|
});
|
|
39199
39231
|
case 10:
|
|
39200
|
-
createdHQRenderScript =
|
|
39201
|
-
return
|
|
39232
|
+
createdHQRenderScript = _context35.sent;
|
|
39233
|
+
return _context35.abrupt("return", createdHQRenderScript);
|
|
39202
39234
|
case 12:
|
|
39203
39235
|
case "end":
|
|
39204
|
-
return
|
|
39236
|
+
return _context35.stop();
|
|
39205
39237
|
}
|
|
39206
|
-
},
|
|
39238
|
+
}, _callee33);
|
|
39207
39239
|
}));
|
|
39208
|
-
function getHQRenderScript(
|
|
39240
|
+
function getHQRenderScript(_x127, _x128) {
|
|
39209
39241
|
return _getHQRenderScript.apply(this, arguments);
|
|
39210
39242
|
}
|
|
39211
39243
|
return getHQRenderScript;
|
|
@@ -39219,34 +39251,34 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
39219
39251
|
}, {
|
|
39220
39252
|
key: "getAlternateSetImages",
|
|
39221
39253
|
value: (function () {
|
|
39222
|
-
var _getAlternateSetImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
39254
|
+
var _getAlternateSetImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(set) {
|
|
39223
39255
|
var is2D, catalogData, setImages;
|
|
39224
|
-
return _regeneratorRuntime.wrap(function
|
|
39225
|
-
while (1) switch (
|
|
39256
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context36) {
|
|
39257
|
+
while (1) switch (_context36.prev = _context36.next) {
|
|
39226
39258
|
case 0:
|
|
39227
39259
|
is2D = !['3DImage', '3DCOMB', 'BoxPlanner'].includes(set.getPlannerMode());
|
|
39228
39260
|
if (!(is2D || set.onlyRunLogic)) {
|
|
39229
|
-
|
|
39261
|
+
_context36.next = 3;
|
|
39230
39262
|
break;
|
|
39231
39263
|
}
|
|
39232
|
-
return
|
|
39264
|
+
return _context36.abrupt("return", []);
|
|
39233
39265
|
case 3:
|
|
39234
39266
|
catalogData = set.CatalogData;
|
|
39235
|
-
|
|
39267
|
+
_context36.next = 6;
|
|
39236
39268
|
return set.plannerHandler.saveAlternateSetImages(catalogData.catalogCodex, catalogData.catalogGuid);
|
|
39237
39269
|
case 6:
|
|
39238
|
-
|
|
39270
|
+
_context36.next = 8;
|
|
39239
39271
|
return set.plannerHandler.getAlternateSetImagesAsSetImageData(set.getSetId());
|
|
39240
39272
|
case 8:
|
|
39241
|
-
setImages =
|
|
39242
|
-
return
|
|
39273
|
+
setImages = _context36.sent;
|
|
39274
|
+
return _context36.abrupt("return", setImages);
|
|
39243
39275
|
case 10:
|
|
39244
39276
|
case "end":
|
|
39245
|
-
return
|
|
39277
|
+
return _context36.stop();
|
|
39246
39278
|
}
|
|
39247
|
-
},
|
|
39279
|
+
}, _callee34);
|
|
39248
39280
|
}));
|
|
39249
|
-
function getAlternateSetImages(
|
|
39281
|
+
function getAlternateSetImages(_x129) {
|
|
39250
39282
|
return _getAlternateSetImages.apply(this, arguments);
|
|
39251
39283
|
}
|
|
39252
39284
|
return getAlternateSetImages;
|
|
@@ -39254,30 +39286,30 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
39254
39286
|
}, {
|
|
39255
39287
|
key: "get2DSetImage",
|
|
39256
39288
|
value: function () {
|
|
39257
|
-
var _get2DSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
39289
|
+
var _get2DSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35(set) {
|
|
39258
39290
|
var urlToPlanning2D, planning2DAsJPGBase64;
|
|
39259
|
-
return _regeneratorRuntime.wrap(function
|
|
39260
|
-
while (1) switch (
|
|
39291
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context37) {
|
|
39292
|
+
while (1) switch (_context37.prev = _context37.next) {
|
|
39261
39293
|
case 0:
|
|
39262
39294
|
urlToPlanning2D = undefined;
|
|
39263
39295
|
planning2DAsJPGBase64 = set.getPlanning2DAsJpg();
|
|
39264
39296
|
if (!(planning2DAsJPGBase64 != undefined && planning2DAsJPGBase64 != '' && planning2DAsJPGBase64 != 'data:,')) {
|
|
39265
|
-
|
|
39297
|
+
_context37.next = 6;
|
|
39266
39298
|
break;
|
|
39267
39299
|
}
|
|
39268
|
-
|
|
39300
|
+
_context37.next = 5;
|
|
39269
39301
|
return set.plannerHandler.saveSet2DImage(set.CatalogData.catalogCodex, set.CatalogData.catalogGuid, planning2DAsJPGBase64);
|
|
39270
39302
|
case 5:
|
|
39271
|
-
urlToPlanning2D =
|
|
39303
|
+
urlToPlanning2D = _context37.sent;
|
|
39272
39304
|
case 6:
|
|
39273
|
-
return
|
|
39305
|
+
return _context37.abrupt("return", urlToPlanning2D);
|
|
39274
39306
|
case 7:
|
|
39275
39307
|
case "end":
|
|
39276
|
-
return
|
|
39308
|
+
return _context37.stop();
|
|
39277
39309
|
}
|
|
39278
|
-
},
|
|
39310
|
+
}, _callee35);
|
|
39279
39311
|
}));
|
|
39280
|
-
function get2DSetImage(
|
|
39312
|
+
function get2DSetImage(_x130) {
|
|
39281
39313
|
return _get2DSetImage.apply(this, arguments);
|
|
39282
39314
|
}
|
|
39283
39315
|
return get2DSetImage;
|
|
@@ -39285,29 +39317,29 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
39285
39317
|
}, {
|
|
39286
39318
|
key: "getAiImages",
|
|
39287
39319
|
value: function () {
|
|
39288
|
-
var _getAiImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
39320
|
+
var _getAiImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee36(set) {
|
|
39289
39321
|
var catalogData, aiImages, savedImages;
|
|
39290
|
-
return _regeneratorRuntime.wrap(function
|
|
39291
|
-
while (1) switch (
|
|
39322
|
+
return _regeneratorRuntime.wrap(function _callee36$(_context38) {
|
|
39323
|
+
while (1) switch (_context38.prev = _context38.next) {
|
|
39292
39324
|
case 0:
|
|
39293
39325
|
catalogData = set.CatalogData;
|
|
39294
39326
|
aiImages = set.getAiImagesAsJpg(); // Save all AI images in parallel
|
|
39295
|
-
|
|
39327
|
+
_context38.next = 4;
|
|
39296
39328
|
return Promise.all(aiImages.map(function (_ref3) {
|
|
39297
39329
|
var promptId = _ref3.promptId,
|
|
39298
39330
|
base64 = _ref3.base64;
|
|
39299
39331
|
return set.plannerHandler.saveAiImage(promptId, catalogData.catalogCodex, catalogData.catalogGuid, base64);
|
|
39300
39332
|
}));
|
|
39301
39333
|
case 4:
|
|
39302
|
-
savedImages =
|
|
39303
|
-
return
|
|
39334
|
+
savedImages = _context38.sent;
|
|
39335
|
+
return _context38.abrupt("return", savedImages);
|
|
39304
39336
|
case 6:
|
|
39305
39337
|
case "end":
|
|
39306
|
-
return
|
|
39338
|
+
return _context38.stop();
|
|
39307
39339
|
}
|
|
39308
|
-
},
|
|
39340
|
+
}, _callee36);
|
|
39309
39341
|
}));
|
|
39310
|
-
function getAiImages(
|
|
39342
|
+
function getAiImages(_x131) {
|
|
39311
39343
|
return _getAiImages.apply(this, arguments);
|
|
39312
39344
|
}
|
|
39313
39345
|
return getAiImages;
|
|
@@ -39315,31 +39347,31 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
39315
39347
|
}, {
|
|
39316
39348
|
key: "getAiImage",
|
|
39317
39349
|
value: function () {
|
|
39318
|
-
var _getAiImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
39350
|
+
var _getAiImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee37(set) {
|
|
39319
39351
|
var aiImages, catalogData, _aiImages$, promptId, base64;
|
|
39320
|
-
return _regeneratorRuntime.wrap(function
|
|
39321
|
-
while (1) switch (
|
|
39352
|
+
return _regeneratorRuntime.wrap(function _callee37$(_context39) {
|
|
39353
|
+
while (1) switch (_context39.prev = _context39.next) {
|
|
39322
39354
|
case 0:
|
|
39323
39355
|
aiImages = set.getAiImagesAsJpg();
|
|
39324
39356
|
if (!(aiImages.length === 0)) {
|
|
39325
|
-
|
|
39357
|
+
_context39.next = 3;
|
|
39326
39358
|
break;
|
|
39327
39359
|
}
|
|
39328
|
-
return
|
|
39360
|
+
return _context39.abrupt("return", undefined);
|
|
39329
39361
|
case 3:
|
|
39330
39362
|
catalogData = set.CatalogData;
|
|
39331
39363
|
_aiImages$ = aiImages[0], promptId = _aiImages$.promptId, base64 = _aiImages$.base64;
|
|
39332
|
-
|
|
39364
|
+
_context39.next = 7;
|
|
39333
39365
|
return set.plannerHandler.saveAiImage(promptId, catalogData.catalogCodex, catalogData.catalogGuid, base64);
|
|
39334
39366
|
case 7:
|
|
39335
|
-
return
|
|
39367
|
+
return _context39.abrupt("return", _context39.sent);
|
|
39336
39368
|
case 8:
|
|
39337
39369
|
case "end":
|
|
39338
|
-
return
|
|
39370
|
+
return _context39.stop();
|
|
39339
39371
|
}
|
|
39340
|
-
},
|
|
39372
|
+
}, _callee37);
|
|
39341
39373
|
}));
|
|
39342
|
-
function getAiImage(
|
|
39374
|
+
function getAiImage(_x132) {
|
|
39343
39375
|
return _getAiImage.apply(this, arguments);
|
|
39344
39376
|
}
|
|
39345
39377
|
return getAiImage;
|
|
@@ -39379,25 +39411,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
39379
39411
|
}, {
|
|
39380
39412
|
key: "addOrderSetArticlesToExistingSet",
|
|
39381
39413
|
value: function () {
|
|
39382
|
-
var _addOrderSetArticlesToExistingSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
39383
|
-
return _regeneratorRuntime.wrap(function
|
|
39384
|
-
while (1) switch (
|
|
39414
|
+
var _addOrderSetArticlesToExistingSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee38(set, orderSet, lastSetToInitialize) {
|
|
39415
|
+
return _regeneratorRuntime.wrap(function _callee38$(_context40) {
|
|
39416
|
+
while (1) switch (_context40.prev = _context40.next) {
|
|
39385
39417
|
case 0:
|
|
39386
39418
|
//TODO: GLOBAL STUFF
|
|
39387
39419
|
//this.updateActSet(set);
|
|
39388
39420
|
orderSet.changeBasketIds();
|
|
39389
|
-
|
|
39421
|
+
_context40.next = 3;
|
|
39390
39422
|
return this.initOrderLineArticles(set, orderSet);
|
|
39391
39423
|
case 3:
|
|
39392
|
-
|
|
39424
|
+
_context40.next = 5;
|
|
39393
39425
|
return set.plannerHandler.extendSet(set, orderSet.SetPlanData, lastSetToInitialize);
|
|
39394
39426
|
case 5:
|
|
39395
39427
|
case "end":
|
|
39396
|
-
return
|
|
39428
|
+
return _context40.stop();
|
|
39397
39429
|
}
|
|
39398
|
-
},
|
|
39430
|
+
}, _callee38, this);
|
|
39399
39431
|
}));
|
|
39400
|
-
function addOrderSetArticlesToExistingSet(
|
|
39432
|
+
function addOrderSetArticlesToExistingSet(_x133, _x134, _x135) {
|
|
39401
39433
|
return _addOrderSetArticlesToExistingSet.apply(this, arguments);
|
|
39402
39434
|
}
|
|
39403
39435
|
return addOrderSetArticlesToExistingSet;
|
|
@@ -40469,7 +40501,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
40469
40501
|
break;
|
|
40470
40502
|
case 3:
|
|
40471
40503
|
_context12.next = 5;
|
|
40472
|
-
return import('./PfisterWWSHandler-
|
|
40504
|
+
return import('./PfisterWWSHandler-9ff2a80f.js');
|
|
40473
40505
|
case 5:
|
|
40474
40506
|
_yield$import = _context12.sent;
|
|
40475
40507
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -40477,7 +40509,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
40477
40509
|
return _context12.abrupt("break", 27);
|
|
40478
40510
|
case 9:
|
|
40479
40511
|
_context12.next = 11;
|
|
40480
|
-
return import('./LiviqueWWSHandler-
|
|
40512
|
+
return import('./LiviqueWWSHandler-67bcaa16.js');
|
|
40481
40513
|
case 11:
|
|
40482
40514
|
_yield$import2 = _context12.sent;
|
|
40483
40515
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -40485,7 +40517,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
40485
40517
|
return _context12.abrupt("break", 27);
|
|
40486
40518
|
case 15:
|
|
40487
40519
|
_context12.next = 17;
|
|
40488
|
-
return import('./SeriousBasketHandler-
|
|
40520
|
+
return import('./SeriousBasketHandler-4f65e751.js');
|
|
40489
40521
|
case 17:
|
|
40490
40522
|
_yield$import3 = _context12.sent;
|
|
40491
40523
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -40493,7 +40525,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
40493
40525
|
return _context12.abrupt("break", 27);
|
|
40494
40526
|
case 21:
|
|
40495
40527
|
_context12.next = 23;
|
|
40496
|
-
return import('./StandardWWSHandler-
|
|
40528
|
+
return import('./StandardWWSHandler-ce4d69c2.js');
|
|
40497
40529
|
case 23:
|
|
40498
40530
|
_yield$import4 = _context12.sent;
|
|
40499
40531
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -41917,7 +41949,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
41917
41949
|
while (1) switch (_context3.prev = _context3.next) {
|
|
41918
41950
|
case 0:
|
|
41919
41951
|
_context3.next = 2;
|
|
41920
|
-
return import('./Host3DSignalR-
|
|
41952
|
+
return import('./Host3DSignalR-90bfa217.js');
|
|
41921
41953
|
case 2:
|
|
41922
41954
|
_yield$import = _context3.sent;
|
|
41923
41955
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -43575,7 +43607,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
43575
43607
|
break;
|
|
43576
43608
|
case 8:
|
|
43577
43609
|
_context4.next = 10;
|
|
43578
|
-
return import('./DivaStandardPlanner-
|
|
43610
|
+
return import('./DivaStandardPlanner-43196400.js');
|
|
43579
43611
|
case 10:
|
|
43580
43612
|
_yield$import = _context4.sent;
|
|
43581
43613
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -43586,7 +43618,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
43586
43618
|
return _context4.abrupt("break", 21);
|
|
43587
43619
|
case 15:
|
|
43588
43620
|
_context4.next = 17;
|
|
43589
|
-
return import('./DivaBoxPlanner-
|
|
43621
|
+
return import('./DivaBoxPlanner-57e531a6.js');
|
|
43590
43622
|
case 17:
|
|
43591
43623
|
_yield$import2 = _context4.sent;
|
|
43592
43624
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -44248,43 +44280,82 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
44248
44280
|
if (!this.plannerList.has(setId)) {
|
|
44249
44281
|
return [];
|
|
44250
44282
|
}
|
|
44251
|
-
return this.plannerList.get(setId).getPlannerElementsInfluencedByDeletion(elementId, deletionType);
|
|
44252
|
-
}
|
|
44253
|
-
|
|
44283
|
+
return this.plannerList.get(setId).getPlannerElementsInfluencedByDeletion(elementId, deletionType);
|
|
44284
|
+
}
|
|
44285
|
+
|
|
44286
|
+
/**
|
|
44287
|
+
* This function is used to move an element in the planner
|
|
44288
|
+
* @param setId
|
|
44289
|
+
* @param articleCopyRelation
|
|
44290
|
+
* @param copyInfo
|
|
44291
|
+
*/
|
|
44292
|
+
}, {
|
|
44293
|
+
key: "movePlannerElements",
|
|
44294
|
+
value: (function () {
|
|
44295
|
+
var _movePlannerElements = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(setId, elementId, copyInfo) {
|
|
44296
|
+
var response;
|
|
44297
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
44298
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
44299
|
+
case 0:
|
|
44300
|
+
if (!(!this.plannerList.has(setId) || !copyInfo)) {
|
|
44301
|
+
_context16.next = 2;
|
|
44302
|
+
break;
|
|
44303
|
+
}
|
|
44304
|
+
return _context16.abrupt("return");
|
|
44305
|
+
case 2:
|
|
44306
|
+
_context16.next = 4;
|
|
44307
|
+
return this.plannerList.get(setId).movePlannerElement(elementId, copyInfo);
|
|
44308
|
+
case 4:
|
|
44309
|
+
response = _context16.sent;
|
|
44310
|
+
this.setPlannerHandler.updateSetPosNr(this.plannerList);
|
|
44311
|
+
this.setPlannerHandler.calcGlobalBoundingBox(this.plannerList);
|
|
44312
|
+
return _context16.abrupt("return", response);
|
|
44313
|
+
case 8:
|
|
44314
|
+
case "end":
|
|
44315
|
+
return _context16.stop();
|
|
44316
|
+
}
|
|
44317
|
+
}, _callee16, this);
|
|
44318
|
+
}));
|
|
44319
|
+
function movePlannerElements(_x33, _x34, _x35) {
|
|
44320
|
+
return _movePlannerElements.apply(this, arguments);
|
|
44321
|
+
}
|
|
44322
|
+
return movePlannerElements;
|
|
44323
|
+
}()
|
|
44254
44324
|
/**
|
|
44255
44325
|
* This function is used to copy an element in the planner
|
|
44256
44326
|
* @param setId
|
|
44257
44327
|
* @param articleCopyRelation
|
|
44258
44328
|
* @param copyInfo
|
|
44259
44329
|
*/
|
|
44330
|
+
)
|
|
44260
44331
|
}, {
|
|
44261
44332
|
key: "copyPlannerElements",
|
|
44262
44333
|
value: (function () {
|
|
44263
|
-
var _copyPlannerElements = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
44334
|
+
var _copyPlannerElements = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(setId, articleCopyRelation, copyInfo) {
|
|
44264
44335
|
var response;
|
|
44265
|
-
return _regeneratorRuntime.wrap(function
|
|
44266
|
-
while (1) switch (
|
|
44336
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
44337
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
44267
44338
|
case 0:
|
|
44268
44339
|
if (!(!this.plannerList.has(setId) || !copyInfo)) {
|
|
44269
|
-
|
|
44340
|
+
_context17.next = 2;
|
|
44270
44341
|
break;
|
|
44271
44342
|
}
|
|
44272
|
-
return
|
|
44343
|
+
return _context17.abrupt("return");
|
|
44273
44344
|
case 2:
|
|
44274
|
-
|
|
44345
|
+
_context17.next = 4;
|
|
44275
44346
|
return this.plannerList.get(setId).copyPlannerElement(articleCopyRelation, copyInfo);
|
|
44276
44347
|
case 4:
|
|
44277
|
-
response =
|
|
44348
|
+
response = _context17.sent;
|
|
44278
44349
|
this.setPlannerHandler.updateSetPosNr(this.plannerList);
|
|
44279
44350
|
this.setPlannerHandler.calcGlobalBoundingBox(this.plannerList);
|
|
44280
|
-
return
|
|
44351
|
+
return _context17.abrupt("return", response);
|
|
44281
44352
|
case 8:
|
|
44282
44353
|
case "end":
|
|
44283
|
-
return
|
|
44354
|
+
return _context17.stop();
|
|
44284
44355
|
}
|
|
44285
|
-
},
|
|
44356
|
+
}, _callee17, this);
|
|
44286
44357
|
}));
|
|
44287
|
-
function copyPlannerElements(
|
|
44358
|
+
function copyPlannerElements(_x36, _x37, _x38) {
|
|
44288
44359
|
return _copyPlannerElements.apply(this, arguments);
|
|
44289
44360
|
}
|
|
44290
44361
|
return copyPlannerElements;
|
|
@@ -44420,29 +44491,29 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
44420
44491
|
}, {
|
|
44421
44492
|
key: "request3D",
|
|
44422
44493
|
value: function () {
|
|
44423
|
-
var _request3D = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
44494
|
+
var _request3D = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(doRequestRendering, doRequestHqRenderScript, alternateRenderingsExist, alternateRenderInfo, forceReloadPlanning, renderRequestInfos, hybrid3DInfo, useLatestHybridInfo) {
|
|
44424
44495
|
var _this3 = this;
|
|
44425
44496
|
var plannerData, loadedCatData, plannerExists, savedSetId;
|
|
44426
|
-
return _regeneratorRuntime.wrap(function
|
|
44427
|
-
while (1) switch (
|
|
44497
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
44498
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
44428
44499
|
case 0:
|
|
44429
44500
|
if (!doRequestRendering) {
|
|
44430
|
-
|
|
44501
|
+
_context18.next = 9;
|
|
44431
44502
|
break;
|
|
44432
44503
|
}
|
|
44433
44504
|
if (renderRequestInfos) {
|
|
44434
|
-
|
|
44505
|
+
_context18.next = 6;
|
|
44435
44506
|
break;
|
|
44436
44507
|
}
|
|
44437
44508
|
LOG$2.error(new DivaError('Error requesting 3D rendering. No renderRequestInfo is set'));
|
|
44438
|
-
return
|
|
44509
|
+
return _context18.abrupt("return");
|
|
44439
44510
|
case 6:
|
|
44440
44511
|
if (!(renderRequestInfos.width <= 0 || isNaN(renderRequestInfos.width) || renderRequestInfos.height <= 0 || isNaN(renderRequestInfos.height))) {
|
|
44441
|
-
|
|
44512
|
+
_context18.next = 9;
|
|
44442
44513
|
break;
|
|
44443
44514
|
}
|
|
44444
44515
|
LOG$2.error(new DivaError('Error requesting rendering. Not valid width or height request width: ' + renderRequestInfos.width + ' height: ' + renderRequestInfos.height));
|
|
44445
|
-
return
|
|
44516
|
+
return _context18.abrupt("return");
|
|
44446
44517
|
case 9:
|
|
44447
44518
|
plannerData = this.handler3D.initPlannerData(this.plannerHandlerFunctions.doAllowSetPlanner());
|
|
44448
44519
|
loadedCatData = [];
|
|
@@ -44472,7 +44543,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
44472
44543
|
});
|
|
44473
44544
|
});
|
|
44474
44545
|
if (!plannerExists) {
|
|
44475
|
-
|
|
44546
|
+
_context18.next = 19;
|
|
44476
44547
|
break;
|
|
44477
44548
|
}
|
|
44478
44549
|
// if not in set planner mode overwrite s1 with correct setId
|
|
@@ -44480,7 +44551,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
44480
44551
|
plannerData.SCE.ROO[0].SET[0].ID = savedSetId;
|
|
44481
44552
|
plannerData.SCE.ROO[0].SelectSet = savedSetId;
|
|
44482
44553
|
}
|
|
44483
|
-
|
|
44554
|
+
_context18.next = 18;
|
|
44484
44555
|
return this.handler3D.request3D({
|
|
44485
44556
|
doRequestRendering: doRequestRendering,
|
|
44486
44557
|
doRequestHqRenderScript: doRequestHqRenderScript,
|
|
@@ -44495,16 +44566,16 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
44495
44566
|
useLatestHybridInfo: useLatestHybridInfo
|
|
44496
44567
|
});
|
|
44497
44568
|
case 18:
|
|
44498
|
-
return
|
|
44569
|
+
return _context18.abrupt("return", _context18.sent);
|
|
44499
44570
|
case 19:
|
|
44500
|
-
return
|
|
44571
|
+
return _context18.abrupt("return");
|
|
44501
44572
|
case 20:
|
|
44502
44573
|
case "end":
|
|
44503
|
-
return
|
|
44574
|
+
return _context18.stop();
|
|
44504
44575
|
}
|
|
44505
|
-
},
|
|
44576
|
+
}, _callee18, this);
|
|
44506
44577
|
}));
|
|
44507
|
-
function request3D(
|
|
44578
|
+
function request3D(_x39, _x40, _x41, _x42, _x43, _x44, _x45, _x46) {
|
|
44508
44579
|
return _request3D.apply(this, arguments);
|
|
44509
44580
|
}
|
|
44510
44581
|
return request3D;
|
|
@@ -46126,34 +46197,70 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46126
46197
|
}
|
|
46127
46198
|
return deletePlannerElement;
|
|
46128
46199
|
}()
|
|
46200
|
+
/**
|
|
46201
|
+
* This function moves an element from its origin to the desired index
|
|
46202
|
+
* current implementation is only for the new boxplanner
|
|
46203
|
+
*
|
|
46204
|
+
*/
|
|
46205
|
+
}, {
|
|
46206
|
+
key: "movePlannerElement",
|
|
46207
|
+
value: (function () {
|
|
46208
|
+
var _movePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(setId, elementId, curConfigKey, absoluteIndex) {
|
|
46209
|
+
var _this$updateViewPlann12;
|
|
46210
|
+
var set;
|
|
46211
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
46212
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
46213
|
+
case 0:
|
|
46214
|
+
set = this.sets[setId];
|
|
46215
|
+
_context21.next = 3;
|
|
46216
|
+
return setHandlerInstance.movePlannerElement(set, elementId, absoluteIndex);
|
|
46217
|
+
case 3:
|
|
46218
|
+
_context21.sent;
|
|
46219
|
+
this.updateConfigStructure();
|
|
46220
|
+
(_this$updateViewPlann12 = this.updateViewPlannerElements) === null || _this$updateViewPlann12 === void 0 || _this$updateViewPlann12.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
46221
|
+
this.updatePlannerView('MOVE_PLANNER_ELEMENT');
|
|
46222
|
+
this.updatePriceInView();
|
|
46223
|
+
this.updateViewButtonsDependigOnConfigStructure();
|
|
46224
|
+
case 9:
|
|
46225
|
+
case "end":
|
|
46226
|
+
return _context21.stop();
|
|
46227
|
+
}
|
|
46228
|
+
}, _callee21, this);
|
|
46229
|
+
}));
|
|
46230
|
+
function movePlannerElement(_x61, _x62, _x63, _x64) {
|
|
46231
|
+
return _movePlannerElement.apply(this, arguments);
|
|
46232
|
+
}
|
|
46233
|
+
return movePlannerElement;
|
|
46234
|
+
}()
|
|
46129
46235
|
/**
|
|
46130
46236
|
* This function is called when a element should be copied.
|
|
46131
46237
|
* @param setId the setId the element to copy belongs too
|
|
46132
46238
|
* @param elementId The elementId that should be copied
|
|
46133
46239
|
* @param copyInfo This objects hold information that is needed for copying. For example when copying an element in the box planner, the information in which direction it should be copied is important.
|
|
46134
46240
|
*/
|
|
46241
|
+
)
|
|
46135
46242
|
}, {
|
|
46136
46243
|
key: "copyPlannerElement",
|
|
46137
46244
|
value: (function () {
|
|
46138
|
-
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
46139
|
-
var _this$
|
|
46245
|
+
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(setId, elementId, curConfigKey, copyInfo) {
|
|
46246
|
+
var _this$updateViewPlann13;
|
|
46140
46247
|
var set, newSelectedArticle, newConfigStepKey, _this$updateElementSe7, baseArticle;
|
|
46141
|
-
return _regeneratorRuntime.wrap(function
|
|
46142
|
-
while (1) switch (
|
|
46248
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
46249
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
46143
46250
|
case 0:
|
|
46144
46251
|
if (copyInfo) {
|
|
46145
|
-
|
|
46252
|
+
_context22.next = 2;
|
|
46146
46253
|
break;
|
|
46147
46254
|
}
|
|
46148
|
-
return
|
|
46255
|
+
return _context22.abrupt("return");
|
|
46149
46256
|
case 2:
|
|
46150
46257
|
set = this.sets[setId];
|
|
46151
|
-
|
|
46258
|
+
_context22.next = 5;
|
|
46152
46259
|
return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
|
|
46153
46260
|
case 5:
|
|
46154
|
-
newSelectedArticle =
|
|
46261
|
+
newSelectedArticle = _context22.sent;
|
|
46155
46262
|
this.updateConfigStructure();
|
|
46156
|
-
(_this$
|
|
46263
|
+
(_this$updateViewPlann13 = this.updateViewPlannerElements) === null || _this$updateViewPlann13 === void 0 || _this$updateViewPlann13.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
46157
46264
|
this.updatePlannerView('COPY_PLANNER_ELEMENT');
|
|
46158
46265
|
this.updatePriceInView();
|
|
46159
46266
|
this.updateViewButtonsDependigOnConfigStructure();
|
|
@@ -46165,14 +46272,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46165
46272
|
(_this$updateElementSe7 = this.updateElementSelectionPlanner) === null || _this$updateElementSe7 === void 0 || _this$updateElementSe7.call(this, [baseArticle.setId], [baseArticle.elementId], true);
|
|
46166
46273
|
}
|
|
46167
46274
|
this.checkMatchingProducts('onCopy');
|
|
46168
|
-
return
|
|
46275
|
+
return _context22.abrupt("return", newConfigStepKey);
|
|
46169
46276
|
case 15:
|
|
46170
46277
|
case "end":
|
|
46171
|
-
return
|
|
46278
|
+
return _context22.stop();
|
|
46172
46279
|
}
|
|
46173
|
-
},
|
|
46280
|
+
}, _callee22, this);
|
|
46174
46281
|
}));
|
|
46175
|
-
function copyPlannerElement(
|
|
46282
|
+
function copyPlannerElement(_x65, _x66, _x67, _x68) {
|
|
46176
46283
|
return _copyPlannerElement.apply(this, arguments);
|
|
46177
46284
|
}
|
|
46178
46285
|
return copyPlannerElement;
|
|
@@ -46201,33 +46308,33 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46201
46308
|
}, {
|
|
46202
46309
|
key: "getFreePlacesOnGrids",
|
|
46203
46310
|
value: function () {
|
|
46204
|
-
var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
46311
|
+
var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(gridGroup, from) {
|
|
46205
46312
|
var _this$updateFreePlace;
|
|
46206
46313
|
var set, freeShelfGrids, plannedShelfGrids;
|
|
46207
|
-
return _regeneratorRuntime.wrap(function
|
|
46208
|
-
while (1) switch (
|
|
46314
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
46315
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
46209
46316
|
case 0:
|
|
46210
46317
|
set = this.actSet();
|
|
46211
46318
|
if (set) {
|
|
46212
|
-
|
|
46319
|
+
_context23.next = 3;
|
|
46213
46320
|
break;
|
|
46214
46321
|
}
|
|
46215
46322
|
throw new Error('getFreePlacesOnGrids: act set is not defined!');
|
|
46216
46323
|
case 3:
|
|
46217
46324
|
if (!gridGroup) {
|
|
46218
|
-
|
|
46325
|
+
_context23.next = 9;
|
|
46219
46326
|
break;
|
|
46220
46327
|
}
|
|
46221
|
-
|
|
46328
|
+
_context23.next = 6;
|
|
46222
46329
|
return setHandlerInstance.getFreeShelfGrids(set, gridGroup);
|
|
46223
46330
|
case 6:
|
|
46224
|
-
|
|
46225
|
-
|
|
46331
|
+
_context23.t0 = _context23.sent;
|
|
46332
|
+
_context23.next = 10;
|
|
46226
46333
|
break;
|
|
46227
46334
|
case 9:
|
|
46228
|
-
|
|
46335
|
+
_context23.t0 = undefined;
|
|
46229
46336
|
case 10:
|
|
46230
|
-
freeShelfGrids =
|
|
46337
|
+
freeShelfGrids = _context23.t0;
|
|
46231
46338
|
plannedShelfGrids = setHandlerInstance.getPlannedShelfGrids(set);
|
|
46232
46339
|
LOG$1.debug('TOULA', 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
|
|
46233
46340
|
LOG$1.debug('update free from: ' + from, 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
|
|
@@ -46235,17 +46342,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46235
46342
|
freeShelfGrids: freeShelfGrids,
|
|
46236
46343
|
plannedShelfGrids: plannedShelfGrids
|
|
46237
46344
|
});
|
|
46238
|
-
return
|
|
46345
|
+
return _context23.abrupt("return", {
|
|
46239
46346
|
freeShelfGrids: freeShelfGrids,
|
|
46240
46347
|
plannedShelfGrids: plannedShelfGrids
|
|
46241
46348
|
});
|
|
46242
46349
|
case 16:
|
|
46243
46350
|
case "end":
|
|
46244
|
-
return
|
|
46351
|
+
return _context23.stop();
|
|
46245
46352
|
}
|
|
46246
|
-
},
|
|
46353
|
+
}, _callee23, this);
|
|
46247
46354
|
}));
|
|
46248
|
-
function getFreePlacesOnGrids(
|
|
46355
|
+
function getFreePlacesOnGrids(_x69, _x70) {
|
|
46249
46356
|
return _getFreePlacesOnGrids.apply(this, arguments);
|
|
46250
46357
|
}
|
|
46251
46358
|
return getFreePlacesOnGrids;
|
|
@@ -46262,36 +46369,36 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46262
46369
|
}, {
|
|
46263
46370
|
key: "moveShelfItemToGrid",
|
|
46264
46371
|
value: function () {
|
|
46265
|
-
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
46372
|
+
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(accessoireBasketId, parentBasketId, gridName, cellIndex) {
|
|
46266
46373
|
var set, newGridId;
|
|
46267
|
-
return _regeneratorRuntime.wrap(function
|
|
46268
|
-
while (1) switch (
|
|
46374
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
46375
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
46269
46376
|
case 0:
|
|
46270
46377
|
set = this.actSet();
|
|
46271
46378
|
if (set) {
|
|
46272
|
-
|
|
46379
|
+
_context24.next = 3;
|
|
46273
46380
|
break;
|
|
46274
46381
|
}
|
|
46275
|
-
return
|
|
46382
|
+
return _context24.abrupt("return");
|
|
46276
46383
|
case 3:
|
|
46277
|
-
|
|
46384
|
+
_context24.next = 5;
|
|
46278
46385
|
return setHandlerInstance.moveShelfItemToGrid(set, accessoireBasketId, parentBasketId, gridName, cellIndex);
|
|
46279
46386
|
case 5:
|
|
46280
|
-
newGridId =
|
|
46387
|
+
newGridId = _context24.sent;
|
|
46281
46388
|
this.updatePlannerView('MOVE_SHELF_ITEM');
|
|
46282
46389
|
if (!newGridId) {
|
|
46283
|
-
|
|
46390
|
+
_context24.next = 10;
|
|
46284
46391
|
break;
|
|
46285
46392
|
}
|
|
46286
|
-
|
|
46393
|
+
_context24.next = 10;
|
|
46287
46394
|
return this.getFreePlacesOnGrids(newGridId, 'move shelf');
|
|
46288
46395
|
case 10:
|
|
46289
46396
|
case "end":
|
|
46290
|
-
return
|
|
46397
|
+
return _context24.stop();
|
|
46291
46398
|
}
|
|
46292
|
-
},
|
|
46399
|
+
}, _callee24, this);
|
|
46293
46400
|
}));
|
|
46294
|
-
function moveShelfItemToGrid(
|
|
46401
|
+
function moveShelfItemToGrid(_x71, _x72, _x73, _x74) {
|
|
46295
46402
|
return _moveShelfItemToGrid.apply(this, arguments);
|
|
46296
46403
|
}
|
|
46297
46404
|
return moveShelfItemToGrid;
|
|
@@ -46313,27 +46420,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46313
46420
|
}, {
|
|
46314
46421
|
key: "resetArticle",
|
|
46315
46422
|
value: function () {
|
|
46316
|
-
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
46423
|
+
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(basketId) {
|
|
46317
46424
|
var set;
|
|
46318
|
-
return _regeneratorRuntime.wrap(function
|
|
46319
|
-
while (1) switch (
|
|
46425
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
46426
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
46320
46427
|
case 0:
|
|
46321
46428
|
set = this.actSet();
|
|
46322
46429
|
if (set) {
|
|
46323
|
-
|
|
46430
|
+
_context25.next = 3;
|
|
46324
46431
|
break;
|
|
46325
46432
|
}
|
|
46326
|
-
return
|
|
46433
|
+
return _context25.abrupt("return");
|
|
46327
46434
|
case 3:
|
|
46328
|
-
|
|
46435
|
+
_context25.next = 5;
|
|
46329
46436
|
return setHandlerInstance.resetArticle(set, basketId);
|
|
46330
46437
|
case 5:
|
|
46331
46438
|
case "end":
|
|
46332
|
-
return
|
|
46439
|
+
return _context25.stop();
|
|
46333
46440
|
}
|
|
46334
|
-
},
|
|
46441
|
+
}, _callee25, this);
|
|
46335
46442
|
}));
|
|
46336
|
-
function resetArticle(
|
|
46443
|
+
function resetArticle(_x75) {
|
|
46337
46444
|
return _resetArticle.apply(this, arguments);
|
|
46338
46445
|
}
|
|
46339
46446
|
return resetArticle;
|
|
@@ -46363,10 +46470,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46363
46470
|
}, {
|
|
46364
46471
|
key: "checkMatchingProducts",
|
|
46365
46472
|
value: function () {
|
|
46366
|
-
var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
46473
|
+
var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(from) {
|
|
46367
46474
|
var set, _set$getMatchingProdu, _set$getMatchingOrigP, _set$getMatchingOrigP2, _set$getMatchingProdu2;
|
|
46368
|
-
return _regeneratorRuntime.wrap(function
|
|
46369
|
-
while (1) switch (
|
|
46475
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
46476
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
46370
46477
|
case 0:
|
|
46371
46478
|
set = this.actSet();
|
|
46372
46479
|
if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
@@ -46380,20 +46487,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46380
46487
|
}
|
|
46381
46488
|
}
|
|
46382
46489
|
if (!(set !== null && set !== void 0 && set.api.doCheckForProductsMatch())) {
|
|
46383
|
-
|
|
46490
|
+
_context26.next = 6;
|
|
46384
46491
|
break;
|
|
46385
46492
|
}
|
|
46386
|
-
|
|
46493
|
+
_context26.next = 5;
|
|
46387
46494
|
return productHandlerInstance.updateProducts(this.setsAsArray, this.api, this.divaBasketHandler.divaWWSHandler, from);
|
|
46388
46495
|
case 5:
|
|
46389
46496
|
this.updatePriceInView();
|
|
46390
46497
|
case 6:
|
|
46391
46498
|
case "end":
|
|
46392
|
-
return
|
|
46499
|
+
return _context26.stop();
|
|
46393
46500
|
}
|
|
46394
|
-
},
|
|
46501
|
+
}, _callee26, this);
|
|
46395
46502
|
}));
|
|
46396
|
-
function checkMatchingProducts(
|
|
46503
|
+
function checkMatchingProducts(_x76) {
|
|
46397
46504
|
return _checkMatchingProducts.apply(this, arguments);
|
|
46398
46505
|
}
|
|
46399
46506
|
return checkMatchingProducts;
|
|
@@ -46469,7 +46576,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46469
46576
|
}, {
|
|
46470
46577
|
key: "saveToBasketWrapper",
|
|
46471
46578
|
value: function () {
|
|
46472
|
-
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
46579
|
+
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(event, repairOnly, returnToParam, hideLoading) {
|
|
46473
46580
|
var _this$actions28,
|
|
46474
46581
|
_this$actions28$toggl,
|
|
46475
46582
|
_this$actions29,
|
|
@@ -46478,8 +46585,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46478
46585
|
_this$actions33,
|
|
46479
46586
|
_this$i18n18;
|
|
46480
46587
|
var returnTo, finalEvent, result, _this$actions30, _this$i18n12, _this$i18n13, _this$actions31, _this$i18n14, _this$i18n15, _this$actions32, _this$i18n16, _this$i18n17, _this$updatePlannerMs2;
|
|
46481
|
-
return _regeneratorRuntime.wrap(function
|
|
46482
|
-
while (1) switch (
|
|
46588
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
46589
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
46483
46590
|
case 0:
|
|
46484
46591
|
returnTo = returnToParam !== null && returnToParam !== void 0 ? returnToParam : this.getReturnTo(event);
|
|
46485
46592
|
finalEvent = {
|
|
@@ -46487,13 +46594,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46487
46594
|
saveBasket: true
|
|
46488
46595
|
};
|
|
46489
46596
|
if (!hideLoading) (_this$actions28 = this.actions) === null || _this$actions28 === void 0 || (_this$actions28$toggl = _this$actions28.toggleLoading) === null || _this$actions28$toggl === void 0 || _this$actions28$toggl.call(_this$actions28, 'Planner_Saving', false, true);
|
|
46490
|
-
|
|
46597
|
+
_context27.next = 5;
|
|
46491
46598
|
return this.saveToBasket(returnTo, finalEvent.event, repairOnly);
|
|
46492
46599
|
case 5:
|
|
46493
|
-
result =
|
|
46600
|
+
result = _context27.sent;
|
|
46494
46601
|
if (!hideLoading) (_this$actions29 = this.actions) === null || _this$actions29 === void 0 || (_this$actions29$toggl = _this$actions29.toggleLoading) === null || _this$actions29$toggl === void 0 || _this$actions29$toggl.call(_this$actions29, 'Planner_Saving', false, false);
|
|
46495
46602
|
if (!(result === 'canceled')) {
|
|
46496
|
-
|
|
46603
|
+
_context27.next = 11;
|
|
46497
46604
|
break;
|
|
46498
46605
|
}
|
|
46499
46606
|
LOG$1.error(new DivaError('failed to save Basket'));
|
|
@@ -46501,10 +46608,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46501
46608
|
text: ((_this$i18n12 = this.i18n()) === null || _this$i18n12 === void 0 ? void 0 : _this$i18n12.t('modal.general_error')) + ' --- ' + DivaUtils.formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils.getCurrentTraceId() ? ((_this$i18n13 = this.i18n()) === null || _this$i18n13 === void 0 ? void 0 : _this$i18n13.t('modal.errorcode')) + ': ' + DivaUtils.getCurrentTraceId() : '',
|
|
46502
46609
|
accept: true
|
|
46503
46610
|
});
|
|
46504
|
-
return
|
|
46611
|
+
return _context27.abrupt("return", result);
|
|
46505
46612
|
case 11:
|
|
46506
|
-
|
|
46507
|
-
|
|
46613
|
+
_context27.t0 = returnTo;
|
|
46614
|
+
_context27.next = _context27.t0 === 'OPEN_PDF' ? 14 : _context27.t0 === 'SAVE_BASKET_WITH_MODAL' ? 16 : _context27.t0 === 'OPEN_CONTACT_FORM' ? 17 : 17;
|
|
46508
46615
|
break;
|
|
46509
46616
|
case 14:
|
|
46510
46617
|
if (!this.getBasket().PDFDocumentURL) {
|
|
@@ -46524,7 +46631,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46524
46631
|
}
|
|
46525
46632
|
});
|
|
46526
46633
|
}
|
|
46527
|
-
return
|
|
46634
|
+
return _context27.abrupt("break", 17);
|
|
46528
46635
|
case 16:
|
|
46529
46636
|
(_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openModal({
|
|
46530
46637
|
text: (_this$i18n18 = this.i18n()) === null || _this$i18n18 === void 0 ? void 0 : _this$i18n18.t('modal.planning_saved'),
|
|
@@ -46532,20 +46639,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46532
46639
|
});
|
|
46533
46640
|
case 17:
|
|
46534
46641
|
if (!(result == 'noArticleToSave')) {
|
|
46535
|
-
|
|
46642
|
+
_context27.next = 20;
|
|
46536
46643
|
break;
|
|
46537
46644
|
}
|
|
46538
46645
|
(_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
|
|
46539
|
-
return
|
|
46646
|
+
return _context27.abrupt("return", 'canceled');
|
|
46540
46647
|
case 20:
|
|
46541
|
-
return
|
|
46648
|
+
return _context27.abrupt("return", result);
|
|
46542
46649
|
case 21:
|
|
46543
46650
|
case "end":
|
|
46544
|
-
return
|
|
46651
|
+
return _context27.stop();
|
|
46545
46652
|
}
|
|
46546
|
-
},
|
|
46653
|
+
}, _callee27, this);
|
|
46547
46654
|
}));
|
|
46548
|
-
function saveToBasketWrapper(
|
|
46655
|
+
function saveToBasketWrapper(_x77, _x78, _x79, _x80) {
|
|
46549
46656
|
return _saveToBasketWrapper.apply(this, arguments);
|
|
46550
46657
|
}
|
|
46551
46658
|
return saveToBasketWrapper;
|
|
@@ -46553,42 +46660,42 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46553
46660
|
}, {
|
|
46554
46661
|
key: "saveToBasket",
|
|
46555
46662
|
value: function () {
|
|
46556
|
-
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
46663
|
+
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(returnTo, event, repairOnly) {
|
|
46557
46664
|
var _returnTo, _returnTo2, _returnTo3, _this$actions34, _this$actions35, _this$divaBasketHandl2;
|
|
46558
46665
|
var set, actBasket, oldReturnTo, result, newDivaNr, _this$actSet10, arReady, _result, product;
|
|
46559
|
-
return _regeneratorRuntime.wrap(function
|
|
46560
|
-
while (1) switch (
|
|
46666
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
46667
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
46561
46668
|
case 0:
|
|
46562
46669
|
set = this.actSet();
|
|
46563
46670
|
if (!setHandlerInstance.isNoArticleToSave(this.sets)) {
|
|
46564
|
-
|
|
46671
|
+
_context28.next = 3;
|
|
46565
46672
|
break;
|
|
46566
46673
|
}
|
|
46567
|
-
return
|
|
46674
|
+
return _context28.abrupt("return", 'noArticleToSave');
|
|
46568
46675
|
case 3:
|
|
46569
46676
|
actBasket = this.divaBasketHandler.actBasket;
|
|
46570
46677
|
if (!((_returnTo = returnTo) !== null && _returnTo !== void 0 && _returnTo.startsWith('FAVORITS') && favoritesHandlerInstance.FavoritesDefined(set))) {
|
|
46571
|
-
|
|
46678
|
+
_context28.next = 12;
|
|
46572
46679
|
break;
|
|
46573
46680
|
}
|
|
46574
46681
|
oldReturnTo = returnTo;
|
|
46575
46682
|
this.ReturnTo = returnTo.replace('FAVORITS_', '');
|
|
46576
|
-
|
|
46683
|
+
_context28.next = 9;
|
|
46577
46684
|
return this.handleFavorites('SAVE');
|
|
46578
46685
|
case 9:
|
|
46579
|
-
result =
|
|
46686
|
+
result = _context28.sent;
|
|
46580
46687
|
if (result === 'canceled') {
|
|
46581
46688
|
this.ReturnTo = oldReturnTo;
|
|
46582
46689
|
}
|
|
46583
|
-
return
|
|
46690
|
+
return _context28.abrupt("return", result);
|
|
46584
46691
|
case 12:
|
|
46585
|
-
|
|
46586
|
-
|
|
46587
|
-
|
|
46692
|
+
_context28.t0 = this.divaBasketHandler;
|
|
46693
|
+
_context28.t1 = this.divaBasketHandler.actDivaNr;
|
|
46694
|
+
_context28.next = 16;
|
|
46588
46695
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
|
|
46589
46696
|
case 16:
|
|
46590
|
-
|
|
46591
|
-
|
|
46697
|
+
_context28.t2 = _context28.sent;
|
|
46698
|
+
_context28.t0.setBasketData.call(_context28.t0, _context28.t1, _context28.t2);
|
|
46592
46699
|
if ((_returnTo2 = returnTo) !== null && _returnTo2 !== void 0 && _returnTo2.endsWith('OPEN_SELLER_BASKET')) {
|
|
46593
46700
|
this.ReturnTo = 'OPEN_SELLER_BASKET';
|
|
46594
46701
|
returnTo = this.ReturnTo;
|
|
@@ -46603,11 +46710,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46603
46710
|
this.divaBasketHandler.fillOrigConfigurations();
|
|
46604
46711
|
actBasket.Updated = Date.now();
|
|
46605
46712
|
if (!returnTo) {
|
|
46606
|
-
|
|
46713
|
+
_context28.next = 52;
|
|
46607
46714
|
break;
|
|
46608
46715
|
}
|
|
46609
|
-
|
|
46610
|
-
|
|
46716
|
+
_context28.t3 = returnTo;
|
|
46717
|
+
_context28.next = _context28.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 27 : _context28.t3 === 'OPEN_SELLER_BASKET' ? 29 : _context28.t3 === 'OPEN_PDF' ? 32 : _context28.t3 === 'SAVE_BASKET_WITH_MODAL' ? 32 : _context28.t3 === 'SAVE_BASKET' ? 32 : _context28.t3 === 'SAVE_BASKET_SYNC' ? 32 : 52;
|
|
46611
46718
|
break;
|
|
46612
46719
|
case 27:
|
|
46613
46720
|
(_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.openComponent({
|
|
@@ -46620,7 +46727,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46620
46727
|
basketData: actBasket
|
|
46621
46728
|
}
|
|
46622
46729
|
});
|
|
46623
|
-
return
|
|
46730
|
+
return _context28.abrupt("break", 52);
|
|
46624
46731
|
case 29:
|
|
46625
46732
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
46626
46733
|
actBasket.setDocumentVersion(actBasket.getDocumentVersion() + 1);
|
|
@@ -46635,23 +46742,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46635
46742
|
basketData: actBasket
|
|
46636
46743
|
}
|
|
46637
46744
|
});
|
|
46638
|
-
return
|
|
46745
|
+
return _context28.abrupt("break", 52);
|
|
46639
46746
|
case 32:
|
|
46640
46747
|
if (!(event == 'onSaveProduct')) {
|
|
46641
|
-
|
|
46748
|
+
_context28.next = 42;
|
|
46642
46749
|
break;
|
|
46643
46750
|
}
|
|
46644
46751
|
//copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
|
|
46645
46752
|
actBasket = new BasketData(JSON.parse(JSON.stringify(actBasket)));
|
|
46646
|
-
|
|
46753
|
+
_context28.next = 36;
|
|
46647
46754
|
return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
|
|
46648
46755
|
case 36:
|
|
46649
|
-
|
|
46756
|
+
_context28.next = 38;
|
|
46650
46757
|
return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
|
|
46651
46758
|
case 38:
|
|
46652
|
-
newDivaNr =
|
|
46759
|
+
newDivaNr = _context28.sent;
|
|
46653
46760
|
actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
|
|
46654
|
-
|
|
46761
|
+
_context28.next = 51;
|
|
46655
46762
|
break;
|
|
46656
46763
|
case 42:
|
|
46657
46764
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
@@ -46661,32 +46768,32 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46661
46768
|
this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
|
|
46662
46769
|
actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
|
|
46663
46770
|
arReady = !!((_this$actSet10 = this.actSet()) !== null && _this$actSet10 !== void 0 && _this$actSet10.CatalogData.divaArReady);
|
|
46664
|
-
|
|
46771
|
+
_context28.next = 48;
|
|
46665
46772
|
return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo, arReady);
|
|
46666
46773
|
case 48:
|
|
46667
|
-
_result =
|
|
46774
|
+
_result = _context28.sent;
|
|
46668
46775
|
if (!(_result === 'ERROR_NO_BASKET_SAVED' || _result === 'ERROR_BASKET_AFTER_SAVE')) {
|
|
46669
|
-
|
|
46776
|
+
_context28.next = 51;
|
|
46670
46777
|
break;
|
|
46671
46778
|
}
|
|
46672
|
-
return
|
|
46779
|
+
return _context28.abrupt("return", 'canceled');
|
|
46673
46780
|
case 51:
|
|
46674
|
-
return
|
|
46781
|
+
return _context28.abrupt("break", 52);
|
|
46675
46782
|
case 52:
|
|
46676
46783
|
if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
|
|
46677
46784
|
actBasket = (_this$divaBasketHandl2 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl2 !== void 0 ? _this$divaBasketHandl2 : actBasket; //get pdf documenturl from saved basket
|
|
46678
|
-
|
|
46785
|
+
_context28.next = 56;
|
|
46679
46786
|
return this.addToBasket(actBasket, event);
|
|
46680
46787
|
case 56:
|
|
46681
|
-
product =
|
|
46682
|
-
return
|
|
46788
|
+
product = _context28.sent;
|
|
46789
|
+
return _context28.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
|
|
46683
46790
|
case 58:
|
|
46684
46791
|
case "end":
|
|
46685
|
-
return
|
|
46792
|
+
return _context28.stop();
|
|
46686
46793
|
}
|
|
46687
|
-
},
|
|
46794
|
+
}, _callee28, this);
|
|
46688
46795
|
}));
|
|
46689
|
-
function saveToBasket(
|
|
46796
|
+
function saveToBasket(_x81, _x82, _x83) {
|
|
46690
46797
|
return _saveToBasket.apply(this, arguments);
|
|
46691
46798
|
}
|
|
46692
46799
|
return saveToBasket;
|
|
@@ -46701,26 +46808,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46701
46808
|
}, {
|
|
46702
46809
|
key: "generateAiImageWithReferenceImages",
|
|
46703
46810
|
value: function () {
|
|
46704
|
-
var _generateAiImageWithReferenceImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
46811
|
+
var _generateAiImageWithReferenceImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(data, leadKey) {
|
|
46705
46812
|
var _this$actSet11, _this$state6, _this$actSet12;
|
|
46706
|
-
return _regeneratorRuntime.wrap(function
|
|
46707
|
-
while (1) switch (
|
|
46813
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
46814
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
46708
46815
|
case 0:
|
|
46709
46816
|
(_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 || _this$actSet11.CatalogData.catalogCodex;
|
|
46710
|
-
|
|
46817
|
+
_context29.next = 3;
|
|
46711
46818
|
return this.api.generateAiImageWithReferenceImages(_objectSpread$6(_objectSpread$6({}, data), {}, {
|
|
46712
46819
|
userId: (_this$state6 = this.state) === null || _this$state6 === void 0 || (_this$state6 = _this$state6.user) === null || _this$state6 === void 0 ? void 0 : _this$state6._id,
|
|
46713
46820
|
catalogCodex: (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.CatalogData.catalogCodex
|
|
46714
46821
|
}), leadKey);
|
|
46715
46822
|
case 3:
|
|
46716
|
-
return
|
|
46823
|
+
return _context29.abrupt("return", _context29.sent);
|
|
46717
46824
|
case 4:
|
|
46718
46825
|
case "end":
|
|
46719
|
-
return
|
|
46826
|
+
return _context29.stop();
|
|
46720
46827
|
}
|
|
46721
|
-
},
|
|
46828
|
+
}, _callee29, this);
|
|
46722
46829
|
}));
|
|
46723
|
-
function generateAiImageWithReferenceImages(
|
|
46830
|
+
function generateAiImageWithReferenceImages(_x84, _x85) {
|
|
46724
46831
|
return _generateAiImageWithReferenceImages.apply(this, arguments);
|
|
46725
46832
|
}
|
|
46726
46833
|
return generateAiImageWithReferenceImages;
|
|
@@ -46728,25 +46835,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46728
46835
|
}, {
|
|
46729
46836
|
key: "getUsageLimits",
|
|
46730
46837
|
value: function () {
|
|
46731
|
-
var _getUsageLimits = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
46838
|
+
var _getUsageLimits = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30() {
|
|
46732
46839
|
var _localStorage$getItem, _localStorage;
|
|
46733
46840
|
var leadKey;
|
|
46734
|
-
return _regeneratorRuntime.wrap(function
|
|
46735
|
-
while (1) switch (
|
|
46841
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
46842
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
46736
46843
|
case 0:
|
|
46737
46844
|
// Get lead key from localStorage if it exists (for anonymous users)
|
|
46738
46845
|
leadKey = (_localStorage$getItem = (_localStorage = localStorage) === null || _localStorage === void 0 ? void 0 : _localStorage.getItem('diva_lead_key')) !== null && _localStorage$getItem !== void 0 ? _localStorage$getItem : undefined;
|
|
46739
|
-
|
|
46846
|
+
_context30.next = 3;
|
|
46740
46847
|
return this.api.getUsageLimits(leadKey ? {
|
|
46741
46848
|
leadKey: leadKey
|
|
46742
46849
|
} : undefined);
|
|
46743
46850
|
case 3:
|
|
46744
|
-
return
|
|
46851
|
+
return _context30.abrupt("return", _context30.sent);
|
|
46745
46852
|
case 4:
|
|
46746
46853
|
case "end":
|
|
46747
|
-
return
|
|
46854
|
+
return _context30.stop();
|
|
46748
46855
|
}
|
|
46749
|
-
},
|
|
46856
|
+
}, _callee30, this);
|
|
46750
46857
|
}));
|
|
46751
46858
|
function getUsageLimits() {
|
|
46752
46859
|
return _getUsageLimits.apply(this, arguments);
|
|
@@ -46756,22 +46863,22 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46756
46863
|
}, {
|
|
46757
46864
|
key: "getAiRoomRenderings",
|
|
46758
46865
|
value: function () {
|
|
46759
|
-
var _getAiRoomRenderings = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
46866
|
+
var _getAiRoomRenderings = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31() {
|
|
46760
46867
|
var _this$state7;
|
|
46761
46868
|
var organizationId;
|
|
46762
|
-
return _regeneratorRuntime.wrap(function
|
|
46763
|
-
while (1) switch (
|
|
46869
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
46870
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
46764
46871
|
case 0:
|
|
46765
46872
|
organizationId = (_this$state7 = this.state) === null || _this$state7 === void 0 ? void 0 : _this$state7.organization._id;
|
|
46766
|
-
|
|
46873
|
+
_context31.next = 3;
|
|
46767
46874
|
return this.api.getAiRoomRenderings(organizationId);
|
|
46768
46875
|
case 3:
|
|
46769
|
-
return
|
|
46876
|
+
return _context31.abrupt("return", _context31.sent);
|
|
46770
46877
|
case 4:
|
|
46771
46878
|
case "end":
|
|
46772
|
-
return
|
|
46879
|
+
return _context31.stop();
|
|
46773
46880
|
}
|
|
46774
|
-
},
|
|
46881
|
+
}, _callee31, this);
|
|
46775
46882
|
}));
|
|
46776
46883
|
function getAiRoomRenderings() {
|
|
46777
46884
|
return _getAiRoomRenderings.apply(this, arguments);
|
|
@@ -46781,21 +46888,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46781
46888
|
}, {
|
|
46782
46889
|
key: "createLeadKey",
|
|
46783
46890
|
value: function () {
|
|
46784
|
-
var _createLeadKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
46785
|
-
return _regeneratorRuntime.wrap(function
|
|
46786
|
-
while (1) switch (
|
|
46891
|
+
var _createLeadKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32(email) {
|
|
46892
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
46893
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
46787
46894
|
case 0:
|
|
46788
|
-
|
|
46895
|
+
_context32.next = 2;
|
|
46789
46896
|
return this.api.createLeadKey(email);
|
|
46790
46897
|
case 2:
|
|
46791
|
-
return
|
|
46898
|
+
return _context32.abrupt("return", _context32.sent);
|
|
46792
46899
|
case 3:
|
|
46793
46900
|
case "end":
|
|
46794
|
-
return
|
|
46901
|
+
return _context32.stop();
|
|
46795
46902
|
}
|
|
46796
|
-
},
|
|
46903
|
+
}, _callee32, this);
|
|
46797
46904
|
}));
|
|
46798
|
-
function createLeadKey(
|
|
46905
|
+
function createLeadKey(_x86) {
|
|
46799
46906
|
return _createLeadKey.apply(this, arguments);
|
|
46800
46907
|
}
|
|
46801
46908
|
return createLeadKey;
|
|
@@ -47079,23 +47186,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47079
47186
|
}, {
|
|
47080
47187
|
key: "getBasketDataWithEkText",
|
|
47081
47188
|
value: function () {
|
|
47082
|
-
var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
47083
|
-
return _regeneratorRuntime.wrap(function
|
|
47084
|
-
while (1) switch (
|
|
47189
|
+
var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33() {
|
|
47190
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
47191
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
47085
47192
|
case 0:
|
|
47086
|
-
|
|
47087
|
-
|
|
47088
|
-
|
|
47193
|
+
_context33.t0 = this.divaBasketHandler;
|
|
47194
|
+
_context33.t1 = this.divaBasketHandler.actDivaNr;
|
|
47195
|
+
_context33.next = 4;
|
|
47089
47196
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, true, this.doAllowSetPlanner(), this.ReturnTo);
|
|
47090
47197
|
case 4:
|
|
47091
|
-
|
|
47092
|
-
|
|
47093
|
-
return
|
|
47198
|
+
_context33.t2 = _context33.sent;
|
|
47199
|
+
_context33.t0.setBasketData.call(_context33.t0, _context33.t1, _context33.t2);
|
|
47200
|
+
return _context33.abrupt("return", this.divaBasketHandler.actBasket);
|
|
47094
47201
|
case 7:
|
|
47095
47202
|
case "end":
|
|
47096
|
-
return
|
|
47203
|
+
return _context33.stop();
|
|
47097
47204
|
}
|
|
47098
|
-
},
|
|
47205
|
+
}, _callee33, this);
|
|
47099
47206
|
}));
|
|
47100
47207
|
function getBasketDataWithEkText() {
|
|
47101
47208
|
return _getBasketDataWithEkText.apply(this, arguments);
|
|
@@ -47121,7 +47228,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47121
47228
|
}, {
|
|
47122
47229
|
key: "addToBasket",
|
|
47123
47230
|
value: function () {
|
|
47124
|
-
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
47231
|
+
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(actBasket) {
|
|
47125
47232
|
var _this$actions36,
|
|
47126
47233
|
_this$actions37,
|
|
47127
47234
|
_this$actions38,
|
|
@@ -47140,44 +47247,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47140
47247
|
to,
|
|
47141
47248
|
variants,
|
|
47142
47249
|
products,
|
|
47143
|
-
|
|
47144
|
-
return _regeneratorRuntime.wrap(function
|
|
47145
|
-
while (1) switch (
|
|
47250
|
+
_args34 = arguments;
|
|
47251
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
47252
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
47146
47253
|
case 0:
|
|
47147
|
-
event =
|
|
47148
|
-
|
|
47149
|
-
|
|
47254
|
+
event = _args34.length > 1 && _args34[1] !== undefined ? _args34[1] : 'onAddToBasket';
|
|
47255
|
+
_context34.t0 = event;
|
|
47256
|
+
_context34.next = _context34.t0 === 'onWebPlanerPrint' ? 4 : _context34.t0 === 'onWebPlanerSave' ? 6 : _context34.t0 === 'onWebPlanerShare' ? 8 : _context34.t0 === 'onRequestConsulation' ? 10 : _context34.t0 === 'onSave' ? 12 : _context34.t0 === 'onSendEmail' ? 14 : _context34.t0 === 'onSaveProduct' ? 19 : _context34.t0 === 'dontSaveBasket' ? 26 : _context34.t0 === 'onAddToBasket' ? 26 : 28;
|
|
47150
47257
|
break;
|
|
47151
47258
|
case 4:
|
|
47152
47259
|
(_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
|
|
47153
47260
|
type: 'onWebPlanerPrint',
|
|
47154
47261
|
data: actBasket.getAsJson()
|
|
47155
47262
|
});
|
|
47156
|
-
return
|
|
47263
|
+
return _context34.abrupt("break", 30);
|
|
47157
47264
|
case 6:
|
|
47158
47265
|
(_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
|
|
47159
47266
|
type: 'onWebPlanerSave',
|
|
47160
47267
|
data: actBasket.getAsJson()
|
|
47161
47268
|
});
|
|
47162
|
-
return
|
|
47269
|
+
return _context34.abrupt("break", 30);
|
|
47163
47270
|
case 8:
|
|
47164
47271
|
(_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
|
|
47165
47272
|
type: 'onWebPlanerShare',
|
|
47166
47273
|
data: actBasket.getAsJson()
|
|
47167
47274
|
});
|
|
47168
|
-
return
|
|
47275
|
+
return _context34.abrupt("break", 30);
|
|
47169
47276
|
case 10:
|
|
47170
47277
|
(_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
|
|
47171
47278
|
type: 'onRequestConsulation',
|
|
47172
47279
|
data: actBasket.getAsJson()
|
|
47173
47280
|
});
|
|
47174
|
-
return
|
|
47281
|
+
return _context34.abrupt("break", 30);
|
|
47175
47282
|
case 12:
|
|
47176
47283
|
(_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
|
|
47177
47284
|
type: 'onSave',
|
|
47178
47285
|
data: actBasket.getAsJson()
|
|
47179
47286
|
});
|
|
47180
|
-
return
|
|
47287
|
+
return _context34.abrupt("break", 30);
|
|
47181
47288
|
case 14:
|
|
47182
47289
|
emailConfig = (_this$divaBasketHandl4 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : this.getEmailConfig(); //reset the emailConfig
|
|
47183
47290
|
this.divaBasketHandler.emailConfig = undefined;
|
|
@@ -47212,43 +47319,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47212
47319
|
type: 'onAddToBasket',
|
|
47213
47320
|
data: actBasket.getAsJson()
|
|
47214
47321
|
});
|
|
47215
|
-
return
|
|
47322
|
+
return _context34.abrupt("break", 30);
|
|
47216
47323
|
case 19:
|
|
47217
47324
|
this.actSet().CatalogData;
|
|
47218
|
-
|
|
47325
|
+
_context34.next = 22;
|
|
47219
47326
|
return this.api.saveAsProduct(this.sets, actBasket);
|
|
47220
47327
|
case 22:
|
|
47221
|
-
products =
|
|
47328
|
+
products = _context34.sent;
|
|
47222
47329
|
(_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
|
|
47223
47330
|
type: 'onAddToBasket',
|
|
47224
47331
|
data: actBasket.getAsJson()
|
|
47225
47332
|
});
|
|
47226
47333
|
if (!products) {
|
|
47227
|
-
|
|
47334
|
+
_context34.next = 26;
|
|
47228
47335
|
break;
|
|
47229
47336
|
}
|
|
47230
|
-
return
|
|
47337
|
+
return _context34.abrupt("return", products[0]);
|
|
47231
47338
|
case 26:
|
|
47232
47339
|
(_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
|
|
47233
47340
|
type: 'onAddToBasket',
|
|
47234
47341
|
data: actBasket.getAsJson()
|
|
47235
47342
|
});
|
|
47236
|
-
return
|
|
47343
|
+
return _context34.abrupt("break", 30);
|
|
47237
47344
|
case 28:
|
|
47238
47345
|
(_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
|
|
47239
47346
|
type: event,
|
|
47240
47347
|
data: actBasket.getAsJson()
|
|
47241
47348
|
});
|
|
47242
|
-
return
|
|
47349
|
+
return _context34.abrupt("break", 30);
|
|
47243
47350
|
case 30:
|
|
47244
|
-
return
|
|
47351
|
+
return _context34.abrupt("return");
|
|
47245
47352
|
case 31:
|
|
47246
47353
|
case "end":
|
|
47247
|
-
return
|
|
47354
|
+
return _context34.stop();
|
|
47248
47355
|
}
|
|
47249
|
-
},
|
|
47356
|
+
}, _callee34, this);
|
|
47250
47357
|
}));
|
|
47251
|
-
function addToBasket(
|
|
47358
|
+
function addToBasket(_x87) {
|
|
47252
47359
|
return _addToBasket.apply(this, arguments);
|
|
47253
47360
|
}
|
|
47254
47361
|
return addToBasket;
|
|
@@ -47303,28 +47410,28 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47303
47410
|
}, {
|
|
47304
47411
|
key: "getCurrentBasket",
|
|
47305
47412
|
value: function () {
|
|
47306
|
-
var _getCurrentBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
47413
|
+
var _getCurrentBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35(event, force, returnTo, dontGoToSummary, hideLoading) {
|
|
47307
47414
|
var _this$actSet38, _this$divaBasketHandl5, _this$onClickAddToBas3;
|
|
47308
|
-
return _regeneratorRuntime.wrap(function
|
|
47309
|
-
while (1) switch (
|
|
47415
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
47416
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
47310
47417
|
case 0:
|
|
47311
47418
|
if (!(this.divaBasketHandler.basketWasSavedWithCurrentDocVersion && ((_this$actSet38 = this.actSet()) === null || _this$actSet38 === void 0 ? void 0 : _this$actSet38.setHash) === ((_this$divaBasketHandl5 = this.divaBasketHandler.actBasket) === null || _this$divaBasketHandl5 === void 0 || (_this$divaBasketHandl5 = _this$divaBasketHandl5.OrderSets) === null || _this$divaBasketHandl5 === void 0 ? void 0 : _this$divaBasketHandl5[0].SetHash) && !(returnTo !== null && returnTo !== void 0 && returnTo.includes('OPEN')))) {
|
|
47312
|
-
|
|
47419
|
+
_context35.next = 2;
|
|
47313
47420
|
break;
|
|
47314
47421
|
}
|
|
47315
|
-
return
|
|
47422
|
+
return _context35.abrupt("return", 'BASKET_ALREADY_SAVED');
|
|
47316
47423
|
case 2:
|
|
47317
|
-
|
|
47424
|
+
_context35.next = 4;
|
|
47318
47425
|
return (_this$onClickAddToBas3 = this.onClickAddToBasket) === null || _this$onClickAddToBas3 === void 0 ? void 0 : _this$onClickAddToBas3.call(this, undefined, event, force, returnTo, dontGoToSummary, hideLoading);
|
|
47319
47426
|
case 4:
|
|
47320
|
-
return
|
|
47427
|
+
return _context35.abrupt("return", !!_context35.sent);
|
|
47321
47428
|
case 5:
|
|
47322
47429
|
case "end":
|
|
47323
|
-
return
|
|
47430
|
+
return _context35.stop();
|
|
47324
47431
|
}
|
|
47325
|
-
},
|
|
47432
|
+
}, _callee35, this);
|
|
47326
47433
|
}));
|
|
47327
|
-
function getCurrentBasket(
|
|
47434
|
+
function getCurrentBasket(_x88, _x89, _x90, _x91, _x92) {
|
|
47328
47435
|
return _getCurrentBasket.apply(this, arguments);
|
|
47329
47436
|
}
|
|
47330
47437
|
return getCurrentBasket;
|
|
@@ -47546,9 +47653,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47546
47653
|
key: "initApiForLogicOnly",
|
|
47547
47654
|
value: //just for testing purposes
|
|
47548
47655
|
function () {
|
|
47549
|
-
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
47550
|
-
return _regeneratorRuntime.wrap(function
|
|
47551
|
-
while (1) switch (
|
|
47656
|
+
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee36(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
|
|
47657
|
+
return _regeneratorRuntime.wrap(function _callee36$(_context36) {
|
|
47658
|
+
while (1) switch (_context36.prev = _context36.next) {
|
|
47552
47659
|
case 0:
|
|
47553
47660
|
//empty services
|
|
47554
47661
|
this.api = new DivaApiHandler(_objectSpread$6(_objectSpread$6({}, this.plannerConfig), {}, {
|
|
@@ -47561,17 +47668,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47561
47668
|
jwt: jwt,
|
|
47562
47669
|
apiKey: apiKey
|
|
47563
47670
|
}), handler);
|
|
47564
|
-
|
|
47671
|
+
_context36.next = 3;
|
|
47565
47672
|
return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
|
|
47566
47673
|
case 3:
|
|
47567
47674
|
this.plannerHandler = new DivaPlannerHandler(true);
|
|
47568
47675
|
case 4:
|
|
47569
47676
|
case "end":
|
|
47570
|
-
return
|
|
47677
|
+
return _context36.stop();
|
|
47571
47678
|
}
|
|
47572
|
-
},
|
|
47679
|
+
}, _callee36, this);
|
|
47573
47680
|
}));
|
|
47574
|
-
function initApiForLogicOnly(
|
|
47681
|
+
function initApiForLogicOnly(_x93, _x94, _x95, _x96, _x97, _x98, _x99) {
|
|
47575
47682
|
return _initApiForLogicOnly.apply(this, arguments);
|
|
47576
47683
|
}
|
|
47577
47684
|
return initApiForLogicOnly;
|
|
@@ -47584,16 +47691,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47584
47691
|
}, {
|
|
47585
47692
|
key: "loadBasket",
|
|
47586
47693
|
value: function () {
|
|
47587
|
-
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
47588
|
-
return _regeneratorRuntime.wrap(function
|
|
47589
|
-
while (1) switch (
|
|
47694
|
+
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee37() {
|
|
47695
|
+
return _regeneratorRuntime.wrap(function _callee37$(_context37) {
|
|
47696
|
+
while (1) switch (_context37.prev = _context37.next) {
|
|
47590
47697
|
case 0:
|
|
47591
|
-
return
|
|
47698
|
+
return _context37.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
|
|
47592
47699
|
case 1:
|
|
47593
47700
|
case "end":
|
|
47594
|
-
return
|
|
47701
|
+
return _context37.stop();
|
|
47595
47702
|
}
|
|
47596
|
-
},
|
|
47703
|
+
}, _callee37, this);
|
|
47597
47704
|
}));
|
|
47598
47705
|
function loadBasket() {
|
|
47599
47706
|
return _loadBasket.apply(this, arguments);
|
|
@@ -47608,39 +47715,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47608
47715
|
}, {
|
|
47609
47716
|
key: "initBasket",
|
|
47610
47717
|
value: function () {
|
|
47611
|
-
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
47718
|
+
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee38(init3D, ignoreFavorites) {
|
|
47612
47719
|
var initSetState, set, basket;
|
|
47613
|
-
return _regeneratorRuntime.wrap(function
|
|
47614
|
-
while (1) switch (
|
|
47720
|
+
return _regeneratorRuntime.wrap(function _callee38$(_context38) {
|
|
47721
|
+
while (1) switch (_context38.prev = _context38.next) {
|
|
47615
47722
|
case 0:
|
|
47616
47723
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
47617
47724
|
initSetState = this.getInitStateForSet(!init3D);
|
|
47618
47725
|
this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
47619
|
-
|
|
47726
|
+
_context38.next = 5;
|
|
47620
47727
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
47621
47728
|
case 5:
|
|
47622
47729
|
//TODO check if when basket gets repaired the product match gets called
|
|
47623
47730
|
set = this.actSet();
|
|
47624
47731
|
setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
|
|
47625
47732
|
if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
|
|
47626
|
-
|
|
47733
|
+
_context38.next = 10;
|
|
47627
47734
|
break;
|
|
47628
47735
|
}
|
|
47629
|
-
|
|
47736
|
+
_context38.next = 10;
|
|
47630
47737
|
return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
|
|
47631
47738
|
case 10:
|
|
47632
|
-
|
|
47739
|
+
_context38.next = 12;
|
|
47633
47740
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
|
|
47634
47741
|
case 12:
|
|
47635
|
-
basket =
|
|
47636
|
-
return
|
|
47742
|
+
basket = _context38.sent;
|
|
47743
|
+
return _context38.abrupt("return", basket);
|
|
47637
47744
|
case 14:
|
|
47638
47745
|
case "end":
|
|
47639
|
-
return
|
|
47746
|
+
return _context38.stop();
|
|
47640
47747
|
}
|
|
47641
|
-
},
|
|
47748
|
+
}, _callee38, this);
|
|
47642
47749
|
}));
|
|
47643
|
-
function initBasket(
|
|
47750
|
+
function initBasket(_x100, _x101) {
|
|
47644
47751
|
return _initBasket.apply(this, arguments);
|
|
47645
47752
|
}
|
|
47646
47753
|
return initBasket;
|
|
@@ -47671,21 +47778,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47671
47778
|
}, {
|
|
47672
47779
|
key: "getValidVariantsLength",
|
|
47673
47780
|
value: function () {
|
|
47674
|
-
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
47781
|
+
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee39() {
|
|
47675
47782
|
var set;
|
|
47676
|
-
return _regeneratorRuntime.wrap(function
|
|
47677
|
-
while (1) switch (
|
|
47783
|
+
return _regeneratorRuntime.wrap(function _callee39$(_context39) {
|
|
47784
|
+
while (1) switch (_context39.prev = _context39.next) {
|
|
47678
47785
|
case 0:
|
|
47679
47786
|
set = this.actSet();
|
|
47680
|
-
|
|
47787
|
+
_context39.next = 3;
|
|
47681
47788
|
return favoritesHandlerInstance.getValidVariants(set, true);
|
|
47682
47789
|
case 3:
|
|
47683
|
-
return
|
|
47790
|
+
return _context39.abrupt("return", _context39.sent.length);
|
|
47684
47791
|
case 4:
|
|
47685
47792
|
case "end":
|
|
47686
|
-
return
|
|
47793
|
+
return _context39.stop();
|
|
47687
47794
|
}
|
|
47688
|
-
},
|
|
47795
|
+
}, _callee39, this);
|
|
47689
47796
|
}));
|
|
47690
47797
|
function getValidVariantsLength() {
|
|
47691
47798
|
return _getValidVariantsLength.apply(this, arguments);
|
|
@@ -47695,46 +47802,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47695
47802
|
}, {
|
|
47696
47803
|
key: "handleFavorites",
|
|
47697
47804
|
value: function () {
|
|
47698
|
-
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
47805
|
+
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee40(mode) {
|
|
47699
47806
|
var _this5 = this;
|
|
47700
47807
|
var set, i;
|
|
47701
|
-
return _regeneratorRuntime.wrap(function
|
|
47702
|
-
while (1) switch (
|
|
47808
|
+
return _regeneratorRuntime.wrap(function _callee40$(_context40) {
|
|
47809
|
+
while (1) switch (_context40.prev = _context40.next) {
|
|
47703
47810
|
case 0:
|
|
47704
47811
|
set = this.actSet();
|
|
47705
47812
|
i = 0;
|
|
47706
47813
|
case 2:
|
|
47707
47814
|
if (!favoritesHandlerInstance.IsCalcForSummary) {
|
|
47708
|
-
|
|
47815
|
+
_context40.next = 11;
|
|
47709
47816
|
break;
|
|
47710
47817
|
}
|
|
47711
|
-
|
|
47818
|
+
_context40.next = 5;
|
|
47712
47819
|
return DivaUtils.Sleep(200);
|
|
47713
47820
|
case 5:
|
|
47714
47821
|
i++;
|
|
47715
47822
|
if (!(i > 1000)) {
|
|
47716
|
-
|
|
47823
|
+
_context40.next = 9;
|
|
47717
47824
|
break;
|
|
47718
47825
|
}
|
|
47719
47826
|
LOG$1.error(new DivaError('error on generating Variants of Summary'));
|
|
47720
|
-
return
|
|
47827
|
+
return _context40.abrupt("break", 11);
|
|
47721
47828
|
case 9:
|
|
47722
|
-
|
|
47829
|
+
_context40.next = 2;
|
|
47723
47830
|
break;
|
|
47724
47831
|
case 11:
|
|
47725
|
-
|
|
47832
|
+
_context40.next = 13;
|
|
47726
47833
|
return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
|
|
47727
47834
|
return _this5.update2DGrid(set);
|
|
47728
47835
|
}, this.actions);
|
|
47729
47836
|
case 13:
|
|
47730
|
-
return
|
|
47837
|
+
return _context40.abrupt("return", _context40.sent);
|
|
47731
47838
|
case 14:
|
|
47732
47839
|
case "end":
|
|
47733
|
-
return
|
|
47840
|
+
return _context40.stop();
|
|
47734
47841
|
}
|
|
47735
|
-
},
|
|
47842
|
+
}, _callee40, this);
|
|
47736
47843
|
}));
|
|
47737
|
-
function handleFavorites(
|
|
47844
|
+
function handleFavorites(_x102) {
|
|
47738
47845
|
return _handleFavorites.apply(this, arguments);
|
|
47739
47846
|
}
|
|
47740
47847
|
return handleFavorites;
|
|
@@ -47747,48 +47854,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47747
47854
|
}, {
|
|
47748
47855
|
key: "initSapOrderLinesFromBasket",
|
|
47749
47856
|
value: function () {
|
|
47750
|
-
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
47857
|
+
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee41(divaNr, init3D, onlyLoadOldBakset) {
|
|
47751
47858
|
var result, oldBasket, basket;
|
|
47752
|
-
return _regeneratorRuntime.wrap(function
|
|
47753
|
-
while (1) switch (
|
|
47859
|
+
return _regeneratorRuntime.wrap(function _callee41$(_context41) {
|
|
47860
|
+
while (1) switch (_context41.prev = _context41.next) {
|
|
47754
47861
|
case 0:
|
|
47755
47862
|
if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
47756
|
-
|
|
47863
|
+
_context41.next = 3;
|
|
47757
47864
|
return this.loadBasket();
|
|
47758
47865
|
case 3:
|
|
47759
|
-
result =
|
|
47866
|
+
result = _context41.sent;
|
|
47760
47867
|
if (!onlyLoadOldBakset) {
|
|
47761
|
-
|
|
47868
|
+
_context41.next = 6;
|
|
47762
47869
|
break;
|
|
47763
47870
|
}
|
|
47764
|
-
return
|
|
47871
|
+
return _context41.abrupt("return", {
|
|
47765
47872
|
oldBasket: new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
|
|
47766
47873
|
cache: {}
|
|
47767
47874
|
});
|
|
47768
47875
|
case 6:
|
|
47769
47876
|
if (!(result === false)) {
|
|
47770
|
-
|
|
47877
|
+
_context41.next = 8;
|
|
47771
47878
|
break;
|
|
47772
47879
|
}
|
|
47773
47880
|
throw new Error('Could not load basket! ' + divaNr);
|
|
47774
47881
|
case 8:
|
|
47775
47882
|
oldBasket = new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
|
|
47776
|
-
|
|
47883
|
+
_context41.next = 11;
|
|
47777
47884
|
return this.initBasket(init3D);
|
|
47778
47885
|
case 11:
|
|
47779
|
-
basket =
|
|
47780
|
-
return
|
|
47886
|
+
basket = _context41.sent;
|
|
47887
|
+
return _context41.abrupt("return", {
|
|
47781
47888
|
basket: basket,
|
|
47782
47889
|
oldBasket: oldBasket,
|
|
47783
47890
|
cache: this.api.getJsonDataCache()
|
|
47784
47891
|
});
|
|
47785
47892
|
case 13:
|
|
47786
47893
|
case "end":
|
|
47787
|
-
return
|
|
47894
|
+
return _context41.stop();
|
|
47788
47895
|
}
|
|
47789
|
-
},
|
|
47896
|
+
}, _callee41, this);
|
|
47790
47897
|
}));
|
|
47791
|
-
function initSapOrderLinesFromBasket(
|
|
47898
|
+
function initSapOrderLinesFromBasket(_x103, _x104, _x105) {
|
|
47792
47899
|
return _initSapOrderLinesFromBasket.apply(this, arguments);
|
|
47793
47900
|
}
|
|
47794
47901
|
return initSapOrderLinesFromBasket;
|