@crystaldesign/web-planner-logic 26.8.0-beta.8 → 26.9.0-beta.1
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-2e2137f1.js → DivaBoxPlanner-c8851567.js} +29 -31
- package/build/cjs/{DivaStandardPlanner-f389ef1a.js → DivaStandardPlanner-7bc436a9.js} +3 -3
- package/build/cjs/{DoorPlanner-fa73b631.js → DoorPlanner-66d87428.js} +1 -1
- package/build/cjs/{Host3DSignalR-b0567441.js → Host3DSignalR-86c47fd9.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-7d16f2f9.js → LiviqueWWSHandler-e0237503.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-5ebc0e14.js → PfisterWWSHandler-91a53f99.js} +10 -1
- package/build/cjs/{PlannerHandler2D-cab186f5.js → PlannerHandler2D-21891681.js} +24 -9
- package/build/cjs/{SeriousBasketHandler-7563aaa9.js → SeriousBasketHandler-39f6c012.js} +1 -1
- package/build/cjs/{ShelfPlanner-acc07376.js → ShelfPlanner-9323783f.js} +1 -1
- package/build/cjs/{StandardWWSHandler-abd363ef.js → StandardWWSHandler-87d4c9ca.js} +1 -1
- package/build/cjs/{index-3891c460.js → index-89322318.js} +497 -295
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-9b70334c.js → DivaBoxPlanner-05a7aba4.js} +29 -31
- package/build/esm/{DivaStandardPlanner-6d3690b8.js → DivaStandardPlanner-c5615a1d.js} +3 -3
- package/build/esm/{DoorPlanner-81a93a41.js → DoorPlanner-dc53eaca.js} +1 -1
- package/build/esm/{Host3DSignalR-adc38975.js → Host3DSignalR-e94ff645.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-1bba645a.js → LiviqueWWSHandler-35286ba2.js} +1 -1
- package/build/esm/{PfisterWWSHandler-f5d757ea.js → PfisterWWSHandler-4ac1baf9.js} +10 -1
- package/build/esm/{PlannerHandler2D-5524f621.js → PlannerHandler2D-d863886b.js} +24 -9
- package/build/esm/{SeriousBasketHandler-ec11fc25.js → SeriousBasketHandler-fd07c5d0.js} +1 -1
- package/build/esm/{ShelfPlanner-3e4a62e1.js → ShelfPlanner-2a545c7c.js} +1 -1
- package/build/esm/{StandardWWSHandler-4a01f807.js → StandardWWSHandler-21793a92.js} +1 -1
- package/build/esm/{index-cb39833e.js → index-176318a8.js} +497 -295
- package/build/esm/index.js +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/Checkout.d.ts +10 -2
- package/build/types/web-planner-logic/src/interface/API/Checkout.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +4 -0
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/IDM/Feature.d.ts +4 -0
- package/build/types/web-planner-logic/src/interface/IDM/Feature.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.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/Article/DivaArticleHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/PfisterWWSHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +13 -0
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaCatalogHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +1 -0
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/BoxPlannerGrid.d.ts +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/BoxPlannerGrid.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/DockingPointHandler.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.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts +12 -0
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/DivaCatalogData.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/model/Options/ArticleOptionValueData.d.ts +2 -0
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts +8 -0
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -96,6 +96,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
96
96
|
_defineProperty__default["default"](this, "actions", void 0);
|
|
97
97
|
_defineProperty__default["default"](this, "state", void 0);
|
|
98
98
|
_defineProperty__default["default"](this, "i18n", void 0);
|
|
99
|
+
_defineProperty__default["default"](this, "enricherErrorModalShown", false);
|
|
99
100
|
_defineProperty__default["default"](this, "getSessionGuid", void 0);
|
|
100
101
|
_defineProperty__default["default"](this, "useEkPrices", false);
|
|
101
102
|
_defineProperty__default["default"](this, "smSupplierNr", undefined);
|
|
@@ -236,10 +237,12 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
236
237
|
case 38:
|
|
237
238
|
_context.prev = 38;
|
|
238
239
|
_context.t5 = _context["catch"](5);
|
|
240
|
+
// Check if this is a rate limiting error (429)
|
|
241
|
+
this.notifyEnricherError(url, dontLogError);
|
|
239
242
|
throw Error('fetch failed! ' + url + ' Error: ' + _context.t5, {
|
|
240
243
|
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
|
|
241
244
|
});
|
|
242
|
-
case
|
|
245
|
+
case 42:
|
|
243
246
|
case "end":
|
|
244
247
|
return _context.stop();
|
|
245
248
|
}
|
|
@@ -250,11 +253,57 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
250
253
|
}
|
|
251
254
|
return fetchData;
|
|
252
255
|
}()
|
|
256
|
+
/**
|
|
257
|
+
* Surface critical failures to the user. A hard failure of any enricher call (catalog / serie /
|
|
258
|
+
* items / decisions / features ...) leaves the planner unable to load, so give the user actionable
|
|
259
|
+
* feedback instead of a silently broken UI. Optional enricher calls (e.g. the catalog mask) pass
|
|
260
|
+
* `dontLogError` and are skipped. Only one modal is shown at a time to avoid stacking on parallel failures.
|
|
261
|
+
*/
|
|
262
|
+
}, {
|
|
263
|
+
key: "notifyEnricherError",
|
|
264
|
+
value: function notifyEnricherError(url, dontLogError) {
|
|
265
|
+
var _this$apiConfig,
|
|
266
|
+
_this$apiConfig2,
|
|
267
|
+
_this$apiConfig3,
|
|
268
|
+
_this$apiConfig4,
|
|
269
|
+
_this$apiConfig5,
|
|
270
|
+
_this$actions,
|
|
271
|
+
_this$i18n,
|
|
272
|
+
_translate$t,
|
|
273
|
+
_translate$t2,
|
|
274
|
+
_translate$t3,
|
|
275
|
+
_this = this;
|
|
276
|
+
if (dontLogError || this.enricherErrorModalShown) return;
|
|
277
|
+
var services = [(_this$apiConfig = this.apiConfig) === null || _this$apiConfig === void 0 ? void 0 : _this$apiConfig.enricherService, (_this$apiConfig2 = this.apiConfig) === null || _this$apiConfig2 === void 0 ? void 0 : _this$apiConfig2.idmService, (_this$apiConfig3 = this.apiConfig) === null || _this$apiConfig3 === void 0 ? void 0 : _this$apiConfig3.api2["default"], (_this$apiConfig4 = this.apiConfig) === null || _this$apiConfig4 === void 0 ? void 0 : _this$apiConfig4.api2.web, (_this$apiConfig5 = this.apiConfig) === null || _this$apiConfig5 === void 0 ? void 0 : _this$apiConfig5.api2.ek];
|
|
278
|
+
if (!services.some(function (service) {
|
|
279
|
+
return service && url.startsWith(service);
|
|
280
|
+
})) return;
|
|
281
|
+
if (!((_this$actions = this.actions) !== null && _this$actions !== void 0 && _this$actions.openModal)) return;
|
|
282
|
+
this.enricherErrorModalShown = true;
|
|
283
|
+
var translate = (_this$i18n = this.i18n) === null || _this$i18n === void 0 ? void 0 : _this$i18n.call(this);
|
|
284
|
+
this.actions.openModal({
|
|
285
|
+
title: (_translate$t = translate === null || translate === void 0 ? void 0 : translate.t('modals.error_accured')) !== null && _translate$t !== void 0 ? _translate$t : 'An error occured. Please try again later.',
|
|
286
|
+
accept: (_translate$t2 = translate === null || translate === void 0 ? void 0 : translate.t('modals.reload_page')) !== null && _translate$t2 !== void 0 ? _translate$t2 : 'Reload',
|
|
287
|
+
reject: (_translate$t3 = translate === null || translate === void 0 ? void 0 : translate.t('modals.close')) !== null && _translate$t3 !== void 0 ? _translate$t3 : 'Close',
|
|
288
|
+
callback: function callback(accepted) {
|
|
289
|
+
_this.enricherErrorModalShown = false;
|
|
290
|
+
if (accepted === true) {
|
|
291
|
+
if (_this.getApplicationEnvironment() === 'WEB' && typeof window !== 'undefined') window.location.reload();
|
|
292
|
+
} else if (accepted === false) {
|
|
293
|
+
var _this$actions2, _this$actions3;
|
|
294
|
+
(_this$actions2 = _this.actions) === null || _this$actions2 === void 0 || _this$actions2.onEvent({
|
|
295
|
+
type: 'onWebPlanerClose'
|
|
296
|
+
});
|
|
297
|
+
(_this$actions3 = _this.actions) === null || _this$actions3 === void 0 || _this$actions3.closeComponentInFullscreen();
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
}
|
|
253
302
|
}, {
|
|
254
303
|
key: "getDataWithoutCache",
|
|
255
304
|
value: function () {
|
|
256
305
|
var _getDataWithoutCache = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(queryString, init, useWebServiceApi) {
|
|
257
|
-
var _this$
|
|
306
|
+
var _this$apiConfig6, _this$apiConfig7, api2Url;
|
|
258
307
|
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
259
308
|
while (1) switch (_context2.prev = _context2.next) {
|
|
260
309
|
case 0:
|
|
@@ -296,8 +345,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
296
345
|
_context2.next = 24;
|
|
297
346
|
break;
|
|
298
347
|
case 14:
|
|
299
|
-
api2Url = (_this$
|
|
300
|
-
if (this.getApplicationEnvironment() == 'WEB' && (_this$
|
|
348
|
+
api2Url = (_this$apiConfig6 = this.apiConfig) === null || _this$apiConfig6 === void 0 ? void 0 : _this$apiConfig6.api2["default"];
|
|
349
|
+
if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig7 = this.apiConfig) !== null && _this$apiConfig7 !== void 0 && _this$apiConfig7.api2.web) {
|
|
301
350
|
api2Url = this.apiConfig.api2.web;
|
|
302
351
|
}
|
|
303
352
|
_context2.t0 = _objectSpread$q;
|
|
@@ -332,7 +381,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
332
381
|
value: function () {
|
|
333
382
|
var _getDataCache = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(queryString, cacheMD5, accountSessionGuid, useWebServiceApi, method, data, dontLogError) {
|
|
334
383
|
var _this$divaWebConfigDa, _this$divaWebConfigDa2;
|
|
335
|
-
var myQS, url, init, addSession, cacheHit, _this$
|
|
384
|
+
var myQS, url, init, addSession, cacheHit, _this$apiConfig8, _this$apiConfig9, api2Url, resolvedSessionGuid, result, _this$divaWebConfigDa3;
|
|
336
385
|
return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context3) {
|
|
337
386
|
while (1) switch (_context3.prev = _context3.next) {
|
|
338
387
|
case 0:
|
|
@@ -400,8 +449,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
400
449
|
_context3.next = 35;
|
|
401
450
|
break;
|
|
402
451
|
case 25:
|
|
403
|
-
api2Url = (_this$
|
|
404
|
-
if (this.getApplicationEnvironment() == 'WEB' && (_this$
|
|
452
|
+
api2Url = (_this$apiConfig8 = this.apiConfig) === null || _this$apiConfig8 === void 0 ? void 0 : _this$apiConfig8.api2["default"];
|
|
453
|
+
if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig9 = this.apiConfig) !== null && _this$apiConfig9 !== void 0 && _this$apiConfig9.api2.web) {
|
|
405
454
|
api2Url = this.apiConfig.api2.web;
|
|
406
455
|
}
|
|
407
456
|
this.apiCallCount += 1;
|
|
@@ -487,6 +536,10 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
487
536
|
}
|
|
488
537
|
return saveAsProduct;
|
|
489
538
|
}()
|
|
539
|
+
/**
|
|
540
|
+
* to run service on localhost
|
|
541
|
+
* diva3dRenderGroup :MYCCMEDIA
|
|
542
|
+
*/
|
|
490
543
|
}, {
|
|
491
544
|
key: "initalizeWebConfigData",
|
|
492
545
|
value: function initalizeWebConfigData(plannerConfig) {
|
|
@@ -561,38 +614,38 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
561
614
|
}, {
|
|
562
615
|
key: "getReportServiceUrl",
|
|
563
616
|
value: function getReportServiceUrl() {
|
|
564
|
-
var _this$apiConfig$repor, _this$
|
|
565
|
-
return (_this$apiConfig$repor = (_this$
|
|
617
|
+
var _this$apiConfig$repor, _this$apiConfig10;
|
|
618
|
+
return (_this$apiConfig$repor = (_this$apiConfig10 = this.apiConfig) === null || _this$apiConfig10 === void 0 ? void 0 : _this$apiConfig10.reportService) !== null && _this$apiConfig$repor !== void 0 ? _this$apiConfig$repor : '';
|
|
566
619
|
}
|
|
567
620
|
}, {
|
|
568
621
|
key: "getDivaSupportServiceUrl",
|
|
569
622
|
value: function getDivaSupportServiceUrl() {
|
|
570
|
-
var _this$apiConfig$suppo, _this$
|
|
571
|
-
return (_this$apiConfig$suppo = (_this$
|
|
623
|
+
var _this$apiConfig$suppo, _this$apiConfig11;
|
|
624
|
+
return (_this$apiConfig$suppo = (_this$apiConfig11 = this.apiConfig) === null || _this$apiConfig11 === void 0 ? void 0 : _this$apiConfig11.supportService) !== null && _this$apiConfig$suppo !== void 0 ? _this$apiConfig$suppo : '';
|
|
572
625
|
}
|
|
573
626
|
}, {
|
|
574
627
|
key: "getDivaMediaServiceUrl",
|
|
575
628
|
value: function getDivaMediaServiceUrl() {
|
|
576
|
-
var _this$apiConfig$media, _this$
|
|
577
|
-
return (_this$apiConfig$media = (_this$
|
|
629
|
+
var _this$apiConfig$media, _this$apiConfig12;
|
|
630
|
+
return (_this$apiConfig$media = (_this$apiConfig12 = this.apiConfig) === null || _this$apiConfig12 === void 0 ? void 0 : _this$apiConfig12.mediaService) !== null && _this$apiConfig$media !== void 0 ? _this$apiConfig$media : '';
|
|
578
631
|
}
|
|
579
632
|
}, {
|
|
580
633
|
key: "getDivaAiServiceUrl",
|
|
581
634
|
value: function getDivaAiServiceUrl() {
|
|
582
|
-
var _this$apiConfig$aiSer, _this$
|
|
583
|
-
return (_this$apiConfig$aiSer = (_this$
|
|
635
|
+
var _this$apiConfig$aiSer, _this$apiConfig13;
|
|
636
|
+
return (_this$apiConfig$aiSer = (_this$apiConfig13 = this.apiConfig) === null || _this$apiConfig13 === void 0 ? void 0 : _this$apiConfig13.aiService) !== null && _this$apiConfig$aiSer !== void 0 ? _this$apiConfig$aiSer : '';
|
|
584
637
|
}
|
|
585
638
|
}, {
|
|
586
639
|
key: "getConstructorServiceUrl",
|
|
587
640
|
value: function getConstructorServiceUrl() {
|
|
588
|
-
var _this$apiConfig$const, _this$
|
|
589
|
-
return (_this$apiConfig$const = (_this$
|
|
641
|
+
var _this$apiConfig$const, _this$apiConfig14;
|
|
642
|
+
return (_this$apiConfig$const = (_this$apiConfig14 = this.apiConfig) === null || _this$apiConfig14 === void 0 ? void 0 : _this$apiConfig14.constructorService) !== null && _this$apiConfig$const !== void 0 ? _this$apiConfig$const : '';
|
|
590
643
|
}
|
|
591
644
|
}, {
|
|
592
645
|
key: "getDivaBasketServiceUrl",
|
|
593
646
|
value: function getDivaBasketServiceUrl() {
|
|
594
|
-
var _this$apiConfig$baske, _this$
|
|
595
|
-
return (_this$apiConfig$baske = (_this$
|
|
647
|
+
var _this$apiConfig$baske, _this$apiConfig15;
|
|
648
|
+
return (_this$apiConfig$baske = (_this$apiConfig15 = this.apiConfig) === null || _this$apiConfig15 === void 0 ? void 0 : _this$apiConfig15.basketService) !== null && _this$apiConfig$baske !== void 0 ? _this$apiConfig$baske : '';
|
|
596
649
|
}
|
|
597
650
|
}, {
|
|
598
651
|
key: "getLoadProductBasketParams",
|
|
@@ -603,8 +656,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
603
656
|
}, {
|
|
604
657
|
key: "get3DServerUrl",
|
|
605
658
|
value: function get3DServerUrl() {
|
|
606
|
-
var _this$apiConfig$host, _this$
|
|
607
|
-
return (_this$apiConfig$host = (_this$
|
|
659
|
+
var _this$apiConfig$host, _this$apiConfig16;
|
|
660
|
+
return (_this$apiConfig$host = (_this$apiConfig16 = this.apiConfig) === null || _this$apiConfig16 === void 0 ? void 0 : _this$apiConfig16.host3d) !== null && _this$apiConfig$host !== void 0 ? _this$apiConfig$host : '';
|
|
608
661
|
}
|
|
609
662
|
}, {
|
|
610
663
|
key: "doCheckForProductsPrice",
|
|
@@ -673,9 +726,9 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
673
726
|
}, {
|
|
674
727
|
key: "getBaseUrl",
|
|
675
728
|
value: function getBaseUrl() {
|
|
676
|
-
var _this$
|
|
677
|
-
var url = (_this$
|
|
678
|
-
if (this.getApplicationEnvironment() == 'WEB' && (_this$
|
|
729
|
+
var _this$apiConfig17, _this$apiConfig18;
|
|
730
|
+
var url = (_this$apiConfig17 = this.apiConfig) === null || _this$apiConfig17 === void 0 ? void 0 : _this$apiConfig17.api2["default"];
|
|
731
|
+
if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig18 = this.apiConfig) !== null && _this$apiConfig18 !== void 0 && _this$apiConfig18.api2.web) {
|
|
679
732
|
url = this.apiConfig.api2.web;
|
|
680
733
|
}
|
|
681
734
|
if (!url) throw new Error('No API2 defined');
|
|
@@ -791,14 +844,14 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
791
844
|
}, {
|
|
792
845
|
key: "getI18n",
|
|
793
846
|
value: function getI18n() {
|
|
794
|
-
var _this$
|
|
795
|
-
return (_this$
|
|
847
|
+
var _this$i18n2;
|
|
848
|
+
return (_this$i18n2 = this.i18n) === null || _this$i18n2 === void 0 ? void 0 : _this$i18n2.call(this);
|
|
796
849
|
}
|
|
797
850
|
}, {
|
|
798
851
|
key: "setAccountSessionGuid",
|
|
799
852
|
value: function () {
|
|
800
853
|
var _setAccountSessionGuid = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee5(_ref) {
|
|
801
|
-
var os, accountGuid, catalogGuid, response, _this$
|
|
854
|
+
var os, accountGuid, catalogGuid, response, _this$actions4, _this$state$navigatio, _this$state;
|
|
802
855
|
return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context5) {
|
|
803
856
|
while (1) switch (_context5.prev = _context5.next) {
|
|
804
857
|
case 0:
|
|
@@ -837,7 +890,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
837
890
|
break;
|
|
838
891
|
case 16:
|
|
839
892
|
if (this.applicationEnvironment == 'SELLER') {
|
|
840
|
-
(_this$
|
|
893
|
+
(_this$actions4 = this.actions) === null || _this$actions4 === void 0 || _this$actions4.openComponent((_this$state$navigatio = (_this$state = this.state) === null || _this$state === void 0 || (_this$state = _this$state.navigationConfiguration) === null || _this$state === void 0 ? void 0 : _this$state.logoAction) !== null && _this$state$navigatio !== void 0 ? _this$state$navigatio : {
|
|
841
894
|
type: 'SELLER',
|
|
842
895
|
parameters: {
|
|
843
896
|
module: 'Collections'
|
|
@@ -936,39 +989,39 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
936
989
|
}, {
|
|
937
990
|
key: "apiUrl",
|
|
938
991
|
value: function apiUrl(queryString, useWebServiceApi) {
|
|
939
|
-
var _this$
|
|
992
|
+
var _this$apiConfig29, _this$apiConfig30, _this$apiConfig31;
|
|
940
993
|
if (useWebServiceApi == 'catalog') {
|
|
941
|
-
var _this$
|
|
942
|
-
if (!((_this$
|
|
943
|
-
return ((_this$
|
|
994
|
+
var _this$apiConfig19, _this$apiConfig20;
|
|
995
|
+
if (!((_this$apiConfig19 = this.apiConfig) !== null && _this$apiConfig19 !== void 0 && _this$apiConfig19.catalogService)) throw new Error('No catalog Service defined');
|
|
996
|
+
return ((_this$apiConfig20 = this.apiConfig) === null || _this$apiConfig20 === void 0 ? void 0 : _this$apiConfig20.catalogService) + queryString;
|
|
944
997
|
}
|
|
945
998
|
if (useWebServiceApi == 'basket') {
|
|
946
|
-
var _this$
|
|
947
|
-
if (!((_this$
|
|
948
|
-
return ((_this$
|
|
999
|
+
var _this$apiConfig21, _this$apiConfig22;
|
|
1000
|
+
if (!((_this$apiConfig21 = this.apiConfig) !== null && _this$apiConfig21 !== void 0 && _this$apiConfig21.basketService)) throw new Error('No basket Service defined');
|
|
1001
|
+
return ((_this$apiConfig22 = this.apiConfig) === null || _this$apiConfig22 === void 0 ? void 0 : _this$apiConfig22.basketService) + queryString;
|
|
949
1002
|
}
|
|
950
1003
|
if (useWebServiceApi == 'report') {
|
|
951
|
-
var _this$
|
|
952
|
-
if (!((_this$
|
|
953
|
-
return ((_this$
|
|
1004
|
+
var _this$apiConfig23, _this$apiConfig24;
|
|
1005
|
+
if (!((_this$apiConfig23 = this.apiConfig) !== null && _this$apiConfig23 !== void 0 && _this$apiConfig23.reportService)) throw new Error('No report Service defined');
|
|
1006
|
+
return ((_this$apiConfig24 = this.apiConfig) === null || _this$apiConfig24 === void 0 ? void 0 : _this$apiConfig24.reportService) + queryString;
|
|
954
1007
|
}
|
|
955
1008
|
if (useWebServiceApi == 'enricher') {
|
|
956
|
-
var _this$
|
|
1009
|
+
var _this$apiConfig27, _this$apiConfig28;
|
|
957
1010
|
if (this.useIDMService) {
|
|
958
|
-
var _this$
|
|
959
|
-
if (!((_this$
|
|
960
|
-
return ((_this$
|
|
1011
|
+
var _this$apiConfig25, _this$apiConfig26;
|
|
1012
|
+
if (!((_this$apiConfig25 = this.apiConfig) !== null && _this$apiConfig25 !== void 0 && _this$apiConfig25.idmService)) throw new Error('No report Service defined');
|
|
1013
|
+
return ((_this$apiConfig26 = this.apiConfig) === null || _this$apiConfig26 === void 0 ? void 0 : _this$apiConfig26.idmService) + queryString;
|
|
961
1014
|
}
|
|
962
|
-
if (!((_this$
|
|
963
|
-
return ((_this$
|
|
1015
|
+
if (!((_this$apiConfig27 = this.apiConfig) !== null && _this$apiConfig27 !== void 0 && _this$apiConfig27.enricherService)) throw new Error('No report Service defined');
|
|
1016
|
+
return ((_this$apiConfig28 = this.apiConfig) === null || _this$apiConfig28 === void 0 ? void 0 : _this$apiConfig28.enricherService) + queryString;
|
|
964
1017
|
}
|
|
965
|
-
var url = (_this$
|
|
966
|
-
if (this.getApplicationEnvironment() == 'WEB' && (_this$
|
|
1018
|
+
var url = (_this$apiConfig29 = this.apiConfig) === null || _this$apiConfig29 === void 0 ? void 0 : _this$apiConfig29.api2["default"];
|
|
1019
|
+
if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig30 = this.apiConfig) !== null && _this$apiConfig30 !== void 0 && _this$apiConfig30.api2.web) {
|
|
967
1020
|
url = this.apiConfig.api2.web;
|
|
968
1021
|
}
|
|
969
|
-
if (this.useEkPrices && (_this$
|
|
970
|
-
var _this$
|
|
971
|
-
url = (_this$
|
|
1022
|
+
if (this.useEkPrices && (_this$apiConfig31 = this.apiConfig) !== null && _this$apiConfig31 !== void 0 && _this$apiConfig31.api2.ek) {
|
|
1023
|
+
var _this$apiConfig32;
|
|
1024
|
+
url = (_this$apiConfig32 = this.apiConfig) === null || _this$apiConfig32 === void 0 ? void 0 : _this$apiConfig32.api2.ek;
|
|
972
1025
|
}
|
|
973
1026
|
if (!url) throw new Error('No API2 defined');
|
|
974
1027
|
return url + '?' + queryString;
|
|
@@ -1160,7 +1213,14 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1160
1213
|
}, {
|
|
1161
1214
|
key: "getIDMItems",
|
|
1162
1215
|
value: function getIDMItems(packageId, serieId, serieNo, typeNos) {
|
|
1163
|
-
|
|
1216
|
+
var base = this.idmPrefix + (this.isSeller ? '/packages/' : '/catalogs/') + packageId + '/series/' + (this.useIDMService ? serieId : serieNo) + '/items';
|
|
1217
|
+
|
|
1218
|
+
// The seller/configurator endpoint is purpose-built: a dedicated typeNos param instead of a generic filter,
|
|
1219
|
+
// and a fixed field set server-side instead of an explicit fields= list.
|
|
1220
|
+
if (this.isSeller) {
|
|
1221
|
+
return base + (typeNos !== null && typeNos !== void 0 && typeNos.length ? '?typeNos=' + typeNos.join(';') : '');
|
|
1222
|
+
}
|
|
1223
|
+
return base + (typeNos !== null && typeNos !== void 0 && typeNos.length ? '?filter=' + typeNos.map(function (t) {
|
|
1164
1224
|
return encodeURIComponent('typeNo==' + t);
|
|
1165
1225
|
}).join(' || ') : '?fields=properties;serieNo;featureClassRefNo;priceTypeRef;itemIdentification;catalogPage;weightBrutto;weightNetto;volume;minimumDeliveryTime;widthBasicShapeNominalValue;widthBasicShapeFrom;widthBasicShapeTo;widthBasicShapeStepSize;heightBasicShapeNominalValue;heightBasicShapeFrom;heightBasicShapeTo;heightBasicShapeStepSize;depthBasicShapeNominalValue;depthBasicShapeFrom;depthBasicShapeTo;depthBasicShapeStepSize;typeKey;eClassNo;detailInfoRefs;detailInfos;partListExclusive;partListRef;decisionRefs;typeNo;sequenceNo;edpNumber;eanNumber;shortText;fullText;planningAdvice;salesNumber;avrFilter;avlFilter');
|
|
1166
1226
|
}
|
|
@@ -1174,6 +1234,11 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1174
1234
|
value: function getIDMDecisions(packageId, decisions) {
|
|
1175
1235
|
return this.idmPrefix + (this.isSeller ? '/packages/' : '/catalogs/') + packageId + '/decisions' + '?decisionNos=' + decisions.join(';') + (this.smSupplierNr ? '&supplierNo=' + this.smSupplierNr : '');
|
|
1176
1236
|
}
|
|
1237
|
+
}, {
|
|
1238
|
+
key: "getIDMDecisionsQueryUrl",
|
|
1239
|
+
value: function getIDMDecisionsQueryUrl(packageId) {
|
|
1240
|
+
return this.idmPrefix + (this.isSeller ? '/packages/' : '/catalogs/') + packageId + '/decisions/query' + (this.smSupplierNr ? '?supplierNo=' + this.smSupplierNr : '');
|
|
1241
|
+
}
|
|
1177
1242
|
}, {
|
|
1178
1243
|
key: "getIDMDetailInfos",
|
|
1179
1244
|
value: function getIDMDetailInfos(packageId, detailinfos) {
|
|
@@ -1184,14 +1249,26 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1184
1249
|
}, {
|
|
1185
1250
|
key: "getIDMFeatureClass",
|
|
1186
1251
|
value: function getIDMFeatureClass(packageId, featureclasses) {
|
|
1187
|
-
|
|
1252
|
+
var base = this.idmPrefix + (this.isSeller ? '/packages/' : '/catalogs/') + packageId + '/featureclasses';
|
|
1253
|
+
|
|
1254
|
+
// The seller/configurator endpoint is purpose-built: a dedicated featureClassNos param instead of a generic filter.
|
|
1255
|
+
if (this.isSeller) {
|
|
1256
|
+
return base + '?featureClassNos=' + featureclasses.join(';');
|
|
1257
|
+
}
|
|
1258
|
+
return base + '?filter=' + featureclasses.map(function (f) {
|
|
1188
1259
|
return encodeURIComponent('featureClassNo==' + f);
|
|
1189
1260
|
}).join(' || ');
|
|
1190
1261
|
}
|
|
1191
1262
|
}, {
|
|
1192
1263
|
key: "getIDMPriceFeatureGroups",
|
|
1193
1264
|
value: function getIDMPriceFeatureGroups(packageId, pricefeaturegroups) {
|
|
1194
|
-
|
|
1265
|
+
var base = this.idmPrefix + (this.isSeller ? '/packages/' : '/catalogs/') + packageId + '/pricefeaturegroups';
|
|
1266
|
+
|
|
1267
|
+
// The seller/configurator endpoint is purpose-built: a dedicated priceFeatureGroupNos param instead of a generic filter.
|
|
1268
|
+
if (this.isSeller) {
|
|
1269
|
+
return base + '?priceFeatureGroupNos=' + pricefeaturegroups.join(';');
|
|
1270
|
+
}
|
|
1271
|
+
return base + '?filter=' + pricefeaturegroups.map(function (p) {
|
|
1195
1272
|
return encodeURIComponent('priceFeatureGroupNo==' + p);
|
|
1196
1273
|
}).join(' || ');
|
|
1197
1274
|
}
|
|
@@ -1515,12 +1592,12 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1515
1592
|
key: "getDimensionbyId",
|
|
1516
1593
|
value: function () {
|
|
1517
1594
|
var _getDimensionbyId = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(id, iln, catalogCodex, plannedOptions) {
|
|
1518
|
-
var _this$
|
|
1595
|
+
var _this$apiConfig33;
|
|
1519
1596
|
var fullUrl, res, headers;
|
|
1520
1597
|
return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context15) {
|
|
1521
1598
|
while (1) switch (_context15.prev = _context15.next) {
|
|
1522
1599
|
case 0:
|
|
1523
|
-
fullUrl = this.getConstructorServiceUrl() + '/dimension/' + id + '?iln=' + iln + '&catalogCodex=' + catalogCodex + '&debug=' + ((_this$
|
|
1600
|
+
fullUrl = this.getConstructorServiceUrl() + '/dimension/' + id + '?iln=' + iln + '&catalogCodex=' + catalogCodex + '&debug=' + ((_this$apiConfig33 = this.apiConfig) === null || _this$apiConfig33 === void 0 ? void 0 : _this$apiConfig33.useDebugUrl);
|
|
1524
1601
|
headers = {};
|
|
1525
1602
|
if (this.jwt) headers = {
|
|
1526
1603
|
Authorization: 'Bearer ' + this.jwt
|
|
@@ -16526,6 +16603,11 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16526
16603
|
get: function get() {
|
|
16527
16604
|
return this.opv.material;
|
|
16528
16605
|
}
|
|
16606
|
+
}, {
|
|
16607
|
+
key: "properties",
|
|
16608
|
+
get: function get() {
|
|
16609
|
+
return this.opv.property;
|
|
16610
|
+
}
|
|
16529
16611
|
}, {
|
|
16530
16612
|
key: "isOPVG",
|
|
16531
16613
|
get: function get() {
|
|
@@ -16687,6 +16769,29 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16687
16769
|
get: function get() {
|
|
16688
16770
|
return this.opv.hiddenByMask;
|
|
16689
16771
|
}
|
|
16772
|
+
}, {
|
|
16773
|
+
key: "hiddenInFeatureNos",
|
|
16774
|
+
get: function get() {
|
|
16775
|
+
return this.opv.hiddenInFeatureNos;
|
|
16776
|
+
}
|
|
16777
|
+
/**
|
|
16778
|
+
* Whether this option value is hidden specifically within the given feature (OPT).
|
|
16779
|
+
* Used for enricher "eoption" exclusions that hide an option value in a single feature only,
|
|
16780
|
+
* without affecting the same option value where it appears in other features.
|
|
16781
|
+
*/
|
|
16782
|
+
}, {
|
|
16783
|
+
key: "isHiddenInFeature",
|
|
16784
|
+
value: function isHiddenInFeature(optCodex) {
|
|
16785
|
+
var featureNos = this.opv.hiddenInFeatureNos;
|
|
16786
|
+
if (!(featureNos !== null && featureNos !== void 0 && featureNos.length)) return false;
|
|
16787
|
+
var strip = function strip(codex) {
|
|
16788
|
+
return codex.startsWith('OPT') ? codex.substring(3) : codex;
|
|
16789
|
+
};
|
|
16790
|
+
var target = strip(optCodex);
|
|
16791
|
+
return featureNos.some(function (featureNo) {
|
|
16792
|
+
return strip(featureNo) === target;
|
|
16793
|
+
});
|
|
16794
|
+
}
|
|
16690
16795
|
}, {
|
|
16691
16796
|
key: "setName",
|
|
16692
16797
|
get: function get() {
|
|
@@ -16892,6 +16997,9 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
16892
16997
|
case 'ACCESSOIRE_POS_PRIO':
|
|
16893
16998
|
this._catalogArticle.accPosPrio = Number(prop.Value);
|
|
16894
16999
|
break;
|
|
17000
|
+
case 'ADD_AS_ZKAT':
|
|
17001
|
+
this._catalogArticle.addAsZKAT = prop.Value === 'true' || prop.Value === '1';
|
|
17002
|
+
break;
|
|
16895
17003
|
case 'HEIGHTGRIDUSED':
|
|
16896
17004
|
this._catalogArticle.heightGridUsed = Number(prop.Value);
|
|
16897
17005
|
break;
|
|
@@ -16964,6 +17072,12 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
16964
17072
|
case 'OPTIONS_FOR_PRINT':
|
|
16965
17073
|
this.catalogArticle.optionsForPrint = prop.Value.split(';');
|
|
16966
17074
|
break;
|
|
17075
|
+
case 'TABGROUP':
|
|
17076
|
+
if (!this._catalogArticle.tabGroup) this._catalogArticle.tabGroup = prop.Value;
|
|
17077
|
+
break;
|
|
17078
|
+
case 'TABGROUP_OPTIONS':
|
|
17079
|
+
if (!this._catalogArticle.tabGroupOption) this._catalogArticle.tabGroupOption = prop.Value;
|
|
17080
|
+
break;
|
|
16967
17081
|
default:
|
|
16968
17082
|
if (_key.includes('__')) break;
|
|
16969
17083
|
var values = prop.Value.split(';');
|
|
@@ -17353,6 +17467,11 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17353
17467
|
get: function get() {
|
|
17354
17468
|
return this._catalogArticle.accPosPrio;
|
|
17355
17469
|
}
|
|
17470
|
+
}, {
|
|
17471
|
+
key: "addAsZKAT",
|
|
17472
|
+
get: function get() {
|
|
17473
|
+
return this._catalogArticle.addAsZKAT;
|
|
17474
|
+
}
|
|
17356
17475
|
}, {
|
|
17357
17476
|
key: "overwriteParentWidth",
|
|
17358
17477
|
get: function get() {
|
|
@@ -17934,7 +18053,7 @@ function initCatalogOptionValues(catalogData, jsonOptions) {
|
|
|
17934
18053
|
return optionValues;
|
|
17935
18054
|
}
|
|
17936
18055
|
function getCatalogOptionValueDataType(codex, jsonOPV, catalogData) {
|
|
17937
|
-
var _catalogData$catalogM9, _catalogData$catalogM10, _catalogData$catalogM11, _optionvalues$codex, _catalogData$catalogM12, _catalogData$catalogM13, _jsonOPV$Metadatas, _mask$name$catalogDat, _mask$name, _mask$name2, _mask$groupname$catal, _mask$groupname, _mask$groupname2, _jsonOPV$MeasureStep, _jsonOPV$Value;
|
|
18056
|
+
var _catalogData$catalogM9, _catalogData$catalogM10, _catalogData$catalogM11, _optionvalues$codex, _catalogData$catalogM12, _catalogData$catalogM13, _jsonOPV$Metadatas, _mask$name$catalogDat, _mask$name, _mask$name2, _mask$groupname$catal, _mask$groupname, _mask$groupname2, _mask$hiddenInFeature, _jsonOPV$MeasureStep, _jsonOPV$Value;
|
|
17938
18057
|
var optionvalues = (_catalogData$catalogM9 = (_catalogData$catalogM10 = catalogData.catalogMask) === null || _catalogData$catalogM10 === void 0 ? void 0 : _catalogData$catalogM10.optionvalues) !== null && _catalogData$catalogM9 !== void 0 ? _catalogData$catalogM9 : (_catalogData$catalogM11 = catalogData.catalogMask) === null || _catalogData$catalogM11 === void 0 ? void 0 : _catalogData$catalogM11.optionValues;
|
|
17939
18058
|
var mask = (_optionvalues$codex = optionvalues === null || optionvalues === void 0 ? void 0 : optionvalues[codex]) !== null && _optionvalues$codex !== void 0 ? _optionvalues$codex : codex.startsWith('OPV') ? optionvalues === null || optionvalues === void 0 ? void 0 : optionvalues[codex.substring(3)] : undefined;
|
|
17940
18059
|
var maskProperties = getPropertiesForOptionKey((_catalogData$catalogM12 = (_catalogData$catalogM13 = catalogData.catalogMask) === null || _catalogData$catalogM13 === void 0 ? void 0 : _catalogData$catalogM13.properties) !== null && _catalogData$catalogM12 !== void 0 ? _catalogData$catalogM12 : [], undefined, codex, catalogData.api.getLanguage());
|
|
@@ -17953,7 +18072,8 @@ function getCatalogOptionValueDataType(codex, jsonOPV, catalogData) {
|
|
|
17953
18072
|
groupName: (_mask$groupname$catal = mask === null || mask === void 0 || (_mask$groupname = mask.groupname) === null || _mask$groupname === void 0 ? void 0 : _mask$groupname[catalogData.api.getLanguage()]) !== null && _mask$groupname$catal !== void 0 ? _mask$groupname$catal : jsonOPV.GroupName && jsonOPV.GroupName != '' ? jsonOPV.GroupName : undefined,
|
|
17954
18073
|
origGroupName: jsonOPV.GroupName && jsonOPV.GroupName != '' ? jsonOPV.GroupName : undefined,
|
|
17955
18074
|
groupName_locales: (_mask$groupname2 = mask === null || mask === void 0 ? void 0 : mask.groupname) !== null && _mask$groupname2 !== void 0 ? _mask$groupname2 : jsonOPV.GroupName_locales,
|
|
17956
|
-
hiddenByMask: mask === null || mask === void 0 ? void 0 : mask.hidden,
|
|
18075
|
+
hiddenByMask: (mask === null || mask === void 0 ? void 0 : mask.hidden) && !(mask !== null && mask !== void 0 && (_mask$hiddenInFeature = mask.hiddenInFeatureNos) !== null && _mask$hiddenInFeature !== void 0 && _mask$hiddenInFeature.length),
|
|
18076
|
+
hiddenInFeatureNos: mask !== null && mask !== void 0 && mask.hidden ? mask === null || mask === void 0 ? void 0 : mask.hiddenInFeatureNos : undefined,
|
|
17957
18077
|
textureName: jsonOPV.TextureName && jsonOPV.TextureName != '' ? jsonOPV.TextureName : jsonOPV.PFTFile && jsonOPV.PFTFile != '' ? jsonOPV.PFTFile : undefined,
|
|
17958
18078
|
material: jsonOPV.Material && jsonOPV.Material != '' ? jsonOPV.Material : undefined,
|
|
17959
18079
|
isOPVG: jsonOPV.IsOPVG && jsonOPV.IsOPVG == '1' ? true : false,
|
|
@@ -18000,18 +18120,18 @@ function getCatalogOptionValueDataType(codex, jsonOPV, catalogData) {
|
|
|
18000
18120
|
}
|
|
18001
18121
|
function initCatalogPlannerArticleView$1(catalogData, catPlanArticle, catalogProps, plannerPaletteViewInfo) {
|
|
18002
18122
|
//Hier muss es dann reingespeichert werden catalogPlannerArticlesView;
|
|
18003
|
-
var getFilterType = function getFilterType(hasArticleRelation,
|
|
18123
|
+
var getFilterType = function getFilterType(hasArticleRelation, hasAVL, hasAVR, catalogProps) {
|
|
18004
18124
|
var ret;
|
|
18005
18125
|
if (hasArticleRelation) {
|
|
18006
18126
|
if (!catalogProps.showAllItemsInPlanner && !catalogProps.showAccOnDpOnly) plannerPaletteViewInfo.filterType['Accessoire'] = true;
|
|
18007
18127
|
ret = 'Accessoire';
|
|
18008
|
-
} else if (
|
|
18128
|
+
} else if (hasAVL && hasAVR) {
|
|
18009
18129
|
if (!catalogProps.showAllItemsInPlanner) plannerPaletteViewInfo.filterType['DockLR'] = true;
|
|
18010
18130
|
ret = 'DockLR';
|
|
18011
|
-
} else if (
|
|
18131
|
+
} else if (hasAVL) {
|
|
18012
18132
|
if (!catalogProps.showAllItemsInPlanner) plannerPaletteViewInfo.filterType['DockR'] = true;
|
|
18013
18133
|
ret = 'DockR';
|
|
18014
|
-
} else if (
|
|
18134
|
+
} else if (hasAVR) {
|
|
18015
18135
|
if (!catalogProps.showAllItemsInPlanner) plannerPaletteViewInfo.filterType['DockL'] = true;
|
|
18016
18136
|
ret = 'DockL';
|
|
18017
18137
|
} else {
|
|
@@ -18105,12 +18225,9 @@ function initCatalogPlannerArticleView$1(catalogData, catPlanArticle, catalogPro
|
|
|
18105
18225
|
if (catalogProps.diva3dPlanerShowArticleAsSvg && topSvg.SVG) {
|
|
18106
18226
|
image = getSVGUrl(topSvg.SVG, mediaUrl);
|
|
18107
18227
|
}
|
|
18108
|
-
|
|
18109
|
-
|
|
18110
|
-
|
|
18111
|
-
if (topSvg.HasAVR && catPlanArticle.avrFilter.length == 0) {
|
|
18112
|
-
catPlanArticle.avrFilter = ['ALWAYS_DOCKABLE'];
|
|
18113
|
-
}
|
|
18228
|
+
|
|
18229
|
+
// An empty AVL/AVR filter means "no connector restriction" and is treated as a match by the
|
|
18230
|
+
// docking/palette comparison (see checkDPFilterDoMatch / checkDPAV*FilterDoMatch). No sentinel needed.
|
|
18114
18231
|
|
|
18115
18232
|
//Wäre für Rofl Benz gedacht um die Information zu speichern welche Artikel in welcher Ausrichtung ausmultipliziert werden
|
|
18116
18233
|
if (topSvg.JsFormula.includes('202_LI')) {
|
|
@@ -18118,7 +18235,7 @@ function initCatalogPlannerArticleView$1(catalogData, catPlanArticle, catalogPro
|
|
|
18118
18235
|
} else if (topSvg.JsFormula.includes('202_RE')) {
|
|
18119
18236
|
elementName = elementName + ' (Rechts)';
|
|
18120
18237
|
}
|
|
18121
|
-
var filterType = getFilterType(catPlanArticle.isArticleRelation, topSvg.HasAVL
|
|
18238
|
+
var filterType = getFilterType(catPlanArticle.isArticleRelation, !!topSvg.HasAVL, !!topSvg.HasAVR, catalogProps);
|
|
18122
18239
|
catPlanArticle.filterType = filterType;
|
|
18123
18240
|
//ausmultiplizierte Elemente (über meherere SVGs)
|
|
18124
18241
|
var catPlanArtView = {
|
|
@@ -18171,7 +18288,7 @@ function initCatalogPlannerArticleView$1(catalogData, catPlanArticle, catalogPro
|
|
|
18171
18288
|
}
|
|
18172
18289
|
if (!catPlanArticle.hasTopSvgsWithFormula || catPlanArticle.topSvgsWithFormula.length == 1) {
|
|
18173
18290
|
var _catalogArticle$artic2;
|
|
18174
|
-
var _filterType = getFilterType(catPlanArticle.isArticleRelation, catPlanArticle.topHasAVL
|
|
18291
|
+
var _filterType = getFilterType(catPlanArticle.isArticleRelation, !!catPlanArticle.topHasAVL, !!catPlanArticle.topHasAVR, catalogProps);
|
|
18175
18292
|
catPlanArticle.filterType = _filterType;
|
|
18176
18293
|
//Artikelbild ist abh�ngig von DIVA3DPlanerShowArticleAsSvg das SVG des Elements
|
|
18177
18294
|
if (catalogProps.diva3dPlanerShowArticleAsSvg && (catPlanArticle.hasTopSvg || catPlanArticle.hasTopSvgsWithFormula)) {
|
|
@@ -18609,6 +18726,11 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
|
|
|
18609
18726
|
get: function get() {
|
|
18610
18727
|
return this.opv.catalogOPV.value;
|
|
18611
18728
|
}
|
|
18729
|
+
}, {
|
|
18730
|
+
key: "properties",
|
|
18731
|
+
get: function get() {
|
|
18732
|
+
return this.opv.catalogOPV.properties;
|
|
18733
|
+
}
|
|
18612
18734
|
}, {
|
|
18613
18735
|
key: "metaData",
|
|
18614
18736
|
get: function get() {
|
|
@@ -18698,6 +18820,11 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
|
|
|
18698
18820
|
get: function get() {
|
|
18699
18821
|
return this.opv.catalogOPV.hiddenByMask;
|
|
18700
18822
|
}
|
|
18823
|
+
}, {
|
|
18824
|
+
key: "isHiddenInFeature",
|
|
18825
|
+
value: function isHiddenInFeature(optCodex) {
|
|
18826
|
+
return this.opv.catalogOPV.isHiddenInFeature(optCodex);
|
|
18827
|
+
}
|
|
18701
18828
|
}, {
|
|
18702
18829
|
key: "isPIMFlatValue",
|
|
18703
18830
|
get: function get() {
|
|
@@ -19714,7 +19841,15 @@ function _loadMoreFromIDMArticles() {
|
|
|
19714
19841
|
}).map(function (a) {
|
|
19715
19842
|
return a.featureClassRefNo;
|
|
19716
19843
|
})));
|
|
19717
|
-
promises = [set.api.getDataCache(set.api.getIDMFeatureClass(set.CatalogData.accountGuid, toLoadFeatureClassRefNo), undefined, undefined, 'enricher'), toLoadPFGroups.length ? set.api.getDataCache(set.api.getIDMPriceFeatureGroups(set.CatalogData.accountGuid, toLoadPFGroups), undefined, undefined, 'enricher') : undefined, toLoadDecisionIds.length ?
|
|
19844
|
+
promises = [set.api.getDataCache(set.api.getIDMFeatureClass(set.CatalogData.accountGuid, toLoadFeatureClassRefNo), undefined, undefined, 'enricher'), toLoadPFGroups.length ? set.api.getDataCache(set.api.getIDMPriceFeatureGroups(set.CatalogData.accountGuid, toLoadPFGroups), undefined, undefined, 'enricher') : undefined, toLoadDecisionIds.length ? function () {
|
|
19845
|
+
var getUrl = set.api.getIDMDecisions(set.CatalogData.accountGuid, toLoadDecisionIds);
|
|
19846
|
+
if (getUrl.length > 2000) {
|
|
19847
|
+
return set.api.getDataCache(set.api.getIDMDecisionsQueryUrl(set.CatalogData.accountGuid), undefined, undefined, 'enricher', 'POST', {
|
|
19848
|
+
decisionNos: toLoadDecisionIds.join(';')
|
|
19849
|
+
});
|
|
19850
|
+
}
|
|
19851
|
+
return set.api.getDataCache(getUrl, undefined, undefined, 'enricher');
|
|
19852
|
+
}() : undefined];
|
|
19718
19853
|
_context5.next = 16;
|
|
19719
19854
|
return Promise.all(promises);
|
|
19720
19855
|
case 16:
|
|
@@ -19749,7 +19884,7 @@ function _loadMoreFromIDMArticles() {
|
|
|
19749
19884
|
catalogArticleData = catalogArticleDatas[_i6];
|
|
19750
19885
|
catalogArticleData.articleIDMDecisions = sortDecisions(set.CatalogData.getDecisionsByNo(_toConsumableArray__default["default"](new Set([].concat(_toConsumableArray__default["default"](set.CatalogData.globalDecisions.map(function (g) {
|
|
19751
19886
|
return g.decisionNo;
|
|
19752
|
-
})), _toConsumableArray__default["default"]((_catalogArticleData$d2 = catalogArticleData.decisionsRefs) !== null && _catalogArticleData$d2 !== void 0 ? _catalogArticleData$d2 : []))))));
|
|
19887
|
+
})), _toConsumableArray__default["default"](set.CatalogData.serieDecisionRefs), _toConsumableArray__default["default"]((_catalogArticleData$d2 = catalogArticleData.decisionsRefs) !== null && _catalogArticleData$d2 !== void 0 ? _catalogArticleData$d2 : []))))));
|
|
19753
19888
|
}
|
|
19754
19889
|
featureClasses.map(function (fc) {
|
|
19755
19890
|
return set.CatalogData.loadedFeatureClasses.push(fc);
|
|
@@ -19918,7 +20053,7 @@ var getToLoadDecisionIds = function getToLoadDecisionIds(catalogArticleDatas, se
|
|
|
19918
20053
|
}
|
|
19919
20054
|
var neededDecisionsIds = _toConsumableArray__default["default"](new Set([].concat(_toConsumableArray__default["default"](set.CatalogData.globalDecisions.map(function (g) {
|
|
19920
20055
|
return g.decisionNo;
|
|
19921
|
-
})), _toConsumableArray__default["default"](allArticleDecisions))));
|
|
20056
|
+
})), _toConsumableArray__default["default"](set.CatalogData.serieDecisionRefs), _toConsumableArray__default["default"](allArticleDecisions))));
|
|
19922
20057
|
var toLoadDecisionIds = [];
|
|
19923
20058
|
for (var _i = 0; _i < neededDecisionsIds.length; _i++) {
|
|
19924
20059
|
var found = set.CatalogData.getDecisionByNo(neededDecisionsIds[_i]);
|
|
@@ -19981,15 +20116,14 @@ var getPriceFeatureGroups = function getPriceFeatureGroups(catalogArticleDatas,
|
|
|
19981
20116
|
};
|
|
19982
20117
|
var initializeDecision = function initializeDecision(decision, idmOptionGroups) {
|
|
19983
20118
|
var _decision$optionCombi;
|
|
20119
|
+
// optionCombinations already arrive sorted by sequence from the backend.
|
|
19984
20120
|
var optionCombinations = (_decision$optionCombi = decision.optionCombinations) === null || _decision$optionCombi === void 0 ? void 0 : _decision$optionCombi.map(function (c) {
|
|
19985
20121
|
return _objectSpread$p(_objectSpread$p({}, c), {}, {
|
|
19986
20122
|
projectOptionsSetRefs: parseOptionSetRef(c.projectOptionsSetRefs, idmOptionGroups)
|
|
19987
20123
|
});
|
|
19988
20124
|
});
|
|
19989
20125
|
return _objectSpread$p(_objectSpread$p({}, decision), {}, {
|
|
19990
|
-
optionCombinations: optionCombinations
|
|
19991
|
-
return a.sequence - b.sequence;
|
|
19992
|
-
})
|
|
20126
|
+
optionCombinations: optionCombinations
|
|
19993
20127
|
});
|
|
19994
20128
|
};
|
|
19995
20129
|
var initializePriceFeatureGroups = function initializePriceFeatureGroups(priceFeatureGroup, idmOptionGroups) {
|
|
@@ -20088,7 +20222,7 @@ var initFeature = function initFeature(feature, catalogArticleData, set) {
|
|
|
20088
20222
|
catalogArticleData.articleOptions[newArticleFeature.codex] = newArticleFeature;
|
|
20089
20223
|
};
|
|
20090
20224
|
function getCatalogFeatureType(feature, catalogArticleData, set) {
|
|
20091
|
-
var _set$CatalogData$cata, _set$CatalogData$cata2, _set$CatalogData$cata3, _feature$detailInfos,
|
|
20225
|
+
var _set$CatalogData$cata, _set$CatalogData$cata2, _set$CatalogData$cata3, _feature$detailInfos, _optionMask$hidden;
|
|
20092
20226
|
var featureClass = set.CatalogData.getFeatureClass(catalogArticleData.featureClassRefNo);
|
|
20093
20227
|
var optionMask = (_set$CatalogData$cata = set.CatalogData.catalogMask) === null || _set$CatalogData$cata === void 0 || (_set$CatalogData$cata = _set$CatalogData$cata.options) === null || _set$CatalogData$cata === void 0 ? void 0 : _set$CatalogData$cata[feature.featureNo];
|
|
20094
20228
|
var maskProperties = getPropertiesForFeatureNo((_set$CatalogData$cata2 = (_set$CatalogData$cata3 = set.CatalogData.catalogMask) === null || _set$CatalogData$cata3 === void 0 ? void 0 : _set$CatalogData$cata3.properties) !== null && _set$CatalogData$cata2 !== void 0 ? _set$CatalogData$cata2 : [], undefined, feature.featureNo, set.CatalogData.api.getLanguage());
|
|
@@ -20105,17 +20239,9 @@ function getCatalogFeatureType(feature, catalogArticleData, set) {
|
|
|
20105
20239
|
headerPosVariationType: feature.headerPosVariationType,
|
|
20106
20240
|
measureKey: feature.measureParameter,
|
|
20107
20241
|
sequenceNo: feature.sequenceNo,
|
|
20108
|
-
sendToPIM:
|
|
20109
|
-
|
|
20110
|
-
|
|
20111
|
-
isMultiselect: !!(properties !== null && properties !== void 0 && (_properties$find2 = properties.find(function (p) {
|
|
20112
|
-
return p.Codex == 'Multiselect';
|
|
20113
|
-
})) !== null && _properties$find2 !== void 0 && _properties$find2.Value),
|
|
20114
|
-
layout: (_ref = properties === null || properties === void 0 || (_properties$find3 = properties.find(function (p) {
|
|
20115
|
-
return p.Codex == 'LAYOUT';
|
|
20116
|
-
})) === null || _properties$find3 === void 0 ? void 0 : _properties$find3.Value) !== null && _ref !== void 0 ? _ref : (_feature$options$ = feature.options[0]) !== null && _feature$options$ !== void 0 && (_feature$options$ = _feature$options$.detailInfos) !== null && _feature$options$ !== void 0 && _feature$options$.find(function (d) {
|
|
20117
|
-
return d.functionType == 'OPV';
|
|
20118
|
-
}) ? 'IMAGE' : 'TEXT',
|
|
20242
|
+
sendToPIM: feature.sendToPim,
|
|
20243
|
+
isMultiselect: feature.isMultiselect,
|
|
20244
|
+
layout: feature.layout,
|
|
20119
20245
|
invisible: (_optionMask$hidden = optionMask === null || optionMask === void 0 ? void 0 : optionMask.hidden) !== null && _optionMask$hidden !== void 0 ? _optionMask$hidden : !!(featureClass !== null && featureClass !== void 0 && featureClass.featureRefs[feature.featureNo]),
|
|
20120
20246
|
property: properties,
|
|
20121
20247
|
propertyObj: {}
|
|
@@ -20179,12 +20305,9 @@ function getCatalogOptionType(option, set) {
|
|
|
20179
20305
|
origName: name,
|
|
20180
20306
|
name_locales: option.optionText,
|
|
20181
20307
|
property: properties,
|
|
20182
|
-
|
|
20183
|
-
|
|
20184
|
-
|
|
20185
|
-
images: (_option$detailInfos2 = option.detailInfos) === null || _option$detailInfos2 === void 0 || (_option$detailInfos2 = _option$detailInfos2.filter(function (d) {
|
|
20186
|
-
return d.functionType == 'OPV';
|
|
20187
|
-
})) === null || _option$detailInfos2 === void 0 ? void 0 : _option$detailInfos2.map(function (o) {
|
|
20308
|
+
// detailInfos is already limited to "OPV" entries by the backend.
|
|
20309
|
+
image: getLowResUrl((_option$detailInfos = option.detailInfos) === null || _option$detailInfos === void 0 || (_option$detailInfos = _option$detailInfos[0]) === null || _option$detailInfos === void 0 ? void 0 : _option$detailInfos.url),
|
|
20310
|
+
images: (_option$detailInfos2 = option.detailInfos) === null || _option$detailInfos2 === void 0 ? void 0 : _option$detailInfos2.map(function (o) {
|
|
20188
20311
|
var _getLowResUrl, _option$detailInfoRef, _option$detailInfoRef2;
|
|
20189
20312
|
return {
|
|
20190
20313
|
detailInfoNo: o.detailInfoNo,
|
|
@@ -20194,7 +20317,7 @@ function getCatalogOptionType(option, set) {
|
|
|
20194
20317
|
})) !== null && _option$detailInfoRef !== void 0 ? _option$detailInfoRef : []
|
|
20195
20318
|
};
|
|
20196
20319
|
}),
|
|
20197
|
-
hexColor:
|
|
20320
|
+
hexColor: option.materialColorHex,
|
|
20198
20321
|
description: DivaUtils__default["default"].getLocals(option.optionCommentText, set.api.getLanguageLowercase()),
|
|
20199
20322
|
description_locales: option.optionCommentText,
|
|
20200
20323
|
isTexture: false,
|
|
@@ -20265,20 +20388,12 @@ function getArticleOption(set, option, catalogOption, feature, catalogArticleDat
|
|
|
20265
20388
|
};
|
|
20266
20389
|
return opv;
|
|
20267
20390
|
}
|
|
20268
|
-
function componentToHex(c) {
|
|
20269
|
-
var hex = c.toString(16);
|
|
20270
|
-
return hex.length == 1 ? '0' + hex : hex;
|
|
20271
|
-
}
|
|
20272
|
-
function rgbToHex(r, g, b) {
|
|
20273
|
-
if (r === undefined || g === undefined || b === undefined) return undefined;
|
|
20274
|
-
return '#' + componentToHex(r) + componentToHex(g) + componentToHex(b);
|
|
20275
|
-
}
|
|
20276
20391
|
|
|
20277
20392
|
function ownKeys$o(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20278
20393
|
function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$o(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$o(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20279
20394
|
var LOG$k = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
20280
20395
|
function initIDMCatalogData(serie, orderSet, api) {
|
|
20281
|
-
var _serie$decisions, _serie$decisions2;
|
|
20396
|
+
var _serie$decisions, _serie$decisions2, _serie$decisionRefs;
|
|
20282
20397
|
var catalog = serie.catalogData;
|
|
20283
20398
|
var catalogData = {
|
|
20284
20399
|
accountGuid: orderSet.AccountGUID,
|
|
@@ -20304,6 +20419,7 @@ function initIDMCatalogData(serie, orderSet, api) {
|
|
|
20304
20419
|
loadedDecisions: _toConsumableArray__default["default"](((_serie$decisions2 = serie.decisions) !== null && _serie$decisions2 !== void 0 ? _serie$decisions2 : []).map(function (d) {
|
|
20305
20420
|
return initializeDecision(d, catalog.optionGroups);
|
|
20306
20421
|
})),
|
|
20422
|
+
serieDecisionRefs: (_serie$decisionRefs = serie.decisionRefs) !== null && _serie$decisionRefs !== void 0 ? _serie$decisionRefs : [],
|
|
20307
20423
|
//TODO zu klären mit Philipp
|
|
20308
20424
|
//brandName: '',
|
|
20309
20425
|
//additionalCatalogPrice: json.AdditionalCatalogPrice,
|
|
@@ -20343,9 +20459,12 @@ function initIDMArticles(jsonItems, catalogData) {
|
|
|
20343
20459
|
}
|
|
20344
20460
|
}
|
|
20345
20461
|
function getCatalogArticle(article, catalogData) {
|
|
20346
|
-
var _catalogData$catalogM, _article$typeKey, _article$salesNumber,
|
|
20462
|
+
var _catalogData$catalogM, _article$typeKey, _article$salesNumber, _articleMask$name, _articleMask$properti, _article$depthBasicSh, _article$depthBasicSh2, _article$depthBasicSh3, _article$widthBasicSh, _article$widthBasicSh2, _article$widthBasicSh3, _article$heightBasicS, _article$heightBasicS2, _article$heightBasicS3, _article$weightNetto, _article$detailInfos, _article$detailInfos2, _article$detailInfos3, _articleMask$groupnam, _articleMask$groupnam2;
|
|
20347
20463
|
var articleMask = (_catalogData$catalogM = catalogData.catalogMask) === null || _catalogData$catalogM === void 0 || (_catalogData$catalogM = _catalogData$catalogM.articles) === null || _catalogData$catalogM === void 0 ? void 0 : _catalogData$catalogM[article.typeNo];
|
|
20348
20464
|
var lang = catalogData.api.getLanguageLowercase();
|
|
20465
|
+
// empty locale objects ({} or only empty strings) are truthy, so ?? alone doesn't fall back
|
|
20466
|
+
var fullText = hasLocaleText(article.fullText) ? article.fullText : article.shortText;
|
|
20467
|
+
var shortText = hasLocaleText(article.shortText) ? article.shortText : article.fullText;
|
|
20349
20468
|
var featureProperties = convertProperties(article.properties, lang, 'featureNos');
|
|
20350
20469
|
var optionProperties = convertProperties(article.properties, lang, 'optionKeys');
|
|
20351
20470
|
return {
|
|
@@ -20368,14 +20487,14 @@ function getCatalogArticle(article, catalogData) {
|
|
|
20368
20487
|
hasArticleRelations: false,
|
|
20369
20488
|
hasPartlistArticle: !!article.partListRef,
|
|
20370
20489
|
hasType1Dependencies: false,
|
|
20371
|
-
name: DivaUtils__default["default"].getLocals((
|
|
20372
|
-
longDescription: DivaUtils__default["default"].getLocals(
|
|
20373
|
-
longDescription_locales:
|
|
20490
|
+
name: DivaUtils__default["default"].getLocals((_articleMask$name = articleMask === null || articleMask === void 0 ? void 0 : articleMask.name) !== null && _articleMask$name !== void 0 ? _articleMask$name : fullText, lang),
|
|
20491
|
+
longDescription: DivaUtils__default["default"].getLocals(fullText, lang),
|
|
20492
|
+
longDescription_locales: fullText,
|
|
20374
20493
|
isHidden: !!(articleMask !== null && articleMask !== void 0 && articleMask.hidden),
|
|
20375
|
-
origName: DivaUtils__default["default"].getLocals(
|
|
20376
|
-
shortName: DivaUtils__default["default"].getLocals(
|
|
20377
|
-
origShortName: DivaUtils__default["default"].getLocals(
|
|
20378
|
-
shortName_locales:
|
|
20494
|
+
origName: DivaUtils__default["default"].getLocals(fullText, lang),
|
|
20495
|
+
shortName: DivaUtils__default["default"].getLocals(shortText, lang),
|
|
20496
|
+
origShortName: DivaUtils__default["default"].getLocals(shortText, lang),
|
|
20497
|
+
shortName_locales: shortText,
|
|
20379
20498
|
properties: [].concat(_toConsumableArray__default["default"](convertProperties(article.properties, lang)), _toConsumableArray__default["default"]((_articleMask$properti = articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties) !== null && _articleMask$properti !== void 0 ? _articleMask$properti : [])),
|
|
20380
20499
|
optionProperties: optionProperties,
|
|
20381
20500
|
featureProperties: featureProperties,
|
|
@@ -20435,6 +20554,11 @@ function getCatalogArticle(article, catalogData) {
|
|
|
20435
20554
|
modelName3D: jsonArticle.ModelName3D && jsonArticle.ModelName3D != '' ? jsonArticle.ModelName3D : undefined,
|
|
20436
20555
|
*/
|
|
20437
20556
|
|
|
20557
|
+
function hasLocaleText(locales) {
|
|
20558
|
+
return !!locales && Object.values(locales).some(function (v) {
|
|
20559
|
+
return !!(v !== null && v !== void 0 && v.trim());
|
|
20560
|
+
});
|
|
20561
|
+
}
|
|
20438
20562
|
function getLowResUrl(url) {
|
|
20439
20563
|
return url === null || url === void 0 ? void 0 : url.replace('.jpg', '_low.jpg').replace('.jpeg', '_low.jpeg').replace('.png', '_low.png');
|
|
20440
20564
|
}
|
|
@@ -20675,6 +20799,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
20675
20799
|
//
|
|
20676
20800
|
ignoreLayerAVNAVS: false,
|
|
20677
20801
|
//
|
|
20802
|
+
ignoreDockingNumber: false,
|
|
20803
|
+
// ignoriert die Nummern-Regel beim Andocken (z.B. AVU1 darf an AVO2). Die Nummer dient dann nur der Identifikation, nicht als Zuordnungsschlüssel.
|
|
20678
20804
|
checkCollisionForDifferentLayers: [],
|
|
20679
20805
|
//
|
|
20680
20806
|
|
|
@@ -20727,6 +20853,9 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
20727
20853
|
// ergänzt einen Übersetzbaren string am Ende des Names
|
|
20728
20854
|
dontShowAccStep: false,
|
|
20729
20855
|
useTypeNrAsArticleNrEKText: false,
|
|
20856
|
+
hideSubPosArticleCodexEKText: false,
|
|
20857
|
+
addPosInvisibilityToOL: false,
|
|
20858
|
+
// PosInvisibility wird nur in die Orderlines übernommen wenn der MetaTag ADD_POS_INVISIBILITY_TO_OL == 1 ist
|
|
20730
20859
|
addNewLineBeforRuleDesc: false,
|
|
20731
20860
|
// für Kirchner neue zeile im Checkout vor der Klanner und der RuleCes von den Partlistarticles
|
|
20732
20861
|
useEdoArticlesOnOpvs: [],
|
|
@@ -20974,6 +21103,12 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
20974
21103
|
get: function get() {
|
|
20975
21104
|
return this.catalogData.globalDecisions;
|
|
20976
21105
|
}
|
|
21106
|
+
}, {
|
|
21107
|
+
key: "serieDecisionRefs",
|
|
21108
|
+
get: function get() {
|
|
21109
|
+
var _this$catalogData$ser;
|
|
21110
|
+
return (_this$catalogData$ser = this.catalogData.serieDecisionRefs) !== null && _this$catalogData$ser !== void 0 ? _this$catalogData$ser : [];
|
|
21111
|
+
}
|
|
20977
21112
|
}, {
|
|
20978
21113
|
key: "loadedFeatureClasses",
|
|
20979
21114
|
get: function get() {
|
|
@@ -21220,6 +21355,24 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
21220
21355
|
return _ret;
|
|
21221
21356
|
}
|
|
21222
21357
|
}
|
|
21358
|
+
|
|
21359
|
+
/**
|
|
21360
|
+
* Default dock filter applied when nothing is selected (e.g. after a deselect or when adding a new element).
|
|
21361
|
+
* When completeness warnings are hidden, any element may start a planning, so every dock type the catalog
|
|
21362
|
+
* actually has is shown. Otherwise the catalog's configured start filter (startFilterParams / available
|
|
21363
|
+
* start types) is used.
|
|
21364
|
+
*/
|
|
21365
|
+
}, {
|
|
21366
|
+
key: "defaultDockFilter",
|
|
21367
|
+
get: function get() {
|
|
21368
|
+
if (this.doHideCompletenessWarning) {
|
|
21369
|
+
var filterType = this.plannerPaletteViewInfo.filterType;
|
|
21370
|
+
return Object.keys(filterType).filter(function (key) {
|
|
21371
|
+
return filterType[key];
|
|
21372
|
+
});
|
|
21373
|
+
}
|
|
21374
|
+
return this.getStartFilter;
|
|
21375
|
+
}
|
|
21223
21376
|
}, {
|
|
21224
21377
|
key: "dontHideOption",
|
|
21225
21378
|
get: function get() {
|
|
@@ -21418,6 +21571,11 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
21418
21571
|
get: function get() {
|
|
21419
21572
|
return this.catalogProps.useTypeNrAsArticleNrEKText;
|
|
21420
21573
|
}
|
|
21574
|
+
}, {
|
|
21575
|
+
key: "hideSubPosArticleCodexEKText",
|
|
21576
|
+
get: function get() {
|
|
21577
|
+
return this.catalogProps.hideSubPosArticleCodexEKText;
|
|
21578
|
+
}
|
|
21421
21579
|
}, {
|
|
21422
21580
|
key: "hasAlternateRenderings",
|
|
21423
21581
|
get: function get() {
|
|
@@ -21700,6 +21858,11 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
21700
21858
|
get: function get() {
|
|
21701
21859
|
return this.catalogProps.dontShowAccStep;
|
|
21702
21860
|
}
|
|
21861
|
+
}, {
|
|
21862
|
+
key: "addPosInvisibilityToOL",
|
|
21863
|
+
get: function get() {
|
|
21864
|
+
return this.catalogProps.addPosInvisibilityToOL;
|
|
21865
|
+
}
|
|
21703
21866
|
|
|
21704
21867
|
//Planner configurations
|
|
21705
21868
|
}, {
|
|
@@ -21709,6 +21872,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
21709
21872
|
ignoreLayerAVC: this.catalogProps.ignoreLayerAVC,
|
|
21710
21873
|
ignoreLayerAVOAVU: this.catalogProps.ignoreLayerAVOAVU,
|
|
21711
21874
|
ignoreLayerAVNAVS: this.catalogProps.ignoreLayerAVNAVS,
|
|
21875
|
+
ignoreDockingNumber: this.catalogProps.ignoreDockingNumber,
|
|
21712
21876
|
showAccOnDpOnly: this.catalogProps.showAccOnDpOnly,
|
|
21713
21877
|
dockAccOnAvoOnly: this.catalogProps.dockAccOnAvoOnly,
|
|
21714
21878
|
hideAccessoriesInPlanner: this.catalogProps.accessorieStepAsPlanner,
|
|
@@ -21868,6 +22032,9 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
21868
22032
|
case 'IGNORELAYERAVNAVS':
|
|
21869
22033
|
_this4.catalogProps.ignoreLayerAVNAVS = item.Value == '1';
|
|
21870
22034
|
break;
|
|
22035
|
+
case 'IGNOREDOCKINGNUMBER':
|
|
22036
|
+
_this4.catalogProps.ignoreDockingNumber = item.Value == '1';
|
|
22037
|
+
break;
|
|
21871
22038
|
case 'CHECK_COLLISION_DIFFERENT_LAYERS':
|
|
21872
22039
|
_this4.catalogProps.checkCollisionForDifferentLayers = item.Value.split(';').map(function (t) {
|
|
21873
22040
|
return parseInt(t);
|
|
@@ -21986,6 +22153,12 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
21986
22153
|
case 'USE_TYPENR_AS_ARTICLENR_EKTEXT':
|
|
21987
22154
|
_this4.catalogProps.useTypeNrAsArticleNrEKText = '1' == item.Value;
|
|
21988
22155
|
break;
|
|
22156
|
+
case 'HIDE_SUBPOS_ARTICLECODEX_EKTEXT':
|
|
22157
|
+
_this4.catalogProps.hideSubPosArticleCodexEKText = '1' == item.Value;
|
|
22158
|
+
break;
|
|
22159
|
+
case 'ADD_POS_INVISIBILITY_TO_OL':
|
|
22160
|
+
_this4.catalogProps.addPosInvisibilityToOL = '1' == item.Value;
|
|
22161
|
+
break;
|
|
21989
22162
|
case 'ADD_NEW_LINE_BEFOR_RULEDESC':
|
|
21990
22163
|
_this4.catalogProps.addNewLineBeforRuleDesc = '1' == item.Value;
|
|
21991
22164
|
break;
|
|
@@ -22324,11 +22497,12 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
|
|
|
22324
22497
|
key: "loadDivaCatalog",
|
|
22325
22498
|
value: function () {
|
|
22326
22499
|
var _loadDivaCatalog = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(state, catalogCodex, orderSet) {
|
|
22500
|
+
var _orderSet$OrderLines;
|
|
22327
22501
|
var promises, _yield$Promise$all, _yield$Promise$all2, catalogApiData, catalogArticleListData, catalogArticlePlannerListData, additionalModelInfos, mask, _state$catalogMask, catalogData;
|
|
22328
22502
|
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
22329
22503
|
while (1) switch (_context2.prev = _context2.next) {
|
|
22330
22504
|
case 0:
|
|
22331
|
-
promises = [state.api.getDataCache(state.api.getCatalogDataQS(catalogCodex), state.api.getCatalogDataCacheKey(catalogCodex), orderSet.AccountSessionGUID), state.api.getDataCache(state.api.getJsonArticleListQS(catalogCodex), state.api.getJsonArticleListCacheKey(catalogCodex), orderSet.AccountSessionGUID), state.api.getDataCache(state.api.getJsonPlannerElementsQS(catalogCodex), state.api.getJsonPlannerElementsCacheKey(catalogCodex), orderSet.AccountSessionGUID)].concat([this.loadAdditionalModelInfos(state, orderSet.AccountGUID, orderSet.CatalogGUID)], _toConsumableArray__default["default"](state.onlyRunLogic ? [] : _toConsumableArray__default["default"](new Map(orderSet.OrderLines.filter(function (ol) {
|
|
22505
|
+
promises = [state.api.getDataCache(state.api.getCatalogDataQS(catalogCodex), state.api.getCatalogDataCacheKey(catalogCodex), orderSet.AccountSessionGUID), state.api.getDataCache(state.api.getJsonArticleListQS(catalogCodex), state.api.getJsonArticleListCacheKey(catalogCodex), orderSet.AccountSessionGUID), state.api.getDataCache(state.api.getJsonPlannerElementsQS(catalogCodex), state.api.getJsonPlannerElementsCacheKey(catalogCodex), orderSet.AccountSessionGUID)].concat([this.loadAdditionalModelInfos(state, orderSet.AccountGUID, orderSet.CatalogGUID)], _toConsumableArray__default["default"](state.onlyRunLogic ? [] : _toConsumableArray__default["default"](new Map(((_orderSet$OrderLines = orderSet.OrderLines) !== null && _orderSet$OrderLines !== void 0 ? _orderSet$OrderLines : []).filter(function (ol) {
|
|
22332
22506
|
var _ol$VariantBasketData;
|
|
22333
22507
|
return ((_ol$VariantBasketData = ol.VariantBasketDatas) === null || _ol$VariantBasketData === void 0 ? void 0 : _ol$VariantBasketData.length) && ol.ArticleType === 'OPTIONTREE';
|
|
22334
22508
|
}).map(function (os) {
|
|
@@ -22359,7 +22533,8 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
|
|
|
22359
22533
|
break;
|
|
22360
22534
|
}
|
|
22361
22535
|
_context2.next = 16;
|
|
22362
|
-
return state.api.getDataCache(state.api.getCatalogMaskQS(catalogApiData.GUID, state.api.OrganizationId), undefined, undefined, 'enricher'
|
|
22536
|
+
return state.api.getDataCache(state.api.getCatalogMaskQS(catalogApiData.GUID, state.api.OrganizationId), undefined, undefined, 'enricher', undefined, undefined, true // optional call - failure is swallowed below, so don't surface the enricher error modal
|
|
22537
|
+
);
|
|
22363
22538
|
case 16:
|
|
22364
22539
|
mask = _context2.sent;
|
|
22365
22540
|
case 17:
|
|
@@ -23345,7 +23520,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23345
23520
|
var _step3$value = _slicedToArray__default["default"](_step3.value, 2),
|
|
23346
23521
|
opvCodex = _step3$value[0],
|
|
23347
23522
|
tmpOPV = _step3$value[1];
|
|
23348
|
-
if (tmpOPV.hiddenByMask) continue;
|
|
23523
|
+
if (tmpOPV.hiddenByMask || tmpOPV.isHiddenInFeature(OP)) continue;
|
|
23349
23524
|
visibleItems[OP + '#' + opvCodex] = tmpOPV;
|
|
23350
23525
|
if (!ops.getConstructionRulesIsDisablingByOPVCodex(opvCodex)) {
|
|
23351
23526
|
if (setDefaultOPV && setDefaultOPV == opvCodex) {
|
|
@@ -23379,7 +23554,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23379
23554
|
var _step4$value = _slicedToArray__default["default"](_step4.value, 2),
|
|
23380
23555
|
_opvCodex = _step4$value[0],
|
|
23381
23556
|
_tmpOPV = _step4$value[1];
|
|
23382
|
-
if (!_tmpOPV.hiddenByMask && this.checkItemVisibility(_tmpOPV, ops)) {
|
|
23557
|
+
if (!_tmpOPV.hiddenByMask && !_tmpOPV.isHiddenInFeature(OP) && this.checkItemVisibility(_tmpOPV, ops)) {
|
|
23383
23558
|
visibleOptionValues.set(_tmpOPV.codex, _tmpOPV);
|
|
23384
23559
|
visibleItems[OP + '#' + _opvCodex] = _tmpOPV;
|
|
23385
23560
|
if (!ops.getConstructionRulesIsDisablingByOPVCodex(_opvCodex)) {
|
|
@@ -23411,6 +23586,8 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23411
23586
|
this.updateArtOPV(null, OP, ops);
|
|
23412
23587
|
} else {
|
|
23413
23588
|
var myItem = null;
|
|
23589
|
+
// Freetext value inherited from a parent global option (see block below); forwarded to updateArtOPV.
|
|
23590
|
+
var inheritedFreeText = undefined;
|
|
23414
23591
|
|
|
23415
23592
|
//sonst myItem aus dem aktuellen Wert OPV Codex bestimmen
|
|
23416
23593
|
if (myItem == null && ops.val) {
|
|
@@ -23426,7 +23603,11 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23426
23603
|
myItem = null;
|
|
23427
23604
|
}
|
|
23428
23605
|
}
|
|
23429
|
-
|
|
23606
|
+
|
|
23607
|
+
// myItem == null: inherit the parent global option's OPV. ops.isFreeText: also re-sync the
|
|
23608
|
+
// freetext value on every update (the OPV codex alone stays constant for a slider, so without
|
|
23609
|
+
// this the accessoire keeps a stale/fabricated value after a reload).
|
|
23610
|
+
if ((myItem == null || ops.isFreeText) && (this.article.accessoireParentArticle || this.article.partListParentArticle)) {
|
|
23430
23611
|
//Global Option des Parents suchen und ersetzten
|
|
23431
23612
|
var parentGlobalOptions = this.article.getGlobalOptions();
|
|
23432
23613
|
if (parentGlobalOptions) {
|
|
@@ -23440,7 +23621,10 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23440
23621
|
var foundItem = _this.article.checkOptionAndOptionValue(OP, _ops.valCodex);
|
|
23441
23622
|
if ((foundItem === null || foundItem === void 0 ? void 0 : foundItem.opv) instanceof ArticleOptionValueData) {
|
|
23442
23623
|
if (_ops.visibleOptionValues.get(foundItem.opv.codex) || _ops.visibleOptionValues.get(foundItem.opv.parentCodex)) {
|
|
23443
|
-
myItem = foundItem.opv;
|
|
23624
|
+
if (myItem == null) myItem = foundItem.opv;
|
|
23625
|
+
// Freetext options (e.g. width slider) hold their value in the parent's freeText,
|
|
23626
|
+
// not in the OPV codex. Inherit it so the accessoire gets the actual measure.
|
|
23627
|
+
if (foundItem.opv.isFreeText && _ops.freeText != undefined) inheritedFreeText = _ops.freeText;
|
|
23444
23628
|
}
|
|
23445
23629
|
}
|
|
23446
23630
|
}
|
|
@@ -23471,7 +23655,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23471
23655
|
myItem = firstVisibleItem;
|
|
23472
23656
|
}
|
|
23473
23657
|
//jetzt OPV Wert zuweisen
|
|
23474
|
-
this.updateArtOPV(myItem, OP, ops);
|
|
23658
|
+
this.updateArtOPV(myItem, OP, ops, inheritedFreeText);
|
|
23475
23659
|
}
|
|
23476
23660
|
var maxPriceGroup = myOpt.useMaxPriceOfGroup;
|
|
23477
23661
|
if (maxPriceGroup) {
|
|
@@ -23534,45 +23718,19 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23534
23718
|
value: function updateIDMSpecificFeature(ops) {
|
|
23535
23719
|
var _ops$option$idmVarian, _ops$option$idmVarian2, _ops$option$idmVarian3, _ops$option$idmVarian4, _ops$option$idmVarian5;
|
|
23536
23720
|
if (!this.article.parentHasSameOption(ops.optionCodex)) return;
|
|
23721
|
+
var toConnectorCodex = function toConnectorCodex(value) {
|
|
23722
|
+
var prefix = 'OPV' + ops.optionCodex.substring(3) + '_';
|
|
23723
|
+
if (value.codex.startsWith(prefix)) return value.codex.substring(prefix.length);
|
|
23724
|
+
if (value.codex.startsWith('OPV')) return value.codex.substring(3);
|
|
23725
|
+
return value.codex;
|
|
23726
|
+
};
|
|
23537
23727
|
if ([90, 1090].includes((_ops$option$idmVarian = ops.option.idmVariantenArt) !== null && _ops$option$idmVarian !== void 0 ? _ops$option$idmVarian : 0)) {
|
|
23538
23728
|
//R (Anschlusstyp R) - AVR
|
|
23539
|
-
|
|
23540
|
-
visibleOPVs = ops.visibleOptionValues;
|
|
23541
|
-
var _iterator5 = _createForOfIteratorHelper$c(visibleOPVs),
|
|
23542
|
-
_step5;
|
|
23543
|
-
try {
|
|
23544
|
-
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
23545
|
-
var _step5$value = _slicedToArray__default["default"](_step5.value, 2),
|
|
23546
|
-
key = _step5$value[0],
|
|
23547
|
-
value = _step5$value[1];
|
|
23548
|
-
newAVRFilter.push(value.codex.substring(3));
|
|
23549
|
-
}
|
|
23550
|
-
} catch (err) {
|
|
23551
|
-
_iterator5.e(err);
|
|
23552
|
-
} finally {
|
|
23553
|
-
_iterator5.f();
|
|
23554
|
-
}
|
|
23555
|
-
this.article.newPossibleAVRFilters = newAVRFilter;
|
|
23729
|
+
this.article.newPossibleAVRFilters = Array.from(ops.visibleOptionValues.values()).map(toConnectorCodex);
|
|
23556
23730
|
}
|
|
23557
23731
|
if ([89, 1089].includes((_ops$option$idmVarian2 = ops.option.idmVariantenArt) !== null && _ops$option$idmVarian2 !== void 0 ? _ops$option$idmVarian2 : 0)) {
|
|
23558
23732
|
//L (Anschlusstyp L) - AVL
|
|
23559
|
-
|
|
23560
|
-
_visibleOPVs = ops.visibleOptionValues;
|
|
23561
|
-
var _iterator6 = _createForOfIteratorHelper$c(_visibleOPVs),
|
|
23562
|
-
_step6;
|
|
23563
|
-
try {
|
|
23564
|
-
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
23565
|
-
var _step6$value = _slicedToArray__default["default"](_step6.value, 2),
|
|
23566
|
-
_key = _step6$value[0],
|
|
23567
|
-
_value = _step6$value[1];
|
|
23568
|
-
newAVLFilter.push(_value.codex.substring(3));
|
|
23569
|
-
}
|
|
23570
|
-
} catch (err) {
|
|
23571
|
-
_iterator6.e(err);
|
|
23572
|
-
} finally {
|
|
23573
|
-
_iterator6.f();
|
|
23574
|
-
}
|
|
23575
|
-
this.article.newPossibleAVLFilters = newAVLFilter;
|
|
23733
|
+
this.article.newPossibleAVLFilters = Array.from(ops.visibleOptionValues.values()).map(toConnectorCodex);
|
|
23576
23734
|
}
|
|
23577
23735
|
//beim article abspeichern. Das Planungselement kann es sich per Funktion von dort dann holen
|
|
23578
23736
|
if ([97, 1097].includes((_ops$option$idmVarian3 = ops.option.idmVariantenArt) !== null && _ops$option$idmVarian3 !== void 0 ? _ops$option$idmVarian3 : 0)) {
|
|
@@ -23801,18 +23959,18 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23801
23959
|
myDecisions[_i].disableHistory = [];
|
|
23802
23960
|
myDecisions[_i].activeCombination = undefined;
|
|
23803
23961
|
}
|
|
23804
|
-
var
|
|
23805
|
-
|
|
23962
|
+
var _iterator5 = _createForOfIteratorHelper$c(this.article.articleOptionStates.values()),
|
|
23963
|
+
_step5;
|
|
23806
23964
|
try {
|
|
23807
|
-
for (
|
|
23808
|
-
var ops =
|
|
23965
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
23966
|
+
var ops = _step5.value;
|
|
23809
23967
|
ops.updateVisibleOptionValues(ops.option.articleOptionValues);
|
|
23810
23968
|
ops.definedBySetFeatureFixed = false;
|
|
23811
23969
|
}
|
|
23812
23970
|
} catch (err) {
|
|
23813
|
-
|
|
23971
|
+
_iterator5.e(err);
|
|
23814
23972
|
} finally {
|
|
23815
|
-
|
|
23973
|
+
_iterator5.f();
|
|
23816
23974
|
}
|
|
23817
23975
|
this.catalogDecisionsByNumber = new Map(this.article.catalogArticle.articleDecisions.map(function (d) {
|
|
23818
23976
|
return [d.Number, d];
|
|
@@ -23943,11 +24101,11 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23943
24101
|
key: "updateIDMSpecificFeatures",
|
|
23944
24102
|
value: function updateIDMSpecificFeatures() {
|
|
23945
24103
|
//updaten idm planner specific options
|
|
23946
|
-
var
|
|
23947
|
-
|
|
24104
|
+
var _iterator6 = _createForOfIteratorHelper$c(this.article.articleOptionStates.values()),
|
|
24105
|
+
_step6;
|
|
23948
24106
|
try {
|
|
23949
|
-
for (
|
|
23950
|
-
var ops =
|
|
24107
|
+
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
24108
|
+
var ops = _step6.value;
|
|
23951
24109
|
//when an option has no decisions the first visible optionValue has to be selected per default
|
|
23952
24110
|
if (ops.val === undefined && ops.visibleCount && !this.article.CatalogData.useDiomexConfigLogic) {
|
|
23953
24111
|
this.assignOptionValue(ops.optionCodex, ops.visibleOPVKeys[0]);
|
|
@@ -23968,9 +24126,9 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23968
24126
|
}
|
|
23969
24127
|
}
|
|
23970
24128
|
} catch (err) {
|
|
23971
|
-
|
|
24129
|
+
_iterator6.e(err);
|
|
23972
24130
|
} finally {
|
|
23973
|
-
|
|
24131
|
+
_iterator6.f();
|
|
23974
24132
|
}
|
|
23975
24133
|
}
|
|
23976
24134
|
}, {
|
|
@@ -24204,21 +24362,21 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24204
24362
|
var negatedValues = new Set(myDoc.Row[OPT].map(function (v) {
|
|
24205
24363
|
return v.slice(1);
|
|
24206
24364
|
})); // remove the '!' from the value
|
|
24207
|
-
var
|
|
24208
|
-
|
|
24365
|
+
var _iterator7 = _createForOfIteratorHelper$c(ops.visibleOptionValues),
|
|
24366
|
+
_step7;
|
|
24209
24367
|
try {
|
|
24210
|
-
for (
|
|
24211
|
-
var
|
|
24212
|
-
opvKey =
|
|
24213
|
-
_opv =
|
|
24368
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
|
24369
|
+
var _step7$value = _slicedToArray__default["default"](_step7.value, 2),
|
|
24370
|
+
opvKey = _step7$value[0],
|
|
24371
|
+
_opv = _step7$value[1];
|
|
24214
24372
|
if (!negatedValues.has(opvKey)) {
|
|
24215
24373
|
validOPVs[OPT].set(opvKey, _opv);
|
|
24216
24374
|
}
|
|
24217
24375
|
}
|
|
24218
24376
|
} catch (err) {
|
|
24219
|
-
|
|
24377
|
+
_iterator7.e(err);
|
|
24220
24378
|
} finally {
|
|
24221
|
-
|
|
24379
|
+
_iterator7.f();
|
|
24222
24380
|
}
|
|
24223
24381
|
} else {
|
|
24224
24382
|
validOPVs[OPT] = new Map(ops.visibleOptionValues);
|
|
@@ -24346,11 +24504,11 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24346
24504
|
}, {
|
|
24347
24505
|
key: "evalShowOnlyWhenHasPrice",
|
|
24348
24506
|
value: function evalShowOnlyWhenHasPrice() {
|
|
24349
|
-
var
|
|
24350
|
-
|
|
24507
|
+
var _iterator8 = _createForOfIteratorHelper$c(this.article.articleOptionStates.values()),
|
|
24508
|
+
_step8;
|
|
24351
24509
|
try {
|
|
24352
|
-
for (
|
|
24353
|
-
var ops =
|
|
24510
|
+
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
24511
|
+
var ops = _step8.value;
|
|
24354
24512
|
for (var jKey in ops.visibleOptionValues) {
|
|
24355
24513
|
var opv = ops.visibleOptionValues.get(jKey);
|
|
24356
24514
|
if (opv.showOnlyWhenHasPrice && opv.price == 0) {
|
|
@@ -24362,9 +24520,9 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24362
24520
|
}
|
|
24363
24521
|
}
|
|
24364
24522
|
} catch (err) {
|
|
24365
|
-
|
|
24523
|
+
_iterator8.e(err);
|
|
24366
24524
|
} finally {
|
|
24367
|
-
|
|
24525
|
+
_iterator8.f();
|
|
24368
24526
|
}
|
|
24369
24527
|
}
|
|
24370
24528
|
|
|
@@ -24838,12 +24996,12 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24838
24996
|
}
|
|
24839
24997
|
|
|
24840
24998
|
//mengen und größenabhängige Preisberechungn.
|
|
24841
|
-
var
|
|
24842
|
-
|
|
24999
|
+
var _iterator9 = _createForOfIteratorHelper$c(this.article.articleOptionStates.values()),
|
|
25000
|
+
_step9;
|
|
24843
25001
|
try {
|
|
24844
|
-
for (
|
|
25002
|
+
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
24845
25003
|
var _ops$addToMeasure;
|
|
24846
|
-
var ops =
|
|
25004
|
+
var ops = _step9.value;
|
|
24847
25005
|
var OP = ops.optionCodex;
|
|
24848
25006
|
var mUnit = ops.measureUnit;
|
|
24849
25007
|
var pUnit = ops.priceUnit;
|
|
@@ -24926,15 +25084,15 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24926
25084
|
}
|
|
24927
25085
|
//jetzt nochmal prozentuelle Preise mit TargetOption berechnen
|
|
24928
25086
|
} catch (err) {
|
|
24929
|
-
|
|
25087
|
+
_iterator9.e(err);
|
|
24930
25088
|
} finally {
|
|
24931
|
-
|
|
25089
|
+
_iterator9.f();
|
|
24932
25090
|
}
|
|
24933
|
-
var
|
|
24934
|
-
|
|
25091
|
+
var _iterator10 = _createForOfIteratorHelper$c(this.article.articleOptionStates.values()),
|
|
25092
|
+
_step10;
|
|
24935
25093
|
try {
|
|
24936
|
-
for (
|
|
24937
|
-
var _ops4 =
|
|
25094
|
+
for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
|
|
25095
|
+
var _ops4 = _step10.value;
|
|
24938
25096
|
var targetPPGPrefixes = _ops4.targetPPGPrefixes;
|
|
24939
25097
|
if (!targetPPGPrefixes) continue;
|
|
24940
25098
|
var _loop7 = function _loop7() {
|
|
@@ -24954,9 +25112,9 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24954
25112
|
}
|
|
24955
25113
|
}
|
|
24956
25114
|
} catch (err) {
|
|
24957
|
-
|
|
25115
|
+
_iterator10.e(err);
|
|
24958
25116
|
} finally {
|
|
24959
|
-
|
|
25117
|
+
_iterator10.f();
|
|
24960
25118
|
}
|
|
24961
25119
|
for (var _i5 = 0; _i5 < this.article.priceRefs.length; _i5++) {
|
|
24962
25120
|
var basePriceRef = this.article.priceRefs[_i5];
|
|
@@ -24968,19 +25126,19 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24968
25126
|
return item.PPG && item.PPG.split('_')[0] == targetPrefix;
|
|
24969
25127
|
});
|
|
24970
25128
|
if (!priceRef) {
|
|
24971
|
-
var
|
|
24972
|
-
|
|
25129
|
+
var _iterator11 = _createForOfIteratorHelper$c(_this5.article.articleOptionStates.values()),
|
|
25130
|
+
_step11;
|
|
24973
25131
|
try {
|
|
24974
|
-
for (
|
|
24975
|
-
var ops =
|
|
25132
|
+
for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
|
|
25133
|
+
var ops = _step11.value;
|
|
24976
25134
|
if (ops.ppg && ops.ppg.split('_')[0] == targetPrefix) {
|
|
24977
25135
|
myArtOpv = ops;
|
|
24978
25136
|
}
|
|
24979
25137
|
}
|
|
24980
25138
|
} catch (err) {
|
|
24981
|
-
|
|
25139
|
+
_iterator11.e(err);
|
|
24982
25140
|
} finally {
|
|
24983
|
-
|
|
25141
|
+
_iterator11.f();
|
|
24984
25142
|
}
|
|
24985
25143
|
}
|
|
24986
25144
|
|
|
@@ -25006,36 +25164,36 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
25006
25164
|
myArticleBasePrice += priceRef.Price ? DivaUtils__default["default"].decimalAdjust('round', (_priceRef$calcPrice = priceRef.calcPrice) !== null && _priceRef$calcPrice !== void 0 ? _priceRef$calcPrice : priceRef.Price, digits) : 0.0;
|
|
25007
25165
|
}
|
|
25008
25166
|
var articleUsedCalcPrice = myArticleBasePrice;
|
|
25009
|
-
var
|
|
25010
|
-
|
|
25167
|
+
var _iterator12 = _createForOfIteratorHelper$c(this.article.articleOptionStates.values()),
|
|
25168
|
+
_step12;
|
|
25011
25169
|
try {
|
|
25012
|
-
for (
|
|
25013
|
-
var tmpOps =
|
|
25170
|
+
for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
|
|
25171
|
+
var tmpOps = _step12.value;
|
|
25014
25172
|
articleUsedCalcPrice = this.getOptionPrice(articleUsedCalcPrice, tmpOps.option, digits);
|
|
25015
25173
|
}
|
|
25016
25174
|
|
|
25017
25175
|
//jetzt nochmal prozentuelle Preise mit GLOBAL tarbetoption berechnen
|
|
25018
25176
|
/* TODO ABklären mit Franz - ops hat nie die Optionen - targetPPGPrefixes - ich glaube hier sollte article.priceRefs durchlaufen werden. */
|
|
25019
25177
|
} catch (err) {
|
|
25020
|
-
|
|
25178
|
+
_iterator12.e(err);
|
|
25021
25179
|
} finally {
|
|
25022
|
-
|
|
25180
|
+
_iterator12.f();
|
|
25023
25181
|
}
|
|
25024
|
-
var
|
|
25025
|
-
|
|
25182
|
+
var _iterator13 = _createForOfIteratorHelper$c(this.article.articleOptionStates.values()),
|
|
25183
|
+
_step13;
|
|
25026
25184
|
try {
|
|
25027
|
-
for (
|
|
25185
|
+
for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
|
|
25028
25186
|
var _ops5$targetPPGPrefix, _ops5$targetPPGPrefix2;
|
|
25029
|
-
var _ops5 =
|
|
25187
|
+
var _ops5 = _step13.value;
|
|
25030
25188
|
var targetOption = (_ops5$targetPPGPrefix = (_ops5$targetPPGPrefix2 = _ops5.targetPPGPrefixes) === null || _ops5$targetPPGPrefix2 === void 0 ? void 0 : _ops5$targetPPGPrefix2[0]) !== null && _ops5$targetPPGPrefix !== void 0 ? _ops5$targetPPGPrefix : _ops5.targetOption;
|
|
25031
25189
|
if (_ops5.isPercentage && targetOption == 'GLOBAL') {
|
|
25032
25190
|
articleUsedCalcPrice = articleUsedCalcPrice * (1 + _ops5.calcPrice);
|
|
25033
25191
|
}
|
|
25034
25192
|
}
|
|
25035
25193
|
} catch (err) {
|
|
25036
|
-
|
|
25194
|
+
_iterator13.e(err);
|
|
25037
25195
|
} finally {
|
|
25038
|
-
|
|
25196
|
+
_iterator13.f();
|
|
25039
25197
|
}
|
|
25040
25198
|
for (var _i7 = 0; _i7 < this.article.priceRefs.length; _i7++) {
|
|
25041
25199
|
var _priceRef = this.article.priceRefs[_i7];
|
|
@@ -25177,11 +25335,11 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
25177
25335
|
if (a[i].trim() != '') {
|
|
25178
25336
|
var searchOpt = 'OPT' + a[i].trim();
|
|
25179
25337
|
//Optionsbaum des Artikels durchsuchen
|
|
25180
|
-
var
|
|
25181
|
-
|
|
25338
|
+
var _iterator14 = _createForOfIteratorHelper$c(this.article.articleOptionStates.values()),
|
|
25339
|
+
_step14;
|
|
25182
25340
|
try {
|
|
25183
|
-
for (
|
|
25184
|
-
var _ops6 =
|
|
25341
|
+
for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
|
|
25342
|
+
var _ops6 = _step14.value;
|
|
25185
25343
|
if (_ops6.ocd == searchOpt || _ops6.optionCodex == searchOpt) {
|
|
25186
25344
|
if (_ops6 && _ops6.price > 0) {
|
|
25187
25345
|
myPercBasePrice += _ops6.price * _ops6.quantity;
|
|
@@ -25190,9 +25348,9 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
25190
25348
|
}
|
|
25191
25349
|
}
|
|
25192
25350
|
} catch (err) {
|
|
25193
|
-
|
|
25351
|
+
_iterator14.e(err);
|
|
25194
25352
|
} finally {
|
|
25195
|
-
|
|
25353
|
+
_iterator14.f();
|
|
25196
25354
|
}
|
|
25197
25355
|
}
|
|
25198
25356
|
}
|
|
@@ -25238,18 +25396,18 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
25238
25396
|
}
|
|
25239
25397
|
|
|
25240
25398
|
// this functions updates the images of OPVs that depend on rules
|
|
25241
|
-
var
|
|
25242
|
-
|
|
25399
|
+
var _iterator15 = _createForOfIteratorHelper$c(this.article.articleOptionStates.values()),
|
|
25400
|
+
_step15;
|
|
25243
25401
|
try {
|
|
25244
|
-
for (
|
|
25245
|
-
var ops =
|
|
25246
|
-
var
|
|
25247
|
-
|
|
25402
|
+
for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
|
|
25403
|
+
var ops = _step15.value;
|
|
25404
|
+
var _iterator16 = _createForOfIteratorHelper$c(ops.visibleOptionValues),
|
|
25405
|
+
_step16;
|
|
25248
25406
|
try {
|
|
25249
|
-
for (
|
|
25250
|
-
var
|
|
25251
|
-
jKey =
|
|
25252
|
-
opv =
|
|
25407
|
+
for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
|
|
25408
|
+
var _step16$value = _slicedToArray__default["default"](_step16.value, 2),
|
|
25409
|
+
jKey = _step16$value[0],
|
|
25410
|
+
opv = _step16$value[1];
|
|
25253
25411
|
if (opv.images) {
|
|
25254
25412
|
var imageFound = false;
|
|
25255
25413
|
for (var _i10 = 0; _i10 < opv.images.length; _i10++) {
|
|
@@ -25268,18 +25426,18 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
25268
25426
|
}
|
|
25269
25427
|
}
|
|
25270
25428
|
} catch (err) {
|
|
25271
|
-
|
|
25429
|
+
_iterator16.e(err);
|
|
25272
25430
|
} finally {
|
|
25273
|
-
|
|
25431
|
+
_iterator16.f();
|
|
25274
25432
|
}
|
|
25275
25433
|
}
|
|
25276
25434
|
|
|
25277
25435
|
// this function calculates an Svg to the current configuration if neccessary (SVG Tausch)
|
|
25278
25436
|
// if the Article has no SVG Tausch nothing is done
|
|
25279
25437
|
} catch (err) {
|
|
25280
|
-
|
|
25438
|
+
_iterator15.e(err);
|
|
25281
25439
|
} finally {
|
|
25282
|
-
|
|
25440
|
+
_iterator15.f();
|
|
25283
25441
|
}
|
|
25284
25442
|
var newSVGFile = null;
|
|
25285
25443
|
var svgChangedViaSvgTausch = false;
|
|
@@ -25910,7 +26068,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25910
26068
|
} else if (!_ops4.valCodex) {
|
|
25911
26069
|
LOG$g.warn('evalSetFeature(featureRef) decision ' + decision.decisionNo + ': referenced source feature ' + action.featureRef.featureNo + ' has no selected value (valCodex undefined) - target feature ' + action.featureNo + ' will NOT be set (price relevant)');
|
|
25912
26070
|
} else if (!targetHasSourceValue) {
|
|
25913
|
-
LOG$g.warn('evalSetFeature(featureRef) decision ' + decision.decisionNo + ': target feature ' + action.featureNo +
|
|
26071
|
+
LOG$g.warn('evalSetFeature(featureRef) decision ' + decision.decisionNo + ': target feature ' + action.featureNo + ' does not have source feature ' + action.featureRef.featureNo + "'s value '" + _ops4.valCodex + "' among its visible option values - assignOptionValue will be a no-op (price relevant). Target visible values: " + (targetOps ? Array.from(targetOps.visibleOptionValues.keys()).join(', ') : '<no target>'));
|
|
25914
26072
|
}
|
|
25915
26073
|
if (_ops4 !== null && _ops4 !== void 0 && _ops4.valCodex) this.assignOptionValue(action.featureNo.toString(), _ops4.valCodex, isFixed ? 'fix' : 'set');
|
|
25916
26074
|
} else if (action.optionRef) {
|
|
@@ -26008,7 +26166,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26008
26166
|
this.logPrice(priceFeatureGroup, index);
|
|
26009
26167
|
if (index !== undefined) {
|
|
26010
26168
|
var _this$article$catalog, _this$article$catalog4, _priceFeatureGroup$fe, _priceFeatureGroup$fe2;
|
|
26011
|
-
var matichingFinish = priceFeatureGroup.
|
|
26169
|
+
var matichingFinish = priceFeatureGroup.projectFinishes[index];
|
|
26012
26170
|
var priceKey = 'PRFG' + priceFeatureGroup.priceFeatureGroupNo + '_' + matichingFinish.supplierPriceGroup;
|
|
26013
26171
|
if (((_this$article$catalog = this.article.catalogArticle.idmPrices) === null || _this$article$catalog === void 0 ? void 0 : _this$article$catalog.prices[priceKey]) === undefined) {
|
|
26014
26172
|
var _this$article$catalog2, _this$article$catalog3;
|
|
@@ -26363,7 +26521,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26363
26521
|
_loop7(i);
|
|
26364
26522
|
}
|
|
26365
26523
|
if (quanitity >= 1) {
|
|
26366
|
-
var _catalogCodex$toStrin,
|
|
26524
|
+
var _catalogCodex$toStrin, _ref9;
|
|
26367
26525
|
partlistArticlesToLoad.push({
|
|
26368
26526
|
CatalogCodex: (_catalogCodex$toStrin = catalogCodex.toString()) !== null && _catalogCodex$toStrin !== void 0 ? _catalogCodex$toStrin : this.article.catalogCodex,
|
|
26369
26527
|
BasketID: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.basketId,
|
|
@@ -26380,7 +26538,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26380
26538
|
VariantValues: this.article.variantValuesForPla(myPartListPos.configurationMode, previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantValues, newConfigValues),
|
|
26381
26539
|
VariantItemData: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantItemData,
|
|
26382
26540
|
optionsForPrint: featuresForPrint,
|
|
26383
|
-
RetailArticleNr:
|
|
26541
|
+
RetailArticleNr: myPartListPos.retailArticleNr && myPartListPos.retailArticleNr !== '' ? myPartListPos.retailArticleNr : undefined,
|
|
26384
26542
|
RetailPrefix: (_ref9 = myPartListPos.retailPrefix) !== null && _ref9 !== void 0 ? _ref9 : undefined
|
|
26385
26543
|
//SupplierOrderCodex: // TODO WWS IDM ,myPartListPos.SupplierOrderCodex,
|
|
26386
26544
|
|
|
@@ -26506,13 +26664,16 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
26506
26664
|
value: function updateIDMSpecificFeature(myArtOPS) {
|
|
26507
26665
|
var _myArtOPS$option$idmV, _myArtOPS$option$idmV2, _myArtOPS$option$idmV3, _myArtOPS$option$idmV4, _myArtOPS$option$idmV5;
|
|
26508
26666
|
if (!this.article.parentHasSameOption(myArtOPS.optionCodex)) return;
|
|
26667
|
+
var toConnectorCodex = function toConnectorCodex(key) {
|
|
26668
|
+
return key.startsWith(myArtOPS.optionCodex + '_') ? key.substring(myArtOPS.optionCodex.length + 1) : key;
|
|
26669
|
+
};
|
|
26509
26670
|
if ([90, 1090].includes((_myArtOPS$option$idmV = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV !== void 0 ? _myArtOPS$option$idmV : 0)) {
|
|
26510
26671
|
//R (Anschlusstyp R) - AVR
|
|
26511
|
-
this.article.newPossibleAVRFilters = myArtOPS.visibleOPVKeys;
|
|
26672
|
+
this.article.newPossibleAVRFilters = myArtOPS.visibleOPVKeys.map(toConnectorCodex);
|
|
26512
26673
|
}
|
|
26513
26674
|
if ([89, 1089].includes((_myArtOPS$option$idmV2 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV2 !== void 0 ? _myArtOPS$option$idmV2 : 0)) {
|
|
26514
26675
|
//L (Anschlusstyp L) - AVL
|
|
26515
|
-
this.article.newPossibleAVLFilters = myArtOPS.visibleOPVKeys;
|
|
26676
|
+
this.article.newPossibleAVLFilters = myArtOPS.visibleOPVKeys.map(toConnectorCodex);
|
|
26516
26677
|
}
|
|
26517
26678
|
if ([97, 1097].includes((_myArtOPS$option$idmV3 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV3 !== void 0 ? _myArtOPS$option$idmV3 : 0)) {
|
|
26518
26679
|
try {
|
|
@@ -26876,6 +27037,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26876
27037
|
partlistDecisionNo: initParams.partlistDecisionNo,
|
|
26877
27038
|
partListParentArticle: initParams.parentArticle,
|
|
26878
27039
|
partlistArticleVisibleInTree: initParams.partlistArticleVisibleInTree,
|
|
27040
|
+
posInvisibility: initParams.posInvisibility,
|
|
26879
27041
|
partlistArticleStandalone: initParams.partlistArticleStandalone,
|
|
26880
27042
|
partlistGroupPrefix: initParams.partlistGroupPrefix,
|
|
26881
27043
|
hasPartlistArticle: initParams.hasPartlistArticle ? initParams.hasPartlistArticle : false,
|
|
@@ -27028,6 +27190,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27028
27190
|
get: function get() {
|
|
27029
27191
|
return this.article.partlistArticleVisibleInTree && this.hasOptionsThatParentDoesNotHave;
|
|
27030
27192
|
}
|
|
27193
|
+
}, {
|
|
27194
|
+
key: "posInvisibility",
|
|
27195
|
+
get: function get() {
|
|
27196
|
+
return this.article.posInvisibility;
|
|
27197
|
+
}
|
|
27031
27198
|
}, {
|
|
27032
27199
|
key: "partlistArticleStandalone",
|
|
27033
27200
|
get: function get() {
|
|
@@ -27951,6 +28118,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27951
28118
|
get: function get() {
|
|
27952
28119
|
return this.catalogArticle.bundleRules;
|
|
27953
28120
|
}
|
|
28121
|
+
}, {
|
|
28122
|
+
key: "addAsZKAT",
|
|
28123
|
+
get: function get() {
|
|
28124
|
+
return this.catalogArticle.addAsZKAT;
|
|
28125
|
+
}
|
|
27954
28126
|
}, {
|
|
27955
28127
|
key: "hasPartlistArticleVisibleInTree",
|
|
27956
28128
|
get: function get() {
|
|
@@ -29555,7 +29727,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
29555
29727
|
break;
|
|
29556
29728
|
}
|
|
29557
29729
|
_context.next = 4;
|
|
29558
|
-
return Promise.resolve().then(function () { return require('./ShelfPlanner-
|
|
29730
|
+
return Promise.resolve().then(function () { return require('./ShelfPlanner-9323783f.js'); });
|
|
29559
29731
|
case 4:
|
|
29560
29732
|
_yield$import = _context.sent;
|
|
29561
29733
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -29828,7 +30000,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
29828
30000
|
var opv;
|
|
29829
30001
|
var opt;
|
|
29830
30002
|
if (ops.val) {
|
|
29831
|
-
var _ops$option$ocd, _ops$option$ocd2, _ops$val$ocd3;
|
|
30003
|
+
var _ops$option$ocd, _ops$option$ocd2, _ops$val$ocd3, _ops$val$properties;
|
|
29832
30004
|
opt = (this.CatalogData.isIDMFormat ? 'OPT' : '') + ((_ops$option$ocd = ops.option.ocd) !== null && _ops$option$ocd !== void 0 ? _ops$option$ocd : ops.optionCodex);
|
|
29833
30005
|
opv = (this.CatalogData.isIDMFormat ? 'OPV' + ((_ops$option$ocd2 = ops.option.ocd) !== null && _ops$option$ocd2 !== void 0 ? _ops$option$ocd2 : ops.optionCodex) + '_' : '') + ((_ops$val$ocd3 = ops.val.ocd) !== null && _ops$val$ocd3 !== void 0 ? _ops$val$ocd3 : ops.val.codex);
|
|
29834
30006
|
if (this.CatalogData.isIDM3DCat && ops.val.vCodex) opv = 'OPV' + ops.idmVariantenArt + '_' + ops.val.vCodex;
|
|
@@ -29844,14 +30016,26 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
29844
30016
|
OPV: ops.freeText
|
|
29845
30017
|
});
|
|
29846
30018
|
}
|
|
29847
|
-
|
|
30019
|
+
var divaDataEngineMat = (_ops$val$properties = ops.val.properties) === null || _ops$val$properties === void 0 ? void 0 : _ops$val$properties.find(function (prop) {
|
|
30020
|
+
return prop.Codex == "TEXTURENAME";
|
|
30021
|
+
});
|
|
30022
|
+
if (!ret.MAT) {
|
|
30023
|
+
ret.MAT = [];
|
|
30024
|
+
}
|
|
30025
|
+
if (divaDataEngineMat) {
|
|
29848
30026
|
var _ops$val$name;
|
|
29849
|
-
if (!ret.MAT) {
|
|
29850
|
-
ret.MAT = [];
|
|
29851
|
-
}
|
|
29852
30027
|
ret.MAT.push({
|
|
29853
30028
|
OPT: partlistPrefix ? 'OPT' + partlistPrefix + opt.substring(3) : opt,
|
|
29854
30029
|
N: DivaUtils__default["default"].removeSpecialChars((_ops$val$name = ops.val.name) !== null && _ops$val$name !== void 0 ? _ops$val$name : ''),
|
|
30030
|
+
T: divaDataEngineMat.Name,
|
|
30031
|
+
M: divaDataEngineMat.Value
|
|
30032
|
+
});
|
|
30033
|
+
}
|
|
30034
|
+
if (ops.val.isTexture) {
|
|
30035
|
+
var _ops$val$name2;
|
|
30036
|
+
ret.MAT.push({
|
|
30037
|
+
OPT: partlistPrefix ? 'OPT' + partlistPrefix + opt.substring(3) : opt,
|
|
30038
|
+
N: DivaUtils__default["default"].removeSpecialChars((_ops$val$name2 = ops.val.name) !== null && _ops$val$name2 !== void 0 ? _ops$val$name2 : ''),
|
|
29855
30039
|
T: ops.val.textureName,
|
|
29856
30040
|
M: ops.val.material
|
|
29857
30041
|
});
|
|
@@ -31341,6 +31525,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
31341
31525
|
supplierOrderCodex: doLoadItem.SupplierOrderCodex,
|
|
31342
31526
|
initDecisions: doLoadItem.initDecisions,
|
|
31343
31527
|
partlistArticleVisibleInTree: doLoadItem.PosInvisibility === 0,
|
|
31528
|
+
posInvisibility: doLoadItem.PosInvisibility,
|
|
31344
31529
|
partlistArticleStandalone: doLoadItem.ConfigurationMode,
|
|
31345
31530
|
partlistGroupPrefix: doLoadItem.partlistGroupPrefix,
|
|
31346
31531
|
optionsForPrint: doLoadItem.optionsForPrint,
|
|
@@ -31723,6 +31908,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
31723
31908
|
ArticleCodex: article.articleCodex,
|
|
31724
31909
|
ConfigArticleCodex: article.configArticleCodex,
|
|
31725
31910
|
UseTypeNrAsArticleNrEKText: catalogData.useTypeNrAsArticleNrEKText,
|
|
31911
|
+
HideSubPosArticleCodexEKText: catalogData.hideSubPosArticleCodexEKText,
|
|
31726
31912
|
TypeNr: article.typeNr,
|
|
31727
31913
|
ArticleEAN: article.articleEAN,
|
|
31728
31914
|
ArticleGUID: article.articleGUID,
|
|
@@ -31762,6 +31948,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
31762
31948
|
IsPlannerElement: article.hasCatalogPlannerArticle,
|
|
31763
31949
|
HasPartlistArticle: article.hasPartlistArticle,
|
|
31764
31950
|
PartlistArticleInvisibility: !article.partlistArticleVisibleInTree && !article.optionsForPrint && !article.partlistArticleStandalone,
|
|
31951
|
+
PosInvisibility: catalogData.addPosInvisibilityToOL ? article.posInvisibility : undefined,
|
|
31765
31952
|
SendToSAP: article.sendToSap,
|
|
31766
31953
|
ShelfPlandata: article.shelfPlanner ? DivaUtils__default["default"].encodeBasketJson((_article$shelfPlanner3 = (_article$shelfPlanner4 = article.shelfPlanner) === null || _article$shelfPlanner4 === void 0 ? void 0 : _article$shelfPlanner4.generateShelfPlandata()) !== null && _article$shelfPlanner3 !== void 0 ? _article$shelfPlanner3 : (_article$doorPlanner = article.doorPlanner) === null || _article$doorPlanner === void 0 ? void 0 : _article$doorPlanner.getMovedData(article.basketId)) : undefined,
|
|
31767
31954
|
MetaData: !hasFavorites ? article.MetaData : undefined,
|
|
@@ -34764,7 +34951,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
34764
34951
|
if (targetArticle[opt] && !variantValues[opt]) variantValues[opt] = targetArticle[opt];
|
|
34765
34952
|
}
|
|
34766
34953
|
}
|
|
34767
|
-
configVariant = new basketModel.ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils__default["default"].encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$g(_objectSpread$g({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set, dimensions), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils__default["default"].stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
|
|
34954
|
+
configVariant = new basketModel.ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils__default["default"].encodeBase64(set.plannerHandler.getProject3D(set.getSetId()), set.CatalogData.isIDM3DCat), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$g(_objectSpread$g({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData), set.CatalogData.isIDM3DCat) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set, dimensions), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils__default["default"].stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
|
|
34768
34955
|
set.basketConfigVariants.push(configVariant);
|
|
34769
34956
|
case 32:
|
|
34770
34957
|
case "end":
|
|
@@ -35216,8 +35403,9 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
35216
35403
|
}
|
|
35217
35404
|
var configInAccessoire = set.configAccessoiresInAccessoireStep;
|
|
35218
35405
|
var configInAccessoireAndTree = set.CatalogData.configAccessoires && !article.isShelfAccessoire;
|
|
35406
|
+
var isRelatedAccessoire = !!article.relatedToBasketId && !(article.isPartListArticle && article.partlistArticleVisibleInTree);
|
|
35219
35407
|
//give this step a unique key so it is not merged with any option of te main article
|
|
35220
|
-
if (configInAccessoire &&
|
|
35408
|
+
if (configInAccessoire && isRelatedAccessoire) {
|
|
35221
35409
|
if (configInAccessoireAndTree) {
|
|
35222
35410
|
//remember old configStepKey to push basketId to its targetArticles anyways
|
|
35223
35411
|
mainConfigStepKey = configStepKey;
|
|
@@ -35226,7 +35414,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
35226
35414
|
}
|
|
35227
35415
|
var plaBasketIds = Object.keys(articles[basketId].getRecursivePartlistArticles(true, true));
|
|
35228
35416
|
var singleOPVOnly = ops.visibleCount == 1 && !ops.isFreeText && !set.CatalogData.dontHideOption.includes(ops.option.codex) && !((_set$ViewConfig4 = set.ViewConfig) !== null && _set$ViewConfig4 !== void 0 && _set$ViewConfig4.showSingleOPVOnly);
|
|
35229
|
-
var isAccessoire =
|
|
35417
|
+
var isAccessoire = isRelatedAccessoire ? article.articleCodex : false;
|
|
35230
35418
|
if (!configTree.getTabGroupByCodex(tabGroupCodex)) {
|
|
35231
35419
|
var newTabGroup = this.createTabGroup(tabGroupCodex, tabGroupTitel, 'OPTION', configTree);
|
|
35232
35420
|
configTree.addTabGroup(tabGroupCodex, newTabGroup);
|
|
@@ -36063,7 +36251,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
36063
36251
|
if (!selectedVals.find(function (opv) {
|
|
36064
36252
|
var _myConfigItems$get, _myConfigItems$get2;
|
|
36065
36253
|
return opv == item.codex || ((_myConfigItems$get = myConfigItems.get(opv)) === null || _myConfigItems$get === void 0 ? void 0 : _myConfigItems$get.ocd) && ((_myConfigItems$get2 = myConfigItems.get(opv)) === null || _myConfigItems$get2 === void 0 ? void 0 : _myConfigItems$get2.ocd) === item.codex;
|
|
36066
|
-
}) && (ops.definedBySetFeatureFixed || item.hiddenByMask)) return 1; // continue
|
|
36254
|
+
}) && (ops.definedBySetFeatureFixed || item.hiddenByMask || item.isHiddenInFeature(ops.optionCodex))) return 1; // continue
|
|
36067
36255
|
var image = item.image ? set.CatalogData.getCatImageURL(item.image, '_gal') : '';
|
|
36068
36256
|
var zoomImage = undefined;
|
|
36069
36257
|
if (item.zoomImage && item.isTexture) {
|
|
@@ -37577,7 +37765,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
37577
37765
|
break;
|
|
37578
37766
|
}
|
|
37579
37767
|
_context5.next = 3;
|
|
37580
|
-
return Promise.resolve().then(function () { return require('./DoorPlanner-
|
|
37768
|
+
return Promise.resolve().then(function () { return require('./DoorPlanner-66d87428.js'); });
|
|
37581
37769
|
case 3:
|
|
37582
37770
|
_yield$import = _context5.sent;
|
|
37583
37771
|
DoorPlanner = _yield$import["default"];
|
|
@@ -39103,7 +39291,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
39103
39291
|
}
|
|
39104
39292
|
}
|
|
39105
39293
|
if (!(from !== 'toDeleteShelf')) {
|
|
39106
|
-
_context14.next =
|
|
39294
|
+
_context14.next = 16;
|
|
39107
39295
|
break;
|
|
39108
39296
|
}
|
|
39109
39297
|
set.addArticle(newArticle);
|
|
@@ -39111,7 +39299,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
39111
39299
|
return articleHandlerInstance.toDoAfterArticleLoaded(newArticle, defaultHeaderValues, {}, from, undefined, ignorePlanner);
|
|
39112
39300
|
case 15:
|
|
39113
39301
|
if (newArticle.relatedToBasketId) {
|
|
39114
|
-
LOG$9.businessEvent('onClickAccesorie', 'Planner', '
|
|
39302
|
+
LOG$9.businessEvent('onClickAccesorie', 'Planner', 'Accessoire wurde geplant', {
|
|
39115
39303
|
article: {
|
|
39116
39304
|
articleCodex: articleCodex,
|
|
39117
39305
|
articleName: newArticle.name
|
|
@@ -39125,6 +39313,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
39125
39313
|
}
|
|
39126
39314
|
});
|
|
39127
39315
|
}
|
|
39316
|
+
case 16:
|
|
39128
39317
|
return _context14.abrupt("return", newArticle);
|
|
39129
39318
|
case 17:
|
|
39130
39319
|
case "end":
|
|
@@ -41140,7 +41329,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
41140
41329
|
break;
|
|
41141
41330
|
case 32:
|
|
41142
41331
|
//fill diva3DProject for renderings & AR Converter
|
|
41143
|
-
basketData.Diva3DProject = DivaUtils__default["default"].encodeBase64(set === null || set === void 0 ? void 0 : set.plannerHandler.getProject3D());
|
|
41332
|
+
basketData.Diva3DProject = DivaUtils__default["default"].encodeBase64(set === null || set === void 0 ? void 0 : set.plannerHandler.getProject3D(), set === null || set === void 0 ? void 0 : set.CatalogData.isIDM3DCat);
|
|
41144
41333
|
i = 0;
|
|
41145
41334
|
case 34:
|
|
41146
41335
|
if (!(i < ((_basketData$OrderSets = basketData.OrderSets) === null || _basketData$OrderSets === void 0 ? void 0 : _basketData$OrderSets.length))) {
|
|
@@ -41601,7 +41790,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
41601
41790
|
FavoriteAiRoomKeys: set.getAiImagesAsJpg().map(function (img) {
|
|
41602
41791
|
return img.promptId;
|
|
41603
41792
|
}),
|
|
41604
|
-
SetPlanData: plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData)) : '',
|
|
41793
|
+
SetPlanData: plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData), catalogData.isIDM3DCat) : '',
|
|
41605
41794
|
SetID: set.getSetId(),
|
|
41606
41795
|
SetName: set.setName,
|
|
41607
41796
|
SetName_locales: set.setName_locales,
|
|
@@ -43051,7 +43240,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
43051
43240
|
break;
|
|
43052
43241
|
case 3:
|
|
43053
43242
|
_context12.next = 5;
|
|
43054
|
-
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-
|
|
43243
|
+
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-91a53f99.js'); });
|
|
43055
43244
|
case 5:
|
|
43056
43245
|
_yield$import = _context12.sent;
|
|
43057
43246
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -43059,7 +43248,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
43059
43248
|
return _context12.abrupt("break", 27);
|
|
43060
43249
|
case 9:
|
|
43061
43250
|
_context12.next = 11;
|
|
43062
|
-
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-
|
|
43251
|
+
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-e0237503.js'); });
|
|
43063
43252
|
case 11:
|
|
43064
43253
|
_yield$import2 = _context12.sent;
|
|
43065
43254
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -43067,7 +43256,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
43067
43256
|
return _context12.abrupt("break", 27);
|
|
43068
43257
|
case 15:
|
|
43069
43258
|
_context12.next = 17;
|
|
43070
|
-
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-
|
|
43259
|
+
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-39f6c012.js'); });
|
|
43071
43260
|
case 17:
|
|
43072
43261
|
_yield$import3 = _context12.sent;
|
|
43073
43262
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -43075,7 +43264,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
43075
43264
|
return _context12.abrupt("break", 27);
|
|
43076
43265
|
case 21:
|
|
43077
43266
|
_context12.next = 23;
|
|
43078
|
-
return Promise.resolve().then(function () { return require('./StandardWWSHandler-
|
|
43267
|
+
return Promise.resolve().then(function () { return require('./StandardWWSHandler-87d4c9ca.js'); });
|
|
43079
43268
|
case 23:
|
|
43080
43269
|
_yield$import4 = _context12.sent;
|
|
43081
43270
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -44499,7 +44688,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
44499
44688
|
while (1) switch (_context3.prev = _context3.next) {
|
|
44500
44689
|
case 0:
|
|
44501
44690
|
_context3.next = 2;
|
|
44502
|
-
return Promise.resolve().then(function () { return require('./Host3DSignalR-
|
|
44691
|
+
return Promise.resolve().then(function () { return require('./Host3DSignalR-86c47fd9.js'); });
|
|
44503
44692
|
case 2:
|
|
44504
44693
|
_yield$import = _context3.sent;
|
|
44505
44694
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -46185,7 +46374,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
46185
46374
|
break;
|
|
46186
46375
|
case 8:
|
|
46187
46376
|
_context5.next = 10;
|
|
46188
|
-
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-
|
|
46377
|
+
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-7bc436a9.js'); });
|
|
46189
46378
|
case 10:
|
|
46190
46379
|
_yield$import = _context5.sent;
|
|
46191
46380
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -46196,7 +46385,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
46196
46385
|
return _context5.abrupt("break", 21);
|
|
46197
46386
|
case 15:
|
|
46198
46387
|
_context5.next = 17;
|
|
46199
|
-
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-
|
|
46388
|
+
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-c8851567.js'); });
|
|
46200
46389
|
case 17:
|
|
46201
46390
|
_yield$import2 = _context5.sent;
|
|
46202
46391
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -47340,7 +47529,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
47340
47529
|
},
|
|
47341
47530
|
updatePlannerMsgContainer: function updatePlannerMsgContainer() {}
|
|
47342
47531
|
});
|
|
47343
|
-
var setData = DivaUtils__default["default"].encodeBase64(JSON.stringify(set.plannerHandler.savePlanner(origSet.getSetId())));
|
|
47532
|
+
var setData = DivaUtils__default["default"].encodeBase64(JSON.stringify(set.plannerHandler.savePlanner(origSet.getSetId())), set.CatalogData.isIDM3DCat);
|
|
47344
47533
|
this.plannerList.forEach(function (v) {
|
|
47345
47534
|
clone.plannerList.set(set.getSetId(), v.clonePlanner(set, _this6.plannerIDCount, setData));
|
|
47346
47535
|
_this6.plannerIDCount++;
|
|
@@ -48133,7 +48322,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48133
48322
|
key: "initialize",
|
|
48134
48323
|
value: function () {
|
|
48135
48324
|
var _initialize = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(cache) {
|
|
48136
|
-
var viewReadyPromise, loadSuccessful, ret, set, _this$actions15, _this$i18n4, _this$i18n5;
|
|
48325
|
+
var viewReadyPromise, loadSuccessful, ret, set, _this$actions15, _this$i18n4, _this$i18n5, initializationId;
|
|
48137
48326
|
return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context14) {
|
|
48138
48327
|
while (1) switch (_context14.prev = _context14.next) {
|
|
48139
48328
|
case 0:
|
|
@@ -48159,12 +48348,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48159
48348
|
case 12:
|
|
48160
48349
|
loadSuccessful = _context14.sent;
|
|
48161
48350
|
if (this.plannerConfig.configuratorSessionId) {
|
|
48162
|
-
//
|
|
48351
|
+
// ID forced from outside (Landingpage, PDP, Planung-ändern)
|
|
48163
48352
|
DivaUtils__default["default"].businessMetrics.setConfiguratorSessionId(this.plannerConfig.configuratorSessionId);
|
|
48164
|
-
} else {
|
|
48165
|
-
//
|
|
48166
|
-
// session stable across re-inits (e.g. switching products inside the same catalog).
|
|
48353
|
+
} else if (cache !== undefined) {
|
|
48354
|
+
// Re-init with cache (Variant Select): keep existing session stable
|
|
48167
48355
|
DivaUtils__default["default"].businessMetrics.setConfiguratorSessionId(undefined, true);
|
|
48356
|
+
} else {
|
|
48357
|
+
// Fresh start (new catalog, archive basket, etc.): always new UUID
|
|
48358
|
+
DivaUtils__default["default"].businessMetrics.setConfiguratorSessionId();
|
|
48168
48359
|
}
|
|
48169
48360
|
if (!loadSuccessful) {
|
|
48170
48361
|
_context14.next = 31;
|
|
@@ -48191,14 +48382,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48191
48382
|
this.onError(_context14.t0);
|
|
48192
48383
|
return _context14.abrupt("return", false);
|
|
48193
48384
|
case 29:
|
|
48194
|
-
_context14.next =
|
|
48385
|
+
_context14.next = 35;
|
|
48195
48386
|
break;
|
|
48196
48387
|
case 31:
|
|
48197
48388
|
this.onError();
|
|
48198
48389
|
//fehler beim laden vom basket..
|
|
48199
|
-
|
|
48390
|
+
initializationId = this.getInitializationID();
|
|
48391
|
+
LOG$2.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {
|
|
48392
|
+
initializationId: initializationId
|
|
48393
|
+
}, true);
|
|
48200
48394
|
return _context14.abrupt("return", false);
|
|
48201
|
-
case
|
|
48395
|
+
case 35:
|
|
48202
48396
|
case "end":
|
|
48203
48397
|
return _context14.stop();
|
|
48204
48398
|
}
|
|
@@ -48214,7 +48408,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48214
48408
|
value: function () {
|
|
48215
48409
|
var _initializeSets = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(loadSuccessful, viewReadyPromise) {
|
|
48216
48410
|
var _this$actions17, _set$getDivaArticles, _catalogData$catalogM, _catalogData$catalogM2;
|
|
48217
|
-
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,
|
|
48411
|
+
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;
|
|
48218
48412
|
return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context15) {
|
|
48219
48413
|
while (1) switch (_context15.prev = _context15.next) {
|
|
48220
48414
|
case 0:
|
|
@@ -48280,18 +48474,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48280
48474
|
}
|
|
48281
48475
|
this.subscribeToWebPlannerEvents();
|
|
48282
48476
|
catalogData = set === null || set === void 0 ? void 0 : set.CatalogData;
|
|
48283
|
-
initializationId =
|
|
48284
|
-
if (this.divaBasketHandler.initializationTypeGetter == 'PRODUCT_ID') {
|
|
48285
|
-
//KONFIGURATOR LOADED BY PRODUCT. LOG THIS HERE! WITH PRODUCT NAME AND PRODUCT ID
|
|
48286
|
-
//this._customProductId = undefined; // bsp SAP wenn CUSTOM_PRODUCT_ID
|
|
48287
|
-
initializationId = this.plannerConfig.productId;
|
|
48288
|
-
} else if (this.divaBasketHandler.initializationTypeGetter == 'ARTICLELIST') {
|
|
48289
|
-
initializationId = (_this$plannerConfig$a = this.plannerConfig.articleCodexes) === null || _this$plannerConfig$a === void 0 ? void 0 : _this$plannerConfig$a.slice();
|
|
48290
|
-
} else if (this.divaBasketHandler.initializationTypeGetter == 'CUSTOM_PRODUCT_ID') {
|
|
48291
|
-
initializationId = this.plannerConfig.customProductId;
|
|
48292
|
-
} else if (this.divaBasketHandler.initializationTypeGetter == 'SERVER_DIVANR') {
|
|
48293
|
-
initializationId = this.plannerConfig.divaNr;
|
|
48294
|
-
}
|
|
48477
|
+
initializationId = this.getInitializationID();
|
|
48295
48478
|
initializationType = this.divaBasketHandler.initializationTypeGetter;
|
|
48296
48479
|
LOG$2.successTransaction('LOADING_BASKET', {
|
|
48297
48480
|
has3D: set === null || set === void 0 ? void 0 : set.getPlannerMode(),
|
|
@@ -48315,11 +48498,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48315
48498
|
}, false);
|
|
48316
48499
|
this.configuratorChangeLog('onConfigurationInit', undefined, true);
|
|
48317
48500
|
this.plannerChangeLog('onInitPlanner', true);
|
|
48318
|
-
_context15.next =
|
|
48501
|
+
_context15.next = 43;
|
|
48319
48502
|
return this.fillBaksetforOnWebPlanerConfigChange(undefined, true);
|
|
48320
|
-
case
|
|
48503
|
+
case 43:
|
|
48321
48504
|
return _context15.abrupt("return", true);
|
|
48322
|
-
case
|
|
48505
|
+
case 44:
|
|
48323
48506
|
case "end":
|
|
48324
48507
|
return _context15.stop();
|
|
48325
48508
|
}
|
|
@@ -48402,11 +48585,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48402
48585
|
return;
|
|
48403
48586
|
}
|
|
48404
48587
|
if (onErrorHandling) {
|
|
48405
|
-
var _this$plannerConfig$
|
|
48588
|
+
var _this$plannerConfig$a2;
|
|
48406
48589
|
if (!onErrorHandling.hideErrorMsg) {
|
|
48407
|
-
var _this$plannerConfig$
|
|
48590
|
+
var _this$plannerConfig$a, _this$i18n$t, _this$i18n8, _onErrorHandling$erro;
|
|
48408
48591
|
var isWeb = this.api.getApplicationEnvironment() == 'WEB';
|
|
48409
|
-
(_this$plannerConfig$
|
|
48592
|
+
(_this$plannerConfig$a = this.plannerConfig.actions) === null || _this$plannerConfig$a === void 0 || _this$plannerConfig$a.openModal({
|
|
48410
48593
|
title: (_this$i18n$t = (_this$i18n8 = this.i18n()) === null || _this$i18n8 === void 0 ? void 0 : _this$i18n8.t((_onErrorHandling$erro = onErrorHandling.errorMsg) !== null && _onErrorHandling$erro !== void 0 ? _onErrorHandling$erro : 'modals.error_accured')) !== null && _this$i18n$t !== void 0 ? _this$i18n$t : 'An error occured. Please try again later.',
|
|
48411
48594
|
accept: true,
|
|
48412
48595
|
callback: function callback(accepted) {
|
|
@@ -48420,28 +48603,28 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48420
48603
|
}
|
|
48421
48604
|
// `openComponent` is also a UI side-effect — gate it on the same suppression flag so
|
|
48422
48605
|
// hosts can fully opt out without having to leave it undefined.
|
|
48423
|
-
if (!suppressUi && onErrorHandling.openComponent) (_this$plannerConfig$
|
|
48606
|
+
if (!suppressUi && onErrorHandling.openComponent) (_this$plannerConfig$a2 = this.plannerConfig.actions) === null || _this$plannerConfig$a2 === void 0 || _this$plannerConfig$a2.openComponent(onErrorHandling.openComponent);
|
|
48424
48607
|
} else if (!suppressUi && this.api.getApplicationEnvironment() == 'SELLER') {
|
|
48425
48608
|
var divaNr = this.plannerConfig.divaNr;
|
|
48426
48609
|
if (divaNr) {
|
|
48427
|
-
var _this$plannerConfig$
|
|
48428
|
-
(_this$plannerConfig$
|
|
48610
|
+
var _this$plannerConfig$a3, _this$i18n9, _this$i18n10, _this$plannerConfig$a4;
|
|
48611
|
+
(_this$plannerConfig$a3 = this.plannerConfig.actions) === null || _this$plannerConfig$a3 === void 0 || _this$plannerConfig$a3.openModal({
|
|
48429
48612
|
title: (_this$i18n9 = this.i18n()) === null || _this$i18n9 === void 0 ? void 0 : _this$i18n9.t('modals.divanr_not_found_title', {
|
|
48430
48613
|
divaNr: divaNr
|
|
48431
48614
|
}),
|
|
48432
48615
|
text: (_this$i18n10 = this.i18n()) === null || _this$i18n10 === void 0 ? void 0 : _this$i18n10.t('modals.divanr_not_found_text'),
|
|
48433
48616
|
accept: true
|
|
48434
48617
|
});
|
|
48435
|
-
(_this$plannerConfig$
|
|
48618
|
+
(_this$plannerConfig$a4 = this.plannerConfig.actions) === null || _this$plannerConfig$a4 === void 0 || _this$plannerConfig$a4.openComponent({
|
|
48436
48619
|
type: 'ARCHIVE'
|
|
48437
48620
|
});
|
|
48438
48621
|
} else {
|
|
48439
|
-
var _this$plannerConfig$
|
|
48440
|
-
(_this$plannerConfig$
|
|
48622
|
+
var _this$plannerConfig$a5, _this$i18n11, _this$plannerConfig$a6, _this$plannerConfig$c;
|
|
48623
|
+
(_this$plannerConfig$a5 = this.plannerConfig.actions) === null || _this$plannerConfig$a5 === void 0 || _this$plannerConfig$a5.openModal({
|
|
48441
48624
|
accept: true,
|
|
48442
48625
|
title: (_this$i18n11 = this.i18n()) === null || _this$i18n11 === void 0 ? void 0 : _this$i18n11.t('modals.error_accured')
|
|
48443
48626
|
});
|
|
48444
|
-
(_this$plannerConfig$
|
|
48627
|
+
(_this$plannerConfig$a6 = this.plannerConfig.actions) === null || _this$plannerConfig$a6 === void 0 || _this$plannerConfig$a6.openComponent({
|
|
48445
48628
|
type: 'SELLER',
|
|
48446
48629
|
parameters: {
|
|
48447
48630
|
module: ((_this$plannerConfig$c = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c === void 0 ? void 0 : _this$plannerConfig$c.parentType) == 'SUPPLIER' ? 'Catalogs' : 'Collections'
|
|
@@ -49703,8 +49886,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49703
49886
|
var doTryOptimize = plannerType == 'CUSTOMER_OPTIMIZED_PLANNER' || plannerType == 'JUMP_OVER_PLANNER_ONLY_MOBILE' || plannerType == 'JUMP_OVER_PLANNER';
|
|
49704
49887
|
//if planner is hidden by config but nothing is planned initially
|
|
49705
49888
|
if (plannerType === 'NONE') {
|
|
49706
|
-
var _this$plannerConfig$
|
|
49707
|
-
if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex !== undefined && !((_this$plannerConfig$
|
|
49889
|
+
var _this$plannerConfig$a7, _this$actSet14;
|
|
49890
|
+
if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex !== undefined && !((_this$plannerConfig$a7 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a7 !== void 0 && _this$plannerConfig$a7.length) && !this.plannerConfig.productId && !this.plannerConfig.customProductId && !this.plannerConfig.basketData && !((_this$actSet14 = this.actSet()) !== null && _this$actSet14 !== void 0 && (_this$actSet14 = _this$actSet14.CatalogData.startPlannerArticle) !== null && _this$actSet14 !== void 0 && _this$actSet14.length)) {
|
|
49708
49891
|
plannerType = 'PLANNER';
|
|
49709
49892
|
}
|
|
49710
49893
|
}
|
|
@@ -50780,7 +50963,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50780
50963
|
article_nested: articles
|
|
50781
50964
|
}
|
|
50782
50965
|
});
|
|
50783
|
-
LOG$2.businessEvent('onActualBasketValue', 'Planner', 'Aktueller Basket Value:' + actualBasketvalue, {
|
|
50966
|
+
LOG$2.businessEvent('onActualBasketValue', 'Planner', 'Aktueller Basket Value: ' + actualBasketvalue, {
|
|
50784
50967
|
basketValue: actualBasketvalue,
|
|
50785
50968
|
isInit: isInit
|
|
50786
50969
|
});
|
|
@@ -50844,15 +51027,34 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
50844
51027
|
}
|
|
50845
51028
|
}
|
|
50846
51029
|
}
|
|
50847
|
-
LOG$2.businessEvent(action, 'Planner', '
|
|
51030
|
+
LOG$2.businessEvent(action, 'Planner', 'Konfigurator wurde verändert', {
|
|
50848
51031
|
explicitlySetConfiguration: explicitlySetConfiguration,
|
|
50849
51032
|
wholeConfiguration: finalConfiguration
|
|
50850
51033
|
});
|
|
50851
|
-
LOG$2.businessEvent('onActualBasketValue', 'Planner', 'Aktueller Basket Value:' + actualBasketvalue, {
|
|
51034
|
+
LOG$2.businessEvent('onActualBasketValue', 'Planner', 'Aktueller Basket Value: ' + actualBasketvalue, {
|
|
50852
51035
|
basketValue: actualBasketvalue,
|
|
50853
51036
|
isInit: isInit
|
|
50854
51037
|
});
|
|
50855
51038
|
}
|
|
51039
|
+
}, {
|
|
51040
|
+
key: "getInitializationID",
|
|
51041
|
+
value: function getInitializationID() {
|
|
51042
|
+
var initializationId = undefined;
|
|
51043
|
+
if (!this.divaBasketHandler || !this.divaBasketHandler.initializationTypeGetter) return undefined;
|
|
51044
|
+
if (this.divaBasketHandler.initializationTypeGetter == 'PRODUCT_ID') {
|
|
51045
|
+
//KONFIGURATOR LOADED BY PRODUCT. LOG THIS HERE! WITH PRODUCT NAME AND PRODUCT ID
|
|
51046
|
+
//this._customProductId = undefined; // bsp SAP wenn CUSTOM_PRODUCT_ID
|
|
51047
|
+
initializationId = this.plannerConfig.productId;
|
|
51048
|
+
} else if (this.divaBasketHandler.initializationTypeGetter == 'ARTICLELIST') {
|
|
51049
|
+
var _this$plannerConfig$a8;
|
|
51050
|
+
initializationId = (_this$plannerConfig$a8 = this.plannerConfig.articleCodexes) === null || _this$plannerConfig$a8 === void 0 ? void 0 : _this$plannerConfig$a8.slice().join(',');
|
|
51051
|
+
} else if (this.divaBasketHandler.initializationTypeGetter == 'CUSTOM_PRODUCT_ID') {
|
|
51052
|
+
initializationId = this.plannerConfig.customProductId;
|
|
51053
|
+
} else if (this.divaBasketHandler.initializationTypeGetter == 'SERVER_DIVANR') {
|
|
51054
|
+
initializationId = this.plannerConfig.divaNr;
|
|
51055
|
+
}
|
|
51056
|
+
return initializationId;
|
|
51057
|
+
}
|
|
50856
51058
|
}, {
|
|
50857
51059
|
key: "clearRegisteredFunctions",
|
|
50858
51060
|
value: function clearRegisteredFunctions() {
|