@crystaldesign/web-planner-logic 26.11.0-rc.1 → 26.12.0-beta.2
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-09ef8b53.js → DivaBoxPlanner-2c699ee3.js} +2 -2
- package/build/cjs/{DivaStandardPlanner-f9c9284b.js → DivaStandardPlanner-3d6a05bc.js} +2 -2
- package/build/cjs/{DoorPlanner-6e2b37b7.js → DoorPlanner-adda9c0d.js} +1 -1
- package/build/cjs/{Host3DSignalR-5687248a.js → Host3DSignalR-6914541f.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-5c82a64e.js → LiviqueWWSHandler-635cffae.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-ef4d83f5.js → PfisterWWSHandler-d95419db.js} +1 -1
- package/build/cjs/{PlannerHandler2D-b119454b.js → PlannerHandler2D-b76ba907.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-c18a8c41.js → SeriousBasketHandler-777904e8.js} +1 -1
- package/build/cjs/{ShelfPlanner-280e11f9.js → ShelfPlanner-5ffd15a2.js} +1 -1
- package/build/cjs/{StandardWWSHandler-b37fd508.js → StandardWWSHandler-e92acae6.js} +1 -1
- package/build/cjs/{index-d8c5b455.js → index-d516d2b2.js} +1129 -809
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-d72edaef.js → DivaBoxPlanner-6f0727a3.js} +2 -2
- package/build/esm/{DivaStandardPlanner-2cec0f8b.js → DivaStandardPlanner-7188da61.js} +2 -2
- package/build/esm/{DoorPlanner-bf42b0d7.js → DoorPlanner-74bcd21d.js} +1 -1
- package/build/esm/{Host3DSignalR-5f44165d.js → Host3DSignalR-bb6db8e6.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-a5558f07.js → LiviqueWWSHandler-c4ba143d.js} +1 -1
- package/build/esm/{PfisterWWSHandler-6438ee0b.js → PfisterWWSHandler-41b7b1b7.js} +1 -1
- package/build/esm/{PlannerHandler2D-4a1c537d.js → PlannerHandler2D-829ffceb.js} +1 -1
- package/build/esm/{SeriousBasketHandler-d7689612.js → SeriousBasketHandler-0bb8ee55.js} +1 -1
- package/build/esm/{ShelfPlanner-f156b8a5.js → ShelfPlanner-1406888d.js} +1 -1
- package/build/esm/{StandardWWSHandler-c06c52f3.js → StandardWWSHandler-a8045129.js} +1 -1
- package/build/esm/{index-e6946ed6.js → index-16a1a540.js} +1130 -810
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/headless/headlessArtifactPass.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/index.d.ts +1 -1
- package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +5 -0
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts +2 -0
- package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts +2 -2
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +45 -0
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts +19 -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/Rendering/DivaMediaServiceHandler.d.ts +2 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/DivaMediaServiceHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +5 -0
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +50 -9
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts +1 -0
- package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts +3 -0
- package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/IDMCatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/capturedSetImages.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/capturedSetImages.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/idmArticleRelations.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/idmArticleRelations.test.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -17704,6 +17704,11 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17704
17704
|
get: function get() {
|
|
17705
17705
|
return this._catalogArticle.accPosPrio;
|
|
17706
17706
|
}
|
|
17707
|
+
}, {
|
|
17708
|
+
key: "sequenceNo",
|
|
17709
|
+
get: function get() {
|
|
17710
|
+
return this._catalogArticle.sequenceNo;
|
|
17711
|
+
}
|
|
17707
17712
|
}, {
|
|
17708
17713
|
key: "addAsZKAT",
|
|
17709
17714
|
get: function get() {
|
|
@@ -20051,7 +20056,7 @@ function loadMoreFromIDMArticles(_x, _x2) {
|
|
|
20051
20056
|
/** One additional-item reference of an item - the mandatory and optional sides of the same accessory merged. */
|
|
20052
20057
|
function _loadMoreFromIDMArticles() {
|
|
20053
20058
|
_loadMoreFromIDMArticles = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(catalogArticleDatas, set) {
|
|
20054
|
-
var items, _loop3, i, toLoadDecisionIds, toLoadPFGroups, toLoadFeatureClassRefNo, promises, _yield$Promise$all, _yield$Promise$all2, featureClasses, priceFeatureGroups, decisions,
|
|
20059
|
+
var items, _loop3, i, toLoadDecisionIds, toLoadPFGroups, toLoadFeatureClassRefNo, promises, _yield$Promise$all, _yield$Promise$all2, featureClasses, priceFeatureGroups, decisions, _i5, _decisions$map, loadedIds, missingIds, _i6, _iterator6, _step6, _loop7, _i7, _catalogArticleData$d2, catalogArticleData, toLoadFeatures, features, _loop4, _i8, _iterator7, _step7, _loop8, _loop6, _i9;
|
|
20055
20060
|
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context8) {
|
|
20056
20061
|
while (1) switch (_context8.prev = _context8.next) {
|
|
20057
20062
|
case 0:
|
|
@@ -20115,8 +20120,8 @@ function _loadMoreFromIDMArticles() {
|
|
|
20115
20120
|
priceFeatureGroups = _yield$Promise$all2[1];
|
|
20116
20121
|
decisions = _yield$Promise$all2[2];
|
|
20117
20122
|
if (decisions) {
|
|
20118
|
-
for (
|
|
20119
|
-
set.CatalogData.loadedDecisions.push(initializeDecision(decisions[
|
|
20123
|
+
for (_i5 = 0; _i5 < decisions.length; _i5++) {
|
|
20124
|
+
set.CatalogData.loadedDecisions.push(initializeDecision(decisions[_i5], set.CatalogData.idmOptionGroups));
|
|
20120
20125
|
}
|
|
20121
20126
|
}
|
|
20122
20127
|
if (!(toLoadDecisionIds.length !== 0 && toLoadDecisionIds.length != (decisions === null || decisions === void 0 ? void 0 : decisions.length))) {
|
|
@@ -20135,8 +20140,8 @@ function _loadMoreFromIDMArticles() {
|
|
|
20135
20140
|
return loadDecisionsReferencedByActions(set);
|
|
20136
20141
|
case 28:
|
|
20137
20142
|
if (priceFeatureGroups) {
|
|
20138
|
-
for (
|
|
20139
|
-
set.CatalogData.loadedPriceFeaturegroups.push(initializePriceFeatureGroups(priceFeatureGroups[
|
|
20143
|
+
for (_i6 = 0; _i6 < priceFeatureGroups.length; _i6++) {
|
|
20144
|
+
set.CatalogData.loadedPriceFeaturegroups.push(initializePriceFeatureGroups(priceFeatureGroups[_i6], set.CatalogData.idmOptionGroups));
|
|
20140
20145
|
}
|
|
20141
20146
|
}
|
|
20142
20147
|
_iterator6 = _createForOfIteratorHelper$j(toLoadPFGroups);
|
|
@@ -20196,8 +20201,8 @@ function _loadMoreFromIDMArticles() {
|
|
|
20196
20201
|
_iterator6.f();
|
|
20197
20202
|
return _context8.finish(44);
|
|
20198
20203
|
case 47:
|
|
20199
|
-
for (
|
|
20200
|
-
catalogArticleData = catalogArticleDatas[
|
|
20204
|
+
for (_i7 = 0; _i7 < catalogArticleDatas.length; _i7++) {
|
|
20205
|
+
catalogArticleData = catalogArticleDatas[_i7];
|
|
20201
20206
|
catalogArticleData.articleIDMDecisions = sortDecisions(set.CatalogData.getDecisionsByNo(_toConsumableArray__default["default"](new Set([].concat(_toConsumableArray__default["default"](set.CatalogData.globalDecisions.map(function (g) {
|
|
20202
20207
|
return g.decisionNo;
|
|
20203
20208
|
})), _toConsumableArray__default["default"](set.CatalogData.serieDecisionRefs), _toConsumableArray__default["default"]((_catalogArticleData$d2 = catalogArticleData.decisionsRefs) !== null && _catalogArticleData$d2 !== void 0 ? _catalogArticleData$d2 : []))))));
|
|
@@ -20219,7 +20224,7 @@ function _loadMoreFromIDMArticles() {
|
|
|
20219
20224
|
return _regeneratorRuntime__default["default"].wrap(function _loop4$(_context3) {
|
|
20220
20225
|
while (1) switch (_context3.prev = _context3.next) {
|
|
20221
20226
|
case 0:
|
|
20222
|
-
feature = features[
|
|
20227
|
+
feature = features[_i8];
|
|
20223
20228
|
insertIndex = set.CatalogData.loadedFeatures.length;
|
|
20224
20229
|
k = 0;
|
|
20225
20230
|
case 3:
|
|
@@ -20293,15 +20298,15 @@ function _loadMoreFromIDMArticles() {
|
|
|
20293
20298
|
}
|
|
20294
20299
|
}, _loop4);
|
|
20295
20300
|
});
|
|
20296
|
-
|
|
20301
|
+
_i8 = 0;
|
|
20297
20302
|
case 56:
|
|
20298
|
-
if (!(
|
|
20303
|
+
if (!(_i8 < features.length)) {
|
|
20299
20304
|
_context8.next = 61;
|
|
20300
20305
|
break;
|
|
20301
20306
|
}
|
|
20302
20307
|
return _context8.delegateYield(_loop4(), "t3", 58);
|
|
20303
20308
|
case 58:
|
|
20304
|
-
|
|
20309
|
+
_i8++;
|
|
20305
20310
|
_context8.next = 56;
|
|
20306
20311
|
break;
|
|
20307
20312
|
case 61:
|
|
@@ -20368,7 +20373,7 @@ function _loadMoreFromIDMArticles() {
|
|
|
20368
20373
|
return _regeneratorRuntime__default["default"].wrap(function _loop6$(_context7) {
|
|
20369
20374
|
while (1) switch (_context7.prev = _context7.next) {
|
|
20370
20375
|
case 0:
|
|
20371
|
-
catalogArticleData = catalogArticleDatas[
|
|
20376
|
+
catalogArticleData = catalogArticleDatas[_i9];
|
|
20372
20377
|
featureClass = featureClasses.find(function (fc) {
|
|
20373
20378
|
return fc.featureClassNo == catalogArticleData.featureClassRefNo;
|
|
20374
20379
|
});
|
|
@@ -20388,15 +20393,15 @@ function _loadMoreFromIDMArticles() {
|
|
|
20388
20393
|
}
|
|
20389
20394
|
}, _loop6);
|
|
20390
20395
|
});
|
|
20391
|
-
|
|
20396
|
+
_i9 = 0;
|
|
20392
20397
|
case 81:
|
|
20393
|
-
if (!(
|
|
20398
|
+
if (!(_i9 < catalogArticleDatas.length)) {
|
|
20394
20399
|
_context8.next = 86;
|
|
20395
20400
|
break;
|
|
20396
20401
|
}
|
|
20397
20402
|
return _context8.delegateYield(_loop6(), "t6", 83);
|
|
20398
20403
|
case 83:
|
|
20399
|
-
|
|
20404
|
+
_i9++;
|
|
20400
20405
|
_context8.next = 81;
|
|
20401
20406
|
break;
|
|
20402
20407
|
case 86:
|
|
@@ -20469,48 +20474,63 @@ function initIDMArticleRelations(item, catalogArticleData, catalog) {
|
|
|
20469
20474
|
var refs = readAdditionalItemRefs(item);
|
|
20470
20475
|
if (!refs.length) return;
|
|
20471
20476
|
catalogArticle.articleRelations = [];
|
|
20477
|
+
var accessories = [];
|
|
20472
20478
|
for (var i = 0; i < refs.length; i++) {
|
|
20473
|
-
var _ref$mandatoryQuantit, _ref$optionalQuantity, _accessory$catalogPla, _accessory$catalogPla2, _accessory$catalogPla3, _accessory$catalogPla4, _accessory$catalogPla5, _accessory$catalogPla6, _accessory$catalogPla7, _accessory$catalogPla8, _accessory$catalogPla9, _accessory$catalogPla10, _accessory$catalogPla11;
|
|
20474
20479
|
var ref = refs[i];
|
|
20475
20480
|
// accessories of another serie are not part of this catalog's articles
|
|
20476
20481
|
if (ref.serieNo != catalog.catalogCodex) continue;
|
|
20477
20482
|
var accessory = catalog.getCatalogArticle(ref.typeNo);
|
|
20478
20483
|
if (!accessory || accessory.isHidden) continue;
|
|
20484
|
+
accessories.push({
|
|
20485
|
+
ref: ref,
|
|
20486
|
+
accessory: accessory
|
|
20487
|
+
});
|
|
20488
|
+
}
|
|
20489
|
+
// the IDM sequence number of the accessory orders the list; without one the additional-item groups' order stays
|
|
20490
|
+
accessories.sort(function (a, b) {
|
|
20491
|
+
var _a$accessory$sequence, _b$accessory$sequence;
|
|
20492
|
+
return ((_a$accessory$sequence = a.accessory.sequenceNo) !== null && _a$accessory$sequence !== void 0 ? _a$accessory$sequence : 0) - ((_b$accessory$sequence = b.accessory.sequenceNo) !== null && _b$accessory$sequence !== void 0 ? _b$accessory$sequence : 0);
|
|
20493
|
+
});
|
|
20494
|
+
for (var _i = 0, _accessories = accessories; _i < _accessories.length; _i++) {
|
|
20495
|
+
var _ref2$mandatoryQuanti, _ref2$optionalQuantit, _accessory$catalogPla, _accessory$catalogPla2, _accessory$catalogPla3, _accessory$catalogPla4, _accessory$catalogPla5, _accessory$catalogPla6, _accessory$catalogPla7, _accessory$catalogPla8, _accessory$catalogPla9, _accessory$catalogPla10, _accessory$catalogPla11;
|
|
20496
|
+
var _accessories$_i = _accessories[_i],
|
|
20497
|
+
_ref2 = _accessories$_i.ref,
|
|
20498
|
+
_accessory = _accessories$_i.accessory;
|
|
20479
20499
|
catalogArticle.articleRelations.push({
|
|
20480
|
-
name:
|
|
20500
|
+
name: _accessory.name,
|
|
20481
20501
|
actQuantity: 0,
|
|
20482
|
-
minQuantity: (
|
|
20502
|
+
minQuantity: (_ref2$mandatoryQuanti = _ref2.mandatoryQuantity) !== null && _ref2$mandatoryQuanti !== void 0 ? _ref2$mandatoryQuanti : 0,
|
|
20483
20503
|
// 0 = no cap, like a diva relation without a MaxQuantity
|
|
20484
|
-
maxQuantity: (
|
|
20485
|
-
price: !catalog.dontShowBasePrice ?
|
|
20486
|
-
articleCodex:
|
|
20487
|
-
catalogCodex:
|
|
20488
|
-
longDescription:
|
|
20489
|
-
positionGroupNr:
|
|
20490
|
-
typeNr:
|
|
20491
|
-
image:
|
|
20504
|
+
maxQuantity: (_ref2$optionalQuantit = _ref2.optionalQuantity) !== null && _ref2$optionalQuantit !== void 0 ? _ref2$optionalQuantit : 0,
|
|
20505
|
+
price: !catalog.dontShowBasePrice ? _accessory.articlePrice : 0,
|
|
20506
|
+
articleCodex: _ref2.typeNo,
|
|
20507
|
+
catalogCodex: _ref2.serieNo,
|
|
20508
|
+
longDescription: _accessory.longDescription,
|
|
20509
|
+
positionGroupNr: _ref2.setNo,
|
|
20510
|
+
typeNr: _accessory.typeNr,
|
|
20511
|
+
image: _accessory.image ? catalog.getCatImageURL(_accessory.image, '') : undefined,
|
|
20492
20512
|
//accessoires are only PlannerElements if the have an SVG with dockingpossibilities (AVO/ AVU/ AVC)
|
|
20493
|
-
isPlannerElement:
|
|
20494
|
-
hasAVC: ((_accessory$catalogPla2 = (_accessory$catalogPla3 =
|
|
20495
|
-
hasAVO: ((_accessory$catalogPla4 = (_accessory$catalogPla5 =
|
|
20496
|
-
hasAVU: ((_accessory$catalogPla6 = (_accessory$catalogPla7 =
|
|
20497
|
-
hasAVN: ((_accessory$catalogPla8 = (_accessory$catalogPla9 =
|
|
20498
|
-
hasAVS: ((_accessory$catalogPla10 = (_accessory$catalogPla11 =
|
|
20499
|
-
width:
|
|
20500
|
-
height:
|
|
20501
|
-
depth:
|
|
20502
|
-
widthFrom:
|
|
20503
|
-
heightFrom:
|
|
20504
|
-
depthFrom:
|
|
20505
|
-
widthTo:
|
|
20506
|
-
heightTo:
|
|
20507
|
-
depthTo:
|
|
20513
|
+
isPlannerElement: _accessory.hasCatalogPlannerArticle && !!((_accessory$catalogPla = _accessory.catalogPlannerArticle) !== null && _accessory$catalogPla !== void 0 && _accessory$catalogPla.isDockable || catalog.accessorieStepAsPlanner),
|
|
20514
|
+
hasAVC: ((_accessory$catalogPla2 = (_accessory$catalogPla3 = _accessory.catalogPlannerArticle) === null || _accessory$catalogPla3 === void 0 ? void 0 : _accessory$catalogPla3.topAVC) !== null && _accessory$catalogPla2 !== void 0 ? _accessory$catalogPla2 : 0) > 0,
|
|
20515
|
+
hasAVO: ((_accessory$catalogPla4 = (_accessory$catalogPla5 = _accessory.catalogPlannerArticle) === null || _accessory$catalogPla5 === void 0 ? void 0 : _accessory$catalogPla5.topAVO) !== null && _accessory$catalogPla4 !== void 0 ? _accessory$catalogPla4 : 0) > 0,
|
|
20516
|
+
hasAVU: ((_accessory$catalogPla6 = (_accessory$catalogPla7 = _accessory.catalogPlannerArticle) === null || _accessory$catalogPla7 === void 0 ? void 0 : _accessory$catalogPla7.topAVU) !== null && _accessory$catalogPla6 !== void 0 ? _accessory$catalogPla6 : 0) > 0,
|
|
20517
|
+
hasAVN: ((_accessory$catalogPla8 = (_accessory$catalogPla9 = _accessory.catalogPlannerArticle) === null || _accessory$catalogPla9 === void 0 ? void 0 : _accessory$catalogPla9.topAVN) !== null && _accessory$catalogPla8 !== void 0 ? _accessory$catalogPla8 : 0) > 0,
|
|
20518
|
+
hasAVS: ((_accessory$catalogPla10 = (_accessory$catalogPla11 = _accessory.catalogPlannerArticle) === null || _accessory$catalogPla11 === void 0 ? void 0 : _accessory$catalogPla11.topAVS) !== null && _accessory$catalogPla10 !== void 0 ? _accessory$catalogPla10 : 0) > 0,
|
|
20519
|
+
width: _accessory.width,
|
|
20520
|
+
height: _accessory.height,
|
|
20521
|
+
depth: _accessory.depth,
|
|
20522
|
+
widthFrom: _accessory.widthFrom,
|
|
20523
|
+
heightFrom: _accessory.heightFrom,
|
|
20524
|
+
depthFrom: _accessory.depthFrom,
|
|
20525
|
+
widthTo: _accessory.widthTo,
|
|
20526
|
+
heightTo: _accessory.heightTo,
|
|
20527
|
+
depthTo: _accessory.depthTo,
|
|
20508
20528
|
formattedSize: '',
|
|
20509
|
-
isVisualized:
|
|
20529
|
+
isVisualized: _accessory.isVisualized,
|
|
20510
20530
|
configStepKeys: [],
|
|
20511
|
-
metaData:
|
|
20512
|
-
contentItemId:
|
|
20513
|
-
groupContentItemId:
|
|
20531
|
+
metaData: _accessory.metaDataView,
|
|
20532
|
+
contentItemId: _accessory.contentItemId,
|
|
20533
|
+
groupContentItemId: _accessory.groupContentItemId
|
|
20514
20534
|
});
|
|
20515
20535
|
}
|
|
20516
20536
|
catalogArticle.hasArticleRelations = catalogArticle.articleRelations.length > 0;
|
|
@@ -20533,7 +20553,7 @@ var fetchDecisions = function fetchDecisions(set, decisionNos) {
|
|
|
20533
20553
|
* apply while that action matches. References are followed transitively.
|
|
20534
20554
|
*/
|
|
20535
20555
|
var loadDecisionsReferencedByActions = /*#__PURE__*/function () {
|
|
20536
|
-
var
|
|
20556
|
+
var _ref3 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(set) {
|
|
20537
20557
|
var round, toLoad, _iterator3, _step3, _decision$optionCombi, decision, _iterator4, _step4, _combination$projectA, _combination$projectA2, _combination$projectA3, _combination$projectA4, combination, refs, _iterator5, _step5, ref, decisionNo, decisions, i, _decisions$length, stillMissing;
|
|
20538
20558
|
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
20539
20559
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -20612,7 +20632,7 @@ var loadDecisionsReferencedByActions = /*#__PURE__*/function () {
|
|
|
20612
20632
|
}, _callee);
|
|
20613
20633
|
}));
|
|
20614
20634
|
return function loadDecisionsReferencedByActions(_x3) {
|
|
20615
|
-
return
|
|
20635
|
+
return _ref3.apply(this, arguments);
|
|
20616
20636
|
};
|
|
20617
20637
|
}();
|
|
20618
20638
|
var getToLoadDecisionIds = function getToLoadDecisionIds(catalogArticleDatas, set) {
|
|
@@ -20633,10 +20653,10 @@ var getToLoadDecisionIds = function getToLoadDecisionIds(catalogArticleDatas, se
|
|
|
20633
20653
|
return g.decisionNo;
|
|
20634
20654
|
})), _toConsumableArray__default["default"](set.CatalogData.serieDecisionRefs), _toConsumableArray__default["default"](allArticleDecisions))));
|
|
20635
20655
|
var toLoadDecisionIds = [];
|
|
20636
|
-
for (var
|
|
20637
|
-
var found = set.CatalogData.getDecisionByNo(neededDecisionsIds[
|
|
20656
|
+
for (var _i2 = 0; _i2 < neededDecisionsIds.length; _i2++) {
|
|
20657
|
+
var found = set.CatalogData.getDecisionByNo(neededDecisionsIds[_i2]);
|
|
20638
20658
|
if (found) ; else {
|
|
20639
|
-
toLoadDecisionIds.push(neededDecisionsIds[
|
|
20659
|
+
toLoadDecisionIds.push(neededDecisionsIds[_i2]);
|
|
20640
20660
|
}
|
|
20641
20661
|
}
|
|
20642
20662
|
return toLoadDecisionIds;
|
|
@@ -20651,18 +20671,18 @@ var getFeatures = function getFeatures(set, featureClasses) {
|
|
|
20651
20671
|
var alreadyLoadedFeatures = set.CatalogData.loadedFeatures;
|
|
20652
20672
|
var toLoadFeatures = [];
|
|
20653
20673
|
var loadedFeatures = [];
|
|
20654
|
-
var _loop = function _loop(
|
|
20674
|
+
var _loop = function _loop(_i3) {
|
|
20655
20675
|
var found = alreadyLoadedFeatures.find(function (f) {
|
|
20656
|
-
return f.featureNo == neededFeatures[
|
|
20676
|
+
return f.featureNo == neededFeatures[_i3];
|
|
20657
20677
|
});
|
|
20658
20678
|
if (found) {
|
|
20659
20679
|
loadedFeatures.push(found);
|
|
20660
20680
|
} else {
|
|
20661
|
-
toLoadFeatures.push(neededFeatures[
|
|
20681
|
+
toLoadFeatures.push(neededFeatures[_i3]);
|
|
20662
20682
|
}
|
|
20663
20683
|
};
|
|
20664
|
-
for (var
|
|
20665
|
-
_loop(
|
|
20684
|
+
for (var _i3 = 0; _i3 < neededFeatures.length; _i3++) {
|
|
20685
|
+
_loop(_i3);
|
|
20666
20686
|
}
|
|
20667
20687
|
LOG$l.debug('features already loaded dont get again from api: ' + loadedFeatures.length);
|
|
20668
20688
|
return toLoadFeatures;
|
|
@@ -20684,10 +20704,10 @@ var getPriceFeatureGroups = function getPriceFeatureGroups(catalogArticleDatas,
|
|
|
20684
20704
|
}
|
|
20685
20705
|
var toLoadPriceFeatureGroups = [];
|
|
20686
20706
|
neededPriceFeatureGroupNos = _toConsumableArray__default["default"](new Set(neededPriceFeatureGroupNos));
|
|
20687
|
-
for (var
|
|
20688
|
-
var found = set.CatalogData.getPricefeaturegroup(neededPriceFeatureGroupNos[
|
|
20707
|
+
for (var _i4 = 0; _i4 < neededPriceFeatureGroupNos.length; _i4++) {
|
|
20708
|
+
var found = set.CatalogData.getPricefeaturegroup(neededPriceFeatureGroupNos[_i4]);
|
|
20689
20709
|
if (found) ; else {
|
|
20690
|
-
toLoadPriceFeatureGroups.push(neededPriceFeatureGroupNos[
|
|
20710
|
+
toLoadPriceFeatureGroups.push(neededPriceFeatureGroupNos[_i4]);
|
|
20691
20711
|
}
|
|
20692
20712
|
}
|
|
20693
20713
|
return toLoadPriceFeatureGroups;
|
|
@@ -21119,6 +21139,7 @@ function getCatalogArticle(article, catalogData) {
|
|
|
21119
21139
|
idmPartlist: article.partlist,
|
|
21120
21140
|
itemIdentification: article.itemIdentification,
|
|
21121
21141
|
articleRelations: [],
|
|
21142
|
+
sequenceNo: article.sequenceNo,
|
|
21122
21143
|
svgs: (_article$detailInfos3 = article.detailInfos) === null || _article$detailInfos3 === void 0 ? void 0 : _article$detailInfos3.filter(function (d) {
|
|
21123
21144
|
return d.classification == 'SVG';
|
|
21124
21145
|
}).map(function (d) {
|
|
@@ -31157,7 +31178,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
31157
31178
|
break;
|
|
31158
31179
|
}
|
|
31159
31180
|
_context.next = 4;
|
|
31160
|
-
return Promise.resolve().then(function () { return require('./ShelfPlanner-
|
|
31181
|
+
return Promise.resolve().then(function () { return require('./ShelfPlanner-5ffd15a2.js'); });
|
|
31161
31182
|
case 4:
|
|
31162
31183
|
_yield$import = _context.sent;
|
|
31163
31184
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -39266,7 +39287,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
39266
39287
|
break;
|
|
39267
39288
|
}
|
|
39268
39289
|
_context5.next = 3;
|
|
39269
|
-
return Promise.resolve().then(function () { return require('./DoorPlanner-
|
|
39290
|
+
return Promise.resolve().then(function () { return require('./DoorPlanner-adda9c0d.js'); });
|
|
39270
39291
|
case 3:
|
|
39271
39292
|
_yield$import = _context5.sent;
|
|
39272
39293
|
DoorPlanner = _yield$import["default"];
|
|
@@ -39406,6 +39427,16 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
39406
39427
|
get: function get() {
|
|
39407
39428
|
return this.setState.getPlanning2DAsJpg;
|
|
39408
39429
|
}
|
|
39430
|
+
}, {
|
|
39431
|
+
key: "captureSetImages",
|
|
39432
|
+
get: function get() {
|
|
39433
|
+
return this.setState.captureSetImages;
|
|
39434
|
+
}
|
|
39435
|
+
}, {
|
|
39436
|
+
key: "exportSetGlb",
|
|
39437
|
+
get: function get() {
|
|
39438
|
+
return this.setState.exportSetGlb;
|
|
39439
|
+
}
|
|
39409
39440
|
}, {
|
|
39410
39441
|
key: "ViewConfig",
|
|
39411
39442
|
get: function get() {
|
|
@@ -39544,15 +39575,29 @@ var DivaMediaServiceHandler = /*#__PURE__*/function () {
|
|
|
39544
39575
|
value: (function () {
|
|
39545
39576
|
var _uploadImageViaAssets = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(imageBlob, organizationId, fileName, refFunctionType, refMetadata) {
|
|
39546
39577
|
var _this$jwt, _simpleUpload$headers, _ref, _ref2, _ref3, _ref4;
|
|
39547
|
-
var
|
|
39578
|
+
var mediaType,
|
|
39579
|
+
base,
|
|
39580
|
+
authHeaders,
|
|
39581
|
+
startRes,
|
|
39582
|
+
startJson,
|
|
39583
|
+
row,
|
|
39584
|
+
simpleUpload,
|
|
39585
|
+
putRes,
|
|
39586
|
+
completeRes,
|
|
39587
|
+
res,
|
|
39588
|
+
refOut,
|
|
39589
|
+
item,
|
|
39590
|
+
variantBig,
|
|
39591
|
+
_args = arguments;
|
|
39548
39592
|
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
39549
39593
|
while (1) switch (_context.prev = _context.next) {
|
|
39550
39594
|
case 0:
|
|
39595
|
+
mediaType = _args.length > 5 && _args[5] !== undefined ? _args[5] : 'PCT';
|
|
39551
39596
|
base = this.mediaServiceUrl.replace(/\/$/, '');
|
|
39552
39597
|
authHeaders = {
|
|
39553
39598
|
Authorization: 'Bearer ' + ((_this$jwt = this.jwt) !== null && _this$jwt !== void 0 ? _this$jwt : '')
|
|
39554
39599
|
};
|
|
39555
|
-
_context.next =
|
|
39600
|
+
_context.next = 5;
|
|
39556
39601
|
return fetch("".concat(base, "/v1/assets/uploads"), {
|
|
39557
39602
|
method: 'POST',
|
|
39558
39603
|
headers: _objectSpread$d({
|
|
@@ -39564,45 +39609,45 @@ var DivaMediaServiceHandler = /*#__PURE__*/function () {
|
|
|
39564
39609
|
mimeType: imageBlob.type || 'application/octet-stream',
|
|
39565
39610
|
size: imageBlob.size,
|
|
39566
39611
|
organizationId: organizationId,
|
|
39567
|
-
mediaType:
|
|
39612
|
+
mediaType: mediaType
|
|
39568
39613
|
}]
|
|
39569
39614
|
})
|
|
39570
39615
|
});
|
|
39571
|
-
case
|
|
39616
|
+
case 5:
|
|
39572
39617
|
startRes = _context.sent;
|
|
39573
39618
|
if (startRes.ok) {
|
|
39574
|
-
_context.next =
|
|
39619
|
+
_context.next = 8;
|
|
39575
39620
|
break;
|
|
39576
39621
|
}
|
|
39577
39622
|
return _context.abrupt("return", '');
|
|
39578
|
-
case
|
|
39579
|
-
_context.next =
|
|
39623
|
+
case 8:
|
|
39624
|
+
_context.next = 10;
|
|
39580
39625
|
return startRes.json();
|
|
39581
|
-
case
|
|
39626
|
+
case 10:
|
|
39582
39627
|
startJson = _context.sent;
|
|
39583
39628
|
row = Array.isArray(startJson) ? startJson[0] : startJson;
|
|
39584
39629
|
simpleUpload = row === null || row === void 0 ? void 0 : row.simpleUpload;
|
|
39585
39630
|
if (!(!(simpleUpload !== null && simpleUpload !== void 0 && simpleUpload.url) || !(simpleUpload !== null && simpleUpload !== void 0 && simpleUpload.method))) {
|
|
39586
|
-
_context.next =
|
|
39631
|
+
_context.next = 15;
|
|
39587
39632
|
break;
|
|
39588
39633
|
}
|
|
39589
39634
|
return _context.abrupt("return", '');
|
|
39590
|
-
case
|
|
39591
|
-
_context.next =
|
|
39635
|
+
case 15:
|
|
39636
|
+
_context.next = 17;
|
|
39592
39637
|
return fetch(simpleUpload.url, {
|
|
39593
39638
|
method: simpleUpload.method,
|
|
39594
39639
|
headers: (_simpleUpload$headers = simpleUpload.headers) !== null && _simpleUpload$headers !== void 0 ? _simpleUpload$headers : {},
|
|
39595
39640
|
body: imageBlob
|
|
39596
39641
|
});
|
|
39597
|
-
case
|
|
39642
|
+
case 17:
|
|
39598
39643
|
putRes = _context.sent;
|
|
39599
39644
|
if (putRes.ok) {
|
|
39600
|
-
_context.next =
|
|
39645
|
+
_context.next = 20;
|
|
39601
39646
|
break;
|
|
39602
39647
|
}
|
|
39603
39648
|
return _context.abrupt("return", '');
|
|
39604
|
-
case
|
|
39605
|
-
_context.next =
|
|
39649
|
+
case 20:
|
|
39650
|
+
_context.next = 22;
|
|
39606
39651
|
return fetch("".concat(base, "/v1/assets/uploads/complete"), {
|
|
39607
39652
|
method: 'POST',
|
|
39608
39653
|
headers: _objectSpread$d({
|
|
@@ -39612,30 +39657,30 @@ var DivaMediaServiceHandler = /*#__PURE__*/function () {
|
|
|
39612
39657
|
uploadId: row.uploadId,
|
|
39613
39658
|
fileName: fileName,
|
|
39614
39659
|
organizationId: organizationId,
|
|
39615
|
-
mediaType:
|
|
39660
|
+
mediaType: mediaType,
|
|
39616
39661
|
ref: {
|
|
39617
39662
|
functionType: refFunctionType,
|
|
39618
39663
|
metadata: refMetadata
|
|
39619
39664
|
}
|
|
39620
39665
|
})
|
|
39621
39666
|
});
|
|
39622
|
-
case
|
|
39667
|
+
case 22:
|
|
39623
39668
|
completeRes = _context.sent;
|
|
39624
39669
|
if (completeRes.ok) {
|
|
39625
|
-
_context.next =
|
|
39670
|
+
_context.next = 25;
|
|
39626
39671
|
break;
|
|
39627
39672
|
}
|
|
39628
39673
|
return _context.abrupt("return", '');
|
|
39629
|
-
case
|
|
39630
|
-
_context.next =
|
|
39674
|
+
case 25:
|
|
39675
|
+
_context.next = 27;
|
|
39631
39676
|
return completeRes.json();
|
|
39632
|
-
case
|
|
39677
|
+
case 27:
|
|
39633
39678
|
res = _context.sent;
|
|
39634
39679
|
refOut = res.mediaItemRef;
|
|
39635
39680
|
item = res.mediaItem;
|
|
39636
39681
|
variantBig = refOut !== null && refOut !== void 0 && refOut.variants && _typeof__default["default"](refOut.variants) === 'object' ? refOut.variants.big : undefined;
|
|
39637
39682
|
return _context.abrupt("return", (_ref = (_ref2 = (_ref3 = (_ref4 = variantBig !== null && variantBig !== void 0 ? variantBig : refOut === null || refOut === void 0 ? void 0 : refOut.cdnUrl) !== null && _ref4 !== void 0 ? _ref4 : refOut === null || refOut === void 0 ? void 0 : refOut.url) !== null && _ref3 !== void 0 ? _ref3 : item === null || item === void 0 ? void 0 : item.cdnUrl) !== null && _ref2 !== void 0 ? _ref2 : item === null || item === void 0 ? void 0 : item.url) !== null && _ref !== void 0 ? _ref : '');
|
|
39638
|
-
case
|
|
39683
|
+
case 32:
|
|
39639
39684
|
case "end":
|
|
39640
39685
|
return _context.stop();
|
|
39641
39686
|
}
|
|
@@ -39657,11 +39702,14 @@ var DivaMediaServiceHandler = /*#__PURE__*/function () {
|
|
|
39657
39702
|
key: "uploadImageBlobPermanent",
|
|
39658
39703
|
value: (function () {
|
|
39659
39704
|
var _uploadImageBlobPermanent = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(imageBlob, fileName, refFunctionType, refMetadata, organizationId) {
|
|
39705
|
+
var mediaType,
|
|
39706
|
+
_args2 = arguments;
|
|
39660
39707
|
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
39661
39708
|
while (1) switch (_context2.prev = _context2.next) {
|
|
39662
39709
|
case 0:
|
|
39663
|
-
|
|
39664
|
-
|
|
39710
|
+
mediaType = _args2.length > 5 && _args2[5] !== undefined ? _args2[5] : 'PCT';
|
|
39711
|
+
return _context2.abrupt("return", this.uploadImageViaAssets(imageBlob, organizationId || this.organizationId, fileName, refFunctionType, refMetadata, mediaType));
|
|
39712
|
+
case 2:
|
|
39665
39713
|
case "end":
|
|
39666
39714
|
return _context2.stop();
|
|
39667
39715
|
}
|
|
@@ -45157,9 +45205,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45157
45205
|
}()
|
|
45158
45206
|
}, {
|
|
45159
45207
|
key: "getPendingUploadFileName",
|
|
45160
|
-
value: function getPendingUploadFileName(basketData, setId, slot, extension, variantId
|
|
45208
|
+
value: function getPendingUploadFileName(basketData, setId, slot, extension, variantId, /** Distinguishes several uploads of the same slot, e.g. one per captured save shot. */
|
|
45209
|
+
discriminator) {
|
|
45161
45210
|
var variantSuffix = variantId !== undefined ? "_v".concat(variantId) : '';
|
|
45162
|
-
|
|
45211
|
+
var shotSuffix = discriminator ? "_".concat(discriminator) : '';
|
|
45212
|
+
return "".concat(basketData.DivaNr, "_").concat(basketData.DocumentVersion, "_").concat(setId).concat(variantSuffix, "_").concat(slot).concat(shotSuffix, ".").concat(extension);
|
|
45163
45213
|
}
|
|
45164
45214
|
|
|
45165
45215
|
// Clears only the active-configuration (non-variant) pending uploads of this
|
|
@@ -45186,7 +45236,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45186
45236
|
* the basket-mediated upload pipeline (`BasketHandler.saveBasket`). This
|
|
45187
45237
|
* mirrors the backend `resolveUploadTarget` routing: planning2D -> the main
|
|
45188
45238
|
* `OrderSetData.Set2DImage` or, when a variantId is present,
|
|
45189
|
-
* `ConfigVariants[VariantID].Set2DImage`;
|
|
45239
|
+
* `ConfigVariants[VariantID].Set2DImage`; planning3D without a setImagesId ->
|
|
45240
|
+
* the matching `SetImage`; planning3DGlb -> `SetGlb`; aiImage and secondary
|
|
45241
|
+
* planning3D shots -> `SetImages[].URL`.
|
|
45190
45242
|
*/
|
|
45191
45243
|
}, {
|
|
45192
45244
|
key: "flushPendingUploadsViaMediaService",
|
|
@@ -45212,7 +45264,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45212
45264
|
case 0:
|
|
45213
45265
|
orderSet = basket.getOrderSet(pendingUpload.setId);
|
|
45214
45266
|
_context41.next = 3;
|
|
45215
|
-
return mediaServiceHandler.uploadImageBlobPermanent(pendingUpload.blob, pendingUpload.fileName, pendingUpload.slot
|
|
45267
|
+
return mediaServiceHandler.uploadImageBlobPermanent(pendingUpload.blob, pendingUpload.fileName, basketModel.BASKET_UPLOAD_FUNCTION_TYPES[pendingUpload.slot], {
|
|
45216
45268
|
divaNr: basket.DivaNr,
|
|
45217
45269
|
setId: pendingUpload.setId,
|
|
45218
45270
|
setImagesId: pendingUpload.setImagesId,
|
|
@@ -45220,7 +45272,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45220
45272
|
catalogCodex: orderSet === null || orderSet === void 0 ? void 0 : orderSet.CatalogCodex,
|
|
45221
45273
|
catalogGuid: orderSet === null || orderSet === void 0 ? void 0 : orderSet.CatalogGUID,
|
|
45222
45274
|
setHash: orderSet === null || orderSet === void 0 ? void 0 : orderSet.SetHash
|
|
45223
|
-
}, basket.OrganizationId);
|
|
45275
|
+
}, basket.OrganizationId, basketModel.BASKET_UPLOAD_MEDIA_TYPES[pendingUpload.slot]);
|
|
45224
45276
|
case 3:
|
|
45225
45277
|
url = _context41.sent;
|
|
45226
45278
|
return _context41.abrupt("return", {
|
|
@@ -45243,7 +45295,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45243
45295
|
_iterator6 = _createForOfIteratorHelper$5(uploaded);
|
|
45244
45296
|
_context43.prev = 7;
|
|
45245
45297
|
_loop8 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop8() {
|
|
45246
|
-
var _step6$value, pendingUpload, orderSet, url, _orderSet$ConfigVaria, configVariant, _orderSet$SetImages, setImage;
|
|
45298
|
+
var _step6$value, pendingUpload, orderSet, url, _orderSet$ConfigVaria, configVariant, _orderSet$ConfigVaria2, _configVariant, _orderSet$SetImages, setImage;
|
|
45247
45299
|
return _regeneratorRuntime__default["default"].wrap(function _loop8$(_context42) {
|
|
45248
45300
|
while (1) switch (_context42.prev = _context42.next) {
|
|
45249
45301
|
case 0:
|
|
@@ -45264,6 +45316,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45264
45316
|
} else {
|
|
45265
45317
|
orderSet.Set2DImage = url;
|
|
45266
45318
|
}
|
|
45319
|
+
} else if (pendingUpload.slot === 'planning3DGlb') {
|
|
45320
|
+
orderSet.SetGlb = url;
|
|
45321
|
+
} else if (pendingUpload.slot === 'planning3D' && !pendingUpload.setImagesId) {
|
|
45322
|
+
if (pendingUpload.variantId !== undefined) {
|
|
45323
|
+
_configVariant = (_orderSet$ConfigVaria2 = orderSet.ConfigVariants) === null || _orderSet$ConfigVaria2 === void 0 ? void 0 : _orderSet$ConfigVaria2.find(function (variant) {
|
|
45324
|
+
return variant.VariantID === pendingUpload.variantId;
|
|
45325
|
+
});
|
|
45326
|
+
if (_configVariant) _configVariant.SetImage = url;
|
|
45327
|
+
} else {
|
|
45328
|
+
orderSet.SetImage = url;
|
|
45329
|
+
}
|
|
45267
45330
|
} else {
|
|
45268
45331
|
setImage = (_orderSet$SetImages = orderSet.SetImages) === null || _orderSet$SetImages === void 0 ? void 0 : _orderSet$SetImages.find(function (image) {
|
|
45269
45332
|
return image.Id === pendingUpload.setImagesId;
|
|
@@ -45320,8 +45383,8 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45320
45383
|
key: "getOrderSet",
|
|
45321
45384
|
value: function () {
|
|
45322
45385
|
var _getOrderSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee41(set, catalogData, divaNr, basketData, repairOnly, returnTo) {
|
|
45323
|
-
var _Object$values$, _set$getDivaArticles, _hqRenderScript2, _urlToAiImages, _alternateSetImages, _set$basketConfigVari2, _set$basketConfigVari3;
|
|
45324
|
-
var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, urlToAiImages, alternateSetImages, hqRenderScript, dimensions, _set$plannerHandler$g, _set$plannerHandler2, _set$plannerHandler2$, promise3D, promise2D, promiseAiImages, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, strict, is3DSet, _hqRenderScript, missing, plannerWarnings, bruttoPrice;
|
|
45386
|
+
var _Object$values$, _set$getDivaArticles, _hqRenderScript2, _urlToAiImages, _alternateSetImages, _capturedSetImages, _set$basketConfigVari2, _set$basketConfigVari3;
|
|
45387
|
+
var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, urlToAiImages, alternateSetImages, capturedSetImages, urlToSetGlb, setImageCaptured, hqRenderScript, dimensions, _set$plannerHandler$g, _set$plannerHandler2, _set$plannerHandler2$, promise3D, promise2D, promiseAiImages, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, strict, is3DSet, _hqRenderScript, missing, plannerWarnings, bruttoPrice;
|
|
45325
45388
|
return _regeneratorRuntime__default["default"].wrap(function _callee41$(_context44) {
|
|
45326
45389
|
while (1) switch (_context44.prev = _context44.next) {
|
|
45327
45390
|
case 0:
|
|
@@ -45333,17 +45396,21 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45333
45396
|
urlToPlanning2D = undefined;
|
|
45334
45397
|
urlToAiImages = undefined;
|
|
45335
45398
|
alternateSetImages = undefined;
|
|
45399
|
+
capturedSetImages = undefined;
|
|
45400
|
+
urlToSetGlb = undefined; // A captured main image has no URL yet (the backend writes it after the upload), so its
|
|
45401
|
+
// presence cannot be inferred from `setImage` the way a render-farm URL can.
|
|
45402
|
+
setImageCaptured = false;
|
|
45336
45403
|
hqRenderScript = undefined;
|
|
45337
45404
|
dimensions = {};
|
|
45338
45405
|
if (dontGenerateImages) {
|
|
45339
|
-
_context44.next =
|
|
45406
|
+
_context44.next = 47;
|
|
45340
45407
|
break;
|
|
45341
45408
|
}
|
|
45342
45409
|
this.resetPendingUploadsForSet(basketData, set.getSetId());
|
|
45343
|
-
_context44.next =
|
|
45410
|
+
_context44.next = 17;
|
|
45344
45411
|
return this.ensure3DConnectionReady(set);
|
|
45345
|
-
case
|
|
45346
|
-
promise3D = this.getSetImage(set, true);
|
|
45412
|
+
case 17:
|
|
45413
|
+
promise3D = this.getSetImage(set, true, basketData);
|
|
45347
45414
|
promise2D = this.get2DSetImage(set, basketData);
|
|
45348
45415
|
if (set.getAiImagesAsJpg().length > 0) {
|
|
45349
45416
|
promiseAiImages = this.getAiImages(set, basketData);
|
|
@@ -45352,20 +45419,26 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45352
45419
|
promise3DAlternate = this.getAlternateSetImages(set);
|
|
45353
45420
|
}
|
|
45354
45421
|
// Run HQ render-script after the 3D save request finishes so two SaveProjectWithOptions calls are not in flight
|
|
45355
|
-
_context44.next =
|
|
45422
|
+
_context44.next = 23;
|
|
45356
45423
|
return Promise.all([promise3D, promise2D, promiseAiImages, promise3DAlternate]);
|
|
45357
|
-
case
|
|
45424
|
+
case 23:
|
|
45358
45425
|
_yield$Promise$all = _context44.sent;
|
|
45359
45426
|
_yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 4);
|
|
45360
45427
|
_yield$Promise$all2$ = _yield$Promise$all2[0];
|
|
45361
45428
|
setImage = _yield$Promise$all2$.url;
|
|
45362
45429
|
dimensions = _yield$Promise$all2$.dimensions;
|
|
45430
|
+
capturedSetImages = _yield$Promise$all2$.additionalImages;
|
|
45431
|
+
setImageCaptured = _yield$Promise$all2$.captured;
|
|
45363
45432
|
urlToPlanning2D = _yield$Promise$all2[1];
|
|
45364
45433
|
urlToAiImages = _yield$Promise$all2[2];
|
|
45365
45434
|
alternateSetImages = _yield$Promise$all2[3];
|
|
45366
|
-
_context44.next =
|
|
45435
|
+
_context44.next = 35;
|
|
45436
|
+
return this.getSetGlb(set, basketData);
|
|
45437
|
+
case 35:
|
|
45438
|
+
urlToSetGlb = _context44.sent;
|
|
45439
|
+
_context44.next = 38;
|
|
45367
45440
|
return this.getHQRenderScript(set, divaNr);
|
|
45368
|
-
case
|
|
45441
|
+
case 38:
|
|
45369
45442
|
hqRenderScript = _context44.sent;
|
|
45370
45443
|
// Strict-mode artifact validation. Surfaces render-farm timeouts as a
|
|
45371
45444
|
// hard failure so the mass-configurator can show a per-product retry
|
|
@@ -45375,18 +45448,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45375
45448
|
strict = (_set$plannerHandler$g = (_set$plannerHandler2 = set.plannerHandler) === null || _set$plannerHandler2 === void 0 || (_set$plannerHandler2$ = _set$plannerHandler2.getStrictArtifactGeneration) === null || _set$plannerHandler2$ === void 0 ? void 0 : _set$plannerHandler2$.call(_set$plannerHandler2)) !== null && _set$plannerHandler$g !== void 0 ? _set$plannerHandler$g : false;
|
|
45376
45449
|
is3DSet = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
45377
45450
|
if (!(strict && is3DSet)) {
|
|
45378
|
-
_context44.next =
|
|
45451
|
+
_context44.next = 47;
|
|
45379
45452
|
break;
|
|
45380
45453
|
}
|
|
45381
45454
|
missing = [];
|
|
45382
|
-
if (!setImage) missing.push('3DImage');
|
|
45455
|
+
if (!setImage && !setImageCaptured) missing.push('3DImage');
|
|
45383
45456
|
if (!((_hqRenderScript = hqRenderScript) !== null && _hqRenderScript !== void 0 && _hqRenderScript._id)) missing.push('HQRenderScript');
|
|
45384
45457
|
if (!(missing.length > 0)) {
|
|
45385
|
-
_context44.next =
|
|
45458
|
+
_context44.next = 47;
|
|
45386
45459
|
break;
|
|
45387
45460
|
}
|
|
45388
45461
|
throw new ArtifactGenerationError(set.getSetId(), missing);
|
|
45389
|
-
case
|
|
45462
|
+
case 47:
|
|
45390
45463
|
plannerWarnings = [];
|
|
45391
45464
|
if (!this.getPlanningIsComplete(set)) plannerWarnings.push('INCOMPLETE');
|
|
45392
45465
|
DivaUtils__default["default"].endSpanOfApm('GetSet3D und 2D Image');
|
|
@@ -45421,9 +45494,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45421
45494
|
//Add url string of current rendering.
|
|
45422
45495
|
HQRenderScript: (_hqRenderScript2 = hqRenderScript) === null || _hqRenderScript2 === void 0 ? void 0 : _hqRenderScript2._id,
|
|
45423
45496
|
Set2DImage: urlToPlanning2D,
|
|
45497
|
+
SetGlb: urlToSetGlb,
|
|
45424
45498
|
VariantDescription: DivaUtils__default["default"].stripTags(set.getVariantsDescription()),
|
|
45425
45499
|
VariantDescription_locales: DivaUtils__default["default"].stripTagsFromDict(set.getVariantsDescription_locales()),
|
|
45426
|
-
SetImages: [].concat(_toConsumableArray__default["default"]((_urlToAiImages = urlToAiImages) !== null && _urlToAiImages !== void 0 ? _urlToAiImages : []), _toConsumableArray__default["default"]((_alternateSetImages = alternateSetImages) !== null && _alternateSetImages !== void 0 ? _alternateSetImages : [])),
|
|
45500
|
+
SetImages: [].concat(_toConsumableArray__default["default"]((_urlToAiImages = urlToAiImages) !== null && _urlToAiImages !== void 0 ? _urlToAiImages : []), _toConsumableArray__default["default"]((_alternateSetImages = alternateSetImages) !== null && _alternateSetImages !== void 0 ? _alternateSetImages : []), _toConsumableArray__default["default"]((_capturedSetImages = capturedSetImages) !== null && _capturedSetImages !== void 0 ? _capturedSetImages : [])),
|
|
45427
45501
|
SetHash: set.setHash,
|
|
45428
45502
|
FavoriteAiRoomKeys: set.getAiImagesAsJpg().map(function (img) {
|
|
45429
45503
|
return img.promptId;
|
|
@@ -45453,7 +45527,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45453
45527
|
MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
|
|
45454
45528
|
});
|
|
45455
45529
|
return _context44.abrupt("return", orderSet);
|
|
45456
|
-
case
|
|
45530
|
+
case 53:
|
|
45457
45531
|
case "end":
|
|
45458
45532
|
return _context44.stop();
|
|
45459
45533
|
}
|
|
@@ -45469,106 +45543,207 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45469
45543
|
* @param set
|
|
45470
45544
|
* @param overwriteLastSavedRendering If set to true, it always asks for a new rendering. If false it returns the previously saved rendering (When entering Summary)
|
|
45471
45545
|
*/
|
|
45546
|
+
/**
|
|
45547
|
+
* Produces the set's 3D image(s).
|
|
45548
|
+
*
|
|
45549
|
+
* A viewer that can capture in-browser is preferred: it renders what the customer is actually
|
|
45550
|
+
* looking at, and it skips a render-farm round-trip. `basketData` is what enables it — the
|
|
45551
|
+
* captured blobs are enqueued on the basket and uploaded with the save — so the flows that
|
|
45552
|
+
* cannot enqueue (the ConfigVariant loop in {@link FavoritesHandler}) pass none and keep using
|
|
45553
|
+
* the render farm. So does a headless artifact pass, which has no attached view to capture with.
|
|
45554
|
+
*
|
|
45555
|
+
* The Unity round-trip is NOT skipped by this: the HQ render script comes from the same
|
|
45556
|
+
* connection and is what an rtv-next viewer builds its scene from. Only the image leg changes.
|
|
45557
|
+
*/
|
|
45472
45558
|
}, {
|
|
45473
45559
|
key: "getSetImage",
|
|
45474
45560
|
value: (function () {
|
|
45475
|
-
var _getSetImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee42(set, overwriteLastSavedRendering) {
|
|
45476
|
-
var is3D, saved, _yield$set$plannerHan, dimensions, url;
|
|
45561
|
+
var _getSetImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee42(set, overwriteLastSavedRendering, basketData) {
|
|
45562
|
+
var empty, is3D, captured, saved, _yield$set$plannerHan, dimensions, url;
|
|
45477
45563
|
return _regeneratorRuntime__default["default"].wrap(function _callee42$(_context45) {
|
|
45478
45564
|
while (1) switch (_context45.prev = _context45.next) {
|
|
45479
45565
|
case 0:
|
|
45566
|
+
empty = {
|
|
45567
|
+
dimensions: {
|
|
45568
|
+
w: undefined,
|
|
45569
|
+
h: undefined,
|
|
45570
|
+
d: undefined
|
|
45571
|
+
},
|
|
45572
|
+
url: undefined,
|
|
45573
|
+
additionalImages: undefined,
|
|
45574
|
+
captured: false
|
|
45575
|
+
};
|
|
45480
45576
|
is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
45481
|
-
if (
|
|
45482
|
-
_context45.next =
|
|
45577
|
+
if (is3D) {
|
|
45578
|
+
_context45.next = 4;
|
|
45483
45579
|
break;
|
|
45484
45580
|
}
|
|
45485
|
-
_context45.
|
|
45486
|
-
return set.plannerHandler.saveSetImage(overwriteLastSavedRendering);
|
|
45581
|
+
return _context45.abrupt("return", empty);
|
|
45487
45582
|
case 4:
|
|
45583
|
+
if (!basketData) {
|
|
45584
|
+
_context45.next = 10;
|
|
45585
|
+
break;
|
|
45586
|
+
}
|
|
45587
|
+
_context45.next = 7;
|
|
45588
|
+
return this.getCapturedSetImages(set, basketData);
|
|
45589
|
+
case 7:
|
|
45590
|
+
captured = _context45.sent;
|
|
45591
|
+
if (!captured) {
|
|
45592
|
+
_context45.next = 10;
|
|
45593
|
+
break;
|
|
45594
|
+
}
|
|
45595
|
+
return _context45.abrupt("return", captured);
|
|
45596
|
+
case 10:
|
|
45597
|
+
_context45.next = 12;
|
|
45598
|
+
return set.plannerHandler.saveSetImage(overwriteLastSavedRendering);
|
|
45599
|
+
case 12:
|
|
45488
45600
|
saved = _context45.sent;
|
|
45489
45601
|
if (saved) {
|
|
45490
|
-
_context45.next =
|
|
45602
|
+
_context45.next = 15;
|
|
45491
45603
|
break;
|
|
45492
45604
|
}
|
|
45493
|
-
return _context45.abrupt("return",
|
|
45494
|
-
|
|
45495
|
-
|
|
45496
|
-
h: undefined,
|
|
45497
|
-
d: undefined
|
|
45498
|
-
},
|
|
45499
|
-
url: undefined
|
|
45500
|
-
});
|
|
45501
|
-
case 7:
|
|
45502
|
-
_context45.next = 9;
|
|
45605
|
+
return _context45.abrupt("return", empty);
|
|
45606
|
+
case 15:
|
|
45607
|
+
_context45.next = 17;
|
|
45503
45608
|
return set.plannerHandler.getSetImageAsUrl(set.getSetId());
|
|
45504
|
-
case
|
|
45609
|
+
case 17:
|
|
45505
45610
|
_yield$set$plannerHan = _context45.sent;
|
|
45506
45611
|
dimensions = _yield$set$plannerHan.dimensions;
|
|
45507
45612
|
url = _yield$set$plannerHan.url;
|
|
45508
45613
|
return _context45.abrupt("return", {
|
|
45509
45614
|
dimensions: dimensions,
|
|
45510
|
-
url: url
|
|
45615
|
+
url: url,
|
|
45616
|
+
additionalImages: undefined,
|
|
45617
|
+
captured: false
|
|
45511
45618
|
});
|
|
45619
|
+
case 21:
|
|
45620
|
+
case "end":
|
|
45621
|
+
return _context45.stop();
|
|
45622
|
+
}
|
|
45623
|
+
}, _callee42, this);
|
|
45624
|
+
}));
|
|
45625
|
+
function getSetImage(_x149, _x150, _x151) {
|
|
45626
|
+
return _getSetImage.apply(this, arguments);
|
|
45627
|
+
}
|
|
45628
|
+
return getSetImage;
|
|
45629
|
+
}()
|
|
45630
|
+
/**
|
|
45631
|
+
* Captures the save shots configured in the viewer preset and enqueues them for upload with the
|
|
45632
|
+
* basket. Returns undefined when nothing was captured, so the caller falls back to the render
|
|
45633
|
+
* farm — that covers a view with no capable viewer, an empty planning, and a failed capture.
|
|
45634
|
+
*
|
|
45635
|
+
* The first shot is the set's main image and lands in `OrderSetData.SetImage`; the rest become
|
|
45636
|
+
* `SetImages[]` entries. `url` stays empty for the same reason {@link get2DSetImage} leaves
|
|
45637
|
+
* `Set2DImage` empty: the real URL is written once the upload completes, and the transient
|
|
45638
|
+
* blob: URL must never reach a persisted field. `captured` is what tells a caller the image
|
|
45639
|
+
* exists despite that empty URL.
|
|
45640
|
+
*/
|
|
45641
|
+
)
|
|
45642
|
+
}, {
|
|
45643
|
+
key: "getCapturedSetImages",
|
|
45644
|
+
value: (function () {
|
|
45645
|
+
var _getCapturedSetImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee43(set, basketData) {
|
|
45646
|
+
var _captured,
|
|
45647
|
+
_this2 = this,
|
|
45648
|
+
_captured$dimensions;
|
|
45649
|
+
var setId, captured, _set$captureSetImages, additionalImages;
|
|
45650
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee43$(_context46) {
|
|
45651
|
+
while (1) switch (_context46.prev = _context46.next) {
|
|
45652
|
+
case 0:
|
|
45653
|
+
setId = set.getSetId();
|
|
45654
|
+
_context46.prev = 1;
|
|
45655
|
+
_context46.next = 4;
|
|
45656
|
+
return (_set$captureSetImages = set.captureSetImages) === null || _set$captureSetImages === void 0 ? void 0 : _set$captureSetImages.call(set);
|
|
45657
|
+
case 4:
|
|
45658
|
+
captured = _context46.sent;
|
|
45659
|
+
_context46.next = 11;
|
|
45660
|
+
break;
|
|
45661
|
+
case 7:
|
|
45662
|
+
_context46.prev = 7;
|
|
45663
|
+
_context46.t0 = _context46["catch"](1);
|
|
45664
|
+
LOG$9.warn("Could not capture set images, falling back to the render farm. setId: ".concat(setId, " Error: ").concat(_context46.t0 === null || _context46.t0 === void 0 ? void 0 : _context46.t0.message));
|
|
45665
|
+
return _context46.abrupt("return", undefined);
|
|
45666
|
+
case 11:
|
|
45667
|
+
if ((_captured = captured) !== null && _captured !== void 0 && _captured.images.length) {
|
|
45668
|
+
_context46.next = 13;
|
|
45669
|
+
break;
|
|
45670
|
+
}
|
|
45671
|
+
return _context46.abrupt("return", undefined);
|
|
45512
45672
|
case 13:
|
|
45513
|
-
|
|
45514
|
-
|
|
45673
|
+
// Every enqueue happens after the (only) awaited step, so a capture can never leave the
|
|
45674
|
+
// basket holding some of a set's shots while the render-farm fallback writes the rest.
|
|
45675
|
+
additionalImages = captured.images.map(function (image, index) {
|
|
45676
|
+
// The first shot is the main image and has no SetImages[] entry; the rest are keyed by
|
|
45677
|
+
// shot id so the backend can resolve which entry to write each URL into.
|
|
45678
|
+
var setImagesId = index === 0 ? undefined : "".concat(setId, "_").concat(image.id);
|
|
45679
|
+
var extension = image.format === 'jpeg' ? 'jpg' : 'png';
|
|
45680
|
+
var fileName = _this2.getPendingUploadFileName(basketData, setId, 'planning3D', extension, undefined, setImagesId ? image.id : undefined);
|
|
45681
|
+
return set.plannerHandler.saveCapturedSetImage(basketData, setId, image, fileName, setImagesId);
|
|
45682
|
+
}).filter(function (setImage) {
|
|
45683
|
+
return setImage !== undefined;
|
|
45684
|
+
});
|
|
45685
|
+
return _context46.abrupt("return", {
|
|
45686
|
+
url: '',
|
|
45687
|
+
dimensions: (_captured$dimensions = captured.dimensions) !== null && _captured$dimensions !== void 0 ? _captured$dimensions : {
|
|
45515
45688
|
w: undefined,
|
|
45516
45689
|
h: undefined,
|
|
45517
45690
|
d: undefined
|
|
45518
|
-
}
|
|
45691
|
+
},
|
|
45692
|
+
additionalImages: additionalImages,
|
|
45693
|
+
captured: true
|
|
45519
45694
|
});
|
|
45520
|
-
case
|
|
45695
|
+
case 15:
|
|
45521
45696
|
case "end":
|
|
45522
|
-
return
|
|
45697
|
+
return _context46.stop();
|
|
45523
45698
|
}
|
|
45524
|
-
},
|
|
45699
|
+
}, _callee43, null, [[1, 7]]);
|
|
45525
45700
|
}));
|
|
45526
|
-
function
|
|
45527
|
-
return
|
|
45701
|
+
function getCapturedSetImages(_x152, _x153) {
|
|
45702
|
+
return _getCapturedSetImages.apply(this, arguments);
|
|
45528
45703
|
}
|
|
45529
|
-
return
|
|
45704
|
+
return getCapturedSetImages;
|
|
45530
45705
|
}())
|
|
45531
45706
|
}, {
|
|
45532
45707
|
key: "getHQRenderScript",
|
|
45533
45708
|
value: function () {
|
|
45534
|
-
var _getHQRenderScript = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
45709
|
+
var _getHQRenderScript = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee44(set, divaNr) {
|
|
45535
45710
|
var is3D, hqRenderScript, createdHQRenderScript;
|
|
45536
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
45537
|
-
while (1) switch (
|
|
45711
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee44$(_context47) {
|
|
45712
|
+
while (1) switch (_context47.prev = _context47.next) {
|
|
45538
45713
|
case 0:
|
|
45539
45714
|
is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
45540
45715
|
if (is3D) {
|
|
45541
|
-
|
|
45716
|
+
_context47.next = 3;
|
|
45542
45717
|
break;
|
|
45543
45718
|
}
|
|
45544
|
-
return
|
|
45719
|
+
return _context47.abrupt("return");
|
|
45545
45720
|
case 3:
|
|
45546
|
-
|
|
45721
|
+
_context47.next = 5;
|
|
45547
45722
|
return set.plannerHandler.saveSetHQRenderScript();
|
|
45548
45723
|
case 5:
|
|
45549
45724
|
hqRenderScript = set.plannerHandler.getSetHQRenderScript();
|
|
45550
45725
|
if (hqRenderScript) {
|
|
45551
|
-
|
|
45726
|
+
_context47.next = 8;
|
|
45552
45727
|
break;
|
|
45553
45728
|
}
|
|
45554
|
-
return
|
|
45729
|
+
return _context47.abrupt("return");
|
|
45555
45730
|
case 8:
|
|
45556
|
-
|
|
45731
|
+
_context47.next = 10;
|
|
45557
45732
|
return set.api.postHQRenderScript({
|
|
45558
45733
|
divaNr: divaNr,
|
|
45559
45734
|
hqRenderscript: hqRenderScript,
|
|
45560
45735
|
organization: set.api.OrganizationId
|
|
45561
45736
|
});
|
|
45562
45737
|
case 10:
|
|
45563
|
-
createdHQRenderScript =
|
|
45564
|
-
return
|
|
45738
|
+
createdHQRenderScript = _context47.sent;
|
|
45739
|
+
return _context47.abrupt("return", createdHQRenderScript);
|
|
45565
45740
|
case 12:
|
|
45566
45741
|
case "end":
|
|
45567
|
-
return
|
|
45742
|
+
return _context47.stop();
|
|
45568
45743
|
}
|
|
45569
|
-
},
|
|
45744
|
+
}, _callee44);
|
|
45570
45745
|
}));
|
|
45571
|
-
function getHQRenderScript(
|
|
45746
|
+
function getHQRenderScript(_x154, _x155) {
|
|
45572
45747
|
return _getHQRenderScript.apply(this, arguments);
|
|
45573
45748
|
}
|
|
45574
45749
|
return getHQRenderScript;
|
|
@@ -45582,69 +45757,128 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45582
45757
|
}, {
|
|
45583
45758
|
key: "getAlternateSetImages",
|
|
45584
45759
|
value: (function () {
|
|
45585
|
-
var _getAlternateSetImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
45760
|
+
var _getAlternateSetImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee45(set) {
|
|
45586
45761
|
var is2D, catalogData, setImages;
|
|
45587
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
45588
|
-
while (1) switch (
|
|
45762
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee45$(_context48) {
|
|
45763
|
+
while (1) switch (_context48.prev = _context48.next) {
|
|
45589
45764
|
case 0:
|
|
45590
45765
|
is2D = !['3DImage', '3DCOMB', 'BoxPlanner'].includes(set.getPlannerMode());
|
|
45591
45766
|
if (!(is2D || set.onlyRunLogic)) {
|
|
45592
|
-
|
|
45767
|
+
_context48.next = 3;
|
|
45593
45768
|
break;
|
|
45594
45769
|
}
|
|
45595
|
-
return
|
|
45770
|
+
return _context48.abrupt("return", []);
|
|
45596
45771
|
case 3:
|
|
45597
45772
|
catalogData = set.CatalogData;
|
|
45598
|
-
|
|
45773
|
+
_context48.next = 6;
|
|
45599
45774
|
return set.plannerHandler.saveAlternateSetImages(catalogData.catalogCodex, catalogData.catalogGuid);
|
|
45600
45775
|
case 6:
|
|
45601
|
-
|
|
45776
|
+
_context48.next = 8;
|
|
45602
45777
|
return set.plannerHandler.getAlternateSetImagesAsSetImageData(set.getSetId());
|
|
45603
45778
|
case 8:
|
|
45604
|
-
setImages =
|
|
45605
|
-
return
|
|
45779
|
+
setImages = _context48.sent;
|
|
45780
|
+
return _context48.abrupt("return", setImages);
|
|
45606
45781
|
case 10:
|
|
45607
45782
|
case "end":
|
|
45608
|
-
return
|
|
45783
|
+
return _context48.stop();
|
|
45609
45784
|
}
|
|
45610
|
-
},
|
|
45785
|
+
}, _callee45);
|
|
45611
45786
|
}));
|
|
45612
|
-
function getAlternateSetImages(
|
|
45787
|
+
function getAlternateSetImages(_x156) {
|
|
45613
45788
|
return _getAlternateSetImages.apply(this, arguments);
|
|
45614
45789
|
}
|
|
45615
45790
|
return getAlternateSetImages;
|
|
45791
|
+
}()
|
|
45792
|
+
/**
|
|
45793
|
+
* Exports the planning's GLB model from the live viewer and enqueues it for upload with the
|
|
45794
|
+
* basket save. Like the captured images it returns an empty string rather than a URL — the real
|
|
45795
|
+
* one is written once the upload completes — and undefined when there is no model at all: no
|
|
45796
|
+
* viewer that can export one, the preset turned it off, or an empty planning.
|
|
45797
|
+
*
|
|
45798
|
+
* Must NOT run beside {@link getSetImage}'s capture. A capture batch overrides the viewer's view
|
|
45799
|
+
* mode and resolution, and the exporter declines outright while one is in flight, so running
|
|
45800
|
+
* them concurrently would silently produce no model at all.
|
|
45801
|
+
*/
|
|
45802
|
+
)
|
|
45803
|
+
}, {
|
|
45804
|
+
key: "getSetGlb",
|
|
45805
|
+
value: (function () {
|
|
45806
|
+
var _getSetGlb = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee46(set, basketData) {
|
|
45807
|
+
var is3D, setId, glb;
|
|
45808
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee46$(_context49) {
|
|
45809
|
+
while (1) switch (_context49.prev = _context49.next) {
|
|
45810
|
+
case 0:
|
|
45811
|
+
is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
45812
|
+
if (is3D) {
|
|
45813
|
+
_context49.next = 3;
|
|
45814
|
+
break;
|
|
45815
|
+
}
|
|
45816
|
+
return _context49.abrupt("return", undefined);
|
|
45817
|
+
case 3:
|
|
45818
|
+
setId = set.getSetId();
|
|
45819
|
+
_context49.prev = 4;
|
|
45820
|
+
_context49.next = 7;
|
|
45821
|
+
return set.exportSetGlb();
|
|
45822
|
+
case 7:
|
|
45823
|
+
glb = _context49.sent;
|
|
45824
|
+
_context49.next = 14;
|
|
45825
|
+
break;
|
|
45826
|
+
case 10:
|
|
45827
|
+
_context49.prev = 10;
|
|
45828
|
+
_context49.t0 = _context49["catch"](4);
|
|
45829
|
+
LOG$9.warn("Could not export the set GLB, the set is saved without a model. setId: ".concat(setId, " Error: ").concat(_context49.t0 === null || _context49.t0 === void 0 ? void 0 : _context49.t0.message));
|
|
45830
|
+
return _context49.abrupt("return", undefined);
|
|
45831
|
+
case 14:
|
|
45832
|
+
if (glb) {
|
|
45833
|
+
_context49.next = 16;
|
|
45834
|
+
break;
|
|
45835
|
+
}
|
|
45836
|
+
return _context49.abrupt("return", undefined);
|
|
45837
|
+
case 16:
|
|
45838
|
+
set.plannerHandler.saveSetGlb(basketData, setId, glb, this.getPendingUploadFileName(basketData, setId, 'planning3DGlb', 'glb'));
|
|
45839
|
+
return _context49.abrupt("return", '');
|
|
45840
|
+
case 18:
|
|
45841
|
+
case "end":
|
|
45842
|
+
return _context49.stop();
|
|
45843
|
+
}
|
|
45844
|
+
}, _callee46, this, [[4, 10]]);
|
|
45845
|
+
}));
|
|
45846
|
+
function getSetGlb(_x157, _x158) {
|
|
45847
|
+
return _getSetGlb.apply(this, arguments);
|
|
45848
|
+
}
|
|
45849
|
+
return getSetGlb;
|
|
45616
45850
|
}())
|
|
45617
45851
|
}, {
|
|
45618
45852
|
key: "get2DSetImage",
|
|
45619
45853
|
value: function () {
|
|
45620
|
-
var _get2DSetImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
45854
|
+
var _get2DSetImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee47(set, basketData, variantId) {
|
|
45621
45855
|
var urlToPlanning2D, planning2DAsJPGBase64, fileName;
|
|
45622
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
45623
|
-
while (1) switch (
|
|
45856
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee47$(_context50) {
|
|
45857
|
+
while (1) switch (_context50.prev = _context50.next) {
|
|
45624
45858
|
case 0:
|
|
45625
45859
|
urlToPlanning2D = undefined;
|
|
45626
|
-
|
|
45860
|
+
_context50.next = 3;
|
|
45627
45861
|
return set.getPlanning2DAsJpg();
|
|
45628
45862
|
case 3:
|
|
45629
|
-
planning2DAsJPGBase64 =
|
|
45863
|
+
planning2DAsJPGBase64 = _context50.sent;
|
|
45630
45864
|
if (!(planning2DAsJPGBase64 != undefined && planning2DAsJPGBase64 != '' && planning2DAsJPGBase64 != 'data:,')) {
|
|
45631
|
-
|
|
45865
|
+
_context50.next = 9;
|
|
45632
45866
|
break;
|
|
45633
45867
|
}
|
|
45634
45868
|
fileName = this.getPendingUploadFileName(basketData, set.getSetId(), 'planning2D', 'jpg', variantId);
|
|
45635
|
-
|
|
45869
|
+
_context50.next = 8;
|
|
45636
45870
|
return set.plannerHandler.saveSet2DImage(basketData, set.getSetId(), planning2DAsJPGBase64, fileName, variantId);
|
|
45637
45871
|
case 8:
|
|
45638
|
-
urlToPlanning2D =
|
|
45872
|
+
urlToPlanning2D = _context50.sent;
|
|
45639
45873
|
case 9:
|
|
45640
|
-
return
|
|
45874
|
+
return _context50.abrupt("return", urlToPlanning2D);
|
|
45641
45875
|
case 10:
|
|
45642
45876
|
case "end":
|
|
45643
|
-
return
|
|
45877
|
+
return _context50.stop();
|
|
45644
45878
|
}
|
|
45645
|
-
},
|
|
45879
|
+
}, _callee47, this);
|
|
45646
45880
|
}));
|
|
45647
|
-
function get2DSetImage(
|
|
45881
|
+
function get2DSetImage(_x159, _x160, _x161) {
|
|
45648
45882
|
return _get2DSetImage.apply(this, arguments);
|
|
45649
45883
|
}
|
|
45650
45884
|
return get2DSetImage;
|
|
@@ -45652,29 +45886,29 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45652
45886
|
}, {
|
|
45653
45887
|
key: "getAiImages",
|
|
45654
45888
|
value: function () {
|
|
45655
|
-
var _getAiImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
45889
|
+
var _getAiImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee48(set, basketData) {
|
|
45656
45890
|
var aiImages, fileName, savedImages;
|
|
45657
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
45658
|
-
while (1) switch (
|
|
45891
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee48$(_context51) {
|
|
45892
|
+
while (1) switch (_context51.prev = _context51.next) {
|
|
45659
45893
|
case 0:
|
|
45660
45894
|
aiImages = set.getAiImagesAsJpg();
|
|
45661
45895
|
fileName = this.getPendingUploadFileName(basketData, set.getSetId(), 'aiImage', 'png'); // Save all AI images in parallel
|
|
45662
|
-
|
|
45896
|
+
_context51.next = 4;
|
|
45663
45897
|
return Promise.all(aiImages.map(function (_ref5) {
|
|
45664
45898
|
var promptId = _ref5.promptId,
|
|
45665
45899
|
base64 = _ref5.base64;
|
|
45666
45900
|
return set.plannerHandler.saveAiImage(basketData, set.getSetId(), promptId, base64, fileName);
|
|
45667
45901
|
}));
|
|
45668
45902
|
case 4:
|
|
45669
|
-
savedImages =
|
|
45670
|
-
return
|
|
45903
|
+
savedImages = _context51.sent;
|
|
45904
|
+
return _context51.abrupt("return", savedImages);
|
|
45671
45905
|
case 6:
|
|
45672
45906
|
case "end":
|
|
45673
|
-
return
|
|
45907
|
+
return _context51.stop();
|
|
45674
45908
|
}
|
|
45675
|
-
},
|
|
45909
|
+
}, _callee48, this);
|
|
45676
45910
|
}));
|
|
45677
|
-
function getAiImages(
|
|
45911
|
+
function getAiImages(_x162, _x163) {
|
|
45678
45912
|
return _getAiImages.apply(this, arguments);
|
|
45679
45913
|
}
|
|
45680
45914
|
return getAiImages;
|
|
@@ -45682,37 +45916,37 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45682
45916
|
}, {
|
|
45683
45917
|
key: "getAiImage",
|
|
45684
45918
|
value: function () {
|
|
45685
|
-
var _getAiImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
45919
|
+
var _getAiImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee49(set, basketData) {
|
|
45686
45920
|
var aiImages, _aiImages$, promptId, base64, fileName;
|
|
45687
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
45688
|
-
while (1) switch (
|
|
45921
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee49$(_context52) {
|
|
45922
|
+
while (1) switch (_context52.prev = _context52.next) {
|
|
45689
45923
|
case 0:
|
|
45690
45924
|
aiImages = set.getAiImagesAsJpg();
|
|
45691
45925
|
if (!(aiImages.length === 0)) {
|
|
45692
|
-
|
|
45926
|
+
_context52.next = 3;
|
|
45693
45927
|
break;
|
|
45694
45928
|
}
|
|
45695
|
-
return
|
|
45929
|
+
return _context52.abrupt("return", undefined);
|
|
45696
45930
|
case 3:
|
|
45697
45931
|
if (basketData) {
|
|
45698
|
-
|
|
45932
|
+
_context52.next = 5;
|
|
45699
45933
|
break;
|
|
45700
45934
|
}
|
|
45701
|
-
return
|
|
45935
|
+
return _context52.abrupt("return", undefined);
|
|
45702
45936
|
case 5:
|
|
45703
45937
|
_aiImages$ = aiImages[0], promptId = _aiImages$.promptId, base64 = _aiImages$.base64;
|
|
45704
45938
|
fileName = this.getPendingUploadFileName(basketData, set.getSetId(), 'aiImage', 'png');
|
|
45705
|
-
|
|
45939
|
+
_context52.next = 9;
|
|
45706
45940
|
return set.plannerHandler.saveAiImage(basketData, set.getSetId(), promptId, base64, fileName);
|
|
45707
45941
|
case 9:
|
|
45708
|
-
return
|
|
45942
|
+
return _context52.abrupt("return", _context52.sent);
|
|
45709
45943
|
case 10:
|
|
45710
45944
|
case "end":
|
|
45711
|
-
return
|
|
45945
|
+
return _context52.stop();
|
|
45712
45946
|
}
|
|
45713
|
-
},
|
|
45947
|
+
}, _callee49, this);
|
|
45714
45948
|
}));
|
|
45715
|
-
function getAiImage(
|
|
45949
|
+
function getAiImage(_x164, _x165) {
|
|
45716
45950
|
return _getAiImage.apply(this, arguments);
|
|
45717
45951
|
}
|
|
45718
45952
|
return getAiImage;
|
|
@@ -45755,25 +45989,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45755
45989
|
}, {
|
|
45756
45990
|
key: "addOrderSetArticlesToExistingSet",
|
|
45757
45991
|
value: function () {
|
|
45758
|
-
var _addOrderSetArticlesToExistingSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
45759
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
45760
|
-
while (1) switch (
|
|
45992
|
+
var _addOrderSetArticlesToExistingSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee50(set, orderSet, lastSetToInitialize) {
|
|
45993
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee50$(_context53) {
|
|
45994
|
+
while (1) switch (_context53.prev = _context53.next) {
|
|
45761
45995
|
case 0:
|
|
45762
45996
|
//TODO: GLOBAL STUFF
|
|
45763
45997
|
//this.updateActSet(set);
|
|
45764
45998
|
orderSet.changeBasketIds();
|
|
45765
|
-
|
|
45999
|
+
_context53.next = 3;
|
|
45766
46000
|
return this.initOrderLineArticles(set, orderSet);
|
|
45767
46001
|
case 3:
|
|
45768
|
-
|
|
46002
|
+
_context53.next = 5;
|
|
45769
46003
|
return set.plannerHandler.extendSet(set, orderSet.SetPlanData, lastSetToInitialize);
|
|
45770
46004
|
case 5:
|
|
45771
46005
|
case "end":
|
|
45772
|
-
return
|
|
46006
|
+
return _context53.stop();
|
|
45773
46007
|
}
|
|
45774
|
-
},
|
|
46008
|
+
}, _callee50, this);
|
|
45775
46009
|
}));
|
|
45776
|
-
function addOrderSetArticlesToExistingSet(
|
|
46010
|
+
function addOrderSetArticlesToExistingSet(_x166, _x167, _x168) {
|
|
45777
46011
|
return _addOrderSetArticlesToExistingSet.apply(this, arguments);
|
|
45778
46012
|
}
|
|
45779
46013
|
return addOrderSetArticlesToExistingSet;
|
|
@@ -46737,11 +46971,9 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
46737
46971
|
}
|
|
46738
46972
|
}, {
|
|
46739
46973
|
key: "fillBaksetforOnWebPlanerConfigChange",
|
|
46740
|
-
value: function fillBaksetforOnWebPlanerConfigChange(set, newBasket, options, isInit, eventKey
|
|
46974
|
+
value: function fillBaksetforOnWebPlanerConfigChange(set, newBasket, options, isInit, eventKey) {
|
|
46741
46975
|
var _this$plannerConfig$a6;
|
|
46742
46976
|
this.setBasketData(this.actDivaNr, newBasket);
|
|
46743
|
-
// language the catalog was loaded in: `name` of options/values is in this language
|
|
46744
|
-
var loadedLang = lang !== null && lang !== void 0 ? lang : 'DE';
|
|
46745
46977
|
var changedValues = {};
|
|
46746
46978
|
var sendToSap = [];
|
|
46747
46979
|
var article = set.getDivaArticles()[Object.keys(set.getDivaArticles())[0]];
|
|
@@ -46832,18 +47064,12 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
46832
47064
|
attributeValue = name;
|
|
46833
47065
|
}
|
|
46834
47066
|
}
|
|
46835
|
-
// `name` is only the loaded catalog language; the other languages come from name_locales
|
|
46836
|
-
// (API2 keys them lowercase, IDM masks uppercase). Free text keeps its per-language input instead.
|
|
46837
|
-
var valueName = function valueName(valueLang) {
|
|
46838
|
-
var _val$name_locales$val, _val$name_locales, _val$name_locales2;
|
|
46839
|
-
return valueLang === loadedLang ? name : (_val$name_locales$val = (_val$name_locales = val.name_locales) === null || _val$name_locales === void 0 ? void 0 : _val$name_locales[valueLang]) !== null && _val$name_locales$val !== void 0 ? _val$name_locales$val : (_val$name_locales2 = val.name_locales) === null || _val$name_locales2 === void 0 ? void 0 : _val$name_locales2[valueLang.toLowerCase()];
|
|
46840
|
-
};
|
|
46841
47067
|
return {
|
|
46842
47068
|
attributeValue: attributeValue,
|
|
46843
47069
|
hexColor: val.hexColor,
|
|
46844
|
-
attributeValueNameDe:
|
|
46845
|
-
attributeValueNameFr:
|
|
46846
|
-
attributeValueNameIt:
|
|
47070
|
+
attributeValueNameDe: name,
|
|
47071
|
+
attributeValueNameFr: (_ops$freeTextLang3 = ops.freeTextLang) === null || _ops$freeTextLang3 === void 0 ? void 0 : _ops$freeTextLang3['FR'],
|
|
47072
|
+
attributeValueNameIt: (_ops$freeTextLang4 = ops.freeTextLang) === null || _ops$freeTextLang4 === void 0 ? void 0 : _ops$freeTextLang4['IT'],
|
|
46847
47073
|
attributeValueVCodex: (_val$vCodex = val === null || val === void 0 ? void 0 : val.vCodex) !== null && _val$vCodex !== void 0 ? _val$vCodex : undefined,
|
|
46848
47074
|
position: opsKeys.indexOf(ops.option.codex),
|
|
46849
47075
|
attributeName: ops.option.name,
|
|
@@ -46889,7 +47115,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
46889
47115
|
break;
|
|
46890
47116
|
case 3:
|
|
46891
47117
|
_context12.next = 5;
|
|
46892
|
-
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-
|
|
47118
|
+
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-d95419db.js'); });
|
|
46893
47119
|
case 5:
|
|
46894
47120
|
_yield$import = _context12.sent;
|
|
46895
47121
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -46897,7 +47123,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
46897
47123
|
return _context12.abrupt("break", 27);
|
|
46898
47124
|
case 9:
|
|
46899
47125
|
_context12.next = 11;
|
|
46900
|
-
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-
|
|
47126
|
+
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-635cffae.js'); });
|
|
46901
47127
|
case 11:
|
|
46902
47128
|
_yield$import2 = _context12.sent;
|
|
46903
47129
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -46905,7 +47131,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
46905
47131
|
return _context12.abrupt("break", 27);
|
|
46906
47132
|
case 15:
|
|
46907
47133
|
_context12.next = 17;
|
|
46908
|
-
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-
|
|
47134
|
+
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-777904e8.js'); });
|
|
46909
47135
|
case 17:
|
|
46910
47136
|
_yield$import3 = _context12.sent;
|
|
46911
47137
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -46913,7 +47139,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
46913
47139
|
return _context12.abrupt("break", 27);
|
|
46914
47140
|
case 21:
|
|
46915
47141
|
_context12.next = 23;
|
|
46916
|
-
return Promise.resolve().then(function () { return require('./StandardWWSHandler-
|
|
47142
|
+
return Promise.resolve().then(function () { return require('./StandardWWSHandler-e92acae6.js'); });
|
|
46917
47143
|
case 23:
|
|
46918
47144
|
_yield$import4 = _context12.sent;
|
|
46919
47145
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -48300,7 +48526,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
48300
48526
|
//If we need real time rendering initialize the SignalR and 3D host connection Handler
|
|
48301
48527
|
bootMark('signalr: chunk import start');
|
|
48302
48528
|
_context3.next = 3;
|
|
48303
|
-
return Promise.resolve().then(function () { return require('./Host3DSignalR-
|
|
48529
|
+
return Promise.resolve().then(function () { return require('./Host3DSignalR-6914541f.js'); });
|
|
48304
48530
|
case 3:
|
|
48305
48531
|
_yield$import = _context3.sent;
|
|
48306
48532
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -50032,7 +50258,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
50032
50258
|
break;
|
|
50033
50259
|
case 8:
|
|
50034
50260
|
_context5.next = 10;
|
|
50035
|
-
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-
|
|
50261
|
+
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-3d6a05bc.js'); });
|
|
50036
50262
|
case 10:
|
|
50037
50263
|
_yield$import = _context5.sent;
|
|
50038
50264
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -50043,7 +50269,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
50043
50269
|
return _context5.abrupt("break", 21);
|
|
50044
50270
|
case 15:
|
|
50045
50271
|
_context5.next = 17;
|
|
50046
|
-
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-
|
|
50272
|
+
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-2c699ee3.js'); });
|
|
50047
50273
|
case 17:
|
|
50048
50274
|
_yield$import2 = _context5.sent;
|
|
50049
50275
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -50586,6 +50812,62 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
50586
50812
|
}
|
|
50587
50813
|
return saveSet2DImage;
|
|
50588
50814
|
}()
|
|
50815
|
+
/**
|
|
50816
|
+
* Enqueues one browser-captured set image for upload with the basket save.
|
|
50817
|
+
*
|
|
50818
|
+
* Without a `setImagesId` the image is the set's MAIN one: the backend writes its URL into
|
|
50819
|
+
* `OrderSetData.SetImage` (or the matching `ConfigVariants[].SetImage`), so there is no
|
|
50820
|
+
* `SetImages[]` entry to return. With one, the image is an additional view and the returned
|
|
50821
|
+
* entry must be attached to the order set, otherwise the URL has no target to be written to.
|
|
50822
|
+
*
|
|
50823
|
+
* Like {@link saveSet2DImage}, the URL stays empty until the save completes — a transient
|
|
50824
|
+
* blob: URL is not serializable and must never reach a persisted field.
|
|
50825
|
+
*/
|
|
50826
|
+
}, {
|
|
50827
|
+
key: "saveCapturedSetImage",
|
|
50828
|
+
value: function saveCapturedSetImage(basket, setId, image, fileName, setImagesId, variantId) {
|
|
50829
|
+
var _image$name;
|
|
50830
|
+
var mimeType = image.format === 'jpeg' ? 'image/jpeg' : 'image/png';
|
|
50831
|
+
basket.addPendingUpload({
|
|
50832
|
+
slot: 'planning3D',
|
|
50833
|
+
setId: setId,
|
|
50834
|
+
setImagesId: setImagesId,
|
|
50835
|
+
variantId: variantId,
|
|
50836
|
+
fileName: fileName,
|
|
50837
|
+
mimeType: image.blob.type || mimeType,
|
|
50838
|
+
size: image.blob.size,
|
|
50839
|
+
blob: image.blob,
|
|
50840
|
+
previewUrl: this.createPreviewUrl(image.blob)
|
|
50841
|
+
});
|
|
50842
|
+
if (!setImagesId) return undefined;
|
|
50843
|
+
return {
|
|
50844
|
+
Description: (_image$name = image.name) !== null && _image$name !== void 0 ? _image$name : image.id,
|
|
50845
|
+
Filename: fileName,
|
|
50846
|
+
Id: setImagesId,
|
|
50847
|
+
RenderWidth: image.width,
|
|
50848
|
+
RenderHeight: image.height,
|
|
50849
|
+
URL: ''
|
|
50850
|
+
};
|
|
50851
|
+
}
|
|
50852
|
+
|
|
50853
|
+
/**
|
|
50854
|
+
* Enqueues the planning's GLB model for upload with the basket save. Its URL is written into
|
|
50855
|
+
* `OrderSetData.SetGlb` once the upload completes, so like the captured images it stays empty
|
|
50856
|
+
* here — a transient blob: URL must never reach a persisted field.
|
|
50857
|
+
*/
|
|
50858
|
+
}, {
|
|
50859
|
+
key: "saveSetGlb",
|
|
50860
|
+
value: function saveSetGlb(basket, setId, glb, fileName) {
|
|
50861
|
+
basket.addPendingUpload({
|
|
50862
|
+
slot: 'planning3DGlb',
|
|
50863
|
+
setId: setId,
|
|
50864
|
+
fileName: fileName,
|
|
50865
|
+
mimeType: glb.type || 'model/gltf-binary',
|
|
50866
|
+
size: glb.size,
|
|
50867
|
+
blob: glb,
|
|
50868
|
+
previewUrl: this.createPreviewUrl(glb)
|
|
50869
|
+
});
|
|
50870
|
+
}
|
|
50589
50871
|
}, {
|
|
50590
50872
|
key: "saveAiImage",
|
|
50591
50873
|
value: function () {
|
|
@@ -51224,6 +51506,13 @@ function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
51224
51506
|
|
|
51225
51507
|
var LOG$2 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
51226
51508
|
|
|
51509
|
+
/** One image captured from the live 3D viewer when a planning is saved. */
|
|
51510
|
+
|
|
51511
|
+
/**
|
|
51512
|
+
* The result of capturing a set's save shots in the browser — the replacement for a render-farm
|
|
51513
|
+
* rendering. The first image is the set's main image; the rest are additional views.
|
|
51514
|
+
*/
|
|
51515
|
+
|
|
51227
51516
|
/**
|
|
51228
51517
|
* Everything the planner calls on its attached view, registered as ONE object via
|
|
51229
51518
|
* {@link DivaWebPlanner.attachView} (mount or adoption of an existing instance) and removed
|
|
@@ -51366,6 +51655,35 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51366
51655
|
}
|
|
51367
51656
|
}, _callee);
|
|
51368
51657
|
})));
|
|
51658
|
+
/**
|
|
51659
|
+
* Captures the set images from the live viewer. `view === undefined` is the headless state, so
|
|
51660
|
+
* a headless artifact pass returns undefined here and keeps using the render farm.
|
|
51661
|
+
*/
|
|
51662
|
+
_defineProperty__default["default"](this, "captureSetImages", /*#__PURE__*/_asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2() {
|
|
51663
|
+
var _this$view12;
|
|
51664
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
51665
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
51666
|
+
case 0:
|
|
51667
|
+
return _context2.abrupt("return", (_this$view12 = _this.view) === null || _this$view12 === void 0 ? void 0 : _this$view12.captureSetImages());
|
|
51668
|
+
case 1:
|
|
51669
|
+
case "end":
|
|
51670
|
+
return _context2.stop();
|
|
51671
|
+
}
|
|
51672
|
+
}, _callee2);
|
|
51673
|
+
})));
|
|
51674
|
+
/** Headless (`view === undefined`) has no scene to export, so it produces no model. */
|
|
51675
|
+
_defineProperty__default["default"](this, "exportSetGlb", /*#__PURE__*/_asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3() {
|
|
51676
|
+
var _this$view13;
|
|
51677
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context3) {
|
|
51678
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
51679
|
+
case 0:
|
|
51680
|
+
return _context3.abrupt("return", (_this$view13 = _this.view) === null || _this$view13 === void 0 ? void 0 : _this$view13.exportSetGlb());
|
|
51681
|
+
case 1:
|
|
51682
|
+
case "end":
|
|
51683
|
+
return _context3.stop();
|
|
51684
|
+
}
|
|
51685
|
+
}, _callee3);
|
|
51686
|
+
})));
|
|
51369
51687
|
/***********************************Functions in Logik called From View *************************************/
|
|
51370
51688
|
_defineProperty__default["default"](this, "onElementSelectionChanged", function (setId, elementId, oldTabgroupType) {
|
|
51371
51689
|
if (setId) {
|
|
@@ -51377,59 +51695,59 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51377
51695
|
* This Function ist call from the View when all Planner Article are Requested for listing
|
|
51378
51696
|
*/
|
|
51379
51697
|
_defineProperty__default["default"](this, "loadCatalogPlannerArticles", function (paletteeId, isUpdate, type, dockFilter, actStepName, stepKey, selectedArticle) {
|
|
51380
|
-
var _this$
|
|
51698
|
+
var _this$view14;
|
|
51381
51699
|
//Das aktuelle Set weiß welcher catalog gerade geladen ist.
|
|
51382
51700
|
//Von diesem Katalog müssen wir die CatalogPlannerArticles laden.
|
|
51383
|
-
(_this$
|
|
51701
|
+
(_this$view14 = _this.view) === null || _this$view14 === void 0 || _this$view14.updateCatalogPlannerArticles(setHandlerInstance.getPlannerPaletteViewInfo(_this.actSet(), type, selectedArticle), paletteeId, isUpdate, type, dockFilter, actStepName, stepKey);
|
|
51384
51702
|
});
|
|
51385
51703
|
_defineProperty__default["default"](this, "loadCatalogPlannerArticles2Dot0", function (isUpdate, onlySelectionChanged, dp) {
|
|
51386
|
-
var _this$
|
|
51387
|
-
(_this$
|
|
51704
|
+
var _this$view15;
|
|
51705
|
+
(_this$view15 = _this.view) === null || _this$view15 === void 0 || _this$view15.updateCatalogPlanner2Dot0Articles(setHandlerInstance.getPlanner2Dot0PaletteViewInfo(_this.actSet()), isUpdate, onlySelectionChanged, dp);
|
|
51388
51706
|
});
|
|
51389
51707
|
/**
|
|
51390
51708
|
* this fuction loads the accessoires of a specific article -> could be more than one article in the future
|
|
51391
51709
|
* @param targetArticles the article of which we load the accessoires
|
|
51392
51710
|
*/
|
|
51393
51711
|
_defineProperty__default["default"](this, "loadAccessoiresOfArticles", function (targetArticles) {
|
|
51394
|
-
var _this$
|
|
51712
|
+
var _this$view16;
|
|
51395
51713
|
var set = _this.actSet();
|
|
51396
51714
|
if (!set) return;
|
|
51397
|
-
(_this$
|
|
51715
|
+
(_this$view16 = _this.view) === null || _this$view16 === void 0 || _this$view16.updateAccessoiresPalette(setHandlerInstance.getAccessoriesOfArticles(_this.actSet(), targetArticles), set.configAccessoiresInAccessoireStep ? 'ACC_CONFIG' : 'ACC');
|
|
51398
51716
|
});
|
|
51399
51717
|
/**
|
|
51400
51718
|
* this function is called when all Items of a ConfigStep are requested
|
|
51401
51719
|
* @param configStepKey unique indentifier for configStep
|
|
51402
51720
|
*/
|
|
51403
51721
|
_defineProperty__default["default"](this, "loadConfigItemsOfOptions", /*#__PURE__*/function () {
|
|
51404
|
-
var
|
|
51405
|
-
var _this$state2, _this$state3, _this$
|
|
51722
|
+
var _ref4 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee4(configStepKey, paletteId, isUpdate, visible) {
|
|
51723
|
+
var _this$state2, _this$state3, _this$view17;
|
|
51406
51724
|
var retValues;
|
|
51407
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
51408
|
-
while (1) switch (
|
|
51725
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context4) {
|
|
51726
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
51409
51727
|
case 0:
|
|
51410
|
-
|
|
51728
|
+
_context4.next = 2;
|
|
51411
51729
|
return setHandlerInstance.loadConfigItemsOfActSetByConfigStepKey(_this.actSet(), configStepKey, visible, !!((_this$state2 = _this.state) !== null && _this$state2 !== void 0 && _this$state2.hidePrices || (_this$state3 = _this.state) !== null && _this$state3 !== void 0 && _this$state3.hideConfigPricePreview));
|
|
51412
51730
|
case 2:
|
|
51413
|
-
retValues =
|
|
51414
|
-
(_this$
|
|
51731
|
+
retValues = _context4.sent;
|
|
51732
|
+
(_this$view17 = _this.view) === null || _this$view17 === void 0 || _this$view17.updateConfigItems(configStepKey, retValues.configItems, retValues.selectedItems, retValues.actStepName, retValues.paletteType, retValues.filterType, paletteId, isUpdate, retValues.visible, retValues.stepInfo, retValues.isRenderedInAccessorieStep, retValues.isRenderedNotInSettingPalette, retValues.optionCodex, retValues.notTotallyMatichingOPVs, retValues.isMultiselect, retValues.groupsDefaultClosed, retValues.contentItemId, retValues.conceptFilter, retValues.contentItemTeaser, retValues.description);
|
|
51415
51733
|
case 4:
|
|
51416
51734
|
case "end":
|
|
51417
|
-
return
|
|
51735
|
+
return _context4.stop();
|
|
51418
51736
|
}
|
|
51419
|
-
},
|
|
51737
|
+
}, _callee4);
|
|
51420
51738
|
}));
|
|
51421
51739
|
return function (_x, _x2, _x3, _x4) {
|
|
51422
|
-
return
|
|
51740
|
+
return _ref4.apply(this, arguments);
|
|
51423
51741
|
};
|
|
51424
51742
|
}());
|
|
51425
51743
|
/**
|
|
51426
51744
|
* this function laods the summary Items
|
|
51427
51745
|
*/
|
|
51428
|
-
_defineProperty__default["default"](this, "loadSummaryItems", /*#__PURE__*/_asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
51429
|
-
var _this$actions, _this$actions$toggleL, _this$
|
|
51746
|
+
_defineProperty__default["default"](this, "loadSummaryItems", /*#__PURE__*/_asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee5() {
|
|
51747
|
+
var _this$actions, _this$actions$toggleL, _this$view18, _this$actions2, _this$actions2$toggle;
|
|
51430
51748
|
var setPriceCurrency, setPriceFormat, summaryItems;
|
|
51431
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
51432
|
-
while (1) switch (
|
|
51749
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context5) {
|
|
51750
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
51433
51751
|
case 0:
|
|
51434
51752
|
setPriceCurrency = setHandlerInstance.getActSetPriceFormat(_this.actSet());
|
|
51435
51753
|
setPriceFormat = undefined;
|
|
@@ -51440,32 +51758,32 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51440
51758
|
}
|
|
51441
51759
|
//Do also pass the correct price format
|
|
51442
51760
|
(_this$actions = _this.actions) === null || _this$actions === void 0 || (_this$actions$toggleL = _this$actions.toggleLoading) === null || _this$actions$toggleL === void 0 || _this$actions$toggleL.call(_this$actions, 'SUMMARY');
|
|
51443
|
-
|
|
51761
|
+
_context5.next = 6;
|
|
51444
51762
|
return summaryHandlerInstance.getSummaryItems(_this.sets, _this.doConfigure.bind(_this));
|
|
51445
51763
|
case 6:
|
|
51446
|
-
summaryItems =
|
|
51447
|
-
(_this$
|
|
51764
|
+
summaryItems = _context5.sent;
|
|
51765
|
+
(_this$view18 = _this.view) === null || _this$view18 === void 0 || _this$view18.updateSummaryItems(summaryItems, setPriceFormat, summaryHandlerInstance.getSummaryStepWarning(_this.actSet(), summaryItems));
|
|
51448
51766
|
(_this$actions2 = _this.actions) === null || _this$actions2 === void 0 || (_this$actions2$toggle = _this$actions2.toggleLoading) === null || _this$actions2$toggle === void 0 || _this$actions2$toggle.call(_this$actions2, 'SUMMARY');
|
|
51449
51767
|
case 9:
|
|
51450
51768
|
case "end":
|
|
51451
|
-
return
|
|
51769
|
+
return _context5.stop();
|
|
51452
51770
|
}
|
|
51453
|
-
},
|
|
51771
|
+
}, _callee5);
|
|
51454
51772
|
})));
|
|
51455
51773
|
_defineProperty__default["default"](this, "loadStaticRoomList", function (dontUpdateView) {
|
|
51456
|
-
var _this$
|
|
51457
|
-
(_this$
|
|
51774
|
+
var _this$view19;
|
|
51775
|
+
(_this$view19 = _this.view) === null || _this$view19 === void 0 || _this$view19.updateStaticRoomListItems(setHandlerInstance.getStaticRoomListItems(_this.actSet()), dontUpdateView);
|
|
51458
51776
|
});
|
|
51459
51777
|
_defineProperty__default["default"](this, "loadShelfPlannerItems", function (paletteId, configStepKey, from) {
|
|
51460
|
-
var _this$
|
|
51778
|
+
var _this$view20;
|
|
51461
51779
|
var _DivaSetHandler$getSh = setHandlerInstance.getShelfPlannerItems(_this.actSet(), configStepKey),
|
|
51462
51780
|
accessoires = _DivaSetHandler$getSh.accessoires,
|
|
51463
51781
|
grids = _DivaSetHandler$getSh.grids;
|
|
51464
|
-
(_this$
|
|
51782
|
+
(_this$view20 = _this.view) === null || _this$view20 === void 0 || _this$view20.updateShelfPlannerItems(paletteId, accessoires, grids, configStepKey, from);
|
|
51465
51783
|
});
|
|
51466
51784
|
_defineProperty__default["default"](this, "loadDoorPlannerItems", function (configStepKey) {
|
|
51467
|
-
var _this$
|
|
51468
|
-
(_this$
|
|
51785
|
+
var _this$view21;
|
|
51786
|
+
(_this$view21 = _this.view) === null || _this$view21 === void 0 || _this$view21.updateDoorPlannerItems(setHandlerInstance.getDoorPlannerItems(_this.actSet(), configStepKey), configStepKey);
|
|
51469
51787
|
});
|
|
51470
51788
|
/**
|
|
51471
51789
|
* This function is called when switching from one planning to another. All Planner handler are destroyed.
|
|
@@ -51481,61 +51799,61 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51481
51799
|
* @param parentElement ElementID of the parent element used for docking
|
|
51482
51800
|
*/
|
|
51483
51801
|
_defineProperty__default["default"](this, "addPlannerElement", /*#__PURE__*/function () {
|
|
51484
|
-
var
|
|
51485
|
-
var _this$actions3, _this$actions3$toggle, _this$actions6, _this$actions6$toggle, _this$
|
|
51802
|
+
var _ref6 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(elementCodex, initParams, dontUpdateView) {
|
|
51803
|
+
var _this$actions3, _this$actions3$toggle, _this$actions6, _this$actions6$toggle, _this$view22, _this$view23, _this$view24;
|
|
51486
51804
|
var set, newArticle, _this$actions4, _this$actions4$openMo, _this$i18n, _this$i18n2, _this$actions5, _this$actions5$toggle, baseArticle;
|
|
51487
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
51488
|
-
while (1) switch (
|
|
51805
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context6) {
|
|
51806
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
51489
51807
|
case 0:
|
|
51490
51808
|
set = _this.actSet();
|
|
51491
51809
|
(_this$actions3 = _this.actions) === null || _this$actions3 === void 0 || (_this$actions3$toggle = _this$actions3.toggleLoading) === null || _this$actions3$toggle === void 0 || _this$actions3$toggle.call(_this$actions3, 'plannElement' + elementCodex, false, true);
|
|
51492
|
-
|
|
51493
|
-
|
|
51810
|
+
_context6.prev = 2;
|
|
51811
|
+
_context6.next = 5;
|
|
51494
51812
|
return setHandlerInstance.addPlannerElement(set, elementCodex, initParams);
|
|
51495
51813
|
case 5:
|
|
51496
|
-
newArticle =
|
|
51497
|
-
|
|
51814
|
+
newArticle = _context6.sent;
|
|
51815
|
+
_context6.next = 13;
|
|
51498
51816
|
break;
|
|
51499
51817
|
case 8:
|
|
51500
|
-
|
|
51501
|
-
|
|
51818
|
+
_context6.prev = 8;
|
|
51819
|
+
_context6.t0 = _context6["catch"](2);
|
|
51502
51820
|
(_this$actions4 = _this.actions) === null || _this$actions4 === void 0 || (_this$actions4$openMo = _this$actions4.openModal) === null || _this$actions4$openMo === void 0 || _this$actions4$openMo.call(_this$actions4, {
|
|
51503
51821
|
accept: true,
|
|
51504
51822
|
title: (_this$i18n = _this.i18n()) === null || _this$i18n === void 0 ? void 0 : _this$i18n.t('Error'),
|
|
51505
|
-
text: (
|
|
51823
|
+
text: (_context6.t0 !== null && _context6.t0 !== void 0 && _context6.t0.message ? _context6.t0.message : (_this$i18n2 = _this.i18n()) === null || _this$i18n2 === void 0 ? void 0 : _this$i18n2.t('modal.errorcode')) + ':' + DivaUtils__default["default"].getCurrentTraceId() + ' ' + DivaUtils__default["default"].formatDate(new Date(), true, undefined, true)
|
|
51506
51824
|
});
|
|
51507
51825
|
(_this$actions5 = _this.actions) === null || _this$actions5 === void 0 || (_this$actions5$toggle = _this$actions5.toggleLoading) === null || _this$actions5$toggle === void 0 || _this$actions5$toggle.call(_this$actions5, 'plannElement' + elementCodex, false, false);
|
|
51508
|
-
throw new Error(
|
|
51826
|
+
throw new Error(_context6.t0);
|
|
51509
51827
|
case 13:
|
|
51510
51828
|
(_this$actions6 = _this.actions) === null || _this$actions6 === void 0 || (_this$actions6$toggle = _this$actions6.toggleLoading) === null || _this$actions6$toggle === void 0 || _this$actions6$toggle.call(_this$actions6, 'plannElement' + elementCodex, false, false);
|
|
51511
51829
|
if (!newArticle.toDeleteAfterInit) {
|
|
51512
|
-
|
|
51830
|
+
_context6.next = 18;
|
|
51513
51831
|
break;
|
|
51514
51832
|
}
|
|
51515
|
-
|
|
51833
|
+
_context6.next = 17;
|
|
51516
51834
|
return _this.deletePlannerElement(newArticle.setId, newArticle.elementId, true);
|
|
51517
51835
|
case 17:
|
|
51518
|
-
return
|
|
51836
|
+
return _context6.abrupt("return", newArticle.doNotDeleteAccWhenNotDocked ? 'AccessoireNotVisualized' : 'AccessorieNoFreeSpace');
|
|
51519
51837
|
case 18:
|
|
51520
51838
|
_this.updateConfigStructure();
|
|
51521
|
-
(_this$
|
|
51839
|
+
(_this$view22 = _this.view) === null || _this$view22 === void 0 || _this$view22.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
51522
51840
|
_this.updatePlannerView('ADD_PLANNER_ELEMENT');
|
|
51523
51841
|
_this.updateWebConfiguratorTitle();
|
|
51524
51842
|
_this.updatePriceInView();
|
|
51525
|
-
(_this$
|
|
51843
|
+
(_this$view23 = _this.view) === null || _this$view23 === void 0 || _this$view23.updateViewButtonsDependigOnConfigStructure();
|
|
51526
51844
|
baseArticle = setHandlerInstance.getBaseParentArticleOfAccessoire(set, newArticle.basketId);
|
|
51527
|
-
if (!dontUpdateView) (_this$
|
|
51845
|
+
if (!dontUpdateView) (_this$view24 = _this.view) === null || _this$view24 === void 0 || _this$view24.updateElementSelectionPlanner([baseArticle.setId], [baseArticle.elementId], true);
|
|
51528
51846
|
_this.checkMatchingProducts('onAdd');
|
|
51529
51847
|
_this.plannerChangeLog('onAddPlanner');
|
|
51530
|
-
return
|
|
51848
|
+
return _context6.abrupt("return", 'ElementAdded');
|
|
51531
51849
|
case 29:
|
|
51532
51850
|
case "end":
|
|
51533
|
-
return
|
|
51851
|
+
return _context6.stop();
|
|
51534
51852
|
}
|
|
51535
|
-
},
|
|
51853
|
+
}, _callee6, null, [[2, 8]]);
|
|
51536
51854
|
}));
|
|
51537
51855
|
return function (_x5, _x6, _x7) {
|
|
51538
|
-
return
|
|
51856
|
+
return _ref6.apply(this, arguments);
|
|
51539
51857
|
};
|
|
51540
51858
|
}());
|
|
51541
51859
|
/**
|
|
@@ -51545,114 +51863,114 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51545
51863
|
* @param articleCodex articleCodex of the new Element
|
|
51546
51864
|
*/
|
|
51547
51865
|
_defineProperty__default["default"](this, "switchPlannerElement", /*#__PURE__*/function () {
|
|
51548
|
-
var
|
|
51549
|
-
var _this$actions7, _this$actions7$toggle, _this$actions8, _this$actions8$toggle, _this$
|
|
51866
|
+
var _ref7 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(setId, elementId, articleCodex, initParams) {
|
|
51867
|
+
var _this$actions7, _this$actions7$toggle, _this$actions8, _this$actions8$toggle, _this$view25, _this$view26, _this$view27;
|
|
51550
51868
|
var set, variantValues, deletionResult, article;
|
|
51551
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
51552
|
-
while (1) switch (
|
|
51869
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context7) {
|
|
51870
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
51553
51871
|
case 0:
|
|
51554
51872
|
_this.setActSet(setId);
|
|
51555
51873
|
set = _this.actSet();
|
|
51556
51874
|
variantValues = setHandlerInstance.getVariantValuesOfElement(set, elementId);
|
|
51557
|
-
|
|
51875
|
+
_context7.next = 5;
|
|
51558
51876
|
return setHandlerInstance.deleteElementFromSetByElemId(set, elementId);
|
|
51559
51877
|
case 5:
|
|
51560
|
-
deletionResult =
|
|
51878
|
+
deletionResult = _context7.sent;
|
|
51561
51879
|
(_this$actions7 = _this.actions) === null || _this$actions7 === void 0 || (_this$actions7$toggle = _this$actions7.toggleLoading) === null || _this$actions7$toggle === void 0 || _this$actions7$toggle.call(_this$actions7, 'plannerswitch' + articleCodex, false, true);
|
|
51562
51880
|
initParams.oldPlannerTransform = deletionResult.oldTransform;
|
|
51563
51881
|
initParams.variantValues = _objectSpread$7(_objectSpread$7({}, variantValues), {}, _defineProperty__default["default"]({}, (!set.CatalogData.isIDMFormat ? 'OPT' : '') + 'PLANNERSWITCH', (!set.CatalogData.isIDMFormat ? 'OPV' : '') + articleCodex));
|
|
51564
|
-
|
|
51882
|
+
_context7.next = 11;
|
|
51565
51883
|
return setHandlerInstance.addPlannerElement(set, articleCodex, initParams);
|
|
51566
51884
|
case 11:
|
|
51567
|
-
article =
|
|
51568
|
-
|
|
51885
|
+
article = _context7.sent;
|
|
51886
|
+
_context7.next = 14;
|
|
51569
51887
|
return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, article.getValidValues(article.VariantValues, undefined, true), [article.basketId], undefined, 'initializing');
|
|
51570
51888
|
case 14:
|
|
51571
51889
|
(_this$actions8 = _this.actions) === null || _this$actions8 === void 0 || (_this$actions8$toggle = _this$actions8.toggleLoading) === null || _this$actions8$toggle === void 0 || _this$actions8$toggle.call(_this$actions8, 'plannerswitch' + articleCodex, false, false);
|
|
51572
51890
|
_this.updateConfigStructure();
|
|
51573
|
-
(_this$
|
|
51891
|
+
(_this$view25 = _this.view) === null || _this$view25 === void 0 || _this$view25.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
51574
51892
|
_this.updatePlannerView('SWITCH_PLANNER_ELEMENT');
|
|
51575
51893
|
_this.updateWebConfiguratorTitle();
|
|
51576
|
-
(_this$
|
|
51894
|
+
(_this$view26 = _this.view) === null || _this$view26 === void 0 || _this$view26.updateElementSelectionPlanner([article.setId], [article.elementId], true);
|
|
51577
51895
|
_this.updatePriceInView();
|
|
51578
|
-
(_this$
|
|
51896
|
+
(_this$view27 = _this.view) === null || _this$view27 === void 0 || _this$view27.updateViewButtonsDependigOnConfigStructure();
|
|
51579
51897
|
_this.checkMatchingProducts('onSwitch');
|
|
51580
51898
|
_this.plannerChangeLog('onSwitchPlanner');
|
|
51581
51899
|
case 24:
|
|
51582
51900
|
case "end":
|
|
51583
|
-
return
|
|
51901
|
+
return _context7.stop();
|
|
51584
51902
|
}
|
|
51585
|
-
},
|
|
51903
|
+
}, _callee7);
|
|
51586
51904
|
}));
|
|
51587
51905
|
return function (_x8, _x9, _x10, _x11) {
|
|
51588
|
-
return
|
|
51906
|
+
return _ref7.apply(this, arguments);
|
|
51589
51907
|
};
|
|
51590
51908
|
}());
|
|
51591
51909
|
_defineProperty__default["default"](this, "addAccessorieOnShelfPlanner", /*#__PURE__*/function () {
|
|
51592
|
-
var
|
|
51910
|
+
var _ref8 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey, partlistCodexToInit) {
|
|
51593
51911
|
var _this$actions9, _this$actions9$toggle, _this$actions10, _this$actions10$toggl;
|
|
51594
|
-
var set, retVal, _this$
|
|
51595
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
51596
|
-
while (1) switch (
|
|
51912
|
+
var set, retVal, _this$view28, _this$view29;
|
|
51913
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
|
|
51914
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
51597
51915
|
case 0:
|
|
51598
51916
|
set = _this.actSet();
|
|
51599
51917
|
(_this$actions9 = _this.actions) === null || _this$actions9 === void 0 || (_this$actions9$toggle = _this$actions9.toggleLoading) === null || _this$actions9$toggle === void 0 || _this$actions9$toggle.call(_this$actions9, 'LoadingArticle', false, true);
|
|
51600
|
-
|
|
51918
|
+
_context8.next = 4;
|
|
51601
51919
|
return setHandlerInstance.addAccessorieOnShelfPlanner(set, gridIndex, cellIndex, parentBasketId, {
|
|
51602
51920
|
partlistCodexToInit: partlistCodexToInit
|
|
51603
51921
|
});
|
|
51604
51922
|
case 4:
|
|
51605
|
-
retVal =
|
|
51923
|
+
retVal = _context8.sent;
|
|
51606
51924
|
(_this$actions10 = _this.actions) === null || _this$actions10 === void 0 || (_this$actions10$toggl = _this$actions10.toggleLoading) === null || _this$actions10$toggl === void 0 || _this$actions10$toggl.call(_this$actions10, 'LoadingArticle', false, false);
|
|
51607
51925
|
if (retVal !== false) {
|
|
51608
51926
|
_this.loadShelfPlannerItems(paletteId, configStepKey, 'add_accessoire');
|
|
51609
51927
|
_this.updateConfigStructure();
|
|
51610
51928
|
_this.updatePriceInView();
|
|
51611
|
-
(_this$
|
|
51612
|
-
(_this$
|
|
51929
|
+
(_this$view28 = _this.view) === null || _this$view28 === void 0 || _this$view28.updateViewButtonsDependigOnConfigStructure();
|
|
51930
|
+
(_this$view29 = _this.view) === null || _this$view29 === void 0 || _this$view29.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
51613
51931
|
_this.loadPaletteInfos(configStepKey);
|
|
51614
51932
|
_this.updatePlannerView('ADD_ACC_ON_SHELF_PLANNER');
|
|
51615
51933
|
}
|
|
51616
51934
|
_this.checkMatchingProducts('onShelfAdd');
|
|
51617
51935
|
_this.plannerChangeLog('onAddPlanner');
|
|
51618
|
-
return
|
|
51936
|
+
return _context8.abrupt("return", retVal);
|
|
51619
51937
|
case 10:
|
|
51620
51938
|
case "end":
|
|
51621
|
-
return
|
|
51939
|
+
return _context8.stop();
|
|
51622
51940
|
}
|
|
51623
|
-
},
|
|
51941
|
+
}, _callee8);
|
|
51624
51942
|
}));
|
|
51625
51943
|
return function (_x12, _x13, _x14, _x15, _x16, _x17) {
|
|
51626
|
-
return
|
|
51944
|
+
return _ref8.apply(this, arguments);
|
|
51627
51945
|
};
|
|
51628
51946
|
}());
|
|
51629
51947
|
_defineProperty__default["default"](this, "moveShelfItem", /*#__PURE__*/function () {
|
|
51630
|
-
var
|
|
51631
|
-
var _this$
|
|
51632
|
-
var set, result, _this$
|
|
51633
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
51634
|
-
while (1) switch (
|
|
51948
|
+
var _ref9 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9(paletteId, grid, initialIndex, finalIndex, configStepKey) {
|
|
51949
|
+
var _this$view31;
|
|
51950
|
+
var set, result, _this$view30, _this$i18n3;
|
|
51951
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context9) {
|
|
51952
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
51635
51953
|
case 0:
|
|
51636
51954
|
set = _this.actSet();
|
|
51637
|
-
|
|
51955
|
+
_context9.next = 3;
|
|
51638
51956
|
return setHandlerInstance.moveShelfItem(set, grid, initialIndex, finalIndex);
|
|
51639
51957
|
case 3:
|
|
51640
|
-
result =
|
|
51958
|
+
result = _context9.sent;
|
|
51641
51959
|
if (result == 'RESETTED_CELLS') {
|
|
51642
|
-
(_this$
|
|
51960
|
+
(_this$view30 = _this.view) === null || _this$view30 === void 0 || _this$view30.updatePlannerMsgContainer('COULD_NOT_MOVE_SHELVES', true, 'INFO', (_this$i18n3 = _this.i18n()) === null || _this$i18n3 === void 0 ? void 0 : _this$i18n3.t('configurator.move_resetted'), true);
|
|
51643
51961
|
}
|
|
51644
51962
|
_this.updateConfigStructure();
|
|
51645
51963
|
_this.loadShelfPlannerItems(paletteId, configStepKey, 'move sheld');
|
|
51646
|
-
(_this$
|
|
51964
|
+
(_this$view31 = _this.view) === null || _this$view31 === void 0 || _this$view31.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
51647
51965
|
_this.updatePlannerView('MOVE_SHELF_ITEM');
|
|
51648
51966
|
case 9:
|
|
51649
51967
|
case "end":
|
|
51650
|
-
return
|
|
51968
|
+
return _context9.stop();
|
|
51651
51969
|
}
|
|
51652
|
-
},
|
|
51970
|
+
}, _callee9);
|
|
51653
51971
|
}));
|
|
51654
51972
|
return function (_x18, _x19, _x20, _x21, _x22) {
|
|
51655
|
-
return
|
|
51973
|
+
return _ref9.apply(this, arguments);
|
|
51656
51974
|
};
|
|
51657
51975
|
}());
|
|
51658
51976
|
_defineProperty__default["default"](this, "moveDoors", function (movedDoor, targetDoor) {
|
|
@@ -51660,33 +51978,33 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51660
51978
|
_this.updatePlannerView('MOVE_DOORS');
|
|
51661
51979
|
});
|
|
51662
51980
|
_defineProperty__default["default"](this, "deleteAccessorieOnShelfPlanner", /*#__PURE__*/function () {
|
|
51663
|
-
var
|
|
51664
|
-
var _this$
|
|
51981
|
+
var _ref10 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee10(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey) {
|
|
51982
|
+
var _this$view32, _this$view33;
|
|
51665
51983
|
var set;
|
|
51666
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
51667
|
-
while (1) switch (
|
|
51984
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context10) {
|
|
51985
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
51668
51986
|
case 0:
|
|
51669
51987
|
set = _this.actSet();
|
|
51670
|
-
|
|
51988
|
+
_context10.next = 3;
|
|
51671
51989
|
return setHandlerInstance.deleteAccessorieOnShelfPlanner(set, gridIndex, cellIndex, parentBasketId);
|
|
51672
51990
|
case 3:
|
|
51673
51991
|
_this.updateConfigStructure();
|
|
51674
51992
|
_this.loadShelfPlannerItems(paletteId, configStepKey, 'delete accessorie');
|
|
51675
51993
|
_this.updatePriceInView();
|
|
51676
|
-
(_this$
|
|
51677
|
-
(_this$
|
|
51994
|
+
(_this$view32 = _this.view) === null || _this$view32 === void 0 || _this$view32.updateViewButtonsDependigOnConfigStructure();
|
|
51995
|
+
(_this$view33 = _this.view) === null || _this$view33 === void 0 || _this$view33.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
51678
51996
|
_this.loadPaletteInfos(configStepKey);
|
|
51679
51997
|
_this.updatePlannerView('DELETE_ACC_ON_SHELF_PLANNER');
|
|
51680
51998
|
_this.checkMatchingProducts('onShelfDelete');
|
|
51681
51999
|
_this.plannerChangeLog('onDeletePlanner');
|
|
51682
52000
|
case 12:
|
|
51683
52001
|
case "end":
|
|
51684
|
-
return
|
|
52002
|
+
return _context10.stop();
|
|
51685
52003
|
}
|
|
51686
|
-
},
|
|
52004
|
+
}, _callee10);
|
|
51687
52005
|
}));
|
|
51688
52006
|
return function (_x23, _x24, _x25, _x26, _x27) {
|
|
51689
|
-
return
|
|
52007
|
+
return _ref10.apply(this, arguments);
|
|
51690
52008
|
};
|
|
51691
52009
|
}());
|
|
51692
52010
|
/**
|
|
@@ -51697,26 +52015,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51697
52015
|
* @param transState
|
|
51698
52016
|
*/
|
|
51699
52017
|
_defineProperty__default["default"](this, "updatePlannerTrans", /*#__PURE__*/function () {
|
|
51700
|
-
var
|
|
51701
|
-
var _this$
|
|
51702
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
51703
|
-
while (1) switch (
|
|
52018
|
+
var _ref11 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(setId, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance, turningPoint) {
|
|
52019
|
+
var _this$view34;
|
|
52020
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context11) {
|
|
52021
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
51704
52022
|
case 0:
|
|
51705
|
-
|
|
52023
|
+
_context11.next = 2;
|
|
51706
52024
|
return setHandlerInstance.updatePlannerTrans(_this.actSet(), plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance, turningPoint);
|
|
51707
52025
|
case 2:
|
|
51708
52026
|
if (transState == 'END') {
|
|
51709
52027
|
_this.updatePlannerView('UPDATE_PLANNER_TRANS');
|
|
51710
|
-
(_this$
|
|
52028
|
+
(_this$view34 = _this.view) === null || _this$view34 === void 0 || _this$view34.updateElementSelectionPlanner([setId], [plannerElementID], true);
|
|
51711
52029
|
}
|
|
51712
52030
|
case 3:
|
|
51713
52031
|
case "end":
|
|
51714
|
-
return
|
|
52032
|
+
return _context11.stop();
|
|
51715
52033
|
}
|
|
51716
|
-
},
|
|
52034
|
+
}, _callee11);
|
|
51717
52035
|
}));
|
|
51718
52036
|
return function (_x28, _x29, _x30, _x31, _x32, _x33, _x34, _x35) {
|
|
51719
|
-
return
|
|
52037
|
+
return _ref11.apply(this, arguments);
|
|
51720
52038
|
};
|
|
51721
52039
|
}());
|
|
51722
52040
|
/**
|
|
@@ -51736,86 +52054,86 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51736
52054
|
* @param avoidUpdateRendering If this parameter is set to true, the function only updates the viewPointHandler - no rendering is made.
|
|
51737
52055
|
*/
|
|
51738
52056
|
_defineProperty__default["default"](this, "handle3DVisualizationChanged", function (mode, params, avoidUpdateRendering) {
|
|
51739
|
-
var _this$
|
|
52057
|
+
var _this$view35;
|
|
51740
52058
|
var set = _this.actSet();
|
|
51741
52059
|
if (!set) return;
|
|
51742
|
-
setHandlerInstance.handle3DVisualizationChanged(set, mode, params, (_this$
|
|
52060
|
+
setHandlerInstance.handle3DVisualizationChanged(set, mode, params, (_this$view35 = _this.view) === null || _this$view35 === void 0 ? void 0 : _this$view35.getDoShow3DDimensionLines());
|
|
51743
52061
|
if (avoidUpdateRendering) return;
|
|
51744
52062
|
if (mode != 'Nav3DFullScreen') {
|
|
51745
52063
|
_this.updatePlannerView('HANDLE_3D_VIS_CHANGED');
|
|
51746
52064
|
}
|
|
51747
52065
|
});
|
|
51748
52066
|
_defineProperty__default["default"](this, "updateAccessoireQuantity", /*#__PURE__*/function () {
|
|
51749
|
-
var
|
|
51750
|
-
var _this$actions11, _this$actions11$toggl, _this$actions12, _this$actions12$toggl, _this$
|
|
52067
|
+
var _ref12 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12(accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle) {
|
|
52068
|
+
var _this$actions11, _this$actions11$toggl, _this$actions12, _this$actions12$toggl, _this$view36;
|
|
51751
52069
|
var set, ret;
|
|
51752
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
51753
|
-
while (1) switch (
|
|
52070
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context12) {
|
|
52071
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
51754
52072
|
case 0:
|
|
51755
52073
|
set = _this.actSet();
|
|
51756
52074
|
(_this$actions11 = _this.actions) === null || _this$actions11 === void 0 || (_this$actions11$toggl = _this$actions11.toggleLoading) === null || _this$actions11$toggl === void 0 || _this$actions11$toggl.call(_this$actions11, 'LoadingArticles_' + accessoireItem.articleCodex, false, true);
|
|
51757
|
-
|
|
52075
|
+
_context12.next = 4;
|
|
51758
52076
|
return setHandlerInstance.updateAccessoireQuantity(set, accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle);
|
|
51759
52077
|
case 4:
|
|
51760
|
-
ret =
|
|
52078
|
+
ret = _context12.sent;
|
|
51761
52079
|
(_this$actions12 = _this.actions) === null || _this$actions12 === void 0 || (_this$actions12$toggl = _this$actions12.toggleLoading) === null || _this$actions12$toggl === void 0 || _this$actions12$toggl.call(_this$actions12, 'LoadingArticles_' + accessoireItem.articleCodex, false, false);
|
|
51762
52080
|
if (ret.somethingChanged) _this.updateConfigStructure();
|
|
51763
52081
|
_this.updatePlannerView('UPDATE_ACC_QUANTITY');
|
|
51764
52082
|
_this.updatePriceInView();
|
|
51765
|
-
(_this$
|
|
52083
|
+
(_this$view36 = _this.view) === null || _this$view36 === void 0 || _this$view36.updateViewButtonsDependigOnConfigStructure();
|
|
51766
52084
|
_this.checkMatchingProducts('onAccessoireUpdate');
|
|
51767
52085
|
_this.plannerChangeLog('onUpdateAccessoireQuantity');
|
|
51768
52086
|
case 12:
|
|
51769
52087
|
case "end":
|
|
51770
|
-
return
|
|
52088
|
+
return _context12.stop();
|
|
51771
52089
|
}
|
|
51772
|
-
},
|
|
52090
|
+
}, _callee12);
|
|
51773
52091
|
}));
|
|
51774
52092
|
return function (_x36, _x37, _x38, _x39) {
|
|
51775
|
-
return
|
|
52093
|
+
return _ref12.apply(this, arguments);
|
|
51776
52094
|
};
|
|
51777
52095
|
}());
|
|
51778
52096
|
_defineProperty__default["default"](this, "deleteAccessoire", /*#__PURE__*/function () {
|
|
51779
|
-
var
|
|
51780
|
-
var set, wasDeleted, _this$
|
|
51781
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
51782
|
-
while (1) switch (
|
|
52097
|
+
var _ref13 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13(articleCodex, parentBasketId) {
|
|
52098
|
+
var set, wasDeleted, _this$view37, _this$view38;
|
|
52099
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context13) {
|
|
52100
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
51783
52101
|
case 0:
|
|
51784
52102
|
set = _this.actSet();
|
|
51785
|
-
|
|
52103
|
+
_context13.next = 3;
|
|
51786
52104
|
return setHandlerInstance.deleteAccessoire(set, articleCodex, parentBasketId);
|
|
51787
52105
|
case 3:
|
|
51788
|
-
wasDeleted =
|
|
52106
|
+
wasDeleted = _context13.sent;
|
|
51789
52107
|
if (wasDeleted) {
|
|
51790
52108
|
_this.updateConfigStructure();
|
|
51791
|
-
(_this$
|
|
52109
|
+
(_this$view37 = _this.view) === null || _this$view37 === void 0 || _this$view37.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
51792
52110
|
_this.updatePlannerView('DELETE_ACC');
|
|
51793
52111
|
_this.updatePriceInView();
|
|
51794
|
-
(_this$
|
|
52112
|
+
(_this$view38 = _this.view) === null || _this$view38 === void 0 || _this$view38.updateViewButtonsDependigOnConfigStructure();
|
|
51795
52113
|
}
|
|
51796
52114
|
_this.checkMatchingProducts('onAccessoireDelete');
|
|
51797
52115
|
_this.plannerChangeLog('onDeletePlanner');
|
|
51798
|
-
return
|
|
52116
|
+
return _context13.abrupt("return", wasDeleted);
|
|
51799
52117
|
case 8:
|
|
51800
52118
|
case "end":
|
|
51801
|
-
return
|
|
52119
|
+
return _context13.stop();
|
|
51802
52120
|
}
|
|
51803
|
-
},
|
|
52121
|
+
}, _callee13);
|
|
51804
52122
|
}));
|
|
51805
52123
|
return function (_x40, _x41) {
|
|
51806
|
-
return
|
|
52124
|
+
return _ref13.apply(this, arguments);
|
|
51807
52125
|
};
|
|
51808
52126
|
}());
|
|
51809
52127
|
_defineProperty__default["default"](this, "includeFamilyInFreePlaces", false);
|
|
51810
52128
|
_defineProperty__default["default"](this, "loadPaletteInfos", function (configStepKey, activeArticles, targetArticles) {
|
|
51811
|
-
var _this$
|
|
52129
|
+
var _this$view39, _this$view40, _this$view41;
|
|
51812
52130
|
var set = _this.actSet();
|
|
51813
52131
|
if (!set) return;
|
|
51814
52132
|
var retValues = setHandlerInstance.loadPaletteInfos(set, configStepKey, activeArticles, targetArticles);
|
|
51815
52133
|
if (!retValues.articleInfos) return;
|
|
51816
|
-
(_this$
|
|
51817
|
-
(_this$
|
|
51818
|
-
(_this$
|
|
52134
|
+
(_this$view39 = _this.view) === null || _this$view39 === void 0 || _this$view39.updatePaletteInfos(retValues.articleInfos, retValues.doShowConfigSingle, retValues.isConfigSingle, retValues.bbox);
|
|
52135
|
+
(_this$view40 = _this.view) === null || _this$view40 === void 0 || _this$view40.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
52136
|
+
(_this$view41 = _this.view) === null || _this$view41 === void 0 || _this$view41.updateElementSelectionConfig(retValues.articleInfos, _this.doAllowSetPlanner());
|
|
51819
52137
|
});
|
|
51820
52138
|
_defineProperty__default["default"](this, "getBasketIdsOfElementIdLogic", function (elementId) {
|
|
51821
52139
|
return setHandlerInstance.getBasketIdOfElementId(_this.actSet(), elementId);
|
|
@@ -51826,13 +52144,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51826
52144
|
* @param configStepKey act ConfigStep
|
|
51827
52145
|
*/
|
|
51828
52146
|
_defineProperty__default["default"](this, "configSingleIsChanged", /*#__PURE__*/function () {
|
|
51829
|
-
var
|
|
52147
|
+
var _ref14 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(doConfigSingle, configStepKey, groupedOptions, groupedArticles, optionCodex, tabGroupKey) {
|
|
51830
52148
|
var set;
|
|
51831
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
51832
|
-
while (1) switch (
|
|
52149
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context14) {
|
|
52150
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
51833
52151
|
case 0:
|
|
51834
52152
|
set = _this.actSet();
|
|
51835
|
-
|
|
52153
|
+
_context14.next = 3;
|
|
51836
52154
|
return setHandlerInstance.configSingleIsChanged(set, doConfigSingle, groupedOptions, groupedArticles);
|
|
51837
52155
|
case 3:
|
|
51838
52156
|
_this.updatePriceInView();
|
|
@@ -51842,15 +52160,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51842
52160
|
configStepKey = setHandlerInstance.getNewConfigStepKeyInOption(set, configStepKey, optionCodex, tabGroupKey);
|
|
51843
52161
|
_this.updatePlannerView('CONFIG_SINGLE_IS_CHANGED');
|
|
51844
52162
|
}
|
|
51845
|
-
return
|
|
52163
|
+
return _context14.abrupt("return", configStepKey);
|
|
51846
52164
|
case 7:
|
|
51847
52165
|
case "end":
|
|
51848
|
-
return
|
|
52166
|
+
return _context14.stop();
|
|
51849
52167
|
}
|
|
51850
|
-
},
|
|
52168
|
+
}, _callee14);
|
|
51851
52169
|
}));
|
|
51852
52170
|
return function (_x42, _x43, _x44, _x45, _x46, _x47) {
|
|
51853
|
-
return
|
|
52171
|
+
return _ref14.apply(this, arguments);
|
|
51854
52172
|
};
|
|
51855
52173
|
}());
|
|
51856
52174
|
/**
|
|
@@ -51864,116 +52182,115 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51864
52182
|
*/
|
|
51865
52183
|
//onConfigItemClick ist ein Click auf das Item der ConfigPalette um die OPV zu ändern
|
|
51866
52184
|
_defineProperty__default["default"](this, "doConfigure", /*#__PURE__*/function () {
|
|
51867
|
-
var
|
|
52185
|
+
var _ref15 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents, eventKey) {
|
|
51868
52186
|
var _this$actions13, _this$actions13$toggl;
|
|
51869
|
-
var set, returnValues, _this$actions14, _this$actions14$toggl, structure, _this$
|
|
51870
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
51871
|
-
while (1) switch (
|
|
52187
|
+
var set, returnValues, _this$actions14, _this$actions14$toggl, structure, _this$view42, _returnValues$element, _this$view45, _this$view43, _this$view44;
|
|
52188
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context15) {
|
|
52189
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
51872
52190
|
case 0:
|
|
51873
52191
|
set = _this.actSet();
|
|
51874
52192
|
(_this$actions13 = _this.actions) === null || _this$actions13 === void 0 || (_this$actions13$toggl = _this$actions13.toggleLoading) === null || _this$actions13$toggl === void 0 || _this$actions13$toggl.call(_this$actions13, 'doConfigure', false, true);
|
|
51875
|
-
|
|
51876
|
-
|
|
52193
|
+
_context15.prev = 2;
|
|
52194
|
+
_context15.next = 5;
|
|
51877
52195
|
return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, myValues, targetArticles, undefined, 'FromViewClick');
|
|
51878
52196
|
case 5:
|
|
51879
|
-
returnValues =
|
|
52197
|
+
returnValues = _context15.sent;
|
|
51880
52198
|
case 6:
|
|
51881
|
-
|
|
52199
|
+
_context15.prev = 6;
|
|
51882
52200
|
(_this$actions14 = _this.actions) === null || _this$actions14 === void 0 || (_this$actions14$toggl = _this$actions14.toggleLoading) === null || _this$actions14$toggl === void 0 || _this$actions14$toggl.call(_this$actions14, 'doConfigure', false, false);
|
|
51883
|
-
return
|
|
52201
|
+
return _context15.finish(6);
|
|
51884
52202
|
case 9:
|
|
51885
52203
|
structure = setHandlerInstance.loadConfigStructureOfActSet(set, _this.getCurPlannerType());
|
|
51886
52204
|
_this.checkMatchingProducts('onConfig');
|
|
51887
52205
|
if (dontUpdatePlannerView) {
|
|
51888
|
-
|
|
52206
|
+
_context15.next = 21;
|
|
51889
52207
|
break;
|
|
51890
52208
|
}
|
|
51891
|
-
(_this$
|
|
52209
|
+
(_this$view42 = _this.view) === null || _this$view42 === void 0 || _this$view42.updateConfiguratorStructure(structure);
|
|
51892
52210
|
if (returnValues.articleCountChanged) {
|
|
51893
|
-
(_this$
|
|
52211
|
+
(_this$view43 = _this.view) === null || _this$view43 === void 0 || _this$view43.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
51894
52212
|
}
|
|
51895
52213
|
if ((_returnValues$element = returnValues.elementIdsToUpdateSelection) !== null && _returnValues$element !== void 0 && _returnValues$element.length) {
|
|
51896
|
-
(_this$
|
|
52214
|
+
(_this$view44 = _this.view) === null || _this$view44 === void 0 || _this$view44.updateElementSelectionPlanner([returnValues.setId], returnValues.elementIdsToUpdateSelection, true, true);
|
|
51897
52215
|
}
|
|
51898
52216
|
_this.updatePriceInView();
|
|
51899
|
-
(_this$
|
|
52217
|
+
(_this$view45 = _this.view) === null || _this$view45 === void 0 || _this$view45.updateViewButtonsDependigOnConfigStructure();
|
|
51900
52218
|
_this.updatePlannerView('DO_CONFIGURE', myValues);
|
|
51901
52219
|
_this.updateWebConfiguratorTitle();
|
|
51902
|
-
|
|
52220
|
+
_context15.next = 21;
|
|
51903
52221
|
return _this.getFreePlacesOnGrids(undefined, 'doConfigure');
|
|
51904
52222
|
case 21:
|
|
51905
52223
|
if (dontCallEvents) {
|
|
51906
|
-
|
|
52224
|
+
_context15.next = 24;
|
|
51907
52225
|
break;
|
|
51908
52226
|
}
|
|
51909
|
-
|
|
52227
|
+
_context15.next = 24;
|
|
51910
52228
|
return _this.fillBaksetforOnWebPlanerConfigChange(myValues, undefined, eventKey);
|
|
51911
52229
|
case 24:
|
|
51912
52230
|
_this.configuratorChangeLog('onConfigurationChange', myValues);
|
|
51913
52231
|
case 25:
|
|
51914
52232
|
case "end":
|
|
51915
|
-
return
|
|
52233
|
+
return _context15.stop();
|
|
51916
52234
|
}
|
|
51917
|
-
},
|
|
52235
|
+
}, _callee15, null, [[2,, 6, 9]]);
|
|
51918
52236
|
}));
|
|
51919
52237
|
return function (_x48, _x49, _x50, _x51, _x52) {
|
|
51920
|
-
return
|
|
52238
|
+
return _ref15.apply(this, arguments);
|
|
51921
52239
|
};
|
|
51922
52240
|
}());
|
|
51923
52241
|
_defineProperty__default["default"](this, "fillBaksetforOnWebPlanerConfigChange", /*#__PURE__*/function () {
|
|
51924
|
-
var
|
|
52242
|
+
var _ref16 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(myValues, isInit, eventKey) {
|
|
51925
52243
|
var _myValues;
|
|
51926
52244
|
var set, articles, article;
|
|
51927
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
51928
|
-
while (1) switch (
|
|
52245
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context16) {
|
|
52246
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
51929
52247
|
case 0:
|
|
51930
52248
|
if (_this.eventIsManagedByClient('onWebPlanerConfigChange')) {
|
|
51931
|
-
|
|
52249
|
+
_context16.next = 2;
|
|
51932
52250
|
break;
|
|
51933
52251
|
}
|
|
51934
|
-
return
|
|
52252
|
+
return _context16.abrupt("return");
|
|
51935
52253
|
case 2:
|
|
51936
52254
|
set = _this.actSet();
|
|
51937
52255
|
if (set) {
|
|
51938
|
-
|
|
52256
|
+
_context16.next = 5;
|
|
51939
52257
|
break;
|
|
51940
52258
|
}
|
|
51941
|
-
return
|
|
52259
|
+
return _context16.abrupt("return");
|
|
51942
52260
|
case 5:
|
|
51943
52261
|
if (!(!myValues || eventKey !== null && eventKey !== void 0 && eventKey.endsWith('repairing'))) {
|
|
51944
|
-
|
|
52262
|
+
_context16.next = 11;
|
|
51945
52263
|
break;
|
|
51946
52264
|
}
|
|
51947
52265
|
//get first option of the first article
|
|
51948
52266
|
articles = set.getDivaArticles();
|
|
51949
52267
|
article = articles[Object.keys(articles)[0]];
|
|
51950
52268
|
if (article) {
|
|
51951
|
-
|
|
52269
|
+
_context16.next = 10;
|
|
51952
52270
|
break;
|
|
51953
52271
|
}
|
|
51954
|
-
return
|
|
52272
|
+
return _context16.abrupt("return");
|
|
51955
52273
|
case 10:
|
|
51956
52274
|
myValues = article === null || article === void 0 ? void 0 : article.VariantValuesWithoutEmptyFreetext;
|
|
51957
52275
|
case 11:
|
|
51958
|
-
|
|
51959
|
-
|
|
51960
|
-
|
|
52276
|
+
_context16.t0 = _this.divaBasketHandler;
|
|
52277
|
+
_context16.t1 = set;
|
|
52278
|
+
_context16.next = 15;
|
|
51961
52279
|
return setHandlerInstance.fillOrderLinesAndOrderSets(_this.sets, _this.divaBasketHandler, true, _this.doAllowSetPlanner(), _this.ReturnTo);
|
|
51962
52280
|
case 15:
|
|
51963
|
-
|
|
51964
|
-
|
|
51965
|
-
|
|
51966
|
-
|
|
51967
|
-
|
|
51968
|
-
|
|
51969
|
-
case 21:
|
|
52281
|
+
_context16.t2 = _context16.sent;
|
|
52282
|
+
_context16.t3 = Object.keys((_myValues = myValues) !== null && _myValues !== void 0 ? _myValues : {});
|
|
52283
|
+
_context16.t4 = isInit;
|
|
52284
|
+
_context16.t5 = eventKey;
|
|
52285
|
+
return _context16.abrupt("return", _context16.t0.fillBaksetforOnWebPlanerConfigChange.call(_context16.t0, _context16.t1, _context16.t2, _context16.t3, _context16.t4, _context16.t5));
|
|
52286
|
+
case 20:
|
|
51970
52287
|
case "end":
|
|
51971
|
-
return
|
|
52288
|
+
return _context16.stop();
|
|
51972
52289
|
}
|
|
51973
|
-
},
|
|
52290
|
+
}, _callee16);
|
|
51974
52291
|
}));
|
|
51975
52292
|
return function (_x53, _x54, _x55) {
|
|
51976
|
-
return
|
|
52293
|
+
return _ref16.apply(this, arguments);
|
|
51977
52294
|
};
|
|
51978
52295
|
}());
|
|
51979
52296
|
_defineProperty__default["default"](this, "getPosNr", function (basketId) {
|
|
@@ -52015,9 +52332,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52015
52332
|
return returnTo;
|
|
52016
52333
|
});
|
|
52017
52334
|
_defineProperty__default["default"](this, "addToBasketEventFunction", function (e) {
|
|
52018
|
-
var _this$
|
|
52019
|
-
if (e.type == 'addToBasket') (_this$
|
|
52020
|
-
if (e.type == 'saveBasket') (_this$
|
|
52335
|
+
var _this$view46, _this$view47;
|
|
52336
|
+
if (e.type == 'addToBasket') (_this$view46 = _this.view) === null || _this$view46 === void 0 || _this$view46.onClickAddToBasket();
|
|
52337
|
+
if (e.type == 'saveBasket') (_this$view47 = _this.view) === null || _this$view47 === void 0 || _this$view47.onClickAddToBasket(undefined, 'onAddToBasket', true);
|
|
52021
52338
|
});
|
|
52022
52339
|
this.plannerConfig = Object.assign(plannerConfig, {});
|
|
52023
52340
|
this.actions = plannerConfig.actions;
|
|
@@ -52036,11 +52353,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52036
52353
|
}, {
|
|
52037
52354
|
key: "initialize",
|
|
52038
52355
|
value: function () {
|
|
52039
|
-
var _initialize = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
52040
|
-
var _this$
|
|
52356
|
+
var _initialize = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee17(cache) {
|
|
52357
|
+
var _this$view48;
|
|
52041
52358
|
var viewReadyPromise, loadSuccessful, _ret, set, _this$actions15, _this$i18n4, _this$i18n5, initializationId;
|
|
52042
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
52043
|
-
while (1) switch (
|
|
52359
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee17$(_context17) {
|
|
52360
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
52044
52361
|
case 0:
|
|
52045
52362
|
bootMark('planner: initialize', {
|
|
52046
52363
|
reinit: cache === undefined ? 0 : 1
|
|
@@ -52057,18 +52374,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52057
52374
|
warningTime: 2000,
|
|
52058
52375
|
errorTime: 4000
|
|
52059
52376
|
});
|
|
52060
|
-
|
|
52377
|
+
_context17.next = 9;
|
|
52061
52378
|
return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
|
|
52062
52379
|
case 9:
|
|
52063
52380
|
this.plannerHandler = new DivaPlannerHandler(false);
|
|
52064
52381
|
|
|
52065
52382
|
// Registered by the mounted view — absent when initializing headless (e.g. backoffice DIVA agent).
|
|
52066
|
-
viewReadyPromise = (_this$
|
|
52383
|
+
viewReadyPromise = (_this$view48 = this.view) === null || _this$view48 === void 0 ? void 0 : _this$view48.initViewApiDependencies();
|
|
52067
52384
|
bootMark('planner: basket load start');
|
|
52068
|
-
|
|
52385
|
+
_context17.next = 14;
|
|
52069
52386
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
52070
52387
|
case 14:
|
|
52071
|
-
loadSuccessful =
|
|
52388
|
+
loadSuccessful = _context17.sent;
|
|
52072
52389
|
bootMark('planner: basket load done');
|
|
52073
52390
|
if (this.plannerConfig.configuratorSessionId) {
|
|
52074
52391
|
// ID forced from outside (Landingpage, PDP, Planung-ändern)
|
|
@@ -52081,15 +52398,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52081
52398
|
DivaUtils__default["default"].businessMetrics.setConfiguratorSessionId();
|
|
52082
52399
|
}
|
|
52083
52400
|
if (!loadSuccessful) {
|
|
52084
|
-
|
|
52401
|
+
_context17.next = 36;
|
|
52085
52402
|
break;
|
|
52086
52403
|
}
|
|
52087
52404
|
this.applyOrderlineVariantValuesToBasket();
|
|
52088
|
-
|
|
52089
|
-
|
|
52405
|
+
_context17.prev = 19;
|
|
52406
|
+
_context17.next = 22;
|
|
52090
52407
|
return this.initializeSets(loadSuccessful, viewReadyPromise);
|
|
52091
52408
|
case 22:
|
|
52092
|
-
_ret =
|
|
52409
|
+
_ret = _context17.sent;
|
|
52093
52410
|
set = this.actSet();
|
|
52094
52411
|
if (_ret && set && set.CatalogData.archived) {
|
|
52095
52412
|
if (this.i18n() && !this.plannerConfig.suppressErrorModals) (_this$actions15 = this.actions) === null || _this$actions15 === void 0 || _this$actions15.openModal({
|
|
@@ -52098,16 +52415,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52098
52415
|
text: (_this$i18n5 = this.i18n()) === null || _this$i18n5 === void 0 ? void 0 : _this$i18n5.t('configurator.catalog_not_listed_text')
|
|
52099
52416
|
});
|
|
52100
52417
|
}
|
|
52101
|
-
return
|
|
52418
|
+
return _context17.abrupt("return", _ret);
|
|
52102
52419
|
case 28:
|
|
52103
|
-
|
|
52104
|
-
|
|
52105
|
-
LOG$2.error(
|
|
52106
|
-
this.lastInitError =
|
|
52107
|
-
this.onError(
|
|
52108
|
-
return
|
|
52420
|
+
_context17.prev = 28;
|
|
52421
|
+
_context17.t0 = _context17["catch"](19);
|
|
52422
|
+
LOG$2.error(_context17.t0);
|
|
52423
|
+
this.lastInitError = _context17.t0;
|
|
52424
|
+
this.onError(_context17.t0);
|
|
52425
|
+
return _context17.abrupt("return", false);
|
|
52109
52426
|
case 34:
|
|
52110
|
-
|
|
52427
|
+
_context17.next = 40;
|
|
52111
52428
|
break;
|
|
52112
52429
|
case 36:
|
|
52113
52430
|
this.onError();
|
|
@@ -52116,12 +52433,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52116
52433
|
LOG$2.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {
|
|
52117
52434
|
initializationId: initializationId
|
|
52118
52435
|
}, true);
|
|
52119
|
-
return
|
|
52436
|
+
return _context17.abrupt("return", false);
|
|
52120
52437
|
case 40:
|
|
52121
52438
|
case "end":
|
|
52122
|
-
return
|
|
52439
|
+
return _context17.stop();
|
|
52123
52440
|
}
|
|
52124
|
-
},
|
|
52441
|
+
}, _callee17, this, [[19, 28]]);
|
|
52125
52442
|
}));
|
|
52126
52443
|
function initialize(_x56) {
|
|
52127
52444
|
return _initialize.apply(this, arguments);
|
|
@@ -52191,52 +52508,52 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52191
52508
|
}, {
|
|
52192
52509
|
key: "initializeSets",
|
|
52193
52510
|
value: function () {
|
|
52194
|
-
var _initializeSets = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
52511
|
+
var _initializeSets = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee18(loadSuccessful, viewReadyPromise) {
|
|
52195
52512
|
var _this$actions17, _set$getDivaArticles, _catalogData$catalogM, _catalogData$catalogM2;
|
|
52196
52513
|
var _this$actions16, _this$actions16$toggl, initSetState, set, oldProductId, _result$customData$SA, _result$customData, _result$customData2, _result$customData$SA2, _result$customData3, _result$customData4, result, _this$actions18, catalogData, initializationId, initializationType;
|
|
52197
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
52198
|
-
while (1) switch (
|
|
52514
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee18$(_context18) {
|
|
52515
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
52199
52516
|
case 0:
|
|
52200
52517
|
if (!(typeof loadSuccessful != 'boolean')) {
|
|
52201
|
-
|
|
52518
|
+
_context18.next = 9;
|
|
52202
52519
|
break;
|
|
52203
52520
|
}
|
|
52204
52521
|
if (!(loadSuccessful.type == 'ProductList')) {
|
|
52205
|
-
|
|
52522
|
+
_context18.next = 9;
|
|
52206
52523
|
break;
|
|
52207
52524
|
}
|
|
52208
|
-
|
|
52525
|
+
_context18.next = 4;
|
|
52209
52526
|
return viewReadyPromise;
|
|
52210
52527
|
case 4:
|
|
52211
|
-
|
|
52528
|
+
_context18.next = 6;
|
|
52212
52529
|
return this.initView();
|
|
52213
52530
|
case 6:
|
|
52214
52531
|
this.subscribeToWebPlannerEvents();
|
|
52215
52532
|
(_this$actions16 = this.actions) === null || _this$actions16 === void 0 || (_this$actions16$toggl = _this$actions16.toggleLoading) === null || _this$actions16$toggl === void 0 || _this$actions16$toggl.call(_this$actions16, 'Planner_Loading', false, false);
|
|
52216
|
-
return
|
|
52533
|
+
return _context18.abrupt("return", true);
|
|
52217
52534
|
case 9:
|
|
52218
52535
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
52219
52536
|
initSetState = this.getInitStateForSet();
|
|
52220
52537
|
this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
52221
52538
|
bootMark('planner: init sets start');
|
|
52222
|
-
|
|
52539
|
+
_context18.next = 15;
|
|
52223
52540
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
52224
52541
|
case 15:
|
|
52225
52542
|
bootMark('planner: init sets done');
|
|
52226
52543
|
set = this.actSet();
|
|
52227
52544
|
oldProductId = this.divaBasketHandler.actBasket.MatchingProductId || this.divaBasketHandler.actBasket.OrigProductId;
|
|
52228
52545
|
if (!(oldProductId && set && set !== null && set !== void 0 && set.api.doCheckForProductsPrice())) {
|
|
52229
|
-
|
|
52546
|
+
_context18.next = 29;
|
|
52230
52547
|
break;
|
|
52231
52548
|
}
|
|
52232
|
-
|
|
52549
|
+
_context18.next = 23;
|
|
52233
52550
|
return this.divaBasketHandler.getProduct(this.api, oldProductId);
|
|
52234
52551
|
case 23:
|
|
52235
|
-
result =
|
|
52552
|
+
result = _context18.sent;
|
|
52236
52553
|
if (result) productHandlerInstance.handleFountMatchingProducts(set, [result], set.setHash);
|
|
52237
52554
|
(_result$customData$SA = result === null || result === void 0 || (_result$customData = result.customData) === null || _result$customData === void 0 || (_result$customData = _result$customData.SAP) === null || _result$customData === void 0 ? void 0 : _result$customData.SAP_MARA_MATKL) !== null && _result$customData$SA !== void 0 ? _result$customData$SA : result === null || result === void 0 || (_result$customData2 = result.customData) === null || _result$customData2 === void 0 || (_result$customData2 = _result$customData2.SAP_MARA_MATKL) === null || _result$customData2 === void 0 ? void 0 : _result$customData2.value;
|
|
52238
52555
|
(_result$customData$SA2 = result === null || result === void 0 || (_result$customData3 = result.customData) === null || _result$customData3 === void 0 || (_result$customData3 = _result$customData3.SAP) === null || _result$customData3 === void 0 ? void 0 : _result$customData3.SAP_MARA_PRDHA) !== null && _result$customData$SA2 !== void 0 ? _result$customData$SA2 : result === null || result === void 0 || (_result$customData4 = result.customData) === null || _result$customData4 === void 0 || (_result$customData4 = _result$customData4.SAP_MARA_PRDHA) === null || _result$customData4 === void 0 ? void 0 : _result$customData4.value;
|
|
52239
|
-
|
|
52556
|
+
_context18.next = 30;
|
|
52240
52557
|
break;
|
|
52241
52558
|
case 29:
|
|
52242
52559
|
if (typeof loadSuccessful != 'boolean' && set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
@@ -52245,11 +52562,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52245
52562
|
}
|
|
52246
52563
|
}
|
|
52247
52564
|
case 30:
|
|
52248
|
-
|
|
52565
|
+
_context18.next = 32;
|
|
52249
52566
|
return viewReadyPromise;
|
|
52250
52567
|
case 32:
|
|
52251
52568
|
bootMark('planner: view deps ready');
|
|
52252
|
-
|
|
52569
|
+
_context18.next = 35;
|
|
52253
52570
|
return this.initView();
|
|
52254
52571
|
case 35:
|
|
52255
52572
|
(_this$actions17 = this.actions) === null || _this$actions17 === void 0 || _this$actions17.onEvent({
|
|
@@ -52286,15 +52603,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52286
52603
|
}, false);
|
|
52287
52604
|
this.configuratorChangeLog('onConfigurationInit', undefined, true);
|
|
52288
52605
|
this.plannerChangeLog('onInitPlanner', true);
|
|
52289
|
-
|
|
52606
|
+
_context18.next = 46;
|
|
52290
52607
|
return this.fillBaksetforOnWebPlanerConfigChange(undefined, true);
|
|
52291
52608
|
case 46:
|
|
52292
|
-
return
|
|
52609
|
+
return _context18.abrupt("return", true);
|
|
52293
52610
|
case 47:
|
|
52294
52611
|
case "end":
|
|
52295
|
-
return
|
|
52612
|
+
return _context18.stop();
|
|
52296
52613
|
}
|
|
52297
|
-
},
|
|
52614
|
+
}, _callee18, this);
|
|
52298
52615
|
}));
|
|
52299
52616
|
function initializeSets(_x57, _x58) {
|
|
52300
52617
|
return _initializeSets.apply(this, arguments);
|
|
@@ -52334,6 +52651,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52334
52651
|
configuratorTitle: (_this$plannerConfig = this.plannerConfig) !== null && _this$plannerConfig !== void 0 && _this$plannerConfig.configuratorTitle ? decodeURIComponent(this.plannerConfig.configuratorTitle) : undefined,
|
|
52335
52652
|
doAllowSetPlanner: this.doAllowSetPlanner,
|
|
52336
52653
|
getPlanning2DAsJpg: this.getPlanning2DAsJpg,
|
|
52654
|
+
captureSetImages: this.captureSetImages,
|
|
52655
|
+
exportSetGlb: this.exportSetGlb,
|
|
52337
52656
|
updateSetImage: function updateSetImage(url) {
|
|
52338
52657
|
var _this2$view;
|
|
52339
52658
|
return (_this2$view = _this2.view) === null || _this2$view === void 0 ? void 0 : _this2$view.updateSetImage(url);
|
|
@@ -52480,21 +52799,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52480
52799
|
}, {
|
|
52481
52800
|
key: "reattachView",
|
|
52482
52801
|
value: function () {
|
|
52483
|
-
var _reattachView = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
52484
|
-
var _this$
|
|
52802
|
+
var _reattachView = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee19() {
|
|
52803
|
+
var _this$view49, _this$actSet6, _this$actions22, _this$actions23, _this$actSet$getDivaA2, _this$actSet7;
|
|
52485
52804
|
var viewReadyPromise, catalogData, _this$actions24;
|
|
52486
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
52487
|
-
while (1) switch (
|
|
52805
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee19$(_context19) {
|
|
52806
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
52488
52807
|
case 0:
|
|
52489
|
-
viewReadyPromise = (_this$
|
|
52808
|
+
viewReadyPromise = (_this$view49 = this.view) === null || _this$view49 === void 0 ? void 0 : _this$view49.initViewApiDependencies();
|
|
52490
52809
|
if (!viewReadyPromise) {
|
|
52491
|
-
|
|
52810
|
+
_context19.next = 4;
|
|
52492
52811
|
break;
|
|
52493
52812
|
}
|
|
52494
|
-
|
|
52813
|
+
_context19.next = 4;
|
|
52495
52814
|
return viewReadyPromise;
|
|
52496
52815
|
case 4:
|
|
52497
|
-
|
|
52816
|
+
_context19.next = 6;
|
|
52498
52817
|
return this.initView();
|
|
52499
52818
|
case 6:
|
|
52500
52819
|
catalogData = (_this$actSet6 = this.actSet()) === null || _this$actSet6 === void 0 ? void 0 : _this$actSet6.CatalogData;
|
|
@@ -52514,9 +52833,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52514
52833
|
}
|
|
52515
52834
|
case 10:
|
|
52516
52835
|
case "end":
|
|
52517
|
-
return
|
|
52836
|
+
return _context19.stop();
|
|
52518
52837
|
}
|
|
52519
|
-
},
|
|
52838
|
+
}, _callee19, this);
|
|
52520
52839
|
}));
|
|
52521
52840
|
function reattachView() {
|
|
52522
52841
|
return _reattachView.apply(this, arguments);
|
|
@@ -52529,51 +52848,51 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52529
52848
|
}, {
|
|
52530
52849
|
key: "initView",
|
|
52531
52850
|
value: (function () {
|
|
52532
|
-
var _initView = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
52533
|
-
var _this$
|
|
52534
|
-
var set, plannerMode, _this$
|
|
52535
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
52536
|
-
while (1) switch (
|
|
52851
|
+
var _initView = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee20() {
|
|
52852
|
+
var _this$view50;
|
|
52853
|
+
var set, plannerMode, _this$view51, _this$view52, _this$view53, _this$view54, _this$view55, _this$view56;
|
|
52854
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee20$(_context20) {
|
|
52855
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
52537
52856
|
case 0:
|
|
52538
52857
|
bootMark('planner: initView start');
|
|
52539
52858
|
set = this.actSet();
|
|
52540
52859
|
plannerMode = this.getPlannerMode();
|
|
52541
|
-
(_this$
|
|
52860
|
+
(_this$view50 = this.view) === null || _this$view50 === void 0 || _this$view50.initConfiguratorMode(plannerMode);
|
|
52542
52861
|
if (!(plannerMode == 'ProductList')) {
|
|
52543
|
-
|
|
52862
|
+
_context20.next = 8;
|
|
52544
52863
|
break;
|
|
52545
52864
|
}
|
|
52546
|
-
(_this$
|
|
52547
|
-
|
|
52865
|
+
(_this$view51 = this.view) === null || _this$view51 === void 0 || _this$view51.initConfiguratorStructure(setHandlerInstance.loadConfigStructureForOnlyProductsList());
|
|
52866
|
+
_context20.next = 19;
|
|
52548
52867
|
break;
|
|
52549
52868
|
case 8:
|
|
52550
|
-
|
|
52551
|
-
return (_this$
|
|
52869
|
+
_context20.next = 10;
|
|
52870
|
+
return (_this$view52 = this.view) === null || _this$view52 === void 0 ? void 0 : _this$view52.initPlannerView();
|
|
52552
52871
|
case 10:
|
|
52553
52872
|
//first load the Configuratorstructure STARTCONFIG
|
|
52554
|
-
(_this$
|
|
52873
|
+
(_this$view53 = this.view) === null || _this$view53 === void 0 || _this$view53.initConfiguratorStructure(setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType()));
|
|
52555
52874
|
this.updatePriceInView();
|
|
52556
|
-
(_this$
|
|
52875
|
+
(_this$view54 = this.view) === null || _this$view54 === void 0 || _this$view54.updateViewButtonsDependigOnConfigStructure();
|
|
52557
52876
|
this.updateWebConfiguratorTitle();
|
|
52558
52877
|
//initialize planner view
|
|
52559
|
-
(_this$
|
|
52878
|
+
(_this$view55 = this.view) === null || _this$view55 === void 0 || _this$view55.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set), set.getSetId(), set.firstElementId, true);
|
|
52560
52879
|
|
|
52561
52880
|
// The 3D request leaves here: `updatePlannerView` reaches `PlannerHandler3D.request3D`, which
|
|
52562
52881
|
// either sends over SignalR or parks the request until the login/join acks land.
|
|
52563
52882
|
bootMark('planner: updatePlannerView INIT_VIEW');
|
|
52564
52883
|
this.updatePlannerView('INIT_VIEW');
|
|
52565
|
-
(_this$
|
|
52884
|
+
(_this$view56 = this.view) === null || _this$view56 === void 0 || _this$view56.onBasketInitialized();
|
|
52566
52885
|
this.checkMatchingProducts('onInit');
|
|
52567
52886
|
case 19:
|
|
52568
|
-
|
|
52887
|
+
_context20.next = 21;
|
|
52569
52888
|
return this.runInitMode(plannerMode);
|
|
52570
52889
|
case 21:
|
|
52571
52890
|
bootMark('planner: initView done');
|
|
52572
52891
|
case 22:
|
|
52573
52892
|
case "end":
|
|
52574
|
-
return
|
|
52893
|
+
return _context20.stop();
|
|
52575
52894
|
}
|
|
52576
|
-
},
|
|
52895
|
+
}, _callee20, this);
|
|
52577
52896
|
}));
|
|
52578
52897
|
function initView() {
|
|
52579
52898
|
return _initView.apply(this, arguments);
|
|
@@ -52583,43 +52902,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52583
52902
|
}, {
|
|
52584
52903
|
key: "updateWebConfiguratorTitle",
|
|
52585
52904
|
value: function updateWebConfiguratorTitle() {
|
|
52586
|
-
var _this$
|
|
52587
|
-
(_this$
|
|
52905
|
+
var _this$view57, _this$actSet8;
|
|
52906
|
+
(_this$view57 = this.view) === null || _this$view57 === void 0 || _this$view57.setWebConifguratorTitle((_this$actSet8 = this.actSet()) === null || _this$actSet8 === void 0 ? void 0 : _this$actSet8.getSetTitle());
|
|
52588
52907
|
}
|
|
52589
52908
|
}, {
|
|
52590
52909
|
key: "updateConfigStructure",
|
|
52591
52910
|
value: function updateConfigStructure() {
|
|
52592
|
-
var _this$
|
|
52593
|
-
(_this$
|
|
52911
|
+
var _this$view58;
|
|
52912
|
+
(_this$view58 = this.view) === null || _this$view58 === void 0 || _this$view58.updateConfiguratorStructure(setHandlerInstance.loadConfigStructureOfActSet(this.actSet(), this.getCurPlannerType()));
|
|
52594
52913
|
}
|
|
52595
52914
|
}, {
|
|
52596
52915
|
key: "runInitMode",
|
|
52597
52916
|
value: function () {
|
|
52598
|
-
var _runInitMode = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
52917
|
+
var _runInitMode = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee21(plannerMode) {
|
|
52599
52918
|
var _this$plannerConfig$i, _this$state5;
|
|
52600
|
-
var doDefault, _this$
|
|
52601
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
52602
|
-
while (1) switch (
|
|
52919
|
+
var doDefault, _this$view59, _this$saveToBasketWra, _configStepKey, _this$view60, _this$actSet9, _this$view61, _this$view62, _this$view63;
|
|
52920
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee21$(_context21) {
|
|
52921
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
52603
52922
|
case 0:
|
|
52604
52923
|
doDefault = true;
|
|
52605
52924
|
if (!['SHOW_PDF'].includes((_this$plannerConfig$i = this.plannerConfig.initMode) !== null && _this$plannerConfig$i !== void 0 ? _this$plannerConfig$i : '')) {
|
|
52606
|
-
|
|
52925
|
+
_context21.next = 9;
|
|
52607
52926
|
break;
|
|
52608
52927
|
}
|
|
52609
52928
|
if (this.plannerConfig.initMode == 'SHOW_PDF') this.ReturnTo = 'OPEN_PDF';
|
|
52610
|
-
(_this$
|
|
52929
|
+
(_this$view59 = this.view) === null || _this$view59 === void 0 || _this$view59.navigateToTabGroup('SUMMARY', undefined, true);
|
|
52611
52930
|
//TODO lea bug das hier ist nur ein temporäre lößung https://app.asana.com/0/1200869909950432/1200998848659806
|
|
52612
|
-
|
|
52931
|
+
_context21.next = 6;
|
|
52613
52932
|
return (_this$saveToBasketWra = this.saveToBasketWrapper) === null || _this$saveToBasketWra === void 0 ? void 0 : _this$saveToBasketWra.call(this);
|
|
52614
52933
|
case 6:
|
|
52615
52934
|
doDefault = false;
|
|
52616
|
-
|
|
52935
|
+
_context21.next = 10;
|
|
52617
52936
|
break;
|
|
52618
52937
|
case 9:
|
|
52619
52938
|
if (this.plannerConfig.initMode == 'OPENCONFIGTABGROUP' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER_ONLY_MOBILE' && (_this$state5 = this.state) !== null && _this$state5 !== void 0 && _this$state5.dimensions.isMobile) {
|
|
52620
52939
|
_configStepKey = this.plannerConfig.opt ? setHandlerInstance.getConfigStepKeyOfOption(this.actSet(), this.plannerConfig.opt) : setHandlerInstance.getFirstConfigStep(this.actSet());
|
|
52621
52940
|
if (_configStepKey) {
|
|
52622
|
-
(_this$
|
|
52941
|
+
(_this$view60 = this.view) === null || _this$view60 === void 0 || _this$view60.navigateToConfigStep(_configStepKey, !this.plannerConfig.opt, true);
|
|
52623
52942
|
doDefault = false;
|
|
52624
52943
|
} else {
|
|
52625
52944
|
LOG$2.warn('Option: ' + this.plannerConfig.opt + ' could not be found');
|
|
@@ -52628,18 +52947,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52628
52947
|
case 10:
|
|
52629
52948
|
if (doDefault) {
|
|
52630
52949
|
if (plannerMode == 'ProductList') {
|
|
52631
|
-
(_this$
|
|
52950
|
+
(_this$view61 = this.view) === null || _this$view61 === void 0 || _this$view61.navigateToTabGroup('PRODUCTS');
|
|
52632
52951
|
} else if ((_this$actSet9 = this.actSet()) !== null && _this$actSet9 !== void 0 && _this$actSet9.hasStaticRoomList) {
|
|
52633
|
-
(_this$
|
|
52952
|
+
(_this$view62 = this.view) === null || _this$view62 === void 0 || _this$view62.navigateToTabGroup('ROOMLIST', true);
|
|
52634
52953
|
} else {
|
|
52635
|
-
(_this$
|
|
52954
|
+
(_this$view63 = this.view) === null || _this$view63 === void 0 || _this$view63.navigateToTabGroup(this.getCurPlannerType(), true);
|
|
52636
52955
|
}
|
|
52637
52956
|
}
|
|
52638
52957
|
case 11:
|
|
52639
52958
|
case "end":
|
|
52640
|
-
return
|
|
52959
|
+
return _context21.stop();
|
|
52641
52960
|
}
|
|
52642
|
-
},
|
|
52961
|
+
}, _callee21, this);
|
|
52643
52962
|
}));
|
|
52644
52963
|
function runInitMode(_x59) {
|
|
52645
52964
|
return _runInitMode.apply(this, arguments);
|
|
@@ -52649,16 +52968,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52649
52968
|
}, {
|
|
52650
52969
|
key: "addSetToActPlanningByDivaNr",
|
|
52651
52970
|
value: function () {
|
|
52652
|
-
var _addSetToActPlanningByDivaNr = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
52653
|
-
var _this$
|
|
52971
|
+
var _addSetToActPlanningByDivaNr = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee22(divaNr) {
|
|
52972
|
+
var _this$view64;
|
|
52654
52973
|
var set, orderSets, i, orderset, lastSetToInitialize, loadedSet, articlesKeys;
|
|
52655
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
52656
|
-
while (1) switch (
|
|
52974
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee22$(_context22) {
|
|
52975
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
52657
52976
|
case 0:
|
|
52658
52977
|
set = this.actSet();
|
|
52659
52978
|
this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
52660
52979
|
this.divaBasketHandler.setIgnoreInitObjectWhenInitializing();
|
|
52661
|
-
|
|
52980
|
+
_context22.next = 5;
|
|
52662
52981
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
52663
52982
|
case 5:
|
|
52664
52983
|
orderSets = this.divaBasketHandler.actBasket.OrderSets;
|
|
@@ -52666,44 +52985,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52666
52985
|
i = 0;
|
|
52667
52986
|
case 8:
|
|
52668
52987
|
if (!(i < orderSets.length)) {
|
|
52669
|
-
|
|
52988
|
+
_context22.next = 24;
|
|
52670
52989
|
break;
|
|
52671
52990
|
}
|
|
52672
52991
|
orderset = orderSets[i];
|
|
52673
52992
|
lastSetToInitialize = setHandlerInstance.getOrderSetShouldInitPlanner(orderSets, i);
|
|
52674
52993
|
loadedSet = setHandlerInstance.findLoadedSet(this.sets, orderset.CatalogCodex, orderset.AccountGUID);
|
|
52675
52994
|
if (!loadedSet) {
|
|
52676
|
-
|
|
52995
|
+
_context22.next = 18;
|
|
52677
52996
|
break;
|
|
52678
52997
|
}
|
|
52679
|
-
|
|
52998
|
+
_context22.next = 15;
|
|
52680
52999
|
return setHandlerInstance.addOrderSetArticlesToExistingSet(loadedSet, orderset, lastSetToInitialize);
|
|
52681
53000
|
case 15:
|
|
52682
53001
|
this.checkMatchingProducts('onAdd');
|
|
52683
|
-
|
|
53002
|
+
_context22.next = 20;
|
|
52684
53003
|
break;
|
|
52685
53004
|
case 18:
|
|
52686
|
-
|
|
53005
|
+
_context22.next = 20;
|
|
52687
53006
|
return setHandlerInstance.initSet(orderset, this.getInitStateForSet(), lastSetToInitialize);
|
|
52688
53007
|
case 20:
|
|
52689
53008
|
this.cleanUpEmptySets(true);
|
|
52690
53009
|
case 21:
|
|
52691
53010
|
i++;
|
|
52692
|
-
|
|
53011
|
+
_context22.next = 8;
|
|
52693
53012
|
break;
|
|
52694
53013
|
case 24:
|
|
52695
53014
|
this.divaBasketHandler.actBasket.OrderSets = [];
|
|
52696
53015
|
this.updatePriceInView();
|
|
52697
53016
|
this.updateWebConfiguratorTitle();
|
|
52698
53017
|
this.updateConfigStructure();
|
|
52699
|
-
(_this$
|
|
53018
|
+
(_this$view64 = this.view) === null || _this$view64 === void 0 || _this$view64.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
52700
53019
|
articlesKeys = Object.keys(this.actSet().getDivaArticles());
|
|
52701
53020
|
this.loadPaletteInfos(undefined, [articlesKeys[0]], articlesKeys);
|
|
52702
53021
|
case 31:
|
|
52703
53022
|
case "end":
|
|
52704
|
-
return
|
|
53023
|
+
return _context22.stop();
|
|
52705
53024
|
}
|
|
52706
|
-
},
|
|
53025
|
+
}, _callee22, this);
|
|
52707
53026
|
}));
|
|
52708
53027
|
function addSetToActPlanningByDivaNr(_x60) {
|
|
52709
53028
|
return _addSetToActPlanningByDivaNr.apply(this, arguments);
|
|
@@ -52738,26 +53057,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52738
53057
|
}, {
|
|
52739
53058
|
key: "setActSetCurConfigStepKey",
|
|
52740
53059
|
value: function () {
|
|
52741
|
-
var _setActSetCurConfigStepKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
53060
|
+
var _setActSetCurConfigStepKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee23(curConfigStepKey) {
|
|
52742
53061
|
var set;
|
|
52743
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
52744
|
-
while (1) switch (
|
|
53062
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee23$(_context23) {
|
|
53063
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
52745
53064
|
case 0:
|
|
52746
53065
|
set = this.actSet();
|
|
52747
53066
|
if (set) {
|
|
52748
|
-
|
|
53067
|
+
_context23.next = 3;
|
|
52749
53068
|
break;
|
|
52750
53069
|
}
|
|
52751
|
-
return
|
|
53070
|
+
return _context23.abrupt("return");
|
|
52752
53071
|
case 3:
|
|
52753
53072
|
set.ActConfigStepKey = curConfigStepKey;
|
|
52754
|
-
|
|
53073
|
+
_context23.next = 6;
|
|
52755
53074
|
return setHandlerInstance.updateNavigation(set);
|
|
52756
53075
|
case 6:
|
|
52757
53076
|
case "end":
|
|
52758
|
-
return
|
|
53077
|
+
return _context23.stop();
|
|
52759
53078
|
}
|
|
52760
|
-
},
|
|
53079
|
+
}, _callee23, this);
|
|
52761
53080
|
}));
|
|
52762
53081
|
function setActSetCurConfigStepKey(_x61) {
|
|
52763
53082
|
return _setActSetCurConfigStepKey.apply(this, arguments);
|
|
@@ -52783,10 +53102,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52783
53102
|
* @param viewpoint This parameter is used to send the viewpoint information from the rtv to unity
|
|
52784
53103
|
*/
|
|
52785
53104
|
function updatePlannerView(callingFrom, onDoConfigureValues, hybridInfo) {
|
|
52786
|
-
var _this$
|
|
53105
|
+
var _this$view65, _set$getAlternateRend, _this$view66, _this$view$getPlanner, _this$view67, _this$view68, _this$view$getPlanner2, _this$view69, _this$view70, _this$view$getPlanner3, _this$view71, _this$view72, _this$view$getInitPla, _this$view74;
|
|
52787
53106
|
var set = this.actSet();
|
|
52788
53107
|
if (!set) return;
|
|
52789
|
-
var alternateRenderInfo = (_this$
|
|
53108
|
+
var alternateRenderInfo = (_this$view65 = this.view) === null || _this$view65 === void 0 || (_this$view65 = _this$view65.getCurrentAlternativRendering()) === null || _this$view65 === void 0 ? void 0 : _this$view65[0];
|
|
52790
53109
|
var alternateRenderInfoExistInSet = (set === null || set === void 0 || (_set$getAlternateRend = set.getAlternateRenderInfo()) === null || _set$getAlternateRend === void 0 ? void 0 : _set$getAlternateRend.length) > 0;
|
|
52791
53110
|
var doUpdateVP = false;
|
|
52792
53111
|
if (alternateRenderInfoExistInSet) {
|
|
@@ -52814,14 +53133,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52814
53133
|
};
|
|
52815
53134
|
}
|
|
52816
53135
|
}
|
|
52817
|
-
var curPlannerViewMode = (_this$
|
|
53136
|
+
var curPlannerViewMode = (_this$view66 = this.view) === null || _this$view66 === void 0 ? void 0 : _this$view66.getCurPlannerViewMode();
|
|
52818
53137
|
if (!curPlannerViewMode) return;
|
|
52819
53138
|
LOG$2.debug('updatePlannerView in mode: ' + curPlannerViewMode + '; called from ' + callingFrom);
|
|
52820
53139
|
//delete me if you see this
|
|
52821
53140
|
|
|
52822
53141
|
switch (curPlannerViewMode) {
|
|
52823
53142
|
case '3DCOMB':
|
|
52824
|
-
setHandlerInstance.update3DPlannerView(true, !hybridInfo || hybridInfo && hybridInfo.focus.adjustZoomInUnity, set, (_this$view$getPlanner = (_this$
|
|
53143
|
+
setHandlerInstance.update3DPlannerView(true, !hybridInfo || hybridInfo && hybridInfo.focus.adjustZoomInUnity, set, (_this$view$getPlanner = (_this$view67 = this.view) === null || _this$view67 === void 0 ? void 0 : _this$view67.getPlannerRenderingSize()) !== null && _this$view$getPlanner !== void 0 ? _this$view$getPlanner : this.headlessRenderingSize, 'STREAM', (_this$view68 = this.view) === null || _this$view68 === void 0 ? void 0 : _this$view68.getDoShow3DDimensionLines(), alternateRenderInfo, hybridInfo ? {
|
|
52825
53144
|
focus: hybridInfo.focus,
|
|
52826
53145
|
forceRTCam: true,
|
|
52827
53146
|
currentCamera: hybridInfo.currentCamera
|
|
@@ -52831,23 +53150,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52831
53150
|
case 'RTViewer':
|
|
52832
53151
|
//Request HQRenderscript + rendering
|
|
52833
53152
|
//Request new Rendering
|
|
52834
|
-
setHandlerInstance.update3DPlannerView(true, true, set, (_this$view$getPlanner2 = (_this$
|
|
53153
|
+
setHandlerInstance.update3DPlannerView(true, true, set, (_this$view$getPlanner2 = (_this$view69 = this.view) === null || _this$view69 === void 0 ? void 0 : _this$view69.getPlannerRenderingSize()) !== null && _this$view$getPlanner2 !== void 0 ? _this$view$getPlanner2 : this.headlessRenderingSize, 'STREAM', (_this$view70 = this.view) === null || _this$view70 === void 0 ? void 0 : _this$view70.getDoShow3DDimensionLines(), alternateRenderInfo, undefined);
|
|
52835
53154
|
break;
|
|
52836
53155
|
case '3DImage':
|
|
52837
53156
|
//Request new Rendering
|
|
52838
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, (_this$view$getPlanner3 = (_this$
|
|
53157
|
+
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, (_this$view$getPlanner3 = (_this$view71 = this.view) === null || _this$view71 === void 0 ? void 0 : _this$view71.getPlannerRenderingSize()) !== null && _this$view$getPlanner3 !== void 0 ? _this$view$getPlanner3 : this.headlessRenderingSize, 'STREAM', (_this$view72 = this.view) === null || _this$view72 === void 0 ? void 0 : _this$view72.getDoShow3DDimensionLines(), alternateRenderInfo);
|
|
52839
53158
|
break;
|
|
52840
53159
|
case '2DGrid':
|
|
52841
53160
|
var _boundingBox = setHandlerInstance.get2DViewPlannerBoundingBox(set);
|
|
52842
53161
|
if (_boundingBox) {
|
|
52843
|
-
var _this$
|
|
52844
|
-
(_this$
|
|
53162
|
+
var _this$view73;
|
|
53163
|
+
(_this$view73 = this.view) === null || _this$view73 === void 0 || _this$view73.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
52845
53164
|
this.start2DRender(_boundingBox);
|
|
52846
53165
|
}
|
|
52847
|
-
if (['3DImage', '3DCOMB'].includes((_this$view$getInitPla = (_this$
|
|
52848
|
-
var _this$view$getPlanner4, _this$
|
|
53166
|
+
if (['3DImage', '3DCOMB'].includes((_this$view$getInitPla = (_this$view74 = this.view) === null || _this$view74 === void 0 ? void 0 : _this$view74.getInitPlannerViewMode()) !== null && _this$view$getInitPla !== void 0 ? _this$view$getInitPla : '')) {
|
|
53167
|
+
var _this$view$getPlanner4, _this$view75, _this$view76;
|
|
52849
53168
|
//update 3D image always even if you are in the 2DGrid mode
|
|
52850
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, (_this$view$getPlanner4 = (_this$
|
|
53169
|
+
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, (_this$view$getPlanner4 = (_this$view75 = this.view) === null || _this$view75 === void 0 ? void 0 : _this$view75.getPlannerRenderingSize()) !== null && _this$view$getPlanner4 !== void 0 ? _this$view$getPlanner4 : this.headlessRenderingSize, 'STREAM', (_this$view76 = this.view) === null || _this$view76 === void 0 ? void 0 : _this$view76.getDoShow3DDimensionLines(), alternateRenderInfo);
|
|
52851
53170
|
}
|
|
52852
53171
|
break;
|
|
52853
53172
|
}
|
|
@@ -52863,21 +53182,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52863
53182
|
}, {
|
|
52864
53183
|
key: "forceUpdatePlannerView",
|
|
52865
53184
|
value: function forceUpdatePlannerView(renderSavingMode, doLoadAllAlternateRenderings) {
|
|
52866
|
-
var _this$view$getInitPla2, _this$
|
|
53185
|
+
var _this$view$getInitPla2, _this$view77;
|
|
52867
53186
|
var set = this.actSet();
|
|
52868
53187
|
this.update2DGrid(set);
|
|
52869
|
-
if (['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes((_this$view$getInitPla2 = (_this$
|
|
52870
|
-
var _this$view$getPlanner6, _this$
|
|
53188
|
+
if (['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes((_this$view$getInitPla2 = (_this$view77 = this.view) === null || _this$view77 === void 0 ? void 0 : _this$view77.getInitPlannerViewMode()) !== null && _this$view$getInitPla2 !== void 0 ? _this$view$getInitPla2 : '')) {
|
|
53189
|
+
var _this$view$getPlanner6, _this$view80, _this$view81;
|
|
52871
53190
|
if (doLoadAllAlternateRenderings) {
|
|
52872
53191
|
var alternateRenderings = set.CatalogData.alternateRenderingsForSummary;
|
|
52873
53192
|
for (var i = 0; i < alternateRenderings.length; i++) {
|
|
52874
53193
|
if (alternateRenderings[i].hideOptionsIn3DImage && alternateRenderings[i].hideOptionsIn3DImage.length > 0) {
|
|
52875
|
-
var _this$view$getPlanner5, _this$
|
|
52876
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, (_this$view$getPlanner5 = (_this$
|
|
53194
|
+
var _this$view$getPlanner5, _this$view78, _this$view79;
|
|
53195
|
+
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, (_this$view$getPlanner5 = (_this$view78 = this.view) === null || _this$view78 === void 0 ? void 0 : _this$view78.getPlannerRenderingSize()) !== null && _this$view$getPlanner5 !== void 0 ? _this$view$getPlanner5 : this.headlessRenderingSize, renderSavingMode, (_this$view79 = this.view) === null || _this$view79 === void 0 ? void 0 : _this$view79.getDoShow3DDimensionLines(), alternateRenderings[i]);
|
|
52877
53196
|
}
|
|
52878
53197
|
}
|
|
52879
53198
|
}
|
|
52880
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, (_this$view$getPlanner6 = (_this$
|
|
53199
|
+
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, (_this$view$getPlanner6 = (_this$view80 = this.view) === null || _this$view80 === void 0 ? void 0 : _this$view80.getPlannerRenderingSize()) !== null && _this$view$getPlanner6 !== void 0 ? _this$view$getPlanner6 : this.headlessRenderingSize, renderSavingMode, (_this$view81 = this.view) === null || _this$view81 === void 0 ? void 0 : _this$view81.getDoShow3DDimensionLines(), undefined, undefined, false);
|
|
52881
53200
|
}
|
|
52882
53201
|
}
|
|
52883
53202
|
}, {
|
|
@@ -52888,8 +53207,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52888
53207
|
* The rejection MUST be swallowed: the cached promise is awaited by every later capture, so one failed render would break every following save.
|
|
52889
53208
|
*/
|
|
52890
53209
|
function start2DRender(boundingBox) {
|
|
52891
|
-
var _this$
|
|
52892
|
-
this.pending2DRender = Promise.resolve((_this$
|
|
53210
|
+
var _this$view82;
|
|
53211
|
+
this.pending2DRender = Promise.resolve((_this$view82 = this.view) === null || _this$view82 === void 0 ? void 0 : _this$view82.updatePlanner2DGrid(boundingBox))["catch"](function (error) {
|
|
52893
53212
|
LOG$2.error(error instanceof Error ? error : new Error('2D grid render failed: ' + String(error)));
|
|
52894
53213
|
});
|
|
52895
53214
|
}
|
|
@@ -52956,36 +53275,36 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52956
53275
|
}, {
|
|
52957
53276
|
key: "deletePlannerElement",
|
|
52958
53277
|
value: function () {
|
|
52959
|
-
var _deletePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
52960
|
-
var _this$
|
|
52961
|
-
var set, result, _this$
|
|
52962
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
52963
|
-
while (1) switch (
|
|
53278
|
+
var _deletePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee24(setId, elementId, denyElementSelectionClear) {
|
|
53279
|
+
var _this$view83, _this$view84;
|
|
53280
|
+
var set, result, _this$view85, _this$view86;
|
|
53281
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee24$(_context24) {
|
|
53282
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
52964
53283
|
case 0:
|
|
52965
53284
|
set = this.sets[setId];
|
|
52966
|
-
|
|
53285
|
+
_context24.next = 3;
|
|
52967
53286
|
return setHandlerInstance.deleteElementFromSetByElemId(set, elementId, true);
|
|
52968
53287
|
case 3:
|
|
52969
|
-
result =
|
|
53288
|
+
result = _context24.sent;
|
|
52970
53289
|
this.updateConfigStructure();
|
|
52971
|
-
(_this$
|
|
53290
|
+
(_this$view83 = this.view) === null || _this$view83 === void 0 || _this$view83.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
52972
53291
|
this.updatePlannerView('DELETE_PLANNER_ELEMENT');
|
|
52973
53292
|
this.updateWebConfiguratorTitle();
|
|
52974
|
-
(_this$
|
|
53293
|
+
(_this$view84 = this.view) === null || _this$view84 === void 0 || _this$view84.updateViewButtonsDependigOnConfigStructure();
|
|
52975
53294
|
if (!denyElementSelectionClear) {
|
|
52976
|
-
if (result.selectElementId) (_this$
|
|
53295
|
+
if (result.selectElementId) (_this$view85 = this.view) === null || _this$view85 === void 0 || _this$view85.updateElementSelectionPlanner([result.setId], [result.selectElementId], true);else (_this$view86 = this.view) === null || _this$view86 === void 0 || _this$view86.updateElementSelectionPlanner([], [], true);
|
|
52977
53296
|
}
|
|
52978
53297
|
this.updatePriceInView();
|
|
52979
53298
|
this.checkMatchingProducts('onDelete');
|
|
52980
|
-
|
|
53299
|
+
_context24.next = 14;
|
|
52981
53300
|
return this.getFreePlacesOnGrids(undefined, 'deleteElement');
|
|
52982
53301
|
case 14:
|
|
52983
53302
|
this.plannerChangeLog('onDeletePlanner');
|
|
52984
53303
|
case 15:
|
|
52985
53304
|
case "end":
|
|
52986
|
-
return
|
|
53305
|
+
return _context24.stop();
|
|
52987
53306
|
}
|
|
52988
|
-
},
|
|
53307
|
+
}, _callee24, this);
|
|
52989
53308
|
}));
|
|
52990
53309
|
function deletePlannerElement(_x62, _x63, _x64) {
|
|
52991
53310
|
return _deletePlannerElement.apply(this, arguments);
|
|
@@ -53000,26 +53319,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53000
53319
|
}, {
|
|
53001
53320
|
key: "movePlannerElement",
|
|
53002
53321
|
value: (function () {
|
|
53003
|
-
var _movePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
53004
|
-
var _this$
|
|
53322
|
+
var _movePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee25(setId, elementId, curConfigKey, absoluteIndex) {
|
|
53323
|
+
var _this$view87, _this$view88;
|
|
53005
53324
|
var set;
|
|
53006
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
53007
|
-
while (1) switch (
|
|
53325
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee25$(_context25) {
|
|
53326
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
53008
53327
|
case 0:
|
|
53009
53328
|
set = this.sets[setId];
|
|
53010
|
-
|
|
53329
|
+
_context25.next = 3;
|
|
53011
53330
|
return setHandlerInstance.movePlannerElement(set, elementId, absoluteIndex);
|
|
53012
53331
|
case 3:
|
|
53013
53332
|
this.updateConfigStructure();
|
|
53014
|
-
(_this$
|
|
53333
|
+
(_this$view87 = this.view) === null || _this$view87 === void 0 || _this$view87.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
53015
53334
|
this.updatePlannerView('MOVE_PLANNER_ELEMENT');
|
|
53016
53335
|
this.updatePriceInView();
|
|
53017
|
-
(_this$
|
|
53336
|
+
(_this$view88 = this.view) === null || _this$view88 === void 0 || _this$view88.updateViewButtonsDependigOnConfigStructure();
|
|
53018
53337
|
case 8:
|
|
53019
53338
|
case "end":
|
|
53020
|
-
return
|
|
53339
|
+
return _context25.stop();
|
|
53021
53340
|
}
|
|
53022
|
-
},
|
|
53341
|
+
}, _callee25, this);
|
|
53023
53342
|
}));
|
|
53024
53343
|
function movePlannerElement(_x65, _x66, _x67, _x68) {
|
|
53025
53344
|
return _movePlannerElement.apply(this, arguments);
|
|
@@ -53036,42 +53355,42 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53036
53355
|
}, {
|
|
53037
53356
|
key: "copyPlannerElement",
|
|
53038
53357
|
value: (function () {
|
|
53039
|
-
var _copyPlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
53040
|
-
var _this$
|
|
53041
|
-
var set, newSelectedArticle, newConfigStepKey, _this$
|
|
53042
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
53043
|
-
while (1) switch (
|
|
53358
|
+
var _copyPlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee26(setId, elementId, curConfigKey, copyInfo) {
|
|
53359
|
+
var _this$view89, _this$view90;
|
|
53360
|
+
var set, newSelectedArticle, newConfigStepKey, _this$view91, baseArticle;
|
|
53361
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee26$(_context26) {
|
|
53362
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
53044
53363
|
case 0:
|
|
53045
53364
|
if (copyInfo) {
|
|
53046
|
-
|
|
53365
|
+
_context26.next = 2;
|
|
53047
53366
|
break;
|
|
53048
53367
|
}
|
|
53049
|
-
return
|
|
53368
|
+
return _context26.abrupt("return");
|
|
53050
53369
|
case 2:
|
|
53051
53370
|
set = this.sets[setId];
|
|
53052
|
-
|
|
53371
|
+
_context26.next = 5;
|
|
53053
53372
|
return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
|
|
53054
53373
|
case 5:
|
|
53055
|
-
newSelectedArticle =
|
|
53374
|
+
newSelectedArticle = _context26.sent;
|
|
53056
53375
|
this.updateConfigStructure();
|
|
53057
|
-
(_this$
|
|
53376
|
+
(_this$view89 = this.view) === null || _this$view89 === void 0 || _this$view89.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
53058
53377
|
this.updatePlannerView('COPY_PLANNER_ELEMENT');
|
|
53059
53378
|
this.updatePriceInView();
|
|
53060
|
-
(_this$
|
|
53379
|
+
(_this$view90 = this.view) === null || _this$view90 === void 0 || _this$view90.updateViewButtonsDependigOnConfigStructure();
|
|
53061
53380
|
newConfigStepKey = undefined;
|
|
53062
53381
|
if (newSelectedArticle != undefined) {
|
|
53063
53382
|
newConfigStepKey = set.configTree.getNewConfigStepKeyByBasketId(curConfigKey, newSelectedArticle.basketId);
|
|
53064
53383
|
this.loadPaletteInfos(curConfigKey, [newSelectedArticle.basketId], Object.keys(set.getDivaArticles()));
|
|
53065
53384
|
baseArticle = setHandlerInstance.getBaseParentArticleOfAccessoire(set, newSelectedArticle.basketId);
|
|
53066
|
-
(_this$
|
|
53385
|
+
(_this$view91 = this.view) === null || _this$view91 === void 0 || _this$view91.updateElementSelectionPlanner([baseArticle.setId], [baseArticle.elementId], true);
|
|
53067
53386
|
}
|
|
53068
53387
|
this.checkMatchingProducts('onCopy');
|
|
53069
|
-
return
|
|
53388
|
+
return _context26.abrupt("return", newConfigStepKey);
|
|
53070
53389
|
case 15:
|
|
53071
53390
|
case "end":
|
|
53072
|
-
return
|
|
53391
|
+
return _context26.stop();
|
|
53073
53392
|
}
|
|
53074
|
-
},
|
|
53393
|
+
}, _callee26, this);
|
|
53075
53394
|
}));
|
|
53076
53395
|
function copyPlannerElement(_x69, _x70, _x71, _x72) {
|
|
53077
53396
|
return _copyPlannerElement.apply(this, arguments);
|
|
@@ -53107,55 +53426,55 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53107
53426
|
}, {
|
|
53108
53427
|
key: "getFreePlacesOnGrids",
|
|
53109
53428
|
value: function () {
|
|
53110
|
-
var _getFreePlacesOnGrids = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
53111
|
-
var _this$
|
|
53429
|
+
var _getFreePlacesOnGrids = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee27(gridGroup, from) {
|
|
53430
|
+
var _this$view92;
|
|
53112
53431
|
var includeFamily,
|
|
53113
53432
|
set,
|
|
53114
53433
|
withFamily,
|
|
53115
53434
|
freeShelfGrids,
|
|
53116
53435
|
plannedShelfGrids,
|
|
53117
|
-
|
|
53118
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
53119
|
-
while (1) switch (
|
|
53436
|
+
_args27 = arguments;
|
|
53437
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee27$(_context27) {
|
|
53438
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
53120
53439
|
case 0:
|
|
53121
|
-
includeFamily =
|
|
53440
|
+
includeFamily = _args27.length > 2 && _args27[2] !== undefined ? _args27[2] : false;
|
|
53122
53441
|
set = this.actSet();
|
|
53123
53442
|
if (set) {
|
|
53124
|
-
|
|
53443
|
+
_context27.next = 4;
|
|
53125
53444
|
break;
|
|
53126
53445
|
}
|
|
53127
53446
|
throw new Error('getFreePlacesOnGrids: act set is not defined!');
|
|
53128
53447
|
case 4:
|
|
53129
53448
|
withFamily = includeFamily || this.includeFamilyInFreePlaces;
|
|
53130
53449
|
if (!gridGroup) {
|
|
53131
|
-
|
|
53450
|
+
_context27.next = 11;
|
|
53132
53451
|
break;
|
|
53133
53452
|
}
|
|
53134
|
-
|
|
53453
|
+
_context27.next = 8;
|
|
53135
53454
|
return setHandlerInstance.getFreeShelfGrids(set, gridGroup, withFamily);
|
|
53136
53455
|
case 8:
|
|
53137
|
-
|
|
53138
|
-
|
|
53456
|
+
_context27.t0 = _context27.sent;
|
|
53457
|
+
_context27.next = 12;
|
|
53139
53458
|
break;
|
|
53140
53459
|
case 11:
|
|
53141
|
-
|
|
53460
|
+
_context27.t0 = undefined;
|
|
53142
53461
|
case 12:
|
|
53143
|
-
freeShelfGrids =
|
|
53462
|
+
freeShelfGrids = _context27.t0;
|
|
53144
53463
|
plannedShelfGrids = setHandlerInstance.getPlannedShelfGrids(set);
|
|
53145
53464
|
LOG$2.debug('update free from: ' + from, 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
|
|
53146
|
-
(_this$
|
|
53465
|
+
(_this$view92 = this.view) === null || _this$view92 === void 0 || _this$view92.updateFreePlacesOnGrids({
|
|
53147
53466
|
freeShelfGrids: freeShelfGrids,
|
|
53148
53467
|
plannedShelfGrids: plannedShelfGrids
|
|
53149
53468
|
});
|
|
53150
|
-
return
|
|
53469
|
+
return _context27.abrupt("return", {
|
|
53151
53470
|
freeShelfGrids: freeShelfGrids,
|
|
53152
53471
|
plannedShelfGrids: plannedShelfGrids
|
|
53153
53472
|
});
|
|
53154
53473
|
case 17:
|
|
53155
53474
|
case "end":
|
|
53156
|
-
return
|
|
53475
|
+
return _context27.stop();
|
|
53157
53476
|
}
|
|
53158
|
-
},
|
|
53477
|
+
}, _callee27, this);
|
|
53159
53478
|
}));
|
|
53160
53479
|
function getFreePlacesOnGrids(_x73, _x74) {
|
|
53161
53480
|
return _getFreePlacesOnGrids.apply(this, arguments);
|
|
@@ -53178,37 +53497,37 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53178
53497
|
}, {
|
|
53179
53498
|
key: "moveShelfItemToGrid",
|
|
53180
53499
|
value: function () {
|
|
53181
|
-
var _moveShelfItemToGrid = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
53500
|
+
var _moveShelfItemToGrid = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee28(accessoireBasketId, parentBasketId, gridName, cellIndex, switchToArticleCodex) {
|
|
53182
53501
|
var set, newGridId;
|
|
53183
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
53184
|
-
while (1) switch (
|
|
53502
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee28$(_context28) {
|
|
53503
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
53185
53504
|
case 0:
|
|
53186
53505
|
set = this.actSet();
|
|
53187
53506
|
if (set) {
|
|
53188
|
-
|
|
53507
|
+
_context28.next = 3;
|
|
53189
53508
|
break;
|
|
53190
53509
|
}
|
|
53191
|
-
return
|
|
53510
|
+
return _context28.abrupt("return");
|
|
53192
53511
|
case 3:
|
|
53193
|
-
|
|
53512
|
+
_context28.next = 5;
|
|
53194
53513
|
return setHandlerInstance.moveShelfItemToGrid(set, accessoireBasketId, parentBasketId, gridName, cellIndex, switchToArticleCodex);
|
|
53195
53514
|
case 5:
|
|
53196
|
-
newGridId =
|
|
53515
|
+
newGridId = _context28.sent;
|
|
53197
53516
|
this.updatePlannerView('MOVE_SHELF_ITEM');
|
|
53198
53517
|
// A variant switch replaces the article, so the price can change — refresh it (as add/delete do).
|
|
53199
53518
|
this.updatePriceInView();
|
|
53200
53519
|
this.loadPaletteInfos(set.ActConfigStepKey);
|
|
53201
53520
|
if (!newGridId) {
|
|
53202
|
-
|
|
53521
|
+
_context28.next = 12;
|
|
53203
53522
|
break;
|
|
53204
53523
|
}
|
|
53205
|
-
|
|
53524
|
+
_context28.next = 12;
|
|
53206
53525
|
return this.getFreePlacesOnGrids(newGridId, 'move shelf');
|
|
53207
53526
|
case 12:
|
|
53208
53527
|
case "end":
|
|
53209
|
-
return
|
|
53528
|
+
return _context28.stop();
|
|
53210
53529
|
}
|
|
53211
|
-
},
|
|
53530
|
+
}, _callee28, this);
|
|
53212
53531
|
}));
|
|
53213
53532
|
function moveShelfItemToGrid(_x75, _x76, _x77, _x78, _x79) {
|
|
53214
53533
|
return _moveShelfItemToGrid.apply(this, arguments);
|
|
@@ -53232,25 +53551,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53232
53551
|
}, {
|
|
53233
53552
|
key: "resetArticle",
|
|
53234
53553
|
value: function () {
|
|
53235
|
-
var _resetArticle = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
53554
|
+
var _resetArticle = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(basketId) {
|
|
53236
53555
|
var set;
|
|
53237
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
53238
|
-
while (1) switch (
|
|
53556
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee29$(_context29) {
|
|
53557
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
53239
53558
|
case 0:
|
|
53240
53559
|
set = this.actSet();
|
|
53241
53560
|
if (set) {
|
|
53242
|
-
|
|
53561
|
+
_context29.next = 3;
|
|
53243
53562
|
break;
|
|
53244
53563
|
}
|
|
53245
|
-
return
|
|
53564
|
+
return _context29.abrupt("return");
|
|
53246
53565
|
case 3:
|
|
53247
|
-
|
|
53566
|
+
_context29.next = 5;
|
|
53248
53567
|
return setHandlerInstance.resetArticle(set, basketId);
|
|
53249
53568
|
case 5:
|
|
53250
53569
|
case "end":
|
|
53251
|
-
return
|
|
53570
|
+
return _context29.stop();
|
|
53252
53571
|
}
|
|
53253
|
-
},
|
|
53572
|
+
}, _callee29, this);
|
|
53254
53573
|
}));
|
|
53255
53574
|
function resetArticle(_x80) {
|
|
53256
53575
|
return _resetArticle.apply(this, arguments);
|
|
@@ -53282,10 +53601,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53282
53601
|
}, {
|
|
53283
53602
|
key: "checkMatchingProducts",
|
|
53284
53603
|
value: function () {
|
|
53285
|
-
var _checkMatchingProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
53604
|
+
var _checkMatchingProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30(from) {
|
|
53286
53605
|
var set, _set$getMatchingProdu, _set$getMatchingOrigP, _set$getMatchingOrigP2, _set$getMatchingProdu2;
|
|
53287
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
53288
|
-
while (1) switch (
|
|
53606
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context30) {
|
|
53607
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
53289
53608
|
case 0:
|
|
53290
53609
|
set = this.actSet();
|
|
53291
53610
|
if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
@@ -53299,18 +53618,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53299
53618
|
}
|
|
53300
53619
|
}
|
|
53301
53620
|
if (!(set !== null && set !== void 0 && set.api.doCheckForProductsMatch())) {
|
|
53302
|
-
|
|
53621
|
+
_context30.next = 6;
|
|
53303
53622
|
break;
|
|
53304
53623
|
}
|
|
53305
|
-
|
|
53624
|
+
_context30.next = 5;
|
|
53306
53625
|
return productHandlerInstance.updateProducts(this.setsAsArray, this.api, this.divaBasketHandler.divaWWSHandler, from);
|
|
53307
53626
|
case 5:
|
|
53308
53627
|
this.updatePriceInView();
|
|
53309
53628
|
case 6:
|
|
53310
53629
|
case "end":
|
|
53311
|
-
return
|
|
53630
|
+
return _context30.stop();
|
|
53312
53631
|
}
|
|
53313
|
-
},
|
|
53632
|
+
}, _callee30, this);
|
|
53314
53633
|
}));
|
|
53315
53634
|
function checkMatchingProducts(_x81) {
|
|
53316
53635
|
return _checkMatchingProducts.apply(this, arguments);
|
|
@@ -53324,9 +53643,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53324
53643
|
}, {
|
|
53325
53644
|
key: "updatePriceInView",
|
|
53326
53645
|
value: function updatePriceInView() {
|
|
53327
|
-
var _this$
|
|
53328
|
-
(_this$
|
|
53329
|
-
(_this$
|
|
53646
|
+
var _this$view93, _this$view94, _this$actSet12, _this$actSet13;
|
|
53647
|
+
(_this$view93 = this.view) === null || _this$view93 === void 0 || _this$view93.updateBBox(setHandlerInstance.getBBoxObject(this.actSet()));
|
|
53648
|
+
(_this$view94 = this.view) === null || _this$view94 === void 0 || _this$view94.updatePrice(setHandlerInstance.getTotalViewPrice(this.sets), this.actSet().getViewSetPrice(), setHandlerInstance.getTotalViewBruttoPrice(this.sets), undefined, (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.getCustomDimensionsOfActSet(), (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.setHash);
|
|
53330
53649
|
}
|
|
53331
53650
|
|
|
53332
53651
|
/**
|
|
@@ -53389,7 +53708,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53389
53708
|
}, {
|
|
53390
53709
|
key: "saveToBasketWrapper",
|
|
53391
53710
|
value: function () {
|
|
53392
|
-
var _saveToBasketWrapper = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
53711
|
+
var _saveToBasketWrapper = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31(event, repairOnly, returnToParam, hideLoading) {
|
|
53393
53712
|
var _this$actions31,
|
|
53394
53713
|
_this$actions31$toggl,
|
|
53395
53714
|
_this$actions32,
|
|
@@ -53397,9 +53716,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53397
53716
|
_this4 = this,
|
|
53398
53717
|
_this$actions36,
|
|
53399
53718
|
_this$i18n18;
|
|
53400
|
-
var returnTo, finalEvent, result, _this$actions33, _this$i18n12, _this$i18n13, _this$actions34, _this$i18n14, _this$i18n15, _this$actions35, _this$i18n16, _this$i18n17, _this$
|
|
53401
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
53402
|
-
while (1) switch (
|
|
53719
|
+
var returnTo, finalEvent, result, _this$actions33, _this$i18n12, _this$i18n13, _this$actions34, _this$i18n14, _this$i18n15, _this$actions35, _this$i18n16, _this$i18n17, _this$view95;
|
|
53720
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee31$(_context31) {
|
|
53721
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
53403
53722
|
case 0:
|
|
53404
53723
|
returnTo = returnToParam !== null && returnToParam !== void 0 ? returnToParam : this.getReturnTo(event);
|
|
53405
53724
|
finalEvent = {
|
|
@@ -53407,13 +53726,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53407
53726
|
saveBasket: true
|
|
53408
53727
|
};
|
|
53409
53728
|
if (!hideLoading) (_this$actions31 = this.actions) === null || _this$actions31 === void 0 || (_this$actions31$toggl = _this$actions31.toggleLoading) === null || _this$actions31$toggl === void 0 || _this$actions31$toggl.call(_this$actions31, 'Planner_Saving', false, true);
|
|
53410
|
-
|
|
53729
|
+
_context31.next = 5;
|
|
53411
53730
|
return this.saveToBasket(returnTo, finalEvent.event, repairOnly);
|
|
53412
53731
|
case 5:
|
|
53413
|
-
result =
|
|
53732
|
+
result = _context31.sent;
|
|
53414
53733
|
if (!hideLoading) (_this$actions32 = this.actions) === null || _this$actions32 === void 0 || (_this$actions32$toggl = _this$actions32.toggleLoading) === null || _this$actions32$toggl === void 0 || _this$actions32$toggl.call(_this$actions32, 'Planner_Saving', false, false);
|
|
53415
53734
|
if (!(result === 'canceled')) {
|
|
53416
|
-
|
|
53735
|
+
_context31.next = 11;
|
|
53417
53736
|
break;
|
|
53418
53737
|
}
|
|
53419
53738
|
LOG$2.error(new DivaUtils.DivaError('failed to save Basket'));
|
|
@@ -53421,10 +53740,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53421
53740
|
text: ((_this$i18n12 = this.i18n()) === null || _this$i18n12 === void 0 ? void 0 : _this$i18n12.t('modal.general_error')) + ' --- ' + DivaUtils__default["default"].formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils__default["default"].getCurrentTraceId() ? ((_this$i18n13 = this.i18n()) === null || _this$i18n13 === void 0 ? void 0 : _this$i18n13.t('modal.errorcode')) + ': ' + DivaUtils__default["default"].getCurrentTraceId() : '',
|
|
53422
53741
|
accept: true
|
|
53423
53742
|
});
|
|
53424
|
-
return
|
|
53743
|
+
return _context31.abrupt("return", result);
|
|
53425
53744
|
case 11:
|
|
53426
|
-
|
|
53427
|
-
|
|
53745
|
+
_context31.t0 = returnTo;
|
|
53746
|
+
_context31.next = _context31.t0 === 'OPEN_PDF' ? 14 : _context31.t0 === 'SAVE_BASKET_WITH_MODAL' ? 16 : _context31.t0 === 'OPEN_CONTACT_FORM' ? 17 : 17;
|
|
53428
53747
|
break;
|
|
53429
53748
|
case 14:
|
|
53430
53749
|
if (!this.getBasket().PDFDocumentURL) {
|
|
@@ -53444,7 +53763,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53444
53763
|
}
|
|
53445
53764
|
});
|
|
53446
53765
|
}
|
|
53447
|
-
return
|
|
53766
|
+
return _context31.abrupt("break", 17);
|
|
53448
53767
|
case 16:
|
|
53449
53768
|
(_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.openModal({
|
|
53450
53769
|
text: (_this$i18n18 = this.i18n()) === null || _this$i18n18 === void 0 ? void 0 : _this$i18n18.t('modal.planning_saved'),
|
|
@@ -53452,18 +53771,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53452
53771
|
});
|
|
53453
53772
|
case 17:
|
|
53454
53773
|
if (!(result == 'noArticleToSave')) {
|
|
53455
|
-
|
|
53774
|
+
_context31.next = 20;
|
|
53456
53775
|
break;
|
|
53457
53776
|
}
|
|
53458
|
-
(_this$
|
|
53459
|
-
return
|
|
53777
|
+
(_this$view95 = this.view) === null || _this$view95 === void 0 || _this$view95.updatePlannerMsgContainer('NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
|
|
53778
|
+
return _context31.abrupt("return", 'canceled');
|
|
53460
53779
|
case 20:
|
|
53461
|
-
return
|
|
53780
|
+
return _context31.abrupt("return", result);
|
|
53462
53781
|
case 21:
|
|
53463
53782
|
case "end":
|
|
53464
|
-
return
|
|
53783
|
+
return _context31.stop();
|
|
53465
53784
|
}
|
|
53466
|
-
},
|
|
53785
|
+
}, _callee31, this);
|
|
53467
53786
|
}));
|
|
53468
53787
|
function saveToBasketWrapper(_x82, _x83, _x84, _x85) {
|
|
53469
53788
|
return _saveToBasketWrapper.apply(this, arguments);
|
|
@@ -53473,42 +53792,42 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53473
53792
|
}, {
|
|
53474
53793
|
key: "saveToBasket",
|
|
53475
53794
|
value: function () {
|
|
53476
|
-
var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
53795
|
+
var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee32(returnTo, event, repairOnly) {
|
|
53477
53796
|
var _returnTo, _returnTo2, _returnTo3, _this$actions37, _this$actions38, _this$divaBasketHandl4;
|
|
53478
53797
|
var set, actBasket, oldReturnTo, result, newDivaNr, _this$actSet14, arReady, _result, product;
|
|
53479
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
53480
|
-
while (1) switch (
|
|
53798
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee32$(_context32) {
|
|
53799
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
53481
53800
|
case 0:
|
|
53482
53801
|
set = this.actSet();
|
|
53483
53802
|
if (!setHandlerInstance.isNoArticleToSave(this.sets)) {
|
|
53484
|
-
|
|
53803
|
+
_context32.next = 3;
|
|
53485
53804
|
break;
|
|
53486
53805
|
}
|
|
53487
|
-
return
|
|
53806
|
+
return _context32.abrupt("return", 'noArticleToSave');
|
|
53488
53807
|
case 3:
|
|
53489
53808
|
actBasket = this.divaBasketHandler.actBasket;
|
|
53490
53809
|
if (!((_returnTo = returnTo) !== null && _returnTo !== void 0 && _returnTo.startsWith('FAVORITS') && favoritesHandlerInstance.FavoritesDefined(set))) {
|
|
53491
|
-
|
|
53810
|
+
_context32.next = 12;
|
|
53492
53811
|
break;
|
|
53493
53812
|
}
|
|
53494
53813
|
oldReturnTo = returnTo;
|
|
53495
53814
|
this.ReturnTo = returnTo.replace('FAVORITS_', '');
|
|
53496
|
-
|
|
53815
|
+
_context32.next = 9;
|
|
53497
53816
|
return this.handleFavorites('SAVE');
|
|
53498
53817
|
case 9:
|
|
53499
|
-
result =
|
|
53818
|
+
result = _context32.sent;
|
|
53500
53819
|
if (result === 'canceled') {
|
|
53501
53820
|
this.ReturnTo = oldReturnTo;
|
|
53502
53821
|
}
|
|
53503
|
-
return
|
|
53822
|
+
return _context32.abrupt("return", result);
|
|
53504
53823
|
case 12:
|
|
53505
|
-
|
|
53506
|
-
|
|
53507
|
-
|
|
53824
|
+
_context32.t0 = this.divaBasketHandler;
|
|
53825
|
+
_context32.t1 = this.divaBasketHandler.actDivaNr;
|
|
53826
|
+
_context32.next = 16;
|
|
53508
53827
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
|
|
53509
53828
|
case 16:
|
|
53510
|
-
|
|
53511
|
-
|
|
53829
|
+
_context32.t2 = _context32.sent;
|
|
53830
|
+
_context32.t0.setBasketData.call(_context32.t0, _context32.t1, _context32.t2);
|
|
53512
53831
|
if ((_returnTo2 = returnTo) !== null && _returnTo2 !== void 0 && _returnTo2.endsWith('OPEN_SELLER_BASKET')) {
|
|
53513
53832
|
this.ReturnTo = 'OPEN_SELLER_BASKET';
|
|
53514
53833
|
returnTo = this.ReturnTo;
|
|
@@ -53523,11 +53842,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53523
53842
|
this.divaBasketHandler.fillOrigConfigurations();
|
|
53524
53843
|
actBasket.Updated = Date.now();
|
|
53525
53844
|
if (!returnTo) {
|
|
53526
|
-
|
|
53845
|
+
_context32.next = 54;
|
|
53527
53846
|
break;
|
|
53528
53847
|
}
|
|
53529
|
-
|
|
53530
|
-
|
|
53848
|
+
_context32.t3 = returnTo;
|
|
53849
|
+
_context32.next = _context32.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 27 : _context32.t3 === 'OPEN_SELLER_BASKET' ? 29 : _context32.t3 === 'OPEN_PDF' ? 32 : _context32.t3 === 'SAVE_BASKET_WITH_MODAL' ? 32 : _context32.t3 === 'SAVE_BASKET' ? 32 : _context32.t3 === 'SAVE_BASKET_SYNC' ? 32 : _context32.t3 === 'SAVE_BASKET_ASYNC' ? 32 : 54;
|
|
53531
53850
|
break;
|
|
53532
53851
|
case 27:
|
|
53533
53852
|
(_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.openComponent({
|
|
@@ -53540,7 +53859,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53540
53859
|
basketData: actBasket
|
|
53541
53860
|
}
|
|
53542
53861
|
});
|
|
53543
|
-
return
|
|
53862
|
+
return _context32.abrupt("break", 54);
|
|
53544
53863
|
case 29:
|
|
53545
53864
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
53546
53865
|
actBasket.setDocumentVersion(actBasket.getDocumentVersion() + 1);
|
|
@@ -53555,26 +53874,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53555
53874
|
basketData: actBasket
|
|
53556
53875
|
}
|
|
53557
53876
|
});
|
|
53558
|
-
return
|
|
53877
|
+
return _context32.abrupt("break", 54);
|
|
53559
53878
|
case 32:
|
|
53560
53879
|
if (!(event == 'onSaveProduct')) {
|
|
53561
|
-
|
|
53880
|
+
_context32.next = 44;
|
|
53562
53881
|
break;
|
|
53563
53882
|
}
|
|
53564
|
-
|
|
53883
|
+
_context32.next = 35;
|
|
53565
53884
|
return setHandlerInstance.flushPendingUploadsViaMediaService(actBasket);
|
|
53566
53885
|
case 35:
|
|
53567
53886
|
//copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
|
|
53568
53887
|
actBasket = new basketModel.BasketData(JSON.parse(JSON.stringify(actBasket)));
|
|
53569
|
-
|
|
53888
|
+
_context32.next = 38;
|
|
53570
53889
|
return DivaUtils__default["default"].updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
|
|
53571
53890
|
case 38:
|
|
53572
|
-
|
|
53891
|
+
_context32.next = 40;
|
|
53573
53892
|
return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
|
|
53574
53893
|
case 40:
|
|
53575
|
-
newDivaNr =
|
|
53894
|
+
newDivaNr = _context32.sent;
|
|
53576
53895
|
actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
|
|
53577
|
-
|
|
53896
|
+
_context32.next = 53;
|
|
53578
53897
|
break;
|
|
53579
53898
|
case 44:
|
|
53580
53899
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
@@ -53584,30 +53903,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53584
53903
|
this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
|
|
53585
53904
|
actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
|
|
53586
53905
|
arReady = !!((_this$actSet14 = this.actSet()) !== null && _this$actSet14 !== void 0 && _this$actSet14.CatalogData.divaArReady);
|
|
53587
|
-
|
|
53906
|
+
_context32.next = 50;
|
|
53588
53907
|
return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo, arReady);
|
|
53589
53908
|
case 50:
|
|
53590
|
-
_result =
|
|
53909
|
+
_result = _context32.sent;
|
|
53591
53910
|
if (!(_result === 'ERROR_NO_BASKET_SAVED' || _result === 'ERROR_BASKET_AFTER_SAVE')) {
|
|
53592
|
-
|
|
53911
|
+
_context32.next = 53;
|
|
53593
53912
|
break;
|
|
53594
53913
|
}
|
|
53595
|
-
return
|
|
53914
|
+
return _context32.abrupt("return", 'canceled');
|
|
53596
53915
|
case 53:
|
|
53597
|
-
return
|
|
53916
|
+
return _context32.abrupt("break", 54);
|
|
53598
53917
|
case 54:
|
|
53599
53918
|
if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
|
|
53600
53919
|
actBasket = (_this$divaBasketHandl4 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : actBasket; //get pdf documenturl from saved basket
|
|
53601
|
-
|
|
53920
|
+
_context32.next = 58;
|
|
53602
53921
|
return this.addToBasket(actBasket, event);
|
|
53603
53922
|
case 58:
|
|
53604
|
-
product =
|
|
53605
|
-
return
|
|
53923
|
+
product = _context32.sent;
|
|
53924
|
+
return _context32.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
|
|
53606
53925
|
case 60:
|
|
53607
53926
|
case "end":
|
|
53608
|
-
return
|
|
53927
|
+
return _context32.stop();
|
|
53609
53928
|
}
|
|
53610
|
-
},
|
|
53929
|
+
}, _callee32, this);
|
|
53611
53930
|
}));
|
|
53612
53931
|
function saveToBasket(_x86, _x87, _x88) {
|
|
53613
53932
|
return _saveToBasket.apply(this, arguments);
|
|
@@ -53624,24 +53943,24 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53624
53943
|
}, {
|
|
53625
53944
|
key: "generateAiImageWithReferenceImages",
|
|
53626
53945
|
value: function () {
|
|
53627
|
-
var _generateAiImageWithReferenceImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
53946
|
+
var _generateAiImageWithReferenceImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee33(data, leadKey) {
|
|
53628
53947
|
var _this$actSet15, _this$state6, _this$actSet16;
|
|
53629
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
53630
|
-
while (1) switch (
|
|
53948
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee33$(_context33) {
|
|
53949
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
53631
53950
|
case 0:
|
|
53632
53951
|
(_this$actSet15 = this.actSet()) === null || _this$actSet15 === void 0 || _this$actSet15.CatalogData.catalogCodex;
|
|
53633
|
-
|
|
53952
|
+
_context33.next = 3;
|
|
53634
53953
|
return this.api.generateAiImageWithReferenceImages(_objectSpread$7(_objectSpread$7({}, data), {}, {
|
|
53635
53954
|
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,
|
|
53636
53955
|
catalogCodex: (_this$actSet16 = this.actSet()) === null || _this$actSet16 === void 0 ? void 0 : _this$actSet16.CatalogData.catalogCodex
|
|
53637
53956
|
}), leadKey);
|
|
53638
53957
|
case 3:
|
|
53639
|
-
return
|
|
53958
|
+
return _context33.abrupt("return", _context33.sent);
|
|
53640
53959
|
case 4:
|
|
53641
53960
|
case "end":
|
|
53642
|
-
return
|
|
53961
|
+
return _context33.stop();
|
|
53643
53962
|
}
|
|
53644
|
-
},
|
|
53963
|
+
}, _callee33, this);
|
|
53645
53964
|
}));
|
|
53646
53965
|
function generateAiImageWithReferenceImages(_x89, _x90) {
|
|
53647
53966
|
return _generateAiImageWithReferenceImages.apply(this, arguments);
|
|
@@ -53651,25 +53970,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53651
53970
|
}, {
|
|
53652
53971
|
key: "getUsageLimits",
|
|
53653
53972
|
value: function () {
|
|
53654
|
-
var _getUsageLimits = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
53973
|
+
var _getUsageLimits = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34() {
|
|
53655
53974
|
var _localStorage$getItem, _localStorage;
|
|
53656
53975
|
var leadKey;
|
|
53657
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
53658
|
-
while (1) switch (
|
|
53976
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee34$(_context34) {
|
|
53977
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
53659
53978
|
case 0:
|
|
53660
53979
|
// Get lead key from localStorage if it exists (for anonymous users)
|
|
53661
53980
|
leadKey = (_localStorage$getItem = (_localStorage = localStorage) === null || _localStorage === void 0 ? void 0 : _localStorage.getItem('diva_lead_key')) !== null && _localStorage$getItem !== void 0 ? _localStorage$getItem : undefined;
|
|
53662
|
-
|
|
53981
|
+
_context34.next = 3;
|
|
53663
53982
|
return this.api.getUsageLimits(leadKey ? {
|
|
53664
53983
|
leadKey: leadKey
|
|
53665
53984
|
} : undefined);
|
|
53666
53985
|
case 3:
|
|
53667
|
-
return
|
|
53986
|
+
return _context34.abrupt("return", _context34.sent);
|
|
53668
53987
|
case 4:
|
|
53669
53988
|
case "end":
|
|
53670
|
-
return
|
|
53989
|
+
return _context34.stop();
|
|
53671
53990
|
}
|
|
53672
|
-
},
|
|
53991
|
+
}, _callee34, this);
|
|
53673
53992
|
}));
|
|
53674
53993
|
function getUsageLimits() {
|
|
53675
53994
|
return _getUsageLimits.apply(this, arguments);
|
|
@@ -53698,23 +54017,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53698
54017
|
}, {
|
|
53699
54018
|
key: "getAiRoomRenderings",
|
|
53700
54019
|
value: function () {
|
|
53701
|
-
var _getAiRoomRenderings = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
54020
|
+
var _getAiRoomRenderings = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35() {
|
|
53702
54021
|
var _this$state7;
|
|
53703
54022
|
var organizationId, lang;
|
|
53704
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
53705
|
-
while (1) switch (
|
|
54023
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context35) {
|
|
54024
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
53706
54025
|
case 0:
|
|
53707
54026
|
organizationId = (_this$state7 = this.state) === null || _this$state7 === void 0 ? void 0 : _this$state7.organization._id;
|
|
53708
54027
|
lang = this.api.getLanguage();
|
|
53709
|
-
|
|
54028
|
+
_context35.next = 4;
|
|
53710
54029
|
return this.api.getAiRoomRenderings(organizationId, lang !== null && lang !== void 0 ? lang : undefined);
|
|
53711
54030
|
case 4:
|
|
53712
|
-
return
|
|
54031
|
+
return _context35.abrupt("return", _context35.sent);
|
|
53713
54032
|
case 5:
|
|
53714
54033
|
case "end":
|
|
53715
|
-
return
|
|
54034
|
+
return _context35.stop();
|
|
53716
54035
|
}
|
|
53717
|
-
},
|
|
54036
|
+
}, _callee35, this);
|
|
53718
54037
|
}));
|
|
53719
54038
|
function getAiRoomRenderings() {
|
|
53720
54039
|
return _getAiRoomRenderings.apply(this, arguments);
|
|
@@ -53724,19 +54043,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53724
54043
|
}, {
|
|
53725
54044
|
key: "createLeadKey",
|
|
53726
54045
|
value: function () {
|
|
53727
|
-
var _createLeadKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
53728
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
53729
|
-
while (1) switch (
|
|
54046
|
+
var _createLeadKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee36(email) {
|
|
54047
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee36$(_context36) {
|
|
54048
|
+
while (1) switch (_context36.prev = _context36.next) {
|
|
53730
54049
|
case 0:
|
|
53731
|
-
|
|
54050
|
+
_context36.next = 2;
|
|
53732
54051
|
return this.api.createLeadKey(email);
|
|
53733
54052
|
case 2:
|
|
53734
|
-
return
|
|
54053
|
+
return _context36.abrupt("return", _context36.sent);
|
|
53735
54054
|
case 3:
|
|
53736
54055
|
case "end":
|
|
53737
|
-
return
|
|
54056
|
+
return _context36.stop();
|
|
53738
54057
|
}
|
|
53739
|
-
},
|
|
54058
|
+
}, _callee36, this);
|
|
53740
54059
|
}));
|
|
53741
54060
|
function createLeadKey(_x91) {
|
|
53742
54061
|
return _createLeadKey.apply(this, arguments);
|
|
@@ -54042,23 +54361,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54042
54361
|
}, {
|
|
54043
54362
|
key: "getBasketDataWithEkText",
|
|
54044
54363
|
value: function () {
|
|
54045
|
-
var _getBasketDataWithEkText = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
54046
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
54047
|
-
while (1) switch (
|
|
54364
|
+
var _getBasketDataWithEkText = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee37() {
|
|
54365
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee37$(_context37) {
|
|
54366
|
+
while (1) switch (_context37.prev = _context37.next) {
|
|
54048
54367
|
case 0:
|
|
54049
|
-
|
|
54050
|
-
|
|
54051
|
-
|
|
54368
|
+
_context37.t0 = this.divaBasketHandler;
|
|
54369
|
+
_context37.t1 = this.divaBasketHandler.actDivaNr;
|
|
54370
|
+
_context37.next = 4;
|
|
54052
54371
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, true, this.doAllowSetPlanner(), this.ReturnTo);
|
|
54053
54372
|
case 4:
|
|
54054
|
-
|
|
54055
|
-
|
|
54056
|
-
return
|
|
54373
|
+
_context37.t2 = _context37.sent;
|
|
54374
|
+
_context37.t0.setBasketData.call(_context37.t0, _context37.t1, _context37.t2);
|
|
54375
|
+
return _context37.abrupt("return", this.divaBasketHandler.actBasket);
|
|
54057
54376
|
case 7:
|
|
54058
54377
|
case "end":
|
|
54059
|
-
return
|
|
54378
|
+
return _context37.stop();
|
|
54060
54379
|
}
|
|
54061
|
-
},
|
|
54380
|
+
}, _callee37, this);
|
|
54062
54381
|
}));
|
|
54063
54382
|
function getBasketDataWithEkText() {
|
|
54064
54383
|
return _getBasketDataWithEkText.apply(this, arguments);
|
|
@@ -54084,7 +54403,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54084
54403
|
}, {
|
|
54085
54404
|
key: "addToBasket",
|
|
54086
54405
|
value: function () {
|
|
54087
|
-
var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
54406
|
+
var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee38(actBasket) {
|
|
54088
54407
|
var _this$actions39,
|
|
54089
54408
|
_this$actions40,
|
|
54090
54409
|
_this$actions41,
|
|
@@ -54103,44 +54422,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54103
54422
|
to,
|
|
54104
54423
|
variants,
|
|
54105
54424
|
products,
|
|
54106
|
-
|
|
54107
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
54108
|
-
while (1) switch (
|
|
54425
|
+
_args38 = arguments;
|
|
54426
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee38$(_context38) {
|
|
54427
|
+
while (1) switch (_context38.prev = _context38.next) {
|
|
54109
54428
|
case 0:
|
|
54110
|
-
event =
|
|
54111
|
-
|
|
54112
|
-
|
|
54429
|
+
event = _args38.length > 1 && _args38[1] !== undefined ? _args38[1] : 'onAddToBasket';
|
|
54430
|
+
_context38.t0 = event;
|
|
54431
|
+
_context38.next = _context38.t0 === 'onWebPlanerPrint' ? 4 : _context38.t0 === 'onWebPlanerSave' ? 6 : _context38.t0 === 'onWebPlanerShare' ? 8 : _context38.t0 === 'onRequestConsulation' ? 10 : _context38.t0 === 'onSave' ? 12 : _context38.t0 === 'onSendEmail' ? 14 : _context38.t0 === 'onSaveProduct' ? 19 : _context38.t0 === 'dontSaveBasket' ? 26 : _context38.t0 === 'onAddToBasket' ? 26 : 28;
|
|
54113
54432
|
break;
|
|
54114
54433
|
case 4:
|
|
54115
54434
|
(_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
|
|
54116
54435
|
type: 'onWebPlanerPrint',
|
|
54117
54436
|
data: actBasket.getAsJson()
|
|
54118
54437
|
});
|
|
54119
|
-
return
|
|
54438
|
+
return _context38.abrupt("break", 30);
|
|
54120
54439
|
case 6:
|
|
54121
54440
|
(_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
|
|
54122
54441
|
type: 'onWebPlanerSave',
|
|
54123
54442
|
data: actBasket.getAsJson()
|
|
54124
54443
|
});
|
|
54125
|
-
return
|
|
54444
|
+
return _context38.abrupt("break", 30);
|
|
54126
54445
|
case 8:
|
|
54127
54446
|
(_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
|
|
54128
54447
|
type: 'onWebPlanerShare',
|
|
54129
54448
|
data: actBasket.getAsJson()
|
|
54130
54449
|
});
|
|
54131
|
-
return
|
|
54450
|
+
return _context38.abrupt("break", 30);
|
|
54132
54451
|
case 10:
|
|
54133
54452
|
(_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
|
|
54134
54453
|
type: 'onRequestConsulation',
|
|
54135
54454
|
data: actBasket.getAsJson()
|
|
54136
54455
|
});
|
|
54137
|
-
return
|
|
54456
|
+
return _context38.abrupt("break", 30);
|
|
54138
54457
|
case 12:
|
|
54139
54458
|
(_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
|
|
54140
54459
|
type: 'onSave',
|
|
54141
54460
|
data: actBasket.getAsJson()
|
|
54142
54461
|
});
|
|
54143
|
-
return
|
|
54462
|
+
return _context38.abrupt("break", 30);
|
|
54144
54463
|
case 14:
|
|
54145
54464
|
emailConfig = (_this$divaBasketHandl6 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl6 !== void 0 ? _this$divaBasketHandl6 : this.getEmailConfig(); //reset the emailConfig
|
|
54146
54465
|
this.divaBasketHandler.emailConfig = undefined;
|
|
@@ -54175,41 +54494,41 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54175
54494
|
type: 'onAddToBasket',
|
|
54176
54495
|
data: actBasket.getAsJson()
|
|
54177
54496
|
});
|
|
54178
|
-
return
|
|
54497
|
+
return _context38.abrupt("break", 30);
|
|
54179
54498
|
case 19:
|
|
54180
54499
|
this.actSet().CatalogData;
|
|
54181
|
-
|
|
54500
|
+
_context38.next = 22;
|
|
54182
54501
|
return this.api.saveAsProduct(this.sets, actBasket);
|
|
54183
54502
|
case 22:
|
|
54184
|
-
products =
|
|
54503
|
+
products = _context38.sent;
|
|
54185
54504
|
(_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.onEvent({
|
|
54186
54505
|
type: 'onAddToBasket',
|
|
54187
54506
|
data: actBasket.getAsJson()
|
|
54188
54507
|
});
|
|
54189
54508
|
if (!products) {
|
|
54190
|
-
|
|
54509
|
+
_context38.next = 26;
|
|
54191
54510
|
break;
|
|
54192
54511
|
}
|
|
54193
|
-
return
|
|
54512
|
+
return _context38.abrupt("return", products[0]);
|
|
54194
54513
|
case 26:
|
|
54195
54514
|
(_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.onEvent({
|
|
54196
54515
|
type: 'onAddToBasket',
|
|
54197
54516
|
data: actBasket.getAsJson()
|
|
54198
54517
|
});
|
|
54199
|
-
return
|
|
54518
|
+
return _context38.abrupt("break", 30);
|
|
54200
54519
|
case 28:
|
|
54201
54520
|
(_this$actions47 = this.actions) === null || _this$actions47 === void 0 || _this$actions47.onEvent({
|
|
54202
54521
|
type: event,
|
|
54203
54522
|
data: actBasket.getAsJson()
|
|
54204
54523
|
});
|
|
54205
|
-
return
|
|
54524
|
+
return _context38.abrupt("break", 30);
|
|
54206
54525
|
case 30:
|
|
54207
|
-
return
|
|
54526
|
+
return _context38.abrupt("return");
|
|
54208
54527
|
case 31:
|
|
54209
54528
|
case "end":
|
|
54210
|
-
return
|
|
54529
|
+
return _context38.stop();
|
|
54211
54530
|
}
|
|
54212
|
-
},
|
|
54531
|
+
}, _callee38, this);
|
|
54213
54532
|
}));
|
|
54214
54533
|
function addToBasket(_x92) {
|
|
54215
54534
|
return _addToBasket.apply(this, arguments);
|
|
@@ -54266,26 +54585,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54266
54585
|
}, {
|
|
54267
54586
|
key: "getCurrentBasket",
|
|
54268
54587
|
value: function () {
|
|
54269
|
-
var _getCurrentBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
54270
|
-
var _this$actSet45, _this$divaBasketHandl7, _this$
|
|
54271
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
54272
|
-
while (1) switch (
|
|
54588
|
+
var _getCurrentBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee39(event, force, returnTo, dontGoToSummary, hideLoading) {
|
|
54589
|
+
var _this$actSet45, _this$divaBasketHandl7, _this$view96;
|
|
54590
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee39$(_context39) {
|
|
54591
|
+
while (1) switch (_context39.prev = _context39.next) {
|
|
54273
54592
|
case 0:
|
|
54274
54593
|
if (!(this.divaBasketHandler.basketWasSavedWithCurrentDocVersion && ((_this$actSet45 = this.actSet()) === null || _this$actSet45 === void 0 ? void 0 : _this$actSet45.setHash) === ((_this$divaBasketHandl7 = this.divaBasketHandler.actBasket) === null || _this$divaBasketHandl7 === void 0 || (_this$divaBasketHandl7 = _this$divaBasketHandl7.OrderSets) === null || _this$divaBasketHandl7 === void 0 ? void 0 : _this$divaBasketHandl7[0].SetHash) && !(returnTo !== null && returnTo !== void 0 && returnTo.includes('OPEN')))) {
|
|
54275
|
-
|
|
54594
|
+
_context39.next = 2;
|
|
54276
54595
|
break;
|
|
54277
54596
|
}
|
|
54278
|
-
return
|
|
54597
|
+
return _context39.abrupt("return", 'BASKET_ALREADY_SAVED');
|
|
54279
54598
|
case 2:
|
|
54280
|
-
|
|
54281
|
-
return (_this$
|
|
54599
|
+
_context39.next = 4;
|
|
54600
|
+
return (_this$view96 = this.view) === null || _this$view96 === void 0 ? void 0 : _this$view96.onClickAddToBasket(undefined, event, force, returnTo, dontGoToSummary, hideLoading);
|
|
54282
54601
|
case 4:
|
|
54283
|
-
return
|
|
54602
|
+
return _context39.abrupt("return", !!_context39.sent);
|
|
54284
54603
|
case 5:
|
|
54285
54604
|
case "end":
|
|
54286
|
-
return
|
|
54605
|
+
return _context39.stop();
|
|
54287
54606
|
}
|
|
54288
|
-
},
|
|
54607
|
+
}, _callee39, this);
|
|
54289
54608
|
}));
|
|
54290
54609
|
function getCurrentBasket(_x93, _x94, _x95, _x96, _x97) {
|
|
54291
54610
|
return _getCurrentBasket.apply(this, arguments);
|
|
@@ -54332,9 +54651,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54332
54651
|
}, {
|
|
54333
54652
|
key: "revealConfigStepInView",
|
|
54334
54653
|
value: function revealConfigStepInView(configStepKey, optionValueCodex) {
|
|
54335
|
-
var _this$
|
|
54336
|
-
(_this$
|
|
54337
|
-
if (optionValueCodex) (_this$
|
|
54654
|
+
var _this$view97, _this$view98;
|
|
54655
|
+
(_this$view97 = this.view) === null || _this$view97 === void 0 || _this$view97.navigateToConfigStep(configStepKey, false);
|
|
54656
|
+
if (optionValueCodex) (_this$view98 = this.view) === null || _this$view98 === void 0 || _this$view98.scrollToOptionValueInView(configStepKey, optionValueCodex);
|
|
54338
54657
|
}
|
|
54339
54658
|
|
|
54340
54659
|
/***********************************Outside events the webPlanner subscribes to ******************************************/
|
|
@@ -54354,9 +54673,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54354
54673
|
key: "initApiForLogicOnly",
|
|
54355
54674
|
value: //just for testing purposes
|
|
54356
54675
|
function () {
|
|
54357
|
-
var _initApiForLogicOnly = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
54358
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
54359
|
-
while (1) switch (
|
|
54676
|
+
var _initApiForLogicOnly = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee40(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
|
|
54677
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee40$(_context40) {
|
|
54678
|
+
while (1) switch (_context40.prev = _context40.next) {
|
|
54360
54679
|
case 0:
|
|
54361
54680
|
//empty services
|
|
54362
54681
|
this.api = new DivaApiHandler(_objectSpread$7(_objectSpread$7({}, this.plannerConfig), {}, {
|
|
@@ -54369,16 +54688,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54369
54688
|
jwt: jwt,
|
|
54370
54689
|
apiKey: apiKey
|
|
54371
54690
|
}), handler);
|
|
54372
|
-
|
|
54691
|
+
_context40.next = 3;
|
|
54373
54692
|
return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
|
|
54374
54693
|
case 3:
|
|
54375
54694
|
this.plannerHandler = new DivaPlannerHandler(true);
|
|
54376
54695
|
if (this.strictArtifactGeneration) this.plannerHandler.setStrictArtifactGeneration(true);
|
|
54377
54696
|
case 5:
|
|
54378
54697
|
case "end":
|
|
54379
|
-
return
|
|
54698
|
+
return _context40.stop();
|
|
54380
54699
|
}
|
|
54381
|
-
},
|
|
54700
|
+
}, _callee40, this);
|
|
54382
54701
|
}));
|
|
54383
54702
|
function initApiForLogicOnly(_x98, _x99, _x100, _x101, _x102, _x103, _x104) {
|
|
54384
54703
|
return _initApiForLogicOnly.apply(this, arguments);
|
|
@@ -54393,16 +54712,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54393
54712
|
}, {
|
|
54394
54713
|
key: "loadBasket",
|
|
54395
54714
|
value: function () {
|
|
54396
|
-
var _loadBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
54397
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
54398
|
-
while (1) switch (
|
|
54715
|
+
var _loadBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee41() {
|
|
54716
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee41$(_context41) {
|
|
54717
|
+
while (1) switch (_context41.prev = _context41.next) {
|
|
54399
54718
|
case 0:
|
|
54400
|
-
return
|
|
54719
|
+
return _context41.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
|
|
54401
54720
|
case 1:
|
|
54402
54721
|
case "end":
|
|
54403
|
-
return
|
|
54722
|
+
return _context41.stop();
|
|
54404
54723
|
}
|
|
54405
|
-
},
|
|
54724
|
+
}, _callee41, this);
|
|
54406
54725
|
}));
|
|
54407
54726
|
function loadBasket() {
|
|
54408
54727
|
return _loadBasket.apply(this, arguments);
|
|
@@ -54417,39 +54736,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54417
54736
|
}, {
|
|
54418
54737
|
key: "initBasket",
|
|
54419
54738
|
value: function () {
|
|
54420
|
-
var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
54739
|
+
var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee42(init3D, ignoreFavorites) {
|
|
54421
54740
|
var initSetState, set, basket;
|
|
54422
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
54423
|
-
while (1) switch (
|
|
54741
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee42$(_context42) {
|
|
54742
|
+
while (1) switch (_context42.prev = _context42.next) {
|
|
54424
54743
|
case 0:
|
|
54425
54744
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
54426
54745
|
initSetState = this.getInitStateForSet(!init3D);
|
|
54427
|
-
|
|
54746
|
+
_context42.next = 4;
|
|
54428
54747
|
return this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
54429
54748
|
case 4:
|
|
54430
|
-
|
|
54749
|
+
_context42.next = 6;
|
|
54431
54750
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
54432
54751
|
case 6:
|
|
54433
54752
|
//TODO check if when basket gets repaired the product match gets called
|
|
54434
54753
|
set = this.actSet();
|
|
54435
54754
|
setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
|
|
54436
54755
|
if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
|
|
54437
|
-
|
|
54756
|
+
_context42.next = 11;
|
|
54438
54757
|
break;
|
|
54439
54758
|
}
|
|
54440
|
-
|
|
54759
|
+
_context42.next = 11;
|
|
54441
54760
|
return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
|
|
54442
54761
|
case 11:
|
|
54443
|
-
|
|
54762
|
+
_context42.next = 13;
|
|
54444
54763
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
|
|
54445
54764
|
case 13:
|
|
54446
|
-
basket =
|
|
54447
|
-
return
|
|
54765
|
+
basket = _context42.sent;
|
|
54766
|
+
return _context42.abrupt("return", basket);
|
|
54448
54767
|
case 15:
|
|
54449
54768
|
case "end":
|
|
54450
|
-
return
|
|
54769
|
+
return _context42.stop();
|
|
54451
54770
|
}
|
|
54452
|
-
},
|
|
54771
|
+
}, _callee42, this);
|
|
54453
54772
|
}));
|
|
54454
54773
|
function initBasket(_x105, _x106) {
|
|
54455
54774
|
return _initBasket.apply(this, arguments);
|
|
@@ -54488,21 +54807,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54488
54807
|
}, {
|
|
54489
54808
|
key: "getValidVariantsLength",
|
|
54490
54809
|
value: function () {
|
|
54491
|
-
var _getValidVariantsLength = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
54810
|
+
var _getValidVariantsLength = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee43() {
|
|
54492
54811
|
var set;
|
|
54493
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
54494
|
-
while (1) switch (
|
|
54812
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee43$(_context43) {
|
|
54813
|
+
while (1) switch (_context43.prev = _context43.next) {
|
|
54495
54814
|
case 0:
|
|
54496
54815
|
set = this.actSet();
|
|
54497
|
-
|
|
54816
|
+
_context43.next = 3;
|
|
54498
54817
|
return favoritesHandlerInstance.getValidVariants(set, true);
|
|
54499
54818
|
case 3:
|
|
54500
|
-
return
|
|
54819
|
+
return _context43.abrupt("return", _context43.sent.length);
|
|
54501
54820
|
case 4:
|
|
54502
54821
|
case "end":
|
|
54503
|
-
return
|
|
54822
|
+
return _context43.stop();
|
|
54504
54823
|
}
|
|
54505
|
-
},
|
|
54824
|
+
}, _callee43, this);
|
|
54506
54825
|
}));
|
|
54507
54826
|
function getValidVariantsLength() {
|
|
54508
54827
|
return _getValidVariantsLength.apply(this, arguments);
|
|
@@ -54512,44 +54831,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54512
54831
|
}, {
|
|
54513
54832
|
key: "handleFavorites",
|
|
54514
54833
|
value: function () {
|
|
54515
|
-
var _handleFavorites = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
54834
|
+
var _handleFavorites = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee44(mode) {
|
|
54516
54835
|
var _this6 = this;
|
|
54517
54836
|
var set, i;
|
|
54518
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
54519
|
-
while (1) switch (
|
|
54837
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee44$(_context44) {
|
|
54838
|
+
while (1) switch (_context44.prev = _context44.next) {
|
|
54520
54839
|
case 0:
|
|
54521
54840
|
set = this.actSet();
|
|
54522
54841
|
i = 0;
|
|
54523
54842
|
case 2:
|
|
54524
54843
|
if (!favoritesHandlerInstance.IsCalcForSummary) {
|
|
54525
|
-
|
|
54844
|
+
_context44.next = 11;
|
|
54526
54845
|
break;
|
|
54527
54846
|
}
|
|
54528
|
-
|
|
54847
|
+
_context44.next = 5;
|
|
54529
54848
|
return DivaUtils__default["default"].Sleep(200);
|
|
54530
54849
|
case 5:
|
|
54531
54850
|
i++;
|
|
54532
54851
|
if (!(i > 1000)) {
|
|
54533
|
-
|
|
54852
|
+
_context44.next = 9;
|
|
54534
54853
|
break;
|
|
54535
54854
|
}
|
|
54536
54855
|
LOG$2.error(new DivaUtils.DivaError('error on generating Variants of Summary'));
|
|
54537
|
-
return
|
|
54856
|
+
return _context44.abrupt("break", 11);
|
|
54538
54857
|
case 9:
|
|
54539
|
-
|
|
54858
|
+
_context44.next = 2;
|
|
54540
54859
|
break;
|
|
54541
54860
|
case 11:
|
|
54542
|
-
|
|
54861
|
+
_context44.next = 13;
|
|
54543
54862
|
return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
|
|
54544
54863
|
return _this6.update2DGrid(set);
|
|
54545
54864
|
}, this.actions);
|
|
54546
54865
|
case 13:
|
|
54547
|
-
return
|
|
54866
|
+
return _context44.abrupt("return", _context44.sent);
|
|
54548
54867
|
case 14:
|
|
54549
54868
|
case "end":
|
|
54550
|
-
return
|
|
54869
|
+
return _context44.stop();
|
|
54551
54870
|
}
|
|
54552
|
-
},
|
|
54871
|
+
}, _callee44, this);
|
|
54553
54872
|
}));
|
|
54554
54873
|
function handleFavorites(_x107) {
|
|
54555
54874
|
return _handleFavorites.apply(this, arguments);
|
|
@@ -54564,46 +54883,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54564
54883
|
}, {
|
|
54565
54884
|
key: "initSapOrderLinesFromBasket",
|
|
54566
54885
|
value: function () {
|
|
54567
|
-
var _initSapOrderLinesFromBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
54886
|
+
var _initSapOrderLinesFromBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee45(divaNr, init3D, onlyLoadOldBakset) {
|
|
54568
54887
|
var result, oldBasket, basket;
|
|
54569
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
54570
|
-
while (1) switch (
|
|
54888
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee45$(_context45) {
|
|
54889
|
+
while (1) switch (_context45.prev = _context45.next) {
|
|
54571
54890
|
case 0:
|
|
54572
54891
|
if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
54573
|
-
|
|
54892
|
+
_context45.next = 3;
|
|
54574
54893
|
return this.loadBasket();
|
|
54575
54894
|
case 3:
|
|
54576
|
-
result =
|
|
54895
|
+
result = _context45.sent;
|
|
54577
54896
|
if (!onlyLoadOldBakset) {
|
|
54578
|
-
|
|
54897
|
+
_context45.next = 6;
|
|
54579
54898
|
break;
|
|
54580
54899
|
}
|
|
54581
|
-
return
|
|
54900
|
+
return _context45.abrupt("return", {
|
|
54582
54901
|
oldBasket: new basketModel.BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
|
|
54583
54902
|
cache: {}
|
|
54584
54903
|
});
|
|
54585
54904
|
case 6:
|
|
54586
54905
|
if (!(result === false)) {
|
|
54587
|
-
|
|
54906
|
+
_context45.next = 8;
|
|
54588
54907
|
break;
|
|
54589
54908
|
}
|
|
54590
54909
|
throw new Error('Could not load basket! ' + divaNr);
|
|
54591
54910
|
case 8:
|
|
54592
54911
|
oldBasket = new basketModel.BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
|
|
54593
|
-
|
|
54912
|
+
_context45.next = 11;
|
|
54594
54913
|
return this.initBasket(init3D);
|
|
54595
54914
|
case 11:
|
|
54596
|
-
basket =
|
|
54597
|
-
return
|
|
54915
|
+
basket = _context45.sent;
|
|
54916
|
+
return _context45.abrupt("return", {
|
|
54598
54917
|
basket: basket,
|
|
54599
54918
|
oldBasket: oldBasket,
|
|
54600
54919
|
cache: this.api.getJsonDataCache()
|
|
54601
54920
|
});
|
|
54602
54921
|
case 13:
|
|
54603
54922
|
case "end":
|
|
54604
|
-
return
|
|
54923
|
+
return _context45.stop();
|
|
54605
54924
|
}
|
|
54606
|
-
},
|
|
54925
|
+
}, _callee45, this);
|
|
54607
54926
|
}));
|
|
54608
54927
|
function initSapOrderLinesFromBasket(_x108, _x109, _x110) {
|
|
54609
54928
|
return _initSapOrderLinesFromBasket.apply(this, arguments);
|
|
@@ -73761,7 +74080,8 @@ function _runHeadlessArtifactPassBatch() {
|
|
|
73761
74080
|
}).filter(function (u) {
|
|
73762
74081
|
return !!u;
|
|
73763
74082
|
}),
|
|
73764
|
-
hqRenderScript: os.HQRenderScript || undefined
|
|
74083
|
+
hqRenderScript: os.HQRenderScript || undefined,
|
|
74084
|
+
glb: os.SetGlb || undefined
|
|
73765
74085
|
};
|
|
73766
74086
|
});
|
|
73767
74087
|
return _context2.abrupt("return", {
|