@crystaldesign/web-planner-logic 26.12.0-beta.1 → 26.12.0-beta.3
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-104200d4.js → DivaBoxPlanner-2c699ee3.js} +2 -2
- package/build/cjs/{DivaStandardPlanner-afd61e89.js → DivaStandardPlanner-3d6a05bc.js} +2 -2
- package/build/cjs/{DoorPlanner-58218b20.js → DoorPlanner-adda9c0d.js} +1 -1
- package/build/cjs/{Host3DSignalR-43cccc62.js → Host3DSignalR-6914541f.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-9ac1d546.js → LiviqueWWSHandler-635cffae.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-27d3c2f1.js → PfisterWWSHandler-d95419db.js} +1 -1
- package/build/cjs/{PlannerHandler2D-b9e0aa00.js → PlannerHandler2D-b76ba907.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-9225ef60.js → SeriousBasketHandler-777904e8.js} +1 -1
- package/build/cjs/{ShelfPlanner-89660e65.js → ShelfPlanner-5ffd15a2.js} +1 -1
- package/build/cjs/{StandardWWSHandler-eaf1106a.js → StandardWWSHandler-e92acae6.js} +1 -1
- package/build/cjs/{index-9279cd6b.js → index-d516d2b2.js} +1124 -795
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-49ca2254.js → DivaBoxPlanner-6f0727a3.js} +2 -2
- package/build/esm/{DivaStandardPlanner-5b1937df.js → DivaStandardPlanner-7188da61.js} +2 -2
- package/build/esm/{DoorPlanner-e5d456e3.js → DoorPlanner-74bcd21d.js} +1 -1
- package/build/esm/{Host3DSignalR-bf8a4afc.js → Host3DSignalR-bb6db8e6.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-1e537c0a.js → LiviqueWWSHandler-c4ba143d.js} +1 -1
- package/build/esm/{PfisterWWSHandler-6218f972.js → PfisterWWSHandler-41b7b1b7.js} +1 -1
- package/build/esm/{PlannerHandler2D-0e55412b.js → PlannerHandler2D-829ffceb.js} +1 -1
- package/build/esm/{SeriousBasketHandler-b534a712.js → SeriousBasketHandler-0bb8ee55.js} +1 -1
- package/build/esm/{ShelfPlanner-5062f0a3.js → ShelfPlanner-1406888d.js} +1 -1
- package/build/esm/{StandardWWSHandler-6c628e60.js → StandardWWSHandler-a8045129.js} +1 -1
- package/build/esm/{index-e11ba779.js → index-16a1a540.js} +1125 -796
- 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/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
|
@@ -8,7 +8,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
|
|
|
8
8
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
9
9
|
import axios$1 from 'axios';
|
|
10
10
|
import DivaUtils, { DivaError, md5, nanoid } from '@crystaldesign/diva-utils';
|
|
11
|
-
import { PriceObjectData, VariantItemData, JsonConfigPriceData, OrderLineData, CompactOrderLineData, GroupsData, Favorites, Favorite, ConfigVariantData, OrderSetData, BasketData } from '@crystaldesign/basket-model';
|
|
11
|
+
import { PriceObjectData, VariantItemData, JsonConfigPriceData, OrderLineData, CompactOrderLineData, GroupsData, Favorites, Favorite, ConfigVariantData, BASKET_UPLOAD_FUNCTION_TYPES, BASKET_UPLOAD_MEDIA_TYPES, OrderSetData, BasketData } from '@crystaldesign/basket-model';
|
|
12
12
|
import _typeof from '@babel/runtime/helpers/typeof';
|
|
13
13
|
import { XMLParser } from 'fast-xml-parser';
|
|
14
14
|
import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
|
|
@@ -17683,6 +17683,11 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17683
17683
|
get: function get() {
|
|
17684
17684
|
return this._catalogArticle.accPosPrio;
|
|
17685
17685
|
}
|
|
17686
|
+
}, {
|
|
17687
|
+
key: "sequenceNo",
|
|
17688
|
+
get: function get() {
|
|
17689
|
+
return this._catalogArticle.sequenceNo;
|
|
17690
|
+
}
|
|
17686
17691
|
}, {
|
|
17687
17692
|
key: "addAsZKAT",
|
|
17688
17693
|
get: function get() {
|
|
@@ -20030,7 +20035,7 @@ function loadMoreFromIDMArticles(_x, _x2) {
|
|
|
20030
20035
|
/** One additional-item reference of an item - the mandatory and optional sides of the same accessory merged. */
|
|
20031
20036
|
function _loadMoreFromIDMArticles() {
|
|
20032
20037
|
_loadMoreFromIDMArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(catalogArticleDatas, set) {
|
|
20033
|
-
var items, _loop3, i, toLoadDecisionIds, toLoadPFGroups, toLoadFeatureClassRefNo, promises, _yield$Promise$all, _yield$Promise$all2, featureClasses, priceFeatureGroups, decisions,
|
|
20038
|
+
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;
|
|
20034
20039
|
return _regeneratorRuntime.wrap(function _callee2$(_context8) {
|
|
20035
20040
|
while (1) switch (_context8.prev = _context8.next) {
|
|
20036
20041
|
case 0:
|
|
@@ -20094,8 +20099,8 @@ function _loadMoreFromIDMArticles() {
|
|
|
20094
20099
|
priceFeatureGroups = _yield$Promise$all2[1];
|
|
20095
20100
|
decisions = _yield$Promise$all2[2];
|
|
20096
20101
|
if (decisions) {
|
|
20097
|
-
for (
|
|
20098
|
-
set.CatalogData.loadedDecisions.push(initializeDecision(decisions[
|
|
20102
|
+
for (_i5 = 0; _i5 < decisions.length; _i5++) {
|
|
20103
|
+
set.CatalogData.loadedDecisions.push(initializeDecision(decisions[_i5], set.CatalogData.idmOptionGroups));
|
|
20099
20104
|
}
|
|
20100
20105
|
}
|
|
20101
20106
|
if (!(toLoadDecisionIds.length !== 0 && toLoadDecisionIds.length != (decisions === null || decisions === void 0 ? void 0 : decisions.length))) {
|
|
@@ -20114,8 +20119,8 @@ function _loadMoreFromIDMArticles() {
|
|
|
20114
20119
|
return loadDecisionsReferencedByActions(set);
|
|
20115
20120
|
case 28:
|
|
20116
20121
|
if (priceFeatureGroups) {
|
|
20117
|
-
for (
|
|
20118
|
-
set.CatalogData.loadedPriceFeaturegroups.push(initializePriceFeatureGroups(priceFeatureGroups[
|
|
20122
|
+
for (_i6 = 0; _i6 < priceFeatureGroups.length; _i6++) {
|
|
20123
|
+
set.CatalogData.loadedPriceFeaturegroups.push(initializePriceFeatureGroups(priceFeatureGroups[_i6], set.CatalogData.idmOptionGroups));
|
|
20119
20124
|
}
|
|
20120
20125
|
}
|
|
20121
20126
|
_iterator6 = _createForOfIteratorHelper$j(toLoadPFGroups);
|
|
@@ -20175,8 +20180,8 @@ function _loadMoreFromIDMArticles() {
|
|
|
20175
20180
|
_iterator6.f();
|
|
20176
20181
|
return _context8.finish(44);
|
|
20177
20182
|
case 47:
|
|
20178
|
-
for (
|
|
20179
|
-
catalogArticleData = catalogArticleDatas[
|
|
20183
|
+
for (_i7 = 0; _i7 < catalogArticleDatas.length; _i7++) {
|
|
20184
|
+
catalogArticleData = catalogArticleDatas[_i7];
|
|
20180
20185
|
catalogArticleData.articleIDMDecisions = sortDecisions(set.CatalogData.getDecisionsByNo(_toConsumableArray(new Set([].concat(_toConsumableArray(set.CatalogData.globalDecisions.map(function (g) {
|
|
20181
20186
|
return g.decisionNo;
|
|
20182
20187
|
})), _toConsumableArray(set.CatalogData.serieDecisionRefs), _toConsumableArray((_catalogArticleData$d2 = catalogArticleData.decisionsRefs) !== null && _catalogArticleData$d2 !== void 0 ? _catalogArticleData$d2 : []))))));
|
|
@@ -20198,7 +20203,7 @@ function _loadMoreFromIDMArticles() {
|
|
|
20198
20203
|
return _regeneratorRuntime.wrap(function _loop4$(_context3) {
|
|
20199
20204
|
while (1) switch (_context3.prev = _context3.next) {
|
|
20200
20205
|
case 0:
|
|
20201
|
-
feature = features[
|
|
20206
|
+
feature = features[_i8];
|
|
20202
20207
|
insertIndex = set.CatalogData.loadedFeatures.length;
|
|
20203
20208
|
k = 0;
|
|
20204
20209
|
case 3:
|
|
@@ -20272,15 +20277,15 @@ function _loadMoreFromIDMArticles() {
|
|
|
20272
20277
|
}
|
|
20273
20278
|
}, _loop4);
|
|
20274
20279
|
});
|
|
20275
|
-
|
|
20280
|
+
_i8 = 0;
|
|
20276
20281
|
case 56:
|
|
20277
|
-
if (!(
|
|
20282
|
+
if (!(_i8 < features.length)) {
|
|
20278
20283
|
_context8.next = 61;
|
|
20279
20284
|
break;
|
|
20280
20285
|
}
|
|
20281
20286
|
return _context8.delegateYield(_loop4(), "t3", 58);
|
|
20282
20287
|
case 58:
|
|
20283
|
-
|
|
20288
|
+
_i8++;
|
|
20284
20289
|
_context8.next = 56;
|
|
20285
20290
|
break;
|
|
20286
20291
|
case 61:
|
|
@@ -20347,7 +20352,7 @@ function _loadMoreFromIDMArticles() {
|
|
|
20347
20352
|
return _regeneratorRuntime.wrap(function _loop6$(_context7) {
|
|
20348
20353
|
while (1) switch (_context7.prev = _context7.next) {
|
|
20349
20354
|
case 0:
|
|
20350
|
-
catalogArticleData = catalogArticleDatas[
|
|
20355
|
+
catalogArticleData = catalogArticleDatas[_i9];
|
|
20351
20356
|
featureClass = featureClasses.find(function (fc) {
|
|
20352
20357
|
return fc.featureClassNo == catalogArticleData.featureClassRefNo;
|
|
20353
20358
|
});
|
|
@@ -20367,15 +20372,15 @@ function _loadMoreFromIDMArticles() {
|
|
|
20367
20372
|
}
|
|
20368
20373
|
}, _loop6);
|
|
20369
20374
|
});
|
|
20370
|
-
|
|
20375
|
+
_i9 = 0;
|
|
20371
20376
|
case 81:
|
|
20372
|
-
if (!(
|
|
20377
|
+
if (!(_i9 < catalogArticleDatas.length)) {
|
|
20373
20378
|
_context8.next = 86;
|
|
20374
20379
|
break;
|
|
20375
20380
|
}
|
|
20376
20381
|
return _context8.delegateYield(_loop6(), "t6", 83);
|
|
20377
20382
|
case 83:
|
|
20378
|
-
|
|
20383
|
+
_i9++;
|
|
20379
20384
|
_context8.next = 81;
|
|
20380
20385
|
break;
|
|
20381
20386
|
case 86:
|
|
@@ -20448,48 +20453,63 @@ function initIDMArticleRelations(item, catalogArticleData, catalog) {
|
|
|
20448
20453
|
var refs = readAdditionalItemRefs(item);
|
|
20449
20454
|
if (!refs.length) return;
|
|
20450
20455
|
catalogArticle.articleRelations = [];
|
|
20456
|
+
var accessories = [];
|
|
20451
20457
|
for (var i = 0; i < refs.length; i++) {
|
|
20452
|
-
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;
|
|
20453
20458
|
var ref = refs[i];
|
|
20454
20459
|
// accessories of another serie are not part of this catalog's articles
|
|
20455
20460
|
if (ref.serieNo != catalog.catalogCodex) continue;
|
|
20456
20461
|
var accessory = catalog.getCatalogArticle(ref.typeNo);
|
|
20457
20462
|
if (!accessory || accessory.isHidden) continue;
|
|
20463
|
+
accessories.push({
|
|
20464
|
+
ref: ref,
|
|
20465
|
+
accessory: accessory
|
|
20466
|
+
});
|
|
20467
|
+
}
|
|
20468
|
+
// the IDM sequence number of the accessory orders the list; without one the additional-item groups' order stays
|
|
20469
|
+
accessories.sort(function (a, b) {
|
|
20470
|
+
var _a$accessory$sequence, _b$accessory$sequence;
|
|
20471
|
+
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);
|
|
20472
|
+
});
|
|
20473
|
+
for (var _i = 0, _accessories = accessories; _i < _accessories.length; _i++) {
|
|
20474
|
+
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;
|
|
20475
|
+
var _accessories$_i = _accessories[_i],
|
|
20476
|
+
_ref2 = _accessories$_i.ref,
|
|
20477
|
+
_accessory = _accessories$_i.accessory;
|
|
20458
20478
|
catalogArticle.articleRelations.push({
|
|
20459
|
-
name:
|
|
20479
|
+
name: _accessory.name,
|
|
20460
20480
|
actQuantity: 0,
|
|
20461
|
-
minQuantity: (
|
|
20481
|
+
minQuantity: (_ref2$mandatoryQuanti = _ref2.mandatoryQuantity) !== null && _ref2$mandatoryQuanti !== void 0 ? _ref2$mandatoryQuanti : 0,
|
|
20462
20482
|
// 0 = no cap, like a diva relation without a MaxQuantity
|
|
20463
|
-
maxQuantity: (
|
|
20464
|
-
price: !catalog.dontShowBasePrice ?
|
|
20465
|
-
articleCodex:
|
|
20466
|
-
catalogCodex:
|
|
20467
|
-
longDescription:
|
|
20468
|
-
positionGroupNr:
|
|
20469
|
-
typeNr:
|
|
20470
|
-
image:
|
|
20483
|
+
maxQuantity: (_ref2$optionalQuantit = _ref2.optionalQuantity) !== null && _ref2$optionalQuantit !== void 0 ? _ref2$optionalQuantit : 0,
|
|
20484
|
+
price: !catalog.dontShowBasePrice ? _accessory.articlePrice : 0,
|
|
20485
|
+
articleCodex: _ref2.typeNo,
|
|
20486
|
+
catalogCodex: _ref2.serieNo,
|
|
20487
|
+
longDescription: _accessory.longDescription,
|
|
20488
|
+
positionGroupNr: _ref2.setNo,
|
|
20489
|
+
typeNr: _accessory.typeNr,
|
|
20490
|
+
image: _accessory.image ? catalog.getCatImageURL(_accessory.image, '') : undefined,
|
|
20471
20491
|
//accessoires are only PlannerElements if the have an SVG with dockingpossibilities (AVO/ AVU/ AVC)
|
|
20472
|
-
isPlannerElement:
|
|
20473
|
-
hasAVC: ((_accessory$catalogPla2 = (_accessory$catalogPla3 =
|
|
20474
|
-
hasAVO: ((_accessory$catalogPla4 = (_accessory$catalogPla5 =
|
|
20475
|
-
hasAVU: ((_accessory$catalogPla6 = (_accessory$catalogPla7 =
|
|
20476
|
-
hasAVN: ((_accessory$catalogPla8 = (_accessory$catalogPla9 =
|
|
20477
|
-
hasAVS: ((_accessory$catalogPla10 = (_accessory$catalogPla11 =
|
|
20478
|
-
width:
|
|
20479
|
-
height:
|
|
20480
|
-
depth:
|
|
20481
|
-
widthFrom:
|
|
20482
|
-
heightFrom:
|
|
20483
|
-
depthFrom:
|
|
20484
|
-
widthTo:
|
|
20485
|
-
heightTo:
|
|
20486
|
-
depthTo:
|
|
20492
|
+
isPlannerElement: _accessory.hasCatalogPlannerArticle && !!((_accessory$catalogPla = _accessory.catalogPlannerArticle) !== null && _accessory$catalogPla !== void 0 && _accessory$catalogPla.isDockable || catalog.accessorieStepAsPlanner),
|
|
20493
|
+
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,
|
|
20494
|
+
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,
|
|
20495
|
+
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,
|
|
20496
|
+
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,
|
|
20497
|
+
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,
|
|
20498
|
+
width: _accessory.width,
|
|
20499
|
+
height: _accessory.height,
|
|
20500
|
+
depth: _accessory.depth,
|
|
20501
|
+
widthFrom: _accessory.widthFrom,
|
|
20502
|
+
heightFrom: _accessory.heightFrom,
|
|
20503
|
+
depthFrom: _accessory.depthFrom,
|
|
20504
|
+
widthTo: _accessory.widthTo,
|
|
20505
|
+
heightTo: _accessory.heightTo,
|
|
20506
|
+
depthTo: _accessory.depthTo,
|
|
20487
20507
|
formattedSize: '',
|
|
20488
|
-
isVisualized:
|
|
20508
|
+
isVisualized: _accessory.isVisualized,
|
|
20489
20509
|
configStepKeys: [],
|
|
20490
|
-
metaData:
|
|
20491
|
-
contentItemId:
|
|
20492
|
-
groupContentItemId:
|
|
20510
|
+
metaData: _accessory.metaDataView,
|
|
20511
|
+
contentItemId: _accessory.contentItemId,
|
|
20512
|
+
groupContentItemId: _accessory.groupContentItemId
|
|
20493
20513
|
});
|
|
20494
20514
|
}
|
|
20495
20515
|
catalogArticle.hasArticleRelations = catalogArticle.articleRelations.length > 0;
|
|
@@ -20512,7 +20532,7 @@ var fetchDecisions = function fetchDecisions(set, decisionNos) {
|
|
|
20512
20532
|
* apply while that action matches. References are followed transitively.
|
|
20513
20533
|
*/
|
|
20514
20534
|
var loadDecisionsReferencedByActions = /*#__PURE__*/function () {
|
|
20515
|
-
var
|
|
20535
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(set) {
|
|
20516
20536
|
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;
|
|
20517
20537
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
20518
20538
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -20591,7 +20611,7 @@ var loadDecisionsReferencedByActions = /*#__PURE__*/function () {
|
|
|
20591
20611
|
}, _callee);
|
|
20592
20612
|
}));
|
|
20593
20613
|
return function loadDecisionsReferencedByActions(_x3) {
|
|
20594
|
-
return
|
|
20614
|
+
return _ref3.apply(this, arguments);
|
|
20595
20615
|
};
|
|
20596
20616
|
}();
|
|
20597
20617
|
var getToLoadDecisionIds = function getToLoadDecisionIds(catalogArticleDatas, set) {
|
|
@@ -20612,10 +20632,10 @@ var getToLoadDecisionIds = function getToLoadDecisionIds(catalogArticleDatas, se
|
|
|
20612
20632
|
return g.decisionNo;
|
|
20613
20633
|
})), _toConsumableArray(set.CatalogData.serieDecisionRefs), _toConsumableArray(allArticleDecisions))));
|
|
20614
20634
|
var toLoadDecisionIds = [];
|
|
20615
|
-
for (var
|
|
20616
|
-
var found = set.CatalogData.getDecisionByNo(neededDecisionsIds[
|
|
20635
|
+
for (var _i2 = 0; _i2 < neededDecisionsIds.length; _i2++) {
|
|
20636
|
+
var found = set.CatalogData.getDecisionByNo(neededDecisionsIds[_i2]);
|
|
20617
20637
|
if (found) ; else {
|
|
20618
|
-
toLoadDecisionIds.push(neededDecisionsIds[
|
|
20638
|
+
toLoadDecisionIds.push(neededDecisionsIds[_i2]);
|
|
20619
20639
|
}
|
|
20620
20640
|
}
|
|
20621
20641
|
return toLoadDecisionIds;
|
|
@@ -20630,18 +20650,18 @@ var getFeatures = function getFeatures(set, featureClasses) {
|
|
|
20630
20650
|
var alreadyLoadedFeatures = set.CatalogData.loadedFeatures;
|
|
20631
20651
|
var toLoadFeatures = [];
|
|
20632
20652
|
var loadedFeatures = [];
|
|
20633
|
-
var _loop = function _loop(
|
|
20653
|
+
var _loop = function _loop(_i3) {
|
|
20634
20654
|
var found = alreadyLoadedFeatures.find(function (f) {
|
|
20635
|
-
return f.featureNo == neededFeatures[
|
|
20655
|
+
return f.featureNo == neededFeatures[_i3];
|
|
20636
20656
|
});
|
|
20637
20657
|
if (found) {
|
|
20638
20658
|
loadedFeatures.push(found);
|
|
20639
20659
|
} else {
|
|
20640
|
-
toLoadFeatures.push(neededFeatures[
|
|
20660
|
+
toLoadFeatures.push(neededFeatures[_i3]);
|
|
20641
20661
|
}
|
|
20642
20662
|
};
|
|
20643
|
-
for (var
|
|
20644
|
-
_loop(
|
|
20663
|
+
for (var _i3 = 0; _i3 < neededFeatures.length; _i3++) {
|
|
20664
|
+
_loop(_i3);
|
|
20645
20665
|
}
|
|
20646
20666
|
LOG$l.debug('features already loaded dont get again from api: ' + loadedFeatures.length);
|
|
20647
20667
|
return toLoadFeatures;
|
|
@@ -20663,10 +20683,10 @@ var getPriceFeatureGroups = function getPriceFeatureGroups(catalogArticleDatas,
|
|
|
20663
20683
|
}
|
|
20664
20684
|
var toLoadPriceFeatureGroups = [];
|
|
20665
20685
|
neededPriceFeatureGroupNos = _toConsumableArray(new Set(neededPriceFeatureGroupNos));
|
|
20666
|
-
for (var
|
|
20667
|
-
var found = set.CatalogData.getPricefeaturegroup(neededPriceFeatureGroupNos[
|
|
20686
|
+
for (var _i4 = 0; _i4 < neededPriceFeatureGroupNos.length; _i4++) {
|
|
20687
|
+
var found = set.CatalogData.getPricefeaturegroup(neededPriceFeatureGroupNos[_i4]);
|
|
20668
20688
|
if (found) ; else {
|
|
20669
|
-
toLoadPriceFeatureGroups.push(neededPriceFeatureGroupNos[
|
|
20689
|
+
toLoadPriceFeatureGroups.push(neededPriceFeatureGroupNos[_i4]);
|
|
20670
20690
|
}
|
|
20671
20691
|
}
|
|
20672
20692
|
return toLoadPriceFeatureGroups;
|
|
@@ -21098,6 +21118,7 @@ function getCatalogArticle(article, catalogData) {
|
|
|
21098
21118
|
idmPartlist: article.partlist,
|
|
21099
21119
|
itemIdentification: article.itemIdentification,
|
|
21100
21120
|
articleRelations: [],
|
|
21121
|
+
sequenceNo: article.sequenceNo,
|
|
21101
21122
|
svgs: (_article$detailInfos3 = article.detailInfos) === null || _article$detailInfos3 === void 0 ? void 0 : _article$detailInfos3.filter(function (d) {
|
|
21102
21123
|
return d.classification == 'SVG';
|
|
21103
21124
|
}).map(function (d) {
|
|
@@ -31136,7 +31157,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
31136
31157
|
break;
|
|
31137
31158
|
}
|
|
31138
31159
|
_context.next = 4;
|
|
31139
|
-
return import('./ShelfPlanner-
|
|
31160
|
+
return import('./ShelfPlanner-1406888d.js');
|
|
31140
31161
|
case 4:
|
|
31141
31162
|
_yield$import = _context.sent;
|
|
31142
31163
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -39245,7 +39266,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
39245
39266
|
break;
|
|
39246
39267
|
}
|
|
39247
39268
|
_context5.next = 3;
|
|
39248
|
-
return import('./DoorPlanner-
|
|
39269
|
+
return import('./DoorPlanner-74bcd21d.js');
|
|
39249
39270
|
case 3:
|
|
39250
39271
|
_yield$import = _context5.sent;
|
|
39251
39272
|
DoorPlanner = _yield$import["default"];
|
|
@@ -39385,6 +39406,16 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
39385
39406
|
get: function get() {
|
|
39386
39407
|
return this.setState.getPlanning2DAsJpg;
|
|
39387
39408
|
}
|
|
39409
|
+
}, {
|
|
39410
|
+
key: "captureSetImages",
|
|
39411
|
+
get: function get() {
|
|
39412
|
+
return this.setState.captureSetImages;
|
|
39413
|
+
}
|
|
39414
|
+
}, {
|
|
39415
|
+
key: "exportSetGlb",
|
|
39416
|
+
get: function get() {
|
|
39417
|
+
return this.setState.exportSetGlb;
|
|
39418
|
+
}
|
|
39388
39419
|
}, {
|
|
39389
39420
|
key: "ViewConfig",
|
|
39390
39421
|
get: function get() {
|
|
@@ -39523,15 +39554,29 @@ var DivaMediaServiceHandler = /*#__PURE__*/function () {
|
|
|
39523
39554
|
value: (function () {
|
|
39524
39555
|
var _uploadImageViaAssets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(imageBlob, organizationId, fileName, refFunctionType, refMetadata) {
|
|
39525
39556
|
var _this$jwt, _simpleUpload$headers, _ref, _ref2, _ref3, _ref4;
|
|
39526
|
-
var
|
|
39557
|
+
var mediaType,
|
|
39558
|
+
base,
|
|
39559
|
+
authHeaders,
|
|
39560
|
+
startRes,
|
|
39561
|
+
startJson,
|
|
39562
|
+
row,
|
|
39563
|
+
simpleUpload,
|
|
39564
|
+
putRes,
|
|
39565
|
+
completeRes,
|
|
39566
|
+
res,
|
|
39567
|
+
refOut,
|
|
39568
|
+
item,
|
|
39569
|
+
variantBig,
|
|
39570
|
+
_args = arguments;
|
|
39527
39571
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
39528
39572
|
while (1) switch (_context.prev = _context.next) {
|
|
39529
39573
|
case 0:
|
|
39574
|
+
mediaType = _args.length > 5 && _args[5] !== undefined ? _args[5] : 'PCT';
|
|
39530
39575
|
base = this.mediaServiceUrl.replace(/\/$/, '');
|
|
39531
39576
|
authHeaders = {
|
|
39532
39577
|
Authorization: 'Bearer ' + ((_this$jwt = this.jwt) !== null && _this$jwt !== void 0 ? _this$jwt : '')
|
|
39533
39578
|
};
|
|
39534
|
-
_context.next =
|
|
39579
|
+
_context.next = 5;
|
|
39535
39580
|
return fetch("".concat(base, "/v1/assets/uploads"), {
|
|
39536
39581
|
method: 'POST',
|
|
39537
39582
|
headers: _objectSpread$d({
|
|
@@ -39543,45 +39588,45 @@ var DivaMediaServiceHandler = /*#__PURE__*/function () {
|
|
|
39543
39588
|
mimeType: imageBlob.type || 'application/octet-stream',
|
|
39544
39589
|
size: imageBlob.size,
|
|
39545
39590
|
organizationId: organizationId,
|
|
39546
|
-
mediaType:
|
|
39591
|
+
mediaType: mediaType
|
|
39547
39592
|
}]
|
|
39548
39593
|
})
|
|
39549
39594
|
});
|
|
39550
|
-
case
|
|
39595
|
+
case 5:
|
|
39551
39596
|
startRes = _context.sent;
|
|
39552
39597
|
if (startRes.ok) {
|
|
39553
|
-
_context.next =
|
|
39598
|
+
_context.next = 8;
|
|
39554
39599
|
break;
|
|
39555
39600
|
}
|
|
39556
39601
|
return _context.abrupt("return", '');
|
|
39557
|
-
case
|
|
39558
|
-
_context.next =
|
|
39602
|
+
case 8:
|
|
39603
|
+
_context.next = 10;
|
|
39559
39604
|
return startRes.json();
|
|
39560
|
-
case
|
|
39605
|
+
case 10:
|
|
39561
39606
|
startJson = _context.sent;
|
|
39562
39607
|
row = Array.isArray(startJson) ? startJson[0] : startJson;
|
|
39563
39608
|
simpleUpload = row === null || row === void 0 ? void 0 : row.simpleUpload;
|
|
39564
39609
|
if (!(!(simpleUpload !== null && simpleUpload !== void 0 && simpleUpload.url) || !(simpleUpload !== null && simpleUpload !== void 0 && simpleUpload.method))) {
|
|
39565
|
-
_context.next =
|
|
39610
|
+
_context.next = 15;
|
|
39566
39611
|
break;
|
|
39567
39612
|
}
|
|
39568
39613
|
return _context.abrupt("return", '');
|
|
39569
|
-
case
|
|
39570
|
-
_context.next =
|
|
39614
|
+
case 15:
|
|
39615
|
+
_context.next = 17;
|
|
39571
39616
|
return fetch(simpleUpload.url, {
|
|
39572
39617
|
method: simpleUpload.method,
|
|
39573
39618
|
headers: (_simpleUpload$headers = simpleUpload.headers) !== null && _simpleUpload$headers !== void 0 ? _simpleUpload$headers : {},
|
|
39574
39619
|
body: imageBlob
|
|
39575
39620
|
});
|
|
39576
|
-
case
|
|
39621
|
+
case 17:
|
|
39577
39622
|
putRes = _context.sent;
|
|
39578
39623
|
if (putRes.ok) {
|
|
39579
|
-
_context.next =
|
|
39624
|
+
_context.next = 20;
|
|
39580
39625
|
break;
|
|
39581
39626
|
}
|
|
39582
39627
|
return _context.abrupt("return", '');
|
|
39583
|
-
case
|
|
39584
|
-
_context.next =
|
|
39628
|
+
case 20:
|
|
39629
|
+
_context.next = 22;
|
|
39585
39630
|
return fetch("".concat(base, "/v1/assets/uploads/complete"), {
|
|
39586
39631
|
method: 'POST',
|
|
39587
39632
|
headers: _objectSpread$d({
|
|
@@ -39591,30 +39636,30 @@ var DivaMediaServiceHandler = /*#__PURE__*/function () {
|
|
|
39591
39636
|
uploadId: row.uploadId,
|
|
39592
39637
|
fileName: fileName,
|
|
39593
39638
|
organizationId: organizationId,
|
|
39594
|
-
mediaType:
|
|
39639
|
+
mediaType: mediaType,
|
|
39595
39640
|
ref: {
|
|
39596
39641
|
functionType: refFunctionType,
|
|
39597
39642
|
metadata: refMetadata
|
|
39598
39643
|
}
|
|
39599
39644
|
})
|
|
39600
39645
|
});
|
|
39601
|
-
case
|
|
39646
|
+
case 22:
|
|
39602
39647
|
completeRes = _context.sent;
|
|
39603
39648
|
if (completeRes.ok) {
|
|
39604
|
-
_context.next =
|
|
39649
|
+
_context.next = 25;
|
|
39605
39650
|
break;
|
|
39606
39651
|
}
|
|
39607
39652
|
return _context.abrupt("return", '');
|
|
39608
|
-
case
|
|
39609
|
-
_context.next =
|
|
39653
|
+
case 25:
|
|
39654
|
+
_context.next = 27;
|
|
39610
39655
|
return completeRes.json();
|
|
39611
|
-
case
|
|
39656
|
+
case 27:
|
|
39612
39657
|
res = _context.sent;
|
|
39613
39658
|
refOut = res.mediaItemRef;
|
|
39614
39659
|
item = res.mediaItem;
|
|
39615
39660
|
variantBig = refOut !== null && refOut !== void 0 && refOut.variants && _typeof(refOut.variants) === 'object' ? refOut.variants.big : undefined;
|
|
39616
39661
|
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 : '');
|
|
39617
|
-
case
|
|
39662
|
+
case 32:
|
|
39618
39663
|
case "end":
|
|
39619
39664
|
return _context.stop();
|
|
39620
39665
|
}
|
|
@@ -39636,11 +39681,14 @@ var DivaMediaServiceHandler = /*#__PURE__*/function () {
|
|
|
39636
39681
|
key: "uploadImageBlobPermanent",
|
|
39637
39682
|
value: (function () {
|
|
39638
39683
|
var _uploadImageBlobPermanent = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(imageBlob, fileName, refFunctionType, refMetadata, organizationId) {
|
|
39684
|
+
var mediaType,
|
|
39685
|
+
_args2 = arguments;
|
|
39639
39686
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
39640
39687
|
while (1) switch (_context2.prev = _context2.next) {
|
|
39641
39688
|
case 0:
|
|
39642
|
-
|
|
39643
|
-
|
|
39689
|
+
mediaType = _args2.length > 5 && _args2[5] !== undefined ? _args2[5] : 'PCT';
|
|
39690
|
+
return _context2.abrupt("return", this.uploadImageViaAssets(imageBlob, organizationId || this.organizationId, fileName, refFunctionType, refMetadata, mediaType));
|
|
39691
|
+
case 2:
|
|
39644
39692
|
case "end":
|
|
39645
39693
|
return _context2.stop();
|
|
39646
39694
|
}
|
|
@@ -45136,9 +45184,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45136
45184
|
}()
|
|
45137
45185
|
}, {
|
|
45138
45186
|
key: "getPendingUploadFileName",
|
|
45139
|
-
value: function getPendingUploadFileName(basketData, setId, slot, extension, variantId
|
|
45187
|
+
value: function getPendingUploadFileName(basketData, setId, slot, extension, variantId, /** Distinguishes several uploads of the same slot, e.g. one per captured save shot. */
|
|
45188
|
+
discriminator) {
|
|
45140
45189
|
var variantSuffix = variantId !== undefined ? "_v".concat(variantId) : '';
|
|
45141
|
-
|
|
45190
|
+
var shotSuffix = discriminator ? "_".concat(discriminator) : '';
|
|
45191
|
+
return "".concat(basketData.DivaNr, "_").concat(basketData.DocumentVersion, "_").concat(setId).concat(variantSuffix, "_").concat(slot).concat(shotSuffix, ".").concat(extension);
|
|
45142
45192
|
}
|
|
45143
45193
|
|
|
45144
45194
|
// Clears only the active-configuration (non-variant) pending uploads of this
|
|
@@ -45165,7 +45215,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45165
45215
|
* the basket-mediated upload pipeline (`BasketHandler.saveBasket`). This
|
|
45166
45216
|
* mirrors the backend `resolveUploadTarget` routing: planning2D -> the main
|
|
45167
45217
|
* `OrderSetData.Set2DImage` or, when a variantId is present,
|
|
45168
|
-
* `ConfigVariants[VariantID].Set2DImage`;
|
|
45218
|
+
* `ConfigVariants[VariantID].Set2DImage`; planning3D without a setImagesId ->
|
|
45219
|
+
* the matching `SetImage`; planning3DGlb -> `SetGlb`; aiImage and secondary
|
|
45220
|
+
* planning3D shots -> `SetImages[].URL`.
|
|
45169
45221
|
*/
|
|
45170
45222
|
}, {
|
|
45171
45223
|
key: "flushPendingUploadsViaMediaService",
|
|
@@ -45191,7 +45243,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45191
45243
|
case 0:
|
|
45192
45244
|
orderSet = basket.getOrderSet(pendingUpload.setId);
|
|
45193
45245
|
_context41.next = 3;
|
|
45194
|
-
return mediaServiceHandler.uploadImageBlobPermanent(pendingUpload.blob, pendingUpload.fileName, pendingUpload.slot
|
|
45246
|
+
return mediaServiceHandler.uploadImageBlobPermanent(pendingUpload.blob, pendingUpload.fileName, BASKET_UPLOAD_FUNCTION_TYPES[pendingUpload.slot], {
|
|
45195
45247
|
divaNr: basket.DivaNr,
|
|
45196
45248
|
setId: pendingUpload.setId,
|
|
45197
45249
|
setImagesId: pendingUpload.setImagesId,
|
|
@@ -45199,7 +45251,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45199
45251
|
catalogCodex: orderSet === null || orderSet === void 0 ? void 0 : orderSet.CatalogCodex,
|
|
45200
45252
|
catalogGuid: orderSet === null || orderSet === void 0 ? void 0 : orderSet.CatalogGUID,
|
|
45201
45253
|
setHash: orderSet === null || orderSet === void 0 ? void 0 : orderSet.SetHash
|
|
45202
|
-
}, basket.OrganizationId);
|
|
45254
|
+
}, basket.OrganizationId, BASKET_UPLOAD_MEDIA_TYPES[pendingUpload.slot]);
|
|
45203
45255
|
case 3:
|
|
45204
45256
|
url = _context41.sent;
|
|
45205
45257
|
return _context41.abrupt("return", {
|
|
@@ -45222,7 +45274,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45222
45274
|
_iterator6 = _createForOfIteratorHelper$5(uploaded);
|
|
45223
45275
|
_context43.prev = 7;
|
|
45224
45276
|
_loop8 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop8() {
|
|
45225
|
-
var _step6$value, pendingUpload, orderSet, url, _orderSet$ConfigVaria, configVariant, _orderSet$SetImages, setImage;
|
|
45277
|
+
var _step6$value, pendingUpload, orderSet, url, _orderSet$ConfigVaria, configVariant, _orderSet$ConfigVaria2, _configVariant, _orderSet$SetImages, setImage;
|
|
45226
45278
|
return _regeneratorRuntime.wrap(function _loop8$(_context42) {
|
|
45227
45279
|
while (1) switch (_context42.prev = _context42.next) {
|
|
45228
45280
|
case 0:
|
|
@@ -45243,6 +45295,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45243
45295
|
} else {
|
|
45244
45296
|
orderSet.Set2DImage = url;
|
|
45245
45297
|
}
|
|
45298
|
+
} else if (pendingUpload.slot === 'planning3DGlb') {
|
|
45299
|
+
orderSet.SetGlb = url;
|
|
45300
|
+
} else if (pendingUpload.slot === 'planning3D' && !pendingUpload.setImagesId) {
|
|
45301
|
+
if (pendingUpload.variantId !== undefined) {
|
|
45302
|
+
_configVariant = (_orderSet$ConfigVaria2 = orderSet.ConfigVariants) === null || _orderSet$ConfigVaria2 === void 0 ? void 0 : _orderSet$ConfigVaria2.find(function (variant) {
|
|
45303
|
+
return variant.VariantID === pendingUpload.variantId;
|
|
45304
|
+
});
|
|
45305
|
+
if (_configVariant) _configVariant.SetImage = url;
|
|
45306
|
+
} else {
|
|
45307
|
+
orderSet.SetImage = url;
|
|
45308
|
+
}
|
|
45246
45309
|
} else {
|
|
45247
45310
|
setImage = (_orderSet$SetImages = orderSet.SetImages) === null || _orderSet$SetImages === void 0 ? void 0 : _orderSet$SetImages.find(function (image) {
|
|
45248
45311
|
return image.Id === pendingUpload.setImagesId;
|
|
@@ -45299,8 +45362,8 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45299
45362
|
key: "getOrderSet",
|
|
45300
45363
|
value: function () {
|
|
45301
45364
|
var _getOrderSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee41(set, catalogData, divaNr, basketData, repairOnly, returnTo) {
|
|
45302
|
-
var _Object$values$, _set$getDivaArticles, _hqRenderScript2, _urlToAiImages, _alternateSetImages, _set$basketConfigVari2, _set$basketConfigVari3;
|
|
45303
|
-
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;
|
|
45365
|
+
var _Object$values$, _set$getDivaArticles, _hqRenderScript2, _urlToAiImages, _alternateSetImages, _capturedSetImages, _set$basketConfigVari2, _set$basketConfigVari3;
|
|
45366
|
+
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;
|
|
45304
45367
|
return _regeneratorRuntime.wrap(function _callee41$(_context44) {
|
|
45305
45368
|
while (1) switch (_context44.prev = _context44.next) {
|
|
45306
45369
|
case 0:
|
|
@@ -45312,17 +45375,21 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45312
45375
|
urlToPlanning2D = undefined;
|
|
45313
45376
|
urlToAiImages = undefined;
|
|
45314
45377
|
alternateSetImages = undefined;
|
|
45378
|
+
capturedSetImages = undefined;
|
|
45379
|
+
urlToSetGlb = undefined; // A captured main image has no URL yet (the backend writes it after the upload), so its
|
|
45380
|
+
// presence cannot be inferred from `setImage` the way a render-farm URL can.
|
|
45381
|
+
setImageCaptured = false;
|
|
45315
45382
|
hqRenderScript = undefined;
|
|
45316
45383
|
dimensions = {};
|
|
45317
45384
|
if (dontGenerateImages) {
|
|
45318
|
-
_context44.next =
|
|
45385
|
+
_context44.next = 47;
|
|
45319
45386
|
break;
|
|
45320
45387
|
}
|
|
45321
45388
|
this.resetPendingUploadsForSet(basketData, set.getSetId());
|
|
45322
|
-
_context44.next =
|
|
45389
|
+
_context44.next = 17;
|
|
45323
45390
|
return this.ensure3DConnectionReady(set);
|
|
45324
|
-
case
|
|
45325
|
-
promise3D = this.getSetImage(set, true);
|
|
45391
|
+
case 17:
|
|
45392
|
+
promise3D = this.getSetImage(set, true, basketData);
|
|
45326
45393
|
promise2D = this.get2DSetImage(set, basketData);
|
|
45327
45394
|
if (set.getAiImagesAsJpg().length > 0) {
|
|
45328
45395
|
promiseAiImages = this.getAiImages(set, basketData);
|
|
@@ -45331,20 +45398,26 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45331
45398
|
promise3DAlternate = this.getAlternateSetImages(set);
|
|
45332
45399
|
}
|
|
45333
45400
|
// Run HQ render-script after the 3D save request finishes so two SaveProjectWithOptions calls are not in flight
|
|
45334
|
-
_context44.next =
|
|
45401
|
+
_context44.next = 23;
|
|
45335
45402
|
return Promise.all([promise3D, promise2D, promiseAiImages, promise3DAlternate]);
|
|
45336
|
-
case
|
|
45403
|
+
case 23:
|
|
45337
45404
|
_yield$Promise$all = _context44.sent;
|
|
45338
45405
|
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 4);
|
|
45339
45406
|
_yield$Promise$all2$ = _yield$Promise$all2[0];
|
|
45340
45407
|
setImage = _yield$Promise$all2$.url;
|
|
45341
45408
|
dimensions = _yield$Promise$all2$.dimensions;
|
|
45409
|
+
capturedSetImages = _yield$Promise$all2$.additionalImages;
|
|
45410
|
+
setImageCaptured = _yield$Promise$all2$.captured;
|
|
45342
45411
|
urlToPlanning2D = _yield$Promise$all2[1];
|
|
45343
45412
|
urlToAiImages = _yield$Promise$all2[2];
|
|
45344
45413
|
alternateSetImages = _yield$Promise$all2[3];
|
|
45345
|
-
_context44.next =
|
|
45414
|
+
_context44.next = 35;
|
|
45415
|
+
return this.getSetGlb(set, basketData);
|
|
45416
|
+
case 35:
|
|
45417
|
+
urlToSetGlb = _context44.sent;
|
|
45418
|
+
_context44.next = 38;
|
|
45346
45419
|
return this.getHQRenderScript(set, divaNr);
|
|
45347
|
-
case
|
|
45420
|
+
case 38:
|
|
45348
45421
|
hqRenderScript = _context44.sent;
|
|
45349
45422
|
// Strict-mode artifact validation. Surfaces render-farm timeouts as a
|
|
45350
45423
|
// hard failure so the mass-configurator can show a per-product retry
|
|
@@ -45354,18 +45427,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45354
45427
|
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;
|
|
45355
45428
|
is3DSet = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
45356
45429
|
if (!(strict && is3DSet)) {
|
|
45357
|
-
_context44.next =
|
|
45430
|
+
_context44.next = 47;
|
|
45358
45431
|
break;
|
|
45359
45432
|
}
|
|
45360
45433
|
missing = [];
|
|
45361
|
-
if (!setImage) missing.push('3DImage');
|
|
45434
|
+
if (!setImage && !setImageCaptured) missing.push('3DImage');
|
|
45362
45435
|
if (!((_hqRenderScript = hqRenderScript) !== null && _hqRenderScript !== void 0 && _hqRenderScript._id)) missing.push('HQRenderScript');
|
|
45363
45436
|
if (!(missing.length > 0)) {
|
|
45364
|
-
_context44.next =
|
|
45437
|
+
_context44.next = 47;
|
|
45365
45438
|
break;
|
|
45366
45439
|
}
|
|
45367
45440
|
throw new ArtifactGenerationError(set.getSetId(), missing);
|
|
45368
|
-
case
|
|
45441
|
+
case 47:
|
|
45369
45442
|
plannerWarnings = [];
|
|
45370
45443
|
if (!this.getPlanningIsComplete(set)) plannerWarnings.push('INCOMPLETE');
|
|
45371
45444
|
DivaUtils.endSpanOfApm('GetSet3D und 2D Image');
|
|
@@ -45400,9 +45473,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45400
45473
|
//Add url string of current rendering.
|
|
45401
45474
|
HQRenderScript: (_hqRenderScript2 = hqRenderScript) === null || _hqRenderScript2 === void 0 ? void 0 : _hqRenderScript2._id,
|
|
45402
45475
|
Set2DImage: urlToPlanning2D,
|
|
45476
|
+
SetGlb: urlToSetGlb,
|
|
45403
45477
|
VariantDescription: DivaUtils.stripTags(set.getVariantsDescription()),
|
|
45404
45478
|
VariantDescription_locales: DivaUtils.stripTagsFromDict(set.getVariantsDescription_locales()),
|
|
45405
|
-
SetImages: [].concat(_toConsumableArray((_urlToAiImages = urlToAiImages) !== null && _urlToAiImages !== void 0 ? _urlToAiImages : []), _toConsumableArray((_alternateSetImages = alternateSetImages) !== null && _alternateSetImages !== void 0 ? _alternateSetImages : [])),
|
|
45479
|
+
SetImages: [].concat(_toConsumableArray((_urlToAiImages = urlToAiImages) !== null && _urlToAiImages !== void 0 ? _urlToAiImages : []), _toConsumableArray((_alternateSetImages = alternateSetImages) !== null && _alternateSetImages !== void 0 ? _alternateSetImages : []), _toConsumableArray((_capturedSetImages = capturedSetImages) !== null && _capturedSetImages !== void 0 ? _capturedSetImages : [])),
|
|
45406
45480
|
SetHash: set.setHash,
|
|
45407
45481
|
FavoriteAiRoomKeys: set.getAiImagesAsJpg().map(function (img) {
|
|
45408
45482
|
return img.promptId;
|
|
@@ -45432,7 +45506,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45432
45506
|
MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
|
|
45433
45507
|
});
|
|
45434
45508
|
return _context44.abrupt("return", orderSet);
|
|
45435
|
-
case
|
|
45509
|
+
case 53:
|
|
45436
45510
|
case "end":
|
|
45437
45511
|
return _context44.stop();
|
|
45438
45512
|
}
|
|
@@ -45448,106 +45522,207 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45448
45522
|
* @param set
|
|
45449
45523
|
* @param overwriteLastSavedRendering If set to true, it always asks for a new rendering. If false it returns the previously saved rendering (When entering Summary)
|
|
45450
45524
|
*/
|
|
45525
|
+
/**
|
|
45526
|
+
* Produces the set's 3D image(s).
|
|
45527
|
+
*
|
|
45528
|
+
* A viewer that can capture in-browser is preferred: it renders what the customer is actually
|
|
45529
|
+
* looking at, and it skips a render-farm round-trip. `basketData` is what enables it — the
|
|
45530
|
+
* captured blobs are enqueued on the basket and uploaded with the save — so the flows that
|
|
45531
|
+
* cannot enqueue (the ConfigVariant loop in {@link FavoritesHandler}) pass none and keep using
|
|
45532
|
+
* the render farm. So does a headless artifact pass, which has no attached view to capture with.
|
|
45533
|
+
*
|
|
45534
|
+
* The Unity round-trip is NOT skipped by this: the HQ render script comes from the same
|
|
45535
|
+
* connection and is what an rtv-next viewer builds its scene from. Only the image leg changes.
|
|
45536
|
+
*/
|
|
45451
45537
|
}, {
|
|
45452
45538
|
key: "getSetImage",
|
|
45453
45539
|
value: (function () {
|
|
45454
|
-
var _getSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee42(set, overwriteLastSavedRendering) {
|
|
45455
|
-
var is3D, saved, _yield$set$plannerHan, dimensions, url;
|
|
45540
|
+
var _getSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee42(set, overwriteLastSavedRendering, basketData) {
|
|
45541
|
+
var empty, is3D, captured, saved, _yield$set$plannerHan, dimensions, url;
|
|
45456
45542
|
return _regeneratorRuntime.wrap(function _callee42$(_context45) {
|
|
45457
45543
|
while (1) switch (_context45.prev = _context45.next) {
|
|
45458
45544
|
case 0:
|
|
45545
|
+
empty = {
|
|
45546
|
+
dimensions: {
|
|
45547
|
+
w: undefined,
|
|
45548
|
+
h: undefined,
|
|
45549
|
+
d: undefined
|
|
45550
|
+
},
|
|
45551
|
+
url: undefined,
|
|
45552
|
+
additionalImages: undefined,
|
|
45553
|
+
captured: false
|
|
45554
|
+
};
|
|
45459
45555
|
is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
45460
|
-
if (
|
|
45461
|
-
_context45.next =
|
|
45556
|
+
if (is3D) {
|
|
45557
|
+
_context45.next = 4;
|
|
45462
45558
|
break;
|
|
45463
45559
|
}
|
|
45464
|
-
_context45.
|
|
45465
|
-
return set.plannerHandler.saveSetImage(overwriteLastSavedRendering);
|
|
45560
|
+
return _context45.abrupt("return", empty);
|
|
45466
45561
|
case 4:
|
|
45562
|
+
if (!basketData) {
|
|
45563
|
+
_context45.next = 10;
|
|
45564
|
+
break;
|
|
45565
|
+
}
|
|
45566
|
+
_context45.next = 7;
|
|
45567
|
+
return this.getCapturedSetImages(set, basketData);
|
|
45568
|
+
case 7:
|
|
45569
|
+
captured = _context45.sent;
|
|
45570
|
+
if (!captured) {
|
|
45571
|
+
_context45.next = 10;
|
|
45572
|
+
break;
|
|
45573
|
+
}
|
|
45574
|
+
return _context45.abrupt("return", captured);
|
|
45575
|
+
case 10:
|
|
45576
|
+
_context45.next = 12;
|
|
45577
|
+
return set.plannerHandler.saveSetImage(overwriteLastSavedRendering);
|
|
45578
|
+
case 12:
|
|
45467
45579
|
saved = _context45.sent;
|
|
45468
45580
|
if (saved) {
|
|
45469
|
-
_context45.next =
|
|
45581
|
+
_context45.next = 15;
|
|
45470
45582
|
break;
|
|
45471
45583
|
}
|
|
45472
|
-
return _context45.abrupt("return",
|
|
45473
|
-
|
|
45474
|
-
|
|
45475
|
-
h: undefined,
|
|
45476
|
-
d: undefined
|
|
45477
|
-
},
|
|
45478
|
-
url: undefined
|
|
45479
|
-
});
|
|
45480
|
-
case 7:
|
|
45481
|
-
_context45.next = 9;
|
|
45584
|
+
return _context45.abrupt("return", empty);
|
|
45585
|
+
case 15:
|
|
45586
|
+
_context45.next = 17;
|
|
45482
45587
|
return set.plannerHandler.getSetImageAsUrl(set.getSetId());
|
|
45483
|
-
case
|
|
45588
|
+
case 17:
|
|
45484
45589
|
_yield$set$plannerHan = _context45.sent;
|
|
45485
45590
|
dimensions = _yield$set$plannerHan.dimensions;
|
|
45486
45591
|
url = _yield$set$plannerHan.url;
|
|
45487
45592
|
return _context45.abrupt("return", {
|
|
45488
45593
|
dimensions: dimensions,
|
|
45489
|
-
url: url
|
|
45594
|
+
url: url,
|
|
45595
|
+
additionalImages: undefined,
|
|
45596
|
+
captured: false
|
|
45490
45597
|
});
|
|
45598
|
+
case 21:
|
|
45599
|
+
case "end":
|
|
45600
|
+
return _context45.stop();
|
|
45601
|
+
}
|
|
45602
|
+
}, _callee42, this);
|
|
45603
|
+
}));
|
|
45604
|
+
function getSetImage(_x149, _x150, _x151) {
|
|
45605
|
+
return _getSetImage.apply(this, arguments);
|
|
45606
|
+
}
|
|
45607
|
+
return getSetImage;
|
|
45608
|
+
}()
|
|
45609
|
+
/**
|
|
45610
|
+
* Captures the save shots configured in the viewer preset and enqueues them for upload with the
|
|
45611
|
+
* basket. Returns undefined when nothing was captured, so the caller falls back to the render
|
|
45612
|
+
* farm — that covers a view with no capable viewer, an empty planning, and a failed capture.
|
|
45613
|
+
*
|
|
45614
|
+
* The first shot is the set's main image and lands in `OrderSetData.SetImage`; the rest become
|
|
45615
|
+
* `SetImages[]` entries. `url` stays empty for the same reason {@link get2DSetImage} leaves
|
|
45616
|
+
* `Set2DImage` empty: the real URL is written once the upload completes, and the transient
|
|
45617
|
+
* blob: URL must never reach a persisted field. `captured` is what tells a caller the image
|
|
45618
|
+
* exists despite that empty URL.
|
|
45619
|
+
*/
|
|
45620
|
+
)
|
|
45621
|
+
}, {
|
|
45622
|
+
key: "getCapturedSetImages",
|
|
45623
|
+
value: (function () {
|
|
45624
|
+
var _getCapturedSetImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee43(set, basketData) {
|
|
45625
|
+
var _captured,
|
|
45626
|
+
_this2 = this,
|
|
45627
|
+
_captured$dimensions;
|
|
45628
|
+
var setId, captured, _set$captureSetImages, additionalImages;
|
|
45629
|
+
return _regeneratorRuntime.wrap(function _callee43$(_context46) {
|
|
45630
|
+
while (1) switch (_context46.prev = _context46.next) {
|
|
45631
|
+
case 0:
|
|
45632
|
+
setId = set.getSetId();
|
|
45633
|
+
_context46.prev = 1;
|
|
45634
|
+
_context46.next = 4;
|
|
45635
|
+
return (_set$captureSetImages = set.captureSetImages) === null || _set$captureSetImages === void 0 ? void 0 : _set$captureSetImages.call(set);
|
|
45636
|
+
case 4:
|
|
45637
|
+
captured = _context46.sent;
|
|
45638
|
+
_context46.next = 11;
|
|
45639
|
+
break;
|
|
45640
|
+
case 7:
|
|
45641
|
+
_context46.prev = 7;
|
|
45642
|
+
_context46.t0 = _context46["catch"](1);
|
|
45643
|
+
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));
|
|
45644
|
+
return _context46.abrupt("return", undefined);
|
|
45645
|
+
case 11:
|
|
45646
|
+
if ((_captured = captured) !== null && _captured !== void 0 && _captured.images.length) {
|
|
45647
|
+
_context46.next = 13;
|
|
45648
|
+
break;
|
|
45649
|
+
}
|
|
45650
|
+
return _context46.abrupt("return", undefined);
|
|
45491
45651
|
case 13:
|
|
45492
|
-
|
|
45493
|
-
|
|
45652
|
+
// Every enqueue happens after the (only) awaited step, so a capture can never leave the
|
|
45653
|
+
// basket holding some of a set's shots while the render-farm fallback writes the rest.
|
|
45654
|
+
additionalImages = captured.images.map(function (image, index) {
|
|
45655
|
+
// The first shot is the main image and has no SetImages[] entry; the rest are keyed by
|
|
45656
|
+
// shot id so the backend can resolve which entry to write each URL into.
|
|
45657
|
+
var setImagesId = index === 0 ? undefined : "".concat(setId, "_").concat(image.id);
|
|
45658
|
+
var extension = image.format === 'jpeg' ? 'jpg' : 'png';
|
|
45659
|
+
var fileName = _this2.getPendingUploadFileName(basketData, setId, 'planning3D', extension, undefined, setImagesId ? image.id : undefined);
|
|
45660
|
+
return set.plannerHandler.saveCapturedSetImage(basketData, setId, image, fileName, setImagesId);
|
|
45661
|
+
}).filter(function (setImage) {
|
|
45662
|
+
return setImage !== undefined;
|
|
45663
|
+
});
|
|
45664
|
+
return _context46.abrupt("return", {
|
|
45665
|
+
url: '',
|
|
45666
|
+
dimensions: (_captured$dimensions = captured.dimensions) !== null && _captured$dimensions !== void 0 ? _captured$dimensions : {
|
|
45494
45667
|
w: undefined,
|
|
45495
45668
|
h: undefined,
|
|
45496
45669
|
d: undefined
|
|
45497
|
-
}
|
|
45670
|
+
},
|
|
45671
|
+
additionalImages: additionalImages,
|
|
45672
|
+
captured: true
|
|
45498
45673
|
});
|
|
45499
|
-
case
|
|
45674
|
+
case 15:
|
|
45500
45675
|
case "end":
|
|
45501
|
-
return
|
|
45676
|
+
return _context46.stop();
|
|
45502
45677
|
}
|
|
45503
|
-
},
|
|
45678
|
+
}, _callee43, null, [[1, 7]]);
|
|
45504
45679
|
}));
|
|
45505
|
-
function
|
|
45506
|
-
return
|
|
45680
|
+
function getCapturedSetImages(_x152, _x153) {
|
|
45681
|
+
return _getCapturedSetImages.apply(this, arguments);
|
|
45507
45682
|
}
|
|
45508
|
-
return
|
|
45683
|
+
return getCapturedSetImages;
|
|
45509
45684
|
}())
|
|
45510
45685
|
}, {
|
|
45511
45686
|
key: "getHQRenderScript",
|
|
45512
45687
|
value: function () {
|
|
45513
|
-
var _getHQRenderScript = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
45688
|
+
var _getHQRenderScript = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee44(set, divaNr) {
|
|
45514
45689
|
var is3D, hqRenderScript, createdHQRenderScript;
|
|
45515
|
-
return _regeneratorRuntime.wrap(function
|
|
45516
|
-
while (1) switch (
|
|
45690
|
+
return _regeneratorRuntime.wrap(function _callee44$(_context47) {
|
|
45691
|
+
while (1) switch (_context47.prev = _context47.next) {
|
|
45517
45692
|
case 0:
|
|
45518
45693
|
is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
45519
45694
|
if (is3D) {
|
|
45520
|
-
|
|
45695
|
+
_context47.next = 3;
|
|
45521
45696
|
break;
|
|
45522
45697
|
}
|
|
45523
|
-
return
|
|
45698
|
+
return _context47.abrupt("return");
|
|
45524
45699
|
case 3:
|
|
45525
|
-
|
|
45700
|
+
_context47.next = 5;
|
|
45526
45701
|
return set.plannerHandler.saveSetHQRenderScript();
|
|
45527
45702
|
case 5:
|
|
45528
45703
|
hqRenderScript = set.plannerHandler.getSetHQRenderScript();
|
|
45529
45704
|
if (hqRenderScript) {
|
|
45530
|
-
|
|
45705
|
+
_context47.next = 8;
|
|
45531
45706
|
break;
|
|
45532
45707
|
}
|
|
45533
|
-
return
|
|
45708
|
+
return _context47.abrupt("return");
|
|
45534
45709
|
case 8:
|
|
45535
|
-
|
|
45710
|
+
_context47.next = 10;
|
|
45536
45711
|
return set.api.postHQRenderScript({
|
|
45537
45712
|
divaNr: divaNr,
|
|
45538
45713
|
hqRenderscript: hqRenderScript,
|
|
45539
45714
|
organization: set.api.OrganizationId
|
|
45540
45715
|
});
|
|
45541
45716
|
case 10:
|
|
45542
|
-
createdHQRenderScript =
|
|
45543
|
-
return
|
|
45717
|
+
createdHQRenderScript = _context47.sent;
|
|
45718
|
+
return _context47.abrupt("return", createdHQRenderScript);
|
|
45544
45719
|
case 12:
|
|
45545
45720
|
case "end":
|
|
45546
|
-
return
|
|
45721
|
+
return _context47.stop();
|
|
45547
45722
|
}
|
|
45548
|
-
},
|
|
45723
|
+
}, _callee44);
|
|
45549
45724
|
}));
|
|
45550
|
-
function getHQRenderScript(
|
|
45725
|
+
function getHQRenderScript(_x154, _x155) {
|
|
45551
45726
|
return _getHQRenderScript.apply(this, arguments);
|
|
45552
45727
|
}
|
|
45553
45728
|
return getHQRenderScript;
|
|
@@ -45561,69 +45736,128 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45561
45736
|
}, {
|
|
45562
45737
|
key: "getAlternateSetImages",
|
|
45563
45738
|
value: (function () {
|
|
45564
|
-
var _getAlternateSetImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
45739
|
+
var _getAlternateSetImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee45(set) {
|
|
45565
45740
|
var is2D, catalogData, setImages;
|
|
45566
|
-
return _regeneratorRuntime.wrap(function
|
|
45567
|
-
while (1) switch (
|
|
45741
|
+
return _regeneratorRuntime.wrap(function _callee45$(_context48) {
|
|
45742
|
+
while (1) switch (_context48.prev = _context48.next) {
|
|
45568
45743
|
case 0:
|
|
45569
45744
|
is2D = !['3DImage', '3DCOMB', 'BoxPlanner'].includes(set.getPlannerMode());
|
|
45570
45745
|
if (!(is2D || set.onlyRunLogic)) {
|
|
45571
|
-
|
|
45746
|
+
_context48.next = 3;
|
|
45572
45747
|
break;
|
|
45573
45748
|
}
|
|
45574
|
-
return
|
|
45749
|
+
return _context48.abrupt("return", []);
|
|
45575
45750
|
case 3:
|
|
45576
45751
|
catalogData = set.CatalogData;
|
|
45577
|
-
|
|
45752
|
+
_context48.next = 6;
|
|
45578
45753
|
return set.plannerHandler.saveAlternateSetImages(catalogData.catalogCodex, catalogData.catalogGuid);
|
|
45579
45754
|
case 6:
|
|
45580
|
-
|
|
45755
|
+
_context48.next = 8;
|
|
45581
45756
|
return set.plannerHandler.getAlternateSetImagesAsSetImageData(set.getSetId());
|
|
45582
45757
|
case 8:
|
|
45583
|
-
setImages =
|
|
45584
|
-
return
|
|
45758
|
+
setImages = _context48.sent;
|
|
45759
|
+
return _context48.abrupt("return", setImages);
|
|
45585
45760
|
case 10:
|
|
45586
45761
|
case "end":
|
|
45587
|
-
return
|
|
45762
|
+
return _context48.stop();
|
|
45588
45763
|
}
|
|
45589
|
-
},
|
|
45764
|
+
}, _callee45);
|
|
45590
45765
|
}));
|
|
45591
|
-
function getAlternateSetImages(
|
|
45766
|
+
function getAlternateSetImages(_x156) {
|
|
45592
45767
|
return _getAlternateSetImages.apply(this, arguments);
|
|
45593
45768
|
}
|
|
45594
45769
|
return getAlternateSetImages;
|
|
45770
|
+
}()
|
|
45771
|
+
/**
|
|
45772
|
+
* Exports the planning's GLB model from the live viewer and enqueues it for upload with the
|
|
45773
|
+
* basket save. Like the captured images it returns an empty string rather than a URL — the real
|
|
45774
|
+
* one is written once the upload completes — and undefined when there is no model at all: no
|
|
45775
|
+
* viewer that can export one, the preset turned it off, or an empty planning.
|
|
45776
|
+
*
|
|
45777
|
+
* Must NOT run beside {@link getSetImage}'s capture. A capture batch overrides the viewer's view
|
|
45778
|
+
* mode and resolution, and the exporter declines outright while one is in flight, so running
|
|
45779
|
+
* them concurrently would silently produce no model at all.
|
|
45780
|
+
*/
|
|
45781
|
+
)
|
|
45782
|
+
}, {
|
|
45783
|
+
key: "getSetGlb",
|
|
45784
|
+
value: (function () {
|
|
45785
|
+
var _getSetGlb = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee46(set, basketData) {
|
|
45786
|
+
var is3D, setId, glb;
|
|
45787
|
+
return _regeneratorRuntime.wrap(function _callee46$(_context49) {
|
|
45788
|
+
while (1) switch (_context49.prev = _context49.next) {
|
|
45789
|
+
case 0:
|
|
45790
|
+
is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
45791
|
+
if (is3D) {
|
|
45792
|
+
_context49.next = 3;
|
|
45793
|
+
break;
|
|
45794
|
+
}
|
|
45795
|
+
return _context49.abrupt("return", undefined);
|
|
45796
|
+
case 3:
|
|
45797
|
+
setId = set.getSetId();
|
|
45798
|
+
_context49.prev = 4;
|
|
45799
|
+
_context49.next = 7;
|
|
45800
|
+
return set.exportSetGlb();
|
|
45801
|
+
case 7:
|
|
45802
|
+
glb = _context49.sent;
|
|
45803
|
+
_context49.next = 14;
|
|
45804
|
+
break;
|
|
45805
|
+
case 10:
|
|
45806
|
+
_context49.prev = 10;
|
|
45807
|
+
_context49.t0 = _context49["catch"](4);
|
|
45808
|
+
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));
|
|
45809
|
+
return _context49.abrupt("return", undefined);
|
|
45810
|
+
case 14:
|
|
45811
|
+
if (glb) {
|
|
45812
|
+
_context49.next = 16;
|
|
45813
|
+
break;
|
|
45814
|
+
}
|
|
45815
|
+
return _context49.abrupt("return", undefined);
|
|
45816
|
+
case 16:
|
|
45817
|
+
set.plannerHandler.saveSetGlb(basketData, setId, glb, this.getPendingUploadFileName(basketData, setId, 'planning3DGlb', 'glb'));
|
|
45818
|
+
return _context49.abrupt("return", '');
|
|
45819
|
+
case 18:
|
|
45820
|
+
case "end":
|
|
45821
|
+
return _context49.stop();
|
|
45822
|
+
}
|
|
45823
|
+
}, _callee46, this, [[4, 10]]);
|
|
45824
|
+
}));
|
|
45825
|
+
function getSetGlb(_x157, _x158) {
|
|
45826
|
+
return _getSetGlb.apply(this, arguments);
|
|
45827
|
+
}
|
|
45828
|
+
return getSetGlb;
|
|
45595
45829
|
}())
|
|
45596
45830
|
}, {
|
|
45597
45831
|
key: "get2DSetImage",
|
|
45598
45832
|
value: function () {
|
|
45599
|
-
var _get2DSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
45833
|
+
var _get2DSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee47(set, basketData, variantId) {
|
|
45600
45834
|
var urlToPlanning2D, planning2DAsJPGBase64, fileName;
|
|
45601
|
-
return _regeneratorRuntime.wrap(function
|
|
45602
|
-
while (1) switch (
|
|
45835
|
+
return _regeneratorRuntime.wrap(function _callee47$(_context50) {
|
|
45836
|
+
while (1) switch (_context50.prev = _context50.next) {
|
|
45603
45837
|
case 0:
|
|
45604
45838
|
urlToPlanning2D = undefined;
|
|
45605
|
-
|
|
45839
|
+
_context50.next = 3;
|
|
45606
45840
|
return set.getPlanning2DAsJpg();
|
|
45607
45841
|
case 3:
|
|
45608
|
-
planning2DAsJPGBase64 =
|
|
45842
|
+
planning2DAsJPGBase64 = _context50.sent;
|
|
45609
45843
|
if (!(planning2DAsJPGBase64 != undefined && planning2DAsJPGBase64 != '' && planning2DAsJPGBase64 != 'data:,')) {
|
|
45610
|
-
|
|
45844
|
+
_context50.next = 9;
|
|
45611
45845
|
break;
|
|
45612
45846
|
}
|
|
45613
45847
|
fileName = this.getPendingUploadFileName(basketData, set.getSetId(), 'planning2D', 'jpg', variantId);
|
|
45614
|
-
|
|
45848
|
+
_context50.next = 8;
|
|
45615
45849
|
return set.plannerHandler.saveSet2DImage(basketData, set.getSetId(), planning2DAsJPGBase64, fileName, variantId);
|
|
45616
45850
|
case 8:
|
|
45617
|
-
urlToPlanning2D =
|
|
45851
|
+
urlToPlanning2D = _context50.sent;
|
|
45618
45852
|
case 9:
|
|
45619
|
-
return
|
|
45853
|
+
return _context50.abrupt("return", urlToPlanning2D);
|
|
45620
45854
|
case 10:
|
|
45621
45855
|
case "end":
|
|
45622
|
-
return
|
|
45856
|
+
return _context50.stop();
|
|
45623
45857
|
}
|
|
45624
|
-
},
|
|
45858
|
+
}, _callee47, this);
|
|
45625
45859
|
}));
|
|
45626
|
-
function get2DSetImage(
|
|
45860
|
+
function get2DSetImage(_x159, _x160, _x161) {
|
|
45627
45861
|
return _get2DSetImage.apply(this, arguments);
|
|
45628
45862
|
}
|
|
45629
45863
|
return get2DSetImage;
|
|
@@ -45631,29 +45865,29 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45631
45865
|
}, {
|
|
45632
45866
|
key: "getAiImages",
|
|
45633
45867
|
value: function () {
|
|
45634
|
-
var _getAiImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
45868
|
+
var _getAiImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee48(set, basketData) {
|
|
45635
45869
|
var aiImages, fileName, savedImages;
|
|
45636
|
-
return _regeneratorRuntime.wrap(function
|
|
45637
|
-
while (1) switch (
|
|
45870
|
+
return _regeneratorRuntime.wrap(function _callee48$(_context51) {
|
|
45871
|
+
while (1) switch (_context51.prev = _context51.next) {
|
|
45638
45872
|
case 0:
|
|
45639
45873
|
aiImages = set.getAiImagesAsJpg();
|
|
45640
45874
|
fileName = this.getPendingUploadFileName(basketData, set.getSetId(), 'aiImage', 'png'); // Save all AI images in parallel
|
|
45641
|
-
|
|
45875
|
+
_context51.next = 4;
|
|
45642
45876
|
return Promise.all(aiImages.map(function (_ref5) {
|
|
45643
45877
|
var promptId = _ref5.promptId,
|
|
45644
45878
|
base64 = _ref5.base64;
|
|
45645
45879
|
return set.plannerHandler.saveAiImage(basketData, set.getSetId(), promptId, base64, fileName);
|
|
45646
45880
|
}));
|
|
45647
45881
|
case 4:
|
|
45648
|
-
savedImages =
|
|
45649
|
-
return
|
|
45882
|
+
savedImages = _context51.sent;
|
|
45883
|
+
return _context51.abrupt("return", savedImages);
|
|
45650
45884
|
case 6:
|
|
45651
45885
|
case "end":
|
|
45652
|
-
return
|
|
45886
|
+
return _context51.stop();
|
|
45653
45887
|
}
|
|
45654
|
-
},
|
|
45888
|
+
}, _callee48, this);
|
|
45655
45889
|
}));
|
|
45656
|
-
function getAiImages(
|
|
45890
|
+
function getAiImages(_x162, _x163) {
|
|
45657
45891
|
return _getAiImages.apply(this, arguments);
|
|
45658
45892
|
}
|
|
45659
45893
|
return getAiImages;
|
|
@@ -45661,37 +45895,37 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45661
45895
|
}, {
|
|
45662
45896
|
key: "getAiImage",
|
|
45663
45897
|
value: function () {
|
|
45664
|
-
var _getAiImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
45898
|
+
var _getAiImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee49(set, basketData) {
|
|
45665
45899
|
var aiImages, _aiImages$, promptId, base64, fileName;
|
|
45666
|
-
return _regeneratorRuntime.wrap(function
|
|
45667
|
-
while (1) switch (
|
|
45900
|
+
return _regeneratorRuntime.wrap(function _callee49$(_context52) {
|
|
45901
|
+
while (1) switch (_context52.prev = _context52.next) {
|
|
45668
45902
|
case 0:
|
|
45669
45903
|
aiImages = set.getAiImagesAsJpg();
|
|
45670
45904
|
if (!(aiImages.length === 0)) {
|
|
45671
|
-
|
|
45905
|
+
_context52.next = 3;
|
|
45672
45906
|
break;
|
|
45673
45907
|
}
|
|
45674
|
-
return
|
|
45908
|
+
return _context52.abrupt("return", undefined);
|
|
45675
45909
|
case 3:
|
|
45676
45910
|
if (basketData) {
|
|
45677
|
-
|
|
45911
|
+
_context52.next = 5;
|
|
45678
45912
|
break;
|
|
45679
45913
|
}
|
|
45680
|
-
return
|
|
45914
|
+
return _context52.abrupt("return", undefined);
|
|
45681
45915
|
case 5:
|
|
45682
45916
|
_aiImages$ = aiImages[0], promptId = _aiImages$.promptId, base64 = _aiImages$.base64;
|
|
45683
45917
|
fileName = this.getPendingUploadFileName(basketData, set.getSetId(), 'aiImage', 'png');
|
|
45684
|
-
|
|
45918
|
+
_context52.next = 9;
|
|
45685
45919
|
return set.plannerHandler.saveAiImage(basketData, set.getSetId(), promptId, base64, fileName);
|
|
45686
45920
|
case 9:
|
|
45687
|
-
return
|
|
45921
|
+
return _context52.abrupt("return", _context52.sent);
|
|
45688
45922
|
case 10:
|
|
45689
45923
|
case "end":
|
|
45690
|
-
return
|
|
45924
|
+
return _context52.stop();
|
|
45691
45925
|
}
|
|
45692
|
-
},
|
|
45926
|
+
}, _callee49, this);
|
|
45693
45927
|
}));
|
|
45694
|
-
function getAiImage(
|
|
45928
|
+
function getAiImage(_x164, _x165) {
|
|
45695
45929
|
return _getAiImage.apply(this, arguments);
|
|
45696
45930
|
}
|
|
45697
45931
|
return getAiImage;
|
|
@@ -45734,25 +45968,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
45734
45968
|
}, {
|
|
45735
45969
|
key: "addOrderSetArticlesToExistingSet",
|
|
45736
45970
|
value: function () {
|
|
45737
|
-
var _addOrderSetArticlesToExistingSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
45738
|
-
return _regeneratorRuntime.wrap(function
|
|
45739
|
-
while (1) switch (
|
|
45971
|
+
var _addOrderSetArticlesToExistingSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee50(set, orderSet, lastSetToInitialize) {
|
|
45972
|
+
return _regeneratorRuntime.wrap(function _callee50$(_context53) {
|
|
45973
|
+
while (1) switch (_context53.prev = _context53.next) {
|
|
45740
45974
|
case 0:
|
|
45741
45975
|
//TODO: GLOBAL STUFF
|
|
45742
45976
|
//this.updateActSet(set);
|
|
45743
45977
|
orderSet.changeBasketIds();
|
|
45744
|
-
|
|
45978
|
+
_context53.next = 3;
|
|
45745
45979
|
return this.initOrderLineArticles(set, orderSet);
|
|
45746
45980
|
case 3:
|
|
45747
|
-
|
|
45981
|
+
_context53.next = 5;
|
|
45748
45982
|
return set.plannerHandler.extendSet(set, orderSet.SetPlanData, lastSetToInitialize);
|
|
45749
45983
|
case 5:
|
|
45750
45984
|
case "end":
|
|
45751
|
-
return
|
|
45985
|
+
return _context53.stop();
|
|
45752
45986
|
}
|
|
45753
|
-
},
|
|
45987
|
+
}, _callee50, this);
|
|
45754
45988
|
}));
|
|
45755
|
-
function addOrderSetArticlesToExistingSet(
|
|
45989
|
+
function addOrderSetArticlesToExistingSet(_x166, _x167, _x168) {
|
|
45756
45990
|
return _addOrderSetArticlesToExistingSet.apply(this, arguments);
|
|
45757
45991
|
}
|
|
45758
45992
|
return addOrderSetArticlesToExistingSet;
|
|
@@ -46860,7 +47094,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
46860
47094
|
break;
|
|
46861
47095
|
case 3:
|
|
46862
47096
|
_context12.next = 5;
|
|
46863
|
-
return import('./PfisterWWSHandler-
|
|
47097
|
+
return import('./PfisterWWSHandler-41b7b1b7.js');
|
|
46864
47098
|
case 5:
|
|
46865
47099
|
_yield$import = _context12.sent;
|
|
46866
47100
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -46868,7 +47102,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
46868
47102
|
return _context12.abrupt("break", 27);
|
|
46869
47103
|
case 9:
|
|
46870
47104
|
_context12.next = 11;
|
|
46871
|
-
return import('./LiviqueWWSHandler-
|
|
47105
|
+
return import('./LiviqueWWSHandler-c4ba143d.js');
|
|
46872
47106
|
case 11:
|
|
46873
47107
|
_yield$import2 = _context12.sent;
|
|
46874
47108
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -46876,7 +47110,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
46876
47110
|
return _context12.abrupt("break", 27);
|
|
46877
47111
|
case 15:
|
|
46878
47112
|
_context12.next = 17;
|
|
46879
|
-
return import('./SeriousBasketHandler-
|
|
47113
|
+
return import('./SeriousBasketHandler-0bb8ee55.js');
|
|
46880
47114
|
case 17:
|
|
46881
47115
|
_yield$import3 = _context12.sent;
|
|
46882
47116
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -46884,7 +47118,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
46884
47118
|
return _context12.abrupt("break", 27);
|
|
46885
47119
|
case 21:
|
|
46886
47120
|
_context12.next = 23;
|
|
46887
|
-
return import('./StandardWWSHandler-
|
|
47121
|
+
return import('./StandardWWSHandler-a8045129.js');
|
|
46888
47122
|
case 23:
|
|
46889
47123
|
_yield$import4 = _context12.sent;
|
|
46890
47124
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -48271,7 +48505,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
48271
48505
|
//If we need real time rendering initialize the SignalR and 3D host connection Handler
|
|
48272
48506
|
bootMark('signalr: chunk import start');
|
|
48273
48507
|
_context3.next = 3;
|
|
48274
|
-
return import('./Host3DSignalR-
|
|
48508
|
+
return import('./Host3DSignalR-bb6db8e6.js');
|
|
48275
48509
|
case 3:
|
|
48276
48510
|
_yield$import = _context3.sent;
|
|
48277
48511
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -50003,7 +50237,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
50003
50237
|
break;
|
|
50004
50238
|
case 8:
|
|
50005
50239
|
_context5.next = 10;
|
|
50006
|
-
return import('./DivaStandardPlanner-
|
|
50240
|
+
return import('./DivaStandardPlanner-7188da61.js');
|
|
50007
50241
|
case 10:
|
|
50008
50242
|
_yield$import = _context5.sent;
|
|
50009
50243
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -50014,7 +50248,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
50014
50248
|
return _context5.abrupt("break", 21);
|
|
50015
50249
|
case 15:
|
|
50016
50250
|
_context5.next = 17;
|
|
50017
|
-
return import('./DivaBoxPlanner-
|
|
50251
|
+
return import('./DivaBoxPlanner-6f0727a3.js');
|
|
50018
50252
|
case 17:
|
|
50019
50253
|
_yield$import2 = _context5.sent;
|
|
50020
50254
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -50557,6 +50791,62 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
50557
50791
|
}
|
|
50558
50792
|
return saveSet2DImage;
|
|
50559
50793
|
}()
|
|
50794
|
+
/**
|
|
50795
|
+
* Enqueues one browser-captured set image for upload with the basket save.
|
|
50796
|
+
*
|
|
50797
|
+
* Without a `setImagesId` the image is the set's MAIN one: the backend writes its URL into
|
|
50798
|
+
* `OrderSetData.SetImage` (or the matching `ConfigVariants[].SetImage`), so there is no
|
|
50799
|
+
* `SetImages[]` entry to return. With one, the image is an additional view and the returned
|
|
50800
|
+
* entry must be attached to the order set, otherwise the URL has no target to be written to.
|
|
50801
|
+
*
|
|
50802
|
+
* Like {@link saveSet2DImage}, the URL stays empty until the save completes — a transient
|
|
50803
|
+
* blob: URL is not serializable and must never reach a persisted field.
|
|
50804
|
+
*/
|
|
50805
|
+
}, {
|
|
50806
|
+
key: "saveCapturedSetImage",
|
|
50807
|
+
value: function saveCapturedSetImage(basket, setId, image, fileName, setImagesId, variantId) {
|
|
50808
|
+
var _image$name;
|
|
50809
|
+
var mimeType = image.format === 'jpeg' ? 'image/jpeg' : 'image/png';
|
|
50810
|
+
basket.addPendingUpload({
|
|
50811
|
+
slot: 'planning3D',
|
|
50812
|
+
setId: setId,
|
|
50813
|
+
setImagesId: setImagesId,
|
|
50814
|
+
variantId: variantId,
|
|
50815
|
+
fileName: fileName,
|
|
50816
|
+
mimeType: image.blob.type || mimeType,
|
|
50817
|
+
size: image.blob.size,
|
|
50818
|
+
blob: image.blob,
|
|
50819
|
+
previewUrl: this.createPreviewUrl(image.blob)
|
|
50820
|
+
});
|
|
50821
|
+
if (!setImagesId) return undefined;
|
|
50822
|
+
return {
|
|
50823
|
+
Description: (_image$name = image.name) !== null && _image$name !== void 0 ? _image$name : image.id,
|
|
50824
|
+
Filename: fileName,
|
|
50825
|
+
Id: setImagesId,
|
|
50826
|
+
RenderWidth: image.width,
|
|
50827
|
+
RenderHeight: image.height,
|
|
50828
|
+
URL: ''
|
|
50829
|
+
};
|
|
50830
|
+
}
|
|
50831
|
+
|
|
50832
|
+
/**
|
|
50833
|
+
* Enqueues the planning's GLB model for upload with the basket save. Its URL is written into
|
|
50834
|
+
* `OrderSetData.SetGlb` once the upload completes, so like the captured images it stays empty
|
|
50835
|
+
* here — a transient blob: URL must never reach a persisted field.
|
|
50836
|
+
*/
|
|
50837
|
+
}, {
|
|
50838
|
+
key: "saveSetGlb",
|
|
50839
|
+
value: function saveSetGlb(basket, setId, glb, fileName) {
|
|
50840
|
+
basket.addPendingUpload({
|
|
50841
|
+
slot: 'planning3DGlb',
|
|
50842
|
+
setId: setId,
|
|
50843
|
+
fileName: fileName,
|
|
50844
|
+
mimeType: glb.type || 'model/gltf-binary',
|
|
50845
|
+
size: glb.size,
|
|
50846
|
+
blob: glb,
|
|
50847
|
+
previewUrl: this.createPreviewUrl(glb)
|
|
50848
|
+
});
|
|
50849
|
+
}
|
|
50560
50850
|
}, {
|
|
50561
50851
|
key: "saveAiImage",
|
|
50562
50852
|
value: function () {
|
|
@@ -51195,6 +51485,13 @@ function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
51195
51485
|
|
|
51196
51486
|
var LOG$2 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
51197
51487
|
|
|
51488
|
+
/** One image captured from the live 3D viewer when a planning is saved. */
|
|
51489
|
+
|
|
51490
|
+
/**
|
|
51491
|
+
* The result of capturing a set's save shots in the browser — the replacement for a render-farm
|
|
51492
|
+
* rendering. The first image is the set's main image; the rest are additional views.
|
|
51493
|
+
*/
|
|
51494
|
+
|
|
51198
51495
|
/**
|
|
51199
51496
|
* Everything the planner calls on its attached view, registered as ONE object via
|
|
51200
51497
|
* {@link DivaWebPlanner.attachView} (mount or adoption of an existing instance) and removed
|
|
@@ -51337,6 +51634,35 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51337
51634
|
}
|
|
51338
51635
|
}, _callee);
|
|
51339
51636
|
})));
|
|
51637
|
+
/**
|
|
51638
|
+
* Captures the set images from the live viewer. `view === undefined` is the headless state, so
|
|
51639
|
+
* a headless artifact pass returns undefined here and keeps using the render farm.
|
|
51640
|
+
*/
|
|
51641
|
+
_defineProperty(this, "captureSetImages", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
51642
|
+
var _this$view12;
|
|
51643
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
51644
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
51645
|
+
case 0:
|
|
51646
|
+
return _context2.abrupt("return", (_this$view12 = _this.view) === null || _this$view12 === void 0 ? void 0 : _this$view12.captureSetImages());
|
|
51647
|
+
case 1:
|
|
51648
|
+
case "end":
|
|
51649
|
+
return _context2.stop();
|
|
51650
|
+
}
|
|
51651
|
+
}, _callee2);
|
|
51652
|
+
})));
|
|
51653
|
+
/** Headless (`view === undefined`) has no scene to export, so it produces no model. */
|
|
51654
|
+
_defineProperty(this, "exportSetGlb", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
51655
|
+
var _this$view13;
|
|
51656
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
51657
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
51658
|
+
case 0:
|
|
51659
|
+
return _context3.abrupt("return", (_this$view13 = _this.view) === null || _this$view13 === void 0 ? void 0 : _this$view13.exportSetGlb());
|
|
51660
|
+
case 1:
|
|
51661
|
+
case "end":
|
|
51662
|
+
return _context3.stop();
|
|
51663
|
+
}
|
|
51664
|
+
}, _callee3);
|
|
51665
|
+
})));
|
|
51340
51666
|
/***********************************Functions in Logik called From View *************************************/
|
|
51341
51667
|
_defineProperty(this, "onElementSelectionChanged", function (setId, elementId, oldTabgroupType) {
|
|
51342
51668
|
if (setId) {
|
|
@@ -51348,59 +51674,59 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51348
51674
|
* This Function ist call from the View when all Planner Article are Requested for listing
|
|
51349
51675
|
*/
|
|
51350
51676
|
_defineProperty(this, "loadCatalogPlannerArticles", function (paletteeId, isUpdate, type, dockFilter, actStepName, stepKey, selectedArticle) {
|
|
51351
|
-
var _this$
|
|
51677
|
+
var _this$view14;
|
|
51352
51678
|
//Das aktuelle Set weiß welcher catalog gerade geladen ist.
|
|
51353
51679
|
//Von diesem Katalog müssen wir die CatalogPlannerArticles laden.
|
|
51354
|
-
(_this$
|
|
51680
|
+
(_this$view14 = _this.view) === null || _this$view14 === void 0 || _this$view14.updateCatalogPlannerArticles(setHandlerInstance.getPlannerPaletteViewInfo(_this.actSet(), type, selectedArticle), paletteeId, isUpdate, type, dockFilter, actStepName, stepKey);
|
|
51355
51681
|
});
|
|
51356
51682
|
_defineProperty(this, "loadCatalogPlannerArticles2Dot0", function (isUpdate, onlySelectionChanged, dp) {
|
|
51357
|
-
var _this$
|
|
51358
|
-
(_this$
|
|
51683
|
+
var _this$view15;
|
|
51684
|
+
(_this$view15 = _this.view) === null || _this$view15 === void 0 || _this$view15.updateCatalogPlanner2Dot0Articles(setHandlerInstance.getPlanner2Dot0PaletteViewInfo(_this.actSet()), isUpdate, onlySelectionChanged, dp);
|
|
51359
51685
|
});
|
|
51360
51686
|
/**
|
|
51361
51687
|
* this fuction loads the accessoires of a specific article -> could be more than one article in the future
|
|
51362
51688
|
* @param targetArticles the article of which we load the accessoires
|
|
51363
51689
|
*/
|
|
51364
51690
|
_defineProperty(this, "loadAccessoiresOfArticles", function (targetArticles) {
|
|
51365
|
-
var _this$
|
|
51691
|
+
var _this$view16;
|
|
51366
51692
|
var set = _this.actSet();
|
|
51367
51693
|
if (!set) return;
|
|
51368
|
-
(_this$
|
|
51694
|
+
(_this$view16 = _this.view) === null || _this$view16 === void 0 || _this$view16.updateAccessoiresPalette(setHandlerInstance.getAccessoriesOfArticles(_this.actSet(), targetArticles), set.configAccessoiresInAccessoireStep ? 'ACC_CONFIG' : 'ACC');
|
|
51369
51695
|
});
|
|
51370
51696
|
/**
|
|
51371
51697
|
* this function is called when all Items of a ConfigStep are requested
|
|
51372
51698
|
* @param configStepKey unique indentifier for configStep
|
|
51373
51699
|
*/
|
|
51374
51700
|
_defineProperty(this, "loadConfigItemsOfOptions", /*#__PURE__*/function () {
|
|
51375
|
-
var
|
|
51376
|
-
var _this$state2, _this$state3, _this$
|
|
51701
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(configStepKey, paletteId, isUpdate, visible) {
|
|
51702
|
+
var _this$state2, _this$state3, _this$view17;
|
|
51377
51703
|
var retValues;
|
|
51378
|
-
return _regeneratorRuntime.wrap(function
|
|
51379
|
-
while (1) switch (
|
|
51704
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
51705
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
51380
51706
|
case 0:
|
|
51381
|
-
|
|
51707
|
+
_context4.next = 2;
|
|
51382
51708
|
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));
|
|
51383
51709
|
case 2:
|
|
51384
|
-
retValues =
|
|
51385
|
-
(_this$
|
|
51710
|
+
retValues = _context4.sent;
|
|
51711
|
+
(_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);
|
|
51386
51712
|
case 4:
|
|
51387
51713
|
case "end":
|
|
51388
|
-
return
|
|
51714
|
+
return _context4.stop();
|
|
51389
51715
|
}
|
|
51390
|
-
},
|
|
51716
|
+
}, _callee4);
|
|
51391
51717
|
}));
|
|
51392
51718
|
return function (_x, _x2, _x3, _x4) {
|
|
51393
|
-
return
|
|
51719
|
+
return _ref4.apply(this, arguments);
|
|
51394
51720
|
};
|
|
51395
51721
|
}());
|
|
51396
51722
|
/**
|
|
51397
51723
|
* this function laods the summary Items
|
|
51398
51724
|
*/
|
|
51399
|
-
_defineProperty(this, "loadSummaryItems", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
51400
|
-
var _this$actions, _this$actions$toggleL, _this$
|
|
51725
|
+
_defineProperty(this, "loadSummaryItems", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
|
|
51726
|
+
var _this$actions, _this$actions$toggleL, _this$view18, _this$actions2, _this$actions2$toggle;
|
|
51401
51727
|
var setPriceCurrency, setPriceFormat, summaryItems;
|
|
51402
|
-
return _regeneratorRuntime.wrap(function
|
|
51403
|
-
while (1) switch (
|
|
51728
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
51729
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
51404
51730
|
case 0:
|
|
51405
51731
|
setPriceCurrency = setHandlerInstance.getActSetPriceFormat(_this.actSet());
|
|
51406
51732
|
setPriceFormat = undefined;
|
|
@@ -51411,32 +51737,32 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51411
51737
|
}
|
|
51412
51738
|
//Do also pass the correct price format
|
|
51413
51739
|
(_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');
|
|
51414
|
-
|
|
51740
|
+
_context5.next = 6;
|
|
51415
51741
|
return summaryHandlerInstance.getSummaryItems(_this.sets, _this.doConfigure.bind(_this));
|
|
51416
51742
|
case 6:
|
|
51417
|
-
summaryItems =
|
|
51418
|
-
(_this$
|
|
51743
|
+
summaryItems = _context5.sent;
|
|
51744
|
+
(_this$view18 = _this.view) === null || _this$view18 === void 0 || _this$view18.updateSummaryItems(summaryItems, setPriceFormat, summaryHandlerInstance.getSummaryStepWarning(_this.actSet(), summaryItems));
|
|
51419
51745
|
(_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');
|
|
51420
51746
|
case 9:
|
|
51421
51747
|
case "end":
|
|
51422
|
-
return
|
|
51748
|
+
return _context5.stop();
|
|
51423
51749
|
}
|
|
51424
|
-
},
|
|
51750
|
+
}, _callee5);
|
|
51425
51751
|
})));
|
|
51426
51752
|
_defineProperty(this, "loadStaticRoomList", function (dontUpdateView) {
|
|
51427
|
-
var _this$
|
|
51428
|
-
(_this$
|
|
51753
|
+
var _this$view19;
|
|
51754
|
+
(_this$view19 = _this.view) === null || _this$view19 === void 0 || _this$view19.updateStaticRoomListItems(setHandlerInstance.getStaticRoomListItems(_this.actSet()), dontUpdateView);
|
|
51429
51755
|
});
|
|
51430
51756
|
_defineProperty(this, "loadShelfPlannerItems", function (paletteId, configStepKey, from) {
|
|
51431
|
-
var _this$
|
|
51757
|
+
var _this$view20;
|
|
51432
51758
|
var _DivaSetHandler$getSh = setHandlerInstance.getShelfPlannerItems(_this.actSet(), configStepKey),
|
|
51433
51759
|
accessoires = _DivaSetHandler$getSh.accessoires,
|
|
51434
51760
|
grids = _DivaSetHandler$getSh.grids;
|
|
51435
|
-
(_this$
|
|
51761
|
+
(_this$view20 = _this.view) === null || _this$view20 === void 0 || _this$view20.updateShelfPlannerItems(paletteId, accessoires, grids, configStepKey, from);
|
|
51436
51762
|
});
|
|
51437
51763
|
_defineProperty(this, "loadDoorPlannerItems", function (configStepKey) {
|
|
51438
|
-
var _this$
|
|
51439
|
-
(_this$
|
|
51764
|
+
var _this$view21;
|
|
51765
|
+
(_this$view21 = _this.view) === null || _this$view21 === void 0 || _this$view21.updateDoorPlannerItems(setHandlerInstance.getDoorPlannerItems(_this.actSet(), configStepKey), configStepKey);
|
|
51440
51766
|
});
|
|
51441
51767
|
/**
|
|
51442
51768
|
* This function is called when switching from one planning to another. All Planner handler are destroyed.
|
|
@@ -51452,61 +51778,61 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51452
51778
|
* @param parentElement ElementID of the parent element used for docking
|
|
51453
51779
|
*/
|
|
51454
51780
|
_defineProperty(this, "addPlannerElement", /*#__PURE__*/function () {
|
|
51455
|
-
var
|
|
51456
|
-
var _this$actions3, _this$actions3$toggle, _this$actions6, _this$actions6$toggle, _this$
|
|
51781
|
+
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(elementCodex, initParams, dontUpdateView) {
|
|
51782
|
+
var _this$actions3, _this$actions3$toggle, _this$actions6, _this$actions6$toggle, _this$view22, _this$view23, _this$view24;
|
|
51457
51783
|
var set, newArticle, _this$actions4, _this$actions4$openMo, _this$i18n, _this$i18n2, _this$actions5, _this$actions5$toggle, baseArticle;
|
|
51458
|
-
return _regeneratorRuntime.wrap(function
|
|
51459
|
-
while (1) switch (
|
|
51784
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
51785
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
51460
51786
|
case 0:
|
|
51461
51787
|
set = _this.actSet();
|
|
51462
51788
|
(_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);
|
|
51463
|
-
|
|
51464
|
-
|
|
51789
|
+
_context6.prev = 2;
|
|
51790
|
+
_context6.next = 5;
|
|
51465
51791
|
return setHandlerInstance.addPlannerElement(set, elementCodex, initParams);
|
|
51466
51792
|
case 5:
|
|
51467
|
-
newArticle =
|
|
51468
|
-
|
|
51793
|
+
newArticle = _context6.sent;
|
|
51794
|
+
_context6.next = 13;
|
|
51469
51795
|
break;
|
|
51470
51796
|
case 8:
|
|
51471
|
-
|
|
51472
|
-
|
|
51797
|
+
_context6.prev = 8;
|
|
51798
|
+
_context6.t0 = _context6["catch"](2);
|
|
51473
51799
|
(_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, {
|
|
51474
51800
|
accept: true,
|
|
51475
51801
|
title: (_this$i18n = _this.i18n()) === null || _this$i18n === void 0 ? void 0 : _this$i18n.t('Error'),
|
|
51476
|
-
text: (
|
|
51802
|
+
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.getCurrentTraceId() + ' ' + DivaUtils.formatDate(new Date(), true, undefined, true)
|
|
51477
51803
|
});
|
|
51478
51804
|
(_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);
|
|
51479
|
-
throw new Error(
|
|
51805
|
+
throw new Error(_context6.t0);
|
|
51480
51806
|
case 13:
|
|
51481
51807
|
(_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);
|
|
51482
51808
|
if (!newArticle.toDeleteAfterInit) {
|
|
51483
|
-
|
|
51809
|
+
_context6.next = 18;
|
|
51484
51810
|
break;
|
|
51485
51811
|
}
|
|
51486
|
-
|
|
51812
|
+
_context6.next = 17;
|
|
51487
51813
|
return _this.deletePlannerElement(newArticle.setId, newArticle.elementId, true);
|
|
51488
51814
|
case 17:
|
|
51489
|
-
return
|
|
51815
|
+
return _context6.abrupt("return", newArticle.doNotDeleteAccWhenNotDocked ? 'AccessoireNotVisualized' : 'AccessorieNoFreeSpace');
|
|
51490
51816
|
case 18:
|
|
51491
51817
|
_this.updateConfigStructure();
|
|
51492
|
-
(_this$
|
|
51818
|
+
(_this$view22 = _this.view) === null || _this$view22 === void 0 || _this$view22.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
51493
51819
|
_this.updatePlannerView('ADD_PLANNER_ELEMENT');
|
|
51494
51820
|
_this.updateWebConfiguratorTitle();
|
|
51495
51821
|
_this.updatePriceInView();
|
|
51496
|
-
(_this$
|
|
51822
|
+
(_this$view23 = _this.view) === null || _this$view23 === void 0 || _this$view23.updateViewButtonsDependigOnConfigStructure();
|
|
51497
51823
|
baseArticle = setHandlerInstance.getBaseParentArticleOfAccessoire(set, newArticle.basketId);
|
|
51498
|
-
if (!dontUpdateView) (_this$
|
|
51824
|
+
if (!dontUpdateView) (_this$view24 = _this.view) === null || _this$view24 === void 0 || _this$view24.updateElementSelectionPlanner([baseArticle.setId], [baseArticle.elementId], true);
|
|
51499
51825
|
_this.checkMatchingProducts('onAdd');
|
|
51500
51826
|
_this.plannerChangeLog('onAddPlanner');
|
|
51501
|
-
return
|
|
51827
|
+
return _context6.abrupt("return", 'ElementAdded');
|
|
51502
51828
|
case 29:
|
|
51503
51829
|
case "end":
|
|
51504
|
-
return
|
|
51830
|
+
return _context6.stop();
|
|
51505
51831
|
}
|
|
51506
|
-
},
|
|
51832
|
+
}, _callee6, null, [[2, 8]]);
|
|
51507
51833
|
}));
|
|
51508
51834
|
return function (_x5, _x6, _x7) {
|
|
51509
|
-
return
|
|
51835
|
+
return _ref6.apply(this, arguments);
|
|
51510
51836
|
};
|
|
51511
51837
|
}());
|
|
51512
51838
|
/**
|
|
@@ -51516,114 +51842,114 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51516
51842
|
* @param articleCodex articleCodex of the new Element
|
|
51517
51843
|
*/
|
|
51518
51844
|
_defineProperty(this, "switchPlannerElement", /*#__PURE__*/function () {
|
|
51519
|
-
var
|
|
51520
|
-
var _this$actions7, _this$actions7$toggle, _this$actions8, _this$actions8$toggle, _this$
|
|
51845
|
+
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(setId, elementId, articleCodex, initParams) {
|
|
51846
|
+
var _this$actions7, _this$actions7$toggle, _this$actions8, _this$actions8$toggle, _this$view25, _this$view26, _this$view27;
|
|
51521
51847
|
var set, variantValues, deletionResult, article;
|
|
51522
|
-
return _regeneratorRuntime.wrap(function
|
|
51523
|
-
while (1) switch (
|
|
51848
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
51849
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
51524
51850
|
case 0:
|
|
51525
51851
|
_this.setActSet(setId);
|
|
51526
51852
|
set = _this.actSet();
|
|
51527
51853
|
variantValues = setHandlerInstance.getVariantValuesOfElement(set, elementId);
|
|
51528
|
-
|
|
51854
|
+
_context7.next = 5;
|
|
51529
51855
|
return setHandlerInstance.deleteElementFromSetByElemId(set, elementId);
|
|
51530
51856
|
case 5:
|
|
51531
|
-
deletionResult =
|
|
51857
|
+
deletionResult = _context7.sent;
|
|
51532
51858
|
(_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);
|
|
51533
51859
|
initParams.oldPlannerTransform = deletionResult.oldTransform;
|
|
51534
51860
|
initParams.variantValues = _objectSpread$7(_objectSpread$7({}, variantValues), {}, _defineProperty({}, (!set.CatalogData.isIDMFormat ? 'OPT' : '') + 'PLANNERSWITCH', (!set.CatalogData.isIDMFormat ? 'OPV' : '') + articleCodex));
|
|
51535
|
-
|
|
51861
|
+
_context7.next = 11;
|
|
51536
51862
|
return setHandlerInstance.addPlannerElement(set, articleCodex, initParams);
|
|
51537
51863
|
case 11:
|
|
51538
|
-
article =
|
|
51539
|
-
|
|
51864
|
+
article = _context7.sent;
|
|
51865
|
+
_context7.next = 14;
|
|
51540
51866
|
return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, article.getValidValues(article.VariantValues, undefined, true), [article.basketId], undefined, 'initializing');
|
|
51541
51867
|
case 14:
|
|
51542
51868
|
(_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);
|
|
51543
51869
|
_this.updateConfigStructure();
|
|
51544
|
-
(_this$
|
|
51870
|
+
(_this$view25 = _this.view) === null || _this$view25 === void 0 || _this$view25.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
51545
51871
|
_this.updatePlannerView('SWITCH_PLANNER_ELEMENT');
|
|
51546
51872
|
_this.updateWebConfiguratorTitle();
|
|
51547
|
-
(_this$
|
|
51873
|
+
(_this$view26 = _this.view) === null || _this$view26 === void 0 || _this$view26.updateElementSelectionPlanner([article.setId], [article.elementId], true);
|
|
51548
51874
|
_this.updatePriceInView();
|
|
51549
|
-
(_this$
|
|
51875
|
+
(_this$view27 = _this.view) === null || _this$view27 === void 0 || _this$view27.updateViewButtonsDependigOnConfigStructure();
|
|
51550
51876
|
_this.checkMatchingProducts('onSwitch');
|
|
51551
51877
|
_this.plannerChangeLog('onSwitchPlanner');
|
|
51552
51878
|
case 24:
|
|
51553
51879
|
case "end":
|
|
51554
|
-
return
|
|
51880
|
+
return _context7.stop();
|
|
51555
51881
|
}
|
|
51556
|
-
},
|
|
51882
|
+
}, _callee7);
|
|
51557
51883
|
}));
|
|
51558
51884
|
return function (_x8, _x9, _x10, _x11) {
|
|
51559
|
-
return
|
|
51885
|
+
return _ref7.apply(this, arguments);
|
|
51560
51886
|
};
|
|
51561
51887
|
}());
|
|
51562
51888
|
_defineProperty(this, "addAccessorieOnShelfPlanner", /*#__PURE__*/function () {
|
|
51563
|
-
var
|
|
51889
|
+
var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey, partlistCodexToInit) {
|
|
51564
51890
|
var _this$actions9, _this$actions9$toggle, _this$actions10, _this$actions10$toggl;
|
|
51565
|
-
var set, retVal, _this$
|
|
51566
|
-
return _regeneratorRuntime.wrap(function
|
|
51567
|
-
while (1) switch (
|
|
51891
|
+
var set, retVal, _this$view28, _this$view29;
|
|
51892
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
51893
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
51568
51894
|
case 0:
|
|
51569
51895
|
set = _this.actSet();
|
|
51570
51896
|
(_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);
|
|
51571
|
-
|
|
51897
|
+
_context8.next = 4;
|
|
51572
51898
|
return setHandlerInstance.addAccessorieOnShelfPlanner(set, gridIndex, cellIndex, parentBasketId, {
|
|
51573
51899
|
partlistCodexToInit: partlistCodexToInit
|
|
51574
51900
|
});
|
|
51575
51901
|
case 4:
|
|
51576
|
-
retVal =
|
|
51902
|
+
retVal = _context8.sent;
|
|
51577
51903
|
(_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);
|
|
51578
51904
|
if (retVal !== false) {
|
|
51579
51905
|
_this.loadShelfPlannerItems(paletteId, configStepKey, 'add_accessoire');
|
|
51580
51906
|
_this.updateConfigStructure();
|
|
51581
51907
|
_this.updatePriceInView();
|
|
51582
|
-
(_this$
|
|
51583
|
-
(_this$
|
|
51908
|
+
(_this$view28 = _this.view) === null || _this$view28 === void 0 || _this$view28.updateViewButtonsDependigOnConfigStructure();
|
|
51909
|
+
(_this$view29 = _this.view) === null || _this$view29 === void 0 || _this$view29.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
51584
51910
|
_this.loadPaletteInfos(configStepKey);
|
|
51585
51911
|
_this.updatePlannerView('ADD_ACC_ON_SHELF_PLANNER');
|
|
51586
51912
|
}
|
|
51587
51913
|
_this.checkMatchingProducts('onShelfAdd');
|
|
51588
51914
|
_this.plannerChangeLog('onAddPlanner');
|
|
51589
|
-
return
|
|
51915
|
+
return _context8.abrupt("return", retVal);
|
|
51590
51916
|
case 10:
|
|
51591
51917
|
case "end":
|
|
51592
|
-
return
|
|
51918
|
+
return _context8.stop();
|
|
51593
51919
|
}
|
|
51594
|
-
},
|
|
51920
|
+
}, _callee8);
|
|
51595
51921
|
}));
|
|
51596
51922
|
return function (_x12, _x13, _x14, _x15, _x16, _x17) {
|
|
51597
|
-
return
|
|
51923
|
+
return _ref8.apply(this, arguments);
|
|
51598
51924
|
};
|
|
51599
51925
|
}());
|
|
51600
51926
|
_defineProperty(this, "moveShelfItem", /*#__PURE__*/function () {
|
|
51601
|
-
var
|
|
51602
|
-
var _this$
|
|
51603
|
-
var set, result, _this$
|
|
51604
|
-
return _regeneratorRuntime.wrap(function
|
|
51605
|
-
while (1) switch (
|
|
51927
|
+
var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(paletteId, grid, initialIndex, finalIndex, configStepKey) {
|
|
51928
|
+
var _this$view31;
|
|
51929
|
+
var set, result, _this$view30, _this$i18n3;
|
|
51930
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
51931
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
51606
51932
|
case 0:
|
|
51607
51933
|
set = _this.actSet();
|
|
51608
|
-
|
|
51934
|
+
_context9.next = 3;
|
|
51609
51935
|
return setHandlerInstance.moveShelfItem(set, grid, initialIndex, finalIndex);
|
|
51610
51936
|
case 3:
|
|
51611
|
-
result =
|
|
51937
|
+
result = _context9.sent;
|
|
51612
51938
|
if (result == 'RESETTED_CELLS') {
|
|
51613
|
-
(_this$
|
|
51939
|
+
(_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);
|
|
51614
51940
|
}
|
|
51615
51941
|
_this.updateConfigStructure();
|
|
51616
51942
|
_this.loadShelfPlannerItems(paletteId, configStepKey, 'move sheld');
|
|
51617
|
-
(_this$
|
|
51943
|
+
(_this$view31 = _this.view) === null || _this$view31 === void 0 || _this$view31.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
51618
51944
|
_this.updatePlannerView('MOVE_SHELF_ITEM');
|
|
51619
51945
|
case 9:
|
|
51620
51946
|
case "end":
|
|
51621
|
-
return
|
|
51947
|
+
return _context9.stop();
|
|
51622
51948
|
}
|
|
51623
|
-
},
|
|
51949
|
+
}, _callee9);
|
|
51624
51950
|
}));
|
|
51625
51951
|
return function (_x18, _x19, _x20, _x21, _x22) {
|
|
51626
|
-
return
|
|
51952
|
+
return _ref9.apply(this, arguments);
|
|
51627
51953
|
};
|
|
51628
51954
|
}());
|
|
51629
51955
|
_defineProperty(this, "moveDoors", function (movedDoor, targetDoor) {
|
|
@@ -51631,33 +51957,33 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51631
51957
|
_this.updatePlannerView('MOVE_DOORS');
|
|
51632
51958
|
});
|
|
51633
51959
|
_defineProperty(this, "deleteAccessorieOnShelfPlanner", /*#__PURE__*/function () {
|
|
51634
|
-
var
|
|
51635
|
-
var _this$
|
|
51960
|
+
var _ref10 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey) {
|
|
51961
|
+
var _this$view32, _this$view33;
|
|
51636
51962
|
var set;
|
|
51637
|
-
return _regeneratorRuntime.wrap(function
|
|
51638
|
-
while (1) switch (
|
|
51963
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
51964
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
51639
51965
|
case 0:
|
|
51640
51966
|
set = _this.actSet();
|
|
51641
|
-
|
|
51967
|
+
_context10.next = 3;
|
|
51642
51968
|
return setHandlerInstance.deleteAccessorieOnShelfPlanner(set, gridIndex, cellIndex, parentBasketId);
|
|
51643
51969
|
case 3:
|
|
51644
51970
|
_this.updateConfigStructure();
|
|
51645
51971
|
_this.loadShelfPlannerItems(paletteId, configStepKey, 'delete accessorie');
|
|
51646
51972
|
_this.updatePriceInView();
|
|
51647
|
-
(_this$
|
|
51648
|
-
(_this$
|
|
51973
|
+
(_this$view32 = _this.view) === null || _this$view32 === void 0 || _this$view32.updateViewButtonsDependigOnConfigStructure();
|
|
51974
|
+
(_this$view33 = _this.view) === null || _this$view33 === void 0 || _this$view33.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
51649
51975
|
_this.loadPaletteInfos(configStepKey);
|
|
51650
51976
|
_this.updatePlannerView('DELETE_ACC_ON_SHELF_PLANNER');
|
|
51651
51977
|
_this.checkMatchingProducts('onShelfDelete');
|
|
51652
51978
|
_this.plannerChangeLog('onDeletePlanner');
|
|
51653
51979
|
case 12:
|
|
51654
51980
|
case "end":
|
|
51655
|
-
return
|
|
51981
|
+
return _context10.stop();
|
|
51656
51982
|
}
|
|
51657
|
-
},
|
|
51983
|
+
}, _callee10);
|
|
51658
51984
|
}));
|
|
51659
51985
|
return function (_x23, _x24, _x25, _x26, _x27) {
|
|
51660
|
-
return
|
|
51986
|
+
return _ref10.apply(this, arguments);
|
|
51661
51987
|
};
|
|
51662
51988
|
}());
|
|
51663
51989
|
/**
|
|
@@ -51668,26 +51994,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51668
51994
|
* @param transState
|
|
51669
51995
|
*/
|
|
51670
51996
|
_defineProperty(this, "updatePlannerTrans", /*#__PURE__*/function () {
|
|
51671
|
-
var
|
|
51672
|
-
var _this$
|
|
51673
|
-
return _regeneratorRuntime.wrap(function
|
|
51674
|
-
while (1) switch (
|
|
51997
|
+
var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(setId, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance, turningPoint) {
|
|
51998
|
+
var _this$view34;
|
|
51999
|
+
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
52000
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
51675
52001
|
case 0:
|
|
51676
|
-
|
|
52002
|
+
_context11.next = 2;
|
|
51677
52003
|
return setHandlerInstance.updatePlannerTrans(_this.actSet(), plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance, turningPoint);
|
|
51678
52004
|
case 2:
|
|
51679
52005
|
if (transState == 'END') {
|
|
51680
52006
|
_this.updatePlannerView('UPDATE_PLANNER_TRANS');
|
|
51681
|
-
(_this$
|
|
52007
|
+
(_this$view34 = _this.view) === null || _this$view34 === void 0 || _this$view34.updateElementSelectionPlanner([setId], [plannerElementID], true);
|
|
51682
52008
|
}
|
|
51683
52009
|
case 3:
|
|
51684
52010
|
case "end":
|
|
51685
|
-
return
|
|
52011
|
+
return _context11.stop();
|
|
51686
52012
|
}
|
|
51687
|
-
},
|
|
52013
|
+
}, _callee11);
|
|
51688
52014
|
}));
|
|
51689
52015
|
return function (_x28, _x29, _x30, _x31, _x32, _x33, _x34, _x35) {
|
|
51690
|
-
return
|
|
52016
|
+
return _ref11.apply(this, arguments);
|
|
51691
52017
|
};
|
|
51692
52018
|
}());
|
|
51693
52019
|
/**
|
|
@@ -51707,86 +52033,86 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51707
52033
|
* @param avoidUpdateRendering If this parameter is set to true, the function only updates the viewPointHandler - no rendering is made.
|
|
51708
52034
|
*/
|
|
51709
52035
|
_defineProperty(this, "handle3DVisualizationChanged", function (mode, params, avoidUpdateRendering) {
|
|
51710
|
-
var _this$
|
|
52036
|
+
var _this$view35;
|
|
51711
52037
|
var set = _this.actSet();
|
|
51712
52038
|
if (!set) return;
|
|
51713
|
-
setHandlerInstance.handle3DVisualizationChanged(set, mode, params, (_this$
|
|
52039
|
+
setHandlerInstance.handle3DVisualizationChanged(set, mode, params, (_this$view35 = _this.view) === null || _this$view35 === void 0 ? void 0 : _this$view35.getDoShow3DDimensionLines());
|
|
51714
52040
|
if (avoidUpdateRendering) return;
|
|
51715
52041
|
if (mode != 'Nav3DFullScreen') {
|
|
51716
52042
|
_this.updatePlannerView('HANDLE_3D_VIS_CHANGED');
|
|
51717
52043
|
}
|
|
51718
52044
|
});
|
|
51719
52045
|
_defineProperty(this, "updateAccessoireQuantity", /*#__PURE__*/function () {
|
|
51720
|
-
var
|
|
51721
|
-
var _this$actions11, _this$actions11$toggl, _this$actions12, _this$actions12$toggl, _this$
|
|
52046
|
+
var _ref12 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle) {
|
|
52047
|
+
var _this$actions11, _this$actions11$toggl, _this$actions12, _this$actions12$toggl, _this$view36;
|
|
51722
52048
|
var set, ret;
|
|
51723
|
-
return _regeneratorRuntime.wrap(function
|
|
51724
|
-
while (1) switch (
|
|
52049
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
52050
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
51725
52051
|
case 0:
|
|
51726
52052
|
set = _this.actSet();
|
|
51727
52053
|
(_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);
|
|
51728
|
-
|
|
52054
|
+
_context12.next = 4;
|
|
51729
52055
|
return setHandlerInstance.updateAccessoireQuantity(set, accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle);
|
|
51730
52056
|
case 4:
|
|
51731
|
-
ret =
|
|
52057
|
+
ret = _context12.sent;
|
|
51732
52058
|
(_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);
|
|
51733
52059
|
if (ret.somethingChanged) _this.updateConfigStructure();
|
|
51734
52060
|
_this.updatePlannerView('UPDATE_ACC_QUANTITY');
|
|
51735
52061
|
_this.updatePriceInView();
|
|
51736
|
-
(_this$
|
|
52062
|
+
(_this$view36 = _this.view) === null || _this$view36 === void 0 || _this$view36.updateViewButtonsDependigOnConfigStructure();
|
|
51737
52063
|
_this.checkMatchingProducts('onAccessoireUpdate');
|
|
51738
52064
|
_this.plannerChangeLog('onUpdateAccessoireQuantity');
|
|
51739
52065
|
case 12:
|
|
51740
52066
|
case "end":
|
|
51741
|
-
return
|
|
52067
|
+
return _context12.stop();
|
|
51742
52068
|
}
|
|
51743
|
-
},
|
|
52069
|
+
}, _callee12);
|
|
51744
52070
|
}));
|
|
51745
52071
|
return function (_x36, _x37, _x38, _x39) {
|
|
51746
|
-
return
|
|
52072
|
+
return _ref12.apply(this, arguments);
|
|
51747
52073
|
};
|
|
51748
52074
|
}());
|
|
51749
52075
|
_defineProperty(this, "deleteAccessoire", /*#__PURE__*/function () {
|
|
51750
|
-
var
|
|
51751
|
-
var set, wasDeleted, _this$
|
|
51752
|
-
return _regeneratorRuntime.wrap(function
|
|
51753
|
-
while (1) switch (
|
|
52076
|
+
var _ref13 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(articleCodex, parentBasketId) {
|
|
52077
|
+
var set, wasDeleted, _this$view37, _this$view38;
|
|
52078
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
52079
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
51754
52080
|
case 0:
|
|
51755
52081
|
set = _this.actSet();
|
|
51756
|
-
|
|
52082
|
+
_context13.next = 3;
|
|
51757
52083
|
return setHandlerInstance.deleteAccessoire(set, articleCodex, parentBasketId);
|
|
51758
52084
|
case 3:
|
|
51759
|
-
wasDeleted =
|
|
52085
|
+
wasDeleted = _context13.sent;
|
|
51760
52086
|
if (wasDeleted) {
|
|
51761
52087
|
_this.updateConfigStructure();
|
|
51762
|
-
(_this$
|
|
52088
|
+
(_this$view37 = _this.view) === null || _this$view37 === void 0 || _this$view37.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
51763
52089
|
_this.updatePlannerView('DELETE_ACC');
|
|
51764
52090
|
_this.updatePriceInView();
|
|
51765
|
-
(_this$
|
|
52091
|
+
(_this$view38 = _this.view) === null || _this$view38 === void 0 || _this$view38.updateViewButtonsDependigOnConfigStructure();
|
|
51766
52092
|
}
|
|
51767
52093
|
_this.checkMatchingProducts('onAccessoireDelete');
|
|
51768
52094
|
_this.plannerChangeLog('onDeletePlanner');
|
|
51769
|
-
return
|
|
52095
|
+
return _context13.abrupt("return", wasDeleted);
|
|
51770
52096
|
case 8:
|
|
51771
52097
|
case "end":
|
|
51772
|
-
return
|
|
52098
|
+
return _context13.stop();
|
|
51773
52099
|
}
|
|
51774
|
-
},
|
|
52100
|
+
}, _callee13);
|
|
51775
52101
|
}));
|
|
51776
52102
|
return function (_x40, _x41) {
|
|
51777
|
-
return
|
|
52103
|
+
return _ref13.apply(this, arguments);
|
|
51778
52104
|
};
|
|
51779
52105
|
}());
|
|
51780
52106
|
_defineProperty(this, "includeFamilyInFreePlaces", false);
|
|
51781
52107
|
_defineProperty(this, "loadPaletteInfos", function (configStepKey, activeArticles, targetArticles) {
|
|
51782
|
-
var _this$
|
|
52108
|
+
var _this$view39, _this$view40, _this$view41;
|
|
51783
52109
|
var set = _this.actSet();
|
|
51784
52110
|
if (!set) return;
|
|
51785
52111
|
var retValues = setHandlerInstance.loadPaletteInfos(set, configStepKey, activeArticles, targetArticles);
|
|
51786
52112
|
if (!retValues.articleInfos) return;
|
|
51787
|
-
(_this$
|
|
51788
|
-
(_this$
|
|
51789
|
-
(_this$
|
|
52113
|
+
(_this$view39 = _this.view) === null || _this$view39 === void 0 || _this$view39.updatePaletteInfos(retValues.articleInfos, retValues.doShowConfigSingle, retValues.isConfigSingle, retValues.bbox);
|
|
52114
|
+
(_this$view40 = _this.view) === null || _this$view40 === void 0 || _this$view40.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
52115
|
+
(_this$view41 = _this.view) === null || _this$view41 === void 0 || _this$view41.updateElementSelectionConfig(retValues.articleInfos, _this.doAllowSetPlanner());
|
|
51790
52116
|
});
|
|
51791
52117
|
_defineProperty(this, "getBasketIdsOfElementIdLogic", function (elementId) {
|
|
51792
52118
|
return setHandlerInstance.getBasketIdOfElementId(_this.actSet(), elementId);
|
|
@@ -51797,13 +52123,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51797
52123
|
* @param configStepKey act ConfigStep
|
|
51798
52124
|
*/
|
|
51799
52125
|
_defineProperty(this, "configSingleIsChanged", /*#__PURE__*/function () {
|
|
51800
|
-
var
|
|
52126
|
+
var _ref14 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(doConfigSingle, configStepKey, groupedOptions, groupedArticles, optionCodex, tabGroupKey) {
|
|
51801
52127
|
var set;
|
|
51802
|
-
return _regeneratorRuntime.wrap(function
|
|
51803
|
-
while (1) switch (
|
|
52128
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
52129
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
51804
52130
|
case 0:
|
|
51805
52131
|
set = _this.actSet();
|
|
51806
|
-
|
|
52132
|
+
_context14.next = 3;
|
|
51807
52133
|
return setHandlerInstance.configSingleIsChanged(set, doConfigSingle, groupedOptions, groupedArticles);
|
|
51808
52134
|
case 3:
|
|
51809
52135
|
_this.updatePriceInView();
|
|
@@ -51813,15 +52139,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51813
52139
|
configStepKey = setHandlerInstance.getNewConfigStepKeyInOption(set, configStepKey, optionCodex, tabGroupKey);
|
|
51814
52140
|
_this.updatePlannerView('CONFIG_SINGLE_IS_CHANGED');
|
|
51815
52141
|
}
|
|
51816
|
-
return
|
|
52142
|
+
return _context14.abrupt("return", configStepKey);
|
|
51817
52143
|
case 7:
|
|
51818
52144
|
case "end":
|
|
51819
|
-
return
|
|
52145
|
+
return _context14.stop();
|
|
51820
52146
|
}
|
|
51821
|
-
},
|
|
52147
|
+
}, _callee14);
|
|
51822
52148
|
}));
|
|
51823
52149
|
return function (_x42, _x43, _x44, _x45, _x46, _x47) {
|
|
51824
|
-
return
|
|
52150
|
+
return _ref14.apply(this, arguments);
|
|
51825
52151
|
};
|
|
51826
52152
|
}());
|
|
51827
52153
|
/**
|
|
@@ -51835,115 +52161,115 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51835
52161
|
*/
|
|
51836
52162
|
//onConfigItemClick ist ein Click auf das Item der ConfigPalette um die OPV zu ändern
|
|
51837
52163
|
_defineProperty(this, "doConfigure", /*#__PURE__*/function () {
|
|
51838
|
-
var
|
|
52164
|
+
var _ref15 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents, eventKey) {
|
|
51839
52165
|
var _this$actions13, _this$actions13$toggl;
|
|
51840
|
-
var set, returnValues, _this$actions14, _this$actions14$toggl, structure, _this$
|
|
51841
|
-
return _regeneratorRuntime.wrap(function
|
|
51842
|
-
while (1) switch (
|
|
52166
|
+
var set, returnValues, _this$actions14, _this$actions14$toggl, structure, _this$view42, _returnValues$element, _this$view45, _this$view43, _this$view44;
|
|
52167
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
52168
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
51843
52169
|
case 0:
|
|
51844
52170
|
set = _this.actSet();
|
|
51845
52171
|
(_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);
|
|
51846
|
-
|
|
51847
|
-
|
|
52172
|
+
_context15.prev = 2;
|
|
52173
|
+
_context15.next = 5;
|
|
51848
52174
|
return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, myValues, targetArticles, undefined, 'FromViewClick');
|
|
51849
52175
|
case 5:
|
|
51850
|
-
returnValues =
|
|
52176
|
+
returnValues = _context15.sent;
|
|
51851
52177
|
case 6:
|
|
51852
|
-
|
|
52178
|
+
_context15.prev = 6;
|
|
51853
52179
|
(_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);
|
|
51854
|
-
return
|
|
52180
|
+
return _context15.finish(6);
|
|
51855
52181
|
case 9:
|
|
51856
52182
|
structure = setHandlerInstance.loadConfigStructureOfActSet(set, _this.getCurPlannerType());
|
|
51857
52183
|
_this.checkMatchingProducts('onConfig');
|
|
51858
52184
|
if (dontUpdatePlannerView) {
|
|
51859
|
-
|
|
52185
|
+
_context15.next = 21;
|
|
51860
52186
|
break;
|
|
51861
52187
|
}
|
|
51862
|
-
(_this$
|
|
52188
|
+
(_this$view42 = _this.view) === null || _this$view42 === void 0 || _this$view42.updateConfiguratorStructure(structure);
|
|
51863
52189
|
if (returnValues.articleCountChanged) {
|
|
51864
|
-
(_this$
|
|
52190
|
+
(_this$view43 = _this.view) === null || _this$view43 === void 0 || _this$view43.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
51865
52191
|
}
|
|
51866
52192
|
if ((_returnValues$element = returnValues.elementIdsToUpdateSelection) !== null && _returnValues$element !== void 0 && _returnValues$element.length) {
|
|
51867
|
-
(_this$
|
|
52193
|
+
(_this$view44 = _this.view) === null || _this$view44 === void 0 || _this$view44.updateElementSelectionPlanner([returnValues.setId], returnValues.elementIdsToUpdateSelection, true, true);
|
|
51868
52194
|
}
|
|
51869
52195
|
_this.updatePriceInView();
|
|
51870
|
-
(_this$
|
|
52196
|
+
(_this$view45 = _this.view) === null || _this$view45 === void 0 || _this$view45.updateViewButtonsDependigOnConfigStructure();
|
|
51871
52197
|
_this.updatePlannerView('DO_CONFIGURE', myValues);
|
|
51872
52198
|
_this.updateWebConfiguratorTitle();
|
|
51873
|
-
|
|
52199
|
+
_context15.next = 21;
|
|
51874
52200
|
return _this.getFreePlacesOnGrids(undefined, 'doConfigure');
|
|
51875
52201
|
case 21:
|
|
51876
52202
|
if (dontCallEvents) {
|
|
51877
|
-
|
|
52203
|
+
_context15.next = 24;
|
|
51878
52204
|
break;
|
|
51879
52205
|
}
|
|
51880
|
-
|
|
52206
|
+
_context15.next = 24;
|
|
51881
52207
|
return _this.fillBaksetforOnWebPlanerConfigChange(myValues, undefined, eventKey);
|
|
51882
52208
|
case 24:
|
|
51883
52209
|
_this.configuratorChangeLog('onConfigurationChange', myValues);
|
|
51884
52210
|
case 25:
|
|
51885
52211
|
case "end":
|
|
51886
|
-
return
|
|
52212
|
+
return _context15.stop();
|
|
51887
52213
|
}
|
|
51888
|
-
},
|
|
52214
|
+
}, _callee15, null, [[2,, 6, 9]]);
|
|
51889
52215
|
}));
|
|
51890
52216
|
return function (_x48, _x49, _x50, _x51, _x52) {
|
|
51891
|
-
return
|
|
52217
|
+
return _ref15.apply(this, arguments);
|
|
51892
52218
|
};
|
|
51893
52219
|
}());
|
|
51894
52220
|
_defineProperty(this, "fillBaksetforOnWebPlanerConfigChange", /*#__PURE__*/function () {
|
|
51895
|
-
var
|
|
52221
|
+
var _ref16 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(myValues, isInit, eventKey) {
|
|
51896
52222
|
var _myValues;
|
|
51897
52223
|
var set, articles, article;
|
|
51898
|
-
return _regeneratorRuntime.wrap(function
|
|
51899
|
-
while (1) switch (
|
|
52224
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
52225
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
51900
52226
|
case 0:
|
|
51901
52227
|
if (_this.eventIsManagedByClient('onWebPlanerConfigChange')) {
|
|
51902
|
-
|
|
52228
|
+
_context16.next = 2;
|
|
51903
52229
|
break;
|
|
51904
52230
|
}
|
|
51905
|
-
return
|
|
52231
|
+
return _context16.abrupt("return");
|
|
51906
52232
|
case 2:
|
|
51907
52233
|
set = _this.actSet();
|
|
51908
52234
|
if (set) {
|
|
51909
|
-
|
|
52235
|
+
_context16.next = 5;
|
|
51910
52236
|
break;
|
|
51911
52237
|
}
|
|
51912
|
-
return
|
|
52238
|
+
return _context16.abrupt("return");
|
|
51913
52239
|
case 5:
|
|
51914
52240
|
if (!(!myValues || eventKey !== null && eventKey !== void 0 && eventKey.endsWith('repairing'))) {
|
|
51915
|
-
|
|
52241
|
+
_context16.next = 11;
|
|
51916
52242
|
break;
|
|
51917
52243
|
}
|
|
51918
52244
|
//get first option of the first article
|
|
51919
52245
|
articles = set.getDivaArticles();
|
|
51920
52246
|
article = articles[Object.keys(articles)[0]];
|
|
51921
52247
|
if (article) {
|
|
51922
|
-
|
|
52248
|
+
_context16.next = 10;
|
|
51923
52249
|
break;
|
|
51924
52250
|
}
|
|
51925
|
-
return
|
|
52251
|
+
return _context16.abrupt("return");
|
|
51926
52252
|
case 10:
|
|
51927
52253
|
myValues = article === null || article === void 0 ? void 0 : article.VariantValuesWithoutEmptyFreetext;
|
|
51928
52254
|
case 11:
|
|
51929
|
-
|
|
51930
|
-
|
|
51931
|
-
|
|
52255
|
+
_context16.t0 = _this.divaBasketHandler;
|
|
52256
|
+
_context16.t1 = set;
|
|
52257
|
+
_context16.next = 15;
|
|
51932
52258
|
return setHandlerInstance.fillOrderLinesAndOrderSets(_this.sets, _this.divaBasketHandler, true, _this.doAllowSetPlanner(), _this.ReturnTo);
|
|
51933
52259
|
case 15:
|
|
51934
|
-
|
|
51935
|
-
|
|
51936
|
-
|
|
51937
|
-
|
|
51938
|
-
return
|
|
52260
|
+
_context16.t2 = _context16.sent;
|
|
52261
|
+
_context16.t3 = Object.keys((_myValues = myValues) !== null && _myValues !== void 0 ? _myValues : {});
|
|
52262
|
+
_context16.t4 = isInit;
|
|
52263
|
+
_context16.t5 = eventKey;
|
|
52264
|
+
return _context16.abrupt("return", _context16.t0.fillBaksetforOnWebPlanerConfigChange.call(_context16.t0, _context16.t1, _context16.t2, _context16.t3, _context16.t4, _context16.t5));
|
|
51939
52265
|
case 20:
|
|
51940
52266
|
case "end":
|
|
51941
|
-
return
|
|
52267
|
+
return _context16.stop();
|
|
51942
52268
|
}
|
|
51943
|
-
},
|
|
52269
|
+
}, _callee16);
|
|
51944
52270
|
}));
|
|
51945
52271
|
return function (_x53, _x54, _x55) {
|
|
51946
|
-
return
|
|
52272
|
+
return _ref16.apply(this, arguments);
|
|
51947
52273
|
};
|
|
51948
52274
|
}());
|
|
51949
52275
|
_defineProperty(this, "getPosNr", function (basketId) {
|
|
@@ -51985,9 +52311,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
51985
52311
|
return returnTo;
|
|
51986
52312
|
});
|
|
51987
52313
|
_defineProperty(this, "addToBasketEventFunction", function (e) {
|
|
51988
|
-
var _this$
|
|
51989
|
-
if (e.type == 'addToBasket') (_this$
|
|
51990
|
-
if (e.type == 'saveBasket') (_this$
|
|
52314
|
+
var _this$view46, _this$view47;
|
|
52315
|
+
if (e.type == 'addToBasket') (_this$view46 = _this.view) === null || _this$view46 === void 0 || _this$view46.onClickAddToBasket();
|
|
52316
|
+
if (e.type == 'saveBasket') (_this$view47 = _this.view) === null || _this$view47 === void 0 || _this$view47.onClickAddToBasket(undefined, 'onAddToBasket', true);
|
|
51991
52317
|
});
|
|
51992
52318
|
this.plannerConfig = Object.assign(plannerConfig, {});
|
|
51993
52319
|
this.actions = plannerConfig.actions;
|
|
@@ -52006,11 +52332,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52006
52332
|
}, {
|
|
52007
52333
|
key: "initialize",
|
|
52008
52334
|
value: function () {
|
|
52009
|
-
var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
52010
|
-
var _this$
|
|
52335
|
+
var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(cache) {
|
|
52336
|
+
var _this$view48;
|
|
52011
52337
|
var viewReadyPromise, loadSuccessful, _ret, set, _this$actions15, _this$i18n4, _this$i18n5, initializationId;
|
|
52012
|
-
return _regeneratorRuntime.wrap(function
|
|
52013
|
-
while (1) switch (
|
|
52338
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
52339
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
52014
52340
|
case 0:
|
|
52015
52341
|
bootMark('planner: initialize', {
|
|
52016
52342
|
reinit: cache === undefined ? 0 : 1
|
|
@@ -52027,18 +52353,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52027
52353
|
warningTime: 2000,
|
|
52028
52354
|
errorTime: 4000
|
|
52029
52355
|
});
|
|
52030
|
-
|
|
52356
|
+
_context17.next = 9;
|
|
52031
52357
|
return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
|
|
52032
52358
|
case 9:
|
|
52033
52359
|
this.plannerHandler = new DivaPlannerHandler(false);
|
|
52034
52360
|
|
|
52035
52361
|
// Registered by the mounted view — absent when initializing headless (e.g. backoffice DIVA agent).
|
|
52036
|
-
viewReadyPromise = (_this$
|
|
52362
|
+
viewReadyPromise = (_this$view48 = this.view) === null || _this$view48 === void 0 ? void 0 : _this$view48.initViewApiDependencies();
|
|
52037
52363
|
bootMark('planner: basket load start');
|
|
52038
|
-
|
|
52364
|
+
_context17.next = 14;
|
|
52039
52365
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
52040
52366
|
case 14:
|
|
52041
|
-
loadSuccessful =
|
|
52367
|
+
loadSuccessful = _context17.sent;
|
|
52042
52368
|
bootMark('planner: basket load done');
|
|
52043
52369
|
if (this.plannerConfig.configuratorSessionId) {
|
|
52044
52370
|
// ID forced from outside (Landingpage, PDP, Planung-ändern)
|
|
@@ -52051,15 +52377,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52051
52377
|
DivaUtils.businessMetrics.setConfiguratorSessionId();
|
|
52052
52378
|
}
|
|
52053
52379
|
if (!loadSuccessful) {
|
|
52054
|
-
|
|
52380
|
+
_context17.next = 36;
|
|
52055
52381
|
break;
|
|
52056
52382
|
}
|
|
52057
52383
|
this.applyOrderlineVariantValuesToBasket();
|
|
52058
|
-
|
|
52059
|
-
|
|
52384
|
+
_context17.prev = 19;
|
|
52385
|
+
_context17.next = 22;
|
|
52060
52386
|
return this.initializeSets(loadSuccessful, viewReadyPromise);
|
|
52061
52387
|
case 22:
|
|
52062
|
-
_ret =
|
|
52388
|
+
_ret = _context17.sent;
|
|
52063
52389
|
set = this.actSet();
|
|
52064
52390
|
if (_ret && set && set.CatalogData.archived) {
|
|
52065
52391
|
if (this.i18n() && !this.plannerConfig.suppressErrorModals) (_this$actions15 = this.actions) === null || _this$actions15 === void 0 || _this$actions15.openModal({
|
|
@@ -52068,16 +52394,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52068
52394
|
text: (_this$i18n5 = this.i18n()) === null || _this$i18n5 === void 0 ? void 0 : _this$i18n5.t('configurator.catalog_not_listed_text')
|
|
52069
52395
|
});
|
|
52070
52396
|
}
|
|
52071
|
-
return
|
|
52397
|
+
return _context17.abrupt("return", _ret);
|
|
52072
52398
|
case 28:
|
|
52073
|
-
|
|
52074
|
-
|
|
52075
|
-
LOG$2.error(
|
|
52076
|
-
this.lastInitError =
|
|
52077
|
-
this.onError(
|
|
52078
|
-
return
|
|
52399
|
+
_context17.prev = 28;
|
|
52400
|
+
_context17.t0 = _context17["catch"](19);
|
|
52401
|
+
LOG$2.error(_context17.t0);
|
|
52402
|
+
this.lastInitError = _context17.t0;
|
|
52403
|
+
this.onError(_context17.t0);
|
|
52404
|
+
return _context17.abrupt("return", false);
|
|
52079
52405
|
case 34:
|
|
52080
|
-
|
|
52406
|
+
_context17.next = 40;
|
|
52081
52407
|
break;
|
|
52082
52408
|
case 36:
|
|
52083
52409
|
this.onError();
|
|
@@ -52086,12 +52412,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52086
52412
|
LOG$2.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {
|
|
52087
52413
|
initializationId: initializationId
|
|
52088
52414
|
}, true);
|
|
52089
|
-
return
|
|
52415
|
+
return _context17.abrupt("return", false);
|
|
52090
52416
|
case 40:
|
|
52091
52417
|
case "end":
|
|
52092
|
-
return
|
|
52418
|
+
return _context17.stop();
|
|
52093
52419
|
}
|
|
52094
|
-
},
|
|
52420
|
+
}, _callee17, this, [[19, 28]]);
|
|
52095
52421
|
}));
|
|
52096
52422
|
function initialize(_x56) {
|
|
52097
52423
|
return _initialize.apply(this, arguments);
|
|
@@ -52161,52 +52487,52 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52161
52487
|
}, {
|
|
52162
52488
|
key: "initializeSets",
|
|
52163
52489
|
value: function () {
|
|
52164
|
-
var _initializeSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
52490
|
+
var _initializeSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(loadSuccessful, viewReadyPromise) {
|
|
52165
52491
|
var _this$actions17, _set$getDivaArticles, _catalogData$catalogM, _catalogData$catalogM2;
|
|
52166
52492
|
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;
|
|
52167
|
-
return _regeneratorRuntime.wrap(function
|
|
52168
|
-
while (1) switch (
|
|
52493
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
52494
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
52169
52495
|
case 0:
|
|
52170
52496
|
if (!(typeof loadSuccessful != 'boolean')) {
|
|
52171
|
-
|
|
52497
|
+
_context18.next = 9;
|
|
52172
52498
|
break;
|
|
52173
52499
|
}
|
|
52174
52500
|
if (!(loadSuccessful.type == 'ProductList')) {
|
|
52175
|
-
|
|
52501
|
+
_context18.next = 9;
|
|
52176
52502
|
break;
|
|
52177
52503
|
}
|
|
52178
|
-
|
|
52504
|
+
_context18.next = 4;
|
|
52179
52505
|
return viewReadyPromise;
|
|
52180
52506
|
case 4:
|
|
52181
|
-
|
|
52507
|
+
_context18.next = 6;
|
|
52182
52508
|
return this.initView();
|
|
52183
52509
|
case 6:
|
|
52184
52510
|
this.subscribeToWebPlannerEvents();
|
|
52185
52511
|
(_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);
|
|
52186
|
-
return
|
|
52512
|
+
return _context18.abrupt("return", true);
|
|
52187
52513
|
case 9:
|
|
52188
52514
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
52189
52515
|
initSetState = this.getInitStateForSet();
|
|
52190
52516
|
this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
52191
52517
|
bootMark('planner: init sets start');
|
|
52192
|
-
|
|
52518
|
+
_context18.next = 15;
|
|
52193
52519
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
52194
52520
|
case 15:
|
|
52195
52521
|
bootMark('planner: init sets done');
|
|
52196
52522
|
set = this.actSet();
|
|
52197
52523
|
oldProductId = this.divaBasketHandler.actBasket.MatchingProductId || this.divaBasketHandler.actBasket.OrigProductId;
|
|
52198
52524
|
if (!(oldProductId && set && set !== null && set !== void 0 && set.api.doCheckForProductsPrice())) {
|
|
52199
|
-
|
|
52525
|
+
_context18.next = 29;
|
|
52200
52526
|
break;
|
|
52201
52527
|
}
|
|
52202
|
-
|
|
52528
|
+
_context18.next = 23;
|
|
52203
52529
|
return this.divaBasketHandler.getProduct(this.api, oldProductId);
|
|
52204
52530
|
case 23:
|
|
52205
|
-
result =
|
|
52531
|
+
result = _context18.sent;
|
|
52206
52532
|
if (result) productHandlerInstance.handleFountMatchingProducts(set, [result], set.setHash);
|
|
52207
52533
|
(_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;
|
|
52208
52534
|
(_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;
|
|
52209
|
-
|
|
52535
|
+
_context18.next = 30;
|
|
52210
52536
|
break;
|
|
52211
52537
|
case 29:
|
|
52212
52538
|
if (typeof loadSuccessful != 'boolean' && set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
@@ -52215,11 +52541,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52215
52541
|
}
|
|
52216
52542
|
}
|
|
52217
52543
|
case 30:
|
|
52218
|
-
|
|
52544
|
+
_context18.next = 32;
|
|
52219
52545
|
return viewReadyPromise;
|
|
52220
52546
|
case 32:
|
|
52221
52547
|
bootMark('planner: view deps ready');
|
|
52222
|
-
|
|
52548
|
+
_context18.next = 35;
|
|
52223
52549
|
return this.initView();
|
|
52224
52550
|
case 35:
|
|
52225
52551
|
(_this$actions17 = this.actions) === null || _this$actions17 === void 0 || _this$actions17.onEvent({
|
|
@@ -52256,15 +52582,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52256
52582
|
}, false);
|
|
52257
52583
|
this.configuratorChangeLog('onConfigurationInit', undefined, true);
|
|
52258
52584
|
this.plannerChangeLog('onInitPlanner', true);
|
|
52259
|
-
|
|
52585
|
+
_context18.next = 46;
|
|
52260
52586
|
return this.fillBaksetforOnWebPlanerConfigChange(undefined, true);
|
|
52261
52587
|
case 46:
|
|
52262
|
-
return
|
|
52588
|
+
return _context18.abrupt("return", true);
|
|
52263
52589
|
case 47:
|
|
52264
52590
|
case "end":
|
|
52265
|
-
return
|
|
52591
|
+
return _context18.stop();
|
|
52266
52592
|
}
|
|
52267
|
-
},
|
|
52593
|
+
}, _callee18, this);
|
|
52268
52594
|
}));
|
|
52269
52595
|
function initializeSets(_x57, _x58) {
|
|
52270
52596
|
return _initializeSets.apply(this, arguments);
|
|
@@ -52304,6 +52630,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52304
52630
|
configuratorTitle: (_this$plannerConfig = this.plannerConfig) !== null && _this$plannerConfig !== void 0 && _this$plannerConfig.configuratorTitle ? decodeURIComponent(this.plannerConfig.configuratorTitle) : undefined,
|
|
52305
52631
|
doAllowSetPlanner: this.doAllowSetPlanner,
|
|
52306
52632
|
getPlanning2DAsJpg: this.getPlanning2DAsJpg,
|
|
52633
|
+
captureSetImages: this.captureSetImages,
|
|
52634
|
+
exportSetGlb: this.exportSetGlb,
|
|
52307
52635
|
updateSetImage: function updateSetImage(url) {
|
|
52308
52636
|
var _this2$view;
|
|
52309
52637
|
return (_this2$view = _this2.view) === null || _this2$view === void 0 ? void 0 : _this2$view.updateSetImage(url);
|
|
@@ -52450,21 +52778,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52450
52778
|
}, {
|
|
52451
52779
|
key: "reattachView",
|
|
52452
52780
|
value: function () {
|
|
52453
|
-
var _reattachView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
52454
|
-
var _this$
|
|
52781
|
+
var _reattachView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19() {
|
|
52782
|
+
var _this$view49, _this$actSet6, _this$actions22, _this$actions23, _this$actSet$getDivaA2, _this$actSet7;
|
|
52455
52783
|
var viewReadyPromise, catalogData, _this$actions24;
|
|
52456
|
-
return _regeneratorRuntime.wrap(function
|
|
52457
|
-
while (1) switch (
|
|
52784
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
52785
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
52458
52786
|
case 0:
|
|
52459
|
-
viewReadyPromise = (_this$
|
|
52787
|
+
viewReadyPromise = (_this$view49 = this.view) === null || _this$view49 === void 0 ? void 0 : _this$view49.initViewApiDependencies();
|
|
52460
52788
|
if (!viewReadyPromise) {
|
|
52461
|
-
|
|
52789
|
+
_context19.next = 4;
|
|
52462
52790
|
break;
|
|
52463
52791
|
}
|
|
52464
|
-
|
|
52792
|
+
_context19.next = 4;
|
|
52465
52793
|
return viewReadyPromise;
|
|
52466
52794
|
case 4:
|
|
52467
|
-
|
|
52795
|
+
_context19.next = 6;
|
|
52468
52796
|
return this.initView();
|
|
52469
52797
|
case 6:
|
|
52470
52798
|
catalogData = (_this$actSet6 = this.actSet()) === null || _this$actSet6 === void 0 ? void 0 : _this$actSet6.CatalogData;
|
|
@@ -52484,9 +52812,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52484
52812
|
}
|
|
52485
52813
|
case 10:
|
|
52486
52814
|
case "end":
|
|
52487
|
-
return
|
|
52815
|
+
return _context19.stop();
|
|
52488
52816
|
}
|
|
52489
|
-
},
|
|
52817
|
+
}, _callee19, this);
|
|
52490
52818
|
}));
|
|
52491
52819
|
function reattachView() {
|
|
52492
52820
|
return _reattachView.apply(this, arguments);
|
|
@@ -52499,51 +52827,51 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52499
52827
|
}, {
|
|
52500
52828
|
key: "initView",
|
|
52501
52829
|
value: (function () {
|
|
52502
|
-
var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
52503
|
-
var _this$
|
|
52504
|
-
var set, plannerMode, _this$
|
|
52505
|
-
return _regeneratorRuntime.wrap(function
|
|
52506
|
-
while (1) switch (
|
|
52830
|
+
var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20() {
|
|
52831
|
+
var _this$view50;
|
|
52832
|
+
var set, plannerMode, _this$view51, _this$view52, _this$view53, _this$view54, _this$view55, _this$view56;
|
|
52833
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
52834
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
52507
52835
|
case 0:
|
|
52508
52836
|
bootMark('planner: initView start');
|
|
52509
52837
|
set = this.actSet();
|
|
52510
52838
|
plannerMode = this.getPlannerMode();
|
|
52511
|
-
(_this$
|
|
52839
|
+
(_this$view50 = this.view) === null || _this$view50 === void 0 || _this$view50.initConfiguratorMode(plannerMode);
|
|
52512
52840
|
if (!(plannerMode == 'ProductList')) {
|
|
52513
|
-
|
|
52841
|
+
_context20.next = 8;
|
|
52514
52842
|
break;
|
|
52515
52843
|
}
|
|
52516
|
-
(_this$
|
|
52517
|
-
|
|
52844
|
+
(_this$view51 = this.view) === null || _this$view51 === void 0 || _this$view51.initConfiguratorStructure(setHandlerInstance.loadConfigStructureForOnlyProductsList());
|
|
52845
|
+
_context20.next = 19;
|
|
52518
52846
|
break;
|
|
52519
52847
|
case 8:
|
|
52520
|
-
|
|
52521
|
-
return (_this$
|
|
52848
|
+
_context20.next = 10;
|
|
52849
|
+
return (_this$view52 = this.view) === null || _this$view52 === void 0 ? void 0 : _this$view52.initPlannerView();
|
|
52522
52850
|
case 10:
|
|
52523
52851
|
//first load the Configuratorstructure STARTCONFIG
|
|
52524
|
-
(_this$
|
|
52852
|
+
(_this$view53 = this.view) === null || _this$view53 === void 0 || _this$view53.initConfiguratorStructure(setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType()));
|
|
52525
52853
|
this.updatePriceInView();
|
|
52526
|
-
(_this$
|
|
52854
|
+
(_this$view54 = this.view) === null || _this$view54 === void 0 || _this$view54.updateViewButtonsDependigOnConfigStructure();
|
|
52527
52855
|
this.updateWebConfiguratorTitle();
|
|
52528
52856
|
//initialize planner view
|
|
52529
|
-
(_this$
|
|
52857
|
+
(_this$view55 = this.view) === null || _this$view55 === void 0 || _this$view55.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set), set.getSetId(), set.firstElementId, true);
|
|
52530
52858
|
|
|
52531
52859
|
// The 3D request leaves here: `updatePlannerView` reaches `PlannerHandler3D.request3D`, which
|
|
52532
52860
|
// either sends over SignalR or parks the request until the login/join acks land.
|
|
52533
52861
|
bootMark('planner: updatePlannerView INIT_VIEW');
|
|
52534
52862
|
this.updatePlannerView('INIT_VIEW');
|
|
52535
|
-
(_this$
|
|
52863
|
+
(_this$view56 = this.view) === null || _this$view56 === void 0 || _this$view56.onBasketInitialized();
|
|
52536
52864
|
this.checkMatchingProducts('onInit');
|
|
52537
52865
|
case 19:
|
|
52538
|
-
|
|
52866
|
+
_context20.next = 21;
|
|
52539
52867
|
return this.runInitMode(plannerMode);
|
|
52540
52868
|
case 21:
|
|
52541
52869
|
bootMark('planner: initView done');
|
|
52542
52870
|
case 22:
|
|
52543
52871
|
case "end":
|
|
52544
|
-
return
|
|
52872
|
+
return _context20.stop();
|
|
52545
52873
|
}
|
|
52546
|
-
},
|
|
52874
|
+
}, _callee20, this);
|
|
52547
52875
|
}));
|
|
52548
52876
|
function initView() {
|
|
52549
52877
|
return _initView.apply(this, arguments);
|
|
@@ -52553,43 +52881,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52553
52881
|
}, {
|
|
52554
52882
|
key: "updateWebConfiguratorTitle",
|
|
52555
52883
|
value: function updateWebConfiguratorTitle() {
|
|
52556
|
-
var _this$
|
|
52557
|
-
(_this$
|
|
52884
|
+
var _this$view57, _this$actSet8;
|
|
52885
|
+
(_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());
|
|
52558
52886
|
}
|
|
52559
52887
|
}, {
|
|
52560
52888
|
key: "updateConfigStructure",
|
|
52561
52889
|
value: function updateConfigStructure() {
|
|
52562
|
-
var _this$
|
|
52563
|
-
(_this$
|
|
52890
|
+
var _this$view58;
|
|
52891
|
+
(_this$view58 = this.view) === null || _this$view58 === void 0 || _this$view58.updateConfiguratorStructure(setHandlerInstance.loadConfigStructureOfActSet(this.actSet(), this.getCurPlannerType()));
|
|
52564
52892
|
}
|
|
52565
52893
|
}, {
|
|
52566
52894
|
key: "runInitMode",
|
|
52567
52895
|
value: function () {
|
|
52568
|
-
var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
52896
|
+
var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(plannerMode) {
|
|
52569
52897
|
var _this$plannerConfig$i, _this$state5;
|
|
52570
|
-
var doDefault, _this$
|
|
52571
|
-
return _regeneratorRuntime.wrap(function
|
|
52572
|
-
while (1) switch (
|
|
52898
|
+
var doDefault, _this$view59, _this$saveToBasketWra, _configStepKey, _this$view60, _this$actSet9, _this$view61, _this$view62, _this$view63;
|
|
52899
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
52900
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
52573
52901
|
case 0:
|
|
52574
52902
|
doDefault = true;
|
|
52575
52903
|
if (!['SHOW_PDF'].includes((_this$plannerConfig$i = this.plannerConfig.initMode) !== null && _this$plannerConfig$i !== void 0 ? _this$plannerConfig$i : '')) {
|
|
52576
|
-
|
|
52904
|
+
_context21.next = 9;
|
|
52577
52905
|
break;
|
|
52578
52906
|
}
|
|
52579
52907
|
if (this.plannerConfig.initMode == 'SHOW_PDF') this.ReturnTo = 'OPEN_PDF';
|
|
52580
|
-
(_this$
|
|
52908
|
+
(_this$view59 = this.view) === null || _this$view59 === void 0 || _this$view59.navigateToTabGroup('SUMMARY', undefined, true);
|
|
52581
52909
|
//TODO lea bug das hier ist nur ein temporäre lößung https://app.asana.com/0/1200869909950432/1200998848659806
|
|
52582
|
-
|
|
52910
|
+
_context21.next = 6;
|
|
52583
52911
|
return (_this$saveToBasketWra = this.saveToBasketWrapper) === null || _this$saveToBasketWra === void 0 ? void 0 : _this$saveToBasketWra.call(this);
|
|
52584
52912
|
case 6:
|
|
52585
52913
|
doDefault = false;
|
|
52586
|
-
|
|
52914
|
+
_context21.next = 10;
|
|
52587
52915
|
break;
|
|
52588
52916
|
case 9:
|
|
52589
52917
|
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) {
|
|
52590
52918
|
_configStepKey = this.plannerConfig.opt ? setHandlerInstance.getConfigStepKeyOfOption(this.actSet(), this.plannerConfig.opt) : setHandlerInstance.getFirstConfigStep(this.actSet());
|
|
52591
52919
|
if (_configStepKey) {
|
|
52592
|
-
(_this$
|
|
52920
|
+
(_this$view60 = this.view) === null || _this$view60 === void 0 || _this$view60.navigateToConfigStep(_configStepKey, !this.plannerConfig.opt, true);
|
|
52593
52921
|
doDefault = false;
|
|
52594
52922
|
} else {
|
|
52595
52923
|
LOG$2.warn('Option: ' + this.plannerConfig.opt + ' could not be found');
|
|
@@ -52598,18 +52926,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52598
52926
|
case 10:
|
|
52599
52927
|
if (doDefault) {
|
|
52600
52928
|
if (plannerMode == 'ProductList') {
|
|
52601
|
-
(_this$
|
|
52929
|
+
(_this$view61 = this.view) === null || _this$view61 === void 0 || _this$view61.navigateToTabGroup('PRODUCTS');
|
|
52602
52930
|
} else if ((_this$actSet9 = this.actSet()) !== null && _this$actSet9 !== void 0 && _this$actSet9.hasStaticRoomList) {
|
|
52603
|
-
(_this$
|
|
52931
|
+
(_this$view62 = this.view) === null || _this$view62 === void 0 || _this$view62.navigateToTabGroup('ROOMLIST', true);
|
|
52604
52932
|
} else {
|
|
52605
|
-
(_this$
|
|
52933
|
+
(_this$view63 = this.view) === null || _this$view63 === void 0 || _this$view63.navigateToTabGroup(this.getCurPlannerType(), true);
|
|
52606
52934
|
}
|
|
52607
52935
|
}
|
|
52608
52936
|
case 11:
|
|
52609
52937
|
case "end":
|
|
52610
|
-
return
|
|
52938
|
+
return _context21.stop();
|
|
52611
52939
|
}
|
|
52612
|
-
},
|
|
52940
|
+
}, _callee21, this);
|
|
52613
52941
|
}));
|
|
52614
52942
|
function runInitMode(_x59) {
|
|
52615
52943
|
return _runInitMode.apply(this, arguments);
|
|
@@ -52619,16 +52947,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52619
52947
|
}, {
|
|
52620
52948
|
key: "addSetToActPlanningByDivaNr",
|
|
52621
52949
|
value: function () {
|
|
52622
|
-
var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
52623
|
-
var _this$
|
|
52950
|
+
var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(divaNr) {
|
|
52951
|
+
var _this$view64;
|
|
52624
52952
|
var set, orderSets, i, orderset, lastSetToInitialize, loadedSet, articlesKeys;
|
|
52625
|
-
return _regeneratorRuntime.wrap(function
|
|
52626
|
-
while (1) switch (
|
|
52953
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
52954
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
52627
52955
|
case 0:
|
|
52628
52956
|
set = this.actSet();
|
|
52629
52957
|
this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
52630
52958
|
this.divaBasketHandler.setIgnoreInitObjectWhenInitializing();
|
|
52631
|
-
|
|
52959
|
+
_context22.next = 5;
|
|
52632
52960
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
52633
52961
|
case 5:
|
|
52634
52962
|
orderSets = this.divaBasketHandler.actBasket.OrderSets;
|
|
@@ -52636,44 +52964,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52636
52964
|
i = 0;
|
|
52637
52965
|
case 8:
|
|
52638
52966
|
if (!(i < orderSets.length)) {
|
|
52639
|
-
|
|
52967
|
+
_context22.next = 24;
|
|
52640
52968
|
break;
|
|
52641
52969
|
}
|
|
52642
52970
|
orderset = orderSets[i];
|
|
52643
52971
|
lastSetToInitialize = setHandlerInstance.getOrderSetShouldInitPlanner(orderSets, i);
|
|
52644
52972
|
loadedSet = setHandlerInstance.findLoadedSet(this.sets, orderset.CatalogCodex, orderset.AccountGUID);
|
|
52645
52973
|
if (!loadedSet) {
|
|
52646
|
-
|
|
52974
|
+
_context22.next = 18;
|
|
52647
52975
|
break;
|
|
52648
52976
|
}
|
|
52649
|
-
|
|
52977
|
+
_context22.next = 15;
|
|
52650
52978
|
return setHandlerInstance.addOrderSetArticlesToExistingSet(loadedSet, orderset, lastSetToInitialize);
|
|
52651
52979
|
case 15:
|
|
52652
52980
|
this.checkMatchingProducts('onAdd');
|
|
52653
|
-
|
|
52981
|
+
_context22.next = 20;
|
|
52654
52982
|
break;
|
|
52655
52983
|
case 18:
|
|
52656
|
-
|
|
52984
|
+
_context22.next = 20;
|
|
52657
52985
|
return setHandlerInstance.initSet(orderset, this.getInitStateForSet(), lastSetToInitialize);
|
|
52658
52986
|
case 20:
|
|
52659
52987
|
this.cleanUpEmptySets(true);
|
|
52660
52988
|
case 21:
|
|
52661
52989
|
i++;
|
|
52662
|
-
|
|
52990
|
+
_context22.next = 8;
|
|
52663
52991
|
break;
|
|
52664
52992
|
case 24:
|
|
52665
52993
|
this.divaBasketHandler.actBasket.OrderSets = [];
|
|
52666
52994
|
this.updatePriceInView();
|
|
52667
52995
|
this.updateWebConfiguratorTitle();
|
|
52668
52996
|
this.updateConfigStructure();
|
|
52669
|
-
(_this$
|
|
52997
|
+
(_this$view64 = this.view) === null || _this$view64 === void 0 || _this$view64.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
52670
52998
|
articlesKeys = Object.keys(this.actSet().getDivaArticles());
|
|
52671
52999
|
this.loadPaletteInfos(undefined, [articlesKeys[0]], articlesKeys);
|
|
52672
53000
|
case 31:
|
|
52673
53001
|
case "end":
|
|
52674
|
-
return
|
|
53002
|
+
return _context22.stop();
|
|
52675
53003
|
}
|
|
52676
|
-
},
|
|
53004
|
+
}, _callee22, this);
|
|
52677
53005
|
}));
|
|
52678
53006
|
function addSetToActPlanningByDivaNr(_x60) {
|
|
52679
53007
|
return _addSetToActPlanningByDivaNr.apply(this, arguments);
|
|
@@ -52708,26 +53036,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52708
53036
|
}, {
|
|
52709
53037
|
key: "setActSetCurConfigStepKey",
|
|
52710
53038
|
value: function () {
|
|
52711
|
-
var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
53039
|
+
var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(curConfigStepKey) {
|
|
52712
53040
|
var set;
|
|
52713
|
-
return _regeneratorRuntime.wrap(function
|
|
52714
|
-
while (1) switch (
|
|
53041
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
53042
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
52715
53043
|
case 0:
|
|
52716
53044
|
set = this.actSet();
|
|
52717
53045
|
if (set) {
|
|
52718
|
-
|
|
53046
|
+
_context23.next = 3;
|
|
52719
53047
|
break;
|
|
52720
53048
|
}
|
|
52721
|
-
return
|
|
53049
|
+
return _context23.abrupt("return");
|
|
52722
53050
|
case 3:
|
|
52723
53051
|
set.ActConfigStepKey = curConfigStepKey;
|
|
52724
|
-
|
|
53052
|
+
_context23.next = 6;
|
|
52725
53053
|
return setHandlerInstance.updateNavigation(set);
|
|
52726
53054
|
case 6:
|
|
52727
53055
|
case "end":
|
|
52728
|
-
return
|
|
53056
|
+
return _context23.stop();
|
|
52729
53057
|
}
|
|
52730
|
-
},
|
|
53058
|
+
}, _callee23, this);
|
|
52731
53059
|
}));
|
|
52732
53060
|
function setActSetCurConfigStepKey(_x61) {
|
|
52733
53061
|
return _setActSetCurConfigStepKey.apply(this, arguments);
|
|
@@ -52753,10 +53081,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52753
53081
|
* @param viewpoint This parameter is used to send the viewpoint information from the rtv to unity
|
|
52754
53082
|
*/
|
|
52755
53083
|
function updatePlannerView(callingFrom, onDoConfigureValues, hybridInfo) {
|
|
52756
|
-
var _this$
|
|
53084
|
+
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;
|
|
52757
53085
|
var set = this.actSet();
|
|
52758
53086
|
if (!set) return;
|
|
52759
|
-
var alternateRenderInfo = (_this$
|
|
53087
|
+
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];
|
|
52760
53088
|
var alternateRenderInfoExistInSet = (set === null || set === void 0 || (_set$getAlternateRend = set.getAlternateRenderInfo()) === null || _set$getAlternateRend === void 0 ? void 0 : _set$getAlternateRend.length) > 0;
|
|
52761
53089
|
var doUpdateVP = false;
|
|
52762
53090
|
if (alternateRenderInfoExistInSet) {
|
|
@@ -52784,14 +53112,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52784
53112
|
};
|
|
52785
53113
|
}
|
|
52786
53114
|
}
|
|
52787
|
-
var curPlannerViewMode = (_this$
|
|
53115
|
+
var curPlannerViewMode = (_this$view66 = this.view) === null || _this$view66 === void 0 ? void 0 : _this$view66.getCurPlannerViewMode();
|
|
52788
53116
|
if (!curPlannerViewMode) return;
|
|
52789
53117
|
LOG$2.debug('updatePlannerView in mode: ' + curPlannerViewMode + '; called from ' + callingFrom);
|
|
52790
53118
|
//delete me if you see this
|
|
52791
53119
|
|
|
52792
53120
|
switch (curPlannerViewMode) {
|
|
52793
53121
|
case '3DCOMB':
|
|
52794
|
-
setHandlerInstance.update3DPlannerView(true, !hybridInfo || hybridInfo && hybridInfo.focus.adjustZoomInUnity, set, (_this$view$getPlanner = (_this$
|
|
53122
|
+
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 ? {
|
|
52795
53123
|
focus: hybridInfo.focus,
|
|
52796
53124
|
forceRTCam: true,
|
|
52797
53125
|
currentCamera: hybridInfo.currentCamera
|
|
@@ -52801,23 +53129,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52801
53129
|
case 'RTViewer':
|
|
52802
53130
|
//Request HQRenderscript + rendering
|
|
52803
53131
|
//Request new Rendering
|
|
52804
|
-
setHandlerInstance.update3DPlannerView(true, true, set, (_this$view$getPlanner2 = (_this$
|
|
53132
|
+
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);
|
|
52805
53133
|
break;
|
|
52806
53134
|
case '3DImage':
|
|
52807
53135
|
//Request new Rendering
|
|
52808
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, (_this$view$getPlanner3 = (_this$
|
|
53136
|
+
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);
|
|
52809
53137
|
break;
|
|
52810
53138
|
case '2DGrid':
|
|
52811
53139
|
var _boundingBox = setHandlerInstance.get2DViewPlannerBoundingBox(set);
|
|
52812
53140
|
if (_boundingBox) {
|
|
52813
|
-
var _this$
|
|
52814
|
-
(_this$
|
|
53141
|
+
var _this$view73;
|
|
53142
|
+
(_this$view73 = this.view) === null || _this$view73 === void 0 || _this$view73.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
52815
53143
|
this.start2DRender(_boundingBox);
|
|
52816
53144
|
}
|
|
52817
|
-
if (['3DImage', '3DCOMB'].includes((_this$view$getInitPla = (_this$
|
|
52818
|
-
var _this$view$getPlanner4, _this$
|
|
53145
|
+
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 : '')) {
|
|
53146
|
+
var _this$view$getPlanner4, _this$view75, _this$view76;
|
|
52819
53147
|
//update 3D image always even if you are in the 2DGrid mode
|
|
52820
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, (_this$view$getPlanner4 = (_this$
|
|
53148
|
+
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);
|
|
52821
53149
|
}
|
|
52822
53150
|
break;
|
|
52823
53151
|
}
|
|
@@ -52833,21 +53161,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52833
53161
|
}, {
|
|
52834
53162
|
key: "forceUpdatePlannerView",
|
|
52835
53163
|
value: function forceUpdatePlannerView(renderSavingMode, doLoadAllAlternateRenderings) {
|
|
52836
|
-
var _this$view$getInitPla2, _this$
|
|
53164
|
+
var _this$view$getInitPla2, _this$view77;
|
|
52837
53165
|
var set = this.actSet();
|
|
52838
53166
|
this.update2DGrid(set);
|
|
52839
|
-
if (['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes((_this$view$getInitPla2 = (_this$
|
|
52840
|
-
var _this$view$getPlanner6, _this$
|
|
53167
|
+
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 : '')) {
|
|
53168
|
+
var _this$view$getPlanner6, _this$view80, _this$view81;
|
|
52841
53169
|
if (doLoadAllAlternateRenderings) {
|
|
52842
53170
|
var alternateRenderings = set.CatalogData.alternateRenderingsForSummary;
|
|
52843
53171
|
for (var i = 0; i < alternateRenderings.length; i++) {
|
|
52844
53172
|
if (alternateRenderings[i].hideOptionsIn3DImage && alternateRenderings[i].hideOptionsIn3DImage.length > 0) {
|
|
52845
|
-
var _this$view$getPlanner5, _this$
|
|
52846
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, (_this$view$getPlanner5 = (_this$
|
|
53173
|
+
var _this$view$getPlanner5, _this$view78, _this$view79;
|
|
53174
|
+
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]);
|
|
52847
53175
|
}
|
|
52848
53176
|
}
|
|
52849
53177
|
}
|
|
52850
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, (_this$view$getPlanner6 = (_this$
|
|
53178
|
+
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);
|
|
52851
53179
|
}
|
|
52852
53180
|
}
|
|
52853
53181
|
}, {
|
|
@@ -52858,8 +53186,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52858
53186
|
* The rejection MUST be swallowed: the cached promise is awaited by every later capture, so one failed render would break every following save.
|
|
52859
53187
|
*/
|
|
52860
53188
|
function start2DRender(boundingBox) {
|
|
52861
|
-
var _this$
|
|
52862
|
-
this.pending2DRender = Promise.resolve((_this$
|
|
53189
|
+
var _this$view82;
|
|
53190
|
+
this.pending2DRender = Promise.resolve((_this$view82 = this.view) === null || _this$view82 === void 0 ? void 0 : _this$view82.updatePlanner2DGrid(boundingBox))["catch"](function (error) {
|
|
52863
53191
|
LOG$2.error(error instanceof Error ? error : new Error('2D grid render failed: ' + String(error)));
|
|
52864
53192
|
});
|
|
52865
53193
|
}
|
|
@@ -52926,36 +53254,36 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52926
53254
|
}, {
|
|
52927
53255
|
key: "deletePlannerElement",
|
|
52928
53256
|
value: function () {
|
|
52929
|
-
var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
52930
|
-
var _this$
|
|
52931
|
-
var set, result, _this$
|
|
52932
|
-
return _regeneratorRuntime.wrap(function
|
|
52933
|
-
while (1) switch (
|
|
53257
|
+
var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(setId, elementId, denyElementSelectionClear) {
|
|
53258
|
+
var _this$view83, _this$view84;
|
|
53259
|
+
var set, result, _this$view85, _this$view86;
|
|
53260
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
53261
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
52934
53262
|
case 0:
|
|
52935
53263
|
set = this.sets[setId];
|
|
52936
|
-
|
|
53264
|
+
_context24.next = 3;
|
|
52937
53265
|
return setHandlerInstance.deleteElementFromSetByElemId(set, elementId, true);
|
|
52938
53266
|
case 3:
|
|
52939
|
-
result =
|
|
53267
|
+
result = _context24.sent;
|
|
52940
53268
|
this.updateConfigStructure();
|
|
52941
|
-
(_this$
|
|
53269
|
+
(_this$view83 = this.view) === null || _this$view83 === void 0 || _this$view83.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
52942
53270
|
this.updatePlannerView('DELETE_PLANNER_ELEMENT');
|
|
52943
53271
|
this.updateWebConfiguratorTitle();
|
|
52944
|
-
(_this$
|
|
53272
|
+
(_this$view84 = this.view) === null || _this$view84 === void 0 || _this$view84.updateViewButtonsDependigOnConfigStructure();
|
|
52945
53273
|
if (!denyElementSelectionClear) {
|
|
52946
|
-
if (result.selectElementId) (_this$
|
|
53274
|
+
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);
|
|
52947
53275
|
}
|
|
52948
53276
|
this.updatePriceInView();
|
|
52949
53277
|
this.checkMatchingProducts('onDelete');
|
|
52950
|
-
|
|
53278
|
+
_context24.next = 14;
|
|
52951
53279
|
return this.getFreePlacesOnGrids(undefined, 'deleteElement');
|
|
52952
53280
|
case 14:
|
|
52953
53281
|
this.plannerChangeLog('onDeletePlanner');
|
|
52954
53282
|
case 15:
|
|
52955
53283
|
case "end":
|
|
52956
|
-
return
|
|
53284
|
+
return _context24.stop();
|
|
52957
53285
|
}
|
|
52958
|
-
},
|
|
53286
|
+
}, _callee24, this);
|
|
52959
53287
|
}));
|
|
52960
53288
|
function deletePlannerElement(_x62, _x63, _x64) {
|
|
52961
53289
|
return _deletePlannerElement.apply(this, arguments);
|
|
@@ -52970,26 +53298,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
52970
53298
|
}, {
|
|
52971
53299
|
key: "movePlannerElement",
|
|
52972
53300
|
value: (function () {
|
|
52973
|
-
var _movePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
52974
|
-
var _this$
|
|
53301
|
+
var _movePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(setId, elementId, curConfigKey, absoluteIndex) {
|
|
53302
|
+
var _this$view87, _this$view88;
|
|
52975
53303
|
var set;
|
|
52976
|
-
return _regeneratorRuntime.wrap(function
|
|
52977
|
-
while (1) switch (
|
|
53304
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
53305
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
52978
53306
|
case 0:
|
|
52979
53307
|
set = this.sets[setId];
|
|
52980
|
-
|
|
53308
|
+
_context25.next = 3;
|
|
52981
53309
|
return setHandlerInstance.movePlannerElement(set, elementId, absoluteIndex);
|
|
52982
53310
|
case 3:
|
|
52983
53311
|
this.updateConfigStructure();
|
|
52984
|
-
(_this$
|
|
53312
|
+
(_this$view87 = this.view) === null || _this$view87 === void 0 || _this$view87.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
52985
53313
|
this.updatePlannerView('MOVE_PLANNER_ELEMENT');
|
|
52986
53314
|
this.updatePriceInView();
|
|
52987
|
-
(_this$
|
|
53315
|
+
(_this$view88 = this.view) === null || _this$view88 === void 0 || _this$view88.updateViewButtonsDependigOnConfigStructure();
|
|
52988
53316
|
case 8:
|
|
52989
53317
|
case "end":
|
|
52990
|
-
return
|
|
53318
|
+
return _context25.stop();
|
|
52991
53319
|
}
|
|
52992
|
-
},
|
|
53320
|
+
}, _callee25, this);
|
|
52993
53321
|
}));
|
|
52994
53322
|
function movePlannerElement(_x65, _x66, _x67, _x68) {
|
|
52995
53323
|
return _movePlannerElement.apply(this, arguments);
|
|
@@ -53006,42 +53334,42 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53006
53334
|
}, {
|
|
53007
53335
|
key: "copyPlannerElement",
|
|
53008
53336
|
value: (function () {
|
|
53009
|
-
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
53010
|
-
var _this$
|
|
53011
|
-
var set, newSelectedArticle, newConfigStepKey, _this$
|
|
53012
|
-
return _regeneratorRuntime.wrap(function
|
|
53013
|
-
while (1) switch (
|
|
53337
|
+
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(setId, elementId, curConfigKey, copyInfo) {
|
|
53338
|
+
var _this$view89, _this$view90;
|
|
53339
|
+
var set, newSelectedArticle, newConfigStepKey, _this$view91, baseArticle;
|
|
53340
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
53341
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
53014
53342
|
case 0:
|
|
53015
53343
|
if (copyInfo) {
|
|
53016
|
-
|
|
53344
|
+
_context26.next = 2;
|
|
53017
53345
|
break;
|
|
53018
53346
|
}
|
|
53019
|
-
return
|
|
53347
|
+
return _context26.abrupt("return");
|
|
53020
53348
|
case 2:
|
|
53021
53349
|
set = this.sets[setId];
|
|
53022
|
-
|
|
53350
|
+
_context26.next = 5;
|
|
53023
53351
|
return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
|
|
53024
53352
|
case 5:
|
|
53025
|
-
newSelectedArticle =
|
|
53353
|
+
newSelectedArticle = _context26.sent;
|
|
53026
53354
|
this.updateConfigStructure();
|
|
53027
|
-
(_this$
|
|
53355
|
+
(_this$view89 = this.view) === null || _this$view89 === void 0 || _this$view89.updateViewPlannerElements(setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
53028
53356
|
this.updatePlannerView('COPY_PLANNER_ELEMENT');
|
|
53029
53357
|
this.updatePriceInView();
|
|
53030
|
-
(_this$
|
|
53358
|
+
(_this$view90 = this.view) === null || _this$view90 === void 0 || _this$view90.updateViewButtonsDependigOnConfigStructure();
|
|
53031
53359
|
newConfigStepKey = undefined;
|
|
53032
53360
|
if (newSelectedArticle != undefined) {
|
|
53033
53361
|
newConfigStepKey = set.configTree.getNewConfigStepKeyByBasketId(curConfigKey, newSelectedArticle.basketId);
|
|
53034
53362
|
this.loadPaletteInfos(curConfigKey, [newSelectedArticle.basketId], Object.keys(set.getDivaArticles()));
|
|
53035
53363
|
baseArticle = setHandlerInstance.getBaseParentArticleOfAccessoire(set, newSelectedArticle.basketId);
|
|
53036
|
-
(_this$
|
|
53364
|
+
(_this$view91 = this.view) === null || _this$view91 === void 0 || _this$view91.updateElementSelectionPlanner([baseArticle.setId], [baseArticle.elementId], true);
|
|
53037
53365
|
}
|
|
53038
53366
|
this.checkMatchingProducts('onCopy');
|
|
53039
|
-
return
|
|
53367
|
+
return _context26.abrupt("return", newConfigStepKey);
|
|
53040
53368
|
case 15:
|
|
53041
53369
|
case "end":
|
|
53042
|
-
return
|
|
53370
|
+
return _context26.stop();
|
|
53043
53371
|
}
|
|
53044
|
-
},
|
|
53372
|
+
}, _callee26, this);
|
|
53045
53373
|
}));
|
|
53046
53374
|
function copyPlannerElement(_x69, _x70, _x71, _x72) {
|
|
53047
53375
|
return _copyPlannerElement.apply(this, arguments);
|
|
@@ -53077,55 +53405,55 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53077
53405
|
}, {
|
|
53078
53406
|
key: "getFreePlacesOnGrids",
|
|
53079
53407
|
value: function () {
|
|
53080
|
-
var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
53081
|
-
var _this$
|
|
53408
|
+
var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(gridGroup, from) {
|
|
53409
|
+
var _this$view92;
|
|
53082
53410
|
var includeFamily,
|
|
53083
53411
|
set,
|
|
53084
53412
|
withFamily,
|
|
53085
53413
|
freeShelfGrids,
|
|
53086
53414
|
plannedShelfGrids,
|
|
53087
|
-
|
|
53088
|
-
return _regeneratorRuntime.wrap(function
|
|
53089
|
-
while (1) switch (
|
|
53415
|
+
_args27 = arguments;
|
|
53416
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
53417
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
53090
53418
|
case 0:
|
|
53091
|
-
includeFamily =
|
|
53419
|
+
includeFamily = _args27.length > 2 && _args27[2] !== undefined ? _args27[2] : false;
|
|
53092
53420
|
set = this.actSet();
|
|
53093
53421
|
if (set) {
|
|
53094
|
-
|
|
53422
|
+
_context27.next = 4;
|
|
53095
53423
|
break;
|
|
53096
53424
|
}
|
|
53097
53425
|
throw new Error('getFreePlacesOnGrids: act set is not defined!');
|
|
53098
53426
|
case 4:
|
|
53099
53427
|
withFamily = includeFamily || this.includeFamilyInFreePlaces;
|
|
53100
53428
|
if (!gridGroup) {
|
|
53101
|
-
|
|
53429
|
+
_context27.next = 11;
|
|
53102
53430
|
break;
|
|
53103
53431
|
}
|
|
53104
|
-
|
|
53432
|
+
_context27.next = 8;
|
|
53105
53433
|
return setHandlerInstance.getFreeShelfGrids(set, gridGroup, withFamily);
|
|
53106
53434
|
case 8:
|
|
53107
|
-
|
|
53108
|
-
|
|
53435
|
+
_context27.t0 = _context27.sent;
|
|
53436
|
+
_context27.next = 12;
|
|
53109
53437
|
break;
|
|
53110
53438
|
case 11:
|
|
53111
|
-
|
|
53439
|
+
_context27.t0 = undefined;
|
|
53112
53440
|
case 12:
|
|
53113
|
-
freeShelfGrids =
|
|
53441
|
+
freeShelfGrids = _context27.t0;
|
|
53114
53442
|
plannedShelfGrids = setHandlerInstance.getPlannedShelfGrids(set);
|
|
53115
53443
|
LOG$2.debug('update free from: ' + from, 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
|
|
53116
|
-
(_this$
|
|
53444
|
+
(_this$view92 = this.view) === null || _this$view92 === void 0 || _this$view92.updateFreePlacesOnGrids({
|
|
53117
53445
|
freeShelfGrids: freeShelfGrids,
|
|
53118
53446
|
plannedShelfGrids: plannedShelfGrids
|
|
53119
53447
|
});
|
|
53120
|
-
return
|
|
53448
|
+
return _context27.abrupt("return", {
|
|
53121
53449
|
freeShelfGrids: freeShelfGrids,
|
|
53122
53450
|
plannedShelfGrids: plannedShelfGrids
|
|
53123
53451
|
});
|
|
53124
53452
|
case 17:
|
|
53125
53453
|
case "end":
|
|
53126
|
-
return
|
|
53454
|
+
return _context27.stop();
|
|
53127
53455
|
}
|
|
53128
|
-
},
|
|
53456
|
+
}, _callee27, this);
|
|
53129
53457
|
}));
|
|
53130
53458
|
function getFreePlacesOnGrids(_x73, _x74) {
|
|
53131
53459
|
return _getFreePlacesOnGrids.apply(this, arguments);
|
|
@@ -53148,37 +53476,37 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53148
53476
|
}, {
|
|
53149
53477
|
key: "moveShelfItemToGrid",
|
|
53150
53478
|
value: function () {
|
|
53151
|
-
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
53479
|
+
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(accessoireBasketId, parentBasketId, gridName, cellIndex, switchToArticleCodex) {
|
|
53152
53480
|
var set, newGridId;
|
|
53153
|
-
return _regeneratorRuntime.wrap(function
|
|
53154
|
-
while (1) switch (
|
|
53481
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
53482
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
53155
53483
|
case 0:
|
|
53156
53484
|
set = this.actSet();
|
|
53157
53485
|
if (set) {
|
|
53158
|
-
|
|
53486
|
+
_context28.next = 3;
|
|
53159
53487
|
break;
|
|
53160
53488
|
}
|
|
53161
|
-
return
|
|
53489
|
+
return _context28.abrupt("return");
|
|
53162
53490
|
case 3:
|
|
53163
|
-
|
|
53491
|
+
_context28.next = 5;
|
|
53164
53492
|
return setHandlerInstance.moveShelfItemToGrid(set, accessoireBasketId, parentBasketId, gridName, cellIndex, switchToArticleCodex);
|
|
53165
53493
|
case 5:
|
|
53166
|
-
newGridId =
|
|
53494
|
+
newGridId = _context28.sent;
|
|
53167
53495
|
this.updatePlannerView('MOVE_SHELF_ITEM');
|
|
53168
53496
|
// A variant switch replaces the article, so the price can change — refresh it (as add/delete do).
|
|
53169
53497
|
this.updatePriceInView();
|
|
53170
53498
|
this.loadPaletteInfos(set.ActConfigStepKey);
|
|
53171
53499
|
if (!newGridId) {
|
|
53172
|
-
|
|
53500
|
+
_context28.next = 12;
|
|
53173
53501
|
break;
|
|
53174
53502
|
}
|
|
53175
|
-
|
|
53503
|
+
_context28.next = 12;
|
|
53176
53504
|
return this.getFreePlacesOnGrids(newGridId, 'move shelf');
|
|
53177
53505
|
case 12:
|
|
53178
53506
|
case "end":
|
|
53179
|
-
return
|
|
53507
|
+
return _context28.stop();
|
|
53180
53508
|
}
|
|
53181
|
-
},
|
|
53509
|
+
}, _callee28, this);
|
|
53182
53510
|
}));
|
|
53183
53511
|
function moveShelfItemToGrid(_x75, _x76, _x77, _x78, _x79) {
|
|
53184
53512
|
return _moveShelfItemToGrid.apply(this, arguments);
|
|
@@ -53202,25 +53530,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53202
53530
|
}, {
|
|
53203
53531
|
key: "resetArticle",
|
|
53204
53532
|
value: function () {
|
|
53205
|
-
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
53533
|
+
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(basketId) {
|
|
53206
53534
|
var set;
|
|
53207
|
-
return _regeneratorRuntime.wrap(function
|
|
53208
|
-
while (1) switch (
|
|
53535
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
53536
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
53209
53537
|
case 0:
|
|
53210
53538
|
set = this.actSet();
|
|
53211
53539
|
if (set) {
|
|
53212
|
-
|
|
53540
|
+
_context29.next = 3;
|
|
53213
53541
|
break;
|
|
53214
53542
|
}
|
|
53215
|
-
return
|
|
53543
|
+
return _context29.abrupt("return");
|
|
53216
53544
|
case 3:
|
|
53217
|
-
|
|
53545
|
+
_context29.next = 5;
|
|
53218
53546
|
return setHandlerInstance.resetArticle(set, basketId);
|
|
53219
53547
|
case 5:
|
|
53220
53548
|
case "end":
|
|
53221
|
-
return
|
|
53549
|
+
return _context29.stop();
|
|
53222
53550
|
}
|
|
53223
|
-
},
|
|
53551
|
+
}, _callee29, this);
|
|
53224
53552
|
}));
|
|
53225
53553
|
function resetArticle(_x80) {
|
|
53226
53554
|
return _resetArticle.apply(this, arguments);
|
|
@@ -53252,10 +53580,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53252
53580
|
}, {
|
|
53253
53581
|
key: "checkMatchingProducts",
|
|
53254
53582
|
value: function () {
|
|
53255
|
-
var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
53583
|
+
var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(from) {
|
|
53256
53584
|
var set, _set$getMatchingProdu, _set$getMatchingOrigP, _set$getMatchingOrigP2, _set$getMatchingProdu2;
|
|
53257
|
-
return _regeneratorRuntime.wrap(function
|
|
53258
|
-
while (1) switch (
|
|
53585
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
53586
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
53259
53587
|
case 0:
|
|
53260
53588
|
set = this.actSet();
|
|
53261
53589
|
if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
@@ -53269,18 +53597,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53269
53597
|
}
|
|
53270
53598
|
}
|
|
53271
53599
|
if (!(set !== null && set !== void 0 && set.api.doCheckForProductsMatch())) {
|
|
53272
|
-
|
|
53600
|
+
_context30.next = 6;
|
|
53273
53601
|
break;
|
|
53274
53602
|
}
|
|
53275
|
-
|
|
53603
|
+
_context30.next = 5;
|
|
53276
53604
|
return productHandlerInstance.updateProducts(this.setsAsArray, this.api, this.divaBasketHandler.divaWWSHandler, from);
|
|
53277
53605
|
case 5:
|
|
53278
53606
|
this.updatePriceInView();
|
|
53279
53607
|
case 6:
|
|
53280
53608
|
case "end":
|
|
53281
|
-
return
|
|
53609
|
+
return _context30.stop();
|
|
53282
53610
|
}
|
|
53283
|
-
},
|
|
53611
|
+
}, _callee30, this);
|
|
53284
53612
|
}));
|
|
53285
53613
|
function checkMatchingProducts(_x81) {
|
|
53286
53614
|
return _checkMatchingProducts.apply(this, arguments);
|
|
@@ -53294,9 +53622,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53294
53622
|
}, {
|
|
53295
53623
|
key: "updatePriceInView",
|
|
53296
53624
|
value: function updatePriceInView() {
|
|
53297
|
-
var _this$
|
|
53298
|
-
(_this$
|
|
53299
|
-
(_this$
|
|
53625
|
+
var _this$view93, _this$view94, _this$actSet12, _this$actSet13;
|
|
53626
|
+
(_this$view93 = this.view) === null || _this$view93 === void 0 || _this$view93.updateBBox(setHandlerInstance.getBBoxObject(this.actSet()));
|
|
53627
|
+
(_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);
|
|
53300
53628
|
}
|
|
53301
53629
|
|
|
53302
53630
|
/**
|
|
@@ -53359,7 +53687,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53359
53687
|
}, {
|
|
53360
53688
|
key: "saveToBasketWrapper",
|
|
53361
53689
|
value: function () {
|
|
53362
|
-
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
53690
|
+
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31(event, repairOnly, returnToParam, hideLoading) {
|
|
53363
53691
|
var _this$actions31,
|
|
53364
53692
|
_this$actions31$toggl,
|
|
53365
53693
|
_this$actions32,
|
|
@@ -53367,9 +53695,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53367
53695
|
_this4 = this,
|
|
53368
53696
|
_this$actions36,
|
|
53369
53697
|
_this$i18n18;
|
|
53370
|
-
var returnTo, finalEvent, result, _this$actions33, _this$i18n12, _this$i18n13, _this$actions34, _this$i18n14, _this$i18n15, _this$actions35, _this$i18n16, _this$i18n17, _this$
|
|
53371
|
-
return _regeneratorRuntime.wrap(function
|
|
53372
|
-
while (1) switch (
|
|
53698
|
+
var returnTo, finalEvent, result, _this$actions33, _this$i18n12, _this$i18n13, _this$actions34, _this$i18n14, _this$i18n15, _this$actions35, _this$i18n16, _this$i18n17, _this$view95;
|
|
53699
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
53700
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
53373
53701
|
case 0:
|
|
53374
53702
|
returnTo = returnToParam !== null && returnToParam !== void 0 ? returnToParam : this.getReturnTo(event);
|
|
53375
53703
|
finalEvent = {
|
|
@@ -53377,13 +53705,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53377
53705
|
saveBasket: true
|
|
53378
53706
|
};
|
|
53379
53707
|
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);
|
|
53380
|
-
|
|
53708
|
+
_context31.next = 5;
|
|
53381
53709
|
return this.saveToBasket(returnTo, finalEvent.event, repairOnly);
|
|
53382
53710
|
case 5:
|
|
53383
|
-
result =
|
|
53711
|
+
result = _context31.sent;
|
|
53384
53712
|
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);
|
|
53385
53713
|
if (!(result === 'canceled')) {
|
|
53386
|
-
|
|
53714
|
+
_context31.next = 11;
|
|
53387
53715
|
break;
|
|
53388
53716
|
}
|
|
53389
53717
|
LOG$2.error(new DivaError('failed to save Basket'));
|
|
@@ -53391,10 +53719,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53391
53719
|
text: ((_this$i18n12 = this.i18n()) === null || _this$i18n12 === void 0 ? void 0 : _this$i18n12.t('modal.general_error')) + ' --- ' + DivaUtils.formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils.getCurrentTraceId() ? ((_this$i18n13 = this.i18n()) === null || _this$i18n13 === void 0 ? void 0 : _this$i18n13.t('modal.errorcode')) + ': ' + DivaUtils.getCurrentTraceId() : '',
|
|
53392
53720
|
accept: true
|
|
53393
53721
|
});
|
|
53394
|
-
return
|
|
53722
|
+
return _context31.abrupt("return", result);
|
|
53395
53723
|
case 11:
|
|
53396
|
-
|
|
53397
|
-
|
|
53724
|
+
_context31.t0 = returnTo;
|
|
53725
|
+
_context31.next = _context31.t0 === 'OPEN_PDF' ? 14 : _context31.t0 === 'SAVE_BASKET_WITH_MODAL' ? 16 : _context31.t0 === 'OPEN_CONTACT_FORM' ? 17 : 17;
|
|
53398
53726
|
break;
|
|
53399
53727
|
case 14:
|
|
53400
53728
|
if (!this.getBasket().PDFDocumentURL) {
|
|
@@ -53414,7 +53742,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53414
53742
|
}
|
|
53415
53743
|
});
|
|
53416
53744
|
}
|
|
53417
|
-
return
|
|
53745
|
+
return _context31.abrupt("break", 17);
|
|
53418
53746
|
case 16:
|
|
53419
53747
|
(_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.openModal({
|
|
53420
53748
|
text: (_this$i18n18 = this.i18n()) === null || _this$i18n18 === void 0 ? void 0 : _this$i18n18.t('modal.planning_saved'),
|
|
@@ -53422,18 +53750,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53422
53750
|
});
|
|
53423
53751
|
case 17:
|
|
53424
53752
|
if (!(result == 'noArticleToSave')) {
|
|
53425
|
-
|
|
53753
|
+
_context31.next = 20;
|
|
53426
53754
|
break;
|
|
53427
53755
|
}
|
|
53428
|
-
(_this$
|
|
53429
|
-
return
|
|
53756
|
+
(_this$view95 = this.view) === null || _this$view95 === void 0 || _this$view95.updatePlannerMsgContainer('NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
|
|
53757
|
+
return _context31.abrupt("return", 'canceled');
|
|
53430
53758
|
case 20:
|
|
53431
|
-
return
|
|
53759
|
+
return _context31.abrupt("return", result);
|
|
53432
53760
|
case 21:
|
|
53433
53761
|
case "end":
|
|
53434
|
-
return
|
|
53762
|
+
return _context31.stop();
|
|
53435
53763
|
}
|
|
53436
|
-
},
|
|
53764
|
+
}, _callee31, this);
|
|
53437
53765
|
}));
|
|
53438
53766
|
function saveToBasketWrapper(_x82, _x83, _x84, _x85) {
|
|
53439
53767
|
return _saveToBasketWrapper.apply(this, arguments);
|
|
@@ -53443,42 +53771,42 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53443
53771
|
}, {
|
|
53444
53772
|
key: "saveToBasket",
|
|
53445
53773
|
value: function () {
|
|
53446
|
-
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
53774
|
+
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32(returnTo, event, repairOnly) {
|
|
53447
53775
|
var _returnTo, _returnTo2, _returnTo3, _this$actions37, _this$actions38, _this$divaBasketHandl4;
|
|
53448
53776
|
var set, actBasket, oldReturnTo, result, newDivaNr, _this$actSet14, arReady, _result, product;
|
|
53449
|
-
return _regeneratorRuntime.wrap(function
|
|
53450
|
-
while (1) switch (
|
|
53777
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
53778
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
53451
53779
|
case 0:
|
|
53452
53780
|
set = this.actSet();
|
|
53453
53781
|
if (!setHandlerInstance.isNoArticleToSave(this.sets)) {
|
|
53454
|
-
|
|
53782
|
+
_context32.next = 3;
|
|
53455
53783
|
break;
|
|
53456
53784
|
}
|
|
53457
|
-
return
|
|
53785
|
+
return _context32.abrupt("return", 'noArticleToSave');
|
|
53458
53786
|
case 3:
|
|
53459
53787
|
actBasket = this.divaBasketHandler.actBasket;
|
|
53460
53788
|
if (!((_returnTo = returnTo) !== null && _returnTo !== void 0 && _returnTo.startsWith('FAVORITS') && favoritesHandlerInstance.FavoritesDefined(set))) {
|
|
53461
|
-
|
|
53789
|
+
_context32.next = 12;
|
|
53462
53790
|
break;
|
|
53463
53791
|
}
|
|
53464
53792
|
oldReturnTo = returnTo;
|
|
53465
53793
|
this.ReturnTo = returnTo.replace('FAVORITS_', '');
|
|
53466
|
-
|
|
53794
|
+
_context32.next = 9;
|
|
53467
53795
|
return this.handleFavorites('SAVE');
|
|
53468
53796
|
case 9:
|
|
53469
|
-
result =
|
|
53797
|
+
result = _context32.sent;
|
|
53470
53798
|
if (result === 'canceled') {
|
|
53471
53799
|
this.ReturnTo = oldReturnTo;
|
|
53472
53800
|
}
|
|
53473
|
-
return
|
|
53801
|
+
return _context32.abrupt("return", result);
|
|
53474
53802
|
case 12:
|
|
53475
|
-
|
|
53476
|
-
|
|
53477
|
-
|
|
53803
|
+
_context32.t0 = this.divaBasketHandler;
|
|
53804
|
+
_context32.t1 = this.divaBasketHandler.actDivaNr;
|
|
53805
|
+
_context32.next = 16;
|
|
53478
53806
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
|
|
53479
53807
|
case 16:
|
|
53480
|
-
|
|
53481
|
-
|
|
53808
|
+
_context32.t2 = _context32.sent;
|
|
53809
|
+
_context32.t0.setBasketData.call(_context32.t0, _context32.t1, _context32.t2);
|
|
53482
53810
|
if ((_returnTo2 = returnTo) !== null && _returnTo2 !== void 0 && _returnTo2.endsWith('OPEN_SELLER_BASKET')) {
|
|
53483
53811
|
this.ReturnTo = 'OPEN_SELLER_BASKET';
|
|
53484
53812
|
returnTo = this.ReturnTo;
|
|
@@ -53493,11 +53821,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53493
53821
|
this.divaBasketHandler.fillOrigConfigurations();
|
|
53494
53822
|
actBasket.Updated = Date.now();
|
|
53495
53823
|
if (!returnTo) {
|
|
53496
|
-
|
|
53824
|
+
_context32.next = 54;
|
|
53497
53825
|
break;
|
|
53498
53826
|
}
|
|
53499
|
-
|
|
53500
|
-
|
|
53827
|
+
_context32.t3 = returnTo;
|
|
53828
|
+
_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;
|
|
53501
53829
|
break;
|
|
53502
53830
|
case 27:
|
|
53503
53831
|
(_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.openComponent({
|
|
@@ -53510,7 +53838,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53510
53838
|
basketData: actBasket
|
|
53511
53839
|
}
|
|
53512
53840
|
});
|
|
53513
|
-
return
|
|
53841
|
+
return _context32.abrupt("break", 54);
|
|
53514
53842
|
case 29:
|
|
53515
53843
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
53516
53844
|
actBasket.setDocumentVersion(actBasket.getDocumentVersion() + 1);
|
|
@@ -53525,26 +53853,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53525
53853
|
basketData: actBasket
|
|
53526
53854
|
}
|
|
53527
53855
|
});
|
|
53528
|
-
return
|
|
53856
|
+
return _context32.abrupt("break", 54);
|
|
53529
53857
|
case 32:
|
|
53530
53858
|
if (!(event == 'onSaveProduct')) {
|
|
53531
|
-
|
|
53859
|
+
_context32.next = 44;
|
|
53532
53860
|
break;
|
|
53533
53861
|
}
|
|
53534
|
-
|
|
53862
|
+
_context32.next = 35;
|
|
53535
53863
|
return setHandlerInstance.flushPendingUploadsViaMediaService(actBasket);
|
|
53536
53864
|
case 35:
|
|
53537
53865
|
//copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
|
|
53538
53866
|
actBasket = new BasketData(JSON.parse(JSON.stringify(actBasket)));
|
|
53539
|
-
|
|
53867
|
+
_context32.next = 38;
|
|
53540
53868
|
return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
|
|
53541
53869
|
case 38:
|
|
53542
|
-
|
|
53870
|
+
_context32.next = 40;
|
|
53543
53871
|
return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
|
|
53544
53872
|
case 40:
|
|
53545
|
-
newDivaNr =
|
|
53873
|
+
newDivaNr = _context32.sent;
|
|
53546
53874
|
actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
|
|
53547
|
-
|
|
53875
|
+
_context32.next = 53;
|
|
53548
53876
|
break;
|
|
53549
53877
|
case 44:
|
|
53550
53878
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
@@ -53554,30 +53882,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53554
53882
|
this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
|
|
53555
53883
|
actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
|
|
53556
53884
|
arReady = !!((_this$actSet14 = this.actSet()) !== null && _this$actSet14 !== void 0 && _this$actSet14.CatalogData.divaArReady);
|
|
53557
|
-
|
|
53885
|
+
_context32.next = 50;
|
|
53558
53886
|
return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo, arReady);
|
|
53559
53887
|
case 50:
|
|
53560
|
-
_result =
|
|
53888
|
+
_result = _context32.sent;
|
|
53561
53889
|
if (!(_result === 'ERROR_NO_BASKET_SAVED' || _result === 'ERROR_BASKET_AFTER_SAVE')) {
|
|
53562
|
-
|
|
53890
|
+
_context32.next = 53;
|
|
53563
53891
|
break;
|
|
53564
53892
|
}
|
|
53565
|
-
return
|
|
53893
|
+
return _context32.abrupt("return", 'canceled');
|
|
53566
53894
|
case 53:
|
|
53567
|
-
return
|
|
53895
|
+
return _context32.abrupt("break", 54);
|
|
53568
53896
|
case 54:
|
|
53569
53897
|
if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
|
|
53570
53898
|
actBasket = (_this$divaBasketHandl4 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : actBasket; //get pdf documenturl from saved basket
|
|
53571
|
-
|
|
53899
|
+
_context32.next = 58;
|
|
53572
53900
|
return this.addToBasket(actBasket, event);
|
|
53573
53901
|
case 58:
|
|
53574
|
-
product =
|
|
53575
|
-
return
|
|
53902
|
+
product = _context32.sent;
|
|
53903
|
+
return _context32.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
|
|
53576
53904
|
case 60:
|
|
53577
53905
|
case "end":
|
|
53578
|
-
return
|
|
53906
|
+
return _context32.stop();
|
|
53579
53907
|
}
|
|
53580
|
-
},
|
|
53908
|
+
}, _callee32, this);
|
|
53581
53909
|
}));
|
|
53582
53910
|
function saveToBasket(_x86, _x87, _x88) {
|
|
53583
53911
|
return _saveToBasket.apply(this, arguments);
|
|
@@ -53594,24 +53922,24 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53594
53922
|
}, {
|
|
53595
53923
|
key: "generateAiImageWithReferenceImages",
|
|
53596
53924
|
value: function () {
|
|
53597
|
-
var _generateAiImageWithReferenceImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
53925
|
+
var _generateAiImageWithReferenceImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33(data, leadKey) {
|
|
53598
53926
|
var _this$actSet15, _this$state6, _this$actSet16;
|
|
53599
|
-
return _regeneratorRuntime.wrap(function
|
|
53600
|
-
while (1) switch (
|
|
53927
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
53928
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
53601
53929
|
case 0:
|
|
53602
53930
|
(_this$actSet15 = this.actSet()) === null || _this$actSet15 === void 0 || _this$actSet15.CatalogData.catalogCodex;
|
|
53603
|
-
|
|
53931
|
+
_context33.next = 3;
|
|
53604
53932
|
return this.api.generateAiImageWithReferenceImages(_objectSpread$7(_objectSpread$7({}, data), {}, {
|
|
53605
53933
|
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,
|
|
53606
53934
|
catalogCodex: (_this$actSet16 = this.actSet()) === null || _this$actSet16 === void 0 ? void 0 : _this$actSet16.CatalogData.catalogCodex
|
|
53607
53935
|
}), leadKey);
|
|
53608
53936
|
case 3:
|
|
53609
|
-
return
|
|
53937
|
+
return _context33.abrupt("return", _context33.sent);
|
|
53610
53938
|
case 4:
|
|
53611
53939
|
case "end":
|
|
53612
|
-
return
|
|
53940
|
+
return _context33.stop();
|
|
53613
53941
|
}
|
|
53614
|
-
},
|
|
53942
|
+
}, _callee33, this);
|
|
53615
53943
|
}));
|
|
53616
53944
|
function generateAiImageWithReferenceImages(_x89, _x90) {
|
|
53617
53945
|
return _generateAiImageWithReferenceImages.apply(this, arguments);
|
|
@@ -53621,25 +53949,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53621
53949
|
}, {
|
|
53622
53950
|
key: "getUsageLimits",
|
|
53623
53951
|
value: function () {
|
|
53624
|
-
var _getUsageLimits = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
53952
|
+
var _getUsageLimits = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34() {
|
|
53625
53953
|
var _localStorage$getItem, _localStorage;
|
|
53626
53954
|
var leadKey;
|
|
53627
|
-
return _regeneratorRuntime.wrap(function
|
|
53628
|
-
while (1) switch (
|
|
53955
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
53956
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
53629
53957
|
case 0:
|
|
53630
53958
|
// Get lead key from localStorage if it exists (for anonymous users)
|
|
53631
53959
|
leadKey = (_localStorage$getItem = (_localStorage = localStorage) === null || _localStorage === void 0 ? void 0 : _localStorage.getItem('diva_lead_key')) !== null && _localStorage$getItem !== void 0 ? _localStorage$getItem : undefined;
|
|
53632
|
-
|
|
53960
|
+
_context34.next = 3;
|
|
53633
53961
|
return this.api.getUsageLimits(leadKey ? {
|
|
53634
53962
|
leadKey: leadKey
|
|
53635
53963
|
} : undefined);
|
|
53636
53964
|
case 3:
|
|
53637
|
-
return
|
|
53965
|
+
return _context34.abrupt("return", _context34.sent);
|
|
53638
53966
|
case 4:
|
|
53639
53967
|
case "end":
|
|
53640
|
-
return
|
|
53968
|
+
return _context34.stop();
|
|
53641
53969
|
}
|
|
53642
|
-
},
|
|
53970
|
+
}, _callee34, this);
|
|
53643
53971
|
}));
|
|
53644
53972
|
function getUsageLimits() {
|
|
53645
53973
|
return _getUsageLimits.apply(this, arguments);
|
|
@@ -53668,23 +53996,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53668
53996
|
}, {
|
|
53669
53997
|
key: "getAiRoomRenderings",
|
|
53670
53998
|
value: function () {
|
|
53671
|
-
var _getAiRoomRenderings = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
53999
|
+
var _getAiRoomRenderings = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35() {
|
|
53672
54000
|
var _this$state7;
|
|
53673
54001
|
var organizationId, lang;
|
|
53674
|
-
return _regeneratorRuntime.wrap(function
|
|
53675
|
-
while (1) switch (
|
|
54002
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
54003
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
53676
54004
|
case 0:
|
|
53677
54005
|
organizationId = (_this$state7 = this.state) === null || _this$state7 === void 0 ? void 0 : _this$state7.organization._id;
|
|
53678
54006
|
lang = this.api.getLanguage();
|
|
53679
|
-
|
|
54007
|
+
_context35.next = 4;
|
|
53680
54008
|
return this.api.getAiRoomRenderings(organizationId, lang !== null && lang !== void 0 ? lang : undefined);
|
|
53681
54009
|
case 4:
|
|
53682
|
-
return
|
|
54010
|
+
return _context35.abrupt("return", _context35.sent);
|
|
53683
54011
|
case 5:
|
|
53684
54012
|
case "end":
|
|
53685
|
-
return
|
|
54013
|
+
return _context35.stop();
|
|
53686
54014
|
}
|
|
53687
|
-
},
|
|
54015
|
+
}, _callee35, this);
|
|
53688
54016
|
}));
|
|
53689
54017
|
function getAiRoomRenderings() {
|
|
53690
54018
|
return _getAiRoomRenderings.apply(this, arguments);
|
|
@@ -53694,19 +54022,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
53694
54022
|
}, {
|
|
53695
54023
|
key: "createLeadKey",
|
|
53696
54024
|
value: function () {
|
|
53697
|
-
var _createLeadKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
53698
|
-
return _regeneratorRuntime.wrap(function
|
|
53699
|
-
while (1) switch (
|
|
54025
|
+
var _createLeadKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee36(email) {
|
|
54026
|
+
return _regeneratorRuntime.wrap(function _callee36$(_context36) {
|
|
54027
|
+
while (1) switch (_context36.prev = _context36.next) {
|
|
53700
54028
|
case 0:
|
|
53701
|
-
|
|
54029
|
+
_context36.next = 2;
|
|
53702
54030
|
return this.api.createLeadKey(email);
|
|
53703
54031
|
case 2:
|
|
53704
|
-
return
|
|
54032
|
+
return _context36.abrupt("return", _context36.sent);
|
|
53705
54033
|
case 3:
|
|
53706
54034
|
case "end":
|
|
53707
|
-
return
|
|
54035
|
+
return _context36.stop();
|
|
53708
54036
|
}
|
|
53709
|
-
},
|
|
54037
|
+
}, _callee36, this);
|
|
53710
54038
|
}));
|
|
53711
54039
|
function createLeadKey(_x91) {
|
|
53712
54040
|
return _createLeadKey.apply(this, arguments);
|
|
@@ -54012,23 +54340,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54012
54340
|
}, {
|
|
54013
54341
|
key: "getBasketDataWithEkText",
|
|
54014
54342
|
value: function () {
|
|
54015
|
-
var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
54016
|
-
return _regeneratorRuntime.wrap(function
|
|
54017
|
-
while (1) switch (
|
|
54343
|
+
var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee37() {
|
|
54344
|
+
return _regeneratorRuntime.wrap(function _callee37$(_context37) {
|
|
54345
|
+
while (1) switch (_context37.prev = _context37.next) {
|
|
54018
54346
|
case 0:
|
|
54019
|
-
|
|
54020
|
-
|
|
54021
|
-
|
|
54347
|
+
_context37.t0 = this.divaBasketHandler;
|
|
54348
|
+
_context37.t1 = this.divaBasketHandler.actDivaNr;
|
|
54349
|
+
_context37.next = 4;
|
|
54022
54350
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, true, this.doAllowSetPlanner(), this.ReturnTo);
|
|
54023
54351
|
case 4:
|
|
54024
|
-
|
|
54025
|
-
|
|
54026
|
-
return
|
|
54352
|
+
_context37.t2 = _context37.sent;
|
|
54353
|
+
_context37.t0.setBasketData.call(_context37.t0, _context37.t1, _context37.t2);
|
|
54354
|
+
return _context37.abrupt("return", this.divaBasketHandler.actBasket);
|
|
54027
54355
|
case 7:
|
|
54028
54356
|
case "end":
|
|
54029
|
-
return
|
|
54357
|
+
return _context37.stop();
|
|
54030
54358
|
}
|
|
54031
|
-
},
|
|
54359
|
+
}, _callee37, this);
|
|
54032
54360
|
}));
|
|
54033
54361
|
function getBasketDataWithEkText() {
|
|
54034
54362
|
return _getBasketDataWithEkText.apply(this, arguments);
|
|
@@ -54054,7 +54382,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54054
54382
|
}, {
|
|
54055
54383
|
key: "addToBasket",
|
|
54056
54384
|
value: function () {
|
|
54057
|
-
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
54385
|
+
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee38(actBasket) {
|
|
54058
54386
|
var _this$actions39,
|
|
54059
54387
|
_this$actions40,
|
|
54060
54388
|
_this$actions41,
|
|
@@ -54073,44 +54401,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54073
54401
|
to,
|
|
54074
54402
|
variants,
|
|
54075
54403
|
products,
|
|
54076
|
-
|
|
54077
|
-
return _regeneratorRuntime.wrap(function
|
|
54078
|
-
while (1) switch (
|
|
54404
|
+
_args38 = arguments;
|
|
54405
|
+
return _regeneratorRuntime.wrap(function _callee38$(_context38) {
|
|
54406
|
+
while (1) switch (_context38.prev = _context38.next) {
|
|
54079
54407
|
case 0:
|
|
54080
|
-
event =
|
|
54081
|
-
|
|
54082
|
-
|
|
54408
|
+
event = _args38.length > 1 && _args38[1] !== undefined ? _args38[1] : 'onAddToBasket';
|
|
54409
|
+
_context38.t0 = event;
|
|
54410
|
+
_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;
|
|
54083
54411
|
break;
|
|
54084
54412
|
case 4:
|
|
54085
54413
|
(_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
|
|
54086
54414
|
type: 'onWebPlanerPrint',
|
|
54087
54415
|
data: actBasket.getAsJson()
|
|
54088
54416
|
});
|
|
54089
|
-
return
|
|
54417
|
+
return _context38.abrupt("break", 30);
|
|
54090
54418
|
case 6:
|
|
54091
54419
|
(_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
|
|
54092
54420
|
type: 'onWebPlanerSave',
|
|
54093
54421
|
data: actBasket.getAsJson()
|
|
54094
54422
|
});
|
|
54095
|
-
return
|
|
54423
|
+
return _context38.abrupt("break", 30);
|
|
54096
54424
|
case 8:
|
|
54097
54425
|
(_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
|
|
54098
54426
|
type: 'onWebPlanerShare',
|
|
54099
54427
|
data: actBasket.getAsJson()
|
|
54100
54428
|
});
|
|
54101
|
-
return
|
|
54429
|
+
return _context38.abrupt("break", 30);
|
|
54102
54430
|
case 10:
|
|
54103
54431
|
(_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
|
|
54104
54432
|
type: 'onRequestConsulation',
|
|
54105
54433
|
data: actBasket.getAsJson()
|
|
54106
54434
|
});
|
|
54107
|
-
return
|
|
54435
|
+
return _context38.abrupt("break", 30);
|
|
54108
54436
|
case 12:
|
|
54109
54437
|
(_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
|
|
54110
54438
|
type: 'onSave',
|
|
54111
54439
|
data: actBasket.getAsJson()
|
|
54112
54440
|
});
|
|
54113
|
-
return
|
|
54441
|
+
return _context38.abrupt("break", 30);
|
|
54114
54442
|
case 14:
|
|
54115
54443
|
emailConfig = (_this$divaBasketHandl6 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl6 !== void 0 ? _this$divaBasketHandl6 : this.getEmailConfig(); //reset the emailConfig
|
|
54116
54444
|
this.divaBasketHandler.emailConfig = undefined;
|
|
@@ -54145,41 +54473,41 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54145
54473
|
type: 'onAddToBasket',
|
|
54146
54474
|
data: actBasket.getAsJson()
|
|
54147
54475
|
});
|
|
54148
|
-
return
|
|
54476
|
+
return _context38.abrupt("break", 30);
|
|
54149
54477
|
case 19:
|
|
54150
54478
|
this.actSet().CatalogData;
|
|
54151
|
-
|
|
54479
|
+
_context38.next = 22;
|
|
54152
54480
|
return this.api.saveAsProduct(this.sets, actBasket);
|
|
54153
54481
|
case 22:
|
|
54154
|
-
products =
|
|
54482
|
+
products = _context38.sent;
|
|
54155
54483
|
(_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.onEvent({
|
|
54156
54484
|
type: 'onAddToBasket',
|
|
54157
54485
|
data: actBasket.getAsJson()
|
|
54158
54486
|
});
|
|
54159
54487
|
if (!products) {
|
|
54160
|
-
|
|
54488
|
+
_context38.next = 26;
|
|
54161
54489
|
break;
|
|
54162
54490
|
}
|
|
54163
|
-
return
|
|
54491
|
+
return _context38.abrupt("return", products[0]);
|
|
54164
54492
|
case 26:
|
|
54165
54493
|
(_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.onEvent({
|
|
54166
54494
|
type: 'onAddToBasket',
|
|
54167
54495
|
data: actBasket.getAsJson()
|
|
54168
54496
|
});
|
|
54169
|
-
return
|
|
54497
|
+
return _context38.abrupt("break", 30);
|
|
54170
54498
|
case 28:
|
|
54171
54499
|
(_this$actions47 = this.actions) === null || _this$actions47 === void 0 || _this$actions47.onEvent({
|
|
54172
54500
|
type: event,
|
|
54173
54501
|
data: actBasket.getAsJson()
|
|
54174
54502
|
});
|
|
54175
|
-
return
|
|
54503
|
+
return _context38.abrupt("break", 30);
|
|
54176
54504
|
case 30:
|
|
54177
|
-
return
|
|
54505
|
+
return _context38.abrupt("return");
|
|
54178
54506
|
case 31:
|
|
54179
54507
|
case "end":
|
|
54180
|
-
return
|
|
54508
|
+
return _context38.stop();
|
|
54181
54509
|
}
|
|
54182
|
-
},
|
|
54510
|
+
}, _callee38, this);
|
|
54183
54511
|
}));
|
|
54184
54512
|
function addToBasket(_x92) {
|
|
54185
54513
|
return _addToBasket.apply(this, arguments);
|
|
@@ -54236,26 +54564,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54236
54564
|
}, {
|
|
54237
54565
|
key: "getCurrentBasket",
|
|
54238
54566
|
value: function () {
|
|
54239
|
-
var _getCurrentBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
54240
|
-
var _this$actSet45, _this$divaBasketHandl7, _this$
|
|
54241
|
-
return _regeneratorRuntime.wrap(function
|
|
54242
|
-
while (1) switch (
|
|
54567
|
+
var _getCurrentBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee39(event, force, returnTo, dontGoToSummary, hideLoading) {
|
|
54568
|
+
var _this$actSet45, _this$divaBasketHandl7, _this$view96;
|
|
54569
|
+
return _regeneratorRuntime.wrap(function _callee39$(_context39) {
|
|
54570
|
+
while (1) switch (_context39.prev = _context39.next) {
|
|
54243
54571
|
case 0:
|
|
54244
54572
|
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')))) {
|
|
54245
|
-
|
|
54573
|
+
_context39.next = 2;
|
|
54246
54574
|
break;
|
|
54247
54575
|
}
|
|
54248
|
-
return
|
|
54576
|
+
return _context39.abrupt("return", 'BASKET_ALREADY_SAVED');
|
|
54249
54577
|
case 2:
|
|
54250
|
-
|
|
54251
|
-
return (_this$
|
|
54578
|
+
_context39.next = 4;
|
|
54579
|
+
return (_this$view96 = this.view) === null || _this$view96 === void 0 ? void 0 : _this$view96.onClickAddToBasket(undefined, event, force, returnTo, dontGoToSummary, hideLoading);
|
|
54252
54580
|
case 4:
|
|
54253
|
-
return
|
|
54581
|
+
return _context39.abrupt("return", !!_context39.sent);
|
|
54254
54582
|
case 5:
|
|
54255
54583
|
case "end":
|
|
54256
|
-
return
|
|
54584
|
+
return _context39.stop();
|
|
54257
54585
|
}
|
|
54258
|
-
},
|
|
54586
|
+
}, _callee39, this);
|
|
54259
54587
|
}));
|
|
54260
54588
|
function getCurrentBasket(_x93, _x94, _x95, _x96, _x97) {
|
|
54261
54589
|
return _getCurrentBasket.apply(this, arguments);
|
|
@@ -54302,9 +54630,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54302
54630
|
}, {
|
|
54303
54631
|
key: "revealConfigStepInView",
|
|
54304
54632
|
value: function revealConfigStepInView(configStepKey, optionValueCodex) {
|
|
54305
|
-
var _this$
|
|
54306
|
-
(_this$
|
|
54307
|
-
if (optionValueCodex) (_this$
|
|
54633
|
+
var _this$view97, _this$view98;
|
|
54634
|
+
(_this$view97 = this.view) === null || _this$view97 === void 0 || _this$view97.navigateToConfigStep(configStepKey, false);
|
|
54635
|
+
if (optionValueCodex) (_this$view98 = this.view) === null || _this$view98 === void 0 || _this$view98.scrollToOptionValueInView(configStepKey, optionValueCodex);
|
|
54308
54636
|
}
|
|
54309
54637
|
|
|
54310
54638
|
/***********************************Outside events the webPlanner subscribes to ******************************************/
|
|
@@ -54324,9 +54652,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54324
54652
|
key: "initApiForLogicOnly",
|
|
54325
54653
|
value: //just for testing purposes
|
|
54326
54654
|
function () {
|
|
54327
|
-
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
54328
|
-
return _regeneratorRuntime.wrap(function
|
|
54329
|
-
while (1) switch (
|
|
54655
|
+
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee40(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
|
|
54656
|
+
return _regeneratorRuntime.wrap(function _callee40$(_context40) {
|
|
54657
|
+
while (1) switch (_context40.prev = _context40.next) {
|
|
54330
54658
|
case 0:
|
|
54331
54659
|
//empty services
|
|
54332
54660
|
this.api = new DivaApiHandler(_objectSpread$7(_objectSpread$7({}, this.plannerConfig), {}, {
|
|
@@ -54339,16 +54667,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54339
54667
|
jwt: jwt,
|
|
54340
54668
|
apiKey: apiKey
|
|
54341
54669
|
}), handler);
|
|
54342
|
-
|
|
54670
|
+
_context40.next = 3;
|
|
54343
54671
|
return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
|
|
54344
54672
|
case 3:
|
|
54345
54673
|
this.plannerHandler = new DivaPlannerHandler(true);
|
|
54346
54674
|
if (this.strictArtifactGeneration) this.plannerHandler.setStrictArtifactGeneration(true);
|
|
54347
54675
|
case 5:
|
|
54348
54676
|
case "end":
|
|
54349
|
-
return
|
|
54677
|
+
return _context40.stop();
|
|
54350
54678
|
}
|
|
54351
|
-
},
|
|
54679
|
+
}, _callee40, this);
|
|
54352
54680
|
}));
|
|
54353
54681
|
function initApiForLogicOnly(_x98, _x99, _x100, _x101, _x102, _x103, _x104) {
|
|
54354
54682
|
return _initApiForLogicOnly.apply(this, arguments);
|
|
@@ -54363,16 +54691,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54363
54691
|
}, {
|
|
54364
54692
|
key: "loadBasket",
|
|
54365
54693
|
value: function () {
|
|
54366
|
-
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
54367
|
-
return _regeneratorRuntime.wrap(function
|
|
54368
|
-
while (1) switch (
|
|
54694
|
+
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee41() {
|
|
54695
|
+
return _regeneratorRuntime.wrap(function _callee41$(_context41) {
|
|
54696
|
+
while (1) switch (_context41.prev = _context41.next) {
|
|
54369
54697
|
case 0:
|
|
54370
|
-
return
|
|
54698
|
+
return _context41.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
|
|
54371
54699
|
case 1:
|
|
54372
54700
|
case "end":
|
|
54373
|
-
return
|
|
54701
|
+
return _context41.stop();
|
|
54374
54702
|
}
|
|
54375
|
-
},
|
|
54703
|
+
}, _callee41, this);
|
|
54376
54704
|
}));
|
|
54377
54705
|
function loadBasket() {
|
|
54378
54706
|
return _loadBasket.apply(this, arguments);
|
|
@@ -54387,39 +54715,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54387
54715
|
}, {
|
|
54388
54716
|
key: "initBasket",
|
|
54389
54717
|
value: function () {
|
|
54390
|
-
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
54718
|
+
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee42(init3D, ignoreFavorites) {
|
|
54391
54719
|
var initSetState, set, basket;
|
|
54392
|
-
return _regeneratorRuntime.wrap(function
|
|
54393
|
-
while (1) switch (
|
|
54720
|
+
return _regeneratorRuntime.wrap(function _callee42$(_context42) {
|
|
54721
|
+
while (1) switch (_context42.prev = _context42.next) {
|
|
54394
54722
|
case 0:
|
|
54395
54723
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
54396
54724
|
initSetState = this.getInitStateForSet(!init3D);
|
|
54397
|
-
|
|
54725
|
+
_context42.next = 4;
|
|
54398
54726
|
return this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
54399
54727
|
case 4:
|
|
54400
|
-
|
|
54728
|
+
_context42.next = 6;
|
|
54401
54729
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
54402
54730
|
case 6:
|
|
54403
54731
|
//TODO check if when basket gets repaired the product match gets called
|
|
54404
54732
|
set = this.actSet();
|
|
54405
54733
|
setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
|
|
54406
54734
|
if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
|
|
54407
|
-
|
|
54735
|
+
_context42.next = 11;
|
|
54408
54736
|
break;
|
|
54409
54737
|
}
|
|
54410
|
-
|
|
54738
|
+
_context42.next = 11;
|
|
54411
54739
|
return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
|
|
54412
54740
|
case 11:
|
|
54413
|
-
|
|
54741
|
+
_context42.next = 13;
|
|
54414
54742
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
|
|
54415
54743
|
case 13:
|
|
54416
|
-
basket =
|
|
54417
|
-
return
|
|
54744
|
+
basket = _context42.sent;
|
|
54745
|
+
return _context42.abrupt("return", basket);
|
|
54418
54746
|
case 15:
|
|
54419
54747
|
case "end":
|
|
54420
|
-
return
|
|
54748
|
+
return _context42.stop();
|
|
54421
54749
|
}
|
|
54422
|
-
},
|
|
54750
|
+
}, _callee42, this);
|
|
54423
54751
|
}));
|
|
54424
54752
|
function initBasket(_x105, _x106) {
|
|
54425
54753
|
return _initBasket.apply(this, arguments);
|
|
@@ -54458,21 +54786,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54458
54786
|
}, {
|
|
54459
54787
|
key: "getValidVariantsLength",
|
|
54460
54788
|
value: function () {
|
|
54461
|
-
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
54789
|
+
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee43() {
|
|
54462
54790
|
var set;
|
|
54463
|
-
return _regeneratorRuntime.wrap(function
|
|
54464
|
-
while (1) switch (
|
|
54791
|
+
return _regeneratorRuntime.wrap(function _callee43$(_context43) {
|
|
54792
|
+
while (1) switch (_context43.prev = _context43.next) {
|
|
54465
54793
|
case 0:
|
|
54466
54794
|
set = this.actSet();
|
|
54467
|
-
|
|
54795
|
+
_context43.next = 3;
|
|
54468
54796
|
return favoritesHandlerInstance.getValidVariants(set, true);
|
|
54469
54797
|
case 3:
|
|
54470
|
-
return
|
|
54798
|
+
return _context43.abrupt("return", _context43.sent.length);
|
|
54471
54799
|
case 4:
|
|
54472
54800
|
case "end":
|
|
54473
|
-
return
|
|
54801
|
+
return _context43.stop();
|
|
54474
54802
|
}
|
|
54475
|
-
},
|
|
54803
|
+
}, _callee43, this);
|
|
54476
54804
|
}));
|
|
54477
54805
|
function getValidVariantsLength() {
|
|
54478
54806
|
return _getValidVariantsLength.apply(this, arguments);
|
|
@@ -54482,44 +54810,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54482
54810
|
}, {
|
|
54483
54811
|
key: "handleFavorites",
|
|
54484
54812
|
value: function () {
|
|
54485
|
-
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
54813
|
+
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee44(mode) {
|
|
54486
54814
|
var _this6 = this;
|
|
54487
54815
|
var set, i;
|
|
54488
|
-
return _regeneratorRuntime.wrap(function
|
|
54489
|
-
while (1) switch (
|
|
54816
|
+
return _regeneratorRuntime.wrap(function _callee44$(_context44) {
|
|
54817
|
+
while (1) switch (_context44.prev = _context44.next) {
|
|
54490
54818
|
case 0:
|
|
54491
54819
|
set = this.actSet();
|
|
54492
54820
|
i = 0;
|
|
54493
54821
|
case 2:
|
|
54494
54822
|
if (!favoritesHandlerInstance.IsCalcForSummary) {
|
|
54495
|
-
|
|
54823
|
+
_context44.next = 11;
|
|
54496
54824
|
break;
|
|
54497
54825
|
}
|
|
54498
|
-
|
|
54826
|
+
_context44.next = 5;
|
|
54499
54827
|
return DivaUtils.Sleep(200);
|
|
54500
54828
|
case 5:
|
|
54501
54829
|
i++;
|
|
54502
54830
|
if (!(i > 1000)) {
|
|
54503
|
-
|
|
54831
|
+
_context44.next = 9;
|
|
54504
54832
|
break;
|
|
54505
54833
|
}
|
|
54506
54834
|
LOG$2.error(new DivaError('error on generating Variants of Summary'));
|
|
54507
|
-
return
|
|
54835
|
+
return _context44.abrupt("break", 11);
|
|
54508
54836
|
case 9:
|
|
54509
|
-
|
|
54837
|
+
_context44.next = 2;
|
|
54510
54838
|
break;
|
|
54511
54839
|
case 11:
|
|
54512
|
-
|
|
54840
|
+
_context44.next = 13;
|
|
54513
54841
|
return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
|
|
54514
54842
|
return _this6.update2DGrid(set);
|
|
54515
54843
|
}, this.actions);
|
|
54516
54844
|
case 13:
|
|
54517
|
-
return
|
|
54845
|
+
return _context44.abrupt("return", _context44.sent);
|
|
54518
54846
|
case 14:
|
|
54519
54847
|
case "end":
|
|
54520
|
-
return
|
|
54848
|
+
return _context44.stop();
|
|
54521
54849
|
}
|
|
54522
|
-
},
|
|
54850
|
+
}, _callee44, this);
|
|
54523
54851
|
}));
|
|
54524
54852
|
function handleFavorites(_x107) {
|
|
54525
54853
|
return _handleFavorites.apply(this, arguments);
|
|
@@ -54534,46 +54862,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
54534
54862
|
}, {
|
|
54535
54863
|
key: "initSapOrderLinesFromBasket",
|
|
54536
54864
|
value: function () {
|
|
54537
|
-
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
54865
|
+
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee45(divaNr, init3D, onlyLoadOldBakset) {
|
|
54538
54866
|
var result, oldBasket, basket;
|
|
54539
|
-
return _regeneratorRuntime.wrap(function
|
|
54540
|
-
while (1) switch (
|
|
54867
|
+
return _regeneratorRuntime.wrap(function _callee45$(_context45) {
|
|
54868
|
+
while (1) switch (_context45.prev = _context45.next) {
|
|
54541
54869
|
case 0:
|
|
54542
54870
|
if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
54543
|
-
|
|
54871
|
+
_context45.next = 3;
|
|
54544
54872
|
return this.loadBasket();
|
|
54545
54873
|
case 3:
|
|
54546
|
-
result =
|
|
54874
|
+
result = _context45.sent;
|
|
54547
54875
|
if (!onlyLoadOldBakset) {
|
|
54548
|
-
|
|
54876
|
+
_context45.next = 6;
|
|
54549
54877
|
break;
|
|
54550
54878
|
}
|
|
54551
|
-
return
|
|
54879
|
+
return _context45.abrupt("return", {
|
|
54552
54880
|
oldBasket: new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
|
|
54553
54881
|
cache: {}
|
|
54554
54882
|
});
|
|
54555
54883
|
case 6:
|
|
54556
54884
|
if (!(result === false)) {
|
|
54557
|
-
|
|
54885
|
+
_context45.next = 8;
|
|
54558
54886
|
break;
|
|
54559
54887
|
}
|
|
54560
54888
|
throw new Error('Could not load basket! ' + divaNr);
|
|
54561
54889
|
case 8:
|
|
54562
54890
|
oldBasket = new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
|
|
54563
|
-
|
|
54891
|
+
_context45.next = 11;
|
|
54564
54892
|
return this.initBasket(init3D);
|
|
54565
54893
|
case 11:
|
|
54566
|
-
basket =
|
|
54567
|
-
return
|
|
54894
|
+
basket = _context45.sent;
|
|
54895
|
+
return _context45.abrupt("return", {
|
|
54568
54896
|
basket: basket,
|
|
54569
54897
|
oldBasket: oldBasket,
|
|
54570
54898
|
cache: this.api.getJsonDataCache()
|
|
54571
54899
|
});
|
|
54572
54900
|
case 13:
|
|
54573
54901
|
case "end":
|
|
54574
|
-
return
|
|
54902
|
+
return _context45.stop();
|
|
54575
54903
|
}
|
|
54576
|
-
},
|
|
54904
|
+
}, _callee45, this);
|
|
54577
54905
|
}));
|
|
54578
54906
|
function initSapOrderLinesFromBasket(_x108, _x109, _x110) {
|
|
54579
54907
|
return _initSapOrderLinesFromBasket.apply(this, arguments);
|
|
@@ -73731,7 +74059,8 @@ function _runHeadlessArtifactPassBatch() {
|
|
|
73731
74059
|
}).filter(function (u) {
|
|
73732
74060
|
return !!u;
|
|
73733
74061
|
}),
|
|
73734
|
-
hqRenderScript: os.HQRenderScript || undefined
|
|
74062
|
+
hqRenderScript: os.HQRenderScript || undefined,
|
|
74063
|
+
glb: os.SetGlb || undefined
|
|
73735
74064
|
};
|
|
73736
74065
|
});
|
|
73737
74066
|
return _context2.abrupt("return", {
|