@crystaldesign/web-planner-logic 25.13.0-beta.45 → 25.13.0-beta.46
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-78547263.js → DivaBoxPlanner-e7ab785a.js} +35 -27
- package/build/cjs/{DivaStandardPlanner-1db6f924.js → DivaStandardPlanner-5f5991fc.js} +2 -2
- package/build/cjs/{DoorPlanner-e036f53e.js → DoorPlanner-0e42d83b.js} +1 -1
- package/build/cjs/{Host3DSignalR-5e6149c8.js → Host3DSignalR-4141d491.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-78ef91e8.js → LiviqueWWSHandler-47cc5540.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-33d93fef.js → PfisterWWSHandler-14805264.js} +1 -1
- package/build/cjs/{PlannerHandler2D-f6080d6d.js → PlannerHandler2D-8a05adf6.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-157b6716.js → SeriousBasketHandler-0ac13ae5.js} +1 -1
- package/build/cjs/{ShelfPlanner-86cdc14d.js → ShelfPlanner-9c3115d7.js} +1 -1
- package/build/cjs/{StandardWWSHandler-9951190e.js → StandardWWSHandler-e24d8597.js} +1 -1
- package/build/cjs/{index-65a02251.js → index-432ba6ff.js} +350 -178
- package/build/cjs/index.js +3 -1
- package/build/esm/{DivaBoxPlanner-b1099e12.js → DivaBoxPlanner-e475edff.js} +35 -27
- package/build/esm/{DivaStandardPlanner-4a3fbda9.js → DivaStandardPlanner-47703c34.js} +2 -2
- package/build/esm/{DoorPlanner-94315f66.js → DoorPlanner-637f86ff.js} +1 -1
- package/build/esm/{Host3DSignalR-ce7888d3.js → Host3DSignalR-d4ba5141.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-3412addf.js → LiviqueWWSHandler-2f71cbef.js} +1 -1
- package/build/esm/{PfisterWWSHandler-52de90b4.js → PfisterWWSHandler-1e08979b.js} +1 -1
- package/build/esm/{PlannerHandler2D-710fe586.js → PlannerHandler2D-a7f78918.js} +1 -1
- package/build/esm/{SeriousBasketHandler-7268bd79.js → SeriousBasketHandler-8bcf70f1.js} +1 -1
- package/build/esm/{ShelfPlanner-1c7fb9bd.js → ShelfPlanner-dacb334f.js} +1 -1
- package/build/esm/{StandardWWSHandler-311c2ea4.js → StandardWWSHandler-8c3733bc.js} +1 -1
- package/build/esm/{index-d7b8a9a3.js → index-9d20093d.js} +349 -179
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/index.d.ts +2 -1
- package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/API/AiImageResult.d.ts +33 -1
- package/build/types/web-planner-logic/src/interface/API/AiImageResult.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +2 -0
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +10 -4
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +22 -6
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/BoxPlannerGrid.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +5 -4
- 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 +2 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts +1 -0
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -216,21 +216,10 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
216
216
|
case 37:
|
|
217
217
|
_context.prev = 37;
|
|
218
218
|
_context.t5 = _context["catch"](4);
|
|
219
|
-
|
|
220
|
-
_context.
|
|
221
|
-
break;
|
|
222
|
-
}
|
|
223
|
-
LOG$p.warn('Rate limit exceeded (429) for URL: ' + url, 'DivaApiHandler.fetchData');
|
|
224
|
-
throw new DivaUtils.DivaError('Rate limit exceeded. Please try again later.', {
|
|
225
|
-
code: 'WC_0429',
|
|
226
|
-
custom: {
|
|
227
|
-
url: url,
|
|
228
|
-
status: 429
|
|
229
|
-
}
|
|
219
|
+
throw Error('fetch failed! ' + url + ' Error: ' + _context.t5, {
|
|
220
|
+
cause: _context.t5 === null || _context.t5 === void 0 || (_e$response = _context.t5.response) === null || _e$response === void 0 || (_e$response = _e$response.data) === null || _e$response === void 0 ? void 0 : _e$response.error
|
|
230
221
|
});
|
|
231
|
-
case
|
|
232
|
-
throw Error('fetch failed! ' + url + ' Error: ' + _context.t5);
|
|
233
|
-
case 43:
|
|
222
|
+
case 40:
|
|
234
223
|
case "end":
|
|
235
224
|
return _context.stop();
|
|
236
225
|
}
|
|
@@ -1235,6 +1224,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1235
1224
|
key: "generateAiImageWithReferenceImages",
|
|
1236
1225
|
value: function () {
|
|
1237
1226
|
var _generateAiImageWithReferenceImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9(data, leadKey) {
|
|
1227
|
+
var _DivaUtils$Configurat;
|
|
1238
1228
|
var url, headers, res;
|
|
1239
1229
|
return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context9) {
|
|
1240
1230
|
while (1) switch (_context9.prev = _context9.next) {
|
|
@@ -1247,7 +1237,10 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1247
1237
|
organizationId: this.OrganizationId
|
|
1248
1238
|
}),
|
|
1249
1239
|
config: {
|
|
1250
|
-
headers: headers
|
|
1240
|
+
headers: _objectSpread$k(_objectSpread$k({}, headers), {}, {
|
|
1241
|
+
'X-Session-Id': DivaUtils__default["default"].SessionId,
|
|
1242
|
+
'X-Configurator-Id': (_DivaUtils$Configurat = DivaUtils__default["default"].ConfigurationId) !== null && _DivaUtils$Configurat !== void 0 ? _DivaUtils$Configurat : ''
|
|
1243
|
+
})
|
|
1251
1244
|
},
|
|
1252
1245
|
method: 'POST'
|
|
1253
1246
|
});
|
|
@@ -1273,9 +1266,12 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1273
1266
|
return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context10) {
|
|
1274
1267
|
while (1) switch (_context10.prev = _context10.next) {
|
|
1275
1268
|
case 0:
|
|
1276
|
-
url = this.getDivaAiServiceUrl() + '/usage/limits
|
|
1277
|
-
headers = this.getAiServiceAuthHeaders();
|
|
1278
|
-
|
|
1269
|
+
url = this.getDivaAiServiceUrl() + '/usage/limits';
|
|
1270
|
+
headers = this.getAiServiceAuthHeaders(); // Add leadKey header if provided
|
|
1271
|
+
if (data !== null && data !== void 0 && data.leadKey) {
|
|
1272
|
+
headers['x-lead-key'] = data.leadKey;
|
|
1273
|
+
}
|
|
1274
|
+
_context10.next = 5;
|
|
1279
1275
|
return this.fetchData(url, {
|
|
1280
1276
|
data: {},
|
|
1281
1277
|
config: {
|
|
@@ -1283,10 +1279,10 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1283
1279
|
},
|
|
1284
1280
|
method: 'GET'
|
|
1285
1281
|
});
|
|
1286
|
-
case
|
|
1282
|
+
case 5:
|
|
1287
1283
|
res = _context10.sent;
|
|
1288
1284
|
return _context10.abrupt("return", res);
|
|
1289
|
-
case
|
|
1285
|
+
case 7:
|
|
1290
1286
|
case "end":
|
|
1291
1287
|
return _context10.stop();
|
|
1292
1288
|
}
|
|
@@ -1306,7 +1302,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1306
1302
|
while (1) switch (_context11.prev = _context11.next) {
|
|
1307
1303
|
case 0:
|
|
1308
1304
|
orgParam = organizationId ? "?organizationId=".concat(organizationId) : '';
|
|
1309
|
-
url = this.getDivaAiServiceUrl() + '/room-renderings' + orgParam;
|
|
1305
|
+
url = this.getDivaAiServiceUrl() + '/room-renderings' + orgParam;
|
|
1310
1306
|
headers = this.getAiServiceAuthHeaders();
|
|
1311
1307
|
_context11.next = 5;
|
|
1312
1308
|
return this.fetchData(url, {
|
|
@@ -20314,6 +20310,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
20314
20310
|
showAllItemsInPlanner: false,
|
|
20315
20311
|
// All elements are shown in the planner palette
|
|
20316
20312
|
hidePlannerUiIcons: false,
|
|
20313
|
+
showAiRoomRenderingInSummary: false,
|
|
20317
20314
|
dontSetPosNrFromPlanner: false,
|
|
20318
20315
|
hide2DPlanner: false,
|
|
20319
20316
|
// mit diesem Flag kann der 2D planner ausgeblendet werden
|
|
@@ -20736,7 +20733,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
20736
20733
|
}, {
|
|
20737
20734
|
key: "divaForceRTV",
|
|
20738
20735
|
get: function get() {
|
|
20739
|
-
return
|
|
20736
|
+
return this.catalogProps.divaForceRTV;
|
|
20740
20737
|
}
|
|
20741
20738
|
}, {
|
|
20742
20739
|
key: "PlannerMeasureDigits",
|
|
@@ -20818,6 +20815,11 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
20818
20815
|
get: function get() {
|
|
20819
20816
|
return this.catalogProps.startFilterParams;
|
|
20820
20817
|
}
|
|
20818
|
+
}, {
|
|
20819
|
+
key: "showAiRoomRenderingInSummary",
|
|
20820
|
+
get: function get() {
|
|
20821
|
+
return this.catalogProps.showAiRoomRenderingInSummary;
|
|
20822
|
+
}
|
|
20821
20823
|
}, {
|
|
20822
20824
|
key: "startHideArticles",
|
|
20823
20825
|
get: function get() {
|
|
@@ -21447,6 +21449,9 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
21447
21449
|
case 'DONT_SET_POSNR_FROM_PLANNER':
|
|
21448
21450
|
_this5.catalogProps.dontSetPosNrFromPlanner = item.Value == '1';
|
|
21449
21451
|
break;
|
|
21452
|
+
case 'SHOW_AI_ROOM_RENDERING_SUMMARY':
|
|
21453
|
+
_this5.catalogProps.showAiRoomRenderingInSummary = item.Value == '1';
|
|
21454
|
+
break;
|
|
21450
21455
|
// Warnings
|
|
21451
21456
|
case 'HIDECONSTRUCTIONWARNING':
|
|
21452
21457
|
_this5.catalogProps.doCheckConstructionWarnings = item.Value == '0';
|
|
@@ -21507,6 +21512,9 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
21507
21512
|
case 'DONTHIDEOPTION':
|
|
21508
21513
|
_this5.catalogProps.dontHideOption = String(item.Value).split(',');
|
|
21509
21514
|
break;
|
|
21515
|
+
case 'SHOW_AI_ROOM_RENDERING_IN_SUMMARY':
|
|
21516
|
+
_this5.catalogProps.showAiRoomRenderingInSummary = item.Value == '1';
|
|
21517
|
+
break;
|
|
21510
21518
|
case 'SHOWACCESSOIREONLASTTAB':
|
|
21511
21519
|
_this5.catalogProps.showAccessioreOnLastTab = item.Value == '1';
|
|
21512
21520
|
break;
|
|
@@ -26797,8 +26805,10 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26797
26805
|
}, {
|
|
26798
26806
|
key: "retailArticleNr",
|
|
26799
26807
|
get: function get() {
|
|
26800
|
-
|
|
26801
|
-
|
|
26808
|
+
var _this$article$retailA;
|
|
26809
|
+
var retailArticleNr = (_this$article$retailA = this.article.retailArticleNr) !== null && _this$article$retailA !== void 0 ? _this$article$retailA : this.article.catalogArticle.retailArticleNr;
|
|
26810
|
+
if (retailArticleNr !== null && retailArticleNr !== void 0 && retailArticleNr.includes('{')) return this.convertTemplateToCodex(retailArticleNr);
|
|
26811
|
+
return retailArticleNr;
|
|
26802
26812
|
}
|
|
26803
26813
|
}, {
|
|
26804
26814
|
key: "articleCodex",
|
|
@@ -27590,23 +27600,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27590
27600
|
key: "supplierOrderCodex",
|
|
27591
27601
|
get: function get() {
|
|
27592
27602
|
if (this.article.supplierOrderCodex) {
|
|
27593
|
-
|
|
27594
|
-
var array = _toConsumableArray__default["default"](evaluatedOrderCodex.matchAll(/\{(.*?)\}/g));
|
|
27595
|
-
var toRepace = [];
|
|
27596
|
-
for (var i = 0; i < array.length; i++) {
|
|
27597
|
-
var _this$partListParentA11;
|
|
27598
|
-
var expressions = array[i][1].split('.');
|
|
27599
|
-
if (this.isPartListArticle && (_this$partListParentA11 = this.partListParentArticle) !== null && _this$partListParentA11 !== void 0 && _this$partListParentA11.getArticleOptionState((!this.CatalogData.isIDMFormat ? 'OPT' : '') + expressions[0]) || !this.isPartListArticle && this.getArticleOptionState((!this.CatalogData.isIDMFormat ? 'OPT' : '') + expressions[0])) {
|
|
27600
|
-
toRepace.push(eval('this' + (this.isPartListArticle ? '.partListParentArticle' : '') + ".getArticleOptionState('OPT'+expressions[0])[expressions[1]]"));
|
|
27601
|
-
} else {
|
|
27602
|
-
toRepace.push('___Option: "' + expressions[0] + '" not found!___');
|
|
27603
|
-
}
|
|
27604
|
-
}
|
|
27605
|
-
for (var _i2 = 0; _i2 < toRepace.length; _i2++) {
|
|
27606
|
-
var _toRepace$_i;
|
|
27607
|
-
evaluatedOrderCodex = evaluatedOrderCodex.replace(/\{(.*?)\}/, (_toRepace$_i = toRepace[_i2]) !== null && _toRepace$_i !== void 0 ? _toRepace$_i : '');
|
|
27608
|
-
}
|
|
27609
|
-
return evaluatedOrderCodex;
|
|
27603
|
+
return this.convertTemplateToCodex(this.article.supplierOrderCodex);
|
|
27610
27604
|
}
|
|
27611
27605
|
return undefined;
|
|
27612
27606
|
}
|
|
@@ -28194,9 +28188,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28194
28188
|
singleOpts[i] = singleOpts[i].startsWith('OPT') ? singleOpts[i] : (!this.CatalogData.isIDMFormat ? 'OPT' : '') + singleOpts[i];
|
|
28195
28189
|
}
|
|
28196
28190
|
var articles = [].concat(_toConsumableArray__default["default"](this.getAccessoireByArticleCodex(undefined, true)), _toConsumableArray__default["default"](Object.values(this.partlistArticles)), _toConsumableArray__default["default"](this.partListParentArticle ? [this.partListParentArticle] : []));
|
|
28197
|
-
for (var
|
|
28191
|
+
for (var _i2 = 0; _i2 < articles.length; _i2++) {
|
|
28198
28192
|
var variantValues = {};
|
|
28199
|
-
var accessoire = articles[
|
|
28193
|
+
var accessoire = articles[_i2];
|
|
28200
28194
|
var _iterator22 = _createForOfIteratorHelper$6(accessoire.articleOptionStates.values()),
|
|
28201
28195
|
_step22;
|
|
28202
28196
|
try {
|
|
@@ -28705,7 +28699,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28705
28699
|
break;
|
|
28706
28700
|
}
|
|
28707
28701
|
_context.next = 4;
|
|
28708
|
-
return Promise.resolve().then(function () { return require('./ShelfPlanner-
|
|
28702
|
+
return Promise.resolve().then(function () { return require('./ShelfPlanner-9c3115d7.js'); });
|
|
28709
28703
|
case 4:
|
|
28710
28704
|
_yield$import = _context.sent;
|
|
28711
28705
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -28772,13 +28766,13 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28772
28766
|
}, {
|
|
28773
28767
|
key: "getRefLevelArticle",
|
|
28774
28768
|
value: function getRefLevelArticle() {
|
|
28775
|
-
var _this$
|
|
28769
|
+
var _this$partListParentA11;
|
|
28776
28770
|
var refLevel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 3;
|
|
28777
28771
|
switch (refLevel) {
|
|
28778
28772
|
case 1:
|
|
28779
28773
|
return this.getBaseParent();
|
|
28780
28774
|
case 2:
|
|
28781
|
-
return (_this$
|
|
28775
|
+
return (_this$partListParentA11 = this.partListParentArticle) !== null && _this$partListParentA11 !== void 0 ? _this$partListParentA11 : this;
|
|
28782
28776
|
case 3:
|
|
28783
28777
|
return this;
|
|
28784
28778
|
}
|
|
@@ -28834,9 +28828,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28834
28828
|
if (opv) {
|
|
28835
28829
|
var value = opv.setConfig;
|
|
28836
28830
|
if (value) {
|
|
28837
|
-
for (var
|
|
28838
|
-
var opt = (!this.CatalogData.isIDMFormat ? 'OPT' : '') + value.split(';')[
|
|
28839
|
-
var _opv4 = (!this.CatalogData.isIDMFormat ? 'OPV' : '') + value.split(';')[
|
|
28831
|
+
for (var _i3 = 0; _i3 < value.split(';').length; _i3++) {
|
|
28832
|
+
var opt = (!this.CatalogData.isIDMFormat ? 'OPT' : '') + value.split(';')[_i3].split(':')[0];
|
|
28833
|
+
var _opv4 = (!this.CatalogData.isIDMFormat ? 'OPV' : '') + value.split(';')[_i3].split(':')[1];
|
|
28840
28834
|
if (!myValues[opt] || setConfigDoesOverWrite) {
|
|
28841
28835
|
myValues[opt] = _opv4;
|
|
28842
28836
|
}
|
|
@@ -29180,11 +29174,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
29180
29174
|
if (checkPrice.IsPercentage) {
|
|
29181
29175
|
//Check if variantBasketdata is set as addPercentage
|
|
29182
29176
|
//TODO klären mit Franz - ist das schon der richtige Ort? In dem Fall wird VariantBasketDatas nicht als AddPercentage gekennzeichnet und im Checkout 1 wird CHF stattt % angezeigt.
|
|
29183
|
-
for (var
|
|
29177
|
+
for (var _i4 = 0; _i4 < VariantBasketDatas.length; _i4++) {
|
|
29184
29178
|
var priceOPT = checkPrice.OPT.startsWith('OPT') ? checkPrice.OPT.substring(3) : checkPrice;
|
|
29185
|
-
if (VariantBasketDatas[
|
|
29179
|
+
if (VariantBasketDatas[_i4].OPT == priceOPT) {
|
|
29186
29180
|
if (!isNaN(checkPrice.Price)) {
|
|
29187
|
-
VariantBasketDatas[
|
|
29181
|
+
VariantBasketDatas[_i4].AddPercentage = checkPrice.Price * 100;
|
|
29188
29182
|
}
|
|
29189
29183
|
}
|
|
29190
29184
|
}
|
|
@@ -29201,18 +29195,18 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
29201
29195
|
var maxPrice = 0,
|
|
29202
29196
|
maxPriceOPT = '';
|
|
29203
29197
|
if (!myPriceData.BasePrice && !this.CatalogData.ignoreMaxPriceAsBP) {
|
|
29204
|
-
for (var
|
|
29205
|
-
var variant = VariantBasketDatas[
|
|
29198
|
+
for (var _i5 = 0; _i5 < VariantBasketDatas.length; _i5++) {
|
|
29199
|
+
var variant = VariantBasketDatas[_i5];
|
|
29206
29200
|
if (variant.AddPrice && (!variant.AddPrice || variant.AddPrice > maxPrice)) {
|
|
29207
29201
|
maxPrice = variant.AddPrice;
|
|
29208
29202
|
maxPriceOPT = variant.OPT;
|
|
29209
29203
|
}
|
|
29210
29204
|
}
|
|
29211
29205
|
}
|
|
29212
|
-
for (var
|
|
29206
|
+
for (var _i6 = 0; _i6 < VariantBasketDatas.length; _i6++) {
|
|
29213
29207
|
//WCTODO Prio 2 bei Maßauswahl
|
|
29214
29208
|
var CalcPrice = void 0,
|
|
29215
|
-
_variant = VariantBasketDatas[
|
|
29209
|
+
_variant = VariantBasketDatas[_i6],
|
|
29216
29210
|
isPercentage = false;
|
|
29217
29211
|
if (_variant.AddPercentage) {
|
|
29218
29212
|
isPercentage = true;
|
|
@@ -29313,6 +29307,77 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
29313
29307
|
get: function get() {
|
|
29314
29308
|
return this._engine;
|
|
29315
29309
|
}
|
|
29310
|
+
}, {
|
|
29311
|
+
key: "convertTemplateToCodex",
|
|
29312
|
+
value: function convertTemplateToCodex(codex) {
|
|
29313
|
+
var evaluatedOrderCodex = codex;
|
|
29314
|
+
var array = _toConsumableArray__default["default"](evaluatedOrderCodex.matchAll(/\{(.*?)\}/g));
|
|
29315
|
+
var toRepace = [];
|
|
29316
|
+
for (var i = 0; i < array.length; i++) {
|
|
29317
|
+
var expressions = array[i][1].split('.');
|
|
29318
|
+
var identifier = expressions[0];
|
|
29319
|
+
var _this$parseOperator = this.parseOperator(expressions[1]),
|
|
29320
|
+
operator = _this$parseOperator.operator;
|
|
29321
|
+
_this$parseOperator.key;
|
|
29322
|
+
var value = _this$parseOperator.value;
|
|
29323
|
+
var ruleExtension = operator ? ' ' + operator + ' ' + value : '';
|
|
29324
|
+
if (identifier === 'article') {
|
|
29325
|
+
toRepace.push(eval('this[key]' + ruleExtension));
|
|
29326
|
+
} else if (identifier === 'parent') {
|
|
29327
|
+
toRepace.push(eval('this[key]' + ruleExtension));
|
|
29328
|
+
} else {
|
|
29329
|
+
if (this.getArticleOptionState((!this.CatalogData.isIDMFormat ? 'OPT' : '') + identifier)) {
|
|
29330
|
+
toRepace.push(eval("this.getArticleOptionState('OPT'+identifier)[key]" + ruleExtension));
|
|
29331
|
+
} else {
|
|
29332
|
+
toRepace.push('___Option: "' + identifier + '" not found!___');
|
|
29333
|
+
}
|
|
29334
|
+
}
|
|
29335
|
+
}
|
|
29336
|
+
for (var _i7 = 0; _i7 < toRepace.length; _i7++) {
|
|
29337
|
+
var _toRepace$_i;
|
|
29338
|
+
evaluatedOrderCodex = evaluatedOrderCodex.replace(/\{(.*?)\}/, (_toRepace$_i = toRepace[_i7]) !== null && _toRepace$_i !== void 0 ? _toRepace$_i : '');
|
|
29339
|
+
}
|
|
29340
|
+
return evaluatedOrderCodex;
|
|
29341
|
+
}
|
|
29342
|
+
}, {
|
|
29343
|
+
key: "parseOperator",
|
|
29344
|
+
value: function parseOperator(expression) {
|
|
29345
|
+
if (expression.includes('==')) return {
|
|
29346
|
+
operator: '==',
|
|
29347
|
+
key: expression.split('==')[0].trim(),
|
|
29348
|
+
value: expression.split('==')[1].trim()
|
|
29349
|
+
};
|
|
29350
|
+
if (expression.includes('!=')) return {
|
|
29351
|
+
operator: '!=',
|
|
29352
|
+
key: expression.split('!=')[0].trim(),
|
|
29353
|
+
value: expression.split('!=')[1].trim()
|
|
29354
|
+
};
|
|
29355
|
+
if (expression.includes('>')) return {
|
|
29356
|
+
operator: '>',
|
|
29357
|
+
key: expression.split('>')[0].trim(),
|
|
29358
|
+
value: expression.split('>')[1].trim()
|
|
29359
|
+
};
|
|
29360
|
+
if (expression.includes('<')) return {
|
|
29361
|
+
operator: '<',
|
|
29362
|
+
key: expression.split('<')[0].trim(),
|
|
29363
|
+
value: expression.split('<')[1].trim()
|
|
29364
|
+
};
|
|
29365
|
+
if (expression.includes('>=')) return {
|
|
29366
|
+
operator: '>=',
|
|
29367
|
+
key: expression.split('>=')[0].trim(),
|
|
29368
|
+
value: expression.split('>=')[1].trim()
|
|
29369
|
+
};
|
|
29370
|
+
if (expression.includes('<=')) return {
|
|
29371
|
+
operator: '<=',
|
|
29372
|
+
key: expression.split('<=')[0].trim(),
|
|
29373
|
+
value: expression.split('<=')[1].trim()
|
|
29374
|
+
};
|
|
29375
|
+
return {
|
|
29376
|
+
operator: undefined,
|
|
29377
|
+
key: expression.trim(),
|
|
29378
|
+
value: undefined
|
|
29379
|
+
};
|
|
29380
|
+
}
|
|
29316
29381
|
}, {
|
|
29317
29382
|
key: "cloneArticle",
|
|
29318
29383
|
value: function cloneArticle(set) {
|
|
@@ -31971,7 +32036,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
31971
32036
|
_defineProperty__default["default"](this, "favoritesChanged", false);
|
|
31972
32037
|
_defineProperty__default["default"](this, "setState", void 0);
|
|
31973
32038
|
_defineProperty__default["default"](this, "modifiedJ3D", []);
|
|
31974
|
-
_defineProperty__default["default"](this, "
|
|
32039
|
+
_defineProperty__default["default"](this, "aiImagesForBasket", []);
|
|
31975
32040
|
/**
|
|
31976
32041
|
* This function is called when the docking of two Elements is changed
|
|
31977
32042
|
*/
|
|
@@ -32244,22 +32309,45 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
32244
32309
|
};
|
|
32245
32310
|
}
|
|
32246
32311
|
return _createClass__default["default"](DivaSet, [{
|
|
32247
|
-
key: "
|
|
32248
|
-
value: function
|
|
32249
|
-
return this.
|
|
32312
|
+
key: "getAiImagesAsJpg",
|
|
32313
|
+
value: function getAiImagesAsJpg() {
|
|
32314
|
+
return this.aiImagesForBasket;
|
|
32250
32315
|
}
|
|
32251
32316
|
}, {
|
|
32252
32317
|
key: "setAiImageAsJpg",
|
|
32253
32318
|
value: function setAiImageAsJpg(promptId, aiImageAsJPGBase64) {
|
|
32254
|
-
this
|
|
32255
|
-
|
|
32256
|
-
promptId
|
|
32257
|
-
};
|
|
32319
|
+
// Check if this promptId already exists
|
|
32320
|
+
var existingIndex = this.aiImagesForBasket.findIndex(function (img) {
|
|
32321
|
+
return img.promptId === promptId;
|
|
32322
|
+
});
|
|
32323
|
+
if (existingIndex > -1) {
|
|
32324
|
+
// Update existing image
|
|
32325
|
+
this.aiImagesForBasket[existingIndex] = {
|
|
32326
|
+
base64: aiImageAsJPGBase64,
|
|
32327
|
+
promptId: promptId
|
|
32328
|
+
};
|
|
32329
|
+
} else {
|
|
32330
|
+
// Add new image
|
|
32331
|
+
this.aiImagesForBasket.push({
|
|
32332
|
+
base64: aiImageAsJPGBase64,
|
|
32333
|
+
promptId: promptId
|
|
32334
|
+
});
|
|
32335
|
+
}
|
|
32336
|
+
}
|
|
32337
|
+
}, {
|
|
32338
|
+
key: "removeAiImageAsJpg",
|
|
32339
|
+
value: function removeAiImageAsJpg(promptId) {
|
|
32340
|
+
var index = this.aiImagesForBasket.findIndex(function (img) {
|
|
32341
|
+
return img.promptId === promptId;
|
|
32342
|
+
});
|
|
32343
|
+
if (index > -1) {
|
|
32344
|
+
this.aiImagesForBasket.splice(index, 1);
|
|
32345
|
+
}
|
|
32258
32346
|
}
|
|
32259
32347
|
}, {
|
|
32260
|
-
key: "
|
|
32261
|
-
value: function
|
|
32262
|
-
this.
|
|
32348
|
+
key: "clearAllAiImagesAsJpg",
|
|
32349
|
+
value: function clearAllAiImagesAsJpg() {
|
|
32350
|
+
this.aiImagesForBasket = [];
|
|
32263
32351
|
}
|
|
32264
32352
|
}, {
|
|
32265
32353
|
key: "addRelationsToArticles",
|
|
@@ -33257,7 +33345,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
33257
33345
|
break;
|
|
33258
33346
|
}
|
|
33259
33347
|
_context5.next = 3;
|
|
33260
|
-
return Promise.resolve().then(function () { return require('./DoorPlanner-
|
|
33348
|
+
return Promise.resolve().then(function () { return require('./DoorPlanner-0e42d83b.js'); });
|
|
33261
33349
|
case 3:
|
|
33262
33350
|
_yield$import = _context5.sent;
|
|
33263
33351
|
DoorPlanner = _yield$import["default"];
|
|
@@ -38926,8 +39014,8 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38926
39014
|
key: "getOrderSet",
|
|
38927
39015
|
value: function () {
|
|
38928
39016
|
var _getOrderSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30(set, catalogData, divaNr, repairOnly, returnTo) {
|
|
38929
|
-
var _Object$values$, _set$getDivaArticles, _hqRenderScript, _alternateSetImages, _set$basketConfigVari2, _set$basketConfigVari3;
|
|
38930
|
-
var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D,
|
|
39017
|
+
var _Object$values$, _set$getDivaArticles, _hqRenderScript, _urlToAiImages, _alternateSetImages, _set$basketConfigVari2, _set$basketConfigVari3;
|
|
39018
|
+
var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, urlToAiImages, alternateSetImages, hqRenderScript, dimensions, promise3D, promise2D, promiseAiImages, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, plannerWarnings, bruttoPrice;
|
|
38931
39019
|
return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context32) {
|
|
38932
39020
|
while (1) switch (_context32.prev = _context32.next) {
|
|
38933
39021
|
case 0:
|
|
@@ -38937,7 +39025,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38937
39025
|
plannerData = set.plannerHandler.savePlanner(set.getSetId());
|
|
38938
39026
|
setImage = undefined;
|
|
38939
39027
|
urlToPlanning2D = undefined;
|
|
38940
|
-
|
|
39028
|
+
urlToAiImages = undefined;
|
|
38941
39029
|
alternateSetImages = undefined;
|
|
38942
39030
|
hqRenderScript = undefined;
|
|
38943
39031
|
dimensions = {};
|
|
@@ -38947,14 +39035,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38947
39035
|
}
|
|
38948
39036
|
promise3D = this.getSetImage(set, typeof window === 'undefined');
|
|
38949
39037
|
promise2D = this.get2DSetImage(set);
|
|
38950
|
-
if (set.
|
|
38951
|
-
|
|
39038
|
+
if (set.getAiImagesAsJpg().length > 0) {
|
|
39039
|
+
promiseAiImages = this.getAiImages(set);
|
|
38952
39040
|
}
|
|
38953
39041
|
if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
|
|
38954
39042
|
promise3DAlternate = this.getAlternateSetImages(set);
|
|
38955
39043
|
}
|
|
38956
39044
|
_context32.next = 17;
|
|
38957
|
-
return Promise.all([promise3D, promise2D,
|
|
39045
|
+
return Promise.all([promise3D, promise2D, promiseAiImages, promise3DAlternate, this.getHQRenderScript(set, divaNr)]);
|
|
38958
39046
|
case 17:
|
|
38959
39047
|
_yield$Promise$all = _context32.sent;
|
|
38960
39048
|
_yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 5);
|
|
@@ -38962,7 +39050,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
38962
39050
|
setImage = _yield$Promise$all2$.url;
|
|
38963
39051
|
dimensions = _yield$Promise$all2$.dimensions;
|
|
38964
39052
|
urlToPlanning2D = _yield$Promise$all2[1];
|
|
38965
|
-
|
|
39053
|
+
urlToAiImages = _yield$Promise$all2[2];
|
|
38966
39054
|
alternateSetImages = _yield$Promise$all2[3];
|
|
38967
39055
|
hqRenderScript = _yield$Promise$all2[4];
|
|
38968
39056
|
case 26:
|
|
@@ -39002,8 +39090,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
39002
39090
|
Set2DImage: urlToPlanning2D,
|
|
39003
39091
|
VariantDescription: DivaUtils__default["default"].stripTags(set.getVariantsDescription()),
|
|
39004
39092
|
VariantDescription_locales: DivaUtils__default["default"].stripTagsFromDict(set.getVariantsDescription_locales()),
|
|
39005
|
-
SetImages: [].concat(_toConsumableArray__default["default"](
|
|
39093
|
+
SetImages: [].concat(_toConsumableArray__default["default"]((_urlToAiImages = urlToAiImages) !== null && _urlToAiImages !== void 0 ? _urlToAiImages : []), _toConsumableArray__default["default"]((_alternateSetImages = alternateSetImages) !== null && _alternateSetImages !== void 0 ? _alternateSetImages : [])),
|
|
39006
39094
|
SetHash: set.setHash,
|
|
39095
|
+
FavoriteAiRoomKeys: set.getAiImagesAsJpg().map(function (img) {
|
|
39096
|
+
return img.promptId;
|
|
39097
|
+
}),
|
|
39007
39098
|
SetPlanData: plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData)) : '',
|
|
39008
39099
|
SetID: set.getSetId(),
|
|
39009
39100
|
SetName: set.setName,
|
|
@@ -39209,26 +39300,63 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
39209
39300
|
return get2DSetImage;
|
|
39210
39301
|
}()
|
|
39211
39302
|
}, {
|
|
39212
|
-
key: "
|
|
39303
|
+
key: "getAiImages",
|
|
39213
39304
|
value: function () {
|
|
39214
|
-
var
|
|
39215
|
-
var catalogData,
|
|
39305
|
+
var _getAiImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35(set) {
|
|
39306
|
+
var catalogData, aiImages, savedImages;
|
|
39216
39307
|
return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context37) {
|
|
39217
39308
|
while (1) switch (_context37.prev = _context37.next) {
|
|
39218
39309
|
case 0:
|
|
39219
39310
|
catalogData = set.CatalogData;
|
|
39220
|
-
|
|
39311
|
+
aiImages = set.getAiImagesAsJpg(); // Save all AI images in parallel
|
|
39221
39312
|
_context37.next = 4;
|
|
39222
|
-
return
|
|
39313
|
+
return Promise.all(aiImages.map(function (_ref3) {
|
|
39314
|
+
var promptId = _ref3.promptId,
|
|
39315
|
+
base64 = _ref3.base64;
|
|
39316
|
+
return set.plannerHandler.saveAiImage(promptId, catalogData.catalogCodex, catalogData.catalogGuid, base64);
|
|
39317
|
+
}));
|
|
39223
39318
|
case 4:
|
|
39224
|
-
|
|
39225
|
-
|
|
39319
|
+
savedImages = _context37.sent;
|
|
39320
|
+
return _context37.abrupt("return", savedImages);
|
|
39321
|
+
case 6:
|
|
39226
39322
|
case "end":
|
|
39227
39323
|
return _context37.stop();
|
|
39228
39324
|
}
|
|
39229
39325
|
}, _callee35);
|
|
39230
39326
|
}));
|
|
39231
|
-
function
|
|
39327
|
+
function getAiImages(_x128) {
|
|
39328
|
+
return _getAiImages.apply(this, arguments);
|
|
39329
|
+
}
|
|
39330
|
+
return getAiImages;
|
|
39331
|
+
}() // Deprecated - kept for backward compatibility
|
|
39332
|
+
}, {
|
|
39333
|
+
key: "getAiImage",
|
|
39334
|
+
value: function () {
|
|
39335
|
+
var _getAiImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee36(set) {
|
|
39336
|
+
var aiImages, catalogData, _aiImages$, promptId, base64;
|
|
39337
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee36$(_context38) {
|
|
39338
|
+
while (1) switch (_context38.prev = _context38.next) {
|
|
39339
|
+
case 0:
|
|
39340
|
+
aiImages = set.getAiImagesAsJpg();
|
|
39341
|
+
if (!(aiImages.length === 0)) {
|
|
39342
|
+
_context38.next = 3;
|
|
39343
|
+
break;
|
|
39344
|
+
}
|
|
39345
|
+
return _context38.abrupt("return", undefined);
|
|
39346
|
+
case 3:
|
|
39347
|
+
catalogData = set.CatalogData;
|
|
39348
|
+
_aiImages$ = aiImages[0], promptId = _aiImages$.promptId, base64 = _aiImages$.base64;
|
|
39349
|
+
_context38.next = 7;
|
|
39350
|
+
return set.plannerHandler.saveAiImage(promptId, catalogData.catalogCodex, catalogData.catalogGuid, base64);
|
|
39351
|
+
case 7:
|
|
39352
|
+
return _context38.abrupt("return", _context38.sent);
|
|
39353
|
+
case 8:
|
|
39354
|
+
case "end":
|
|
39355
|
+
return _context38.stop();
|
|
39356
|
+
}
|
|
39357
|
+
}, _callee36);
|
|
39358
|
+
}));
|
|
39359
|
+
function getAiImage(_x129) {
|
|
39232
39360
|
return _getAiImage.apply(this, arguments);
|
|
39233
39361
|
}
|
|
39234
39362
|
return getAiImage;
|
|
@@ -39268,25 +39396,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
39268
39396
|
}, {
|
|
39269
39397
|
key: "addOrderSetArticlesToExistingSet",
|
|
39270
39398
|
value: function () {
|
|
39271
|
-
var _addOrderSetArticlesToExistingSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
39272
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
39273
|
-
while (1) switch (
|
|
39399
|
+
var _addOrderSetArticlesToExistingSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee37(set, orderSet, lastSetToInitialize) {
|
|
39400
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee37$(_context39) {
|
|
39401
|
+
while (1) switch (_context39.prev = _context39.next) {
|
|
39274
39402
|
case 0:
|
|
39275
39403
|
//TODO: GLOBAL STUFF
|
|
39276
39404
|
//this.updateActSet(set);
|
|
39277
39405
|
orderSet.changeBasketIds();
|
|
39278
|
-
|
|
39406
|
+
_context39.next = 3;
|
|
39279
39407
|
return this.initOrderLineArticles(set, orderSet);
|
|
39280
39408
|
case 3:
|
|
39281
|
-
|
|
39409
|
+
_context39.next = 5;
|
|
39282
39410
|
return set.plannerHandler.extendSet(set, orderSet.SetPlanData, lastSetToInitialize);
|
|
39283
39411
|
case 5:
|
|
39284
39412
|
case "end":
|
|
39285
|
-
return
|
|
39413
|
+
return _context39.stop();
|
|
39286
39414
|
}
|
|
39287
|
-
},
|
|
39415
|
+
}, _callee37, this);
|
|
39288
39416
|
}));
|
|
39289
|
-
function addOrderSetArticlesToExistingSet(
|
|
39417
|
+
function addOrderSetArticlesToExistingSet(_x130, _x131, _x132) {
|
|
39290
39418
|
return _addOrderSetArticlesToExistingSet.apply(this, arguments);
|
|
39291
39419
|
}
|
|
39292
39420
|
return addOrderSetArticlesToExistingSet;
|
|
@@ -40358,7 +40486,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
40358
40486
|
break;
|
|
40359
40487
|
case 3:
|
|
40360
40488
|
_context12.next = 5;
|
|
40361
|
-
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-
|
|
40489
|
+
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-14805264.js'); });
|
|
40362
40490
|
case 5:
|
|
40363
40491
|
_yield$import = _context12.sent;
|
|
40364
40492
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -40366,7 +40494,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
40366
40494
|
return _context12.abrupt("break", 27);
|
|
40367
40495
|
case 9:
|
|
40368
40496
|
_context12.next = 11;
|
|
40369
|
-
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-
|
|
40497
|
+
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-47cc5540.js'); });
|
|
40370
40498
|
case 11:
|
|
40371
40499
|
_yield$import2 = _context12.sent;
|
|
40372
40500
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -40374,7 +40502,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
40374
40502
|
return _context12.abrupt("break", 27);
|
|
40375
40503
|
case 15:
|
|
40376
40504
|
_context12.next = 17;
|
|
40377
|
-
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-
|
|
40505
|
+
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-0ac13ae5.js'); });
|
|
40378
40506
|
case 17:
|
|
40379
40507
|
_yield$import3 = _context12.sent;
|
|
40380
40508
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -40382,7 +40510,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
40382
40510
|
return _context12.abrupt("break", 27);
|
|
40383
40511
|
case 21:
|
|
40384
40512
|
_context12.next = 23;
|
|
40385
|
-
return Promise.resolve().then(function () { return require('./StandardWWSHandler-
|
|
40513
|
+
return Promise.resolve().then(function () { return require('./StandardWWSHandler-e24d8597.js'); });
|
|
40386
40514
|
case 23:
|
|
40387
40515
|
_yield$import4 = _context12.sent;
|
|
40388
40516
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -41806,7 +41934,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
41806
41934
|
while (1) switch (_context3.prev = _context3.next) {
|
|
41807
41935
|
case 0:
|
|
41808
41936
|
_context3.next = 2;
|
|
41809
|
-
return Promise.resolve().then(function () { return require('./Host3DSignalR-
|
|
41937
|
+
return Promise.resolve().then(function () { return require('./Host3DSignalR-4141d491.js'); });
|
|
41810
41938
|
case 2:
|
|
41811
41939
|
_yield$import = _context3.sent;
|
|
41812
41940
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -43464,7 +43592,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
43464
43592
|
break;
|
|
43465
43593
|
case 8:
|
|
43466
43594
|
_context4.next = 10;
|
|
43467
|
-
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-
|
|
43595
|
+
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-5f5991fc.js'); });
|
|
43468
43596
|
case 10:
|
|
43469
43597
|
_yield$import = _context4.sent;
|
|
43470
43598
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -43475,7 +43603,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
43475
43603
|
return _context4.abrupt("break", 21);
|
|
43476
43604
|
case 15:
|
|
43477
43605
|
_context4.next = 17;
|
|
43478
|
-
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-
|
|
43606
|
+
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-e7ab785a.js'); });
|
|
43479
43607
|
case 17:
|
|
43480
43608
|
_yield$import2 = _context4.sent;
|
|
43481
43609
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -45942,7 +46070,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45942
46070
|
value: function forceUpdatePlannerView(renderSavingMode, doLoadAllAlternateRenderings) {
|
|
45943
46071
|
var set = this.actSet();
|
|
45944
46072
|
this.update2DGrid(set);
|
|
45945
|
-
if (['3DImage', '3DCOMB', 'BoxPlanner'].includes(this.getInitPlannerViewMode())) {
|
|
46073
|
+
if (['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(this.getInitPlannerViewMode())) {
|
|
45946
46074
|
var _this$getDoShow3DDime7;
|
|
45947
46075
|
if (doLoadAllAlternateRenderings) {
|
|
45948
46076
|
var alternateRenderings = set.CatalogData.alternateRenderingsForSummary;
|
|
@@ -46591,17 +46719,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46591
46719
|
key: "generateAiImageWithReferenceImages",
|
|
46592
46720
|
value: function () {
|
|
46593
46721
|
var _generateAiImageWithReferenceImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee28(data, leadKey) {
|
|
46594
|
-
var _this$state6;
|
|
46722
|
+
var _this$actSet11, _this$state6, _this$actSet12;
|
|
46595
46723
|
return _regeneratorRuntime__default["default"].wrap(function _callee28$(_context28) {
|
|
46596
46724
|
while (1) switch (_context28.prev = _context28.next) {
|
|
46597
46725
|
case 0:
|
|
46598
|
-
|
|
46726
|
+
(_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 || _this$actSet11.CatalogData.catalogCodex;
|
|
46727
|
+
_context28.next = 3;
|
|
46599
46728
|
return this.api.generateAiImageWithReferenceImages(_objectSpread$6(_objectSpread$6({}, data), {}, {
|
|
46600
|
-
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
|
|
46729
|
+
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,
|
|
46730
|
+
catalogCodex: (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.CatalogData.catalogCodex
|
|
46601
46731
|
}), leadKey);
|
|
46602
|
-
case 2:
|
|
46603
|
-
return _context28.abrupt("return", _context28.sent);
|
|
46604
46732
|
case 3:
|
|
46733
|
+
return _context28.abrupt("return", _context28.sent);
|
|
46734
|
+
case 4:
|
|
46605
46735
|
case "end":
|
|
46606
46736
|
return _context28.stop();
|
|
46607
46737
|
}
|
|
@@ -46616,27 +46746,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46616
46746
|
key: "getUsageLimits",
|
|
46617
46747
|
value: function () {
|
|
46618
46748
|
var _getUsageLimits = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29() {
|
|
46619
|
-
var
|
|
46620
|
-
var
|
|
46749
|
+
var _localStorage$getItem, _localStorage;
|
|
46750
|
+
var leadKey;
|
|
46621
46751
|
return _regeneratorRuntime__default["default"].wrap(function _callee29$(_context29) {
|
|
46622
46752
|
while (1) switch (_context29.prev = _context29.next) {
|
|
46623
46753
|
case 0:
|
|
46624
|
-
|
|
46625
|
-
|
|
46626
|
-
|
|
46627
|
-
|
|
46628
|
-
|
|
46629
|
-
}
|
|
46630
|
-
|
|
46631
|
-
case 4:
|
|
46632
|
-
_context29.next = 6;
|
|
46633
|
-
return this.api.getUsageLimits({
|
|
46634
|
-
organizationId: organizationId,
|
|
46635
|
-
userId: userId
|
|
46636
|
-
});
|
|
46637
|
-
case 6:
|
|
46754
|
+
// Get lead key from localStorage if it exists (for anonymous users)
|
|
46755
|
+
leadKey = (_localStorage$getItem = (_localStorage = localStorage) === null || _localStorage === void 0 ? void 0 : _localStorage.getItem('diva_lead_key')) !== null && _localStorage$getItem !== void 0 ? _localStorage$getItem : undefined;
|
|
46756
|
+
_context29.next = 3;
|
|
46757
|
+
return this.api.getUsageLimits(leadKey ? {
|
|
46758
|
+
leadKey: leadKey
|
|
46759
|
+
} : undefined);
|
|
46760
|
+
case 3:
|
|
46638
46761
|
return _context29.abrupt("return", _context29.sent);
|
|
46639
|
-
case
|
|
46762
|
+
case 4:
|
|
46640
46763
|
case "end":
|
|
46641
46764
|
return _context29.stop();
|
|
46642
46765
|
}
|
|
@@ -46651,12 +46774,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46651
46774
|
key: "getAiRoomRenderings",
|
|
46652
46775
|
value: function () {
|
|
46653
46776
|
var _getAiRoomRenderings = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30() {
|
|
46654
|
-
var _this$
|
|
46777
|
+
var _this$state7;
|
|
46655
46778
|
var organizationId;
|
|
46656
46779
|
return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context30) {
|
|
46657
46780
|
while (1) switch (_context30.prev = _context30.next) {
|
|
46658
46781
|
case 0:
|
|
46659
|
-
organizationId = (_this$
|
|
46782
|
+
organizationId = (_this$state7 = this.state) === null || _this$state7 === void 0 ? void 0 : _this$state7.organization._id;
|
|
46660
46783
|
_context30.next = 3;
|
|
46661
46784
|
return this.api.getAiRoomRenderings(organizationId);
|
|
46662
46785
|
case 3:
|
|
@@ -46695,11 +46818,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46695
46818
|
return createLeadKey;
|
|
46696
46819
|
}()
|
|
46697
46820
|
}, {
|
|
46698
|
-
key: "
|
|
46699
|
-
value: function
|
|
46821
|
+
key: "showAiRoomRenderingInSummary",
|
|
46822
|
+
value: function showAiRoomRenderingInSummary() {
|
|
46823
|
+
var _this$actSet13;
|
|
46824
|
+
var viewConfig = this.api.getViewConfig();
|
|
46825
|
+
return (viewConfig === null || viewConfig === void 0 ? void 0 : viewConfig.showAiRoomRenderingInSummary) || (viewConfig === null || viewConfig === void 0 ? void 0 : viewConfig.showAiRoomRenderingInSummaryOnlyForCatalogsWithProperty) && ((_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.CatalogData.showAiRoomRenderingInSummary);
|
|
46826
|
+
}
|
|
46827
|
+
}, {
|
|
46828
|
+
key: "clearAllAiImagesAsJpg",
|
|
46829
|
+
value: function clearAllAiImagesAsJpg() {
|
|
46700
46830
|
var set = this.actSet();
|
|
46701
46831
|
if (!set) return;
|
|
46702
|
-
set.
|
|
46832
|
+
set.clearAllAiImagesAsJpg();
|
|
46703
46833
|
}
|
|
46704
46834
|
}, {
|
|
46705
46835
|
key: "setAiImageAsJpg",
|
|
@@ -46708,6 +46838,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46708
46838
|
if (!set) return;
|
|
46709
46839
|
set.setAiImageAsJpg(promptId, base64);
|
|
46710
46840
|
}
|
|
46841
|
+
}, {
|
|
46842
|
+
key: "removeAiImageAsJpg",
|
|
46843
|
+
value: function removeAiImageAsJpg(promptId) {
|
|
46844
|
+
var set = this.actSet();
|
|
46845
|
+
if (!set) return;
|
|
46846
|
+
set.removeAiImageAsJpg(promptId);
|
|
46847
|
+
}
|
|
46711
46848
|
}, {
|
|
46712
46849
|
key: "checkBannerRules",
|
|
46713
46850
|
value: function checkBannerRules(visitedOptions, event) {
|
|
@@ -46739,14 +46876,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46739
46876
|
var doTryOptimize = plannerType == 'CUSTOMER_OPTIMIZED_PLANNER' || plannerType == 'JUMP_OVER_PLANNER_ONLY_MOBILE' || plannerType == 'JUMP_OVER_PLANNER';
|
|
46740
46877
|
//if planner is hidden by config but nothing is planned initially
|
|
46741
46878
|
if (plannerType === 'NONE') {
|
|
46742
|
-
var _this$plannerConfig$a8, _this$
|
|
46743
|
-
if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex !== undefined && !((_this$plannerConfig$a8 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a8 !== void 0 && _this$plannerConfig$a8.length) && !this.plannerConfig.productId && !this.plannerConfig.customProductId && !this.plannerConfig.basketData && !((_this$
|
|
46879
|
+
var _this$plannerConfig$a8, _this$actSet14;
|
|
46880
|
+
if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex !== undefined && !((_this$plannerConfig$a8 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a8 !== void 0 && _this$plannerConfig$a8.length) && !this.plannerConfig.productId && !this.plannerConfig.customProductId && !this.plannerConfig.basketData && !((_this$actSet14 = this.actSet()) !== null && _this$actSet14 !== void 0 && (_this$actSet14 = _this$actSet14.CatalogData.startPlannerArticle) !== null && _this$actSet14 !== void 0 && _this$actSet14.length)) {
|
|
46744
46881
|
plannerType = 'PLANNER';
|
|
46745
46882
|
}
|
|
46746
46883
|
}
|
|
46747
46884
|
if (plannerType == 'JUMP_OVER_PLANNER_ONLY_MOBILE') {
|
|
46748
|
-
var _this$
|
|
46749
|
-
if ((_this$
|
|
46885
|
+
var _this$state8;
|
|
46886
|
+
if ((_this$state8 = this.state) !== null && _this$state8 !== void 0 && _this$state8.dimensions.isMobile) {
|
|
46750
46887
|
plannerType = 'JUMP_OVER_PLANNER';
|
|
46751
46888
|
} else {
|
|
46752
46889
|
plannerType = 'PLANNER';
|
|
@@ -46784,38 +46921,38 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46784
46921
|
}, {
|
|
46785
46922
|
key: "getCurCatalogCodex",
|
|
46786
46923
|
value: function getCurCatalogCodex() {
|
|
46787
|
-
var _this$
|
|
46788
|
-
return (_this$
|
|
46924
|
+
var _this$actSet15;
|
|
46925
|
+
return (_this$actSet15 = this.actSet()) === null || _this$actSet15 === void 0 ? void 0 : _this$actSet15.getCatalogCodex();
|
|
46789
46926
|
}
|
|
46790
46927
|
}, {
|
|
46791
46928
|
key: "getCurCatalogName",
|
|
46792
46929
|
value: function getCurCatalogName() {
|
|
46793
|
-
var _this$
|
|
46794
|
-
return (_this$
|
|
46930
|
+
var _this$actSet16;
|
|
46931
|
+
return (_this$actSet16 = this.actSet()) === null || _this$actSet16 === void 0 ? void 0 : _this$actSet16.getCatalogName();
|
|
46795
46932
|
}
|
|
46796
46933
|
}, {
|
|
46797
46934
|
key: "getCurAccountName",
|
|
46798
46935
|
value: function getCurAccountName() {
|
|
46799
|
-
var _this$
|
|
46800
|
-
return (_this$
|
|
46936
|
+
var _this$actSet17;
|
|
46937
|
+
return (_this$actSet17 = this.actSet()) === null || _this$actSet17 === void 0 ? void 0 : _this$actSet17.getAccountName();
|
|
46801
46938
|
}
|
|
46802
46939
|
}, {
|
|
46803
46940
|
key: "getCurSupplierGuid",
|
|
46804
46941
|
value: function getCurSupplierGuid() {
|
|
46805
|
-
var _this$
|
|
46806
|
-
return (_this$
|
|
46942
|
+
var _this$actSet18;
|
|
46943
|
+
return (_this$actSet18 = this.actSet()) === null || _this$actSet18 === void 0 ? void 0 : _this$actSet18.getSupplierGuid();
|
|
46807
46944
|
}
|
|
46808
46945
|
}, {
|
|
46809
46946
|
key: "getCurSetPrice",
|
|
46810
46947
|
value: function getCurSetPrice() {
|
|
46811
|
-
var _this$actSet$getSetPr, _this$
|
|
46812
|
-
return (_this$actSet$getSetPr = (_this$
|
|
46948
|
+
var _this$actSet$getSetPr, _this$actSet19;
|
|
46949
|
+
return (_this$actSet$getSetPr = (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.getSetPrice()) !== null && _this$actSet$getSetPr !== void 0 ? _this$actSet$getSetPr : 0;
|
|
46813
46950
|
}
|
|
46814
46951
|
}, {
|
|
46815
46952
|
key: "getCurImageMode",
|
|
46816
46953
|
value: function getCurImageMode() {
|
|
46817
|
-
var _this$
|
|
46818
|
-
return (_this$
|
|
46954
|
+
var _this$actSet20;
|
|
46955
|
+
return (_this$actSet20 = this.actSet()) !== null && _this$actSet20 !== void 0 && (_this$actSet20 = _this$actSet20.CatalogData) !== null && _this$actSet20 !== void 0 && _this$actSet20.has3dModels ? '3D' : '2D';
|
|
46819
46956
|
}
|
|
46820
46957
|
}, {
|
|
46821
46958
|
key: "getViewConfig",
|
|
@@ -46851,68 +46988,68 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46851
46988
|
}, {
|
|
46852
46989
|
key: "doShow3DDimensionLines",
|
|
46853
46990
|
value: function doShow3DDimensionLines() {
|
|
46854
|
-
var _this$
|
|
46855
|
-
return (_this$
|
|
46991
|
+
var _this$actSet21;
|
|
46992
|
+
return (_this$actSet21 = this.actSet()) === null || _this$actSet21 === void 0 || (_this$actSet21 = _this$actSet21.CatalogData) === null || _this$actSet21 === void 0 ? void 0 : _this$actSet21.doShow3DDimensionLines;
|
|
46856
46993
|
}
|
|
46857
46994
|
}, {
|
|
46858
46995
|
key: "defaultDimensionsActive",
|
|
46859
46996
|
value: function defaultDimensionsActive() {
|
|
46860
|
-
var _this$
|
|
46861
|
-
return (_this$
|
|
46997
|
+
var _this$actSet22;
|
|
46998
|
+
return (_this$actSet22 = this.actSet()) === null || _this$actSet22 === void 0 || (_this$actSet22 = _this$actSet22.CatalogData) === null || _this$actSet22 === void 0 ? void 0 : _this$actSet22.defaultDimensionsActive;
|
|
46862
46999
|
}
|
|
46863
47000
|
}, {
|
|
46864
47001
|
key: "autoOpenContentItem",
|
|
46865
47002
|
value: function autoOpenContentItem() {
|
|
46866
|
-
var _this$
|
|
46867
|
-
return (_this$
|
|
47003
|
+
var _this$actSet23;
|
|
47004
|
+
return (_this$actSet23 = this.actSet()) === null || _this$actSet23 === void 0 || (_this$actSet23 = _this$actSet23.CatalogData) === null || _this$actSet23 === void 0 ? void 0 : _this$actSet23.autoOpenContentItem;
|
|
46868
47005
|
}
|
|
46869
47006
|
}, {
|
|
46870
47007
|
key: "hidePlannerUiIcons",
|
|
46871
47008
|
value: function hidePlannerUiIcons() {
|
|
46872
|
-
var _this$
|
|
46873
|
-
return (_this$
|
|
47009
|
+
var _this$actSet24;
|
|
47010
|
+
return (_this$actSet24 = this.actSet()) === null || _this$actSet24 === void 0 || (_this$actSet24 = _this$actSet24.CatalogData) === null || _this$actSet24 === void 0 ? void 0 : _this$actSet24.hidePlannerUiIcons;
|
|
46874
47011
|
}
|
|
46875
47012
|
}, {
|
|
46876
47013
|
key: "getPlanner2Dot0Active",
|
|
46877
47014
|
value: function getPlanner2Dot0Active() {
|
|
46878
|
-
var _this$
|
|
46879
|
-
return (_this$
|
|
47015
|
+
var _this$actSet25;
|
|
47016
|
+
return (_this$actSet25 = this.actSet()) === null || _this$actSet25 === void 0 || (_this$actSet25 = _this$actSet25.CatalogData) === null || _this$actSet25 === void 0 ? void 0 : _this$actSet25.planner2Dot0;
|
|
46880
47017
|
}
|
|
46881
47018
|
}, {
|
|
46882
47019
|
key: "doShowPlannerReplaceMode",
|
|
46883
47020
|
value: function doShowPlannerReplaceMode() {
|
|
46884
|
-
var _this$
|
|
46885
|
-
var catalogData = (_this$
|
|
47021
|
+
var _this$actSet26, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
|
|
47022
|
+
var catalogData = (_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.CatalogData;
|
|
46886
47023
|
return (catalogData === null || catalogData === void 0 ? void 0 : catalogData.replaceModeActive) && ((_this$api$getViewConf2 = this.api.getViewConfig()) === null || _this$api$getViewConf2 === void 0 ? void 0 : _this$api$getViewConf2.showReplaceFunctionInPlanner) && Object.entries(catalogData.allCatalogPlannerArticles).length > 1 && Object.entries((_catalogData$PlannerP = (_catalogData$PlannerP2 = catalogData.PlannerPaletteViewInfo) === null || _catalogData$PlannerP2 === void 0 ? void 0 : _catalogData$PlannerP2.catalogPlannerArticles) !== null && _catalogData$PlannerP !== void 0 ? _catalogData$PlannerP : {}).length > 1;
|
|
46887
47024
|
}
|
|
46888
47025
|
}, {
|
|
46889
47026
|
key: "doPlannerReplaceAutoSwitch",
|
|
46890
47027
|
value: function doPlannerReplaceAutoSwitch() {
|
|
46891
|
-
var _this$
|
|
46892
|
-
var catalogData = (_this$
|
|
47028
|
+
var _this$actSet27, _this$api$getViewConf3;
|
|
47029
|
+
var catalogData = (_this$actSet27 = this.actSet()) === null || _this$actSet27 === void 0 ? void 0 : _this$actSet27.CatalogData;
|
|
46893
47030
|
return (catalogData === null || catalogData === void 0 ? void 0 : catalogData.catalogPlannsCompletely) && this.doShowPlannerReplaceMode() && ((_this$api$getViewConf3 = this.api.getViewConfig()) === null || _this$api$getViewConf3 === void 0 ? void 0 : _this$api$getViewConf3.allowAutoSwitchInReplaceFunctionInPlanner);
|
|
46894
47031
|
}
|
|
46895
47032
|
}, {
|
|
46896
47033
|
key: "getHidePlanner",
|
|
46897
47034
|
value: function getHidePlanner() {
|
|
46898
|
-
var _this$
|
|
46899
|
-
return this.api.getHidePlanner() || !!((_this$
|
|
47035
|
+
var _this$actSet28;
|
|
47036
|
+
return this.api.getHidePlanner() || !!((_this$actSet28 = this.actSet()) !== null && _this$actSet28 !== void 0 && _this$actSet28.CatalogData.useBoxPlanner);
|
|
46900
47037
|
}
|
|
46901
47038
|
}, {
|
|
46902
47039
|
key: "getAllowRTV",
|
|
46903
47040
|
value: function getAllowRTV() {
|
|
46904
|
-
var _this$
|
|
47041
|
+
var _this$state9, _this$actSet29, _this$state10, _this$actSet30;
|
|
46905
47042
|
if (this.getEnableUnityRtvKombi()) return false;
|
|
46906
|
-
if ((_this$
|
|
46907
|
-
if ((_this$
|
|
46908
|
-
if ((_this$
|
|
47043
|
+
if ((_this$state9 = this.state) !== null && _this$state9 !== void 0 && _this$state9.organization.settings.forceRTV) return true;
|
|
47044
|
+
if ((_this$actSet29 = this.actSet()) !== null && _this$actSet29 !== void 0 && _this$actSet29.CatalogData.divaForceRTV) return true;
|
|
47045
|
+
if ((_this$state10 = this.state) !== null && _this$state10 !== void 0 && _this$state10.organization.settings.enableRTV && (_this$actSet30 = this.actSet()) !== null && _this$actSet30 !== void 0 && _this$actSet30.CatalogData.divaArReady) return true;
|
|
46909
47046
|
return false;
|
|
46910
47047
|
}
|
|
46911
47048
|
}, {
|
|
46912
47049
|
key: "getForceRTV",
|
|
46913
47050
|
value: function getForceRTV() {
|
|
46914
|
-
var _this$
|
|
46915
|
-
return !!((_this$
|
|
47051
|
+
var _this$actSet31;
|
|
47052
|
+
return !!((_this$actSet31 = this.actSet()) !== null && _this$actSet31 !== void 0 && _this$actSet31.CatalogData.divaForceRTV);
|
|
46916
47053
|
}
|
|
46917
47054
|
}, {
|
|
46918
47055
|
key: "getPricePreview",
|
|
@@ -46922,29 +47059,29 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46922
47059
|
}, {
|
|
46923
47060
|
key: "hide2DPlanner",
|
|
46924
47061
|
value: function hide2DPlanner() {
|
|
46925
|
-
var _this$
|
|
46926
|
-
return (_this$
|
|
47062
|
+
var _this$actSet32;
|
|
47063
|
+
return (_this$actSet32 = this.actSet()) === null || _this$actSet32 === void 0 ? void 0 : _this$actSet32.CatalogData.hide2DPlanner;
|
|
46927
47064
|
}
|
|
46928
47065
|
}, {
|
|
46929
47066
|
key: "getAllowQRCodeAR",
|
|
46930
47067
|
value: function getAllowQRCodeAR() {
|
|
46931
|
-
var _this$
|
|
46932
|
-
if (this.api.enableAR && (_this$
|
|
47068
|
+
var _this$actSet33;
|
|
47069
|
+
if (this.api.enableAR && (_this$actSet33 = this.actSet()) !== null && _this$actSet33 !== void 0 && _this$actSet33.CatalogData.divaArReady) return true;
|
|
46933
47070
|
return false;
|
|
46934
47071
|
}
|
|
46935
47072
|
}, {
|
|
46936
47073
|
key: "getEnableUnityRtvKombi",
|
|
46937
47074
|
value: function getEnableUnityRtvKombi() {
|
|
46938
|
-
var _this$
|
|
47075
|
+
var _this$actSet34, _this$actSet35;
|
|
46939
47076
|
// if force rtv disable unity kombi - biohort
|
|
46940
|
-
if ((_this$
|
|
46941
|
-
return ((_this$
|
|
47077
|
+
if ((_this$actSet34 = this.actSet()) !== null && _this$actSet34 !== void 0 && _this$actSet34.CatalogData.divaForceRTV) return false;
|
|
47078
|
+
return ((_this$actSet35 = this.actSet()) === null || _this$actSet35 === void 0 ? void 0 : _this$actSet35.CatalogData.divaArReady) == true && this.api.getEnableRTVUnityKombi();
|
|
46942
47079
|
}
|
|
46943
47080
|
}, {
|
|
46944
47081
|
key: "getShelfPlannerRTV",
|
|
46945
47082
|
value: function getShelfPlannerRTV() {
|
|
46946
|
-
var _this$
|
|
46947
|
-
return (_this$
|
|
47083
|
+
var _this$actSet36;
|
|
47084
|
+
return (_this$actSet36 = this.actSet()) === null || _this$actSet36 === void 0 ? void 0 : _this$actSet36.CatalogData.useShelfPlannerRTV;
|
|
46948
47085
|
}
|
|
46949
47086
|
}, {
|
|
46950
47087
|
key: "getBasketData",
|
|
@@ -46985,8 +47122,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
46985
47122
|
}, {
|
|
46986
47123
|
key: "getCatalogData",
|
|
46987
47124
|
value: function getCatalogData() {
|
|
46988
|
-
var _this$
|
|
46989
|
-
return (_this$
|
|
47125
|
+
var _this$actSet37;
|
|
47126
|
+
return (_this$actSet37 = this.actSet()) === null || _this$actSet37 === void 0 ? void 0 : _this$actSet37.CatalogData;
|
|
46990
47127
|
}
|
|
46991
47128
|
}, {
|
|
46992
47129
|
key: "ReturnTo",
|
|
@@ -47184,11 +47321,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47184
47321
|
key: "getCurrentBasket",
|
|
47185
47322
|
value: function () {
|
|
47186
47323
|
var _getCurrentBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34(event, force, returnTo, dontGoToSummary, hideLoading) {
|
|
47187
|
-
var _this$
|
|
47324
|
+
var _this$actSet38, _this$divaBasketHandl5, _this$onClickAddToBas3;
|
|
47188
47325
|
return _regeneratorRuntime__default["default"].wrap(function _callee34$(_context34) {
|
|
47189
47326
|
while (1) switch (_context34.prev = _context34.next) {
|
|
47190
47327
|
case 0:
|
|
47191
|
-
if (!(this.divaBasketHandler.basketWasSavedWithCurrentDocVersion && ((_this$
|
|
47328
|
+
if (!(this.divaBasketHandler.basketWasSavedWithCurrentDocVersion && ((_this$actSet38 = this.actSet()) === null || _this$actSet38 === void 0 ? void 0 : _this$actSet38.setHash) === ((_this$divaBasketHandl5 = this.divaBasketHandler.actBasket) === null || _this$divaBasketHandl5 === void 0 || (_this$divaBasketHandl5 = _this$divaBasketHandl5.OrderSets) === null || _this$divaBasketHandl5 === void 0 ? void 0 : _this$divaBasketHandl5[0].SetHash) && !(returnTo !== null && returnTo !== void 0 && returnTo.includes('OPEN')))) {
|
|
47192
47329
|
_context34.next = 2;
|
|
47193
47330
|
break;
|
|
47194
47331
|
}
|
|
@@ -47525,6 +47662,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47525
47662
|
}
|
|
47526
47663
|
return initBasket;
|
|
47527
47664
|
}()
|
|
47665
|
+
}, {
|
|
47666
|
+
key: "getFavoriteAiRoomKeysFromSet",
|
|
47667
|
+
value: function getFavoriteAiRoomKeysFromSet() {
|
|
47668
|
+
var _this$actSet39;
|
|
47669
|
+
var orderSets = this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr);
|
|
47670
|
+
var actSetId = (_this$actSet39 = this.actSet()) === null || _this$actSet39 === void 0 ? void 0 : _this$actSet39.getSetId();
|
|
47671
|
+
var orderSet = orderSets.find(function (os) {
|
|
47672
|
+
return os.SetID === actSetId;
|
|
47673
|
+
});
|
|
47674
|
+
if (orderSet !== null && orderSet !== void 0 && orderSet.FavoriteAiRoomKeys && orderSet.FavoriteAiRoomKeys.length > 0) {
|
|
47675
|
+
return {
|
|
47676
|
+
favoriteAiRoomKeys: orderSet.FavoriteAiRoomKeys,
|
|
47677
|
+
setImages: orderSet.SetImages || []
|
|
47678
|
+
};
|
|
47679
|
+
}
|
|
47680
|
+
return undefined;
|
|
47681
|
+
}
|
|
47528
47682
|
}, {
|
|
47529
47683
|
key: "favoritesDefined",
|
|
47530
47684
|
value: function favoritesDefined() {
|
|
@@ -67294,6 +67448,22 @@ var getOrigProductId = /*#__PURE__*/function () {
|
|
|
67294
67448
|
};
|
|
67295
67449
|
}();
|
|
67296
67450
|
|
|
67451
|
+
// Full usage limits (for authenticated users)
|
|
67452
|
+
|
|
67453
|
+
// Simplified usage limits (for anonymous users)
|
|
67454
|
+
|
|
67455
|
+
// Union type to support both formats
|
|
67456
|
+
|
|
67457
|
+
// Type guard to check if usage limits are simplified (anonymous user format)
|
|
67458
|
+
function isSimplifiedUsageLimits(limits) {
|
|
67459
|
+
return 'budget' in limits;
|
|
67460
|
+
}
|
|
67461
|
+
|
|
67462
|
+
// Type guard to check if usage limits are full (authenticated user format)
|
|
67463
|
+
function isFullUsageLimits(limits) {
|
|
67464
|
+
return 'daily' in limits;
|
|
67465
|
+
}
|
|
67466
|
+
|
|
67297
67467
|
exports.BoundingBox = BoundingBox;
|
|
67298
67468
|
exports.CatalogPlannerArticleData = CatalogPlannerArticleData;
|
|
67299
67469
|
exports.Cell = Cell;
|
|
@@ -67313,6 +67483,8 @@ exports.Vector4 = Vector4;
|
|
|
67313
67483
|
exports.articleHandlerInstance = articleHandlerInstance;
|
|
67314
67484
|
exports.creatRenderOrders = creatRenderOrders;
|
|
67315
67485
|
exports.getOrigProductId = getOrigProductId;
|
|
67486
|
+
exports.isFullUsageLimits = isFullUsageLimits;
|
|
67487
|
+
exports.isSimplifiedUsageLimits = isSimplifiedUsageLimits;
|
|
67316
67488
|
exports.loadAndRepairBasket = loadAndRepairBasket;
|
|
67317
67489
|
exports.setHandlerInstance = setHandlerInstance;
|
|
67318
67490
|
exports.summaryHandlerInstance = summaryHandlerInstance;
|