@crystaldesign/web-planner-logic 24.10.0-beta.1 → 24.10.0-beta.11
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-6a883291.js → DivaBoxPlanner-26e0cace.js} +16 -18
- package/build/cjs/{DivaStandardPlanner-a18f752d.js → DivaStandardPlanner-25919135.js} +26 -30
- package/build/cjs/{DoorPlanner-5164c50d.js → DoorPlanner-704880a1.js} +1 -1
- package/build/cjs/{Host3DSignalR-f13134cb.js → Host3DSignalR-59436bad.js} +1 -6
- package/build/cjs/{LiviqueWWSHandler-32bb295f.js → LiviqueWWSHandler-495734b8.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-0447de84.js → PfisterWWSHandler-73a6a1bb.js} +1 -1
- package/build/cjs/{PlannerHandler2D-a941c306.js → PlannerHandler2D-c9952024.js} +1249 -10
- package/build/cjs/{ProductBasketHandler-144386d9.js → ProductBasketHandler-fca32045.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-e7f5bfb9.js → SeriousBasketHandler-4254c183.js} +1 -1
- package/build/cjs/{ShelfPlanner-63df1fef.js → ShelfPlanner-0329c88f.js} +2 -2
- package/build/cjs/{StandardWWSHandler-96b3ab81.js → StandardWWSHandler-785777e5.js} +1 -1
- package/build/cjs/{index-0cf8efc1.js → index-7cfee1da.js} +1155 -1650
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-0a38d41b.js → DivaBoxPlanner-c20559ca.js} +5 -7
- package/build/esm/{DivaStandardPlanner-774854f1.js → DivaStandardPlanner-af73d121.js} +5 -9
- package/build/esm/{DoorPlanner-c9293a3a.js → DoorPlanner-f3376859.js} +1 -1
- package/build/esm/{Host3DSignalR-3ca1dd9c.js → Host3DSignalR-ae25b944.js} +1 -6
- package/build/esm/{LiviqueWWSHandler-28edc334.js → LiviqueWWSHandler-bba79129.js} +1 -1
- package/build/esm/{PfisterWWSHandler-21e4c2f3.js → PfisterWWSHandler-1e137ace.js} +1 -1
- package/build/esm/{PlannerHandler2D-9f4f8efb.js → PlannerHandler2D-0f71e44e.js} +1245 -8
- package/build/esm/{ProductBasketHandler-fa0c1a9e.js → ProductBasketHandler-68455ac4.js} +1 -1
- package/build/esm/{SeriousBasketHandler-2e0ab157.js → SeriousBasketHandler-cdc26222.js} +1 -1
- package/build/esm/{ShelfPlanner-c52e6233.js → ShelfPlanner-84b8de24.js} +2 -2
- package/build/esm/{StandardWWSHandler-72ea1ffc.js → StandardWWSHandler-5b7ca10e.js} +1 -1
- package/build/esm/{index-622ebf68.js → index-f1fb4728.js} +1155 -1650
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/index.d.ts +1 -0
- package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/API/TemplateConfigType.d.ts +7 -7
- package/build/types/web-planner-logic/src/interface/API/TemplateConfigType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +1 -5
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts +12 -4
- package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Configuration.d.ts +0 -3
- package/build/types/web-planner-logic/src/interface/Configuration.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +44 -14
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts +0 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Planner/IDivaPlanner.d.ts +1 -2
- package/build/types/web-planner-logic/src/interface/Planner/IDivaPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts +1 -3
- package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts +3 -2
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +0 -1
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +2 -3
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts +2 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +2 -4
- 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 -12
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts +1 -2
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts +1 -2
- package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/DivaMediaServiceHandler.d.ts +0 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/DivaMediaServiceHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts +0 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts +0 -17
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/RenderSettings.d.ts +0 -9
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/RenderSettings.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts +0 -13
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts +0 -3
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +1 -3
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +0 -6
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/FavoritesHandler.d.ts +1 -1
- package/build/types/web-planner-logic/src/logic/Set/FavoritesHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts +0 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/datas/environments/testing/pfister-dev.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/scripts/productHandlerMoc.d.ts.map +1 -1
- package/package.json +2 -2
- package/build/cjs/DivaSingleProductPlanner-fcf3e4be.js +0 -1169
- package/build/cjs/DockingPointHandler-5c6b6024.js +0 -1255
- package/build/esm/DivaSingleProductPlanner-76dcd48c.js +0 -1158
- package/build/esm/DockingPointHandler-c35c0ee3.js +0 -1245
- package/build/types/web-planner-logic/src/logic/Planner/DivaSingleProductPlanner.d.ts +0 -140
- package/build/types/web-planner-logic/src/logic/Planner/DivaSingleProductPlanner.d.ts.map +0 -1
|
@@ -43,8 +43,8 @@ var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
|
43
43
|
})();
|
|
44
44
|
|
|
45
45
|
var _excluded = ["type"];
|
|
46
|
-
function ownKeys$
|
|
47
|
-
function _objectSpread$
|
|
46
|
+
function ownKeys$e(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; }
|
|
47
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
48
48
|
var LOG$g = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
49
49
|
var JsonDataCache = /*#__PURE__*/function () {
|
|
50
50
|
function JsonDataCache() {
|
|
@@ -250,8 +250,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
250
250
|
if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig2 = this.apiConfig) !== null && _this$apiConfig2 !== void 0 && _this$apiConfig2.api2.web) {
|
|
251
251
|
api2Url = this.apiConfig.api2.web;
|
|
252
252
|
}
|
|
253
|
-
_context2.t0 = _objectSpread$
|
|
254
|
-
_context2.t1 = _objectSpread$
|
|
253
|
+
_context2.t0 = _objectSpread$e;
|
|
254
|
+
_context2.t1 = _objectSpread$e({}, init.config.headers);
|
|
255
255
|
_context2.t2 = {};
|
|
256
256
|
_context2.next = 20;
|
|
257
257
|
return this.getSessionGuid('V', undefined, this.OrganizationId, api2Url);
|
|
@@ -281,7 +281,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
281
281
|
key: "getDataCache",
|
|
282
282
|
value: function () {
|
|
283
283
|
var _getDataCache = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(queryString, cacheMD5, accountSessionGuid, useWebServiceApi, method, data) {
|
|
284
|
-
var myQS, url, init, addSession,
|
|
284
|
+
var myQS, url, init, addSession, _this$apiConfig3, _this$apiConfig4, api2Url, result;
|
|
285
285
|
return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context3) {
|
|
286
286
|
while (1) switch (_context3.prev = _context3.next) {
|
|
287
287
|
case 0:
|
|
@@ -294,7 +294,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
294
294
|
};
|
|
295
295
|
addSession = true;
|
|
296
296
|
if (!(this.jsonDataCache.get(myQS) || cacheMD5 && this.jsonDataCache.get(cacheMD5))) {
|
|
297
|
-
_context3.next =
|
|
297
|
+
_context3.next = 9;
|
|
298
298
|
break;
|
|
299
299
|
}
|
|
300
300
|
LOG$g.debug('getDataFromInternalCache: ' + queryString);
|
|
@@ -305,77 +305,68 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
305
305
|
return _context3.abrupt("return", this.jsonDataCache.get(myQS));
|
|
306
306
|
case 8:
|
|
307
307
|
return _context3.abrupt("return", this.jsonDataCache.get(cacheMD5));
|
|
308
|
-
case
|
|
309
|
-
if (cacheMD5) {
|
|
310
|
-
cacheUrl = DivaUtils__default["default"].getCacheData(cacheMD5, queryString);
|
|
311
|
-
if (cacheUrl) {
|
|
312
|
-
LOG$g.debug('getDataFromCDNCache: ' + queryString);
|
|
313
|
-
url = cacheUrl;
|
|
314
|
-
addSession = false;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
case 12:
|
|
308
|
+
case 9:
|
|
318
309
|
if (!addSession) {
|
|
319
|
-
_context3.next =
|
|
310
|
+
_context3.next = 31;
|
|
320
311
|
break;
|
|
321
312
|
}
|
|
322
313
|
if (!useWebServiceApi) {
|
|
323
|
-
_context3.next =
|
|
314
|
+
_context3.next = 22;
|
|
324
315
|
break;
|
|
325
316
|
}
|
|
326
317
|
if (!this.jwt) {
|
|
327
|
-
_context3.next =
|
|
318
|
+
_context3.next = 15;
|
|
328
319
|
break;
|
|
329
320
|
}
|
|
330
321
|
init.config.headers = {
|
|
331
322
|
Authorization: 'Bearer ' + this.jwt
|
|
332
323
|
};
|
|
333
|
-
_context3.next =
|
|
324
|
+
_context3.next = 20;
|
|
334
325
|
break;
|
|
335
|
-
case
|
|
326
|
+
case 15:
|
|
336
327
|
if (!this.apiKey) {
|
|
337
|
-
_context3.next =
|
|
328
|
+
_context3.next = 19;
|
|
338
329
|
break;
|
|
339
330
|
}
|
|
340
331
|
init.config.headers = {
|
|
341
332
|
'X-API-KEY': this.apiKey
|
|
342
333
|
};
|
|
343
|
-
_context3.next =
|
|
334
|
+
_context3.next = 20;
|
|
344
335
|
break;
|
|
345
|
-
case
|
|
336
|
+
case 19:
|
|
346
337
|
throw new Error('not jwt or API Key Found');
|
|
347
|
-
case
|
|
348
|
-
_context3.next =
|
|
338
|
+
case 20:
|
|
339
|
+
_context3.next = 31;
|
|
349
340
|
break;
|
|
350
|
-
case
|
|
341
|
+
case 22:
|
|
351
342
|
api2Url = (_this$apiConfig3 = this.apiConfig) === null || _this$apiConfig3 === void 0 ? void 0 : _this$apiConfig3.api2["default"];
|
|
352
343
|
if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig4 = this.apiConfig) !== null && _this$apiConfig4 !== void 0 && _this$apiConfig4.api2.web) {
|
|
353
344
|
api2Url = this.apiConfig.api2.web;
|
|
354
345
|
}
|
|
355
346
|
_context3.t0 = accountSessionGuid;
|
|
356
347
|
if (_context3.t0) {
|
|
357
|
-
_context3.next =
|
|
348
|
+
_context3.next = 29;
|
|
358
349
|
break;
|
|
359
350
|
}
|
|
360
|
-
_context3.next =
|
|
351
|
+
_context3.next = 28;
|
|
361
352
|
return this.getSessionGuid('V', undefined, this.OrganizationId, api2Url);
|
|
362
|
-
case
|
|
353
|
+
case 28:
|
|
363
354
|
_context3.t0 = _context3.sent;
|
|
364
|
-
case
|
|
355
|
+
case 29:
|
|
365
356
|
_context3.t1 = _context3.t0;
|
|
366
357
|
init.config.headers = {
|
|
367
358
|
sessionGuid: _context3.t1
|
|
368
359
|
};
|
|
369
|
-
case
|
|
370
|
-
_context3.next =
|
|
360
|
+
case 31:
|
|
361
|
+
_context3.next = 33;
|
|
371
362
|
return this.fetchData(url, init);
|
|
372
|
-
case
|
|
363
|
+
case 33:
|
|
373
364
|
result = _context3.sent;
|
|
374
365
|
this.jsonDataCache.set(myQS, result);
|
|
375
366
|
if (cacheMD5) this.jsonDataCache.set(cacheMD5, result);
|
|
376
367
|
LOG$g.debug('getDataFromApi: ' + queryString);
|
|
377
368
|
return _context3.abrupt("return", result);
|
|
378
|
-
case
|
|
369
|
+
case 38:
|
|
379
370
|
case "end":
|
|
380
371
|
return _context3.stop();
|
|
381
372
|
}
|
|
@@ -438,9 +429,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
438
429
|
diva3dServerMode: data.diva3dServerMode != undefined ? data.diva3dServerMode : 'SignalR',
|
|
439
430
|
diva3dRenderGroup: data.diva3dRenderGroup != undefined ? data.diva3dRenderGroup : 'MYCC7',
|
|
440
431
|
mediaServiceApiKey: data.divaMediaServiceApiKey,
|
|
441
|
-
diva3dUseImageCache: data.diva3dUseImageCache != undefined ? data.diva3dUseImageCache : false,
|
|
442
|
-
diva3dSuppressCacheCreation: data.diva3dSuppressCacheCreation != undefined ? data.diva3dSuppressCacheCreation : false,
|
|
443
|
-
diva3dUseSirvViewer: data.diva3dUseSirvViewer != undefined ? data.diva3dUseSirvViewer : false,
|
|
444
432
|
language: lang !== null && lang !== void 0 ? lang : this.getLanguage(),
|
|
445
433
|
abTestCases: data.abTestCases !== undefined ? data.abTestCases : [],
|
|
446
434
|
checkForProductsInStock: data.checkForProductsInStock,
|
|
@@ -559,24 +547,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
559
547
|
var _this$divaWebConfigDa8, _this$divaWebConfigDa9;
|
|
560
548
|
return (_this$divaWebConfigDa8 = (_this$divaWebConfigDa9 = this.divaWebConfigData) === null || _this$divaWebConfigDa9 === void 0 ? void 0 : _this$divaWebConfigDa9.diva3dRenderGroup) !== null && _this$divaWebConfigDa8 !== void 0 ? _this$divaWebConfigDa8 : '';
|
|
561
549
|
}
|
|
562
|
-
}, {
|
|
563
|
-
key: "getDiva3dUseImageCache",
|
|
564
|
-
value: function getDiva3dUseImageCache() {
|
|
565
|
-
var _this$divaWebConfigDa10;
|
|
566
|
-
return !!((_this$divaWebConfigDa10 = this.divaWebConfigData) !== null && _this$divaWebConfigDa10 !== void 0 && _this$divaWebConfigDa10.diva3dUseImageCache);
|
|
567
|
-
}
|
|
568
|
-
}, {
|
|
569
|
-
key: "getDiva3DSuppressCacheCreation",
|
|
570
|
-
value: function getDiva3DSuppressCacheCreation() {
|
|
571
|
-
var _this$divaWebConfigDa11;
|
|
572
|
-
return !!((_this$divaWebConfigDa11 = this.divaWebConfigData) !== null && _this$divaWebConfigDa11 !== void 0 && _this$divaWebConfigDa11.diva3dSuppressCacheCreation);
|
|
573
|
-
}
|
|
574
|
-
}, {
|
|
575
|
-
key: "getDiva3dUseSirvViewer",
|
|
576
|
-
value: function getDiva3dUseSirvViewer() {
|
|
577
|
-
var _this$divaWebConfigDa12;
|
|
578
|
-
return !!((_this$divaWebConfigDa12 = this.divaWebConfigData) !== null && _this$divaWebConfigDa12 !== void 0 && _this$divaWebConfigDa12.diva3dUseSirvViewer);
|
|
579
|
-
}
|
|
580
550
|
}, {
|
|
581
551
|
key: "getServerId",
|
|
582
552
|
value: function getServerId() {
|
|
@@ -612,80 +582,80 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
612
582
|
}, {
|
|
613
583
|
key: "getDiva3dStaticBGImage",
|
|
614
584
|
value: function getDiva3dStaticBGImage() {
|
|
615
|
-
var _this$
|
|
616
|
-
return (_this$
|
|
585
|
+
var _this$divaWebConfigDa10;
|
|
586
|
+
return (_this$divaWebConfigDa10 = this.divaWebConfigData) === null || _this$divaWebConfigDa10 === void 0 ? void 0 : _this$divaWebConfigDa10.diva3dStaticBGImage;
|
|
617
587
|
}
|
|
618
588
|
}, {
|
|
619
589
|
key: "getDiva3dStaticBGImage_DefaultRoomList",
|
|
620
590
|
value: function getDiva3dStaticBGImage_DefaultRoomList() {
|
|
621
|
-
var _this$
|
|
622
|
-
return ((_this$
|
|
591
|
+
var _this$divaWebConfigDa11, _this$divaWebConfigDa12;
|
|
592
|
+
return ((_this$divaWebConfigDa11 = this.divaWebConfigData) === null || _this$divaWebConfigDa11 === void 0 ? void 0 : _this$divaWebConfigDa11.diva3dStaticBGImage_DefaultRoomList) == '' ? '3D_STATBG_ROOMLIST' : (_this$divaWebConfigDa12 = this.divaWebConfigData) === null || _this$divaWebConfigDa12 === void 0 ? void 0 : _this$divaWebConfigDa12.diva3dStaticBGImage_DefaultRoomList;
|
|
623
593
|
}
|
|
624
594
|
}, {
|
|
625
595
|
key: "getDiva3DAllowDefaultCatRoomList",
|
|
626
596
|
value: function getDiva3DAllowDefaultCatRoomList() {
|
|
627
|
-
var _this$
|
|
628
|
-
return (_this$
|
|
597
|
+
var _this$divaWebConfigDa13;
|
|
598
|
+
return (_this$divaWebConfigDa13 = this.divaWebConfigData) === null || _this$divaWebConfigDa13 === void 0 ? void 0 : _this$divaWebConfigDa13.diva3DAllowDefaultCatRoomList;
|
|
629
599
|
}
|
|
630
600
|
}, {
|
|
631
601
|
key: "doAllowSetPlanner",
|
|
632
602
|
value: function doAllowSetPlanner() {
|
|
633
|
-
var _this$
|
|
634
|
-
return (_this$
|
|
603
|
+
var _this$divaWebConfigDa14;
|
|
604
|
+
return (_this$divaWebConfigDa14 = this.divaWebConfigData) === null || _this$divaWebConfigDa14 === void 0 ? void 0 : _this$divaWebConfigDa14.doAllowSetPlanner;
|
|
635
605
|
}
|
|
636
606
|
}, {
|
|
637
607
|
key: "getHidePlanner",
|
|
638
608
|
value: function getHidePlanner() {
|
|
639
|
-
var _this$
|
|
640
|
-
return !!((_this$
|
|
609
|
+
var _this$divaWebConfigDa15;
|
|
610
|
+
return !!((_this$divaWebConfigDa15 = this.divaWebConfigData) !== null && _this$divaWebConfigDa15 !== void 0 && (_this$divaWebConfigDa15 = _this$divaWebConfigDa15.viewConfig) !== null && _this$divaWebConfigDa15 !== void 0 && _this$divaWebConfigDa15.hidePlanner);
|
|
641
611
|
}
|
|
642
612
|
}, {
|
|
643
613
|
key: "getDoShowAR",
|
|
644
614
|
value: function getDoShowAR() {
|
|
645
|
-
var _this$
|
|
646
|
-
return (_this$
|
|
615
|
+
var _this$divaWebConfigDa16;
|
|
616
|
+
return (_this$divaWebConfigDa16 = this.divaWebConfigData) === null || _this$divaWebConfigDa16 === void 0 || (_this$divaWebConfigDa16 = _this$divaWebConfigDa16.viewConfig) === null || _this$divaWebConfigDa16 === void 0 ? void 0 : _this$divaWebConfigDa16.enableAR;
|
|
647
617
|
}
|
|
648
618
|
}, {
|
|
649
619
|
key: "getDoShowRTV",
|
|
650
620
|
value: function getDoShowRTV() {
|
|
651
|
-
var _this$
|
|
652
|
-
return (_this$
|
|
621
|
+
var _this$divaWebConfigDa17;
|
|
622
|
+
return (_this$divaWebConfigDa17 = this.divaWebConfigData) === null || _this$divaWebConfigDa17 === void 0 || (_this$divaWebConfigDa17 = _this$divaWebConfigDa17.viewConfig) === null || _this$divaWebConfigDa17 === void 0 ? void 0 : _this$divaWebConfigDa17.enableRTV;
|
|
653
623
|
}
|
|
654
624
|
}, {
|
|
655
625
|
key: "getEnableRTVUnityKombi",
|
|
656
626
|
value: function getEnableRTVUnityKombi() {
|
|
657
|
-
var _this$
|
|
658
|
-
return !!((_this$
|
|
627
|
+
var _this$divaWebConfigDa18;
|
|
628
|
+
return !!((_this$divaWebConfigDa18 = this.divaWebConfigData) !== null && _this$divaWebConfigDa18 !== void 0 && _this$divaWebConfigDa18.viewConfig.enableRtvUnityKombi);
|
|
659
629
|
}
|
|
660
630
|
}, {
|
|
661
631
|
key: "getDoDisablePlanner2D",
|
|
662
632
|
value: function getDoDisablePlanner2D() {
|
|
663
|
-
var _this$
|
|
664
|
-
return !!((_this$
|
|
633
|
+
var _this$divaWebConfigDa19;
|
|
634
|
+
return !!((_this$divaWebConfigDa19 = this.divaWebConfigData) !== null && _this$divaWebConfigDa19 !== void 0 && _this$divaWebConfigDa19.doDisablePlanner2D);
|
|
665
635
|
}
|
|
666
636
|
}, {
|
|
667
637
|
key: "getRoomListInProduct",
|
|
668
638
|
value: function getRoomListInProduct() {
|
|
669
|
-
var _this$
|
|
670
|
-
return !!((_this$
|
|
639
|
+
var _this$divaWebConfigDa20;
|
|
640
|
+
return !!((_this$divaWebConfigDa20 = this.divaWebConfigData) !== null && _this$divaWebConfigDa20 !== void 0 && (_this$divaWebConfigDa20 = _this$divaWebConfigDa20.viewConfig) !== null && _this$divaWebConfigDa20 !== void 0 && _this$divaWebConfigDa20.roomListInProduct);
|
|
671
641
|
}
|
|
672
642
|
}, {
|
|
673
643
|
key: "getPlannerType",
|
|
674
644
|
value: function getPlannerType() {
|
|
675
|
-
var _this$
|
|
676
|
-
return (_this$
|
|
645
|
+
var _this$divaWebConfigDa21;
|
|
646
|
+
return (_this$divaWebConfigDa21 = this.divaWebConfigData) === null || _this$divaWebConfigDa21 === void 0 || (_this$divaWebConfigDa21 = _this$divaWebConfigDa21.viewConfig) === null || _this$divaWebConfigDa21 === void 0 ? void 0 : _this$divaWebConfigDa21.plannerType;
|
|
677
647
|
}
|
|
678
648
|
}, {
|
|
679
649
|
key: "getLoadSupplierColors",
|
|
680
650
|
value: function getLoadSupplierColors() {
|
|
681
|
-
var _this$
|
|
682
|
-
return !!((_this$
|
|
651
|
+
var _this$divaWebConfigDa22;
|
|
652
|
+
return !!((_this$divaWebConfigDa22 = this.divaWebConfigData) !== null && _this$divaWebConfigDa22 !== void 0 && _this$divaWebConfigDa22.loadSupplierColors);
|
|
683
653
|
}
|
|
684
654
|
}, {
|
|
685
655
|
key: "showSelectionModeZero",
|
|
686
656
|
value: function showSelectionModeZero() {
|
|
687
|
-
var _this$
|
|
688
|
-
return !!((_this$
|
|
657
|
+
var _this$divaWebConfigDa23;
|
|
658
|
+
return !!((_this$divaWebConfigDa23 = this.divaWebConfigData) !== null && _this$divaWebConfigDa23 !== void 0 && _this$divaWebConfigDa23.showSelectionModeZero);
|
|
689
659
|
}
|
|
690
660
|
}, {
|
|
691
661
|
key: "ruleDescSeperator",
|
|
@@ -705,8 +675,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
705
675
|
}, {
|
|
706
676
|
key: "getDoCheckVariantData",
|
|
707
677
|
value: function getDoCheckVariantData() {
|
|
708
|
-
var _this$
|
|
709
|
-
return (_this$
|
|
678
|
+
var _this$divaWebConfigDa24;
|
|
679
|
+
return (_this$divaWebConfigDa24 = this.divaWebConfigData) === null || _this$divaWebConfigDa24 === void 0 ? void 0 : _this$divaWebConfigDa24.doCheckVariantData;
|
|
710
680
|
}
|
|
711
681
|
}, {
|
|
712
682
|
key: "setI18n",
|
|
@@ -799,50 +769,50 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
799
769
|
}, {
|
|
800
770
|
key: "getViewConfig",
|
|
801
771
|
value: function getViewConfig() {
|
|
802
|
-
var _this$
|
|
803
|
-
return (_this$
|
|
772
|
+
var _this$divaWebConfigDa25;
|
|
773
|
+
return (_this$divaWebConfigDa25 = this.divaWebConfigData) === null || _this$divaWebConfigDa25 === void 0 ? void 0 : _this$divaWebConfigDa25.viewConfig;
|
|
804
774
|
}
|
|
805
775
|
}, {
|
|
806
776
|
key: "getEmailConfig",
|
|
807
777
|
value: function getEmailConfig() {
|
|
808
|
-
var _this$
|
|
809
|
-
return (_this$
|
|
778
|
+
var _this$divaWebConfigDa26;
|
|
779
|
+
return (_this$divaWebConfigDa26 = this.divaWebConfigData) === null || _this$divaWebConfigDa26 === void 0 ? void 0 : _this$divaWebConfigDa26.emailConfig;
|
|
810
780
|
}
|
|
811
781
|
}, {
|
|
812
782
|
key: "getABTestCases",
|
|
813
783
|
value: function getABTestCases() {
|
|
814
|
-
var _this$
|
|
815
|
-
return (_this$
|
|
784
|
+
var _this$divaWebConfigDa27, _this$divaWebConfigDa28;
|
|
785
|
+
return (_this$divaWebConfigDa27 = (_this$divaWebConfigDa28 = this.divaWebConfigData) === null || _this$divaWebConfigDa28 === void 0 ? void 0 : _this$divaWebConfigDa28.abTestCases) !== null && _this$divaWebConfigDa27 !== void 0 ? _this$divaWebConfigDa27 : [];
|
|
816
786
|
}
|
|
817
787
|
}, {
|
|
818
788
|
key: "getBarrierConfig",
|
|
819
789
|
value: function getBarrierConfig() {
|
|
820
|
-
var _this$
|
|
821
|
-
return (_this$
|
|
790
|
+
var _this$divaWebConfigDa29;
|
|
791
|
+
return (_this$divaWebConfigDa29 = this.divaWebConfigData) === null || _this$divaWebConfigDa29 === void 0 ? void 0 : _this$divaWebConfigDa29.barrierConfig;
|
|
822
792
|
}
|
|
823
793
|
}, {
|
|
824
794
|
key: "getTemplateConfig",
|
|
825
795
|
value: function getTemplateConfig() {
|
|
826
|
-
var _this$
|
|
827
|
-
return (_this$
|
|
796
|
+
var _this$divaWebConfigDa30;
|
|
797
|
+
return (_this$divaWebConfigDa30 = this.divaWebConfigData) === null || _this$divaWebConfigDa30 === void 0 ? void 0 : _this$divaWebConfigDa30.templateConfig;
|
|
828
798
|
}
|
|
829
799
|
}, {
|
|
830
800
|
key: "showDivaNr",
|
|
831
801
|
value: function showDivaNr() {
|
|
832
|
-
var _this$
|
|
833
|
-
return (_this$
|
|
802
|
+
var _this$divaWebConfigDa31;
|
|
803
|
+
return (_this$divaWebConfigDa31 = this.divaWebConfigData) === null || _this$divaWebConfigDa31 === void 0 ? void 0 : _this$divaWebConfigDa31.showDivaNr;
|
|
834
804
|
}
|
|
835
805
|
}, {
|
|
836
806
|
key: "onErrorHandling",
|
|
837
807
|
value: function onErrorHandling() {
|
|
838
|
-
var _this$
|
|
839
|
-
return (_this$
|
|
808
|
+
var _this$divaWebConfigDa32;
|
|
809
|
+
return (_this$divaWebConfigDa32 = this.divaWebConfigData) === null || _this$divaWebConfigDa32 === void 0 ? void 0 : _this$divaWebConfigDa32.onErrorHandling;
|
|
840
810
|
}
|
|
841
811
|
}, {
|
|
842
812
|
key: "diva3DRenderingDefault",
|
|
843
813
|
value: function diva3DRenderingDefault() {
|
|
844
|
-
var _this$
|
|
845
|
-
return (_this$
|
|
814
|
+
var _this$divaWebConfigDa33;
|
|
815
|
+
return (_this$divaWebConfigDa33 = this.divaWebConfigData) === null || _this$divaWebConfigDa33 === void 0 ? void 0 : _this$divaWebConfigDa33.diva3DRenderingDefault;
|
|
846
816
|
}
|
|
847
817
|
}, {
|
|
848
818
|
key: "getJwt",
|
|
@@ -857,13 +827,13 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
857
827
|
}, {
|
|
858
828
|
key: "getUseMask",
|
|
859
829
|
value: function getUseMask() {
|
|
860
|
-
var _this$
|
|
861
|
-
return (_this$
|
|
830
|
+
var _this$divaWebConfigDa34;
|
|
831
|
+
return (_this$divaWebConfigDa34 = this.divaWebConfigData) === null || _this$divaWebConfigDa34 === void 0 ? void 0 : _this$divaWebConfigDa34.useMask;
|
|
862
832
|
}
|
|
863
833
|
}, {
|
|
864
834
|
key: "apiUrl",
|
|
865
835
|
value: function apiUrl(queryString, useWebServiceApi) {
|
|
866
|
-
var _this$
|
|
836
|
+
var _this$apiConfig21, _this$apiConfig22;
|
|
867
837
|
if (useWebServiceApi == 'catalog') {
|
|
868
838
|
var _this$apiConfig13, _this$apiConfig14;
|
|
869
839
|
if (!((_this$apiConfig13 = this.apiConfig) !== null && _this$apiConfig13 !== void 0 && _this$apiConfig13.catalogService)) throw new Error('No catalog Service defined');
|
|
@@ -879,8 +849,13 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
879
849
|
if (!((_this$apiConfig17 = this.apiConfig) !== null && _this$apiConfig17 !== void 0 && _this$apiConfig17.reportService)) throw new Error('No report Service defined');
|
|
880
850
|
return ((_this$apiConfig18 = this.apiConfig) === null || _this$apiConfig18 === void 0 ? void 0 : _this$apiConfig18.reportService) + queryString;
|
|
881
851
|
}
|
|
882
|
-
|
|
883
|
-
|
|
852
|
+
if (useWebServiceApi == 'enricher') {
|
|
853
|
+
var _this$apiConfig19, _this$apiConfig20;
|
|
854
|
+
if (!((_this$apiConfig19 = this.apiConfig) !== null && _this$apiConfig19 !== void 0 && _this$apiConfig19.enricherService)) throw new Error('No report Service defined');
|
|
855
|
+
return ((_this$apiConfig20 = this.apiConfig) === null || _this$apiConfig20 === void 0 ? void 0 : _this$apiConfig20.enricherService) + queryString;
|
|
856
|
+
}
|
|
857
|
+
var url = (_this$apiConfig21 = this.apiConfig) === null || _this$apiConfig21 === void 0 ? void 0 : _this$apiConfig21.api2["default"];
|
|
858
|
+
if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig22 = this.apiConfig) !== null && _this$apiConfig22 !== void 0 && _this$apiConfig22.api2.web) {
|
|
884
859
|
url = this.apiConfig.api2.web;
|
|
885
860
|
}
|
|
886
861
|
if (!url) throw new Error('No API2 defined');
|
|
@@ -944,7 +919,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
944
919
|
}, {
|
|
945
920
|
key: "getCatalogProductUrl",
|
|
946
921
|
value: function getCatalogProductUrl(catalogCodex) {
|
|
947
|
-
var search = '{catCodex,contains,' + catalogCodex +
|
|
922
|
+
var search = '{catCodex,contains,' + catalogCodex + "},{availableForOrganizations,eq,".concat(this.organization._id, "}");
|
|
948
923
|
return '/v1/products?' + 'search=' + encodeURIComponent('[' + search + ']') + '&organizationIds=' + this.organization._id + '&fields=' + encodeURIComponent('{divaNr,addedPrice,discountedPrice,shortDescription,image,dockingPoints,articles,originDivaNr,variantId,affiliate,retailerArticleNr,minQuantity,increments,calculatedPrice}');
|
|
949
924
|
}
|
|
950
925
|
}, {
|
|
@@ -983,6 +958,11 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
983
958
|
value: function getAdditionalModelInfosQS(accountGuid, catalogGuid) {
|
|
984
959
|
return '/additionalModelInfos/one?' + '&accountGuid=' + accountGuid + '&catalogGuid=' + catalogGuid;
|
|
985
960
|
}
|
|
961
|
+
}, {
|
|
962
|
+
key: "getCatalogMaskQS",
|
|
963
|
+
value: function getCatalogMaskQS(catalogGuid, organizationId) {
|
|
964
|
+
return '/live/mask/' + catalogGuid + '/mask?organizationId=' + organizationId;
|
|
965
|
+
}
|
|
986
966
|
}, {
|
|
987
967
|
key: "getAdditionalModelInfosPostMaskQS",
|
|
988
968
|
value: function getAdditionalModelInfosPostMaskQS(id) {
|
|
@@ -1140,12 +1120,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1140
1120
|
value: function getImageURL(image, mediaURL) {
|
|
1141
1121
|
var ret = '';
|
|
1142
1122
|
if (image != '' && image != null) {
|
|
1143
|
-
if (DivaUtils__default["default"].CacheIsEnabled) {
|
|
1144
|
-
ret = DivaUtils__default["default"].getCacheData(image.toUpperCase(), '');
|
|
1145
|
-
if (ret) {
|
|
1146
|
-
return ret;
|
|
1147
|
-
}
|
|
1148
|
-
}
|
|
1149
1123
|
var header = image.substring(0, 4).toLowerCase();
|
|
1150
1124
|
if (header == 'http' || header == 'data') {
|
|
1151
1125
|
ret = image;
|
|
@@ -1252,12 +1226,12 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1252
1226
|
key: "getDimensionbyId",
|
|
1253
1227
|
value: function () {
|
|
1254
1228
|
var _getDimensionbyId = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(id, iln, catalogCodex, plannedOptions) {
|
|
1255
|
-
var _this$
|
|
1229
|
+
var _this$apiConfig23;
|
|
1256
1230
|
var fullUrl, res, headers;
|
|
1257
1231
|
return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context11) {
|
|
1258
1232
|
while (1) switch (_context11.prev = _context11.next) {
|
|
1259
1233
|
case 0:
|
|
1260
|
-
fullUrl = this.getConstructorServiceUrl() + '/dimension/' + id + '?iln=' + iln + '&catalogCodex=' + catalogCodex + '&debug=' + ((_this$
|
|
1234
|
+
fullUrl = this.getConstructorServiceUrl() + '/dimension/' + id + '?iln=' + iln + '&catalogCodex=' + catalogCodex + '&debug=' + ((_this$apiConfig23 = this.apiConfig) === null || _this$apiConfig23 === void 0 ? void 0 : _this$apiConfig23.useDebugUrl);
|
|
1261
1235
|
headers = {};
|
|
1262
1236
|
if (this.jwt) headers = {
|
|
1263
1237
|
Authorization: 'Bearer ' + this.jwt
|
|
@@ -1386,8 +1360,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1386
1360
|
}, {
|
|
1387
1361
|
key: "dontLoadAdditionalModelInfos",
|
|
1388
1362
|
get: function get() {
|
|
1389
|
-
var _this$
|
|
1390
|
-
return (_this$
|
|
1363
|
+
var _this$divaWebConfigDa35;
|
|
1364
|
+
return (_this$divaWebConfigDa35 = this.divaWebConfigData) === null || _this$divaWebConfigDa35 === void 0 ? void 0 : _this$divaWebConfigDa35.dontLoadAdditionalModelInfos;
|
|
1391
1365
|
}
|
|
1392
1366
|
}, {
|
|
1393
1367
|
key: "OrganizationId",
|
|
@@ -1698,7 +1672,6 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
|
|
|
1698
1672
|
catalogOPV: catalogOPV,
|
|
1699
1673
|
pac: jsonOPV.PAC,
|
|
1700
1674
|
pgr: jsonOPV.PGR,
|
|
1701
|
-
isRendered: jsonOPV.IsRendered != undefined ? jsonOPV.IsRendered : true,
|
|
1702
1675
|
subArticleCodex: jsonOPV.SubArticleCodex && jsonOPV.SubArticleCodex != '' ? jsonOPV.SubArticleCodex : undefined,
|
|
1703
1676
|
subArticleTypeNr: jsonOPV.SubArticleTypeNr && jsonOPV.SubArticleTypeNr != '' ? jsonOPV.SubArticleTypeNr : undefined,
|
|
1704
1677
|
subRetailArticleNr: jsonOPV.SubRetailArticleNr && jsonOPV.SubRetailArticleNr != '' ? jsonOPV.SubRetailArticleNr : undefined,
|
|
@@ -2035,11 +2008,6 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
|
|
|
2035
2008
|
get: function get() {
|
|
2036
2009
|
return this.opv.catalogOPV.value;
|
|
2037
2010
|
}
|
|
2038
|
-
}, {
|
|
2039
|
-
key: "isDigitalized",
|
|
2040
|
-
get: function get() {
|
|
2041
|
-
return this.opv.isRendered;
|
|
2042
|
-
}
|
|
2043
2011
|
}, {
|
|
2044
2012
|
key: "metaData",
|
|
2045
2013
|
get: function get() {
|
|
@@ -16043,7 +16011,7 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16043
16011
|
showOnlyWhenHasPrice: jsonOPV.ShowOnlyWhenHasPrice && jsonOPV.ShowOnlyWhenHasPrice == 'True' ? true : false,
|
|
16044
16012
|
priceUnit: jsonOPV.PriceUnit,
|
|
16045
16013
|
value: jsonOPV.Value,
|
|
16046
|
-
property: [].concat(_toConsumableArray__default["default"]((_jsonOPV$Metadatas = jsonOPV.Metadatas) !== null && _jsonOPV$Metadatas !== void 0 ? _jsonOPV$Metadatas : []), _toConsumableArray__default["default"]((_mask$properties = mask === null || mask === void 0 ? void 0 : mask.properties) !== null && _mask$properties !== void 0 ? _mask$properties :
|
|
16014
|
+
property: [].concat(_toConsumableArray__default["default"]((_jsonOPV$Metadatas = jsonOPV.Metadatas) !== null && _jsonOPV$Metadatas !== void 0 ? _jsonOPV$Metadatas : []), _toConsumableArray__default["default"](Object.values((_mask$properties = mask === null || mask === void 0 ? void 0 : mask.properties) !== null && _mask$properties !== void 0 ? _mask$properties : {}))),
|
|
16047
16015
|
textbausteine: jsonOPV.Textbausteine
|
|
16048
16016
|
};
|
|
16049
16017
|
this.opv.colorGroups = this.mapRALColorToGroup();
|
|
@@ -16425,7 +16393,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
16425
16393
|
arePricesLoaded: false,
|
|
16426
16394
|
articleOptions: {},
|
|
16427
16395
|
decisions: [],
|
|
16428
|
-
properties: [].concat(_toConsumableArray__default["default"]((_jsonArticle$Metadata = jsonArticle.Metadatas) !== null && _jsonArticle$Metadata !== void 0 ? _jsonArticle$Metadata : []), _toConsumableArray__default["default"]((_articleMask$properti = articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties) !== null && _articleMask$properti !== void 0 ? _articleMask$properti :
|
|
16396
|
+
properties: [].concat(_toConsumableArray__default["default"]((_jsonArticle$Metadata = jsonArticle.Metadatas) !== null && _jsonArticle$Metadata !== void 0 ? _jsonArticle$Metadata : []), _toConsumableArray__default["default"](Object.values((_articleMask$properti = articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties) !== null && _articleMask$properti !== void 0 ? _articleMask$properti : {}))),
|
|
16429
16397
|
image: jsonArticle.Image && jsonArticle.Image != '' ? jsonArticle.Image : undefined,
|
|
16430
16398
|
imageWidth: jsonArticle.ImageWidth ? jsonArticle.ImageWidth : undefined,
|
|
16431
16399
|
imageHeight: jsonArticle.ImageHeight ? jsonArticle.ImageHeight : undefined,
|
|
@@ -17829,10 +17797,11 @@ var CatalogPlannerArticleData = /*#__PURE__*/function () {
|
|
|
17829
17797
|
|
|
17830
17798
|
var OptionCatalogData = /*#__PURE__*/function () {
|
|
17831
17799
|
function OptionCatalogData(codex, jsonOPT, catalogData) {
|
|
17832
|
-
var _catalogData$catalogM, _catalogData$catalogM2, _catalogData$catalogM3, _optionMask$name$cata, _optionMask$name, _catalogData$api$getL, _optionMask$name2, _optionMask$hidden, _optionMask$tabGroup, _catalogData$api$getL2, _ref, _optionMask$layout,
|
|
17800
|
+
var _catalogData$catalogM, _catalogData$catalogM2, _catalogData$catalogM3, _jsonOPT$Properties, _optionMask$propertie, _optionMask$name$cata, _optionMask$name, _catalogData$api$getL, _optionMask$name2, _optionMask$hidden, _optionMask$tabGroup, _catalogData$api$getL2, _ref, _optionMask$layout, _properties$find, _jsonOPT$showOPVAsArt;
|
|
17833
17801
|
_classCallCheck__default["default"](this, OptionCatalogData);
|
|
17834
17802
|
_defineProperty__default["default"](this, "opt", void 0);
|
|
17835
17803
|
var optionMask = (_catalogData$catalogM = (_catalogData$catalogM2 = catalogData.catalogMask) === null || _catalogData$catalogM2 === void 0 || (_catalogData$catalogM2 = _catalogData$catalogM2.options) === null || _catalogData$catalogM2 === void 0 ? void 0 : _catalogData$catalogM2[codex]) !== null && _catalogData$catalogM !== void 0 ? _catalogData$catalogM : codex.startsWith('OPT') ? (_catalogData$catalogM3 = catalogData.catalogMask) === null || _catalogData$catalogM3 === void 0 || (_catalogData$catalogM3 = _catalogData$catalogM3.options) === null || _catalogData$catalogM3 === void 0 ? void 0 : _catalogData$catalogM3[codex.substring(3)] : undefined;
|
|
17804
|
+
var properties = [].concat(_toConsumableArray__default["default"]((_jsonOPT$Properties = jsonOPT.Properties) !== null && _jsonOPT$Properties !== void 0 ? _jsonOPT$Properties : []), _toConsumableArray__default["default"](Object.values((_optionMask$propertie = optionMask === null || optionMask === void 0 ? void 0 : optionMask.properties) !== null && _optionMask$propertie !== void 0 ? _optionMask$propertie : {})));
|
|
17836
17805
|
this.opt = {
|
|
17837
17806
|
codex: codex,
|
|
17838
17807
|
name: (_optionMask$name$cata = optionMask === null || optionMask === void 0 || (_optionMask$name = optionMask.name) === null || _optionMask$name === void 0 ? void 0 : _optionMask$name[(_catalogData$api$getL = catalogData.api.getLanguage()) === null || _catalogData$api$getL === void 0 ? void 0 : _catalogData$api$getL.toLowerCase()]) !== null && _optionMask$name$cata !== void 0 ? _optionMask$name$cata : jsonOPT.Name,
|
|
@@ -17843,9 +17812,9 @@ var OptionCatalogData = /*#__PURE__*/function () {
|
|
|
17843
17812
|
image: jsonOPT.Image ? jsonOPT.Image : undefined,
|
|
17844
17813
|
invisible: (_optionMask$hidden = optionMask === null || optionMask === void 0 ? void 0 : optionMask.hidden) !== null && _optionMask$hidden !== void 0 ? _optionMask$hidden : jsonOPT.Invisible != undefined ? jsonOPT.Invisible : false,
|
|
17845
17814
|
maskTabgroup: optionMask === null || optionMask === void 0 || (_optionMask$tabGroup = optionMask.tabGroup) === null || _optionMask$tabGroup === void 0 ? void 0 : _optionMask$tabGroup[(_catalogData$api$getL2 = catalogData.api.getLanguage()) === null || _catalogData$api$getL2 === void 0 ? void 0 : _catalogData$api$getL2.toLowerCase()],
|
|
17846
|
-
layout: (_ref = (_optionMask$layout = optionMask === null || optionMask === void 0 ? void 0 : optionMask.layout) !== null && _optionMask$layout !== void 0 ? _optionMask$layout :
|
|
17815
|
+
layout: (_ref = (_optionMask$layout = optionMask === null || optionMask === void 0 ? void 0 : optionMask.layout) !== null && _optionMask$layout !== void 0 ? _optionMask$layout : properties === null || properties === void 0 || (_properties$find = properties.find(function (p) {
|
|
17847
17816
|
return p.Codex == 'LAYOUT';
|
|
17848
|
-
})) === null ||
|
|
17817
|
+
})) === null || _properties$find === void 0 ? void 0 : _properties$find.Value) !== null && _ref !== void 0 ? _ref : jsonOPT.Layout != undefined ? jsonOPT.Layout : 'IMAGE',
|
|
17849
17818
|
multiselect: jsonOPT.Multiselect != undefined ? jsonOPT.Multiselect == 'True' : false,
|
|
17850
17819
|
sendToPIM: !!jsonOPT.SendToPIM,
|
|
17851
17820
|
useMaxPriceOfGroup: jsonOPT.UseMaxPriceOfGroup != undefined ? Number(jsonOPT.UseMaxPriceOfGroup) : undefined,
|
|
@@ -17854,7 +17823,7 @@ var OptionCatalogData = /*#__PURE__*/function () {
|
|
|
17854
17823
|
hideInOrderText: jsonOPT.hideInOrderText != undefined ? jsonOPT.hideInOrderText == 'True' : false,
|
|
17855
17824
|
showOPVCodex: jsonOPT.showOPVCodex != undefined ? jsonOPT.showOPVCodex == 'True' : false,
|
|
17856
17825
|
showOPVAsArticleNr: typeof jsonOPT.showOPVAsArticleNr == 'boolean' ? jsonOPT.showOPVAsArticleNr : ((_jsonOPT$showOPVAsArt = jsonOPT.showOPVAsArticleNr) === null || _jsonOPT$showOPVAsArt === void 0 ? void 0 : _jsonOPT$showOPVAsArt.toLowerCase()) == 'true',
|
|
17857
|
-
property:
|
|
17826
|
+
property: properties,
|
|
17858
17827
|
parentOptionCodex: jsonOPT.ParentOptionCodex,
|
|
17859
17828
|
articlePlaceholder: jsonOPT.ArticlePlaceholder && jsonOPT.ArticlePlaceholder == 'True' ? true : false,
|
|
17860
17829
|
isMultiselect: jsonOPT.Multiselect != undefined ? jsonOPT.Multiselect == 'True' : false
|
|
@@ -18289,7 +18258,28 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18289
18258
|
// old tag
|
|
18290
18259
|
useDecisionPosCountValue: false,
|
|
18291
18260
|
useShelfPlannerRTV: false,
|
|
18292
|
-
notificationsRules: [
|
|
18261
|
+
notificationsRules: [{
|
|
18262
|
+
rules: [{
|
|
18263
|
+
visitedOptions: ['SHELFARTICLE_1'],
|
|
18264
|
+
articles: [''],
|
|
18265
|
+
jsFormula: '',
|
|
18266
|
+
variantValues: {}
|
|
18267
|
+
}],
|
|
18268
|
+
checkOnEvents: {
|
|
18269
|
+
option: 'GR',
|
|
18270
|
+
articleCodex: '',
|
|
18271
|
+
optionValue: ''
|
|
18272
|
+
},
|
|
18273
|
+
type: 'notification',
|
|
18274
|
+
showInModal: true,
|
|
18275
|
+
onlyShowOnce: true,
|
|
18276
|
+
messageTitle: {
|
|
18277
|
+
DE: 'ospele'
|
|
18278
|
+
},
|
|
18279
|
+
message: {
|
|
18280
|
+
DE: 'Achtung alle änderungen gehen verlohren... Bist du sicher?'
|
|
18281
|
+
}
|
|
18282
|
+
}],
|
|
18293
18283
|
warningRule: [],
|
|
18294
18284
|
summaryTabGroupPosition: undefined,
|
|
18295
18285
|
onConfigSingleDontGeneralize: false,
|
|
@@ -18335,7 +18325,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18335
18325
|
var _this$catalogMask$cat;
|
|
18336
18326
|
if ((_this$catalogMask$cat = this.catalogMask.catalog.name) !== null && _this$catalogMask$cat !== void 0 && _this$catalogMask$cat[this.api.getLanguage()]) this.catalogData.catalogName = this.catalogMask.catalog.name[this.api.getLanguage()];
|
|
18337
18327
|
if (this.catalogMask.catalog.name) this.catalogData.name_locales = this.catalogMask.catalog.name;
|
|
18338
|
-
if (this.catalogMask.catalog.properties) this.initProperties([].concat(_toConsumableArray__default["default"](this.origProperties), _toConsumableArray__default["default"](this.catalogMask.catalog.properties)));
|
|
18328
|
+
if (this.catalogMask.catalog.properties) this.initProperties([].concat(_toConsumableArray__default["default"](this.origProperties), _toConsumableArray__default["default"](Object.values(this.catalogMask.catalog.properties))));
|
|
18339
18329
|
}
|
|
18340
18330
|
}
|
|
18341
18331
|
}, {
|
|
@@ -18593,6 +18583,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18593
18583
|
_this.catalogData.bundleRules = JSON.parse(item.Value);
|
|
18594
18584
|
} else if (item.Codex == 'NOTIFICATIONS') {
|
|
18595
18585
|
_this.catalogData.notificationsRules = JSON.parse(item.Value);
|
|
18586
|
+
} else if (item.Codex == 'WARNINGS') {
|
|
18587
|
+
_this.catalogData.warningRule = JSON.parse(item.Value);
|
|
18596
18588
|
} else if (item.Codex == 'IGNORE_MAX_PRICE_AS_BASEPRICE') {
|
|
18597
18589
|
_this.catalogData.ignoreMaxPriceAsBP = item.Value == '1';
|
|
18598
18590
|
} else if (item.Codex == 'DONT_USE_VCODEX_FOR_BASKET') {
|
|
@@ -19614,7 +19606,7 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
|
|
|
19614
19606
|
key: "getCatalogData",
|
|
19615
19607
|
value: function () {
|
|
19616
19608
|
var _getCatalogData = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(state, catalogCodex, orderSet) {
|
|
19617
|
-
var catalogKey, promises, _yield$Promise$all, _yield$Promise$all2, catalogApiData, catalogArticleListData, catalogArticlePlannerListData, additionalModelInfos, catalogData, _state$actions;
|
|
19609
|
+
var catalogKey, promises, _yield$Promise$all, _yield$Promise$all2, catalogApiData, catalogArticleListData, catalogArticlePlannerListData, additionalModelInfos, mask, _state$catalogMask, catalogData, _state$actions;
|
|
19618
19610
|
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
19619
19611
|
while (1) switch (_context.prev = _context.next) {
|
|
19620
19612
|
case 0:
|
|
@@ -19626,7 +19618,7 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
|
|
|
19626
19618
|
return _context.abrupt("return", state.divaCatalogs[catalogKey]);
|
|
19627
19619
|
case 5:
|
|
19628
19620
|
if (!orderSet) {
|
|
19629
|
-
_context.next =
|
|
19621
|
+
_context.next = 46;
|
|
19630
19622
|
break;
|
|
19631
19623
|
}
|
|
19632
19624
|
// ab hier parallell laden
|
|
@@ -19647,43 +19639,49 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
|
|
|
19647
19639
|
throw new Error(catalogApiData.Error);
|
|
19648
19640
|
case 17:
|
|
19649
19641
|
additionalModelInfos = undefined;
|
|
19642
|
+
mask = undefined;
|
|
19643
|
+
_context.prev = 19;
|
|
19644
|
+
_context.next = 22;
|
|
19645
|
+
return state.api.getDataCache(state.api.getCatalogMaskQS(catalogApiData.GUID, state.api.OrganizationId), undefined, undefined, 'enricher');
|
|
19646
|
+
case 22:
|
|
19647
|
+
mask = _context.sent;
|
|
19650
19648
|
if (!(!state.api.dontLoadAdditionalModelInfos && catalogApiData.AccountGuid)) {
|
|
19651
|
-
_context.next =
|
|
19649
|
+
_context.next = 27;
|
|
19652
19650
|
break;
|
|
19653
19651
|
}
|
|
19654
|
-
_context.
|
|
19655
|
-
_context.next = 22;
|
|
19652
|
+
_context.next = 26;
|
|
19656
19653
|
return state.api.getDataCache(state.api.getAdditionalModelInfosQS(catalogApiData.AccountGuid, catalogApiData.GUID), undefined, undefined, 'catalog');
|
|
19657
|
-
case
|
|
19654
|
+
case 26:
|
|
19658
19655
|
additionalModelInfos = _context.sent;
|
|
19659
|
-
|
|
19656
|
+
case 27:
|
|
19657
|
+
_context.next = 32;
|
|
19660
19658
|
break;
|
|
19661
|
-
case
|
|
19662
|
-
_context.prev =
|
|
19659
|
+
case 29:
|
|
19660
|
+
_context.prev = 29;
|
|
19663
19661
|
_context.t0 = _context["catch"](19);
|
|
19664
19662
|
LOG$d.debug('no additionalModelInfos found: ' + _context.t0);
|
|
19665
|
-
case
|
|
19666
|
-
if (state.catalogMask) {
|
|
19663
|
+
case 32:
|
|
19664
|
+
if (state.catalogMask || mask) {
|
|
19667
19665
|
if (!additionalModelInfos) additionalModelInfos = {
|
|
19668
19666
|
_id: ''
|
|
19669
19667
|
};
|
|
19670
|
-
additionalModelInfos.catalogMask = state.catalogMask;
|
|
19668
|
+
additionalModelInfos.catalogMask = (_state$catalogMask = state.catalogMask) !== null && _state$catalogMask !== void 0 ? _state$catalogMask : mask;
|
|
19671
19669
|
}
|
|
19672
19670
|
catalogData = new DivaCatalogData(catalogApiData, orderSet, state.api, additionalModelInfos);
|
|
19673
19671
|
if (!(catalogArticleListData.Articles && catalogArticleListData.Articles.length > 0)) {
|
|
19674
|
-
_context.next =
|
|
19672
|
+
_context.next = 38;
|
|
19675
19673
|
break;
|
|
19676
19674
|
}
|
|
19677
19675
|
catalogData.initCatalogArticles(catalogArticleListData.Articles);
|
|
19678
|
-
_context.next =
|
|
19676
|
+
_context.next = 41;
|
|
19679
19677
|
break;
|
|
19680
|
-
case
|
|
19678
|
+
case 38:
|
|
19681
19679
|
DivaUtils__default["default"].endSpanOfApm('Catalog initialize');
|
|
19682
19680
|
LOG$d.error(new DivaUtils.DivaError('Catalog ' + catalogData.catalogName + ' not listed', {
|
|
19683
19681
|
code: 'WC_0002'
|
|
19684
19682
|
}));
|
|
19685
19683
|
throw new Error('Articles of Catalog: ' + catalogData.catalogCodex + ' are empty');
|
|
19686
|
-
case
|
|
19684
|
+
case 41:
|
|
19687
19685
|
if (catalogArticlePlannerListData.PlannerElements && catalogArticlePlannerListData.PlannerElements.length > 0) {
|
|
19688
19686
|
catalogData.initCatalogPlannerArticles(catalogArticlePlannerListData.PlannerElements);
|
|
19689
19687
|
}
|
|
@@ -19700,16 +19698,16 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
|
|
|
19700
19698
|
|
|
19701
19699
|
DivaUtils__default["default"].endSpanOfApm('Catalog initialize');
|
|
19702
19700
|
return _context.abrupt("return", state.divaCatalogs[catalogKey]);
|
|
19703
|
-
case
|
|
19701
|
+
case 46:
|
|
19704
19702
|
LOG$d.error(new DivaUtils.DivaError('Catalog: ' + catalogCodex + ' not initialized! and orderSet not set', {
|
|
19705
19703
|
code: 'WC_0007'
|
|
19706
19704
|
}));
|
|
19707
19705
|
return _context.abrupt("return", state.divaCatalogs[catalogKey]);
|
|
19708
|
-
case
|
|
19706
|
+
case 48:
|
|
19709
19707
|
case "end":
|
|
19710
19708
|
return _context.stop();
|
|
19711
19709
|
}
|
|
19712
|
-
}, _callee, null, [[19,
|
|
19710
|
+
}, _callee, null, [[19, 29]]);
|
|
19713
19711
|
}));
|
|
19714
19712
|
function getCatalogData(_x, _x2, _x3) {
|
|
19715
19713
|
return _getCatalogData.apply(this, arguments);
|
|
@@ -20219,12 +20217,6 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
20219
20217
|
set: function set(val) {
|
|
20220
20218
|
this.articleOptionState.freeTextLang = val;
|
|
20221
20219
|
}
|
|
20222
|
-
}, {
|
|
20223
|
-
key: "isNotVisualized",
|
|
20224
|
-
get: function get() {
|
|
20225
|
-
var _this$val20;
|
|
20226
|
-
return ((_this$val20 = this.val) === null || _this$val20 === void 0 ? void 0 : _this$val20.isDigitalized) == false && this.val.isTexture;
|
|
20227
|
-
}
|
|
20228
20220
|
}, {
|
|
20229
20221
|
key: "onlyVisibleIfNotUndock",
|
|
20230
20222
|
get: function get() {
|
|
@@ -20252,8 +20244,8 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
20252
20244
|
}, {
|
|
20253
20245
|
key: "warning",
|
|
20254
20246
|
get: function get() {
|
|
20255
|
-
var _this$
|
|
20256
|
-
if ((_this$
|
|
20247
|
+
var _this$val20;
|
|
20248
|
+
if ((_this$val20 = this.val) !== null && _this$val20 !== void 0 && _this$val20.isFreeText) {
|
|
20257
20249
|
if (this.val.measureMaximum && Number(this.freeText) > Number(this.val.measureMaximum) || this.val.measureMinimum && Number(this.freeText) < Number(this.val.measureMinimum)) {
|
|
20258
20250
|
return 'measureWarning';
|
|
20259
20251
|
}
|
|
@@ -20351,8 +20343,8 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
20351
20343
|
}]);
|
|
20352
20344
|
}();
|
|
20353
20345
|
|
|
20354
|
-
function ownKeys$
|
|
20355
|
-
function _objectSpread$
|
|
20346
|
+
function ownKeys$d(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; }
|
|
20347
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20356
20348
|
var LOG$c = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
20357
20349
|
var DivaArticle = /*#__PURE__*/function () {
|
|
20358
20350
|
//Hier steht die aktuelle Konfiguration
|
|
@@ -20562,7 +20554,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
20562
20554
|
var partlistArticle = this.partlistArticles[basketId];
|
|
20563
20555
|
if (!onlyVisible || partlistArticle.partlistArticleVisibleInTree) partlistArticles[basketId] = partlistArticle;
|
|
20564
20556
|
if (partlistArticle.hasPartlistArticle) {
|
|
20565
|
-
partlistArticles = _objectSpread$
|
|
20557
|
+
partlistArticles = _objectSpread$d(_objectSpread$d({}, partlistArticles), partlistArticle.getRecursivePartlistArticles(onlyVisible));
|
|
20566
20558
|
}
|
|
20567
20559
|
}
|
|
20568
20560
|
return partlistArticles;
|
|
@@ -20649,17 +20641,6 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
20649
20641
|
set: function set(val) {
|
|
20650
20642
|
this.article.toDeleteAfterInit = val;
|
|
20651
20643
|
}
|
|
20652
|
-
}, {
|
|
20653
|
-
key: "articleHasNotVisualizedValues",
|
|
20654
|
-
get: function get() {
|
|
20655
|
-
if (!this.model3DName) return false;
|
|
20656
|
-
for (var key in this.articleOptionStates) {
|
|
20657
|
-
if (!this.articleOptionStates[key].isNotVisualized) {
|
|
20658
|
-
return true;
|
|
20659
|
-
}
|
|
20660
|
-
}
|
|
20661
|
-
return false;
|
|
20662
|
-
}
|
|
20663
20644
|
}, {
|
|
20664
20645
|
key: "actSizeText",
|
|
20665
20646
|
get: function get() {
|
|
@@ -21034,13 +21015,13 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
21034
21015
|
}, {
|
|
21035
21016
|
key: "articleOptionStatesWithParents",
|
|
21036
21017
|
get: function get() {
|
|
21037
|
-
return _objectSpread$
|
|
21018
|
+
return _objectSpread$d(_objectSpread$d({}, this.getReqursiveArticleOptionStates()), this.articleOptionStatesData);
|
|
21038
21019
|
}
|
|
21039
21020
|
}, {
|
|
21040
21021
|
key: "getReqursiveArticleOptionStates",
|
|
21041
21022
|
value: function getReqursiveArticleOptionStates() {
|
|
21042
21023
|
var _this$partListParentA6, _this$partListParentA7, _this$partListParentA8, _this$partListParentA9, _this$accessoireParen3, _this$accessoireParen4, _this$accessoireParen5, _this$accessoireParen6;
|
|
21043
|
-
return _objectSpread$
|
|
21024
|
+
return _objectSpread$d(_objectSpread$d(_objectSpread$d(_objectSpread$d({}, (_this$partListParentA6 = (_this$partListParentA7 = this.partListParentArticle) === null || _this$partListParentA7 === void 0 ? void 0 : _this$partListParentA7.articleOptionStatesData) !== null && _this$partListParentA6 !== void 0 ? _this$partListParentA6 : {}), (_this$partListParentA8 = (_this$partListParentA9 = this.partListParentArticle) === null || _this$partListParentA9 === void 0 ? void 0 : _this$partListParentA9.getReqursiveArticleOptionStates()) !== null && _this$partListParentA8 !== void 0 ? _this$partListParentA8 : {}), (_this$accessoireParen3 = (_this$accessoireParen4 = this.accessoireParentArticle) === null || _this$accessoireParen4 === void 0 ? void 0 : _this$accessoireParen4.articleOptionStatesData) !== null && _this$accessoireParen3 !== void 0 ? _this$accessoireParen3 : {}), (_this$accessoireParen5 = (_this$accessoireParen6 = this.accessoireParentArticle) === null || _this$accessoireParen6 === void 0 ? void 0 : _this$accessoireParen6.getReqursiveArticleOptionStates()) !== null && _this$accessoireParen5 !== void 0 ? _this$accessoireParen5 : {});
|
|
21044
21025
|
}
|
|
21045
21026
|
}, {
|
|
21046
21027
|
key: "clearArticleOptionStates",
|
|
@@ -22803,7 +22784,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22803
22784
|
RuleDesc: myRuleDesc,
|
|
22804
22785
|
RuleDesc_locales: myRuleDesc_locales,
|
|
22805
22786
|
PosInvisibility: myPartListPos.PosInvisibility,
|
|
22806
|
-
VariantValues: _objectSpread$
|
|
22787
|
+
VariantValues: _objectSpread$d(_objectSpread$d({}, (_previousPartlistArti = previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantValues) !== null && _previousPartlistArti !== void 0 ? _previousPartlistArti : {}), newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {}),
|
|
22807
22788
|
VariantItemData: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantItemData,
|
|
22808
22789
|
optionImgForPrint: optionImgForPrint,
|
|
22809
22790
|
optionsForPrint: optionsForPrint
|
|
@@ -22877,7 +22858,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22877
22858
|
}
|
|
22878
22859
|
for (var key in this.articleOptionStates) {
|
|
22879
22860
|
var myOPS = this.articleOptionStates[key];
|
|
22880
|
-
myOPS.visibleOptionValues = _objectSpread$
|
|
22861
|
+
myOPS.visibleOptionValues = _objectSpread$d({}, myOPS.option.articleOptionValues);
|
|
22881
22862
|
myOPS.visibleCount = Object.keys(myOPS.option.articleOptionValues).length;
|
|
22882
22863
|
myOPS.definedBySetFeatureFixed = false;
|
|
22883
22864
|
}
|
|
@@ -23108,7 +23089,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23108
23089
|
}
|
|
23109
23090
|
if (ruleValid) {
|
|
23110
23091
|
ruleWasValidOnce = true;
|
|
23111
|
-
if (m == 0) validOPVs[OPT] = _objectSpread$
|
|
23092
|
+
if (m == 0) validOPVs[OPT] = _objectSpread$d({}, possibleOPVs);
|
|
23112
23093
|
opvCodex = opvCodex.slice(1);
|
|
23113
23094
|
if (possibleOPVs[opvCodex] != null) delete validOPVs[OPT][opvCodex];
|
|
23114
23095
|
}
|
|
@@ -23504,7 +23485,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23504
23485
|
break;
|
|
23505
23486
|
}
|
|
23506
23487
|
_context.next = 4;
|
|
23507
|
-
return Promise.resolve().then(function () { return require('./ShelfPlanner-
|
|
23488
|
+
return Promise.resolve().then(function () { return require('./ShelfPlanner-0329c88f.js'); });
|
|
23508
23489
|
case 4:
|
|
23509
23490
|
_yield$import = _context.sent;
|
|
23510
23491
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -23568,6 +23549,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23568
23549
|
calcUnitPrice = 0,
|
|
23569
23550
|
calcUnit2Price = 0,
|
|
23570
23551
|
firstUnit2Param = 0,
|
|
23552
|
+
secondUnit2Param = 0,
|
|
23571
23553
|
idmPriceMeasureFactor = 1;
|
|
23572
23554
|
//CalcPreise berechnen
|
|
23573
23555
|
for (var i = 0; i < maxPriceOfGroupCodex.length; i++) {
|
|
@@ -23598,76 +23580,82 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23598
23580
|
if (myArtOPS.replaceMainArtNr) {
|
|
23599
23581
|
this.configArticleCodex = myArtOPS.replaceMainArtNr;
|
|
23600
23582
|
}
|
|
23583
|
+
var name = myArtOPS.name;
|
|
23584
|
+
console.log('name', name);
|
|
23601
23585
|
if (!tmpOPT.useMaxPriceOfGroup) {
|
|
23602
23586
|
myArtOPS.calcPrice = myArtOPS.price * myArtOPS.quantity;
|
|
23603
23587
|
}
|
|
23604
|
-
|
|
23605
|
-
|
|
23606
|
-
|
|
23607
|
-
|
|
23608
|
-
|
|
23609
|
-
|
|
23610
|
-
|
|
23611
|
-
|
|
23612
|
-
|
|
23613
|
-
|
|
23614
|
-
|
|
23615
|
-
|
|
23616
|
-
|
|
23617
|
-
|
|
23618
|
-
|
|
23619
|
-
|
|
23620
|
-
|
|
23621
|
-
|
|
23622
|
-
|
|
23623
|
-
|
|
23624
|
-
|
|
23625
|
-
|
|
23626
|
-
|
|
23627
|
-
}
|
|
23628
|
-
if (mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
|
|
23629
|
-
var freeTextMeasure = parseFloat(myArtOPS.freeText ? myArtOPS.freeText : '');
|
|
23630
|
-
if (freeTextMeasure || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
|
|
23631
|
-
if (calcUnitPrice != 0) {
|
|
23632
|
-
var quantity = 0;
|
|
23633
|
-
if (OP == 'OPTUMFANG') {
|
|
23634
|
-
mUnit = 'cm';
|
|
23635
|
-
quantity = this.calcWidth * 2 + this.calcDepth * 2;
|
|
23636
|
-
} else if (OP == 'OPTUMFANG_KREIS') {
|
|
23637
|
-
mUnit = 'cm';
|
|
23638
|
-
quantity = this.calcWidth * Math.PI;
|
|
23588
|
+
if (pUnit !== null && pUnit !== void 0 && pUnit.includes('2') && calcUnit2Price && firstUnit2Param && secondUnit2Param) {
|
|
23589
|
+
var unit2Price = this.getCalcPerUnit(pUnit, myArtOPS.calcPrice);
|
|
23590
|
+
myArtOPS.usedCalcPrice = unit2Price * firstUnit2Param * secondUnit2Param;
|
|
23591
|
+
} else {
|
|
23592
|
+
switch (pUnit) {
|
|
23593
|
+
case 'm':
|
|
23594
|
+
calcUnitPrice += myArtOPS.calcPrice / 100;
|
|
23595
|
+
break;
|
|
23596
|
+
case 'cm':
|
|
23597
|
+
calcUnitPrice += myArtOPS.calcPrice;
|
|
23598
|
+
break;
|
|
23599
|
+
case 'm2':
|
|
23600
|
+
calcUnit2Price += myArtOPS.calcPrice / 10000;
|
|
23601
|
+
break;
|
|
23602
|
+
case 'cm2':
|
|
23603
|
+
calcUnit2Price += myArtOPS.calcPrice;
|
|
23604
|
+
break;
|
|
23605
|
+
default:
|
|
23606
|
+
if (myArtOPS.isPercentage) {
|
|
23607
|
+
//hier myArtOPS.TargetOption auswerten
|
|
23608
|
+
if (myArtOPS.targetOption && myArtOPS.targetOption != '') ; else {
|
|
23609
|
+
myArtOPS.usedCalcPrice = myArtOPS.calcPrice;
|
|
23610
|
+
}
|
|
23639
23611
|
} else {
|
|
23640
|
-
|
|
23612
|
+
myArtOPS.usedCalcPrice = DivaUtils__default["default"].decimalAdjust('round', myArtOPS.calcPrice, digits);
|
|
23641
23613
|
}
|
|
23642
|
-
|
|
23643
|
-
|
|
23644
|
-
|
|
23645
|
-
|
|
23646
|
-
|
|
23647
|
-
|
|
23648
|
-
|
|
23649
|
-
|
|
23650
|
-
|
|
23614
|
+
break;
|
|
23615
|
+
}
|
|
23616
|
+
if (mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
|
|
23617
|
+
var freeTextMeasure = parseFloat(myArtOPS.freeText ? myArtOPS.freeText : '');
|
|
23618
|
+
if (freeTextMeasure || (OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') && calcUnitPrice != 0) {
|
|
23619
|
+
if (calcUnitPrice != 0) {
|
|
23620
|
+
var quantity = 0;
|
|
23621
|
+
if (OP == 'OPTUMFANG') {
|
|
23622
|
+
mUnit = 'cm';
|
|
23623
|
+
quantity = this.calcWidth * 2 + this.calcDepth * 2;
|
|
23624
|
+
} else if (OP == 'OPTUMFANG_KREIS') {
|
|
23625
|
+
mUnit = 'cm';
|
|
23626
|
+
quantity = this.calcWidth * Math.PI;
|
|
23627
|
+
} else {
|
|
23628
|
+
quantity = freeTextMeasure;
|
|
23629
|
+
}
|
|
23630
|
+
if (mUnit == 'cm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity;else if (mUnit == 'm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity * 100;
|
|
23631
|
+
} else if (calcUnit2Price != 0) {
|
|
23632
|
+
//for diamter option
|
|
23633
|
+
if (myArtOPS.option.diameter) {
|
|
23634
|
+
myArtOPS.usedCalcPrice = calcUnit2Price * this.calcWidth * this.calcDepth;
|
|
23651
23635
|
} else {
|
|
23652
|
-
|
|
23653
|
-
|
|
23654
|
-
|
|
23636
|
+
if (firstUnit2Param == 0) {
|
|
23637
|
+
firstUnit2Param = freeTextMeasure;
|
|
23638
|
+
if (mUnit == 'm') firstUnit2Param = firstUnit2Param * 100;
|
|
23639
|
+
} else {
|
|
23640
|
+
secondUnit2Param = freeTextMeasure;
|
|
23641
|
+
if (mUnit == 'm') secondUnit2Param = secondUnit2Param * 100;
|
|
23642
|
+
myArtOPS.usedCalcPrice = calcUnit2Price * firstUnit2Param * secondUnit2Param;
|
|
23643
|
+
}
|
|
23655
23644
|
}
|
|
23656
23645
|
}
|
|
23657
23646
|
}
|
|
23658
23647
|
}
|
|
23659
|
-
|
|
23660
|
-
|
|
23661
|
-
|
|
23662
|
-
|
|
23663
|
-
|
|
23664
|
-
|
|
23665
|
-
|
|
23666
|
-
|
|
23667
|
-
|
|
23648
|
+
if (OP == 'OPT95' && !!this.catalogArticle.widthHasPrice) {
|
|
23649
|
+
idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcWidth;
|
|
23650
|
+
}
|
|
23651
|
+
if (OP == 'OPT96' && !!this.catalogArticle.depthHasPrice) {
|
|
23652
|
+
idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcDepth;
|
|
23653
|
+
}
|
|
23654
|
+
if (OP == 'OPT97' && !!this.catalogArticle.heightHasPrice) {
|
|
23655
|
+
idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcHeight;
|
|
23656
|
+
}
|
|
23668
23657
|
}
|
|
23669
23658
|
}
|
|
23670
|
-
|
|
23671
23659
|
//jetzt nochmal prozentuelle Preise mit TargetOption berechnen
|
|
23672
23660
|
for (var _iKey3 in myArtOPSs) {
|
|
23673
23661
|
var _myArtOPS = myArtOPSs[_iKey3];
|
|
@@ -23763,6 +23751,21 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23763
23751
|
}
|
|
23764
23752
|
this.article.price = articleUsedCalcPrice;
|
|
23765
23753
|
}
|
|
23754
|
+
}, {
|
|
23755
|
+
key: "getCalcPerUnit",
|
|
23756
|
+
value: function getCalcPerUnit(unit, calcPrice) {
|
|
23757
|
+
switch (unit) {
|
|
23758
|
+
case 'm':
|
|
23759
|
+
return calcPrice / 100;
|
|
23760
|
+
case 'cm':
|
|
23761
|
+
return calcPrice;
|
|
23762
|
+
case 'm2':
|
|
23763
|
+
return calcPrice / 10000;
|
|
23764
|
+
case 'cm2':
|
|
23765
|
+
return calcPrice;
|
|
23766
|
+
}
|
|
23767
|
+
return 0;
|
|
23768
|
+
}
|
|
23766
23769
|
}, {
|
|
23767
23770
|
key: "getOptionPrice",
|
|
23768
23771
|
value: function getOptionPrice(calculatedPrice, optItem, digits) {
|
|
@@ -24085,7 +24088,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24085
24088
|
*/
|
|
24086
24089
|
}, {
|
|
24087
24090
|
key: "getPlannerConfigData",
|
|
24088
|
-
value: function getPlannerConfigData(accessoireArticles,
|
|
24091
|
+
value: function getPlannerConfigData(accessoireArticles, alternateRenderInfo) {
|
|
24089
24092
|
var _this$doorPlanner2, _this$doorPlanner3;
|
|
24090
24093
|
var ret = {
|
|
24091
24094
|
N: this.name,
|
|
@@ -24093,8 +24096,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24093
24096
|
ArtNr: this.article.catalogArticle.articleCodex,
|
|
24094
24097
|
CFG: []
|
|
24095
24098
|
};
|
|
24096
|
-
|
|
24097
|
-
|
|
24099
|
+
this.addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo);
|
|
24100
|
+
ret.CFG.push({
|
|
24098
24101
|
OPT: 'QUANTITY',
|
|
24099
24102
|
OPV: this.quantity.toString()
|
|
24100
24103
|
});
|
|
@@ -24123,41 +24126,32 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24123
24126
|
ret['MOVE'] = doorInfo;
|
|
24124
24127
|
}
|
|
24125
24128
|
return {
|
|
24126
|
-
config: ret
|
|
24127
|
-
containsTextureNotDigitalized: containsTextureNotDigitalized
|
|
24129
|
+
config: ret
|
|
24128
24130
|
};
|
|
24129
24131
|
}
|
|
24130
24132
|
}, {
|
|
24131
24133
|
key: "addOptionStateFromArticleToPlannerData",
|
|
24132
24134
|
value: function addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo) {
|
|
24133
|
-
var containsTextureNotDigitalized = false;
|
|
24134
24135
|
for (var key in this.articleOptionStates) {
|
|
24135
|
-
|
|
24136
|
-
containsTextureNotDigitalized = true;
|
|
24137
|
-
}
|
|
24136
|
+
this.addOptionStateToPlannerData(ret, this.articleOptionStates[key], alternateRenderInfo);
|
|
24138
24137
|
}
|
|
24139
24138
|
for (var _key5 in this.article.partlistArticles) {
|
|
24140
24139
|
var partlistArticle = this.article.partlistArticles[_key5];
|
|
24141
24140
|
if (!partlistArticle.hasOptionsThatParentDoesNotHave) continue;
|
|
24142
|
-
|
|
24143
|
-
containsTextureNotDigitalized = true;
|
|
24144
|
-
}
|
|
24141
|
+
partlistArticle.addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo);
|
|
24145
24142
|
}
|
|
24146
|
-
return containsTextureNotDigitalized;
|
|
24147
24143
|
}
|
|
24148
24144
|
}, {
|
|
24149
24145
|
key: "addOptionStateToPlannerData",
|
|
24150
24146
|
value: function addOptionStateToPlannerData(ret, ops, alternateRenderInfo) {
|
|
24151
24147
|
var opv;
|
|
24152
24148
|
var opt;
|
|
24153
|
-
var containsTextureNotDigitalized = false;
|
|
24154
24149
|
if (ops.val) {
|
|
24155
24150
|
var _ops$val$ocd, _ops$option$ocd;
|
|
24156
24151
|
opv = (_ops$val$ocd = ops.val.ocd) !== null && _ops$val$ocd !== void 0 ? _ops$val$ocd : ops.val.codex;
|
|
24157
24152
|
if (this.CatalogData.isIDM3DCat && ops.val.vCodex) opv = 'OPV' + ops.idmVariantenArt + '_' + ops.val.vCodex;
|
|
24158
24153
|
opt = (_ops$option$ocd = ops.option.ocd) !== null && _ops$option$ocd !== void 0 ? _ops$option$ocd : ops.optionCodex;
|
|
24159
24154
|
if (alternateRenderInfo != undefined && alternateRenderInfo.hideOptionsIn3DImage.includes(opt)) return;
|
|
24160
|
-
if (!ops.val.isDigitalized && ops.val.isTexture) containsTextureNotDigitalized = true;
|
|
24161
24155
|
ret.CFG.push({
|
|
24162
24156
|
OPT: opt,
|
|
24163
24157
|
OPV: opv
|
|
@@ -24182,7 +24176,6 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24182
24176
|
});
|
|
24183
24177
|
}
|
|
24184
24178
|
}
|
|
24185
|
-
return containsTextureNotDigitalized;
|
|
24186
24179
|
}
|
|
24187
24180
|
}, {
|
|
24188
24181
|
key: "getAccessoireMATData",
|
|
@@ -24244,7 +24237,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24244
24237
|
key: "getVariantBasketData",
|
|
24245
24238
|
value: function getVariantBasketData() {
|
|
24246
24239
|
var variantBasketData = [];
|
|
24247
|
-
var opsObj = _objectSpread$
|
|
24240
|
+
var opsObj = _objectSpread$d({}, this.articleOptionStates);
|
|
24248
24241
|
if (this.article.optionsForPrint) {
|
|
24249
24242
|
for (var i = 0; i < this.article.optionsForPrint.length; i++) {
|
|
24250
24243
|
var ops = this.getArticleOptionState(this.article.optionsForPrint[i]);
|
|
@@ -24430,8 +24423,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24430
24423
|
}]);
|
|
24431
24424
|
}();
|
|
24432
24425
|
|
|
24433
|
-
function ownKeys$
|
|
24434
|
-
function _objectSpread$
|
|
24426
|
+
function ownKeys$c(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; }
|
|
24427
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24435
24428
|
var LOG$b = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
24436
24429
|
|
|
24437
24430
|
//Diese Klasse verwaltet den Optionsbaum und ladelogik etc. eines Artikels
|
|
@@ -24650,7 +24643,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
24650
24643
|
return _context5.abrupt("continue", 37);
|
|
24651
24644
|
case 11:
|
|
24652
24645
|
if (targetArticlesWithNewValues.includes(targetArticlesToUpdate[i])) {
|
|
24653
|
-
valuesArray[i] = actArticle.getValidValues(_objectSpread$
|
|
24646
|
+
valuesArray[i] = actArticle.getValidValues(_objectSpread$c({}, myValues), actArticle.CatalogData.mergeOptionsToSameOption);
|
|
24654
24647
|
}
|
|
24655
24648
|
if (!(Object.entries(valuesArray[i]).length > 0 || from !== null && from !== void 0 && from.startsWith('initializing'))) {
|
|
24656
24649
|
_context5.next = 32;
|
|
@@ -25284,7 +25277,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25284
25277
|
}
|
|
25285
25278
|
doLoadItem.BasketID = nArticle.basketId;
|
|
25286
25279
|
_context14.next = 9;
|
|
25287
|
-
return this.toDoAfterArticleLoaded(nArticle, {}, _objectSpread$
|
|
25280
|
+
return this.toDoAfterArticleLoaded(nArticle, {}, _objectSpread$c(_objectSpread$c({}, doLoadItem.VariantValues), newConfigValues), 'initializingPartlist', doLoadItem.VariantItemData);
|
|
25288
25281
|
case 9:
|
|
25289
25282
|
article.addPartlistArticle(nArticle);
|
|
25290
25283
|
case 10:
|
|
@@ -25428,7 +25421,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25428
25421
|
if (ruleValid) break;
|
|
25429
25422
|
}
|
|
25430
25423
|
if (ruleValid) {
|
|
25431
|
-
returnValue.push(_objectSpread$
|
|
25424
|
+
returnValue.push(_objectSpread$c(_objectSpread$c({}, entry), {}, {
|
|
25432
25425
|
index: i
|
|
25433
25426
|
}));
|
|
25434
25427
|
break;
|
|
@@ -26410,7 +26403,6 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
26410
26403
|
var optionStep = step === null || step === void 0 ? void 0 : step.optionStep;
|
|
26411
26404
|
var paletteType = 'SMALL';
|
|
26412
26405
|
if (configStep && optionStep) {
|
|
26413
|
-
var _set$api$ReturnToFrom;
|
|
26414
26406
|
var optionState = articles[configStep.targetArticles[0]][configStep.option];
|
|
26415
26407
|
if (configStep.option == 'OPTVINYL' || configStep.option == 'OPTVINYL_1' || configStep.option == 'OPTFABRIC' || configStep.option == 'OPTBE' || configStep.option == 'OPTBE_AUSSEN' || configStep.option == 'OPTBE_INNEN' || configStep.option == 'OPTBE_PANEELE' || configStep.option == 'OPTMATRATZE_BE' || configStep.option == 'OPTBE_UG' || configStep.option == 'OPTBEZUG' || configStep.option == 'OPTKO' || configStep.option == 'OPTFR' || configStep.option == 'OPTNI' || configStep.option == 'OPTUF_FA' || configStep.option == 'OPTBE_NETZ' || configStep.option == 'OPTBE_AL' || configStep.option == 'OPTKISSEN_BE' || configStep.option == 'OPTKP_BE' || configStep.option == 'OPTARM_BE' || configStep.option == 'OPTBE_KT' || configStep.option == 'OPT3' || configStep.option == 'OPT5' || configStep.option == 'OPTBE_KNOEPFE' || configStep.option == 'OPTSK_FARBE' || configStep.option == 'OPTBANDFARBE' || configStep.option == 'OPTBE_BOX' || configStep.option == 'OPTMA_AF_BE' || configStep.option == 'OPTTOPPER_BE' || optionState.option.hasOPG && optionState.hasImages || optionStep.mergesToOPG) {
|
|
26416
26408
|
paletteType = 'GAL';
|
|
@@ -26438,31 +26430,15 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
26438
26430
|
if (paletteType == 'GALLERY') {
|
|
26439
26431
|
paletteType = 'GAL';
|
|
26440
26432
|
}
|
|
26441
|
-
//TODO correct with franz
|
|
26442
|
-
if ((!set.api.getDiva3DSuppressCacheCreation() && set.api.getDiva3dUseImageCache() || (_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.startsWith('FAVORITS')) && paletteType == 'DROPDOWN_TEXT') paletteType = 'VERY_SMALL';
|
|
26443
26433
|
}
|
|
26444
26434
|
return paletteType;
|
|
26445
26435
|
}
|
|
26446
26436
|
}, {
|
|
26447
26437
|
key: "getStepInfo",
|
|
26448
26438
|
value: function getStepInfo(configStepKey, optionStatesOfArticle) {
|
|
26449
|
-
var
|
|
26450
|
-
|
|
26451
|
-
|
|
26452
|
-
if (allSteps !== null && allSteps !== void 0 && allSteps.optionStep) {
|
|
26453
|
-
for (var i = 0; i < targetArticles.length; i++) {
|
|
26454
|
-
if (optionStatesOfArticle[targetArticles[i]][allSteps.optionStep.codex].isNotVisualized) {
|
|
26455
|
-
isNotVisualized = true;
|
|
26456
|
-
break;
|
|
26457
|
-
}
|
|
26458
|
-
}
|
|
26459
|
-
}
|
|
26460
|
-
if (isNotVisualized) {
|
|
26461
|
-
return 'SHOW_NOT_VISUALIZED_WARNINIG';
|
|
26462
|
-
}
|
|
26463
|
-
if (allSteps !== null && allSteps !== void 0 && allSteps.configStep.warning) {
|
|
26464
|
-
return allSteps.configStep.warning;
|
|
26465
|
-
}
|
|
26439
|
+
var allSteps = this.getAllByKey(configStepKey);
|
|
26440
|
+
if (allSteps !== null && allSteps !== void 0 && allSteps.optionStep) ;
|
|
26441
|
+
if (allSteps !== null && allSteps !== void 0 && allSteps.configStep.warning) return allSteps.configStep.warning;
|
|
26466
26442
|
return undefined;
|
|
26467
26443
|
}
|
|
26468
26444
|
}, {
|
|
@@ -26770,8 +26746,8 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
26770
26746
|
function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
26771
26747
|
function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
|
|
26772
26748
|
function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
26773
|
-
function ownKeys$
|
|
26774
|
-
function _objectSpread$
|
|
26749
|
+
function ownKeys$b(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; }
|
|
26750
|
+
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26775
26751
|
var LOG$9 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
26776
26752
|
var DivaSet = /*#__PURE__*/function () {
|
|
26777
26753
|
function DivaSet(catalog, _setId, orderSet, initSetState) {
|
|
@@ -26866,7 +26842,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
26866
26842
|
_context.next = 10;
|
|
26867
26843
|
break;
|
|
26868
26844
|
}
|
|
26869
|
-
validValues = repairVariantValuesAndPlanner ? article.getValidValues(_objectSpread$
|
|
26845
|
+
validValues = repairVariantValuesAndPlanner ? article.getValidValues(_objectSpread$b({}, variantValues), article.CatalogData.mergeOptionsToSameOption) : {};
|
|
26870
26846
|
_context.t0 = partlistArticlesToLoad;
|
|
26871
26847
|
_context.next = 8;
|
|
26872
26848
|
return articleHandlerInstance.updateCfgValues(article, repairVariantValuesAndPlanner ? validValues : variantValues, {}, undefined, loadPlas);
|
|
@@ -26981,7 +26957,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
26981
26957
|
}
|
|
26982
26958
|
return false;
|
|
26983
26959
|
});
|
|
26984
|
-
_defineProperty__default["default"](this, "getPlannerConfigData", function (elementId,
|
|
26960
|
+
_defineProperty__default["default"](this, "getPlannerConfigData", function (elementId, alternateRenderInfo) {
|
|
26985
26961
|
var article = _this.getArticleByElementId(elementId);
|
|
26986
26962
|
var articleAccs = [];
|
|
26987
26963
|
for (var key in article === null || article === void 0 ? void 0 : article.accessoires) {
|
|
@@ -26989,7 +26965,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
26989
26965
|
}
|
|
26990
26966
|
var plannerConfigData = {
|
|
26991
26967
|
config: {},
|
|
26992
|
-
containsTextureNotDigitalized: false,
|
|
26993
26968
|
accs: articleAccs
|
|
26994
26969
|
};
|
|
26995
26970
|
if (article) {
|
|
@@ -27003,9 +26978,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27003
26978
|
}
|
|
27004
26979
|
}
|
|
27005
26980
|
}
|
|
27006
|
-
var result = article.getPlannerConfigData(accessoireArticles,
|
|
26981
|
+
var result = article.getPlannerConfigData(accessoireArticles, alternateRenderInfo);
|
|
27007
26982
|
plannerConfigData.config = result.config;
|
|
27008
|
-
plannerConfigData.containsTextureNotDigitalized = result.containsTextureNotDigitalized;
|
|
27009
26983
|
}
|
|
27010
26984
|
return plannerConfigData;
|
|
27011
26985
|
});
|
|
@@ -27013,7 +26987,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27013
26987
|
var article = _this.getArticleByBasketId(basketId);
|
|
27014
26988
|
var plannerConfigData = {
|
|
27015
26989
|
config: {},
|
|
27016
|
-
containsTextureNotDigitalized: false,
|
|
27017
26990
|
accs: []
|
|
27018
26991
|
};
|
|
27019
26992
|
if (article) {
|
|
@@ -27021,9 +26994,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27021
26994
|
for (var key in article === null || article === void 0 ? void 0 : article.accessoires) {
|
|
27022
26995
|
if (article.accessoires[key].elementId) articleAccs.push(article.accessoires[key].elementId);
|
|
27023
26996
|
}
|
|
27024
|
-
var result = article.getPlannerConfigData(article.accessoires
|
|
26997
|
+
var result = article.getPlannerConfigData(article.accessoires);
|
|
27025
26998
|
plannerConfigData.config = result.config;
|
|
27026
|
-
plannerConfigData.containsTextureNotDigitalized = result.containsTextureNotDigitalized;
|
|
27027
26999
|
plannerConfigData.accs = articleAccs;
|
|
27028
27000
|
}
|
|
27029
27001
|
return plannerConfigData;
|
|
@@ -27119,7 +27091,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27119
27091
|
if (this.catalogData.useBoxPlanner) {
|
|
27120
27092
|
plannerMode = 'BoxPlanner';
|
|
27121
27093
|
} else if (this.catalogData.has3dModels) {
|
|
27122
|
-
var _this$WebConfig;
|
|
27123
27094
|
for (var key in this.divaArticles) {
|
|
27124
27095
|
if (this.divaArticles[key].model3DName) {
|
|
27125
27096
|
plannerMode = '3DImage';
|
|
@@ -27131,9 +27102,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27131
27102
|
if (Object.entries(this.divaArticles).length == 0) {
|
|
27132
27103
|
plannerMode = '3DImage';
|
|
27133
27104
|
}
|
|
27134
|
-
if ((_this$WebConfig = this.WebConfig) !== null && _this$WebConfig !== void 0 && _this$WebConfig.diva3dUseSirvViewer) {
|
|
27135
|
-
plannerMode = 'SirvViewer_only';
|
|
27136
|
-
}
|
|
27137
27105
|
if (this.catalogData.divaArReady && this.catalogData.useShelfPlannerRTV) {
|
|
27138
27106
|
//TODO Matthias sauber initialisieren ob in RTV oder IMAGE3D gestartet wird.
|
|
27139
27107
|
plannerMode = 'RTViewer';
|
|
@@ -27152,7 +27120,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27152
27120
|
plannerMode = 'No';
|
|
27153
27121
|
}
|
|
27154
27122
|
this.plannerMode = plannerMode;
|
|
27155
|
-
this.setType = plannerMode == 'No'
|
|
27123
|
+
this.setType = plannerMode == 'No' ? 'ARTICLE' : 'PLANNING';
|
|
27156
27124
|
return plannerMode;
|
|
27157
27125
|
}
|
|
27158
27126
|
}, {
|
|
@@ -27447,8 +27415,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27447
27415
|
var articles = {};
|
|
27448
27416
|
for (var basketId in this.divaArticles) {
|
|
27449
27417
|
articles[basketId] = this.divaArticles[basketId];
|
|
27450
|
-
if (allPartlistArticlesAlso) articles = _objectSpread$
|
|
27451
|
-
if (visiblePartlistArticlesAlso) articles = _objectSpread$
|
|
27418
|
+
if (allPartlistArticlesAlso) articles = _objectSpread$b(_objectSpread$b({}, articles), articles[basketId].getRecursivePartlistArticles());
|
|
27419
|
+
if (visiblePartlistArticlesAlso) articles = _objectSpread$b(_objectSpread$b({}, articles), articles[basketId].getRecursivePartlistArticles(true));
|
|
27452
27420
|
}
|
|
27453
27421
|
return articles;
|
|
27454
27422
|
}
|
|
@@ -27943,8 +27911,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27943
27911
|
}, {
|
|
27944
27912
|
key: "remindPriceForHash",
|
|
27945
27913
|
value: function remindPriceForHash(product) {
|
|
27946
|
-
var _product$discountedPr, _product$discountedPr2;
|
|
27947
|
-
if (!product.
|
|
27914
|
+
var _product$availableFor, _product$discountedPr, _product$discountedPr2;
|
|
27915
|
+
if (!((_product$availableFor = product.availableForOrganizations) !== null && _product$availableFor !== void 0 && _product$availableFor.includes(this.getSetState.organizationId))) return;
|
|
27948
27916
|
var claculatedPrice = this.getSetPrice(true);
|
|
27949
27917
|
if (!product.discountedPrice && product.addedPrice === product.calculatedPrice && claculatedPrice == product.calculatedPrice) {
|
|
27950
27918
|
return;
|
|
@@ -27970,7 +27938,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27970
27938
|
break;
|
|
27971
27939
|
}
|
|
27972
27940
|
_context4.next = 3;
|
|
27973
|
-
return Promise.resolve().then(function () { return require('./DoorPlanner-
|
|
27941
|
+
return Promise.resolve().then(function () { return require('./DoorPlanner-704880a1.js'); });
|
|
27974
27942
|
case 3:
|
|
27975
27943
|
_yield$import = _context4.sent;
|
|
27976
27944
|
DoorPlanner = _yield$import["default"];
|
|
@@ -28075,8 +28043,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28075
28043
|
}, {
|
|
28076
28044
|
key: "hasStaticRoomList",
|
|
28077
28045
|
get: function get() {
|
|
28078
|
-
var _this$
|
|
28079
|
-
if (this.CatalogData.roomList3DStaticBGImage.size > 0 && (_this$
|
|
28046
|
+
var _this$WebConfig;
|
|
28047
|
+
if (this.CatalogData.roomList3DStaticBGImage.size > 0 && (_this$WebConfig = this.WebConfig) !== null && _this$WebConfig !== void 0 && _this$WebConfig.diva3dStaticBGImage) {
|
|
28080
28048
|
return true;
|
|
28081
28049
|
}
|
|
28082
28050
|
return false;
|
|
@@ -28117,8 +28085,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28117
28085
|
}, {
|
|
28118
28086
|
key: "ViewConfig",
|
|
28119
28087
|
get: function get() {
|
|
28120
|
-
var _this$
|
|
28121
|
-
return (_this$
|
|
28088
|
+
var _this$WebConfig2;
|
|
28089
|
+
return (_this$WebConfig2 = this.WebConfig) === null || _this$WebConfig2 === void 0 ? void 0 : _this$WebConfig2.viewConfig;
|
|
28122
28090
|
}
|
|
28123
28091
|
}, {
|
|
28124
28092
|
key: "i18n",
|
|
@@ -29395,7 +29363,7 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
29395
29363
|
if (article.getArticleOptionState('OPT' + optionCodexes[0])) {
|
|
29396
29364
|
for (var i = 0; i < optionCodexes.length; i++) {
|
|
29397
29365
|
var optionState = article.getArticleOptionState('OPT' + optionCodexes[i]);
|
|
29398
|
-
if (!optionState.isInvisible && optionState.isDoShow && optionState.visibleCount > 0 && optionState.valCodex != 'OPVNR') {
|
|
29366
|
+
if (optionState && !optionState.isInvisible && optionState.isDoShow && optionState.visibleCount > 0 && optionState.valCodex != 'OPVNR') {
|
|
29399
29367
|
opss.push(optionState);
|
|
29400
29368
|
}
|
|
29401
29369
|
}
|
|
@@ -29605,8 +29573,8 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
29605
29573
|
}();
|
|
29606
29574
|
var summaryHandlerInstance = new SummaryHandler();
|
|
29607
29575
|
|
|
29608
|
-
function ownKeys$
|
|
29609
|
-
function _objectSpread$
|
|
29576
|
+
function ownKeys$a(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; }
|
|
29577
|
+
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29610
29578
|
DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
29611
29579
|
var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
29612
29580
|
function DivaFavoritesHandler() {
|
|
@@ -29687,10 +29655,10 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
29687
29655
|
setHashes = {};
|
|
29688
29656
|
variantId = this.getVariantIdToStart(set);
|
|
29689
29657
|
origConfig = articles[Object.keys(articles)[0]].VariantValues;
|
|
29690
|
-
i =
|
|
29658
|
+
i = 0;
|
|
29691
29659
|
case 6:
|
|
29692
|
-
if (!(i
|
|
29693
|
-
_context3.next =
|
|
29660
|
+
if (!(i < variants.length)) {
|
|
29661
|
+
_context3.next = 53;
|
|
29694
29662
|
break;
|
|
29695
29663
|
}
|
|
29696
29664
|
variantForTargetArticles = variants[i];
|
|
@@ -29793,9 +29761,14 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
29793
29761
|
variantForTargetArticles.configVariantValues = configVariantValues;
|
|
29794
29762
|
variantForTargetArticles.price = set === null || set === void 0 ? void 0 : set.getSetPrice();
|
|
29795
29763
|
variantForTargetArticles.title = set === null || set === void 0 ? void 0 : set.CatalogData.catalogName;
|
|
29796
|
-
if (
|
|
29797
|
-
|
|
29764
|
+
if (variantIsValid) {
|
|
29765
|
+
_context3.next = 48;
|
|
29766
|
+
break;
|
|
29798
29767
|
}
|
|
29768
|
+
variants.splice(i, 1);
|
|
29769
|
+
i--;
|
|
29770
|
+
return _context3.abrupt("continue", 50);
|
|
29771
|
+
case 48:
|
|
29799
29772
|
reservedId = this.tryGetOldVariantIdForVariant(set, variants[i]);
|
|
29800
29773
|
if (reservedId !== undefined) {
|
|
29801
29774
|
variants[i].id = reservedId;
|
|
@@ -29803,21 +29776,21 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
29803
29776
|
variants[i].id = variantId;
|
|
29804
29777
|
variantId++;
|
|
29805
29778
|
}
|
|
29806
|
-
case
|
|
29807
|
-
i
|
|
29779
|
+
case 50:
|
|
29780
|
+
i++;
|
|
29808
29781
|
_context3.next = 6;
|
|
29809
29782
|
break;
|
|
29810
|
-
case
|
|
29783
|
+
case 53:
|
|
29811
29784
|
if (!set.favoritesChanged) this.evalOldConfigVariants(set, variants);
|
|
29812
|
-
_context3.next =
|
|
29785
|
+
_context3.next = 56;
|
|
29813
29786
|
return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, origConfig, Object.keys(articles), true);
|
|
29814
|
-
case
|
|
29787
|
+
case 56:
|
|
29815
29788
|
set.allVariantsCache = variants;
|
|
29816
29789
|
variants.sort(function (a, b) {
|
|
29817
29790
|
return a.id - b.id;
|
|
29818
29791
|
});
|
|
29819
29792
|
return _context3.abrupt("return", variants);
|
|
29820
|
-
case
|
|
29793
|
+
case 59:
|
|
29821
29794
|
case "end":
|
|
29822
29795
|
return _context3.stop();
|
|
29823
29796
|
}
|
|
@@ -30104,7 +30077,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30104
30077
|
allvariants = _context4.t0;
|
|
30105
30078
|
validVariants = [];
|
|
30106
30079
|
for (i = 0; i < allvariants.length; i++) {
|
|
30107
|
-
if (!set.disabledVariants.includes(i)) {
|
|
30080
|
+
if (!set.disabledVariants.includes(allvariants[i].id)) {
|
|
30108
30081
|
validVariants.push(allvariants[i]);
|
|
30109
30082
|
}
|
|
30110
30083
|
}
|
|
@@ -30279,7 +30252,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30279
30252
|
if (targetArticle[opt] && !variantValues[opt]) variantValues[opt] = targetArticle[opt];
|
|
30280
30253
|
}
|
|
30281
30254
|
}
|
|
30282
|
-
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$
|
|
30255
|
+
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$a(_objectSpread$a({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set), 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);
|
|
30283
30256
|
set.basketConfigVariants.push(configVariant);
|
|
30284
30257
|
case 28:
|
|
30285
30258
|
case "end":
|
|
@@ -30299,8 +30272,8 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30299
30272
|
if (!((_set$oldConfigVariant3 = set.oldConfigVariants) !== null && _set$oldConfigVariant3 !== void 0 && _set$oldConfigVariant3.length)) return;
|
|
30300
30273
|
//set all invalid
|
|
30301
30274
|
set.disabledVariants = [];
|
|
30302
|
-
variants.map(function (v
|
|
30303
|
-
return set.disabledVariants.push(
|
|
30275
|
+
variants.map(function (v) {
|
|
30276
|
+
return set.disabledVariants.push(v.id);
|
|
30304
30277
|
});
|
|
30305
30278
|
var oldConfigVariants = _toConsumableArray__default["default"](set.oldConfigVariants);
|
|
30306
30279
|
for (var i = 0; i < variants.length; i++) {
|
|
@@ -30323,7 +30296,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30323
30296
|
if (tryNext) break;
|
|
30324
30297
|
}
|
|
30325
30298
|
if (!tryNext) {
|
|
30326
|
-
var index = set.disabledVariants.indexOf(
|
|
30299
|
+
var index = set.disabledVariants.indexOf(variant.id);
|
|
30327
30300
|
if (index != -1) set.disabledVariants.splice(index, 1);
|
|
30328
30301
|
oldConfigVariants.splice(j, 1);
|
|
30329
30302
|
}
|
|
@@ -30334,11 +30307,11 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30334
30307
|
}, {
|
|
30335
30308
|
key: "isFavorite",
|
|
30336
30309
|
value: function isFavorite(set, targetArticles, item, optionCodex) {
|
|
30337
|
-
var _item$ocd, _set$
|
|
30310
|
+
var _item$ocd, _set$api$ReturnToFrom, _favorites$VariantVal, _Object$keys;
|
|
30338
30311
|
var favorites = set.favorites;
|
|
30339
30312
|
var opvCodex = (_item$ocd = item.ocd) !== null && _item$ocd !== void 0 ? _item$ocd : item.codex;
|
|
30340
30313
|
var opt = optionCodex ? optionCodex : item.parent.codex;
|
|
30341
|
-
var doShowFav =
|
|
30314
|
+
var doShowFav = !!((_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.startsWith('FAVORITS'));
|
|
30342
30315
|
if (!doShowFav) return undefined;
|
|
30343
30316
|
if ((_favorites$VariantVal = favorites.VariantValues) !== null && _favorites$VariantVal !== void 0 && _favorites$VariantVal[opt] && (_Object$keys = Object.keys(favorites.VariantValues[opt])) !== null && _Object$keys !== void 0 && _Object$keys.includes(opvCodex)) {
|
|
30344
30317
|
for (var i = 0; i < targetArticles.length; i++) {
|
|
@@ -30359,8 +30332,8 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30359
30332
|
}();
|
|
30360
30333
|
var favoritesHandlerInstance = new DivaFavoritesHandler();
|
|
30361
30334
|
|
|
30362
|
-
function ownKeys$
|
|
30363
|
-
function _objectSpread$
|
|
30335
|
+
function ownKeys$9(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; }
|
|
30336
|
+
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30364
30337
|
|
|
30365
30338
|
//Diese Klasse beinhaltet die Logik wie eine aktuelle Konfiguration mit allen möglicheen Ausprägungen mit Preisen in einem Set aussieht.
|
|
30366
30339
|
//Der in einem Set gemergte Optionsbaum
|
|
@@ -30917,7 +30890,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
30917
30890
|
//get schnittmenge of all the articles
|
|
30918
30891
|
if (i === 0) {
|
|
30919
30892
|
constructionRules = myOptionState.constructionRules;
|
|
30920
|
-
configItems = _objectSpread$
|
|
30893
|
+
configItems = _objectSpread$9({}, myOptionState.visibleOptionValues);
|
|
30921
30894
|
} else {
|
|
30922
30895
|
for (var _key2 in configItems) {
|
|
30923
30896
|
if (!myOptionState.visibleOptionValues[_key2]) {
|
|
@@ -31148,8 +31121,8 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
31148
31121
|
}();
|
|
31149
31122
|
var configTreeHandler = new DivaConfigTreeHandler();
|
|
31150
31123
|
|
|
31151
|
-
function ownKeys$
|
|
31152
|
-
function _objectSpread$
|
|
31124
|
+
function ownKeys$8(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; }
|
|
31125
|
+
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31153
31126
|
var LOG$8 = DivaUtils__default["default"].initLog('Planner', 'DIVA-SET-HANDLER');
|
|
31154
31127
|
|
|
31155
31128
|
/*
|
|
@@ -31639,7 +31612,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31639
31612
|
}
|
|
31640
31613
|
variantValues = (_initSetState$initVar = initSetState.initVariantValues) !== null && _initSetState$initVar !== void 0 ? _initSetState$initVar : catalogData === null || catalogData === void 0 || (_catalogData$promoted = catalogData.promotedOpvs) === null || _catalogData$promoted === void 0 || (_catalogData$promoted = _catalogData$promoted.articles) === null || _catalogData$promoted === void 0 || (_catalogData$promoted = _catalogData$promoted[articlesToInitialize[j]]) === null || _catalogData$promoted === void 0 || (_catalogData$promoted = _catalogData$promoted[0]) === null || _catalogData$promoted === void 0 ? void 0 : _catalogData$promoted.variantValues;
|
|
31641
31614
|
_context6.next = 18;
|
|
31642
|
-
return this.addPlannerElement(set, articlesToInitialize[j], _objectSpread$
|
|
31615
|
+
return this.addPlannerElement(set, articlesToInitialize[j], _objectSpread$8(_objectSpread$8({}, params), variantValues ? {
|
|
31643
31616
|
variantValues: variantValues
|
|
31644
31617
|
} : {}));
|
|
31645
31618
|
case 18:
|
|
@@ -32272,7 +32245,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32272
32245
|
_context17.next = 24;
|
|
32273
32246
|
break;
|
|
32274
32247
|
}
|
|
32275
|
-
return _context17.abrupt("return", _objectSpread$
|
|
32248
|
+
return _context17.abrupt("return", _objectSpread$8(_objectSpread$8({}, doesFit), {}, {
|
|
32276
32249
|
accessoire: accessoire
|
|
32277
32250
|
}));
|
|
32278
32251
|
case 24:
|
|
@@ -32704,7 +32677,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32704
32677
|
var articlecodex = plannerElement.articleCodex;
|
|
32705
32678
|
if (type == 'PLANNERSWITCH' && Object.keys(set.getDivaArticles())[0]) {
|
|
32706
32679
|
if (plannerViewInfo.catalogPlannerArticles[i].filterType == 'Accessoire') continue;
|
|
32707
|
-
cleanedCaltaogPlannerArticles.push(_objectSpread$
|
|
32680
|
+
cleanedCaltaogPlannerArticles.push(_objectSpread$8({}, plannerElement));
|
|
32708
32681
|
var index = cleanedCaltaogPlannerArticles.length - 1;
|
|
32709
32682
|
cleanedCaltaogPlannerArticles[index].groupName = '';
|
|
32710
32683
|
if (set.getArticlesByArticleCodex(articlecodex).length > 0) {
|
|
@@ -32722,10 +32695,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32722
32695
|
plannerViewInfo.plannerConfiguration.updatePaletteAfterPlanningChanged = true;
|
|
32723
32696
|
}
|
|
32724
32697
|
}
|
|
32725
|
-
if (!dontPushElement) cleanedCaltaogPlannerArticles.push(_objectSpread$
|
|
32698
|
+
if (!dontPushElement) cleanedCaltaogPlannerArticles.push(_objectSpread$8({}, plannerElement));
|
|
32726
32699
|
}
|
|
32727
32700
|
}
|
|
32728
|
-
return _objectSpread$
|
|
32701
|
+
return _objectSpread$8(_objectSpread$8({}, plannerViewInfo), {}, {
|
|
32729
32702
|
catalogPlannerArticles: cleanedCaltaogPlannerArticles
|
|
32730
32703
|
});
|
|
32731
32704
|
}
|
|
@@ -32924,7 +32897,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32924
32897
|
filterType = set.configTree.getCurFilterType(configStepKey, optionStatesOfArticle, configItems.configItems);
|
|
32925
32898
|
stepInfo = set.configTree.getStepInfo(configStepKey, optionStatesOfArticle);
|
|
32926
32899
|
contentItemId = (_configItems$option = configItems.option) === null || _configItems$option === void 0 ? void 0 : _configItems$option.contentItemId;
|
|
32927
|
-
return _context24.abrupt("return", _objectSpread$
|
|
32900
|
+
return _context24.abrupt("return", _objectSpread$8(_objectSpread$8(_objectSpread$8({
|
|
32928
32901
|
isRenderedNotInSettingPalette: set.configTree.isRenderedNotInSettingPalette(configStepKey),
|
|
32929
32902
|
isRenderedInAccessorieStep: set.configTree.isRenderedInAccessorieStep(configStepKey),
|
|
32930
32903
|
visible: set.configTree.getVisibility(configStepKey, visible, set.CatalogData)
|
|
@@ -33347,7 +33320,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33347
33320
|
break;
|
|
33348
33321
|
}
|
|
33349
33322
|
_context28.next = 17;
|
|
33350
|
-
return this.addArticleToActSet(set, edoArticlesToLoad[_i5].ArticleCodex, _objectSpread$
|
|
33323
|
+
return this.addArticleToActSet(set, edoArticlesToLoad[_i5].ArticleCodex, _objectSpread$8(_objectSpread$8({}, edoArticlesToLoad[_i5]), {}, {
|
|
33351
33324
|
basketId: oldBasketIds[_i5]
|
|
33352
33325
|
}), true);
|
|
33353
33326
|
case 17:
|
|
@@ -33744,7 +33717,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33744
33717
|
origOrderSet.BBox = actOrderSet.BBox;
|
|
33745
33718
|
origOrderSet.VariantDescription = actOrderSet.VariantDescription;
|
|
33746
33719
|
if (actOrderSet.ConfigVariants && origOrderSet.ConfigVariants) origOrderSet.ConfigVariants = actOrderSet.ConfigVariants.map(function (variant, index) {
|
|
33747
|
-
return _objectSpread$
|
|
33720
|
+
return _objectSpread$8(_objectSpread$8({}, variant), {}, {
|
|
33748
33721
|
SetImage: origOrderSet.ConfigVariants[index].SetImage,
|
|
33749
33722
|
HQRenderScript: origOrderSet.ConfigVariants[index].HQRenderScript,
|
|
33750
33723
|
Set2DImage: origOrderSet.ConfigVariants[index].Set2DImage,
|
|
@@ -33782,25 +33755,12 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33782
33755
|
DivaUtils__default["default"].startSpanOfApm('GetSet3D und 2D Image');
|
|
33783
33756
|
GroupType = 'PLANNING';
|
|
33784
33757
|
plannerData = set.plannerHandler.savePlanner(set.getSetId());
|
|
33785
|
-
|
|
33786
|
-
_context31.next = 10;
|
|
33787
|
-
break;
|
|
33788
|
-
}
|
|
33789
|
-
_context31.next = 7;
|
|
33790
|
-
return set.plannerHandler.getSetImageAsUrl(set.getSetId());
|
|
33791
|
-
case 7:
|
|
33792
|
-
_context31.t0 = _context31.sent;
|
|
33793
|
-
_context31.next = 11;
|
|
33794
|
-
break;
|
|
33795
|
-
case 10:
|
|
33796
|
-
_context31.t0 = undefined;
|
|
33797
|
-
case 11:
|
|
33798
|
-
setImage = _context31.t0;
|
|
33758
|
+
setImage = undefined;
|
|
33799
33759
|
urlToPlanning2D = undefined;
|
|
33800
33760
|
alternateSetImages = undefined;
|
|
33801
33761
|
hqRenderScript = undefined;
|
|
33802
33762
|
if (dontGenerateImages) {
|
|
33803
|
-
_context31.next =
|
|
33763
|
+
_context31.next = 25;
|
|
33804
33764
|
break;
|
|
33805
33765
|
}
|
|
33806
33766
|
promise3D = this.getSetImage(set, typeof window === 'undefined');
|
|
@@ -33808,22 +33768,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33808
33768
|
if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
|
|
33809
33769
|
promise3DAlternate = this.getAlternateSetImages(set);
|
|
33810
33770
|
}
|
|
33811
|
-
_context31.next =
|
|
33771
|
+
_context31.next = 14;
|
|
33812
33772
|
return Promise.all([promise3D, promise2D, promise3DAlternate]);
|
|
33813
|
-
case
|
|
33773
|
+
case 14:
|
|
33814
33774
|
_yield$Promise$all = _context31.sent;
|
|
33815
33775
|
_yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 3);
|
|
33816
33776
|
setImage = _yield$Promise$all2[0];
|
|
33817
33777
|
urlToPlanning2D = _yield$Promise$all2[1];
|
|
33818
33778
|
alternateSetImages = _yield$Promise$all2[2];
|
|
33819
33779
|
promiseHQRenderScript = this.getHQRenderScript(set, divaNr);
|
|
33820
|
-
_context31.next =
|
|
33780
|
+
_context31.next = 22;
|
|
33821
33781
|
return Promise.all([promiseHQRenderScript]);
|
|
33822
|
-
case
|
|
33782
|
+
case 22:
|
|
33823
33783
|
_yield$Promise$all3 = _context31.sent;
|
|
33824
33784
|
_yield$Promise$all4 = _slicedToArray__default["default"](_yield$Promise$all3, 1);
|
|
33825
33785
|
hqRenderScript = _yield$Promise$all4[0];
|
|
33826
|
-
case
|
|
33786
|
+
case 25:
|
|
33827
33787
|
LOG$8.startTransaction({
|
|
33828
33788
|
event: 'FillBakset',
|
|
33829
33789
|
eventId: 'FILL_BASKET',
|
|
@@ -33889,7 +33849,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33889
33849
|
MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
|
|
33890
33850
|
});
|
|
33891
33851
|
return _context31.abrupt("return", orderSet);
|
|
33892
|
-
case
|
|
33852
|
+
case 32:
|
|
33893
33853
|
case "end":
|
|
33894
33854
|
return _context31.stop();
|
|
33895
33855
|
}
|
|
@@ -33917,7 +33877,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33917
33877
|
catalogData = set.CatalogData;
|
|
33918
33878
|
is3D = ['3DImage', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
33919
33879
|
if (!is3D) {
|
|
33920
|
-
_context32.next =
|
|
33880
|
+
_context32.next = 11;
|
|
33921
33881
|
break;
|
|
33922
33882
|
}
|
|
33923
33883
|
LOG$8.startTransaction({
|
|
@@ -33933,20 +33893,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33933
33893
|
case 9:
|
|
33934
33894
|
setImage = _context32.sent;
|
|
33935
33895
|
LOG$8.successTransaction('RENDER_3D_IMAGE');
|
|
33936
|
-
|
|
33937
|
-
break;
|
|
33938
|
-
case 13:
|
|
33939
|
-
if (!(set.getPlannerMode() == 'SirvViewer_only')) {
|
|
33940
|
-
_context32.next = 17;
|
|
33941
|
-
break;
|
|
33942
|
-
}
|
|
33943
|
-
_context32.next = 16;
|
|
33944
|
-
return set.plannerHandler.getSetImageAsUrl(set.getSetId());
|
|
33945
|
-
case 16:
|
|
33946
|
-
setImage = _context32.sent;
|
|
33947
|
-
case 17:
|
|
33896
|
+
case 11:
|
|
33948
33897
|
return _context32.abrupt("return", setImage);
|
|
33949
|
-
case
|
|
33898
|
+
case 12:
|
|
33950
33899
|
case "end":
|
|
33951
33900
|
return _context32.stop();
|
|
33952
33901
|
}
|
|
@@ -34098,77 +34047,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34098
34047
|
Info: bbox.width + 'cm x ' + bbox.depth + 'cm'
|
|
34099
34048
|
};
|
|
34100
34049
|
}
|
|
34101
|
-
|
|
34102
|
-
/****************************Cache building***************************/
|
|
34103
|
-
|
|
34104
|
-
/**
|
|
34105
|
-
* This function creates the cache for all images.
|
|
34106
|
-
* @returns returns true if the whole set was created correctly
|
|
34107
|
-
*/
|
|
34108
34050
|
}, {
|
|
34109
|
-
key: "
|
|
34110
|
-
value:
|
|
34111
|
-
var
|
|
34112
|
-
var _set$getAlternateRend3;
|
|
34113
|
-
var timeout;
|
|
34051
|
+
key: "loadProductsOfSets",
|
|
34052
|
+
value: function () {
|
|
34053
|
+
var _loadProductsOfSets = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34(orderSets, involvedSetIds) {
|
|
34114
34054
|
return _regeneratorRuntime__default["default"].wrap(function _callee34$(_context36) {
|
|
34115
34055
|
while (1) switch (_context36.prev = _context36.next) {
|
|
34116
34056
|
case 0:
|
|
34117
|
-
set.plannerHandler.request3D(true, false, (set === null || set === void 0 || (_set$getAlternateRend3 = set.getAlternateRenderInfo()) === null || _set$getAlternateRend3 === void 0 ? void 0 : _set$getAlternateRend3.length) > 0, undefined, true, {
|
|
34118
|
-
width: 100,
|
|
34119
|
-
height: 100,
|
|
34120
|
-
isFullscreenRendering: false,
|
|
34121
|
-
planner3DGridEnabled: false,
|
|
34122
|
-
mediaServiceSaveMode: 'PERMANENT',
|
|
34123
|
-
doShow3DDimensionLines: false
|
|
34124
|
-
});
|
|
34125
|
-
timeout = 50;
|
|
34126
|
-
case 2:
|
|
34127
|
-
if (!set.plannerHandler.checkIsWaitingForRendering()) {
|
|
34128
|
-
_context36.next = 10;
|
|
34129
|
-
break;
|
|
34130
|
-
}
|
|
34131
|
-
timeout--;
|
|
34132
|
-
if (!(timeout == 0)) {
|
|
34133
|
-
_context36.next = 6;
|
|
34134
|
-
break;
|
|
34135
|
-
}
|
|
34136
|
-
return _context36.abrupt("return", false);
|
|
34137
|
-
case 6:
|
|
34138
|
-
_context36.next = 8;
|
|
34139
|
-
return DivaUtils__default["default"].Sleep(300);
|
|
34140
|
-
case 8:
|
|
34141
34057
|
_context36.next = 2;
|
|
34142
|
-
break;
|
|
34143
|
-
case 10:
|
|
34144
|
-
return _context36.abrupt("return", true);
|
|
34145
|
-
case 11:
|
|
34146
|
-
case "end":
|
|
34147
|
-
return _context36.stop();
|
|
34148
|
-
}
|
|
34149
|
-
}, _callee34);
|
|
34150
|
-
}));
|
|
34151
|
-
function createRenderCache(_x113) {
|
|
34152
|
-
return _createRenderCache.apply(this, arguments);
|
|
34153
|
-
}
|
|
34154
|
-
return createRenderCache;
|
|
34155
|
-
}())
|
|
34156
|
-
}, {
|
|
34157
|
-
key: "loadProductsOfSets",
|
|
34158
|
-
value: function () {
|
|
34159
|
-
var _loadProductsOfSets = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35(orderSets, involvedSetIds) {
|
|
34160
|
-
return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context37) {
|
|
34161
|
-
while (1) switch (_context37.prev = _context37.next) {
|
|
34162
|
-
case 0:
|
|
34163
|
-
_context37.next = 2;
|
|
34164
34058
|
return productHandlerInstance.loadProductsOfSets(orderSets, involvedSetIds);
|
|
34165
34059
|
case 2:
|
|
34166
34060
|
case "end":
|
|
34167
|
-
return
|
|
34061
|
+
return _context36.stop();
|
|
34168
34062
|
}
|
|
34169
|
-
},
|
|
34063
|
+
}, _callee34);
|
|
34170
34064
|
}));
|
|
34171
|
-
function loadProductsOfSets(
|
|
34065
|
+
function loadProductsOfSets(_x113, _x114) {
|
|
34172
34066
|
return _loadProductsOfSets.apply(this, arguments);
|
|
34173
34067
|
}
|
|
34174
34068
|
return loadProductsOfSets;
|
|
@@ -34205,28 +34099,28 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34205
34099
|
}, {
|
|
34206
34100
|
key: "addOrderSetArticlesToExistingSet",
|
|
34207
34101
|
value: function () {
|
|
34208
|
-
var _addOrderSetArticlesToExistingSet = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
34209
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
34210
|
-
while (1) switch (
|
|
34102
|
+
var _addOrderSetArticlesToExistingSet = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35(set, orderSet, lastSetToInitialize) {
|
|
34103
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context37) {
|
|
34104
|
+
while (1) switch (_context37.prev = _context37.next) {
|
|
34211
34105
|
case 0:
|
|
34212
34106
|
//TODO: GLOBAL STUFF
|
|
34213
34107
|
//this.updateActSet(set);
|
|
34214
34108
|
orderSet.changeBasketIds();
|
|
34215
|
-
|
|
34109
|
+
_context37.next = 3;
|
|
34216
34110
|
return this.initOrderLineArticles(set, orderSet);
|
|
34217
34111
|
case 3:
|
|
34218
|
-
|
|
34112
|
+
_context37.next = 5;
|
|
34219
34113
|
return set.plannerHandler.extendSet(set, orderSet.SetPlanData, lastSetToInitialize);
|
|
34220
34114
|
case 5:
|
|
34221
|
-
|
|
34115
|
+
_context37.next = 7;
|
|
34222
34116
|
return productHandlerInstance.updateProducts(set, 'onAdd');
|
|
34223
34117
|
case 7:
|
|
34224
34118
|
case "end":
|
|
34225
|
-
return
|
|
34119
|
+
return _context37.stop();
|
|
34226
34120
|
}
|
|
34227
|
-
},
|
|
34121
|
+
}, _callee35, this);
|
|
34228
34122
|
}));
|
|
34229
|
-
function addOrderSetArticlesToExistingSet(_x116, _x117
|
|
34123
|
+
function addOrderSetArticlesToExistingSet(_x115, _x116, _x117) {
|
|
34230
34124
|
return _addOrderSetArticlesToExistingSet.apply(this, arguments);
|
|
34231
34125
|
}
|
|
34232
34126
|
return addOrderSetArticlesToExistingSet;
|
|
@@ -34243,486 +34137,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34243
34137
|
}();
|
|
34244
34138
|
var setHandlerInstance = new DivaSetHandler();
|
|
34245
34139
|
|
|
34246
|
-
|
|
34140
|
+
function ownKeys$7(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; }
|
|
34141
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34247
34142
|
var LOG$7 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
34248
|
-
var Rendering = /*#__PURE__*/function () {
|
|
34249
|
-
function Rendering(planningHash, renderHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, hasLayerMask, hasStaticBG, mediaServiceSaveMode, alternateRenderingsExist, alternateRendererInfo) {
|
|
34250
|
-
_classCallCheck__default["default"](this, Rendering);
|
|
34251
|
-
_defineProperty__default["default"](this, "planningHash", void 0);
|
|
34252
|
-
_defineProperty__default["default"](this, "renderHash", void 0);
|
|
34253
|
-
_defineProperty__default["default"](this, "creationTime", void 0);
|
|
34254
|
-
_defineProperty__default["default"](this, "renderWidth", void 0);
|
|
34255
|
-
_defineProperty__default["default"](this, "renderHeight", void 0);
|
|
34256
|
-
_defineProperty__default["default"](this, "uiInfo", void 0);
|
|
34257
|
-
_defineProperty__default["default"](this, "urlToSavedRendering", void 0);
|
|
34258
|
-
// viewPoint: string;
|
|
34259
|
-
// private posInfo: any;
|
|
34260
|
-
//private doStream: boolean; Streaming over 3D Host is deprected
|
|
34261
|
-
//private byteChunkArr: any;
|
|
34262
|
-
//private byteChunkLayerMaskArr: any;
|
|
34263
|
-
_defineProperty__default["default"](this, "hasLayerMask", void 0);
|
|
34264
|
-
//private imgBytes: any;
|
|
34265
|
-
_defineProperty__default["default"](this, "imgForSrc", void 0);
|
|
34266
|
-
_defineProperty__default["default"](this, "HQRenderingUrl", void 0);
|
|
34267
|
-
_defineProperty__default["default"](this, "SpinUrl", void 0);
|
|
34268
|
-
_defineProperty__default["default"](this, "ArUrl", void 0);
|
|
34269
|
-
_defineProperty__default["default"](this, "layerMaskAsBase64", void 0);
|
|
34270
|
-
_defineProperty__default["default"](this, "layerMaskThreeTexture", void 0);
|
|
34271
|
-
_defineProperty__default["default"](this, "isFullscreenRendering", void 0);
|
|
34272
|
-
_defineProperty__default["default"](this, "hasStaticBackground", void 0);
|
|
34273
|
-
_defineProperty__default["default"](this, "hasDimensionLines", void 0);
|
|
34274
|
-
_defineProperty__default["default"](this, "plannerMeasureDigits", void 0);
|
|
34275
|
-
_defineProperty__default["default"](this, "alternateRendererInfo", void 0);
|
|
34276
|
-
_defineProperty__default["default"](this, "isAlternateRendering", void 0);
|
|
34277
|
-
_defineProperty__default["default"](this, "alternateRenderingsExist", void 0);
|
|
34278
|
-
_defineProperty__default["default"](this, "mediaServiceSaveMode", void 0);
|
|
34279
|
-
_defineProperty__default["default"](this, "isLoadedFromCache", void 0);
|
|
34280
|
-
_defineProperty__default["default"](this, "catalogData", void 0);
|
|
34281
|
-
//this.doStream = false;
|
|
34282
|
-
this.planningHash = planningHash;
|
|
34283
|
-
this.renderHash = renderHash;
|
|
34284
|
-
this.renderWidth = width;
|
|
34285
|
-
this.renderHeight = height;
|
|
34286
|
-
this.uiInfo = '';
|
|
34287
|
-
this.imgForSrc = '';
|
|
34288
|
-
this.layerMaskAsBase64 = '';
|
|
34289
|
-
this.isFullscreenRendering = isFullscreenRendering;
|
|
34290
|
-
this.hasDimensionLines = hasDimensionLines;
|
|
34291
|
-
this.plannerMeasureDigits = plannerMeasureDigits;
|
|
34292
|
-
this.hasLayerMask = hasLayerMask;
|
|
34293
|
-
this.creationTime = new Date();
|
|
34294
|
-
this.layerMaskThreeTexture = undefined;
|
|
34295
|
-
this.hasStaticBackground = hasStaticBG;
|
|
34296
|
-
this.mediaServiceSaveMode = mediaServiceSaveMode;
|
|
34297
|
-
this.urlToSavedRendering = '';
|
|
34298
|
-
this.catalogData = {
|
|
34299
|
-
catalogCodex: '',
|
|
34300
|
-
catalogGUID: ''
|
|
34301
|
-
};
|
|
34302
|
-
this.isLoadedFromCache = false;
|
|
34303
|
-
this.HQRenderingUrl = '';
|
|
34304
|
-
this.SpinUrl = '';
|
|
34305
|
-
this.ArUrl = '';
|
|
34306
|
-
if (alternateRendererInfo != undefined) this.isAlternateRendering = true;else this.isAlternateRendering = false;
|
|
34307
|
-
this.alternateRendererInfo = alternateRendererInfo;
|
|
34308
|
-
this.alternateRenderingsExist = !!alternateRenderingsExist;
|
|
34309
|
-
}
|
|
34310
|
-
return _createClass__default["default"](Rendering, [{
|
|
34311
|
-
key: "clone",
|
|
34312
|
-
value: function clone(rendering) {
|
|
34313
|
-
this.planningHash = rendering.planningHash;
|
|
34314
|
-
this.renderHash = rendering.renderHash;
|
|
34315
|
-
this.creationTime = rendering.creationTime;
|
|
34316
|
-
this.renderWidth = rendering.renderWidth;
|
|
34317
|
-
this.renderHeight = rendering.renderHeight;
|
|
34318
|
-
this.uiInfo = rendering.uiInfo;
|
|
34319
|
-
this.urlToSavedRendering = rendering.urlToSavedRendering;
|
|
34320
|
-
this.hasLayerMask = rendering.hasLayerMask;
|
|
34321
|
-
this.imgForSrc = rendering.imgForSrc;
|
|
34322
|
-
this.HQRenderingUrl = rendering.HQRenderingUrl;
|
|
34323
|
-
this.layerMaskAsBase64 = rendering.layerMaskAsBase64;
|
|
34324
|
-
this.layerMaskThreeTexture = rendering.layerMaskThreeTexture;
|
|
34325
|
-
this.isFullscreenRendering = rendering.isFullscreenRendering;
|
|
34326
|
-
this.hasStaticBackground = rendering.hasStaticBackground;
|
|
34327
|
-
this.hasDimensionLines = rendering.hasDimensionLines;
|
|
34328
|
-
this.plannerMeasureDigits = rendering.plannerMeasureDigits;
|
|
34329
|
-
this.alternateRendererInfo = rendering.alternateRendererInfo;
|
|
34330
|
-
this.isAlternateRendering = rendering.isAlternateRendering;
|
|
34331
|
-
this.alternateRenderingsExist = rendering.alternateRenderingsExist;
|
|
34332
|
-
this.mediaServiceSaveMode = rendering.mediaServiceSaveMode;
|
|
34333
|
-
this.isLoadedFromCache = rendering.isLoadedFromCache;
|
|
34334
|
-
this.catalogData = rendering.catalogData;
|
|
34335
|
-
}
|
|
34336
|
-
}, {
|
|
34337
|
-
key: "getAllDockingPoints",
|
|
34338
|
-
value: function getAllDockingPoints(setId, elementId) {
|
|
34339
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34340
|
-
return this.uiInfo['S1']['E' + elementId]['DP'];
|
|
34341
|
-
}
|
|
34342
|
-
return this.uiInfo[setId]['E' + elementId]['DP'];
|
|
34343
|
-
}
|
|
34344
|
-
}, {
|
|
34345
|
-
key: "getHasStaticBackground",
|
|
34346
|
-
value: function getHasStaticBackground() {
|
|
34347
|
-
return this.hasStaticBackground;
|
|
34348
|
-
}
|
|
34349
|
-
}, {
|
|
34350
|
-
key: "getIsFullscreenRendering",
|
|
34351
|
-
value: function getIsFullscreenRendering() {
|
|
34352
|
-
return this.isFullscreenRendering;
|
|
34353
|
-
}
|
|
34354
|
-
}, {
|
|
34355
|
-
key: "setIsFullscreenRendering",
|
|
34356
|
-
value: function setIsFullscreenRendering(isFullscreen) {
|
|
34357
|
-
this.isFullscreenRendering = isFullscreen;
|
|
34358
|
-
}
|
|
34359
|
-
}, {
|
|
34360
|
-
key: "getHasDimensionLines",
|
|
34361
|
-
value: function getHasDimensionLines() {
|
|
34362
|
-
return this.hasDimensionLines;
|
|
34363
|
-
}
|
|
34364
|
-
}, {
|
|
34365
|
-
key: "getPlannerMeasureDigits",
|
|
34366
|
-
value: function getPlannerMeasureDigits() {
|
|
34367
|
-
return this.plannerMeasureDigits;
|
|
34368
|
-
}
|
|
34369
|
-
}, {
|
|
34370
|
-
key: "getIsAlternateRendering",
|
|
34371
|
-
value: function getIsAlternateRendering() {
|
|
34372
|
-
return this.isAlternateRendering;
|
|
34373
|
-
}
|
|
34374
|
-
}, {
|
|
34375
|
-
key: "getAlternateRenderInfo",
|
|
34376
|
-
value: function getAlternateRenderInfo() {
|
|
34377
|
-
return this.alternateRendererInfo;
|
|
34378
|
-
}
|
|
34379
|
-
}, {
|
|
34380
|
-
key: "getAlternateRenderingsExist",
|
|
34381
|
-
value: function getAlternateRenderingsExist() {
|
|
34382
|
-
return this.alternateRenderingsExist;
|
|
34383
|
-
}
|
|
34384
|
-
}, {
|
|
34385
|
-
key: "hasUIInfosOfElement",
|
|
34386
|
-
value: function hasUIInfosOfElement(setId, elementid) {
|
|
34387
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34388
|
-
return this.uiInfo['S1']['E' + elementid] != undefined;
|
|
34389
|
-
} else {
|
|
34390
|
-
return this.uiInfo[setId] != undefined && this.uiInfo[setId]['E' + elementid] != undefined;
|
|
34391
|
-
}
|
|
34392
|
-
}
|
|
34393
|
-
}, {
|
|
34394
|
-
key: "getOutlinePolygonForSVG",
|
|
34395
|
-
value: function getOutlinePolygonForSVG(setId, elementId, viewPortSize) {
|
|
34396
|
-
var poly = [];
|
|
34397
|
-
var avgCamDist = 0;
|
|
34398
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34399
|
-
poly = this.uiInfo['S1']['E' + elementId]['POLYOUTLINE'];
|
|
34400
|
-
avgCamDist = this.uiInfo['S1']['E' + elementId]['AVGCAMDIST'];
|
|
34401
|
-
} else if (this.uiInfo[setId]) {
|
|
34402
|
-
poly = this.uiInfo[setId]['E' + elementId]['POLYOUTLINE'];
|
|
34403
|
-
avgCamDist = this.uiInfo[setId]['E' + elementId]['AVGCAMDIST'];
|
|
34404
|
-
} else {
|
|
34405
|
-
poly = this.uiInfo['E' + elementId]['POLYOUTLINE'];
|
|
34406
|
-
avgCamDist = this.uiInfo['E' + elementId]['AVGCAMDIST'];
|
|
34407
|
-
}
|
|
34408
|
-
if (!poly) return undefined;
|
|
34409
|
-
var points = '';
|
|
34410
|
-
for (var i = 0; i < poly.length; i++) {
|
|
34411
|
-
points += Math.round(poly[i].x * 0.01 * viewPortSize.imgWidth) + ',' + Math.round((100 - poly[i].y) * 0.01 * viewPortSize.imgHeight) + ' ';
|
|
34412
|
-
}
|
|
34413
|
-
return {
|
|
34414
|
-
points: points,
|
|
34415
|
-
avgCamDist: avgCamDist
|
|
34416
|
-
};
|
|
34417
|
-
}
|
|
34418
|
-
|
|
34419
|
-
//Left/Right_Bottom/Top_Back/Front
|
|
34420
|
-
}, {
|
|
34421
|
-
key: "getRightTopBackUIPos",
|
|
34422
|
-
value: function getRightTopBackUIPos(setId, elemId) {
|
|
34423
|
-
var bbox = null;
|
|
34424
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34425
|
-
bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
|
|
34426
|
-
} else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
|
|
34427
|
-
if (!bbox) return;
|
|
34428
|
-
for (var i = 0; i < bbox.length; i++) {
|
|
34429
|
-
if (bbox[i].C == 'RTB') {
|
|
34430
|
-
return bbox[i];
|
|
34431
|
-
}
|
|
34432
|
-
}
|
|
34433
|
-
}
|
|
34434
|
-
//Left/Right_Bottom/Top_Back/Front
|
|
34435
|
-
}, {
|
|
34436
|
-
key: "getLeftTopBackUIPos",
|
|
34437
|
-
value: function getLeftTopBackUIPos(setId, elemId) {
|
|
34438
|
-
var bbox = null;
|
|
34439
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34440
|
-
bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
|
|
34441
|
-
} else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
|
|
34442
|
-
if (!bbox) return;
|
|
34443
|
-
for (var i = 0; i < bbox.length; i++) {
|
|
34444
|
-
if (bbox[i].C == 'LTB') {
|
|
34445
|
-
return bbox[i];
|
|
34446
|
-
}
|
|
34447
|
-
}
|
|
34448
|
-
}
|
|
34449
|
-
//Left/Right_Bottom/Top_Back/Front
|
|
34450
|
-
//elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
|
|
34451
|
-
}, {
|
|
34452
|
-
key: "getLeftBottomFrontUIPos",
|
|
34453
|
-
value: function getLeftBottomFrontUIPos(setId, elemId) {
|
|
34454
|
-
var bbox = null;
|
|
34455
|
-
if (this.uiInfo == '') return null;
|
|
34456
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34457
|
-
if (!this.uiInfo['S1']['E' + elemId]) return;
|
|
34458
|
-
bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
|
|
34459
|
-
} else if (this.uiInfo[setId]) {
|
|
34460
|
-
if (!this.uiInfo[setId]['E' + elemId]) return;
|
|
34461
|
-
bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];
|
|
34462
|
-
} else {
|
|
34463
|
-
var _this$uiInfo;
|
|
34464
|
-
bbox = (_this$uiInfo = this.uiInfo['E' + elemId]) === null || _this$uiInfo === void 0 ? void 0 : _this$uiInfo['BBOX3D'];
|
|
34465
|
-
}
|
|
34466
|
-
if (!bbox) return;
|
|
34467
|
-
for (var i = 0; i < bbox.length; i++) {
|
|
34468
|
-
if (bbox[i].C == 'LBF') {
|
|
34469
|
-
return bbox[i];
|
|
34470
|
-
}
|
|
34471
|
-
}
|
|
34472
|
-
}
|
|
34473
|
-
}, {
|
|
34474
|
-
key: "getBoxPlannerCornerUIPos",
|
|
34475
|
-
value: function getBoxPlannerCornerUIPos(setId, elemId, corner) {
|
|
34476
|
-
var boxPlan = [];
|
|
34477
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34478
|
-
boxPlan = this.uiInfo['S1']['E' + elemId]['BoxPlan'];
|
|
34479
|
-
} else if (this.uiInfo[setId]) boxPlan = this.uiInfo[setId]['E' + elemId]['BoxPlan'];else boxPlan = this.uiInfo['E' + elemId]['BoxPlan'];
|
|
34480
|
-
for (var i = 0; i < boxPlan.length; i++) {
|
|
34481
|
-
if (!boxPlan[i].N || !boxPlan[i].x || !boxPlan[i].y) continue;
|
|
34482
|
-
switch (corner) {
|
|
34483
|
-
case 'TOPCENTER':
|
|
34484
|
-
if (boxPlan[i].N == 'TC') {
|
|
34485
|
-
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
34486
|
-
}
|
|
34487
|
-
break;
|
|
34488
|
-
case 'LEFTCENTER':
|
|
34489
|
-
if (boxPlan[i].N == 'LC') {
|
|
34490
|
-
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
34491
|
-
}
|
|
34492
|
-
break;
|
|
34493
|
-
case 'RIGHTCENTER':
|
|
34494
|
-
if (boxPlan[i].N == 'RC') {
|
|
34495
|
-
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
34496
|
-
}
|
|
34497
|
-
break;
|
|
34498
|
-
case 'RIGHTTOPFRONT':
|
|
34499
|
-
if (boxPlan[i].N == 'RTF') {
|
|
34500
|
-
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
34501
|
-
}
|
|
34502
|
-
break;
|
|
34503
|
-
}
|
|
34504
|
-
}
|
|
34505
|
-
return undefined;
|
|
34506
|
-
}
|
|
34507
|
-
}, {
|
|
34508
|
-
key: "getUnityCamPos",
|
|
34509
|
-
value: function getUnityCamPos() {
|
|
34510
|
-
return new Vector3(parseFloat(this.uiInfo['CAM']['X']), parseFloat(this.uiInfo['CAM']['Y']), parseFloat(this.uiInfo['CAM']['Z']));
|
|
34511
|
-
}
|
|
34512
|
-
}, {
|
|
34513
|
-
key: "getUnityCamRot",
|
|
34514
|
-
value: function getUnityCamRot() {
|
|
34515
|
-
// return new Vector3(parseFloat(this.uiInfo["CAM"]["RX"]), parseFloat(this.uiInfo["CAM"]["RY"]), parseFloat(this.uiInfo["CAM"]["RZ"]));
|
|
34516
|
-
var quatVec = new Vector4(parseFloat(this.uiInfo['CAM']['QX']), parseFloat(this.uiInfo['CAM']['QY']), parseFloat(this.uiInfo['CAM']['QZ']), parseFloat(this.uiInfo['CAM']['QW']));
|
|
34517
|
-
return quatVec;
|
|
34518
|
-
}
|
|
34519
|
-
}, {
|
|
34520
|
-
key: "getUnityFOV",
|
|
34521
|
-
value: function getUnityFOV() {
|
|
34522
|
-
return parseFloat(this.uiInfo['CAM']['FOV']);
|
|
34523
|
-
}
|
|
34524
|
-
|
|
34525
|
-
//elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
|
|
34526
|
-
//It returns the distance of an element to the ground in cm
|
|
34527
|
-
}, {
|
|
34528
|
-
key: "getDistanceToGround",
|
|
34529
|
-
value: function getDistanceToGround(setId, elementId) {
|
|
34530
|
-
setId = this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined ? 'S1' : setId;
|
|
34531
|
-
if (this.uiInfo[setId] && this.uiInfo[setId]['E' + elementId] && this.uiInfo[setId]['E' + elementId]['DIM'] && this.uiInfo[setId]['E' + elementId]['DIM']['dfg']) {
|
|
34532
|
-
return this.uiInfo[setId]['E' + elementId]['DIM']['dfg'] * 100;
|
|
34533
|
-
}
|
|
34534
|
-
return -1;
|
|
34535
|
-
}
|
|
34536
|
-
}, {
|
|
34537
|
-
key: "addUIInfo",
|
|
34538
|
-
value: function addUIInfo(uiInfo) {
|
|
34539
|
-
try {
|
|
34540
|
-
this.uiInfo = JSON.parse(uiInfo);
|
|
34541
|
-
//this.calcOutlinePolygon();
|
|
34542
|
-
} catch (error) {
|
|
34543
|
-
LOG$7.error(new DivaUtils.DivaError('Error when parsing UI Info in rendering. Corrupt UIInfo: ' + uiInfo, {
|
|
34544
|
-
code: 'WC_0013',
|
|
34545
|
-
cause: error
|
|
34546
|
-
}));
|
|
34547
|
-
}
|
|
34548
|
-
}
|
|
34549
|
-
|
|
34550
|
-
/**
|
|
34551
|
-
* This function adds a blobImage to the rendering .
|
|
34552
|
-
* It is parsed to a base64 image.
|
|
34553
|
-
* @param blob The blob contains the image
|
|
34554
|
-
* @param isLayerMask True if the Image is the layer mask image
|
|
34555
|
-
*/
|
|
34556
|
-
}, {
|
|
34557
|
-
key: "addImgAsBlob",
|
|
34558
|
-
value: function addImgAsBlob(buffer, isLayerMask) {
|
|
34559
|
-
if (isLayerMask) this.layerMaskAsBase64 = buffer.toString('base64');else this.imgForSrc = 'data:image/jpeg;base64,' + buffer.toString('base64');
|
|
34560
|
-
}
|
|
34561
|
-
|
|
34562
|
-
//Write $("img.einBild").src
|
|
34563
|
-
}, {
|
|
34564
|
-
key: "getHQRenderingURL",
|
|
34565
|
-
value: function getHQRenderingURL() {
|
|
34566
|
-
return this.HQRenderingUrl;
|
|
34567
|
-
}
|
|
34568
|
-
}, {
|
|
34569
|
-
key: "getArURl",
|
|
34570
|
-
value: function getArURl() {
|
|
34571
|
-
return this.ArUrl;
|
|
34572
|
-
}
|
|
34573
|
-
}, {
|
|
34574
|
-
key: "getSpinURL",
|
|
34575
|
-
value: function getSpinURL() {
|
|
34576
|
-
return this.SpinUrl;
|
|
34577
|
-
}
|
|
34578
|
-
}, {
|
|
34579
|
-
key: "getImageForSrc",
|
|
34580
|
-
value: function getImageForSrc() {
|
|
34581
|
-
return this.imgForSrc;
|
|
34582
|
-
}
|
|
34583
|
-
}, {
|
|
34584
|
-
key: "containsSirvUrl",
|
|
34585
|
-
value: function containsSirvUrl() {
|
|
34586
|
-
return this.HQRenderingUrl != '';
|
|
34587
|
-
}
|
|
34588
|
-
}, {
|
|
34589
|
-
key: "setArUrl",
|
|
34590
|
-
value: function setArUrl(url) {
|
|
34591
|
-
this.ArUrl = url;
|
|
34592
|
-
}
|
|
34593
|
-
}, {
|
|
34594
|
-
key: "setSpinUrl",
|
|
34595
|
-
value: function setSpinUrl(url) {
|
|
34596
|
-
this.SpinUrl = url;
|
|
34597
|
-
}
|
|
34598
|
-
}, {
|
|
34599
|
-
key: "setHQRenderingUrl",
|
|
34600
|
-
value: function setHQRenderingUrl(url, useSirvViewer) {
|
|
34601
|
-
if (useSirvViewer) {
|
|
34602
|
-
this.HQRenderingUrl = url;
|
|
34603
|
-
} else {
|
|
34604
|
-
this.imgForSrc = url;
|
|
34605
|
-
}
|
|
34606
|
-
}
|
|
34607
|
-
|
|
34608
|
-
//*****************************************GETTER und SETTER********************************************** */
|
|
34609
|
-
}, {
|
|
34610
|
-
key: "CatalogCodex",
|
|
34611
|
-
get: function get() {
|
|
34612
|
-
return this.catalogData.catalogCodex;
|
|
34613
|
-
},
|
|
34614
|
-
set: function set(val) {
|
|
34615
|
-
this.catalogData.catalogCodex = val;
|
|
34616
|
-
}
|
|
34617
|
-
}, {
|
|
34618
|
-
key: "CatalogGUID",
|
|
34619
|
-
get: function get() {
|
|
34620
|
-
return this.catalogData.catalogGUID;
|
|
34621
|
-
},
|
|
34622
|
-
set: function set(val) {
|
|
34623
|
-
this.catalogData.catalogGUID = val;
|
|
34624
|
-
}
|
|
34625
|
-
}, {
|
|
34626
|
-
key: "IsLoadedFromCache",
|
|
34627
|
-
get: function get() {
|
|
34628
|
-
return this.isLoadedFromCache;
|
|
34629
|
-
},
|
|
34630
|
-
set: function set(val) {
|
|
34631
|
-
this.isLoadedFromCache = val;
|
|
34632
|
-
}
|
|
34633
|
-
}, {
|
|
34634
|
-
key: "PlanningHash",
|
|
34635
|
-
get: function get() {
|
|
34636
|
-
return this.planningHash;
|
|
34637
|
-
}
|
|
34638
|
-
}, {
|
|
34639
|
-
key: "RenderHash",
|
|
34640
|
-
get: function get() {
|
|
34641
|
-
return this.renderHash;
|
|
34642
|
-
}
|
|
34643
|
-
}, {
|
|
34644
|
-
key: "UrlToSavedRendering",
|
|
34645
|
-
get: function get() {
|
|
34646
|
-
return this.urlToSavedRendering;
|
|
34647
|
-
},
|
|
34648
|
-
set: function set(url) {
|
|
34649
|
-
this.urlToSavedRendering = url;
|
|
34650
|
-
}
|
|
34651
|
-
}, {
|
|
34652
|
-
key: "HasLayerMask",
|
|
34653
|
-
get: function get() {
|
|
34654
|
-
return this.hasLayerMask;
|
|
34655
|
-
},
|
|
34656
|
-
set: function set(hasLayerMask) {
|
|
34657
|
-
this.hasLayerMask = hasLayerMask;
|
|
34658
|
-
}
|
|
34659
|
-
}, {
|
|
34660
|
-
key: "RenderWidth",
|
|
34661
|
-
get: function get() {
|
|
34662
|
-
return this.renderWidth;
|
|
34663
|
-
}
|
|
34664
|
-
}, {
|
|
34665
|
-
key: "RenderHeight",
|
|
34666
|
-
get: function get() {
|
|
34667
|
-
return this.renderHeight;
|
|
34668
|
-
}
|
|
34669
|
-
}, {
|
|
34670
|
-
key: "getHasLayerMask",
|
|
34671
|
-
value: function getHasLayerMask() {
|
|
34672
|
-
return this.hasLayerMask;
|
|
34673
|
-
}
|
|
34674
|
-
}, {
|
|
34675
|
-
key: "getLayerMaskForSrc",
|
|
34676
|
-
value: function getLayerMaskForSrc() {
|
|
34677
|
-
return this.layerMaskAsBase64;
|
|
34678
|
-
}
|
|
34679
|
-
}, {
|
|
34680
|
-
key: "HasLayerMaskThreeTexture",
|
|
34681
|
-
get: function get() {
|
|
34682
|
-
return this.layerMaskThreeTexture != undefined;
|
|
34683
|
-
}
|
|
34684
|
-
}, {
|
|
34685
|
-
key: "LayerMaskThreeTexture",
|
|
34686
|
-
get: function get() {
|
|
34687
|
-
return this.layerMaskThreeTexture;
|
|
34688
|
-
},
|
|
34689
|
-
set: function set(tex) {
|
|
34690
|
-
this.layerMaskThreeTexture = tex;
|
|
34691
|
-
}
|
|
34692
|
-
/*
|
|
34693
|
-
get DoStream() {
|
|
34694
|
-
return this.doStream;
|
|
34695
|
-
}
|
|
34696
|
-
*/
|
|
34697
|
-
}, {
|
|
34698
|
-
key: "AllImgLoaded",
|
|
34699
|
-
get: function get() {
|
|
34700
|
-
return (this.imgForSrc != '' || this.HQRenderingUrl != '') && (!this.hasLayerMask || this.layerMaskAsBase64 != '');
|
|
34701
|
-
}
|
|
34702
|
-
}, {
|
|
34703
|
-
key: "UiInfoLoaded",
|
|
34704
|
-
get: function get() {
|
|
34705
|
-
return this.uiInfo != '';
|
|
34706
|
-
}
|
|
34707
|
-
}, {
|
|
34708
|
-
key: "CreationTime",
|
|
34709
|
-
get: function get() {
|
|
34710
|
-
return this.creationTime.getTime();
|
|
34711
|
-
}
|
|
34712
|
-
}, {
|
|
34713
|
-
key: "MediaServiceSaveMode",
|
|
34714
|
-
get: function get() {
|
|
34715
|
-
return this.mediaServiceSaveMode;
|
|
34716
|
-
},
|
|
34717
|
-
set: function set(mode) {
|
|
34718
|
-
this.mediaServiceSaveMode = mode;
|
|
34719
|
-
}
|
|
34720
|
-
}]);
|
|
34721
|
-
}();
|
|
34722
|
-
|
|
34723
|
-
function ownKeys$8(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; }
|
|
34724
|
-
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34725
|
-
var LOG$6 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
34726
34143
|
var DivaBasketHandler = /*#__PURE__*/function () {
|
|
34727
34144
|
function DivaBasketHandler(plannerConfig) {
|
|
34728
34145
|
var _this = this,
|
|
@@ -34756,7 +34173,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34756
34173
|
this.assignNewDivaNr = !!this.plannerConfig.assignNewDivaNr;
|
|
34757
34174
|
this._handler = plannerConfig.handler;
|
|
34758
34175
|
if (this.plannerConfig.divaNr == undefined && this.plannerConfig.basketData == undefined && this.plannerConfig.catalogCodex == undefined && this.plannerConfig.productId == undefined && this.plannerConfig.customProductId == undefined && this.plannerConfig.returnTo != 'TEST_CONFIGURATORLOGIC' && !((_this$plannerConfig$s = this.plannerConfig.settings) !== null && _this$plannerConfig$s !== void 0 && (_this$plannerConfig$s = _this$plannerConfig$s.ViewConfig) !== null && _this$plannerConfig$s !== void 0 && (_this$plannerConfig$s = _this$plannerConfig$s.plannerType) !== null && _this$plannerConfig$s !== void 0 && _this$plannerConfig$s.includes('PRODUCTS') || (_this$plannerConfig$s2 = this.plannerConfig.settings) !== null && _this$plannerConfig$s2 !== void 0 && (_this$plannerConfig$s2 = _this$plannerConfig$s2.ViewConfig) !== null && _this$plannerConfig$s2 !== void 0 && (_this$plannerConfig$s2 = _this$plannerConfig$s2.plannerType) !== null && _this$plannerConfig$s2 !== void 0 && _this$plannerConfig$s2.includes('PROMOTED'))) {
|
|
34759
|
-
LOG$
|
|
34176
|
+
LOG$7.error(new DivaUtils.DivaError('Keine Öffnungsparameter', {
|
|
34760
34177
|
code: 'WC_0003'
|
|
34761
34178
|
}));
|
|
34762
34179
|
}
|
|
@@ -34766,7 +34183,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34766
34183
|
}
|
|
34767
34184
|
if ((_this$plannerConfig$a = this.plannerConfig.apiConfig) !== null && _this$plannerConfig$a !== void 0 && _this$plannerConfig$a.basketService) {
|
|
34768
34185
|
var _this$plannerConfig$a2, _this$plannerConfig$a3;
|
|
34769
|
-
this._basketHandler = new BasketHandler__default["default"](LOG$
|
|
34186
|
+
this._basketHandler = new BasketHandler__default["default"](LOG$7, (_this$plannerConfig$a2 = this.plannerConfig.apiConfig) === null || _this$plannerConfig$a2 === void 0 ? void 0 : _this$plannerConfig$a2.basketService, (_this$plannerConfig$a3 = this.plannerConfig.apiConfig) === null || _this$plannerConfig$a3 === void 0 ? void 0 : _this$plannerConfig$a3.api2["default"]);
|
|
34770
34187
|
}
|
|
34771
34188
|
}
|
|
34772
34189
|
return _createClass__default["default"](DivaBasketHandler, [{
|
|
@@ -34819,13 +34236,13 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34819
34236
|
value: function () {
|
|
34820
34237
|
var _initializeBasket = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(api) {
|
|
34821
34238
|
var _this$plannerConfig$s3, _this$plannerConfig$s5, _api$getPlannerType, _this$plannerConfig$r;
|
|
34822
|
-
var returnSuccessfully, divaNr, i, os, _params$customFieldsT, params, _this$plannerConfig$h, _this$plannerConfig$c, _this$plannerConfig$c2, _result$data$, result, _result$data$2, _this$plannerConfig$s4, _this$plannerConfig$a4, _api$getI18n, _api$getI18n2, successfully;
|
|
34239
|
+
var returnSuccessfully, divaNr, i, os, _params$customFieldsT, params, _this$plannerConfig$h, _this$plannerConfig$c, _this$plannerConfig$c2, _this$plannerConfig$c3, _result$data$, result, _result$data$2, _this$plannerConfig$s4, _this$plannerConfig$a4, _api$getI18n, _api$getI18n2, successfully;
|
|
34823
34240
|
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
34824
34241
|
while (1) switch (_context.prev = _context.next) {
|
|
34825
34242
|
case 0:
|
|
34826
34243
|
this.basketWasSavedWithCurrentDocVersion = false;
|
|
34827
34244
|
this.startProductId = undefined;
|
|
34828
|
-
LOG$
|
|
34245
|
+
LOG$7.debug("Basket initialising. initObject is: '", this.plannerConfig, "' divaNr to load is: '" + this.loadDivaNr + "'");
|
|
34829
34246
|
if (this.ignoreInitObjectWhenInitializing) {
|
|
34830
34247
|
_context.next = 34;
|
|
34831
34248
|
break;
|
|
@@ -34952,9 +34369,9 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34952
34369
|
op: 'eq',
|
|
34953
34370
|
value: (_this$plannerConfig$c2 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c2 === void 0 ? void 0 : _this$plannerConfig$c2._id
|
|
34954
34371
|
}, {
|
|
34955
|
-
id: '
|
|
34372
|
+
id: 'availableForOrganizations',
|
|
34956
34373
|
op: 'eq',
|
|
34957
|
-
value:
|
|
34374
|
+
value: (_this$plannerConfig$c3 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c3 === void 0 ? void 0 : _this$plannerConfig$c3._id
|
|
34958
34375
|
}]);
|
|
34959
34376
|
case 60:
|
|
34960
34377
|
result = _context.sent;
|
|
@@ -34991,7 +34408,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34991
34408
|
title: (_api$getI18n = api.getI18n()) === null || _api$getI18n === void 0 ? void 0 : _api$getI18n.t('configurator.no_startproduct_defined_title'),
|
|
34992
34409
|
text: (_api$getI18n2 = api.getI18n()) === null || _api$getI18n2 === void 0 ? void 0 : _api$getI18n2.t('configurator.no_startproduct_defined_text')
|
|
34993
34410
|
});
|
|
34994
|
-
LOG$
|
|
34411
|
+
LOG$7.error(new DivaUtils.DivaError('it is configured to initialize the startProductForOrganizations if there are no other parameters. But no available product was found with organizationId: "' + this.plannerConfig.currentOrganization._id + '" in the field: "startProductForOrganizations"!'));
|
|
34995
34412
|
case 77:
|
|
34996
34413
|
_context.next = 83;
|
|
34997
34414
|
break;
|
|
@@ -35139,12 +34556,12 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35139
34556
|
case 0:
|
|
35140
34557
|
basketFromAPI = (_dataFromApi$basket = dataFromApi.basket) !== null && _dataFromApi$basket !== void 0 ? _dataFromApi$basket : dataFromApi.Basket; //evaluateRopoEffect(basketFromAPI,);
|
|
35141
34558
|
if (origProductId) basketFromAPI.OrigProductId = origProductId;
|
|
35142
|
-
basket = _objectSpread$
|
|
34559
|
+
basket = _objectSpread$7({}, basketFromAPI);
|
|
35143
34560
|
if (!basketFromAPI) {
|
|
35144
|
-
_context5.next =
|
|
34561
|
+
_context5.next = 48;
|
|
35145
34562
|
break;
|
|
35146
34563
|
}
|
|
35147
|
-
LOG$
|
|
34564
|
+
LOG$7.debug('divaNr: ' + divaNr + ' was loaded successfully from server!');
|
|
35148
34565
|
if (basketFromAPI.OrigDivaNr) {
|
|
35149
34566
|
this.origConfiguration.originDivaNr = basketFromAPI.OrigDivaNr;
|
|
35150
34567
|
} else if (basketFromAPI.OrigCatalogCodex) {
|
|
@@ -35238,20 +34655,14 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35238
34655
|
this.baskets[newDivaNr] = new basketModel.BasketData(basket);
|
|
35239
34656
|
this.baskets[newDivaNr].clearRenderData();
|
|
35240
34657
|
if (!keepOldDivaNr) this.divaNr = newDivaNr;
|
|
35241
|
-
_context5.next = 46;
|
|
35242
|
-
return DivaUtils__default["default"].initCache({
|
|
35243
|
-
accountGuid: this.baskets[newDivaNr].OrderSets[0].AccountGUID,
|
|
35244
|
-
catalogCodex: this.baskets[newDivaNr].OrderSets[0].CatalogCodex
|
|
35245
|
-
});
|
|
35246
|
-
case 46:
|
|
35247
34658
|
if (this.assignNewDivaNr) {
|
|
35248
34659
|
this.baskets[newDivaNr].clearBasketClientData();
|
|
35249
34660
|
this.baskets[newDivaNr].ProductSetName = '';
|
|
35250
34661
|
}
|
|
35251
34662
|
return _context5.abrupt("return", true);
|
|
35252
|
-
case
|
|
34663
|
+
case 48:
|
|
35253
34664
|
return _context5.abrupt("return", false);
|
|
35254
|
-
case
|
|
34665
|
+
case 49:
|
|
35255
34666
|
case "end":
|
|
35256
34667
|
return _context5.stop();
|
|
35257
34668
|
}
|
|
@@ -35285,7 +34696,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35285
34696
|
key: "loadBasketByCatalogCodex",
|
|
35286
34697
|
value: function () {
|
|
35287
34698
|
var _loadBasketByCatalogCodex = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(api) {
|
|
35288
|
-
var _this$plannerConfig$s8
|
|
34699
|
+
var _this$plannerConfig$s8;
|
|
35289
34700
|
var newBasket, _this$baskets$this$di;
|
|
35290
34701
|
return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context6) {
|
|
35291
34702
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -35296,37 +34707,23 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35296
34707
|
if (this.plannerConfig.articleCodexes) {
|
|
35297
34708
|
this.origConfiguration.originArticleCodexes = this.plannerConfig.articleCodexes;
|
|
35298
34709
|
}
|
|
35299
|
-
if (!(
|
|
34710
|
+
if (!((_this$plannerConfig$s8 = this.plannerConfig.startDivaNr) !== null && _this$plannerConfig$s8 !== void 0)) {
|
|
35300
34711
|
_context6.next = 6;
|
|
35301
34712
|
break;
|
|
35302
34713
|
}
|
|
35303
|
-
|
|
35304
|
-
_context6.next =
|
|
34714
|
+
_context6.t0 = _this$plannerConfig$s8;
|
|
34715
|
+
_context6.next = 9;
|
|
35305
34716
|
break;
|
|
35306
34717
|
case 6:
|
|
35307
34718
|
_context6.next = 8;
|
|
35308
|
-
return DivaUtils__default["default"].initCache({
|
|
35309
|
-
accountGuid: this.plannerConfig.accountGuid,
|
|
35310
|
-
catalogCodex: this.plannerConfig.catalogCodex
|
|
35311
|
-
});
|
|
35312
|
-
case 8:
|
|
35313
|
-
if (!((_this$plannerConfig$s8 = this.plannerConfig.startDivaNr) !== null && _this$plannerConfig$s8 !== void 0)) {
|
|
35314
|
-
_context6.next = 12;
|
|
35315
|
-
break;
|
|
35316
|
-
}
|
|
35317
|
-
_context6.t0 = _this$plannerConfig$s8;
|
|
35318
|
-
_context6.next = 15;
|
|
35319
|
-
break;
|
|
35320
|
-
case 12:
|
|
35321
|
-
_context6.next = 14;
|
|
35322
34719
|
return this.createNewDivaNr(api);
|
|
35323
|
-
case
|
|
34720
|
+
case 8:
|
|
35324
34721
|
_context6.t0 = _context6.sent;
|
|
35325
|
-
case
|
|
34722
|
+
case 9:
|
|
35326
34723
|
this.divaNr = _context6.t0;
|
|
35327
|
-
_context6.next =
|
|
34724
|
+
_context6.next = 12;
|
|
35328
34725
|
return this.createNewBasket(api, this.plannerConfig, this.divaNr, api.getLanguage());
|
|
35329
|
-
case
|
|
34726
|
+
case 12:
|
|
35330
34727
|
newBasket = _context6.sent;
|
|
35331
34728
|
if (!this.plannerConfig.basketData) {
|
|
35332
34729
|
this.baskets[this.divaNr] = newBasket;
|
|
@@ -35343,14 +34740,8 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35343
34740
|
if (this.baskets[this.divaNr].SetPlannerInfos) ;
|
|
35344
34741
|
}
|
|
35345
34742
|
this.specificSetIdToLoad = this.plannerConfig.setId;
|
|
35346
|
-
_context6.next = 23;
|
|
35347
|
-
return DivaUtils__default["default"].initCache({
|
|
35348
|
-
accountGuid: (_this$actBasket$Order = this.actBasket.OrderSets[0]) === null || _this$actBasket$Order === void 0 ? void 0 : _this$actBasket$Order.AccountGUID,
|
|
35349
|
-
catalogCodex: (_this$actBasket$Order2 = this.actBasket.OrderSets[0]) === null || _this$actBasket$Order2 === void 0 ? void 0 : _this$actBasket$Order2.CatalogCodex
|
|
35350
|
-
});
|
|
35351
|
-
case 23:
|
|
35352
34743
|
return _context6.abrupt("return", true);
|
|
35353
|
-
case
|
|
34744
|
+
case 16:
|
|
35354
34745
|
case "end":
|
|
35355
34746
|
return _context6.stop();
|
|
35356
34747
|
}
|
|
@@ -35381,7 +34772,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35381
34772
|
case 9:
|
|
35382
34773
|
_context7.prev = 9;
|
|
35383
34774
|
_context7.t0 = _context7["catch"](0);
|
|
35384
|
-
LOG$
|
|
34775
|
+
LOG$7.error(new DivaUtils.DivaError('DivaNr konnte in der Datenbank nicht gefunden werden', {
|
|
35385
34776
|
code: 'WC_0004',
|
|
35386
34777
|
custom: {
|
|
35387
34778
|
divaNr: divaNr
|
|
@@ -35417,7 +34808,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35417
34808
|
_context8.next = 8;
|
|
35418
34809
|
break;
|
|
35419
34810
|
}
|
|
35420
|
-
LOG$
|
|
34811
|
+
LOG$7.error(new DivaUtils.DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
|
|
35421
34812
|
code: 'WC_0005',
|
|
35422
34813
|
custom: {
|
|
35423
34814
|
productId: productId
|
|
@@ -35501,7 +34892,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35501
34892
|
_context10.next = 6;
|
|
35502
34893
|
break;
|
|
35503
34894
|
}
|
|
35504
|
-
LOG$
|
|
34895
|
+
LOG$7.error(new DivaUtils.DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
|
|
35505
34896
|
code: 'WC_0005',
|
|
35506
34897
|
custom: {
|
|
35507
34898
|
productId: productId
|
|
@@ -35538,8 +34929,8 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35538
34929
|
CatalogGUID: initObject.catalogGuid,
|
|
35539
34930
|
AccountGUID: initObject.accountGuid,
|
|
35540
34931
|
Favorites: new basketModel.Favorites()
|
|
35541
|
-
});
|
|
35542
|
-
if (!(initObject.accountGuid && !orderSet.AccountSessionGUID
|
|
34932
|
+
});
|
|
34933
|
+
if (!(initObject.accountGuid && !orderSet.AccountSessionGUID)) {
|
|
35543
34934
|
_context11.next = 5;
|
|
35544
34935
|
break;
|
|
35545
34936
|
}
|
|
@@ -35588,12 +34979,12 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35588
34979
|
key: "saveToBasket",
|
|
35589
34980
|
value: function () {
|
|
35590
34981
|
var _saveToBasket = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12(api, actBasket, returnTo) {
|
|
35591
|
-
var _this$plannerConfig$
|
|
34982
|
+
var _this$plannerConfig$c4, _this$_basketHandler, _api$getJwt;
|
|
35592
34983
|
var response;
|
|
35593
34984
|
return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context12) {
|
|
35594
34985
|
while (1) switch (_context12.prev = _context12.next) {
|
|
35595
34986
|
case 0:
|
|
35596
|
-
LOG$
|
|
34987
|
+
LOG$7.startTransaction({
|
|
35597
34988
|
event: 'SaveBasketOnAPI',
|
|
35598
34989
|
eventId: 'SAVE_BASKET_ON_API',
|
|
35599
34990
|
message: 'Save Basket on API'
|
|
@@ -35607,7 +34998,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35607
34998
|
return DivaUtils__default["default"].updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser, this.plannerConfig.settings.keepSalesPersonDataInBasket);
|
|
35608
34999
|
case 8:
|
|
35609
35000
|
actBasket.UserLanguage = api.getLanguage();
|
|
35610
|
-
actBasket.PrintRetailLogo = (_this$plannerConfig$
|
|
35001
|
+
actBasket.PrintRetailLogo = (_this$plannerConfig$c4 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c4 === void 0 ? void 0 : _this$plannerConfig$c4.logoUrl;
|
|
35611
35002
|
_context12.next = 12;
|
|
35612
35003
|
return (_this$_basketHandler = this._basketHandler) === null || _this$_basketHandler === void 0 ? void 0 : _this$_basketHandler.saveBasket({
|
|
35613
35004
|
jwt: (_api$getJwt = api.getJwt()) !== null && _api$getJwt !== void 0 ? _api$getJwt : undefined,
|
|
@@ -35632,7 +35023,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35632
35023
|
}
|
|
35633
35024
|
return _context12.abrupt("return", response);
|
|
35634
35025
|
case 19:
|
|
35635
|
-
LOG$
|
|
35026
|
+
LOG$7.successTransaction('saveBasketOnAPI');
|
|
35636
35027
|
return _context12.abrupt("return", response === null || response === void 0 ? void 0 : response._id);
|
|
35637
35028
|
case 21:
|
|
35638
35029
|
case "end":
|
|
@@ -35738,7 +35129,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35738
35129
|
if (_loop2()) continue;
|
|
35739
35130
|
}
|
|
35740
35131
|
var variantValues = article.VariantValuesParentOption;
|
|
35741
|
-
var data = _objectSpread$
|
|
35132
|
+
var data = _objectSpread$7(_objectSpread$7({}, this.actBasket), {}, {
|
|
35742
35133
|
changedValues: changedValues,
|
|
35743
35134
|
variantValues: variantValues,
|
|
35744
35135
|
isInit: isInit,
|
|
@@ -35763,7 +35154,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35763
35154
|
break;
|
|
35764
35155
|
case 3:
|
|
35765
35156
|
_context13.next = 5;
|
|
35766
|
-
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-
|
|
35157
|
+
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-73a6a1bb.js'); });
|
|
35767
35158
|
case 5:
|
|
35768
35159
|
_yield$import = _context13.sent;
|
|
35769
35160
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -35771,7 +35162,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35771
35162
|
return _context13.abrupt("break", 33);
|
|
35772
35163
|
case 9:
|
|
35773
35164
|
_context13.next = 11;
|
|
35774
|
-
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-
|
|
35165
|
+
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-495734b8.js'); });
|
|
35775
35166
|
case 11:
|
|
35776
35167
|
_yield$import2 = _context13.sent;
|
|
35777
35168
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -35779,7 +35170,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35779
35170
|
return _context13.abrupt("break", 33);
|
|
35780
35171
|
case 15:
|
|
35781
35172
|
_context13.next = 17;
|
|
35782
|
-
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-
|
|
35173
|
+
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-4254c183.js'); });
|
|
35783
35174
|
case 17:
|
|
35784
35175
|
_yield$import3 = _context13.sent;
|
|
35785
35176
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -35787,7 +35178,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35787
35178
|
return _context13.abrupt("break", 33);
|
|
35788
35179
|
case 21:
|
|
35789
35180
|
_context13.next = 23;
|
|
35790
|
-
return Promise.resolve().then(function () { return require('./ProductBasketHandler-
|
|
35181
|
+
return Promise.resolve().then(function () { return require('./ProductBasketHandler-fca32045.js'); });
|
|
35791
35182
|
case 23:
|
|
35792
35183
|
_yield$import4 = _context13.sent;
|
|
35793
35184
|
ProductWWSHandler = _yield$import4["default"];
|
|
@@ -35795,7 +35186,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35795
35186
|
return _context13.abrupt("break", 33);
|
|
35796
35187
|
case 27:
|
|
35797
35188
|
_context13.next = 29;
|
|
35798
|
-
return Promise.resolve().then(function () { return require('./StandardWWSHandler-
|
|
35189
|
+
return Promise.resolve().then(function () { return require('./StandardWWSHandler-785777e5.js'); });
|
|
35799
35190
|
case 29:
|
|
35800
35191
|
_yield$import5 = _context13.sent;
|
|
35801
35192
|
StandardWWSHandler = _yield$import5["default"];
|
|
@@ -35826,43 +35217,43 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35826
35217
|
//if no shopType is set in parent organization, no ropo effekt
|
|
35827
35218
|
if (!organization.shopType) return;
|
|
35828
35219
|
if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'store') {
|
|
35829
|
-
var _this$plannerConfig$c4;
|
|
35830
|
-
LOG$6.businessEvent('ropoEffectStoreToStore', 'Seller', 'Evaluating the ROPO Effect Store To Store', {
|
|
35831
|
-
sourceDivaNr: sourceBasket.DivaNr,
|
|
35832
|
-
sourceOrgId: sourceOrganizationId.id,
|
|
35833
|
-
targetOrgId: (_this$plannerConfig$c4 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c4 === void 0 ? void 0 : _this$plannerConfig$c4._id
|
|
35834
|
-
});
|
|
35835
|
-
} else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'webshop') {
|
|
35836
35220
|
var _this$plannerConfig$c5;
|
|
35837
|
-
LOG$
|
|
35221
|
+
LOG$7.businessEvent('ropoEffectStoreToStore', 'Seller', 'Evaluating the ROPO Effect Store To Store', {
|
|
35838
35222
|
sourceDivaNr: sourceBasket.DivaNr,
|
|
35839
35223
|
sourceOrgId: sourceOrganizationId.id,
|
|
35840
35224
|
targetOrgId: (_this$plannerConfig$c5 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c5 === void 0 ? void 0 : _this$plannerConfig$c5._id
|
|
35841
35225
|
});
|
|
35842
|
-
} else if (organization.shopType == '
|
|
35226
|
+
} else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'webshop') {
|
|
35843
35227
|
var _this$plannerConfig$c6;
|
|
35844
|
-
LOG$
|
|
35228
|
+
LOG$7.businessEvent('ropoEffectWebToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Web', {
|
|
35845
35229
|
sourceDivaNr: sourceBasket.DivaNr,
|
|
35846
35230
|
sourceOrgId: sourceOrganizationId.id,
|
|
35847
35231
|
targetOrgId: (_this$plannerConfig$c6 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c6 === void 0 ? void 0 : _this$plannerConfig$c6._id
|
|
35848
35232
|
});
|
|
35849
|
-
} else if (organization.shopType == '
|
|
35233
|
+
} else if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'webshop') {
|
|
35850
35234
|
var _this$plannerConfig$c7;
|
|
35851
|
-
LOG$
|
|
35235
|
+
LOG$7.businessEvent('ropoEffectStoreToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Store', {
|
|
35852
35236
|
sourceDivaNr: sourceBasket.DivaNr,
|
|
35853
35237
|
sourceOrgId: sourceOrganizationId.id,
|
|
35854
35238
|
targetOrgId: (_this$plannerConfig$c7 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c7 === void 0 ? void 0 : _this$plannerConfig$c7._id
|
|
35855
35239
|
});
|
|
35240
|
+
} else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'store') {
|
|
35241
|
+
var _this$plannerConfig$c8;
|
|
35242
|
+
LOG$7.businessEvent('ropoEffectWebToStore', 'Seller', 'Evaluating the ROPO Effect Store To Web', {
|
|
35243
|
+
sourceDivaNr: sourceBasket.DivaNr,
|
|
35244
|
+
sourceOrgId: sourceOrganizationId.id,
|
|
35245
|
+
targetOrgId: (_this$plannerConfig$c8 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c8 === void 0 ? void 0 : _this$plannerConfig$c8._id
|
|
35246
|
+
});
|
|
35856
35247
|
}
|
|
35857
35248
|
} catch (e) {
|
|
35858
|
-
var _this$plannerConfig$
|
|
35859
|
-
LOG$
|
|
35249
|
+
var _this$plannerConfig$c9;
|
|
35250
|
+
LOG$7.error(new DivaUtils.DivaError('Error on Evaluating ROPO Effect', {
|
|
35860
35251
|
code: 'SELLER_0006',
|
|
35861
35252
|
cause: e,
|
|
35862
35253
|
custom: {
|
|
35863
35254
|
sourceDivaNr: sourceBasket.DivaNr,
|
|
35864
35255
|
sourceOrgId: sourceOrganizationId,
|
|
35865
|
-
targetOrgId: (_this$plannerConfig$
|
|
35256
|
+
targetOrgId: (_this$plannerConfig$c9 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c9 === void 0 ? void 0 : _this$plannerConfig$c9._id
|
|
35866
35257
|
}
|
|
35867
35258
|
}));
|
|
35868
35259
|
}
|
|
@@ -35870,7 +35261,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35870
35261
|
}]);
|
|
35871
35262
|
}();
|
|
35872
35263
|
|
|
35873
|
-
var LOG$
|
|
35264
|
+
var LOG$6 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
35874
35265
|
var ViewPointHandler = /*#__PURE__*/function () {
|
|
35875
35266
|
function ViewPointHandler() {
|
|
35876
35267
|
_classCallCheck__default["default"](this, ViewPointHandler);
|
|
@@ -36093,22 +35484,22 @@ var ViewPointHandler = /*#__PURE__*/function () {
|
|
|
36093
35484
|
var roomListObj = JSON.parse(roomlist);
|
|
36094
35485
|
var roomIsSel = true;
|
|
36095
35486
|
for (var roomCodex in roomListObj) {
|
|
36096
|
-
LOG$
|
|
35487
|
+
LOG$6.debug('Successfully Init roomList with Codex ' + roomCodex, 'ViewPointHandler - initRoomList');
|
|
36097
35488
|
var curRoom = roomListObj[roomCodex];
|
|
36098
35489
|
var mainCategory = '#WG#';
|
|
36099
35490
|
if (!this.staticRoomMainCategories.has(roomCodex)) {
|
|
36100
|
-
LOG$
|
|
35491
|
+
LOG$6.error(new DivaUtils.DivaError('Error when parsing preview URL for a viewPoint. Please add a retailerMainCategory for this catalog in the CE!', {
|
|
36101
35492
|
code: 'WC_0013'
|
|
36102
35493
|
}));
|
|
36103
35494
|
} else {
|
|
36104
35495
|
var categories = this.staticRoomMainCategories.get(roomCodex);
|
|
36105
35496
|
if (categories.length == 0) {
|
|
36106
|
-
LOG$
|
|
35497
|
+
LOG$6.error(new DivaUtils.DivaError('Error when parsing preview URL for a viewPoint. Please add a retailerMainCategory for this catalog in the CE!', {
|
|
36107
35498
|
code: 'WC_0013'
|
|
36108
35499
|
}));
|
|
36109
35500
|
} else {
|
|
36110
35501
|
if (categories.length > 1) {
|
|
36111
|
-
LOG$
|
|
35502
|
+
LOG$6.error(new DivaUtils.DivaError('Error when parsing preview URL for a viewPoint. There is more than one Catalog loaded. Decide a strategy which mainCategory should be taken!', {
|
|
36112
35503
|
code: 'WC_0013'
|
|
36113
35504
|
}));
|
|
36114
35505
|
}
|
|
@@ -36122,7 +35513,7 @@ var ViewPointHandler = /*#__PURE__*/function () {
|
|
|
36122
35513
|
previewUrl = previewUrl.replace('#WG#', mainCategory);
|
|
36123
35514
|
}
|
|
36124
35515
|
if (curRoom.VP[i].R && curRoom.VP[i].R.indexOf(':') == -1) {
|
|
36125
|
-
LOG$
|
|
35516
|
+
LOG$6.error(new DivaUtils.DivaError('The background has a custom width and custom height. However it is not formatted correctly. the width and height must be separated with ":" : ' + curRoom.VP[i].R, {
|
|
36126
35517
|
code: 'WC_0013'
|
|
36127
35518
|
}));
|
|
36128
35519
|
}
|
|
@@ -36220,7 +35611,7 @@ var ViewPointHandler = /*#__PURE__*/function () {
|
|
|
36220
35611
|
this.navInfo3D.rotVert = 0;
|
|
36221
35612
|
this.navInfo3D.rotHori = 0;
|
|
36222
35613
|
} else {
|
|
36223
|
-
LOG$
|
|
35614
|
+
LOG$6.debug('There is no static frontend viewpoint room: ' + roomCodex);
|
|
36224
35615
|
}
|
|
36225
35616
|
} else if (this.curRoomCodex == roominfo.codex) {
|
|
36226
35617
|
roominfo.sel = false;
|
|
@@ -36365,207 +35756,415 @@ var ViewPointHandler = /*#__PURE__*/function () {
|
|
|
36365
35756
|
}]);
|
|
36366
35757
|
}();
|
|
36367
35758
|
|
|
36368
|
-
|
|
36369
|
-
|
|
36370
|
-
var
|
|
36371
|
-
|
|
36372
|
-
|
|
36373
|
-
|
|
36374
|
-
|
|
36375
|
-
|
|
36376
|
-
_defineProperty__default["default"](this, "
|
|
36377
|
-
_defineProperty__default["default"](this, "
|
|
36378
|
-
_defineProperty__default["default"](this, "
|
|
36379
|
-
_defineProperty__default["default"](this, "
|
|
36380
|
-
|
|
36381
|
-
|
|
36382
|
-
|
|
36383
|
-
|
|
36384
|
-
|
|
36385
|
-
this
|
|
35759
|
+
//This class saves all informations needed for a rendering
|
|
35760
|
+
var LOG$5 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
35761
|
+
var Rendering = /*#__PURE__*/function () {
|
|
35762
|
+
function Rendering(planningHash, renderHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, hasLayerMask, hasStaticBG, mediaServiceSaveMode, alternateRenderingsExist, alternateRendererInfo) {
|
|
35763
|
+
_classCallCheck__default["default"](this, Rendering);
|
|
35764
|
+
_defineProperty__default["default"](this, "planningHash", void 0);
|
|
35765
|
+
_defineProperty__default["default"](this, "renderHash", void 0);
|
|
35766
|
+
_defineProperty__default["default"](this, "creationTime", void 0);
|
|
35767
|
+
_defineProperty__default["default"](this, "renderWidth", void 0);
|
|
35768
|
+
_defineProperty__default["default"](this, "renderHeight", void 0);
|
|
35769
|
+
_defineProperty__default["default"](this, "uiInfo", void 0);
|
|
35770
|
+
_defineProperty__default["default"](this, "urlToSavedRendering", void 0);
|
|
35771
|
+
// viewPoint: string;
|
|
35772
|
+
// private posInfo: any;
|
|
35773
|
+
//private doStream: boolean; Streaming over 3D Host is deprected
|
|
35774
|
+
//private byteChunkArr: any;
|
|
35775
|
+
//private byteChunkLayerMaskArr: any;
|
|
35776
|
+
_defineProperty__default["default"](this, "hasLayerMask", void 0);
|
|
35777
|
+
//private imgBytes: any;
|
|
35778
|
+
_defineProperty__default["default"](this, "imgForSrc", void 0);
|
|
35779
|
+
_defineProperty__default["default"](this, "layerMaskAsBase64", void 0);
|
|
35780
|
+
_defineProperty__default["default"](this, "layerMaskThreeTexture", void 0);
|
|
35781
|
+
_defineProperty__default["default"](this, "isFullscreenRendering", void 0);
|
|
35782
|
+
_defineProperty__default["default"](this, "hasStaticBackground", void 0);
|
|
35783
|
+
_defineProperty__default["default"](this, "hasDimensionLines", void 0);
|
|
35784
|
+
_defineProperty__default["default"](this, "plannerMeasureDigits", void 0);
|
|
35785
|
+
_defineProperty__default["default"](this, "alternateRendererInfo", void 0);
|
|
35786
|
+
_defineProperty__default["default"](this, "isAlternateRendering", void 0);
|
|
35787
|
+
_defineProperty__default["default"](this, "alternateRenderingsExist", void 0);
|
|
35788
|
+
_defineProperty__default["default"](this, "mediaServiceSaveMode", void 0);
|
|
35789
|
+
_defineProperty__default["default"](this, "catalogData", void 0);
|
|
35790
|
+
this.planningHash = planningHash;
|
|
35791
|
+
this.renderHash = renderHash;
|
|
35792
|
+
this.renderWidth = width;
|
|
35793
|
+
this.renderHeight = height;
|
|
35794
|
+
this.uiInfo = '';
|
|
35795
|
+
this.imgForSrc = '';
|
|
35796
|
+
this.layerMaskAsBase64 = '';
|
|
35797
|
+
this.isFullscreenRendering = isFullscreenRendering;
|
|
35798
|
+
this.hasDimensionLines = hasDimensionLines;
|
|
35799
|
+
this.plannerMeasureDigits = plannerMeasureDigits;
|
|
35800
|
+
this.hasLayerMask = hasLayerMask;
|
|
35801
|
+
this.creationTime = new Date();
|
|
35802
|
+
this.layerMaskThreeTexture = undefined;
|
|
35803
|
+
this.hasStaticBackground = hasStaticBG;
|
|
35804
|
+
this.mediaServiceSaveMode = mediaServiceSaveMode;
|
|
35805
|
+
this.urlToSavedRendering = '';
|
|
35806
|
+
this.catalogData = {
|
|
35807
|
+
catalogCodex: '',
|
|
35808
|
+
catalogGUID: ''
|
|
35809
|
+
};
|
|
35810
|
+
if (alternateRendererInfo != undefined) this.isAlternateRendering = true;else this.isAlternateRendering = false;
|
|
35811
|
+
this.alternateRendererInfo = alternateRendererInfo;
|
|
35812
|
+
this.alternateRenderingsExist = !!alternateRenderingsExist;
|
|
36386
35813
|
}
|
|
36387
|
-
return _createClass__default["default"](
|
|
36388
|
-
key: "
|
|
36389
|
-
value: function
|
|
36390
|
-
this.
|
|
35814
|
+
return _createClass__default["default"](Rendering, [{
|
|
35815
|
+
key: "clone",
|
|
35816
|
+
value: function clone(rendering) {
|
|
35817
|
+
this.planningHash = rendering.planningHash;
|
|
35818
|
+
this.renderHash = rendering.renderHash;
|
|
35819
|
+
this.creationTime = rendering.creationTime;
|
|
35820
|
+
this.renderWidth = rendering.renderWidth;
|
|
35821
|
+
this.renderHeight = rendering.renderHeight;
|
|
35822
|
+
this.uiInfo = rendering.uiInfo;
|
|
35823
|
+
this.urlToSavedRendering = rendering.urlToSavedRendering;
|
|
35824
|
+
this.hasLayerMask = rendering.hasLayerMask;
|
|
35825
|
+
this.imgForSrc = rendering.imgForSrc;
|
|
35826
|
+
this.layerMaskAsBase64 = rendering.layerMaskAsBase64;
|
|
35827
|
+
this.layerMaskThreeTexture = rendering.layerMaskThreeTexture;
|
|
35828
|
+
this.isFullscreenRendering = rendering.isFullscreenRendering;
|
|
35829
|
+
this.hasStaticBackground = rendering.hasStaticBackground;
|
|
35830
|
+
this.hasDimensionLines = rendering.hasDimensionLines;
|
|
35831
|
+
this.plannerMeasureDigits = rendering.plannerMeasureDigits;
|
|
35832
|
+
this.alternateRendererInfo = rendering.alternateRendererInfo;
|
|
35833
|
+
this.isAlternateRendering = rendering.isAlternateRendering;
|
|
35834
|
+
this.alternateRenderingsExist = rendering.alternateRenderingsExist;
|
|
35835
|
+
this.mediaServiceSaveMode = rendering.mediaServiceSaveMode;
|
|
35836
|
+
this.catalogData = rendering.catalogData;
|
|
36391
35837
|
}
|
|
36392
35838
|
}, {
|
|
36393
|
-
key: "
|
|
36394
|
-
value: function
|
|
36395
|
-
this.
|
|
35839
|
+
key: "getAllDockingPoints",
|
|
35840
|
+
value: function getAllDockingPoints(setId, elementId) {
|
|
35841
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35842
|
+
return this.uiInfo['S1']['E' + elementId]['DP'];
|
|
35843
|
+
}
|
|
35844
|
+
return this.uiInfo[setId]['E' + elementId]['DP'];
|
|
36396
35845
|
}
|
|
36397
35846
|
}, {
|
|
36398
|
-
key: "
|
|
36399
|
-
value: function
|
|
36400
|
-
this.
|
|
35847
|
+
key: "getHasStaticBackground",
|
|
35848
|
+
value: function getHasStaticBackground() {
|
|
35849
|
+
return this.hasStaticBackground;
|
|
36401
35850
|
}
|
|
36402
35851
|
}, {
|
|
36403
|
-
key: "
|
|
36404
|
-
value: function
|
|
36405
|
-
this.
|
|
35852
|
+
key: "getIsFullscreenRendering",
|
|
35853
|
+
value: function getIsFullscreenRendering() {
|
|
35854
|
+
return this.isFullscreenRendering;
|
|
36406
35855
|
}
|
|
36407
35856
|
}, {
|
|
36408
|
-
key: "
|
|
36409
|
-
value: function () {
|
|
36410
|
-
|
|
36411
|
-
|
|
36412
|
-
|
|
36413
|
-
|
|
36414
|
-
|
|
36415
|
-
|
|
36416
|
-
|
|
36417
|
-
|
|
36418
|
-
|
|
36419
|
-
|
|
36420
|
-
|
|
36421
|
-
|
|
36422
|
-
|
|
36423
|
-
|
|
36424
|
-
|
|
36425
|
-
|
|
36426
|
-
|
|
36427
|
-
|
|
36428
|
-
|
|
36429
|
-
|
|
36430
|
-
|
|
36431
|
-
|
|
36432
|
-
|
|
36433
|
-
|
|
36434
|
-
|
|
36435
|
-
|
|
36436
|
-
|
|
36437
|
-
|
|
36438
|
-
|
|
36439
|
-
|
|
36440
|
-
|
|
36441
|
-
|
|
36442
|
-
|
|
36443
|
-
|
|
36444
|
-
if (!response.ok) {
|
|
36445
|
-
_context.next = 20;
|
|
36446
|
-
break;
|
|
36447
|
-
}
|
|
36448
|
-
_context.next = 11;
|
|
36449
|
-
return response.json();
|
|
36450
|
-
case 11:
|
|
36451
|
-
result = _context.sent;
|
|
36452
|
-
if (!(result.data.length > 0)) {
|
|
36453
|
-
_context.next = 17;
|
|
36454
|
-
break;
|
|
36455
|
-
}
|
|
36456
|
-
LOG$4.successTransaction('ON_REQUEST_RENDERING', {});
|
|
36457
|
-
return _context.abrupt("return", result.data[0].url);
|
|
36458
|
-
case 17:
|
|
36459
|
-
error = true;
|
|
36460
|
-
case 18:
|
|
36461
|
-
_context.next = 21;
|
|
36462
|
-
break;
|
|
36463
|
-
case 20:
|
|
36464
|
-
error = true;
|
|
36465
|
-
case 21:
|
|
36466
|
-
if (error && logOnError) {
|
|
36467
|
-
LOG$4.errorTransaction('ON_REQUEST_RENDERING', 'WC_0015', 'loadRenderingFromCache not found (functionType C3D). Load rendering from Cache not successfull. Hash: ' + hash + 'response: ' + response);
|
|
36468
|
-
}
|
|
36469
|
-
LOG$4.successTransaction('ON_REQUEST_RENDERING', {});
|
|
36470
|
-
return _context.abrupt("return", '');
|
|
36471
|
-
case 24:
|
|
36472
|
-
case "end":
|
|
36473
|
-
return _context.stop();
|
|
36474
|
-
}
|
|
36475
|
-
}, _callee, this);
|
|
36476
|
-
}));
|
|
36477
|
-
function loadRenderingFromCache(_x) {
|
|
36478
|
-
return _loadRenderingFromCache.apply(this, arguments);
|
|
35857
|
+
key: "setIsFullscreenRendering",
|
|
35858
|
+
value: function setIsFullscreenRendering(isFullscreen) {
|
|
35859
|
+
this.isFullscreenRendering = isFullscreen;
|
|
35860
|
+
}
|
|
35861
|
+
}, {
|
|
35862
|
+
key: "getHasDimensionLines",
|
|
35863
|
+
value: function getHasDimensionLines() {
|
|
35864
|
+
return this.hasDimensionLines;
|
|
35865
|
+
}
|
|
35866
|
+
}, {
|
|
35867
|
+
key: "getPlannerMeasureDigits",
|
|
35868
|
+
value: function getPlannerMeasureDigits() {
|
|
35869
|
+
return this.plannerMeasureDigits;
|
|
35870
|
+
}
|
|
35871
|
+
}, {
|
|
35872
|
+
key: "getIsAlternateRendering",
|
|
35873
|
+
value: function getIsAlternateRendering() {
|
|
35874
|
+
return this.isAlternateRendering;
|
|
35875
|
+
}
|
|
35876
|
+
}, {
|
|
35877
|
+
key: "getAlternateRenderInfo",
|
|
35878
|
+
value: function getAlternateRenderInfo() {
|
|
35879
|
+
return this.alternateRendererInfo;
|
|
35880
|
+
}
|
|
35881
|
+
}, {
|
|
35882
|
+
key: "getAlternateRenderingsExist",
|
|
35883
|
+
value: function getAlternateRenderingsExist() {
|
|
35884
|
+
return this.alternateRenderingsExist;
|
|
35885
|
+
}
|
|
35886
|
+
}, {
|
|
35887
|
+
key: "hasUIInfosOfElement",
|
|
35888
|
+
value: function hasUIInfosOfElement(setId, elementid) {
|
|
35889
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35890
|
+
return this.uiInfo['S1']['E' + elementid] != undefined;
|
|
35891
|
+
} else {
|
|
35892
|
+
return this.uiInfo[setId] != undefined && this.uiInfo[setId]['E' + elementid] != undefined;
|
|
36479
35893
|
}
|
|
36480
|
-
|
|
36481
|
-
}()
|
|
35894
|
+
}
|
|
36482
35895
|
}, {
|
|
36483
|
-
key: "
|
|
36484
|
-
value: function
|
|
36485
|
-
|
|
36486
|
-
|
|
36487
|
-
|
|
35896
|
+
key: "getOutlinePolygonForSVG",
|
|
35897
|
+
value: function getOutlinePolygonForSVG(setId, elementId, viewPortSize) {
|
|
35898
|
+
var poly = [];
|
|
35899
|
+
var avgCamDist = 0;
|
|
35900
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35901
|
+
poly = this.uiInfo['S1']['E' + elementId]['POLYOUTLINE'];
|
|
35902
|
+
avgCamDist = this.uiInfo['S1']['E' + elementId]['AVGCAMDIST'];
|
|
35903
|
+
} else if (this.uiInfo[setId]) {
|
|
35904
|
+
poly = this.uiInfo[setId]['E' + elementId]['POLYOUTLINE'];
|
|
35905
|
+
avgCamDist = this.uiInfo[setId]['E' + elementId]['AVGCAMDIST'];
|
|
35906
|
+
} else {
|
|
35907
|
+
poly = this.uiInfo['E' + elementId]['POLYOUTLINE'];
|
|
35908
|
+
avgCamDist = this.uiInfo['E' + elementId]['AVGCAMDIST'];
|
|
36488
35909
|
}
|
|
36489
|
-
|
|
36490
|
-
var
|
|
36491
|
-
var
|
|
36492
|
-
|
|
36493
|
-
bytes[i] = binary_string.charCodeAt(i);
|
|
35910
|
+
if (!poly) return undefined;
|
|
35911
|
+
var points = '';
|
|
35912
|
+
for (var i = 0; i < poly.length; i++) {
|
|
35913
|
+
points += Math.round(poly[i].x * 0.01 * viewPortSize.imgWidth) + ',' + Math.round((100 - poly[i].y) * 0.01 * viewPortSize.imgHeight) + ' ';
|
|
36494
35914
|
}
|
|
36495
|
-
|
|
36496
|
-
|
|
36497
|
-
|
|
36498
|
-
|
|
36499
|
-
return blob;
|
|
35915
|
+
return {
|
|
35916
|
+
points: points,
|
|
35917
|
+
avgCamDist: avgCamDist
|
|
35918
|
+
};
|
|
36500
35919
|
}
|
|
35920
|
+
|
|
35921
|
+
//Left/Right_Bottom/Top_Back/Front
|
|
36501
35922
|
}, {
|
|
36502
|
-
key: "
|
|
36503
|
-
value: function () {
|
|
36504
|
-
var
|
|
36505
|
-
|
|
36506
|
-
|
|
36507
|
-
|
|
36508
|
-
|
|
36509
|
-
|
|
36510
|
-
|
|
36511
|
-
|
|
36512
|
-
|
|
36513
|
-
data = new FormData();
|
|
36514
|
-
data.append('file', imageBlob);
|
|
36515
|
-
mediaItem = {
|
|
36516
|
-
organizationId: this.organizationId,
|
|
36517
|
-
mediaType: 'PCT',
|
|
36518
|
-
fileName: hash + '.jpg'
|
|
36519
|
-
};
|
|
36520
|
-
data.append('mediaItem', JSON.stringify(mediaItem));
|
|
36521
|
-
mediaItemRef = {
|
|
36522
|
-
functionType: 'P2D',
|
|
36523
|
-
planningHash: hash,
|
|
36524
|
-
catalogCodex: catalogCodex,
|
|
36525
|
-
catalogGuid: catalogGUID
|
|
36526
|
-
};
|
|
36527
|
-
data.append('mediaItemRef', JSON.stringify(mediaItemRef));
|
|
36528
|
-
_context2.next = 11;
|
|
36529
|
-
return fetch(url, {
|
|
36530
|
-
method: 'POST',
|
|
36531
|
-
body: data,
|
|
36532
|
-
headers: {
|
|
36533
|
-
'X-API-KEY': this.mediaServiceApiKey
|
|
36534
|
-
}
|
|
36535
|
-
});
|
|
36536
|
-
case 11:
|
|
36537
|
-
response = _context2.sent;
|
|
36538
|
-
if (!response.ok) {
|
|
36539
|
-
_context2.next = 20;
|
|
36540
|
-
break;
|
|
36541
|
-
}
|
|
36542
|
-
_context2.next = 15;
|
|
36543
|
-
return response.json();
|
|
36544
|
-
case 15:
|
|
36545
|
-
res = _context2.sent;
|
|
36546
|
-
LOG$4.debug('Successfully saved 2D Planning in media Service. URL: ' + res.url);
|
|
36547
|
-
return _context2.abrupt("return", res.url);
|
|
36548
|
-
case 20:
|
|
36549
|
-
LOG$4.error(new DivaUtils.DivaError('Error when saving the Planning2D image on mediaService. Hash: ' + hash + 'response: ' + response, {
|
|
36550
|
-
code: 'WC_0016'
|
|
36551
|
-
}));
|
|
36552
|
-
case 21:
|
|
36553
|
-
DivaUtils__default["default"].endSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
|
|
36554
|
-
return _context2.abrupt("return", '');
|
|
36555
|
-
case 23:
|
|
36556
|
-
case "end":
|
|
36557
|
-
return _context2.stop();
|
|
36558
|
-
}
|
|
36559
|
-
}, _callee2, this);
|
|
36560
|
-
}));
|
|
36561
|
-
function savePlanning2DPermanent(_x2, _x3, _x4, _x5) {
|
|
36562
|
-
return _savePlanning2DPermanent.apply(this, arguments);
|
|
35923
|
+
key: "getRightTopBackUIPos",
|
|
35924
|
+
value: function getRightTopBackUIPos(setId, elemId) {
|
|
35925
|
+
var bbox = null;
|
|
35926
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35927
|
+
bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
|
|
35928
|
+
} else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
|
|
35929
|
+
if (!bbox) return;
|
|
35930
|
+
for (var i = 0; i < bbox.length; i++) {
|
|
35931
|
+
if (bbox[i].C == 'RTB') {
|
|
35932
|
+
return bbox[i];
|
|
35933
|
+
}
|
|
36563
35934
|
}
|
|
36564
|
-
|
|
36565
|
-
|
|
35935
|
+
}
|
|
35936
|
+
//Left/Right_Bottom/Top_Back/Front
|
|
35937
|
+
}, {
|
|
35938
|
+
key: "getLeftTopBackUIPos",
|
|
35939
|
+
value: function getLeftTopBackUIPos(setId, elemId) {
|
|
35940
|
+
var bbox = null;
|
|
35941
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35942
|
+
bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
|
|
35943
|
+
} else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
|
|
35944
|
+
if (!bbox) return;
|
|
35945
|
+
for (var i = 0; i < bbox.length; i++) {
|
|
35946
|
+
if (bbox[i].C == 'LTB') {
|
|
35947
|
+
return bbox[i];
|
|
35948
|
+
}
|
|
35949
|
+
}
|
|
35950
|
+
}
|
|
35951
|
+
//Left/Right_Bottom/Top_Back/Front
|
|
35952
|
+
//elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
|
|
35953
|
+
}, {
|
|
35954
|
+
key: "getLeftBottomFrontUIPos",
|
|
35955
|
+
value: function getLeftBottomFrontUIPos(setId, elemId) {
|
|
35956
|
+
var bbox = null;
|
|
35957
|
+
if (this.uiInfo == '') return null;
|
|
35958
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35959
|
+
if (!this.uiInfo['S1']['E' + elemId]) return;
|
|
35960
|
+
bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
|
|
35961
|
+
} else if (this.uiInfo[setId]) {
|
|
35962
|
+
if (!this.uiInfo[setId]['E' + elemId]) return;
|
|
35963
|
+
bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];
|
|
35964
|
+
} else {
|
|
35965
|
+
var _this$uiInfo;
|
|
35966
|
+
bbox = (_this$uiInfo = this.uiInfo['E' + elemId]) === null || _this$uiInfo === void 0 ? void 0 : _this$uiInfo['BBOX3D'];
|
|
35967
|
+
}
|
|
35968
|
+
if (!bbox) return;
|
|
35969
|
+
for (var i = 0; i < bbox.length; i++) {
|
|
35970
|
+
if (bbox[i].C == 'LBF') {
|
|
35971
|
+
return bbox[i];
|
|
35972
|
+
}
|
|
35973
|
+
}
|
|
35974
|
+
}
|
|
35975
|
+
}, {
|
|
35976
|
+
key: "getBoxPlannerCornerUIPos",
|
|
35977
|
+
value: function getBoxPlannerCornerUIPos(setId, elemId, corner) {
|
|
35978
|
+
var boxPlan = [];
|
|
35979
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35980
|
+
boxPlan = this.uiInfo['S1']['E' + elemId]['BoxPlan'];
|
|
35981
|
+
} else if (this.uiInfo[setId]) boxPlan = this.uiInfo[setId]['E' + elemId]['BoxPlan'];else boxPlan = this.uiInfo['E' + elemId]['BoxPlan'];
|
|
35982
|
+
for (var i = 0; i < boxPlan.length; i++) {
|
|
35983
|
+
if (!boxPlan[i].N || !boxPlan[i].x || !boxPlan[i].y) continue;
|
|
35984
|
+
switch (corner) {
|
|
35985
|
+
case 'TOPCENTER':
|
|
35986
|
+
if (boxPlan[i].N == 'TC') {
|
|
35987
|
+
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
35988
|
+
}
|
|
35989
|
+
break;
|
|
35990
|
+
case 'LEFTCENTER':
|
|
35991
|
+
if (boxPlan[i].N == 'LC') {
|
|
35992
|
+
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
35993
|
+
}
|
|
35994
|
+
break;
|
|
35995
|
+
case 'RIGHTCENTER':
|
|
35996
|
+
if (boxPlan[i].N == 'RC') {
|
|
35997
|
+
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
35998
|
+
}
|
|
35999
|
+
break;
|
|
36000
|
+
case 'RIGHTTOPFRONT':
|
|
36001
|
+
if (boxPlan[i].N == 'RTF') {
|
|
36002
|
+
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
36003
|
+
}
|
|
36004
|
+
break;
|
|
36005
|
+
}
|
|
36006
|
+
}
|
|
36007
|
+
return undefined;
|
|
36008
|
+
}
|
|
36009
|
+
}, {
|
|
36010
|
+
key: "getUnityCamPos",
|
|
36011
|
+
value: function getUnityCamPos() {
|
|
36012
|
+
return new Vector3(parseFloat(this.uiInfo['CAM']['X']), parseFloat(this.uiInfo['CAM']['Y']), parseFloat(this.uiInfo['CAM']['Z']));
|
|
36013
|
+
}
|
|
36014
|
+
}, {
|
|
36015
|
+
key: "getUnityCamRot",
|
|
36016
|
+
value: function getUnityCamRot() {
|
|
36017
|
+
var quatVec = new Vector4(parseFloat(this.uiInfo['CAM']['QX']), parseFloat(this.uiInfo['CAM']['QY']), parseFloat(this.uiInfo['CAM']['QZ']), parseFloat(this.uiInfo['CAM']['QW']));
|
|
36018
|
+
return quatVec;
|
|
36019
|
+
}
|
|
36020
|
+
}, {
|
|
36021
|
+
key: "getUnityFOV",
|
|
36022
|
+
value: function getUnityFOV() {
|
|
36023
|
+
return parseFloat(this.uiInfo['CAM']['FOV']);
|
|
36024
|
+
}
|
|
36025
|
+
|
|
36026
|
+
//elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
|
|
36027
|
+
//It returns the distance of an element to the ground in cm
|
|
36028
|
+
}, {
|
|
36029
|
+
key: "getDistanceToGround",
|
|
36030
|
+
value: function getDistanceToGround(setId, elementId) {
|
|
36031
|
+
setId = this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined ? 'S1' : setId;
|
|
36032
|
+
if (this.uiInfo[setId] && this.uiInfo[setId]['E' + elementId] && this.uiInfo[setId]['E' + elementId]['DIM'] && this.uiInfo[setId]['E' + elementId]['DIM']['dfg']) {
|
|
36033
|
+
return this.uiInfo[setId]['E' + elementId]['DIM']['dfg'] * 100;
|
|
36034
|
+
}
|
|
36035
|
+
return -1;
|
|
36036
|
+
}
|
|
36037
|
+
}, {
|
|
36038
|
+
key: "addUIInfo",
|
|
36039
|
+
value: function addUIInfo(uiInfo) {
|
|
36040
|
+
try {
|
|
36041
|
+
this.uiInfo = JSON.parse(uiInfo);
|
|
36042
|
+
} catch (error) {
|
|
36043
|
+
LOG$5.error(new DivaUtils.DivaError('Error when parsing UI Info in rendering. Corrupt UIInfo: ' + uiInfo, {
|
|
36044
|
+
code: 'WC_0013',
|
|
36045
|
+
cause: error
|
|
36046
|
+
}));
|
|
36047
|
+
}
|
|
36048
|
+
}
|
|
36049
|
+
|
|
36050
|
+
/**
|
|
36051
|
+
* This function adds a blobImage to the rendering .
|
|
36052
|
+
* It is parsed to a base64 image.
|
|
36053
|
+
* @param blob The blob contains the image
|
|
36054
|
+
* @param isLayerMask True if the Image is the layer mask image
|
|
36055
|
+
*/
|
|
36056
|
+
}, {
|
|
36057
|
+
key: "addImgAsBlob",
|
|
36058
|
+
value: function addImgAsBlob(buffer, isLayerMask) {
|
|
36059
|
+
if (isLayerMask) this.layerMaskAsBase64 = buffer.toString('base64');else this.imgForSrc = 'data:image/jpeg;base64,' + buffer.toString('base64');
|
|
36060
|
+
}
|
|
36061
|
+
}, {
|
|
36062
|
+
key: "getImageForSrc",
|
|
36063
|
+
value: function getImageForSrc() {
|
|
36064
|
+
return this.imgForSrc;
|
|
36065
|
+
}
|
|
36066
|
+
|
|
36067
|
+
//*****************************************GETTER und SETTER********************************************** */
|
|
36068
|
+
}, {
|
|
36069
|
+
key: "CatalogCodex",
|
|
36070
|
+
get: function get() {
|
|
36071
|
+
return this.catalogData.catalogCodex;
|
|
36072
|
+
},
|
|
36073
|
+
set: function set(val) {
|
|
36074
|
+
this.catalogData.catalogCodex = val;
|
|
36075
|
+
}
|
|
36076
|
+
}, {
|
|
36077
|
+
key: "CatalogGUID",
|
|
36078
|
+
get: function get() {
|
|
36079
|
+
return this.catalogData.catalogGUID;
|
|
36080
|
+
},
|
|
36081
|
+
set: function set(val) {
|
|
36082
|
+
this.catalogData.catalogGUID = val;
|
|
36083
|
+
}
|
|
36084
|
+
}, {
|
|
36085
|
+
key: "PlanningHash",
|
|
36086
|
+
get: function get() {
|
|
36087
|
+
return this.planningHash;
|
|
36088
|
+
}
|
|
36089
|
+
}, {
|
|
36090
|
+
key: "RenderHash",
|
|
36091
|
+
get: function get() {
|
|
36092
|
+
return this.renderHash;
|
|
36093
|
+
}
|
|
36094
|
+
}, {
|
|
36095
|
+
key: "UrlToSavedRendering",
|
|
36096
|
+
get: function get() {
|
|
36097
|
+
return this.urlToSavedRendering;
|
|
36098
|
+
},
|
|
36099
|
+
set: function set(url) {
|
|
36100
|
+
this.urlToSavedRendering = url;
|
|
36101
|
+
}
|
|
36102
|
+
}, {
|
|
36103
|
+
key: "HasLayerMask",
|
|
36104
|
+
get: function get() {
|
|
36105
|
+
return this.hasLayerMask;
|
|
36106
|
+
},
|
|
36107
|
+
set: function set(hasLayerMask) {
|
|
36108
|
+
this.hasLayerMask = hasLayerMask;
|
|
36109
|
+
}
|
|
36110
|
+
}, {
|
|
36111
|
+
key: "RenderWidth",
|
|
36112
|
+
get: function get() {
|
|
36113
|
+
return this.renderWidth;
|
|
36114
|
+
}
|
|
36115
|
+
}, {
|
|
36116
|
+
key: "RenderHeight",
|
|
36117
|
+
get: function get() {
|
|
36118
|
+
return this.renderHeight;
|
|
36119
|
+
}
|
|
36120
|
+
}, {
|
|
36121
|
+
key: "getHasLayerMask",
|
|
36122
|
+
value: function getHasLayerMask() {
|
|
36123
|
+
return this.hasLayerMask;
|
|
36124
|
+
}
|
|
36125
|
+
}, {
|
|
36126
|
+
key: "getLayerMaskForSrc",
|
|
36127
|
+
value: function getLayerMaskForSrc() {
|
|
36128
|
+
return this.layerMaskAsBase64;
|
|
36129
|
+
}
|
|
36130
|
+
}, {
|
|
36131
|
+
key: "HasLayerMaskThreeTexture",
|
|
36132
|
+
get: function get() {
|
|
36133
|
+
return this.layerMaskThreeTexture != undefined;
|
|
36134
|
+
}
|
|
36135
|
+
}, {
|
|
36136
|
+
key: "LayerMaskThreeTexture",
|
|
36137
|
+
get: function get() {
|
|
36138
|
+
return this.layerMaskThreeTexture;
|
|
36139
|
+
},
|
|
36140
|
+
set: function set(tex) {
|
|
36141
|
+
this.layerMaskThreeTexture = tex;
|
|
36142
|
+
}
|
|
36143
|
+
}, {
|
|
36144
|
+
key: "AllImgLoaded",
|
|
36145
|
+
get: function get() {
|
|
36146
|
+
return this.imgForSrc != '' && (!this.hasLayerMask || this.layerMaskAsBase64 != '');
|
|
36147
|
+
}
|
|
36148
|
+
}, {
|
|
36149
|
+
key: "UiInfoLoaded",
|
|
36150
|
+
get: function get() {
|
|
36151
|
+
return this.uiInfo != '';
|
|
36152
|
+
}
|
|
36153
|
+
}, {
|
|
36154
|
+
key: "CreationTime",
|
|
36155
|
+
get: function get() {
|
|
36156
|
+
return this.creationTime.getTime();
|
|
36157
|
+
}
|
|
36158
|
+
}, {
|
|
36159
|
+
key: "MediaServiceSaveMode",
|
|
36160
|
+
get: function get() {
|
|
36161
|
+
return this.mediaServiceSaveMode;
|
|
36162
|
+
},
|
|
36163
|
+
set: function set(mode) {
|
|
36164
|
+
this.mediaServiceSaveMode = mode;
|
|
36165
|
+
}
|
|
36566
36166
|
}]);
|
|
36567
36167
|
}();
|
|
36568
|
-
var mediaServiceHandler = new DivaMediaServiceHandler();
|
|
36569
36168
|
|
|
36570
36169
|
var RenderSettings = /*#__PURE__*/function () {
|
|
36571
36170
|
function RenderSettings() {
|
|
@@ -36586,9 +36185,6 @@ var RenderSettings = /*#__PURE__*/function () {
|
|
|
36586
36185
|
_defineProperty__default["default"](this, "applicationName", void 0);
|
|
36587
36186
|
_defineProperty__default["default"](this, "divaMediaServiceUrl", void 0);
|
|
36588
36187
|
_defineProperty__default["default"](this, "renderGroup", void 0);
|
|
36589
|
-
_defineProperty__default["default"](this, "useSirvViewer", void 0);
|
|
36590
|
-
_defineProperty__default["default"](this, "useMediaServiceImageCache", void 0);
|
|
36591
|
-
_defineProperty__default["default"](this, "suppressCacheCreation", void 0);
|
|
36592
36188
|
this.organizationId = '';
|
|
36593
36189
|
this.diva3DServerURL = '';
|
|
36594
36190
|
this.userID = '';
|
|
@@ -36597,9 +36193,6 @@ var RenderSettings = /*#__PURE__*/function () {
|
|
|
36597
36193
|
this.applicationName = '';
|
|
36598
36194
|
this.divaMediaServiceUrl = '';
|
|
36599
36195
|
this.renderGroup = '';
|
|
36600
|
-
this.useSirvViewer = false;
|
|
36601
|
-
this.useMediaServiceImageCache = false;
|
|
36602
|
-
this.suppressCacheCreation = false;
|
|
36603
36196
|
}
|
|
36604
36197
|
return _createClass__default["default"](RenderSettings, [{
|
|
36605
36198
|
key: "OrganizationId",
|
|
@@ -36665,30 +36258,6 @@ var RenderSettings = /*#__PURE__*/function () {
|
|
|
36665
36258
|
set: function set(group) {
|
|
36666
36259
|
this.renderGroup = group;
|
|
36667
36260
|
}
|
|
36668
|
-
}, {
|
|
36669
|
-
key: "UseSirvViewer",
|
|
36670
|
-
get: function get() {
|
|
36671
|
-
return this.useSirvViewer;
|
|
36672
|
-
},
|
|
36673
|
-
set: function set(viewer) {
|
|
36674
|
-
this.useSirvViewer = viewer;
|
|
36675
|
-
}
|
|
36676
|
-
}, {
|
|
36677
|
-
key: "UseMediaServiceImageCache",
|
|
36678
|
-
get: function get() {
|
|
36679
|
-
return this.useMediaServiceImageCache;
|
|
36680
|
-
},
|
|
36681
|
-
set: function set(cache) {
|
|
36682
|
-
this.useMediaServiceImageCache = cache;
|
|
36683
|
-
}
|
|
36684
|
-
}, {
|
|
36685
|
-
key: "SuppressCacheCreation",
|
|
36686
|
-
get: function get() {
|
|
36687
|
-
return this.suppressCacheCreation;
|
|
36688
|
-
},
|
|
36689
|
-
set: function set(cache) {
|
|
36690
|
-
this.suppressCacheCreation = cache;
|
|
36691
|
-
}
|
|
36692
36261
|
}]);
|
|
36693
36262
|
}();
|
|
36694
36263
|
/*
|
|
@@ -36737,7 +36306,7 @@ function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
36737
36306
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
36738
36307
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
36739
36308
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
36740
|
-
var LOG$
|
|
36309
|
+
var LOG$4 = DivaUtils__default["default"].initLog('Planner', 'PLANNER-HANDLER-3D');
|
|
36741
36310
|
var PlannerHandler3D = /*#__PURE__*/function () {
|
|
36742
36311
|
//-------------------------------------------------Initialization---------------------------------------------------------------
|
|
36743
36312
|
|
|
@@ -36855,12 +36424,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36855
36424
|
};
|
|
36856
36425
|
}
|
|
36857
36426
|
return _createClass__default["default"](PlannerHandler3D, [{
|
|
36858
|
-
key: "doUseRealtimeRendering",
|
|
36859
|
-
value: function doUseRealtimeRendering() {
|
|
36860
|
-
if (this.renderSettings.SuppressCacheCreation && this.renderSettings.UseMediaServiceImageCache) return false;
|
|
36861
|
-
return true;
|
|
36862
|
-
}
|
|
36863
|
-
}, {
|
|
36864
36427
|
key: "setJwt",
|
|
36865
36428
|
value: function setJwt(jwt) {
|
|
36866
36429
|
this.jwt = jwt;
|
|
@@ -36980,9 +36543,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36980
36543
|
}
|
|
36981
36544
|
this.renderSettings.DivaMediaServiceUrl = params.divaMediaServiceUrl;
|
|
36982
36545
|
this.renderSettings.OrganizationId = params.organizationId;
|
|
36983
|
-
this.renderSettings.UseSirvViewer = params.useSirvViewer;
|
|
36984
|
-
this.renderSettings.UseMediaServiceImageCache = params.useMediaServiceImageCache;
|
|
36985
|
-
this.renderSettings.SuppressCacheCreation = params.suppressCacheCreation;
|
|
36986
36546
|
this.liveArViewerUrl = params.arViewerUrl;
|
|
36987
36547
|
return result;
|
|
36988
36548
|
}
|
|
@@ -36995,21 +36555,16 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36995
36555
|
return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context3) {
|
|
36996
36556
|
while (1) switch (_context3.prev = _context3.next) {
|
|
36997
36557
|
case 0:
|
|
36998
|
-
|
|
36999
|
-
|
|
37000
|
-
|
|
37001
|
-
}
|
|
37002
|
-
_context3.next = 3;
|
|
37003
|
-
return Promise.resolve().then(function () { return require('./Host3DSignalR-f13134cb.js'); });
|
|
37004
|
-
case 3:
|
|
36558
|
+
_context3.next = 2;
|
|
36559
|
+
return Promise.resolve().then(function () { return require('./Host3DSignalR-59436bad.js'); });
|
|
36560
|
+
case 2:
|
|
37005
36561
|
_yield$import = _context3.sent;
|
|
37006
36562
|
Host3DSignalR = _yield$import["default"];
|
|
37007
36563
|
this.connectionHandler = new Host3DSignalR(this.renderSettings, this);
|
|
37008
|
-
LOG$
|
|
37009
|
-
|
|
37010
|
-
_context3.next = 9;
|
|
36564
|
+
LOG$4.debug('initializeConnection to Host3DSignalR');
|
|
36565
|
+
_context3.next = 8;
|
|
37011
36566
|
return (_this$connectionHandl2 = this.connectionHandler) === null || _this$connectionHandl2 === void 0 ? void 0 : _this$connectionHandl2.initializeConnection();
|
|
37012
|
-
case
|
|
36567
|
+
case 8:
|
|
37013
36568
|
case "end":
|
|
37014
36569
|
return _context3.stop();
|
|
37015
36570
|
}
|
|
@@ -37072,7 +36627,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37072
36627
|
value: function onConnectedToDivaNr(status) {
|
|
37073
36628
|
//Check if request3D has to be called againe
|
|
37074
36629
|
if (status != 'SUCCESSFULL' || !this.todoAfterLogin.request3D.doRequest3D) return;
|
|
37075
|
-
LOG$
|
|
36630
|
+
LOG$4.debug('Return Login - joind successfully but during loggin, a render or hqRenderScript Request was made. Remake it now');
|
|
37076
36631
|
this.todoAfterLogin.request3D.doRequest3D = false;
|
|
37077
36632
|
this.request3D(this.todoAfterLogin.request3D.params);
|
|
37078
36633
|
this.todoAfterLogin.request3D.params = undefined;
|
|
@@ -37126,36 +36681,36 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37126
36681
|
* @param buffer
|
|
37127
36682
|
*/
|
|
37128
36683
|
function handleReceiveRendering(params) {
|
|
37129
|
-
LOG$
|
|
36684
|
+
LOG$4.debug('handleReceiveRendering ' + params.hash + '; SameMode: ' + params.saveMode);
|
|
37130
36685
|
var isLayerMask = params.hash.endsWith('_m') ? true : false;
|
|
37131
36686
|
params.hash = isLayerMask ? params.hash.substring(0, params.hash.length - 2) : params.hash;
|
|
37132
36687
|
var cachedRendering = this.getRenderingFromCache(params.hash);
|
|
37133
36688
|
var waitedRendering = this.getWaitForRendering(params.hash);
|
|
37134
36689
|
if (!cachedRendering && !waitedRendering) {
|
|
37135
|
-
LOG$
|
|
36690
|
+
LOG$4.error(new DivaUtils.DivaError('Error when handling receive Rendering. Not waiting for new Rendering but also not in cache ' + params.hash + '; saveMode: ' + params.saveMode));
|
|
37136
36691
|
return;
|
|
37137
36692
|
}
|
|
37138
36693
|
if (waitedRendering) {
|
|
37139
|
-
LOG$
|
|
36694
|
+
LOG$4.debug('handleReceiveRendering ' + params.hash + '; Found in waitForRenderings');
|
|
37140
36695
|
//If the last requested rendering was in another saving mode than the received rendering - do nothing and wait for the correct rendering
|
|
37141
36696
|
if ((waitedRendering === null || waitedRendering === void 0 ? void 0 : waitedRendering.MediaServiceSaveMode) == 'PERMANENT' && params.saveMode != '1' || (waitedRendering === null || waitedRendering === void 0 ? void 0 : waitedRendering.MediaServiceSaveMode) == 'STREAM' && params.saveMode != '0') {
|
|
37142
|
-
LOG$
|
|
36697
|
+
LOG$4.debug('Rendering with wrong savemode arrived. Wait for correct rendering');
|
|
37143
36698
|
return;
|
|
37144
36699
|
}
|
|
37145
36700
|
if (params.url && waitedRendering.MediaServiceSaveMode == 'PERMANENT') {
|
|
37146
36701
|
waitedRendering.UrlToSavedRendering = params.url;
|
|
37147
|
-
LOG$
|
|
36702
|
+
LOG$4.debug('handleReceiveRendering Set lastSavedRendering URL ' + params.url);
|
|
37148
36703
|
}
|
|
37149
|
-
|
|
36704
|
+
waitedRendering.addImgAsBlob(Buffer.from(params.buffer), isLayerMask);
|
|
37150
36705
|
|
|
37151
36706
|
//Do not display the rendering if it was saved in real Time mode withough cache - it was only saved when entering the Zusammenfassung for saving it later in the Basket
|
|
37152
36707
|
|
|
37153
|
-
if (
|
|
36708
|
+
if (waitedRendering.MediaServiceSaveMode == 'STREAM' && this.checkRenderingReady(params.hash, waitedRendering)) this.updatePlannerRendering(waitedRendering);
|
|
37154
36709
|
return;
|
|
37155
36710
|
}
|
|
37156
36711
|
if (params.url) {
|
|
37157
36712
|
//If several renderings of the same hash are requested contemoranely (first Stream then TEMP). Then save the tempURL in the rendering
|
|
37158
|
-
LOG$
|
|
36713
|
+
LOG$4.debug('handleReceiveRendering load from cache');
|
|
37159
36714
|
cachedRendering.UrlToSavedRendering = params.url;
|
|
37160
36715
|
}
|
|
37161
36716
|
}
|
|
@@ -37186,10 +36741,10 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37186
36741
|
}, {
|
|
37187
36742
|
key: "checkRenderingReady",
|
|
37188
36743
|
value: function checkRenderingReady(hash, rendering) {
|
|
37189
|
-
if (!rendering.AllImgLoaded || !rendering.UiInfoLoaded
|
|
36744
|
+
if (!rendering.AllImgLoaded || !rendering.UiInfoLoaded) return false;
|
|
37190
36745
|
this.waitForRenderings["delete"](hash);
|
|
37191
36746
|
this.renderCache.set(hash, rendering);
|
|
37192
|
-
LOG$
|
|
36747
|
+
LOG$4.debug('Send to view. CurrentHash: ' + hash + '; lastRequestedHash: ' + this.lastRequestedRenderHash);
|
|
37193
36748
|
return true;
|
|
37194
36749
|
}
|
|
37195
36750
|
/**
|
|
@@ -37204,7 +36759,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37204
36759
|
this.waitForRenderings["delete"](hash);
|
|
37205
36760
|
return false;
|
|
37206
36761
|
}
|
|
37207
|
-
LOG$
|
|
36762
|
+
LOG$4.debug('Wait for rendering - The same rendering was asked not 4 seconds ago. !', 'PlannerHandler3D checkWaitForImage');
|
|
37208
36763
|
return true;
|
|
37209
36764
|
}
|
|
37210
36765
|
}, {
|
|
@@ -37216,7 +36771,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37216
36771
|
this.waitForHQRenderScript["delete"](hash);
|
|
37217
36772
|
return false;
|
|
37218
36773
|
}
|
|
37219
|
-
LOG$
|
|
36774
|
+
LOG$4.debug('Wait for rendering - The same rendering was asked not 4 seconds ago. !', 'PlannerHandler3D checkWaitForImage');
|
|
37220
36775
|
return true;
|
|
37221
36776
|
}
|
|
37222
36777
|
|
|
@@ -37238,10 +36793,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37238
36793
|
result.renderHeight = curRoomListVP.backgroundImg_Height;
|
|
37239
36794
|
result.renderHeight = result.renderHeight * 1.3;
|
|
37240
36795
|
result.renderWidth = result.renderWidth * 1.3;
|
|
37241
|
-
} else if (this.renderSettings.UseMediaServiceImageCache) {
|
|
37242
|
-
//Force the size of the rendering to be a standard size
|
|
37243
|
-
result.renderWidth = this.renderSettings.CACHE_16_9_RENDER_WIDTH;
|
|
37244
|
-
result.renderHeight = this.renderSettings.CACHE_16_9_RENDER_HEIGHT;
|
|
37245
36796
|
} else if (mediaServiceSaveMode == 'PERMANENT') {
|
|
37246
36797
|
//SAVE with correct Resolution
|
|
37247
36798
|
result.renderWidth = this.renderSettings.SAVE_16_9_RENDER_WIDTH;
|
|
@@ -37285,7 +36836,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37285
36836
|
return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context5) {
|
|
37286
36837
|
while (1) switch (_context5.prev = _context5.next) {
|
|
37287
36838
|
case 0:
|
|
37288
|
-
LOG$
|
|
36839
|
+
LOG$4.debug('getLastSavedRendering ' + ((_this$lastSavedRender = this.lastSavedRendering) === null || _this$lastSavedRender === void 0 ? void 0 : _this$lastSavedRender.UrlToSavedRendering));
|
|
37289
36840
|
if (!(this.lastSavedRendering == undefined)) {
|
|
37290
36841
|
_context5.next = 3;
|
|
37291
36842
|
break;
|
|
@@ -37300,7 +36851,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37300
36851
|
_context5.next = 12;
|
|
37301
36852
|
break;
|
|
37302
36853
|
}
|
|
37303
|
-
LOG$
|
|
36854
|
+
LOG$4.debug('getLAstSavedRendering - wait here');
|
|
37304
36855
|
_context5.next = 8;
|
|
37305
36856
|
return this.delay(100);
|
|
37306
36857
|
case 8:
|
|
@@ -37454,20 +37005,20 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37454
37005
|
value: (function () {
|
|
37455
37006
|
var _request3D = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(params) {
|
|
37456
37007
|
var _params$renderRequest, _params$renderRequest2, _params$renderRequest3, _params$renderRequest4, _params$renderRequest5, _params$renderRequest6, _this$viewPointHandle;
|
|
37457
|
-
var room, newRenderSize, doReloadWholePlanning, planningHash, requestRenderingFrom3DHost, requestHqRenderScriptFrom3DHost, rendering, renderHash, viewPointName, functionType, _params$camera, sizeInfo,
|
|
37008
|
+
var room, newRenderSize, doReloadWholePlanning, planningHash, requestRenderingFrom3DHost, requestHqRenderScriptFrom3DHost, rendering, renderHash, viewPointName, functionType, _params$camera, sizeInfo, _rendering, fullscreenRendering, renderingInCacheFound, _this$connectionHandl6, _plannerMeasureDigits, _params$camera2, _params$camera3, returnRequest;
|
|
37458
37009
|
return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context7) {
|
|
37459
37010
|
while (1) switch (_context7.prev = _context7.next) {
|
|
37460
37011
|
case 0:
|
|
37461
|
-
if (!(this.
|
|
37012
|
+
if (!(this.connectionHandler && (!this.connectionHandler.getConnectionReady() || !this.connectionHandler.getSuccessfullyJoinedToDivaNr()))) {
|
|
37462
37013
|
_context7.next = 5;
|
|
37463
37014
|
break;
|
|
37464
37015
|
}
|
|
37465
|
-
LOG$
|
|
37016
|
+
LOG$4.debug('RequestRendering - but connection Not Ready');
|
|
37466
37017
|
this.todoAfterLogin.request3D.params = params;
|
|
37467
37018
|
this.todoAfterLogin.request3D.doRequest3D = true;
|
|
37468
37019
|
return _context7.abrupt("return");
|
|
37469
37020
|
case 5:
|
|
37470
|
-
LOG$
|
|
37021
|
+
LOG$4.debug('Request New 3D rendering: ' + (params === null || params === void 0 ? void 0 : params.doRequestRendering) + ', hqRenderScript: ' + (params === null || params === void 0 ? void 0 : params.doRequestHqRenderScript), 'PlannerHandler3D');
|
|
37471
37022
|
room = this.viewPointHandler.getCurRoomCodex();
|
|
37472
37023
|
newRenderSize = this.setRoomInfoInPlanningData(params.planningData, (_params$renderRequest = (_params$renderRequest2 = params.renderRequestInfos) === null || _params$renderRequest2 === void 0 ? void 0 : _params$renderRequest2.width) !== null && _params$renderRequest !== void 0 ? _params$renderRequest : 500, (_params$renderRequest3 = (_params$renderRequest4 = params.renderRequestInfos) === null || _params$renderRequest4 === void 0 ? void 0 : _params$renderRequest4.height) !== null && _params$renderRequest3 !== void 0 ? _params$renderRequest3 : 500, (_params$renderRequest5 = (_params$renderRequest6 = params.renderRequestInfos) === null || _params$renderRequest6 === void 0 ? void 0 : _params$renderRequest6.mediaServiceSaveMode) !== null && _params$renderRequest5 !== void 0 ? _params$renderRequest5 : undefined);
|
|
37473
37024
|
doReloadWholePlanning = true;
|
|
@@ -37486,103 +37037,63 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37486
37037
|
this.lastFramePlanningHash = planningHash;
|
|
37487
37038
|
requestRenderingFrom3DHost = false;
|
|
37488
37039
|
requestHqRenderScriptFrom3DHost = false;
|
|
37489
|
-
if (
|
|
37490
|
-
|
|
37491
|
-
|
|
37492
|
-
|
|
37493
|
-
|
|
37494
|
-
|
|
37495
|
-
|
|
37496
|
-
|
|
37497
|
-
|
|
37498
|
-
|
|
37499
|
-
|
|
37500
|
-
|
|
37501
|
-
|
|
37502
|
-
|
|
37503
|
-
|
|
37504
|
-
this.updatePlannerHqRenderScriptInView(rendering);
|
|
37505
|
-
this.sendARRenderScript(rendering);
|
|
37506
|
-
params.doRequestHqRenderScript = false;
|
|
37507
|
-
} else {
|
|
37508
|
-
if (!this.checkWaitForHQRenderScript(planningHash)) {
|
|
37509
|
-
requestHqRenderScriptFrom3DHost = true;
|
|
37510
|
-
this.waitForHQRenderScript.set(planningHash, new HQRenderScript('PLACEHOLDER'));
|
|
37511
|
-
//If a new HQRenderscript has to be loaded - always reload planning
|
|
37512
|
-
doReloadWholePlanning = true;
|
|
37040
|
+
if (params.doRequestHqRenderScript) {
|
|
37041
|
+
rendering = this.hqRenderScriptCache.get(planningHash);
|
|
37042
|
+
if (rendering) {
|
|
37043
|
+
LOG$4.debug('Get HQRenderScript from cache');
|
|
37044
|
+
this.lastSavedHQRenderScript = JSON.parse(rendering.HQRenderScript);
|
|
37045
|
+
this.updatePlannerHqRenderScriptInView(rendering);
|
|
37046
|
+
this.sendARRenderScript(rendering);
|
|
37047
|
+
params.doRequestHqRenderScript = false;
|
|
37048
|
+
} else {
|
|
37049
|
+
if (!this.checkWaitForHQRenderScript(planningHash)) {
|
|
37050
|
+
requestHqRenderScriptFrom3DHost = true;
|
|
37051
|
+
this.waitForHQRenderScript.set(planningHash, new HQRenderScript('PLACEHOLDER'));
|
|
37052
|
+
//If a new HQRenderscript has to be loaded - always reload planning
|
|
37053
|
+
doReloadWholePlanning = true;
|
|
37054
|
+
}
|
|
37513
37055
|
}
|
|
37514
37056
|
}
|
|
37515
|
-
case 23:
|
|
37516
37057
|
renderHash = '';
|
|
37517
37058
|
viewPointName = '';
|
|
37518
37059
|
functionType = 'P3D';
|
|
37519
|
-
if (
|
|
37520
|
-
|
|
37521
|
-
|
|
37522
|
-
|
|
37523
|
-
|
|
37524
|
-
|
|
37525
|
-
|
|
37526
|
-
|
|
37527
|
-
|
|
37528
|
-
|
|
37529
|
-
|
|
37530
|
-
|
|
37531
|
-
|
|
37532
|
-
|
|
37533
|
-
|
|
37534
|
-
|
|
37535
|
-
|
|
37536
|
-
|
|
37537
|
-
|
|
37538
|
-
|
|
37539
|
-
|
|
37540
|
-
|
|
37541
|
-
|
|
37542
|
-
|
|
37543
|
-
|
|
37544
|
-
}
|
|
37545
|
-
//If planning is laoded from cache - reset lastFramePlanningHash. It can happen that something changed in the planning (Delete element) and the Rendering with 1 element is loaded from cahche - the exe has still 2 elements.
|
|
37546
|
-
//When the client then rotates - nothing changes in the hash - but the exe loads 2 elements.
|
|
37547
|
-
LOG$3.debug('Load Rendering from Cache with hash ' + renderHash, 'PlannerHandler3D');
|
|
37548
|
-
this.lastFramePlanningHash = '';
|
|
37549
|
-
_rendering = this.getRenderingFromCache(renderHash); //check if current rendering is fullscreenrendering
|
|
37550
|
-
if ((!params.renderRequestInfos.planner3DGridEnabled || _rendering !== null && _rendering !== void 0 && _rendering.getHasLayerMask()) && !this.onlyRunLogic) {
|
|
37551
|
-
if (params.renderRequestInfos.isFullscreenRendering != (_rendering === null || _rendering === void 0 ? void 0 : _rendering.getIsFullscreenRendering())) {
|
|
37552
|
-
fullscreenRendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'PERMANENT', undefined);
|
|
37553
|
-
fullscreenRendering.clone(_rendering);
|
|
37554
|
-
fullscreenRendering.setIsFullscreenRendering(params.renderRequestInfos.isFullscreenRendering);
|
|
37555
|
-
this.updatePlannerRendering(fullscreenRendering); //load the rendering as fullscreen image
|
|
37556
|
-
params.doRequestRendering = false;
|
|
37060
|
+
if (params.doRequestRendering) {
|
|
37061
|
+
viewPointName = this.viewPointHandler.getCurViewPointToRender();
|
|
37062
|
+
sizeInfo = params.renderRequestInfos.width + ':' + params.renderRequestInfos.height;
|
|
37063
|
+
renderHash = DivaUtils.md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify((_params$camera = params.camera) !== null && _params$camera !== void 0 ? _params$camera : this.latestCamera));
|
|
37064
|
+
this.lastRequestedRenderHash = renderHash;
|
|
37065
|
+
LOG$4.debug('Request New Rendering with hash ' + renderHash + '; and planningHash: ' + planningHash, 'PlannerHandler3D');
|
|
37066
|
+
if (this.checkIsRenderingCached(renderHash, params.renderRequestInfos.planner3DGridEnabled, params.renderRequestInfos.mediaServiceSaveMode)) {
|
|
37067
|
+
//If planning is laoded from cache - reset lastFramePlanningHash. It can happen that something changed in the planning (Delete element) and the Rendering with 1 element is loaded from cahche - the exe has still 2 elements.
|
|
37068
|
+
//When the client then rotates - nothing changes in the hash - but the exe loads 2 elements.
|
|
37069
|
+
LOG$4.debug('Load Rendering from Cache with hash ' + renderHash, 'PlannerHandler3D');
|
|
37070
|
+
this.lastFramePlanningHash = '';
|
|
37071
|
+
_rendering = this.getRenderingFromCache(renderHash); //check if current rendering is fullscreenrendering
|
|
37072
|
+
if ((!params.renderRequestInfos.planner3DGridEnabled || _rendering !== null && _rendering !== void 0 && _rendering.getHasLayerMask()) && !this.onlyRunLogic) {
|
|
37073
|
+
if (params.renderRequestInfos.isFullscreenRendering != (_rendering === null || _rendering === void 0 ? void 0 : _rendering.getIsFullscreenRendering())) {
|
|
37074
|
+
fullscreenRendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'PERMANENT', undefined);
|
|
37075
|
+
fullscreenRendering.clone(_rendering);
|
|
37076
|
+
fullscreenRendering.setIsFullscreenRendering(params.renderRequestInfos.isFullscreenRendering);
|
|
37077
|
+
this.updatePlannerRendering(fullscreenRendering); //load the rendering as fullscreen image
|
|
37078
|
+
params.doRequestRendering = false;
|
|
37079
|
+
} else {
|
|
37080
|
+
this.updatePlannerRendering(_rendering); //lade einfach
|
|
37081
|
+
params.doRequestRendering = false;
|
|
37082
|
+
LOG$4.debug('Do load rendering from cache with renderHash: ' + renderHash);
|
|
37083
|
+
}
|
|
37084
|
+
}
|
|
37557
37085
|
} else {
|
|
37558
|
-
|
|
37559
|
-
|
|
37560
|
-
|
|
37561
|
-
|
|
37562
|
-
|
|
37563
|
-
|
|
37564
|
-
|
|
37565
|
-
case 47:
|
|
37566
|
-
renderingInCacheFound = false;
|
|
37567
|
-
if (!(this.renderSettings.UseMediaServiceImageCache && this.viewPointHandler.getCurVPIsStart())) {
|
|
37568
|
-
_context7.next = 53;
|
|
37569
|
-
break;
|
|
37570
|
-
}
|
|
37571
|
-
_productHash = this.getProductHash(params.planningData);
|
|
37572
|
-
_context7.next = 52;
|
|
37573
|
-
return this.requestRenderingCache(planningHash, renderHash, _productHash, viewPointName, params.renderRequestInfos.width, params.renderRequestInfos.height, params.renderRequestInfos.isFullscreenRendering, params.renderRequestInfos.doShow3DDimensionLines, (_plannerMeasureDigits2 = params.renderRequestInfos.plannerMeasureDigits) !== null && _plannerMeasureDigits2 !== void 0 ? _plannerMeasureDigits2 : 0, params.catalogData);
|
|
37574
|
-
case 52:
|
|
37575
|
-
renderingInCacheFound = _context7.sent;
|
|
37576
|
-
case 53:
|
|
37577
|
-
if (!this.renderSettings.UseMediaServiceImageCache || !renderingInCacheFound) {
|
|
37578
|
-
if (!this.checkWaitForImage(renderHash)) {
|
|
37579
|
-
requestRenderingFrom3DHost = true;
|
|
37580
|
-
this.waitForRenderings.set(renderHash, new Rendering('PLACEHOLDER', 'PLACEHOLDER', '', 0, 0, false, false, 0, false, false, 'STREAM'));
|
|
37086
|
+
renderingInCacheFound = false;
|
|
37087
|
+
if (!renderingInCacheFound) {
|
|
37088
|
+
if (!this.checkWaitForImage(renderHash)) {
|
|
37089
|
+
requestRenderingFrom3DHost = true;
|
|
37090
|
+
this.waitForRenderings.set(renderHash, new Rendering('PLACEHOLDER', 'PLACEHOLDER', '', 0, 0, false, false, 0, false, false, 'STREAM'));
|
|
37091
|
+
}
|
|
37092
|
+
}
|
|
37581
37093
|
}
|
|
37582
37094
|
}
|
|
37583
|
-
case 54:
|
|
37584
37095
|
if (!(requestHqRenderScriptFrom3DHost || requestRenderingFrom3DHost)) {
|
|
37585
|
-
_context7.next =
|
|
37096
|
+
_context7.next = 31;
|
|
37586
37097
|
break;
|
|
37587
37098
|
}
|
|
37588
37099
|
if (params.catalogData.lang) params.planningData.SCE.Lang = params.catalogData.lang;
|
|
@@ -37600,7 +37111,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37600
37111
|
height: params.renderRequestInfos.height,
|
|
37601
37112
|
isFullscreenRendering: params.renderRequestInfos.isFullscreenRendering,
|
|
37602
37113
|
hasDimensionLines: params.renderRequestInfos.doShow3DDimensionLines,
|
|
37603
|
-
plannerMeasureDigits: (
|
|
37114
|
+
plannerMeasureDigits: (_plannerMeasureDigits = params.renderRequestInfos.plannerMeasureDigits) !== null && _plannerMeasureDigits !== void 0 ? _plannerMeasureDigits : 0,
|
|
37604
37115
|
planner3DGridEnabled: params.renderRequestInfos.planner3DGridEnabled,
|
|
37605
37116
|
mediaServiceSaveMode: params.renderRequestInfos.mediaServiceSaveMode,
|
|
37606
37117
|
functionType: functionType,
|
|
@@ -37615,14 +37126,14 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37615
37126
|
});
|
|
37616
37127
|
if (params.camera) this.latestCamera = params.camera;
|
|
37617
37128
|
if (!(returnRequest === undefined || requestHqRenderScriptFrom3DHost && returnRequest.hqRenderScript == undefined || requestRenderingFrom3DHost && returnRequest.rendering == undefined)) {
|
|
37618
|
-
_context7.next =
|
|
37129
|
+
_context7.next = 29;
|
|
37619
37130
|
break;
|
|
37620
37131
|
}
|
|
37621
|
-
LOG$
|
|
37132
|
+
LOG$4.error(new DivaUtils.DivaError('Error requesting the 3D from host. RequestHqRenderScript: ' + requestHqRenderScriptFrom3DHost + '; RequestRendering: ' + requestRenderingFrom3DHost, {
|
|
37622
37133
|
code: 'WC_0013'
|
|
37623
37134
|
}));
|
|
37624
37135
|
return _context7.abrupt("return");
|
|
37625
|
-
case
|
|
37136
|
+
case 29:
|
|
37626
37137
|
if (requestHqRenderScriptFrom3DHost) {
|
|
37627
37138
|
if (this.waitForHQRenderScript.has(planningHash)) this.waitForHQRenderScript["delete"](planningHash);
|
|
37628
37139
|
this.waitForHQRenderScript.set(planningHash, returnRequest.hqRenderScript);
|
|
@@ -37634,7 +37145,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37634
37145
|
if (returnRequest.rendering.getIsAlternateRendering()) this.addAlternateRenderingToSavedAlternateRenderings(returnRequest.rendering);else this.lastSavedRendering = returnRequest.rendering;
|
|
37635
37146
|
}
|
|
37636
37147
|
}
|
|
37637
|
-
case
|
|
37148
|
+
case 31:
|
|
37638
37149
|
case "end":
|
|
37639
37150
|
return _context7.stop();
|
|
37640
37151
|
}
|
|
@@ -37687,70 +37198,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37687
37198
|
});
|
|
37688
37199
|
if (index === -1) this.lastSavedAlternateRenderings.push(rendering);else this.lastSavedAlternateRenderings[index] = rendering;
|
|
37689
37200
|
}
|
|
37690
|
-
|
|
37691
|
-
/**
|
|
37692
|
-
* This function handles to load a rendering from the cache
|
|
37693
|
-
* @param hash
|
|
37694
|
-
* @param viewPointName
|
|
37695
|
-
* @param width
|
|
37696
|
-
* @param height
|
|
37697
|
-
* @param isFullscreenRendering
|
|
37698
|
-
*
|
|
37699
|
-
* @returns true, if the rendering was found in the cache
|
|
37700
|
-
*/
|
|
37701
|
-
}, {
|
|
37702
|
-
key: "requestRenderingCache",
|
|
37703
|
-
value: (function () {
|
|
37704
|
-
var _requestRenderingCache = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(planningHash, renderHash, productHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, catalogData, alternateRenderingsExist, alternateRendererInfo) {
|
|
37705
|
-
var renderingInCacheFound, rendering, promises, _yield$Promise$all, _yield$Promise$all2, urlRenderingCache, urlARCache, doUpdateRendering;
|
|
37706
|
-
return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
|
|
37707
|
-
while (1) switch (_context8.prev = _context8.next) {
|
|
37708
|
-
case 0:
|
|
37709
|
-
renderingInCacheFound = false;
|
|
37710
|
-
if (this.waitForRenderings.has(renderHash)) {
|
|
37711
|
-
_context8.next = 12;
|
|
37712
|
-
break;
|
|
37713
|
-
}
|
|
37714
|
-
rendering = new Rendering(planningHash, renderHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, false, false, 'PERMANENT', alternateRenderingsExist, alternateRendererInfo);
|
|
37715
|
-
this.waitForRenderings.set(renderHash, rendering);
|
|
37716
|
-
//Try load image from cache
|
|
37717
|
-
promises = [mediaServiceHandler.loadRenderingFromCache(renderHash), mediaServiceHandler.loadRenderingFromCache(productHash, false)];
|
|
37718
|
-
_context8.next = 7;
|
|
37719
|
-
return Promise.all(promises);
|
|
37720
|
-
case 7:
|
|
37721
|
-
_yield$Promise$all = _context8.sent;
|
|
37722
|
-
_yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 2);
|
|
37723
|
-
urlRenderingCache = _yield$Promise$all2[0];
|
|
37724
|
-
urlARCache = _yield$Promise$all2[1];
|
|
37725
|
-
if (urlRenderingCache || urlARCache) {
|
|
37726
|
-
renderingInCacheFound = true;
|
|
37727
|
-
if (urlRenderingCache) {
|
|
37728
|
-
rendering.setHQRenderingUrl(urlRenderingCache, this.renderSettings.UseSirvViewer);
|
|
37729
|
-
rendering.UrlToSavedRendering = rendering.getHQRenderingURL();
|
|
37730
|
-
}
|
|
37731
|
-
if (urlARCache) rendering.setArUrl(urlARCache);
|
|
37732
|
-
rendering.IsLoadedFromCache = true;
|
|
37733
|
-
rendering.CatalogCodex = catalogData.catalogCodex;
|
|
37734
|
-
rendering.CatalogGUID = catalogData.catalogGUID;
|
|
37735
|
-
LOG$3.debug('The rendering is loaded from the MediaServiceCache: ' + urlRenderingCache);
|
|
37736
|
-
doUpdateRendering = this.checkRenderingReady(renderHash, rendering);
|
|
37737
|
-
if (doUpdateRendering) this.updatePlannerRendering(rendering);
|
|
37738
|
-
} else {
|
|
37739
|
-
this.waitForRenderings["delete"](renderHash);
|
|
37740
|
-
}
|
|
37741
|
-
case 12:
|
|
37742
|
-
return _context8.abrupt("return", renderingInCacheFound);
|
|
37743
|
-
case 13:
|
|
37744
|
-
case "end":
|
|
37745
|
-
return _context8.stop();
|
|
37746
|
-
}
|
|
37747
|
-
}, _callee8, this);
|
|
37748
|
-
}));
|
|
37749
|
-
function requestRenderingCache(_x6, _x7, _x8, _x9, _x10, _x11, _x12, _x13, _x14, _x15, _x16, _x17) {
|
|
37750
|
-
return _requestRenderingCache.apply(this, arguments);
|
|
37751
|
-
}
|
|
37752
|
-
return requestRenderingCache;
|
|
37753
|
-
}())
|
|
37754
37201
|
}, {
|
|
37755
37202
|
key: "handleStaticVP",
|
|
37756
37203
|
value: function handleStaticVP(vpCodex) {
|
|
@@ -37854,20 +37301,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37854
37301
|
value: function getStaticRoomListItems() {
|
|
37855
37302
|
return this.viewPointHandler.getStaticRoomList();
|
|
37856
37303
|
}
|
|
37857
|
-
|
|
37858
|
-
/**
|
|
37859
|
-
* Clears the whole renderCache and sets the current rendering and the lastSavedRendering to undefined
|
|
37860
|
-
*/
|
|
37861
|
-
}, {
|
|
37862
|
-
key: "clearRenderCache",
|
|
37863
|
-
value: function clearRenderCache() {
|
|
37864
|
-
LOG$3.debug('PlannerHandler3D clearRenderCache');
|
|
37865
|
-
this.renderCache.clear();
|
|
37866
|
-
this.currRendering = undefined;
|
|
37867
|
-
this.lastSavedRendering = undefined;
|
|
37868
|
-
this.lastSavedAlternateRenderings = undefined;
|
|
37869
|
-
this.hqRenderScriptCache.clear();
|
|
37870
|
-
}
|
|
37871
37304
|
}, {
|
|
37872
37305
|
key: "clearCurrentRendering",
|
|
37873
37306
|
value: function clearCurrentRendering() {
|
|
@@ -37896,11 +37329,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37896
37329
|
value: function checkIsWaitingForHQRenderScript() {
|
|
37897
37330
|
return this.waitForHQRenderScript.size > 0;
|
|
37898
37331
|
}
|
|
37899
|
-
}, {
|
|
37900
|
-
key: "getUseMediaServiceImageCache",
|
|
37901
|
-
value: function getUseMediaServiceImageCache() {
|
|
37902
|
-
return this.renderSettings.UseMediaServiceImageCache;
|
|
37903
|
-
}
|
|
37904
37332
|
}, {
|
|
37905
37333
|
key: "setOrigConfigurationCallback",
|
|
37906
37334
|
value: function setOrigConfigurationCallback(callback) {
|
|
@@ -37914,19 +37342,19 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37914
37342
|
}, {
|
|
37915
37343
|
key: "openARObserverConnection",
|
|
37916
37344
|
value: function () {
|
|
37917
|
-
var _openARObserverConnection = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
37345
|
+
var _openARObserverConnection = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9(handleNoHqrs) {
|
|
37918
37346
|
var _this2 = this;
|
|
37919
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
37920
|
-
while (1) switch (
|
|
37347
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context9) {
|
|
37348
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
37921
37349
|
case 0:
|
|
37922
|
-
return
|
|
37923
|
-
var _ref = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
37350
|
+
return _context9.abrupt("return", new Promise( /*#__PURE__*/function () {
|
|
37351
|
+
var _ref = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(resolve, reject) {
|
|
37924
37352
|
var socketUrl;
|
|
37925
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
37926
|
-
while (1) switch (
|
|
37353
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
|
|
37354
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
37927
37355
|
case 0:
|
|
37928
37356
|
if (_this2.liveArViewerUrl) {
|
|
37929
|
-
|
|
37357
|
+
_context8.next = 2;
|
|
37930
37358
|
break;
|
|
37931
37359
|
}
|
|
37932
37360
|
throw new Error('No Live AR Viewer URL set');
|
|
@@ -37942,26 +37370,26 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37942
37370
|
}
|
|
37943
37371
|
});
|
|
37944
37372
|
_this2.liveArSocket.on('disconnect', function () {
|
|
37945
|
-
LOG$
|
|
37373
|
+
LOG$4.error(new DivaUtils.DivaError('AR Socket disconnected'));
|
|
37946
37374
|
});
|
|
37947
37375
|
_this2.liveArSocket.on('observer-joined', function () {
|
|
37948
37376
|
var _this2$liveArSocket;
|
|
37949
|
-
LOG$
|
|
37377
|
+
LOG$4.debug('AR Observer joined');
|
|
37950
37378
|
_this2.liveArClientsConnected = true;
|
|
37951
37379
|
var hqRenderScript = _this2.lastSavedHQRenderScript;
|
|
37952
37380
|
if (hqRenderScript) (_this2$liveArSocket = _this2.liveArSocket) === null || _this2$liveArSocket === void 0 || _this2$liveArSocket.emit('update', {
|
|
37953
37381
|
hqRenderScript: JSON.stringify(hqRenderScript)
|
|
37954
37382
|
});else {
|
|
37955
|
-
LOG$
|
|
37383
|
+
LOG$4.debug('No HQRenderScript found for observer-joined');
|
|
37956
37384
|
handleNoHqrs();
|
|
37957
37385
|
}
|
|
37958
37386
|
});
|
|
37959
37387
|
_this2.liveArSocket.on('observer-left', function () {
|
|
37960
|
-
LOG$
|
|
37388
|
+
LOG$4.debug('AR Observer left');
|
|
37961
37389
|
_this2.liveArClientsConnected = false;
|
|
37962
37390
|
});
|
|
37963
37391
|
_this2.liveArSocket.on('connected', function (data) {
|
|
37964
|
-
LOG$
|
|
37392
|
+
LOG$4.debug('AR Socket connected ' + data.connectionId);
|
|
37965
37393
|
_this2.liveArSocket.auth = _objectSpread$6(_objectSpread$6({}, _this2.liveArSocket.auth), {}, {
|
|
37966
37394
|
connectionId: data.connectionId
|
|
37967
37395
|
});
|
|
@@ -37975,21 +37403,21 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37975
37403
|
}
|
|
37976
37404
|
case 3:
|
|
37977
37405
|
case "end":
|
|
37978
|
-
return
|
|
37406
|
+
return _context8.stop();
|
|
37979
37407
|
}
|
|
37980
|
-
},
|
|
37408
|
+
}, _callee8);
|
|
37981
37409
|
}));
|
|
37982
|
-
return function (
|
|
37410
|
+
return function (_x7, _x8) {
|
|
37983
37411
|
return _ref.apply(this, arguments);
|
|
37984
37412
|
};
|
|
37985
37413
|
}()));
|
|
37986
37414
|
case 1:
|
|
37987
37415
|
case "end":
|
|
37988
|
-
return
|
|
37416
|
+
return _context9.stop();
|
|
37989
37417
|
}
|
|
37990
|
-
},
|
|
37418
|
+
}, _callee9);
|
|
37991
37419
|
}));
|
|
37992
|
-
function openARObserverConnection(
|
|
37420
|
+
function openARObserverConnection(_x6) {
|
|
37993
37421
|
return _openARObserverConnection.apply(this, arguments);
|
|
37994
37422
|
}
|
|
37995
37423
|
return openARObserverConnection;
|
|
@@ -37999,10 +37427,10 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37999
37427
|
value: function sendARRenderScript(hqRenderScript) {
|
|
38000
37428
|
var _this$liveArSocket;
|
|
38001
37429
|
if (!this.liveArClientsConnected) {
|
|
38002
|
-
LOG$
|
|
37430
|
+
LOG$4.debug('No AR Clients connected, dont send render script');
|
|
38003
37431
|
return;
|
|
38004
37432
|
}
|
|
38005
|
-
LOG$
|
|
37433
|
+
LOG$4.debug('Sending AR Render Script to clients');
|
|
38006
37434
|
(_this$liveArSocket = this.liveArSocket) === null || _this$liveArSocket === void 0 || _this$liveArSocket.emit('update', {
|
|
38007
37435
|
hqRenderScript: hqRenderScript.HQRenderScript
|
|
38008
37436
|
});
|
|
@@ -38010,6 +37438,131 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
38010
37438
|
}]);
|
|
38011
37439
|
}();
|
|
38012
37440
|
|
|
37441
|
+
var LOG$3 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
37442
|
+
var DivaMediaServiceHandler = /*#__PURE__*/function () {
|
|
37443
|
+
//-------------------------------------------------- INITIALIZATION--------------------------------------------------------------//
|
|
37444
|
+
|
|
37445
|
+
function DivaMediaServiceHandler() {
|
|
37446
|
+
_classCallCheck__default["default"](this, DivaMediaServiceHandler);
|
|
37447
|
+
_defineProperty__default["default"](this, "organizationId", void 0);
|
|
37448
|
+
_defineProperty__default["default"](this, "mediaServiceUrl", void 0);
|
|
37449
|
+
_defineProperty__default["default"](this, "mediaServiceApiKey", void 0);
|
|
37450
|
+
_defineProperty__default["default"](this, "jwt", void 0);
|
|
37451
|
+
_defineProperty__default["default"](this, "POST_saveTmp2PermanentPostfix", '/saveTmp2Permanent');
|
|
37452
|
+
_defineProperty__default["default"](this, "GET_MediaItemrefs", '/v1/mediaitems/refs?limit=20&skip=0&filter=');
|
|
37453
|
+
_defineProperty__default["default"](this, "POST_mediaItem", '/v1/mediaitems?ref=true');
|
|
37454
|
+
this.organizationId = '';
|
|
37455
|
+
this.mediaServiceUrl = '';
|
|
37456
|
+
this.mediaServiceApiKey = '';
|
|
37457
|
+
}
|
|
37458
|
+
return _createClass__default["default"](DivaMediaServiceHandler, [{
|
|
37459
|
+
key: "setOrganizationId",
|
|
37460
|
+
value: function setOrganizationId(organizationId) {
|
|
37461
|
+
this.organizationId = organizationId;
|
|
37462
|
+
}
|
|
37463
|
+
}, {
|
|
37464
|
+
key: "setMediaServiceUrl",
|
|
37465
|
+
value: function setMediaServiceUrl(mediaServiceUrl) {
|
|
37466
|
+
this.mediaServiceUrl = mediaServiceUrl;
|
|
37467
|
+
}
|
|
37468
|
+
}, {
|
|
37469
|
+
key: "setMediaServiceApiKey",
|
|
37470
|
+
value: function setMediaServiceApiKey(mediaServiceApiKey) {
|
|
37471
|
+
this.mediaServiceApiKey = mediaServiceApiKey;
|
|
37472
|
+
}
|
|
37473
|
+
}, {
|
|
37474
|
+
key: "setJwt",
|
|
37475
|
+
value: function setJwt(jwt) {
|
|
37476
|
+
this.jwt = jwt;
|
|
37477
|
+
}
|
|
37478
|
+
}, {
|
|
37479
|
+
key: "base64ToBlob",
|
|
37480
|
+
value: function base64ToBlob(base64String, hash) {
|
|
37481
|
+
DivaUtils__default["default"].startSpanOfApm('MediaServiceHandler base64ToBlob');
|
|
37482
|
+
if (base64String.startsWith('data:image/jpeg;base64,')) {
|
|
37483
|
+
base64String = base64String.replace('data:image/jpeg;base64,', '');
|
|
37484
|
+
}
|
|
37485
|
+
var binary_string = window.atob(base64String);
|
|
37486
|
+
var len = binary_string.length;
|
|
37487
|
+
var bytes = new Uint8Array(len);
|
|
37488
|
+
for (var i = 0; i < len; i++) {
|
|
37489
|
+
bytes[i] = binary_string.charCodeAt(i);
|
|
37490
|
+
}
|
|
37491
|
+
var blob = new File([bytes.buffer], hash + '.jpg', {
|
|
37492
|
+
type: 'image/jpeg'
|
|
37493
|
+
});
|
|
37494
|
+
DivaUtils__default["default"].endSpanOfApm('MediaServiceHandler base64ToBlob');
|
|
37495
|
+
return blob;
|
|
37496
|
+
}
|
|
37497
|
+
}, {
|
|
37498
|
+
key: "savePlanning2DPermanent",
|
|
37499
|
+
value: function () {
|
|
37500
|
+
var _savePlanning2DPermanent = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(hash, catalogCodex, catalogGUID, planning2DAsJPG) {
|
|
37501
|
+
var imageBlob, url, data, mediaItem, mediaItemRef, response, res;
|
|
37502
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
37503
|
+
while (1) switch (_context.prev = _context.next) {
|
|
37504
|
+
case 0:
|
|
37505
|
+
DivaUtils__default["default"].startSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
|
|
37506
|
+
imageBlob = this.base64ToBlob(planning2DAsJPG, hash);
|
|
37507
|
+
url = this.mediaServiceUrl + this.POST_mediaItem; //push media item return url
|
|
37508
|
+
//create media item ref and set same paramters
|
|
37509
|
+
data = new FormData();
|
|
37510
|
+
data.append('file', imageBlob);
|
|
37511
|
+
mediaItem = {
|
|
37512
|
+
organizationId: this.organizationId,
|
|
37513
|
+
mediaType: 'PCT',
|
|
37514
|
+
fileName: hash + '.jpg'
|
|
37515
|
+
};
|
|
37516
|
+
data.append('mediaItem', JSON.stringify(mediaItem));
|
|
37517
|
+
mediaItemRef = {
|
|
37518
|
+
functionType: 'P2D',
|
|
37519
|
+
planningHash: hash,
|
|
37520
|
+
catalogCodex: catalogCodex,
|
|
37521
|
+
catalogGuid: catalogGUID
|
|
37522
|
+
};
|
|
37523
|
+
data.append('mediaItemRef', JSON.stringify(mediaItemRef));
|
|
37524
|
+
_context.next = 11;
|
|
37525
|
+
return fetch(url, {
|
|
37526
|
+
method: 'POST',
|
|
37527
|
+
body: data,
|
|
37528
|
+
headers: {
|
|
37529
|
+
'X-API-KEY': this.mediaServiceApiKey
|
|
37530
|
+
}
|
|
37531
|
+
});
|
|
37532
|
+
case 11:
|
|
37533
|
+
response = _context.sent;
|
|
37534
|
+
if (!response.ok) {
|
|
37535
|
+
_context.next = 20;
|
|
37536
|
+
break;
|
|
37537
|
+
}
|
|
37538
|
+
_context.next = 15;
|
|
37539
|
+
return response.json();
|
|
37540
|
+
case 15:
|
|
37541
|
+
res = _context.sent;
|
|
37542
|
+
LOG$3.debug('Successfully saved 2D Planning in media Service. URL: ' + res.url);
|
|
37543
|
+
return _context.abrupt("return", res.url);
|
|
37544
|
+
case 20:
|
|
37545
|
+
LOG$3.error(new DivaUtils.DivaError('Error when saving the Planning2D image on mediaService. Hash: ' + hash + 'response: ' + response, {
|
|
37546
|
+
code: 'WC_0016'
|
|
37547
|
+
}));
|
|
37548
|
+
case 21:
|
|
37549
|
+
DivaUtils__default["default"].endSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
|
|
37550
|
+
return _context.abrupt("return", '');
|
|
37551
|
+
case 23:
|
|
37552
|
+
case "end":
|
|
37553
|
+
return _context.stop();
|
|
37554
|
+
}
|
|
37555
|
+
}, _callee, this);
|
|
37556
|
+
}));
|
|
37557
|
+
function savePlanning2DPermanent(_x, _x2, _x3, _x4) {
|
|
37558
|
+
return _savePlanning2DPermanent.apply(this, arguments);
|
|
37559
|
+
}
|
|
37560
|
+
return savePlanning2DPermanent;
|
|
37561
|
+
}()
|
|
37562
|
+
}]);
|
|
37563
|
+
}();
|
|
37564
|
+
var mediaServiceHandler = new DivaMediaServiceHandler();
|
|
37565
|
+
|
|
38013
37566
|
/**
|
|
38014
37567
|
* This class saves a Bounding box. This bounding box can be of one Planner (one Set) or for several planner elements (multiple Sets)
|
|
38015
37568
|
*/
|
|
@@ -38344,7 +37897,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38344
37897
|
key: "initPlanner",
|
|
38345
37898
|
value: (function () {
|
|
38346
37899
|
var _initPlanner = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(initSetState, plannerHandlerFunctions) {
|
|
38347
|
-
var renderGroup, diva3dServerUrl, divaMediaServiceUrl, mediaServiceApiKey,
|
|
37900
|
+
var renderGroup, diva3dServerUrl, divaMediaServiceUrl, mediaServiceApiKey, _initSetState$api$web, result;
|
|
38348
37901
|
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
38349
37902
|
while (1) switch (_context.prev = _context.next) {
|
|
38350
37903
|
case 0:
|
|
@@ -38353,8 +37906,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38353
37906
|
this.plannerHandlerFunctions = plannerHandlerFunctions;
|
|
38354
37907
|
diva3dServerUrl = initSetState.api.get3DServerUrl();
|
|
38355
37908
|
divaMediaServiceUrl = initSetState.api.getDivaMediaServiceUrl();
|
|
38356
|
-
mediaServiceApiKey = initSetState.api.getDivaMediaServiceApiKey();
|
|
38357
|
-
useSirvViewer = initSetState.api.getDiva3dUseSirvViewer(); //renderGroup = 'LeaTest';
|
|
37909
|
+
mediaServiceApiKey = initSetState.api.getDivaMediaServiceApiKey(); //renderGroup = 'LeaTest';
|
|
38358
37910
|
//diva3dServerUrl = "https://test-einkauf-onboarding.pfister.ch/diva3d/diva3dhost2/";
|
|
38359
37911
|
// diva3dServerUrl = "https://diva3dhost.diva-portal.com/diva3d/diva3dhost2/";
|
|
38360
37912
|
//diva3dServerUrl = 'https://localhost:44315/';
|
|
@@ -38364,7 +37916,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38364
37916
|
//divaMediaServiceUrl = 'https://api-test.diva-portal.com/media/';
|
|
38365
37917
|
//divaMediaServiceUrl = 'http://localhost:3000';
|
|
38366
37918
|
if (!(!initSetState.onlyRunLogic && !initSetState.no3DConnection)) {
|
|
38367
|
-
_context.next =
|
|
37919
|
+
_context.next = 14;
|
|
38368
37920
|
break;
|
|
38369
37921
|
}
|
|
38370
37922
|
this.handler3D.initializeCallbackFunctions({
|
|
@@ -38376,34 +37928,31 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38376
37928
|
this.handler3D.setJwt(initSetState.api.getJwt());
|
|
38377
37929
|
//Only use if only 1 Planner/Set is used. Not possible in setPlanner
|
|
38378
37930
|
result = this.handler3D.initializeAPISettings({
|
|
38379
|
-
useMediaServiceImageCache: initSetState.api.getDiva3dUseImageCache(),
|
|
38380
|
-
suppressCacheCreation: initSetState.api.getDiva3DSuppressCacheCreation(),
|
|
38381
37931
|
renderGroup: renderGroup,
|
|
38382
37932
|
diva3dServerUrl: diva3dServerUrl,
|
|
38383
37933
|
divaMediaServiceUrl: divaMediaServiceUrl,
|
|
38384
37934
|
organizationId: initSetState.organizationId,
|
|
38385
|
-
useSirvViewer: useSirvViewer,
|
|
38386
37935
|
arViewerUrl: (_initSetState$api$web = initSetState.api.webConfig) === null || _initSetState$api$web === void 0 ? void 0 : _initSetState$api$web.arViewerUrl
|
|
38387
37936
|
});
|
|
38388
37937
|
if (!(!this.handler3D.checkConnectionInitialized() || result.renderGroupChanged || result.diva3dServerUrlChanged)) {
|
|
38389
|
-
_context.next =
|
|
37938
|
+
_context.next = 13;
|
|
38390
37939
|
break;
|
|
38391
37940
|
}
|
|
38392
|
-
_context.next =
|
|
37941
|
+
_context.next = 13;
|
|
38393
37942
|
return this.handler3D.initializeConnection();
|
|
38394
|
-
case
|
|
37943
|
+
case 13:
|
|
38395
37944
|
if (this.divaNr != initSetState.divaNr) {
|
|
38396
37945
|
this.divaNr = initSetState.divaNr;
|
|
38397
37946
|
this.handler3D.joinDivaNr(this.divaNr);
|
|
38398
37947
|
}
|
|
38399
|
-
case
|
|
37948
|
+
case 14:
|
|
38400
37949
|
mediaServiceHandler.setMediaServiceUrl(divaMediaServiceUrl);
|
|
38401
37950
|
mediaServiceHandler.setMediaServiceApiKey(mediaServiceApiKey);
|
|
38402
37951
|
mediaServiceHandler.setOrganizationId(initSetState.organizationId);
|
|
38403
37952
|
mediaServiceHandler.setJwt(initSetState.api.getJwt());
|
|
38404
37953
|
this.handler3D.setOrigConfigurationCallback(this.plannerHandlerFunctions.getOrigConfiguration);
|
|
38405
37954
|
DivaUtils__default["default"].endSpanOfApm('DivaPlannerHandler initPlanner');
|
|
38406
|
-
case
|
|
37955
|
+
case 20:
|
|
38407
37956
|
case "end":
|
|
38408
37957
|
return _context.stop();
|
|
38409
37958
|
}
|
|
@@ -38520,10 +38069,8 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38520
38069
|
roomlistCodex,
|
|
38521
38070
|
roomLists,
|
|
38522
38071
|
_yield$import,
|
|
38523
|
-
DivaSingleProductPlanner,
|
|
38524
|
-
_yield$import2,
|
|
38525
38072
|
DivaStandardPlanner,
|
|
38526
|
-
_yield$
|
|
38073
|
+
_yield$import2,
|
|
38527
38074
|
DivaBoxPlanner,
|
|
38528
38075
|
_args4 = arguments;
|
|
38529
38076
|
return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context4) {
|
|
@@ -38552,58 +38099,44 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38552
38099
|
}
|
|
38553
38100
|
this.handler3D.initializeViewPoint(catalogData.standardWhiteroom);
|
|
38554
38101
|
_context4.t0 = set.getPlannerEdition();
|
|
38555
|
-
_context4.next = _context4.t0 === 'STANDARD' ? 8 : _context4.t0 === 'BOX' ?
|
|
38102
|
+
_context4.next = _context4.t0 === 'STANDARD' ? 8 : _context4.t0 === 'BOX' ? 15 : 21;
|
|
38556
38103
|
break;
|
|
38557
38104
|
case 8:
|
|
38558
|
-
|
|
38559
|
-
|
|
38560
|
-
|
|
38561
|
-
}
|
|
38562
|
-
_context4.next = 11;
|
|
38563
|
-
return Promise.resolve().then(function () { return require('./DivaSingleProductPlanner-fcf3e4be.js'); });
|
|
38564
|
-
case 11:
|
|
38105
|
+
_context4.next = 10;
|
|
38106
|
+
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-25919135.js'); });
|
|
38107
|
+
case 10:
|
|
38565
38108
|
_yield$import = _context4.sent;
|
|
38566
|
-
|
|
38567
|
-
planner = new DivaSingleProductPlanner(set, this.plannerIDCount, this.setPlannerHandler.getGlobalBoundingBox(), set.api.getHidePlanner());
|
|
38568
|
-
_context4.next = 22;
|
|
38569
|
-
break;
|
|
38570
|
-
case 16:
|
|
38571
|
-
_context4.next = 18;
|
|
38572
|
-
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-a18f752d.js'); });
|
|
38573
|
-
case 18:
|
|
38574
|
-
_yield$import2 = _context4.sent;
|
|
38575
|
-
DivaStandardPlanner = _yield$import2["default"];
|
|
38109
|
+
DivaStandardPlanner = _yield$import["default"];
|
|
38576
38110
|
planner = new DivaStandardPlanner(set, this.plannerHandlerFunctions.updatePlannerMsgContainer, this.plannerIDCount, this.setPlannerHandler.getGlobalBoundingBox(), set.api.getHidePlanner(), !!set.api.getDoShowAR(), set.api.getDoDisablePlanner2D(), hasStaticBackground);
|
|
38577
38111
|
if (catalogData.isIDM3DCat) {
|
|
38578
38112
|
planner.initIDM3DMeta(catalogData.IDM3DCatCodex);
|
|
38579
38113
|
}
|
|
38580
|
-
|
|
38581
|
-
|
|
38582
|
-
|
|
38583
|
-
|
|
38584
|
-
|
|
38585
|
-
|
|
38586
|
-
|
|
38587
|
-
DivaBoxPlanner = _yield$import3["default"];
|
|
38114
|
+
return _context4.abrupt("break", 21);
|
|
38115
|
+
case 15:
|
|
38116
|
+
_context4.next = 17;
|
|
38117
|
+
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-26e0cace.js'); });
|
|
38118
|
+
case 17:
|
|
38119
|
+
_yield$import2 = _context4.sent;
|
|
38120
|
+
DivaBoxPlanner = _yield$import2["default"];
|
|
38588
38121
|
planner = new DivaBoxPlanner(set, this.plannerIDCount);
|
|
38589
|
-
return _context4.abrupt("break",
|
|
38590
|
-
case
|
|
38122
|
+
return _context4.abrupt("break", 21);
|
|
38123
|
+
case 21:
|
|
38591
38124
|
this.plannerList.set(set.getSetId(), planner);
|
|
38592
38125
|
this.plannerIDCount++;
|
|
38593
38126
|
if (!(setPlanData != null && setPlanData != '')) {
|
|
38594
|
-
_context4.next =
|
|
38127
|
+
_context4.next = 26;
|
|
38595
38128
|
break;
|
|
38596
38129
|
}
|
|
38597
|
-
_context4.next =
|
|
38130
|
+
_context4.next = 26;
|
|
38598
38131
|
return planner.initPlanner(setPlanData);
|
|
38599
|
-
case
|
|
38132
|
+
case 26:
|
|
38600
38133
|
if (lastSetToInitialize) {
|
|
38601
38134
|
this.updateAllPlannerBBs();
|
|
38602
38135
|
this.setPlannerHandler.calcGlobalBoundingBox(this.plannerList);
|
|
38603
38136
|
}
|
|
38604
38137
|
this.setPlannerHandler.updateSetPosNr(this.plannerList);
|
|
38605
38138
|
DivaUtils__default["default"].endSpanOfApm('DivaPlannerHandler initSet');
|
|
38606
|
-
case
|
|
38139
|
+
case 29:
|
|
38607
38140
|
case "end":
|
|
38608
38141
|
return _context4.stop();
|
|
38609
38142
|
}
|
|
@@ -39073,7 +38606,6 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39073
38606
|
}, {
|
|
39074
38607
|
key: "clearHandler3D",
|
|
39075
38608
|
value: function clearHandler3D() {
|
|
39076
|
-
this.handler3D.clearRenderCache();
|
|
39077
38609
|
this.handler3D.closeConnection();
|
|
39078
38610
|
}
|
|
39079
38611
|
}, {
|
|
@@ -39322,7 +38854,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39322
38854
|
if (!renderRequestInfos) {
|
|
39323
38855
|
LOG$2.error(new DivaUtils.DivaError('Error requesting 3D rendering. No renderRequestInfo is set'));
|
|
39324
38856
|
return;
|
|
39325
|
-
} else if (
|
|
38857
|
+
} else if (renderRequestInfos.width <= 0 || isNaN(renderRequestInfos.width) || renderRequestInfos.height <= 0 || isNaN(renderRequestInfos.height)) {
|
|
39326
38858
|
LOG$2.error(new DivaUtils.DivaError('Error requesting rendering. Not valid width or height request width: ' + renderRequestInfos.width + ' height: ' + renderRequestInfos.height));
|
|
39327
38859
|
return;
|
|
39328
38860
|
}
|
|
@@ -39331,14 +38863,11 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39331
38863
|
var loadedCatData = [];
|
|
39332
38864
|
var plannerExists = false;
|
|
39333
38865
|
var savedSetId = undefined;
|
|
39334
|
-
var containsNotDigitalizedTextures = false;
|
|
39335
|
-
var useMediaServiceImageCache = doRequestRendering && this.handler3D.getUseMediaServiceImageCache() ? true : false;
|
|
39336
38866
|
this.plannerList.forEach(function (planner, setId) {
|
|
39337
38867
|
var _renderRequestInfos$d;
|
|
39338
38868
|
savedSetId = setId;
|
|
39339
|
-
var config = planner.getSetData(true, _this3.plannerHandlerFunctions.doAllowSetPlanner(), (_renderRequestInfos$d = renderRequestInfos === null || renderRequestInfos === void 0 ? void 0 : renderRequestInfos.doShow3DDimensionLines) !== null && _renderRequestInfos$d !== void 0 ? _renderRequestInfos$d : false,
|
|
38869
|
+
var config = planner.getSetData(true, _this3.plannerHandlerFunctions.doAllowSetPlanner(), (_renderRequestInfos$d = renderRequestInfos === null || renderRequestInfos === void 0 ? void 0 : renderRequestInfos.doShow3DDimensionLines) !== null && _renderRequestInfos$d !== void 0 ? _renderRequestInfos$d : false, alternateRenderInfo);
|
|
39340
38870
|
var setData = config.constructionSet;
|
|
39341
|
-
if (config.containsNotDigitalizedTextures) containsNotDigitalizedTextures = true;
|
|
39342
38871
|
|
|
39343
38872
|
//Add technical Info to setData
|
|
39344
38873
|
var bboxInfo2D = _this3.get2DViewPlannerBoundingBox();
|
|
@@ -39358,15 +38887,6 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39358
38887
|
});
|
|
39359
38888
|
});
|
|
39360
38889
|
if (plannerExists) {
|
|
39361
|
-
if (containsNotDigitalizedTextures) {
|
|
39362
|
-
var _this$plannerHandlerF3, _this$plannerHandlerF4;
|
|
39363
|
-
(_this$plannerHandlerF3 = (_this$plannerHandlerF4 = this.plannerHandlerFunctions).updatePlannerMsgContainer) === null || _this$plannerHandlerF3 === void 0 || _this$plannerHandlerF3.call(_this$plannerHandlerF4, 'TEXTURE_NOT_DIGITALIZED_WARNING', true, 'INFO', 'TEXTURE_NOT_DIGITALIZED_WARNING', false, undefined);
|
|
39364
|
-
} else {
|
|
39365
|
-
var _this$plannerHandlerF5, _this$plannerHandlerF6;
|
|
39366
|
-
//Hide message warning if shown
|
|
39367
|
-
(_this$plannerHandlerF5 = (_this$plannerHandlerF6 = this.plannerHandlerFunctions).updatePlannerMsgContainer) === null || _this$plannerHandlerF5 === void 0 || _this$plannerHandlerF5.call(_this$plannerHandlerF6, 'TEXTURE_NOT_DIGITALIZED_WARNING', false, 'INFO', 'TEXTURE_NOT_DIGITALIZED_WARNING', false, undefined);
|
|
39368
|
-
}
|
|
39369
|
-
|
|
39370
38890
|
// if not in set planner mode overwrite s1 with correct setId
|
|
39371
38891
|
if (!this.plannerHandlerFunctions.doAllowSetPlanner()) {
|
|
39372
38892
|
plannerData.SCE.ROO[0].SET[0].ID = savedSetId;
|
|
@@ -39409,12 +38929,12 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39409
38929
|
|
|
39410
38930
|
if (!setId) {
|
|
39411
38931
|
this.plannerList.forEach(function (planner, setId) {
|
|
39412
|
-
var config = planner.getSetData(true, _this4.plannerHandlerFunctions.doAllowSetPlanner(), false
|
|
38932
|
+
var config = planner.getSetData(true, _this4.plannerHandlerFunctions.doAllowSetPlanner(), false);
|
|
39413
38933
|
var setData = config.constructionSet;
|
|
39414
38934
|
plannerData.SCE.ROO[0].SET.push(setData);
|
|
39415
38935
|
});
|
|
39416
38936
|
} else {
|
|
39417
|
-
var config = this.plannerList.get(setId).getSetData(true, this.plannerHandlerFunctions.doAllowSetPlanner(), false
|
|
38937
|
+
var config = this.plannerList.get(setId).getSetData(true, this.plannerHandlerFunctions.doAllowSetPlanner(), false);
|
|
39418
38938
|
plannerData.SCE.ROO[0].SET.push(config.constructionSet);
|
|
39419
38939
|
}
|
|
39420
38940
|
return JSON.stringify(plannerData);
|
|
@@ -39441,7 +38961,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39441
38961
|
// let posInformation: any = {};
|
|
39442
38962
|
|
|
39443
38963
|
this.plannerList.forEach(function (planner, setId) {
|
|
39444
|
-
var config = planner.getSetData(false, _this5.plannerHandlerFunctions.doAllowSetPlanner(), false
|
|
38964
|
+
var config = planner.getSetData(false, _this5.plannerHandlerFunctions.doAllowSetPlanner(), false);
|
|
39445
38965
|
plannerData.SCE.ROO[0].SET.push(config.constructionSet);
|
|
39446
38966
|
});
|
|
39447
38967
|
return DivaUtils.md5(JSON.stringify(plannerData));
|
|
@@ -39496,7 +39016,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39496
39016
|
_defineProperty__default["default"](this, "updatePlanner3DImage", void 0);
|
|
39497
39017
|
_defineProperty__default["default"](this, "setRotationOrbitCube", void 0);
|
|
39498
39018
|
_defineProperty__default["default"](this, "getCanvas2DAsJPG", void 0);
|
|
39499
|
-
_defineProperty__default["default"](this, "updateSirvViewer", void 0);
|
|
39500
39019
|
_defineProperty__default["default"](this, "updateFullscreenRendering", void 0);
|
|
39501
39020
|
_defineProperty__default["default"](this, "plannerHandler", void 0);
|
|
39502
39021
|
_defineProperty__default["default"](this, "updateSetImage", void 0);
|
|
@@ -39586,18 +39105,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39586
39105
|
if (rendering.getIsFullscreenRendering()) {
|
|
39587
39106
|
_this.updateFullscreenRendering(rendering);
|
|
39588
39107
|
} else {
|
|
39589
|
-
|
|
39590
|
-
|
|
39591
|
-
(_this$actSet = _this.actSet()) === null || _this$actSet === void 0 || _this$actSet.getVariantBasketData();
|
|
39592
|
-
(_this$updateSirvViewe = _this.updateSirvViewer) === null || _this$updateSirvViewe === void 0 || _this$updateSirvViewe.call(_this, rendering, (_this$actSet2 = _this.actSet()) === null || _this$actSet2 === void 0 ? void 0 : _this$actSet2.getArticleVariantValues());
|
|
39593
|
-
} else {
|
|
39594
|
-
var _this$actSet3;
|
|
39595
|
-
_this.updatePlanner3DImage(rendering, ((_this$actSet3 = _this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getAlternateRenderInfo().length) > 0);
|
|
39596
|
-
}
|
|
39108
|
+
var _this$actSet;
|
|
39109
|
+
_this.updatePlanner3DImage(rendering, ((_this$actSet = _this.actSet()) === null || _this$actSet === void 0 ? void 0 : _this$actSet.getAlternateRenderInfo().length) > 0);
|
|
39597
39110
|
}
|
|
39598
39111
|
if (_this.actions && (_this$state = _this.state) !== null && _this$state !== void 0 && _this$state.enableSupport) {
|
|
39599
|
-
var _this$
|
|
39600
|
-
_this.api.postPlanningInfo((_this$
|
|
39112
|
+
var _this$actSet2, _this$state$user, _this$state$user2, _this$state$user3;
|
|
39113
|
+
_this.api.postPlanningInfo((_this$actSet2 = _this.actSet()) === null || _this$actSet2 === void 0 ? void 0 : _this$actSet2.getVariantBasketData(), _this.divaNr, rendering.getImageForSrc(), _this.getCurSetPrice() + setHandlerInstance.getActSetPriceFormat(_this.actSet()), _this.getCurCatalogName(), (_this$state$user = _this.state.user) === null || _this$state$user === void 0 ? void 0 : _this$state$user._id, (_this$state$user2 = _this.state.user) === null || _this$state$user2 === void 0 ? void 0 : _this$state$user2.name, (_this$state$user3 = _this.state.user) === null || _this$state$user3 === void 0 ? void 0 : _this$state$user3.familyName, _this.state.organization._id);
|
|
39601
39114
|
}
|
|
39602
39115
|
});
|
|
39603
39116
|
/**
|
|
@@ -40439,19 +39952,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40439
39952
|
}, {
|
|
40440
39953
|
key: "getDivaArticles",
|
|
40441
39954
|
value: function getDivaArticles() {
|
|
40442
|
-
var _this$
|
|
40443
|
-
return (_this$
|
|
39955
|
+
var _this$actSet3;
|
|
39956
|
+
return (_this$actSet3 = this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getDivaArticles();
|
|
40444
39957
|
}
|
|
40445
39958
|
}, {
|
|
40446
39959
|
key: "getDimension",
|
|
40447
39960
|
value: function () {
|
|
40448
39961
|
var _getDimension = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14() {
|
|
40449
|
-
var _this$
|
|
39962
|
+
var _this$actSet4;
|
|
40450
39963
|
return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context14) {
|
|
40451
39964
|
while (1) switch (_context14.prev = _context14.next) {
|
|
40452
39965
|
case 0:
|
|
40453
39966
|
_context14.next = 2;
|
|
40454
|
-
return (_this$
|
|
39967
|
+
return (_this$actSet4 = this.actSet()) === null || _this$actSet4 === void 0 ? void 0 : _this$actSet4.getDimensionPerVariant();
|
|
40455
39968
|
case 2:
|
|
40456
39969
|
return _context14.abrupt("return", _context14.sent);
|
|
40457
39970
|
case 3:
|
|
@@ -40510,7 +40023,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40510
40023
|
this.updateWebConfiguratorTitle();
|
|
40511
40024
|
//initialize planner view
|
|
40512
40025
|
(_this$updateViewPlann9 = this.updateViewPlannerElements) === null || _this$updateViewPlann9 === void 0 || _this$updateViewPlann9.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set), set.getSetId(), set.firstElementId);
|
|
40513
|
-
this.
|
|
40026
|
+
this.updatePlannerView('INIT_VIEW');
|
|
40514
40027
|
this.onBasketInitialized();
|
|
40515
40028
|
this.checkVariantData();
|
|
40516
40029
|
case 17:
|
|
@@ -40530,8 +40043,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40530
40043
|
}, {
|
|
40531
40044
|
key: "updateWebConfiguratorTitle",
|
|
40532
40045
|
value: function updateWebConfiguratorTitle() {
|
|
40533
|
-
var _this$setWebConifgura, _this$
|
|
40534
|
-
(_this$setWebConifgura = this.setWebConifguratorTitle) === null || _this$setWebConifgura === void 0 || _this$setWebConifgura.call(this, (_this$
|
|
40046
|
+
var _this$setWebConifgura, _this$actSet5;
|
|
40047
|
+
(_this$setWebConifgura = this.setWebConifguratorTitle) === null || _this$setWebConifgura === void 0 || _this$setWebConifgura.call(this, (_this$actSet5 = this.actSet()) === null || _this$actSet5 === void 0 ? void 0 : _this$actSet5.getSetTitle());
|
|
40535
40048
|
}
|
|
40536
40049
|
}, {
|
|
40537
40050
|
key: "updateConfigStructure",
|
|
@@ -40543,7 +40056,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40543
40056
|
value: function () {
|
|
40544
40057
|
var _runInitMode = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(plannerMode) {
|
|
40545
40058
|
var _this$navigateToTabGr2;
|
|
40546
|
-
var doDefault, configStepKey, _this$
|
|
40059
|
+
var doDefault, configStepKey, _this$actSet6, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
|
|
40547
40060
|
return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context16) {
|
|
40548
40061
|
while (1) switch (_context16.prev = _context16.next) {
|
|
40549
40062
|
case 0:
|
|
@@ -40578,7 +40091,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40578
40091
|
if (doDefault) {
|
|
40579
40092
|
if (plannerMode == 'ProductList') {
|
|
40580
40093
|
(_this$navigateToTabGr3 = this.navigateToTabGroup) === null || _this$navigateToTabGr3 === void 0 || _this$navigateToTabGr3.call(this, 'PRODUCTS');
|
|
40581
|
-
} else if ((_this$
|
|
40094
|
+
} else if ((_this$actSet6 = this.actSet()) !== null && _this$actSet6 !== void 0 && _this$actSet6.hasStaticRoomList) {
|
|
40582
40095
|
(_this$navigateToTabGr4 = this.navigateToTabGroup) === null || _this$navigateToTabGr4 === void 0 || _this$navigateToTabGr4.call(this, 'ROOMLIST', true);
|
|
40583
40096
|
} else {
|
|
40584
40097
|
(_this$navigateToTabGr5 = this.navigateToTabGroup) === null || _this$navigateToTabGr5 === void 0 || _this$navigateToTabGr5.call(this, this.getCurPlannerType(true), true);
|
|
@@ -40595,24 +40108,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40595
40108
|
}
|
|
40596
40109
|
return runInitMode;
|
|
40597
40110
|
}()
|
|
40598
|
-
}, {
|
|
40599
|
-
key: "initCache",
|
|
40600
|
-
value: function initCache() {
|
|
40601
|
-
//get cached image
|
|
40602
|
-
var initFirstRenderingByCache = false;
|
|
40603
|
-
if (DivaUtils__default["default"].CacheIsEnabled) {
|
|
40604
|
-
var firstImageUrl = DivaUtils__default["default"].getCacheData('FIRSTIMAGE', '');
|
|
40605
|
-
if (firstImageUrl) {
|
|
40606
|
-
initFirstRenderingByCache = true;
|
|
40607
|
-
var rendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'STREAM');
|
|
40608
|
-
rendering.setHQRenderingUrl(firstImageUrl, this.api.getDiva3dUseSirvViewer());
|
|
40609
|
-
this.updatePlannerRendering(rendering);
|
|
40610
|
-
}
|
|
40611
|
-
}
|
|
40612
|
-
if (!initFirstRenderingByCache) {
|
|
40613
|
-
this.updatePlannerView('INIT_VIEW');
|
|
40614
|
-
}
|
|
40615
|
-
}
|
|
40616
40111
|
}, {
|
|
40617
40112
|
key: "addSetToActPlanningByDivaNr",
|
|
40618
40113
|
value: function () {
|
|
@@ -40826,7 +40321,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40826
40321
|
setHandlerInstance.update3DPlannerView(true, true, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime2 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime2 === void 0 ? void 0 : _this$getDoShow3DDime2.call(this), alternateRenderInfo, viewpoint);
|
|
40827
40322
|
break;
|
|
40828
40323
|
case '3DImage':
|
|
40829
|
-
case 'SirvViewer_only':
|
|
40830
40324
|
//Request new Rendering
|
|
40831
40325
|
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime3 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime3 === void 0 ? void 0 : _this$getDoShow3DDime3.call(this), alternateRenderInfo);
|
|
40832
40326
|
break;
|
|
@@ -40873,8 +40367,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40873
40367
|
}, {
|
|
40874
40368
|
key: "getAlternateRenderingsForSummary",
|
|
40875
40369
|
value: function getAlternateRenderingsForSummary() {
|
|
40876
|
-
var _this$
|
|
40877
|
-
return (_this$
|
|
40370
|
+
var _this$actSet7;
|
|
40371
|
+
return (_this$actSet7 = this.actSet()) === null || _this$actSet7 === void 0 || (_this$actSet7 = _this$actSet7.CatalogData) === null || _this$actSet7 === void 0 ? void 0 : _this$actSet7.alternateRenderingsForSummary;
|
|
40878
40372
|
}
|
|
40879
40373
|
}, {
|
|
40880
40374
|
key: "destroyWebPlanner",
|
|
@@ -41170,8 +40664,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41170
40664
|
}, {
|
|
41171
40665
|
key: "setDifferentOptions",
|
|
41172
40666
|
value: function setDifferentOptions(options) {
|
|
41173
|
-
var _this$
|
|
41174
|
-
(_this$
|
|
40667
|
+
var _this$actSet8;
|
|
40668
|
+
(_this$actSet8 = this.actSet()) === null || _this$actSet8 === void 0 || _this$actSet8.setDifferentOptions(options);
|
|
41175
40669
|
}
|
|
41176
40670
|
|
|
41177
40671
|
/**
|
|
@@ -41548,7 +41042,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41548
41042
|
* This function returns true if the Planner Mode should be visible and the planner Step should be shown.
|
|
41549
41043
|
* The planner step is not shown if:
|
|
41550
41044
|
* - There is no viewer Option set for the Planner
|
|
41551
|
-
* - The configurator config disables the planner Step (SuS + Cache System)
|
|
41552
41045
|
* - The box Planner is loaded
|
|
41553
41046
|
*/
|
|
41554
41047
|
}, {
|
|
@@ -41569,8 +41062,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41569
41062
|
|
|
41570
41063
|
//if planner is hidden by config but nothing is planned initially
|
|
41571
41064
|
if (plannerType === 'NONE') {
|
|
41572
|
-
var _this$plannerConfig$a7, _this$
|
|
41573
|
-
if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex && !((_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$
|
|
41065
|
+
var _this$plannerConfig$a7, _this$actSet9;
|
|
41066
|
+
if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex && !((_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$actSet9 = this.actSet()) !== null && _this$actSet9 !== void 0 && (_this$actSet9 = _this$actSet9.CatalogData.startPlannerArticle) !== null && _this$actSet9 !== void 0 && _this$actSet9.length)) {
|
|
41574
41067
|
plannerType = 'PLANNER';
|
|
41575
41068
|
}
|
|
41576
41069
|
}
|
|
@@ -41610,38 +41103,38 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41610
41103
|
}, {
|
|
41611
41104
|
key: "getCurCatalogCodex",
|
|
41612
41105
|
value: function getCurCatalogCodex() {
|
|
41613
|
-
var _this$
|
|
41614
|
-
return (_this$
|
|
41106
|
+
var _this$actSet10;
|
|
41107
|
+
return (_this$actSet10 = this.actSet()) === null || _this$actSet10 === void 0 ? void 0 : _this$actSet10.getCatalogCodex();
|
|
41615
41108
|
}
|
|
41616
41109
|
}, {
|
|
41617
41110
|
key: "getCurCatalogName",
|
|
41618
41111
|
value: function getCurCatalogName() {
|
|
41619
|
-
var _this$
|
|
41620
|
-
return (_this$
|
|
41112
|
+
var _this$actSet11;
|
|
41113
|
+
return (_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 ? void 0 : _this$actSet11.getCatalogName();
|
|
41621
41114
|
}
|
|
41622
41115
|
}, {
|
|
41623
41116
|
key: "getCurAccountName",
|
|
41624
41117
|
value: function getCurAccountName() {
|
|
41625
|
-
var _this$
|
|
41626
|
-
return (_this$
|
|
41118
|
+
var _this$actSet12;
|
|
41119
|
+
return (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.getAccountName();
|
|
41627
41120
|
}
|
|
41628
41121
|
}, {
|
|
41629
41122
|
key: "getCurSupplierGuid",
|
|
41630
41123
|
value: function getCurSupplierGuid() {
|
|
41631
|
-
var _this$
|
|
41632
|
-
return (_this$
|
|
41124
|
+
var _this$actSet13;
|
|
41125
|
+
return (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.getSupplierGuid();
|
|
41633
41126
|
}
|
|
41634
41127
|
}, {
|
|
41635
41128
|
key: "getCurSetPrice",
|
|
41636
41129
|
value: function getCurSetPrice() {
|
|
41637
|
-
var _this$actSet$getSetPr, _this$
|
|
41638
|
-
return (_this$actSet$getSetPr = (_this$
|
|
41130
|
+
var _this$actSet$getSetPr, _this$actSet14;
|
|
41131
|
+
return (_this$actSet$getSetPr = (_this$actSet14 = this.actSet()) === null || _this$actSet14 === void 0 ? void 0 : _this$actSet14.getSetPrice()) !== null && _this$actSet$getSetPr !== void 0 ? _this$actSet$getSetPr : 0;
|
|
41639
41132
|
}
|
|
41640
41133
|
}, {
|
|
41641
41134
|
key: "getCurImageMode",
|
|
41642
41135
|
value: function getCurImageMode() {
|
|
41643
|
-
var _this$
|
|
41644
|
-
return (_this$
|
|
41136
|
+
var _this$actSet15;
|
|
41137
|
+
return (_this$actSet15 = this.actSet()) !== null && _this$actSet15 !== void 0 && (_this$actSet15 = _this$actSet15.CatalogData) !== null && _this$actSet15 !== void 0 && _this$actSet15.has3dModels ? '3D' : '2D';
|
|
41645
41138
|
}
|
|
41646
41139
|
}, {
|
|
41647
41140
|
key: "getViewConfig",
|
|
@@ -41672,73 +41165,63 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41672
41165
|
}, {
|
|
41673
41166
|
key: "doShow3DDimensionLines",
|
|
41674
41167
|
value: function doShow3DDimensionLines() {
|
|
41675
|
-
var _this$
|
|
41676
|
-
return (_this$
|
|
41168
|
+
var _this$actSet16;
|
|
41169
|
+
return (_this$actSet16 = this.actSet()) === null || _this$actSet16 === void 0 || (_this$actSet16 = _this$actSet16.CatalogData) === null || _this$actSet16 === void 0 ? void 0 : _this$actSet16.doShow3DDimensionLines;
|
|
41677
41170
|
}
|
|
41678
41171
|
}, {
|
|
41679
41172
|
key: "hidePlannerUiIcons",
|
|
41680
41173
|
value: function hidePlannerUiIcons() {
|
|
41681
|
-
var _this$
|
|
41682
|
-
return (_this$
|
|
41174
|
+
var _this$actSet17;
|
|
41175
|
+
return (_this$actSet17 = this.actSet()) === null || _this$actSet17 === void 0 || (_this$actSet17 = _this$actSet17.CatalogData) === null || _this$actSet17 === void 0 ? void 0 : _this$actSet17.hidePlannerUiIcons;
|
|
41683
41176
|
}
|
|
41684
41177
|
}, {
|
|
41685
41178
|
key: "doShowPlannerReplaceMode",
|
|
41686
41179
|
value: function doShowPlannerReplaceMode() {
|
|
41687
|
-
var _this$
|
|
41688
|
-
var catalogData = (_this$
|
|
41180
|
+
var _this$actSet18, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
|
|
41181
|
+
var catalogData = (_this$actSet18 = this.actSet()) === null || _this$actSet18 === void 0 ? void 0 : _this$actSet18.CatalogData;
|
|
41689
41182
|
return (catalogData === null || catalogData === void 0 ? void 0 : catalogData.replaceModeActive) && ((_this$api$getViewConf2 = this.api.getViewConfig()) === null || _this$api$getViewConf2 === void 0 ? void 0 : _this$api$getViewConf2.showReplaceFunctionInPlanner) && Object.entries(catalogData.allCatalogPlannerArticles).length > 1 && Object.entries((_catalogData$PlannerP = (_catalogData$PlannerP2 = catalogData.PlannerPaletteViewInfo) === null || _catalogData$PlannerP2 === void 0 ? void 0 : _catalogData$PlannerP2.catalogPlannerArticles) !== null && _catalogData$PlannerP !== void 0 ? _catalogData$PlannerP : {}).length > 1;
|
|
41690
41183
|
}
|
|
41691
41184
|
}, {
|
|
41692
41185
|
key: "doPlannerReplaceAutoSwitch",
|
|
41693
41186
|
value: function doPlannerReplaceAutoSwitch() {
|
|
41694
|
-
var _this$
|
|
41695
|
-
var catalogData = (_this$
|
|
41187
|
+
var _this$actSet19, _this$api$getViewConf3;
|
|
41188
|
+
var catalogData = (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.CatalogData;
|
|
41696
41189
|
return (catalogData === null || catalogData === void 0 ? void 0 : catalogData.catalogPlannsCompletely) && this.doShowPlannerReplaceMode() && ((_this$api$getViewConf3 = this.api.getViewConfig()) === null || _this$api$getViewConf3 === void 0 ? void 0 : _this$api$getViewConf3.allowAutoSwitchInReplaceFunctionInPlanner);
|
|
41697
41190
|
}
|
|
41698
41191
|
}, {
|
|
41699
41192
|
key: "getHidePlanner",
|
|
41700
41193
|
value: function getHidePlanner() {
|
|
41701
|
-
var _this$
|
|
41702
|
-
return this.api.getHidePlanner() || !!((_this$
|
|
41194
|
+
var _this$actSet20;
|
|
41195
|
+
return this.api.getHidePlanner() || !!((_this$actSet20 = this.actSet()) !== null && _this$actSet20 !== void 0 && _this$actSet20.CatalogData.useBoxPlanner);
|
|
41703
41196
|
}
|
|
41704
41197
|
}, {
|
|
41705
41198
|
key: "getAllowRTV",
|
|
41706
41199
|
value: function getAllowRTV() {
|
|
41707
|
-
var _this$
|
|
41708
|
-
if ((_this$
|
|
41709
|
-
if (this.api.getDoShowRTV() && (_this$
|
|
41200
|
+
var _this$actSet21, _this$actSet22;
|
|
41201
|
+
if ((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.divaForceRTV) return true;
|
|
41202
|
+
if (this.api.getDoShowRTV() && (_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaArReady) return true;
|
|
41710
41203
|
return false;
|
|
41711
41204
|
}
|
|
41712
41205
|
}, {
|
|
41713
41206
|
key: "geAllowQRCodeAR",
|
|
41714
41207
|
value: function geAllowQRCodeAR() {
|
|
41715
|
-
var _this$
|
|
41716
|
-
if (this.api.getDoShowAR() && (_this$
|
|
41208
|
+
var _this$actSet23;
|
|
41209
|
+
if (this.api.getDoShowAR() && (_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaArReady) return true;
|
|
41717
41210
|
return false;
|
|
41718
41211
|
}
|
|
41719
41212
|
}, {
|
|
41720
41213
|
key: "getEnableUnityRtvKombi",
|
|
41721
41214
|
value: function getEnableUnityRtvKombi() {
|
|
41722
|
-
var _this$
|
|
41215
|
+
var _this$actSet24;
|
|
41723
41216
|
// if force rtv disable unity kombi - biohort
|
|
41724
|
-
if ((_this$
|
|
41217
|
+
if ((_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaForceRTV) return false;
|
|
41725
41218
|
return this.api.getEnableRTVUnityKombi();
|
|
41726
41219
|
}
|
|
41727
41220
|
}, {
|
|
41728
41221
|
key: "getShelfPlannerRTV",
|
|
41729
41222
|
value: function getShelfPlannerRTV() {
|
|
41730
|
-
var _this$
|
|
41731
|
-
return (_this$
|
|
41732
|
-
}
|
|
41733
|
-
}, {
|
|
41734
|
-
key: "getDiva3DSuppressCacheCreation",
|
|
41735
|
-
value: function getDiva3DSuppressCacheCreation() {
|
|
41736
|
-
return this.api.getDiva3DSuppressCacheCreation();
|
|
41737
|
-
}
|
|
41738
|
-
}, {
|
|
41739
|
-
key: "getDiva3dUseImageCache",
|
|
41740
|
-
value: function getDiva3dUseImageCache() {
|
|
41741
|
-
return this.api.getDiva3dUseImageCache();
|
|
41223
|
+
var _this$actSet25;
|
|
41224
|
+
return (_this$actSet25 = this.actSet()) === null || _this$actSet25 === void 0 ? void 0 : _this$actSet25.CatalogData.useShelfPlannerRTV;
|
|
41742
41225
|
}
|
|
41743
41226
|
}, {
|
|
41744
41227
|
key: "getBasketData",
|
|
@@ -41779,8 +41262,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41779
41262
|
}, {
|
|
41780
41263
|
key: "getCatalogData",
|
|
41781
41264
|
value: function getCatalogData() {
|
|
41782
|
-
var _this$
|
|
41783
|
-
return (_this$
|
|
41265
|
+
var _this$actSet26;
|
|
41266
|
+
return (_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.CatalogData;
|
|
41784
41267
|
}
|
|
41785
41268
|
}, {
|
|
41786
41269
|
key: "ReturnTo",
|
|
@@ -42061,11 +41544,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42061
41544
|
value: function registerGetCanvas2DAsJPG(getCanvas2DAsJPG) {
|
|
42062
41545
|
this.getCanvas2DAsJPG = getCanvas2DAsJPG;
|
|
42063
41546
|
}
|
|
42064
|
-
}, {
|
|
42065
|
-
key: "registerUpdateSirvViewer",
|
|
42066
|
-
value: function registerUpdateSirvViewer(updateSirvViewer) {
|
|
42067
|
-
this.updateSirvViewer = updateSirvViewer;
|
|
42068
|
-
}
|
|
42069
41547
|
}, {
|
|
42070
41548
|
key: "registerUpdatePlanner2DGrid",
|
|
42071
41549
|
value: function registerUpdatePlanner2DGrid(updatePlanner2DGrid) {
|
|
@@ -42533,7 +42011,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42533
42011
|
this.updatePlanner3DImage = undefined;
|
|
42534
42012
|
this.setRotationOrbitCube = undefined;
|
|
42535
42013
|
this.getCanvas2DAsJPG = undefined;
|
|
42536
|
-
this.updateSirvViewer = undefined;
|
|
42537
42014
|
this.updatePlannerMsgContainer = undefined;
|
|
42538
42015
|
this.updateFullscreenRendering = undefined;
|
|
42539
42016
|
this.updateSetImage = undefined;
|
|
@@ -42974,6 +42451,8 @@ var Grid = /*#__PURE__*/function () {
|
|
|
42974
42451
|
// E.g: "Grid Left" or "Grid Middle" or "Grid Right"
|
|
42975
42452
|
_defineProperty__default["default"](this, "gridName", void 0);
|
|
42976
42453
|
_defineProperty__default["default"](this, "maxAccessoireInGridCounter", void 0);
|
|
42454
|
+
//only one array of accessoires is plannable together in one grid. the accessoires of the mid array exclude each other. The outer array is for te usage of this rule in different usecases.
|
|
42455
|
+
_defineProperty__default["default"](this, "excludeAccessoiresByAccessoiresInGrid", void 0);
|
|
42977
42456
|
_defineProperty__default["default"](this, "influencedByNeighborGrids", void 0);
|
|
42978
42457
|
_defineProperty__default["default"](this, "influencedByOverlappingGrids", void 0);
|
|
42979
42458
|
var grid = data.ShelfPlanner[index];
|
|
@@ -42989,6 +42468,7 @@ var Grid = /*#__PURE__*/function () {
|
|
|
42989
42468
|
this.requiredWarning = grid.RequiredWarning;
|
|
42990
42469
|
this.gridName = grid.GridName;
|
|
42991
42470
|
this.maxAccessoireInGridCounter = grid.MaxAccessoireInGridCounter;
|
|
42471
|
+
this.excludeAccessoiresByAccessoiresInGrid = grid.ExcludeAccessoiresByAccessoiresInGrid;
|
|
42992
42472
|
this.influencedByNeighborGrids = grid.InfluencedByNeighborGrids;
|
|
42993
42473
|
this.influencedByOverlappingGrids = grid.InfluencedByOverlappingGrids;
|
|
42994
42474
|
this._group = grid.Group;
|
|
@@ -43001,8 +42481,9 @@ var Grid = /*#__PURE__*/function () {
|
|
|
43001
42481
|
for (var i = 0; i < this.heightGridCellCountOnRule.length; i++) {
|
|
43002
42482
|
var gridOnRule = this.heightGridCellCountOnRule[i];
|
|
43003
42483
|
if (this.article.evalRule(DivaUtils__default["default"].getRuleByFormula(gridOnRule.Rule))) {
|
|
43004
|
-
|
|
43005
|
-
|
|
42484
|
+
var _gridOnRule$HeightGri, _gridOnRule$ArticleRe;
|
|
42485
|
+
cellCount = (_gridOnRule$HeightGri = gridOnRule.HeightGridCellCount) !== null && _gridOnRule$HeightGri !== void 0 ? _gridOnRule$HeightGri : grid.HeightGridCellCount;
|
|
42486
|
+
this.articleRelations = (_gridOnRule$ArticleRe = gridOnRule.ArticleRelations) !== null && _gridOnRule$ArticleRe !== void 0 ? _gridOnRule$ArticleRe : grid.ArticleRelations;
|
|
43006
42487
|
if (gridOnRule.initAccArr) this.initAccArr = gridOnRule.initAccArr;
|
|
43007
42488
|
this.currentLoadedRuleIndex = i;
|
|
43008
42489
|
}
|
|
@@ -43674,7 +43155,7 @@ var Grid = /*#__PURE__*/function () {
|
|
|
43674
43155
|
key: "getFreeSpacesOfAccessoire",
|
|
43675
43156
|
value: function getFreeSpacesOfAccessoire(accessoire) {
|
|
43676
43157
|
var size = accessoire.shelfHeight;
|
|
43677
|
-
if (!size || this.disabledByRule || this.
|
|
43158
|
+
if (!size || this.disabledByRule || this.checkAccessoireInGridRules(accessoire)) return [];
|
|
43678
43159
|
var freeCells = [];
|
|
43679
43160
|
for (var i = 0; i < this.Cells.length; i++) {
|
|
43680
43161
|
var _cell$Article4;
|
|
@@ -43709,22 +43190,51 @@ var Grid = /*#__PURE__*/function () {
|
|
|
43709
43190
|
return _toConsumableArray__default["default"](new Set(freeCells));
|
|
43710
43191
|
}
|
|
43711
43192
|
}, {
|
|
43712
|
-
key: "
|
|
43713
|
-
value: function
|
|
43714
|
-
var _this$maxAccessoireIn;
|
|
43715
|
-
|
|
43716
|
-
|
|
43717
|
-
var
|
|
43718
|
-
|
|
43719
|
-
|
|
43720
|
-
|
|
43721
|
-
|
|
43722
|
-
var
|
|
43723
|
-
|
|
43724
|
-
|
|
43193
|
+
key: "checkAccessoireInGridRules",
|
|
43194
|
+
value: function checkAccessoireInGridRules(accessoire) {
|
|
43195
|
+
var _this$maxAccessoireIn, _this$excludeAccessoi;
|
|
43196
|
+
//max count in grid logic
|
|
43197
|
+
if ((_this$maxAccessoireIn = this.maxAccessoireInGridCounter) !== null && _this$maxAccessoireIn !== void 0 && _this$maxAccessoireIn.length) {
|
|
43198
|
+
for (var i = 0; i < this.maxAccessoireInGridCounter.length; i++) {
|
|
43199
|
+
var rule = this.maxAccessoireInGridCounter[i];
|
|
43200
|
+
var counter = 0;
|
|
43201
|
+
if (rule.accessoires.includes(accessoire.articleCodex)) {
|
|
43202
|
+
var currentAccessoires = Object.values(this.Accessoires);
|
|
43203
|
+
for (var j = 0; j < currentAccessoires.length; j++) {
|
|
43204
|
+
var curAcc = currentAccessoires[j];
|
|
43205
|
+
if (rule.accessoires.includes(curAcc.articleCodex)) {
|
|
43206
|
+
counter = counter + curAcc.quantity;
|
|
43207
|
+
}
|
|
43208
|
+
}
|
|
43209
|
+
if (counter >= rule.maxCount) return true;
|
|
43210
|
+
}
|
|
43211
|
+
}
|
|
43212
|
+
}
|
|
43213
|
+
|
|
43214
|
+
//accessories excluded eachother
|
|
43215
|
+
if ((_this$excludeAccessoi = this.excludeAccessoiresByAccessoiresInGrid) !== null && _this$excludeAccessoi !== void 0 && _this$excludeAccessoi.length) {
|
|
43216
|
+
var excludeAccessoiresGroup = this.excludeAccessoiresByAccessoiresInGrid;
|
|
43217
|
+
for (var _j2 = 0; _j2 < excludeAccessoiresGroup.length; _j2++) {
|
|
43218
|
+
var plannedAccessoireIndex = -1;
|
|
43219
|
+
var excludeAccessoires = excludeAccessoiresGroup[_j2];
|
|
43220
|
+
for (var _i16 = 0; _i16 < excludeAccessoires.length; _i16++) {
|
|
43221
|
+
var accessoireArray = excludeAccessoires[_i16];
|
|
43222
|
+
for (var basketId in this.Accessoires) {
|
|
43223
|
+
var palnnedAccessoire = this.Accessoires[basketId];
|
|
43224
|
+
if (accessoireArray.includes(palnnedAccessoire.articleCodex)) {
|
|
43225
|
+
plannedAccessoireIndex = _i16;
|
|
43226
|
+
break;
|
|
43227
|
+
}
|
|
43228
|
+
}
|
|
43229
|
+
if (plannedAccessoireIndex >= 0) break;
|
|
43230
|
+
}
|
|
43231
|
+
if (plannedAccessoireIndex >= 0) {
|
|
43232
|
+
for (var _i17 = 0; _i17 < excludeAccessoires.length; _i17++) {
|
|
43233
|
+
var _accessoireArray = excludeAccessoires[_i17];
|
|
43234
|
+
if (plannedAccessoireIndex == _i17) continue;
|
|
43235
|
+
if (_accessoireArray.includes(accessoire.articleCodex)) return true;
|
|
43725
43236
|
}
|
|
43726
43237
|
}
|
|
43727
|
-
if (counter >= rule.maxCount) return true;
|
|
43728
43238
|
}
|
|
43729
43239
|
}
|
|
43730
43240
|
return false;
|
|
@@ -43769,16 +43279,16 @@ var Grid = /*#__PURE__*/function () {
|
|
|
43769
43279
|
}
|
|
43770
43280
|
}
|
|
43771
43281
|
if ((_this$influencedByNei = this.influencedByNeighborGrids) !== null && _this$influencedByNei !== void 0 && _this$influencedByNei.length) {
|
|
43772
|
-
for (var
|
|
43282
|
+
for (var _i18 = 0; _i18 < this.influencedByNeighborGrids.length; _i18++) {
|
|
43773
43283
|
var _this$article$shelfPl2;
|
|
43774
|
-
var _influenced = this.influencedByNeighborGrids[
|
|
43284
|
+
var _influenced = this.influencedByNeighborGrids[_i18];
|
|
43775
43285
|
var neighborGrid = (_this$article$shelfPl2 = this.article.shelfPlanner) === null || _this$article$shelfPl2 === void 0 ? void 0 : _this$article$shelfPl2.getGridByGridName(_influenced.GridName);
|
|
43776
43286
|
var _ret = false;
|
|
43777
43287
|
if (!neighborGrid) continue;
|
|
43778
43288
|
if (neighborGrid.Direction === this.Direction) {
|
|
43779
|
-
for (var
|
|
43289
|
+
for (var _j3 = 0; _j3 < size; _j3++) {
|
|
43780
43290
|
var _cell$Article5;
|
|
43781
|
-
var cell = neighborGrid.cells[
|
|
43291
|
+
var cell = neighborGrid.cells[_j3 + index];
|
|
43782
43292
|
if ((cell === null || cell === void 0 ? void 0 : cell.InUse) !== -1 && ((_cell$Article5 = cell.Article) === null || _cell$Article5 === void 0 ? void 0 : _cell$Article5.basketId) !== accessoire.basketId) {
|
|
43783
43293
|
_ret = true;
|
|
43784
43294
|
}
|
|
@@ -43881,19 +43391,20 @@ var Grid = /*#__PURE__*/function () {
|
|
|
43881
43391
|
});
|
|
43882
43392
|
if (alternative) return alternative.ArticleRelations;
|
|
43883
43393
|
if (this.heightGridCellCountOnRule && this.currentLoadedRuleIndex !== false) {
|
|
43884
|
-
|
|
43394
|
+
var curGrid = this.heightGridCellCountOnRule[this.currentLoadedRuleIndex];
|
|
43395
|
+
if (curGrid.ArticleRelations) return curGrid.ArticleRelations;
|
|
43885
43396
|
}
|
|
43886
43397
|
return this.articleRelations;
|
|
43887
43398
|
}
|
|
43888
43399
|
}, {
|
|
43889
43400
|
key: "getGridIdByArticleCodex",
|
|
43890
43401
|
value: function getGridIdByArticleCodex(articleCodex) {
|
|
43891
|
-
var _this$ArticleRelation3;
|
|
43402
|
+
var _this$ArticleRelation3, _this$heightGridCellC;
|
|
43892
43403
|
var alternative = (_this$ArticleRelation3 = this.ArticleRelationsForOtherGroups) === null || _this$ArticleRelation3 === void 0 ? void 0 : _this$ArticleRelation3.find(function (g) {
|
|
43893
43404
|
return g.ArticleRelations.includes(articleCodex);
|
|
43894
43405
|
});
|
|
43895
43406
|
if (alternative) return alternative.Group;
|
|
43896
|
-
if (this.heightGridCellCountOnRule && this.currentLoadedRuleIndex !== false && this.heightGridCellCountOnRule[this.currentLoadedRuleIndex].ArticleRelations.includes(articleCodex)) {
|
|
43407
|
+
if (this.heightGridCellCountOnRule && this.currentLoadedRuleIndex !== false && (_this$heightGridCellC = this.heightGridCellCountOnRule[this.currentLoadedRuleIndex].ArticleRelations) !== null && _this$heightGridCellC !== void 0 && _this$heightGridCellC.includes(articleCodex)) {
|
|
43897
43408
|
return this.gridGroup;
|
|
43898
43409
|
}
|
|
43899
43410
|
if (this.articleRelations.includes(articleCodex)) {
|
|
@@ -59884,7 +59395,7 @@ var ProductHandler = /*#__PURE__*/function () {
|
|
|
59884
59395
|
*/
|
|
59885
59396
|
_defineProperty__default["default"](this, "loadProducts", /*#__PURE__*/function () {
|
|
59886
59397
|
var _ref4 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(_ref3) {
|
|
59887
|
-
var _productData$length, _basket$OrderSets, _baseProduct, _baseProduct2, _baseProduct3, _baseProduct4, _baseProduct5, _baseProduct6, _baseProduct7, _baseProduct8, _baseProduct9, _baseProduct10, _baseProduct11, _baseProduct$width, _baseProduct12, _basket$SetPlannerInf, _basket$OrderSets$0$B, _baseProduct$height, _baseProduct13, _basket$SetPlannerInf2, _basket$OrderSets$0$B2, _baseProduct$depth, _baseProduct14, _basket$SetPlannerInf3, _basket$OrderSets$0$B3, _basket$SetPlannerInf4, _basket$SetPlannerInf5, _baseProduct15, _baseProduct16, _baseProduct17
|
|
59398
|
+
var _productData$length, _basket$OrderSets, _baseProduct, _baseProduct2, _baseProduct3, _baseProduct4, _baseProduct5, _baseProduct6, _baseProduct7, _baseProduct8, _baseProduct9, _baseProduct10, _baseProduct11, _baseProduct$width, _baseProduct12, _basket$SetPlannerInf, _basket$OrderSets$0$B, _baseProduct$height, _baseProduct13, _basket$SetPlannerInf2, _basket$OrderSets$0$B2, _baseProduct$depth, _baseProduct14, _basket$SetPlannerInf3, _basket$OrderSets$0$B3, _basket$SetPlannerInf4, _basket$SetPlannerInf5, _baseProduct15, _baseProduct16, _baseProduct17;
|
|
59888
59399
|
var basket, catalogData, productData, classificationFields, products, baseProduct, variantProducts, isSet, dockingPoints, orderDescription, catalogDataName, catalogDataDescription, setName, _ProductHandler$calcu, shortDescription, shortDescriptionModified, _ProductHandler$calcu2, addedPrice, addedPriceModified, articles, baseData, classificationData, variantData, variantDataModified, addedProducts, removedProducts, optFields, initialSelectedFields, _basket$OrderSets$0$C2, usedConfigVariants, differingOPTs, _basket$OrderSets$0$C3, opts, i;
|
|
59889
59400
|
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
59890
59401
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -59996,10 +59507,9 @@ var ProductHandler = /*#__PURE__*/function () {
|
|
|
59996
59507
|
mainCategory: _this.mainCategory,
|
|
59997
59508
|
subCategory: _this.subCategory,
|
|
59998
59509
|
retailerArticleNr: (_baseProduct15 = baseProduct) === null || _baseProduct15 === void 0 ? void 0 : _baseProduct15.retailerArticleNr,
|
|
59999
|
-
available: ((_baseProduct16 = baseProduct) === null || _baseProduct16 === void 0 ? void 0 : _baseProduct16.available) != undefined ? baseProduct.available : false,
|
|
60000
59510
|
dockingPoints: dockingPoints,
|
|
60001
|
-
media: (
|
|
60002
|
-
affiliate: (
|
|
59511
|
+
media: (_baseProduct16 = baseProduct) === null || _baseProduct16 === void 0 ? void 0 : _baseProduct16.media,
|
|
59512
|
+
affiliate: (_baseProduct17 = baseProduct) === null || _baseProduct17 === void 0 ? void 0 : _baseProduct17.affiliate
|
|
60003
59513
|
}; //get classification data and remove field prefix
|
|
60004
59514
|
classificationData = _this.parseClassificationFields(baseProduct, true); // init Variants
|
|
60005
59515
|
variantData = [];
|
|
@@ -60481,11 +59991,6 @@ _defineProperty__default["default"](ProductHandler, "baseDataFields", [{
|
|
|
60481
59991
|
type: 'text',
|
|
60482
59992
|
title: 'productcreator.fields.technicalDescription',
|
|
60483
59993
|
fieldType: 'BASE'
|
|
60484
|
-
}, {
|
|
60485
|
-
field: 'available',
|
|
60486
|
-
type: 'boolean',
|
|
60487
|
-
title: 'productcreator.fields.available',
|
|
60488
|
-
fieldType: 'BASE'
|
|
60489
59994
|
}, {
|
|
60490
59995
|
field: 'calculatedPrice',
|
|
60491
59996
|
type: 'price',
|