@crystaldesign/web-planner-logic 24.10.0-beta.10 → 24.10.0-beta.12
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-d100fdb8.js → DivaBoxPlanner-26e0cace.js} +16 -18
- package/build/cjs/{DivaStandardPlanner-3ead2b7c.js → DivaStandardPlanner-25919135.js} +26 -30
- package/build/cjs/{DoorPlanner-96be0550.js → DoorPlanner-704880a1.js} +1 -1
- package/build/cjs/{Host3DSignalR-e4ca360e.js → Host3DSignalR-59436bad.js} +1 -6
- package/build/cjs/{LiviqueWWSHandler-735014f7.js → LiviqueWWSHandler-495734b8.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-224c584c.js → PfisterWWSHandler-73a6a1bb.js} +1 -1
- package/build/cjs/{PlannerHandler2D-01fb3b8e.js → PlannerHandler2D-c9952024.js} +1249 -10
- package/build/cjs/{ProductBasketHandler-034a3339.js → ProductBasketHandler-fca32045.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-3f4b1594.js → SeriousBasketHandler-4254c183.js} +1 -1
- package/build/cjs/{ShelfPlanner-402344f9.js → ShelfPlanner-0329c88f.js} +1 -1
- package/build/cjs/{StandardWWSHandler-b61cae22.js → StandardWWSHandler-785777e5.js} +1 -1
- package/build/cjs/{index-0fbd8bd2.js → index-7cfee1da.js} +975 -1565
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-19c913f4.js → DivaBoxPlanner-c20559ca.js} +5 -7
- package/build/esm/{DivaStandardPlanner-f8d55f53.js → DivaStandardPlanner-af73d121.js} +5 -9
- package/build/esm/{DoorPlanner-8e9ebc6a.js → DoorPlanner-f3376859.js} +1 -1
- package/build/esm/{Host3DSignalR-9c502b78.js → Host3DSignalR-ae25b944.js} +1 -6
- package/build/esm/{LiviqueWWSHandler-817f6954.js → LiviqueWWSHandler-bba79129.js} +1 -1
- package/build/esm/{PfisterWWSHandler-f3758c94.js → PfisterWWSHandler-1e137ace.js} +1 -1
- package/build/esm/{PlannerHandler2D-0d5bb96d.js → PlannerHandler2D-0f71e44e.js} +1245 -8
- package/build/esm/{ProductBasketHandler-9e2c5c1a.js → ProductBasketHandler-68455ac4.js} +1 -1
- package/build/esm/{SeriousBasketHandler-9a45b419.js → SeriousBasketHandler-cdc26222.js} +1 -1
- package/build/esm/{ShelfPlanner-4c376e6b.js → ShelfPlanner-84b8de24.js} +1 -1
- package/build/esm/{StandardWWSHandler-0dc1e038.js → StandardWWSHandler-5b7ca10e.js} +1 -1
- package/build/esm/{index-fe659872.js → index-f1fb4728.js} +975 -1565
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/interface/API/TemplateConfigType.d.ts +6 -6
- 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 +0 -4
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.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/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/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 +1 -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/DivaApiHandler.d.ts +0 -3
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +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/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/test/datas/environments/testing/pfister-dev.d.ts.map +1 -1
- package/package.json +2 -2
- package/build/cjs/DivaSingleProductPlanner-a308bc4c.js +0 -1169
- package/build/cjs/DockingPointHandler-26105372.js +0 -1255
- package/build/esm/DivaSingleProductPlanner-355443b6.js +0 -1158
- package/build/esm/DockingPointHandler-072c0cdc.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
|
@@ -26,8 +26,8 @@ import _typeof from '@babel/runtime/helpers/typeof';
|
|
|
26
26
|
})();
|
|
27
27
|
|
|
28
28
|
var _excluded = ["type"];
|
|
29
|
-
function ownKeys$
|
|
30
|
-
function _objectSpread$
|
|
29
|
+
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; }
|
|
30
|
+
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(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; }
|
|
31
31
|
var LOG$g = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
32
32
|
var JsonDataCache = /*#__PURE__*/function () {
|
|
33
33
|
function JsonDataCache() {
|
|
@@ -233,8 +233,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
233
233
|
if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig2 = this.apiConfig) !== null && _this$apiConfig2 !== void 0 && _this$apiConfig2.api2.web) {
|
|
234
234
|
api2Url = this.apiConfig.api2.web;
|
|
235
235
|
}
|
|
236
|
-
_context2.t0 = _objectSpread$
|
|
237
|
-
_context2.t1 = _objectSpread$
|
|
236
|
+
_context2.t0 = _objectSpread$e;
|
|
237
|
+
_context2.t1 = _objectSpread$e({}, init.config.headers);
|
|
238
238
|
_context2.t2 = {};
|
|
239
239
|
_context2.next = 20;
|
|
240
240
|
return this.getSessionGuid('V', undefined, this.OrganizationId, api2Url);
|
|
@@ -264,7 +264,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
264
264
|
key: "getDataCache",
|
|
265
265
|
value: function () {
|
|
266
266
|
var _getDataCache = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(queryString, cacheMD5, accountSessionGuid, useWebServiceApi, method, data) {
|
|
267
|
-
var myQS, url, init, addSession,
|
|
267
|
+
var myQS, url, init, addSession, _this$apiConfig3, _this$apiConfig4, api2Url, result;
|
|
268
268
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
269
269
|
while (1) switch (_context3.prev = _context3.next) {
|
|
270
270
|
case 0:
|
|
@@ -277,7 +277,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
277
277
|
};
|
|
278
278
|
addSession = true;
|
|
279
279
|
if (!(this.jsonDataCache.get(myQS) || cacheMD5 && this.jsonDataCache.get(cacheMD5))) {
|
|
280
|
-
_context3.next =
|
|
280
|
+
_context3.next = 9;
|
|
281
281
|
break;
|
|
282
282
|
}
|
|
283
283
|
LOG$g.debug('getDataFromInternalCache: ' + queryString);
|
|
@@ -288,77 +288,68 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
288
288
|
return _context3.abrupt("return", this.jsonDataCache.get(myQS));
|
|
289
289
|
case 8:
|
|
290
290
|
return _context3.abrupt("return", this.jsonDataCache.get(cacheMD5));
|
|
291
|
-
case
|
|
292
|
-
if (cacheMD5) {
|
|
293
|
-
cacheUrl = DivaUtils.getCacheData(cacheMD5, queryString);
|
|
294
|
-
if (cacheUrl) {
|
|
295
|
-
LOG$g.debug('getDataFromCDNCache: ' + queryString);
|
|
296
|
-
url = cacheUrl;
|
|
297
|
-
addSession = false;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
case 12:
|
|
291
|
+
case 9:
|
|
301
292
|
if (!addSession) {
|
|
302
|
-
_context3.next =
|
|
293
|
+
_context3.next = 31;
|
|
303
294
|
break;
|
|
304
295
|
}
|
|
305
296
|
if (!useWebServiceApi) {
|
|
306
|
-
_context3.next =
|
|
297
|
+
_context3.next = 22;
|
|
307
298
|
break;
|
|
308
299
|
}
|
|
309
300
|
if (!this.jwt) {
|
|
310
|
-
_context3.next =
|
|
301
|
+
_context3.next = 15;
|
|
311
302
|
break;
|
|
312
303
|
}
|
|
313
304
|
init.config.headers = {
|
|
314
305
|
Authorization: 'Bearer ' + this.jwt
|
|
315
306
|
};
|
|
316
|
-
_context3.next =
|
|
307
|
+
_context3.next = 20;
|
|
317
308
|
break;
|
|
318
|
-
case
|
|
309
|
+
case 15:
|
|
319
310
|
if (!this.apiKey) {
|
|
320
|
-
_context3.next =
|
|
311
|
+
_context3.next = 19;
|
|
321
312
|
break;
|
|
322
313
|
}
|
|
323
314
|
init.config.headers = {
|
|
324
315
|
'X-API-KEY': this.apiKey
|
|
325
316
|
};
|
|
326
|
-
_context3.next =
|
|
317
|
+
_context3.next = 20;
|
|
327
318
|
break;
|
|
328
|
-
case
|
|
319
|
+
case 19:
|
|
329
320
|
throw new Error('not jwt or API Key Found');
|
|
330
|
-
case
|
|
331
|
-
_context3.next =
|
|
321
|
+
case 20:
|
|
322
|
+
_context3.next = 31;
|
|
332
323
|
break;
|
|
333
|
-
case
|
|
324
|
+
case 22:
|
|
334
325
|
api2Url = (_this$apiConfig3 = this.apiConfig) === null || _this$apiConfig3 === void 0 ? void 0 : _this$apiConfig3.api2["default"];
|
|
335
326
|
if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig4 = this.apiConfig) !== null && _this$apiConfig4 !== void 0 && _this$apiConfig4.api2.web) {
|
|
336
327
|
api2Url = this.apiConfig.api2.web;
|
|
337
328
|
}
|
|
338
329
|
_context3.t0 = accountSessionGuid;
|
|
339
330
|
if (_context3.t0) {
|
|
340
|
-
_context3.next =
|
|
331
|
+
_context3.next = 29;
|
|
341
332
|
break;
|
|
342
333
|
}
|
|
343
|
-
_context3.next =
|
|
334
|
+
_context3.next = 28;
|
|
344
335
|
return this.getSessionGuid('V', undefined, this.OrganizationId, api2Url);
|
|
345
|
-
case
|
|
336
|
+
case 28:
|
|
346
337
|
_context3.t0 = _context3.sent;
|
|
347
|
-
case
|
|
338
|
+
case 29:
|
|
348
339
|
_context3.t1 = _context3.t0;
|
|
349
340
|
init.config.headers = {
|
|
350
341
|
sessionGuid: _context3.t1
|
|
351
342
|
};
|
|
352
|
-
case
|
|
353
|
-
_context3.next =
|
|
343
|
+
case 31:
|
|
344
|
+
_context3.next = 33;
|
|
354
345
|
return this.fetchData(url, init);
|
|
355
|
-
case
|
|
346
|
+
case 33:
|
|
356
347
|
result = _context3.sent;
|
|
357
348
|
this.jsonDataCache.set(myQS, result);
|
|
358
349
|
if (cacheMD5) this.jsonDataCache.set(cacheMD5, result);
|
|
359
350
|
LOG$g.debug('getDataFromApi: ' + queryString);
|
|
360
351
|
return _context3.abrupt("return", result);
|
|
361
|
-
case
|
|
352
|
+
case 38:
|
|
362
353
|
case "end":
|
|
363
354
|
return _context3.stop();
|
|
364
355
|
}
|
|
@@ -421,9 +412,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
421
412
|
diva3dServerMode: data.diva3dServerMode != undefined ? data.diva3dServerMode : 'SignalR',
|
|
422
413
|
diva3dRenderGroup: data.diva3dRenderGroup != undefined ? data.diva3dRenderGroup : 'MYCC7',
|
|
423
414
|
mediaServiceApiKey: data.divaMediaServiceApiKey,
|
|
424
|
-
diva3dUseImageCache: data.diva3dUseImageCache != undefined ? data.diva3dUseImageCache : false,
|
|
425
|
-
diva3dSuppressCacheCreation: data.diva3dSuppressCacheCreation != undefined ? data.diva3dSuppressCacheCreation : false,
|
|
426
|
-
diva3dUseSirvViewer: data.diva3dUseSirvViewer != undefined ? data.diva3dUseSirvViewer : false,
|
|
427
415
|
language: lang !== null && lang !== void 0 ? lang : this.getLanguage(),
|
|
428
416
|
abTestCases: data.abTestCases !== undefined ? data.abTestCases : [],
|
|
429
417
|
checkForProductsInStock: data.checkForProductsInStock,
|
|
@@ -542,24 +530,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
542
530
|
var _this$divaWebConfigDa8, _this$divaWebConfigDa9;
|
|
543
531
|
return (_this$divaWebConfigDa8 = (_this$divaWebConfigDa9 = this.divaWebConfigData) === null || _this$divaWebConfigDa9 === void 0 ? void 0 : _this$divaWebConfigDa9.diva3dRenderGroup) !== null && _this$divaWebConfigDa8 !== void 0 ? _this$divaWebConfigDa8 : '';
|
|
544
532
|
}
|
|
545
|
-
}, {
|
|
546
|
-
key: "getDiva3dUseImageCache",
|
|
547
|
-
value: function getDiva3dUseImageCache() {
|
|
548
|
-
var _this$divaWebConfigDa10;
|
|
549
|
-
return !!((_this$divaWebConfigDa10 = this.divaWebConfigData) !== null && _this$divaWebConfigDa10 !== void 0 && _this$divaWebConfigDa10.diva3dUseImageCache);
|
|
550
|
-
}
|
|
551
|
-
}, {
|
|
552
|
-
key: "getDiva3DSuppressCacheCreation",
|
|
553
|
-
value: function getDiva3DSuppressCacheCreation() {
|
|
554
|
-
var _this$divaWebConfigDa11;
|
|
555
|
-
return !!((_this$divaWebConfigDa11 = this.divaWebConfigData) !== null && _this$divaWebConfigDa11 !== void 0 && _this$divaWebConfigDa11.diva3dSuppressCacheCreation);
|
|
556
|
-
}
|
|
557
|
-
}, {
|
|
558
|
-
key: "getDiva3dUseSirvViewer",
|
|
559
|
-
value: function getDiva3dUseSirvViewer() {
|
|
560
|
-
var _this$divaWebConfigDa12;
|
|
561
|
-
return !!((_this$divaWebConfigDa12 = this.divaWebConfigData) !== null && _this$divaWebConfigDa12 !== void 0 && _this$divaWebConfigDa12.diva3dUseSirvViewer);
|
|
562
|
-
}
|
|
563
533
|
}, {
|
|
564
534
|
key: "getServerId",
|
|
565
535
|
value: function getServerId() {
|
|
@@ -595,80 +565,80 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
595
565
|
}, {
|
|
596
566
|
key: "getDiva3dStaticBGImage",
|
|
597
567
|
value: function getDiva3dStaticBGImage() {
|
|
598
|
-
var _this$
|
|
599
|
-
return (_this$
|
|
568
|
+
var _this$divaWebConfigDa10;
|
|
569
|
+
return (_this$divaWebConfigDa10 = this.divaWebConfigData) === null || _this$divaWebConfigDa10 === void 0 ? void 0 : _this$divaWebConfigDa10.diva3dStaticBGImage;
|
|
600
570
|
}
|
|
601
571
|
}, {
|
|
602
572
|
key: "getDiva3dStaticBGImage_DefaultRoomList",
|
|
603
573
|
value: function getDiva3dStaticBGImage_DefaultRoomList() {
|
|
604
|
-
var _this$
|
|
605
|
-
return ((_this$
|
|
574
|
+
var _this$divaWebConfigDa11, _this$divaWebConfigDa12;
|
|
575
|
+
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;
|
|
606
576
|
}
|
|
607
577
|
}, {
|
|
608
578
|
key: "getDiva3DAllowDefaultCatRoomList",
|
|
609
579
|
value: function getDiva3DAllowDefaultCatRoomList() {
|
|
610
|
-
var _this$
|
|
611
|
-
return (_this$
|
|
580
|
+
var _this$divaWebConfigDa13;
|
|
581
|
+
return (_this$divaWebConfigDa13 = this.divaWebConfigData) === null || _this$divaWebConfigDa13 === void 0 ? void 0 : _this$divaWebConfigDa13.diva3DAllowDefaultCatRoomList;
|
|
612
582
|
}
|
|
613
583
|
}, {
|
|
614
584
|
key: "doAllowSetPlanner",
|
|
615
585
|
value: function doAllowSetPlanner() {
|
|
616
|
-
var _this$
|
|
617
|
-
return (_this$
|
|
586
|
+
var _this$divaWebConfigDa14;
|
|
587
|
+
return (_this$divaWebConfigDa14 = this.divaWebConfigData) === null || _this$divaWebConfigDa14 === void 0 ? void 0 : _this$divaWebConfigDa14.doAllowSetPlanner;
|
|
618
588
|
}
|
|
619
589
|
}, {
|
|
620
590
|
key: "getHidePlanner",
|
|
621
591
|
value: function getHidePlanner() {
|
|
622
|
-
var _this$
|
|
623
|
-
return !!((_this$
|
|
592
|
+
var _this$divaWebConfigDa15;
|
|
593
|
+
return !!((_this$divaWebConfigDa15 = this.divaWebConfigData) !== null && _this$divaWebConfigDa15 !== void 0 && (_this$divaWebConfigDa15 = _this$divaWebConfigDa15.viewConfig) !== null && _this$divaWebConfigDa15 !== void 0 && _this$divaWebConfigDa15.hidePlanner);
|
|
624
594
|
}
|
|
625
595
|
}, {
|
|
626
596
|
key: "getDoShowAR",
|
|
627
597
|
value: function getDoShowAR() {
|
|
628
|
-
var _this$
|
|
629
|
-
return (_this$
|
|
598
|
+
var _this$divaWebConfigDa16;
|
|
599
|
+
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;
|
|
630
600
|
}
|
|
631
601
|
}, {
|
|
632
602
|
key: "getDoShowRTV",
|
|
633
603
|
value: function getDoShowRTV() {
|
|
634
|
-
var _this$
|
|
635
|
-
return (_this$
|
|
604
|
+
var _this$divaWebConfigDa17;
|
|
605
|
+
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;
|
|
636
606
|
}
|
|
637
607
|
}, {
|
|
638
608
|
key: "getEnableRTVUnityKombi",
|
|
639
609
|
value: function getEnableRTVUnityKombi() {
|
|
640
|
-
var _this$
|
|
641
|
-
return !!((_this$
|
|
610
|
+
var _this$divaWebConfigDa18;
|
|
611
|
+
return !!((_this$divaWebConfigDa18 = this.divaWebConfigData) !== null && _this$divaWebConfigDa18 !== void 0 && _this$divaWebConfigDa18.viewConfig.enableRtvUnityKombi);
|
|
642
612
|
}
|
|
643
613
|
}, {
|
|
644
614
|
key: "getDoDisablePlanner2D",
|
|
645
615
|
value: function getDoDisablePlanner2D() {
|
|
646
|
-
var _this$
|
|
647
|
-
return !!((_this$
|
|
616
|
+
var _this$divaWebConfigDa19;
|
|
617
|
+
return !!((_this$divaWebConfigDa19 = this.divaWebConfigData) !== null && _this$divaWebConfigDa19 !== void 0 && _this$divaWebConfigDa19.doDisablePlanner2D);
|
|
648
618
|
}
|
|
649
619
|
}, {
|
|
650
620
|
key: "getRoomListInProduct",
|
|
651
621
|
value: function getRoomListInProduct() {
|
|
652
|
-
var _this$
|
|
653
|
-
return !!((_this$
|
|
622
|
+
var _this$divaWebConfigDa20;
|
|
623
|
+
return !!((_this$divaWebConfigDa20 = this.divaWebConfigData) !== null && _this$divaWebConfigDa20 !== void 0 && (_this$divaWebConfigDa20 = _this$divaWebConfigDa20.viewConfig) !== null && _this$divaWebConfigDa20 !== void 0 && _this$divaWebConfigDa20.roomListInProduct);
|
|
654
624
|
}
|
|
655
625
|
}, {
|
|
656
626
|
key: "getPlannerType",
|
|
657
627
|
value: function getPlannerType() {
|
|
658
|
-
var _this$
|
|
659
|
-
return (_this$
|
|
628
|
+
var _this$divaWebConfigDa21;
|
|
629
|
+
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;
|
|
660
630
|
}
|
|
661
631
|
}, {
|
|
662
632
|
key: "getLoadSupplierColors",
|
|
663
633
|
value: function getLoadSupplierColors() {
|
|
664
|
-
var _this$
|
|
665
|
-
return !!((_this$
|
|
634
|
+
var _this$divaWebConfigDa22;
|
|
635
|
+
return !!((_this$divaWebConfigDa22 = this.divaWebConfigData) !== null && _this$divaWebConfigDa22 !== void 0 && _this$divaWebConfigDa22.loadSupplierColors);
|
|
666
636
|
}
|
|
667
637
|
}, {
|
|
668
638
|
key: "showSelectionModeZero",
|
|
669
639
|
value: function showSelectionModeZero() {
|
|
670
|
-
var _this$
|
|
671
|
-
return !!((_this$
|
|
640
|
+
var _this$divaWebConfigDa23;
|
|
641
|
+
return !!((_this$divaWebConfigDa23 = this.divaWebConfigData) !== null && _this$divaWebConfigDa23 !== void 0 && _this$divaWebConfigDa23.showSelectionModeZero);
|
|
672
642
|
}
|
|
673
643
|
}, {
|
|
674
644
|
key: "ruleDescSeperator",
|
|
@@ -688,8 +658,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
688
658
|
}, {
|
|
689
659
|
key: "getDoCheckVariantData",
|
|
690
660
|
value: function getDoCheckVariantData() {
|
|
691
|
-
var _this$
|
|
692
|
-
return (_this$
|
|
661
|
+
var _this$divaWebConfigDa24;
|
|
662
|
+
return (_this$divaWebConfigDa24 = this.divaWebConfigData) === null || _this$divaWebConfigDa24 === void 0 ? void 0 : _this$divaWebConfigDa24.doCheckVariantData;
|
|
693
663
|
}
|
|
694
664
|
}, {
|
|
695
665
|
key: "setI18n",
|
|
@@ -782,50 +752,50 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
782
752
|
}, {
|
|
783
753
|
key: "getViewConfig",
|
|
784
754
|
value: function getViewConfig() {
|
|
785
|
-
var _this$
|
|
786
|
-
return (_this$
|
|
755
|
+
var _this$divaWebConfigDa25;
|
|
756
|
+
return (_this$divaWebConfigDa25 = this.divaWebConfigData) === null || _this$divaWebConfigDa25 === void 0 ? void 0 : _this$divaWebConfigDa25.viewConfig;
|
|
787
757
|
}
|
|
788
758
|
}, {
|
|
789
759
|
key: "getEmailConfig",
|
|
790
760
|
value: function getEmailConfig() {
|
|
791
|
-
var _this$
|
|
792
|
-
return (_this$
|
|
761
|
+
var _this$divaWebConfigDa26;
|
|
762
|
+
return (_this$divaWebConfigDa26 = this.divaWebConfigData) === null || _this$divaWebConfigDa26 === void 0 ? void 0 : _this$divaWebConfigDa26.emailConfig;
|
|
793
763
|
}
|
|
794
764
|
}, {
|
|
795
765
|
key: "getABTestCases",
|
|
796
766
|
value: function getABTestCases() {
|
|
797
|
-
var _this$
|
|
798
|
-
return (_this$
|
|
767
|
+
var _this$divaWebConfigDa27, _this$divaWebConfigDa28;
|
|
768
|
+
return (_this$divaWebConfigDa27 = (_this$divaWebConfigDa28 = this.divaWebConfigData) === null || _this$divaWebConfigDa28 === void 0 ? void 0 : _this$divaWebConfigDa28.abTestCases) !== null && _this$divaWebConfigDa27 !== void 0 ? _this$divaWebConfigDa27 : [];
|
|
799
769
|
}
|
|
800
770
|
}, {
|
|
801
771
|
key: "getBarrierConfig",
|
|
802
772
|
value: function getBarrierConfig() {
|
|
803
|
-
var _this$
|
|
804
|
-
return (_this$
|
|
773
|
+
var _this$divaWebConfigDa29;
|
|
774
|
+
return (_this$divaWebConfigDa29 = this.divaWebConfigData) === null || _this$divaWebConfigDa29 === void 0 ? void 0 : _this$divaWebConfigDa29.barrierConfig;
|
|
805
775
|
}
|
|
806
776
|
}, {
|
|
807
777
|
key: "getTemplateConfig",
|
|
808
778
|
value: function getTemplateConfig() {
|
|
809
|
-
var _this$
|
|
810
|
-
return (_this$
|
|
779
|
+
var _this$divaWebConfigDa30;
|
|
780
|
+
return (_this$divaWebConfigDa30 = this.divaWebConfigData) === null || _this$divaWebConfigDa30 === void 0 ? void 0 : _this$divaWebConfigDa30.templateConfig;
|
|
811
781
|
}
|
|
812
782
|
}, {
|
|
813
783
|
key: "showDivaNr",
|
|
814
784
|
value: function showDivaNr() {
|
|
815
|
-
var _this$
|
|
816
|
-
return (_this$
|
|
785
|
+
var _this$divaWebConfigDa31;
|
|
786
|
+
return (_this$divaWebConfigDa31 = this.divaWebConfigData) === null || _this$divaWebConfigDa31 === void 0 ? void 0 : _this$divaWebConfigDa31.showDivaNr;
|
|
817
787
|
}
|
|
818
788
|
}, {
|
|
819
789
|
key: "onErrorHandling",
|
|
820
790
|
value: function onErrorHandling() {
|
|
821
|
-
var _this$
|
|
822
|
-
return (_this$
|
|
791
|
+
var _this$divaWebConfigDa32;
|
|
792
|
+
return (_this$divaWebConfigDa32 = this.divaWebConfigData) === null || _this$divaWebConfigDa32 === void 0 ? void 0 : _this$divaWebConfigDa32.onErrorHandling;
|
|
823
793
|
}
|
|
824
794
|
}, {
|
|
825
795
|
key: "diva3DRenderingDefault",
|
|
826
796
|
value: function diva3DRenderingDefault() {
|
|
827
|
-
var _this$
|
|
828
|
-
return (_this$
|
|
797
|
+
var _this$divaWebConfigDa33;
|
|
798
|
+
return (_this$divaWebConfigDa33 = this.divaWebConfigData) === null || _this$divaWebConfigDa33 === void 0 ? void 0 : _this$divaWebConfigDa33.diva3DRenderingDefault;
|
|
829
799
|
}
|
|
830
800
|
}, {
|
|
831
801
|
key: "getJwt",
|
|
@@ -840,8 +810,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
840
810
|
}, {
|
|
841
811
|
key: "getUseMask",
|
|
842
812
|
value: function getUseMask() {
|
|
843
|
-
var _this$
|
|
844
|
-
return (_this$
|
|
813
|
+
var _this$divaWebConfigDa34;
|
|
814
|
+
return (_this$divaWebConfigDa34 = this.divaWebConfigData) === null || _this$divaWebConfigDa34 === void 0 ? void 0 : _this$divaWebConfigDa34.useMask;
|
|
845
815
|
}
|
|
846
816
|
}, {
|
|
847
817
|
key: "apiUrl",
|
|
@@ -1133,12 +1103,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1133
1103
|
value: function getImageURL(image, mediaURL) {
|
|
1134
1104
|
var ret = '';
|
|
1135
1105
|
if (image != '' && image != null) {
|
|
1136
|
-
if (DivaUtils.CacheIsEnabled) {
|
|
1137
|
-
ret = DivaUtils.getCacheData(image.toUpperCase(), '');
|
|
1138
|
-
if (ret) {
|
|
1139
|
-
return ret;
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
1142
1106
|
var header = image.substring(0, 4).toLowerCase();
|
|
1143
1107
|
if (header == 'http' || header == 'data') {
|
|
1144
1108
|
ret = image;
|
|
@@ -1379,8 +1343,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1379
1343
|
}, {
|
|
1380
1344
|
key: "dontLoadAdditionalModelInfos",
|
|
1381
1345
|
get: function get() {
|
|
1382
|
-
var _this$
|
|
1383
|
-
return (_this$
|
|
1346
|
+
var _this$divaWebConfigDa35;
|
|
1347
|
+
return (_this$divaWebConfigDa35 = this.divaWebConfigData) === null || _this$divaWebConfigDa35 === void 0 ? void 0 : _this$divaWebConfigDa35.dontLoadAdditionalModelInfos;
|
|
1384
1348
|
}
|
|
1385
1349
|
}, {
|
|
1386
1350
|
key: "OrganizationId",
|
|
@@ -1691,7 +1655,6 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
|
|
|
1691
1655
|
catalogOPV: catalogOPV,
|
|
1692
1656
|
pac: jsonOPV.PAC,
|
|
1693
1657
|
pgr: jsonOPV.PGR,
|
|
1694
|
-
isRendered: jsonOPV.IsRendered != undefined ? jsonOPV.IsRendered : true,
|
|
1695
1658
|
subArticleCodex: jsonOPV.SubArticleCodex && jsonOPV.SubArticleCodex != '' ? jsonOPV.SubArticleCodex : undefined,
|
|
1696
1659
|
subArticleTypeNr: jsonOPV.SubArticleTypeNr && jsonOPV.SubArticleTypeNr != '' ? jsonOPV.SubArticleTypeNr : undefined,
|
|
1697
1660
|
subRetailArticleNr: jsonOPV.SubRetailArticleNr && jsonOPV.SubRetailArticleNr != '' ? jsonOPV.SubRetailArticleNr : undefined,
|
|
@@ -2028,11 +1991,6 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
|
|
|
2028
1991
|
get: function get() {
|
|
2029
1992
|
return this.opv.catalogOPV.value;
|
|
2030
1993
|
}
|
|
2031
|
-
}, {
|
|
2032
|
-
key: "isDigitalized",
|
|
2033
|
-
get: function get() {
|
|
2034
|
-
return this.opv.isRendered;
|
|
2035
|
-
}
|
|
2036
1994
|
}, {
|
|
2037
1995
|
key: "metaData",
|
|
2038
1996
|
get: function get() {
|
|
@@ -20242,12 +20200,6 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
20242
20200
|
set: function set(val) {
|
|
20243
20201
|
this.articleOptionState.freeTextLang = val;
|
|
20244
20202
|
}
|
|
20245
|
-
}, {
|
|
20246
|
-
key: "isNotVisualized",
|
|
20247
|
-
get: function get() {
|
|
20248
|
-
var _this$val20;
|
|
20249
|
-
return ((_this$val20 = this.val) === null || _this$val20 === void 0 ? void 0 : _this$val20.isDigitalized) == false && this.val.isTexture;
|
|
20250
|
-
}
|
|
20251
20203
|
}, {
|
|
20252
20204
|
key: "onlyVisibleIfNotUndock",
|
|
20253
20205
|
get: function get() {
|
|
@@ -20275,8 +20227,8 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
20275
20227
|
}, {
|
|
20276
20228
|
key: "warning",
|
|
20277
20229
|
get: function get() {
|
|
20278
|
-
var _this$
|
|
20279
|
-
if ((_this$
|
|
20230
|
+
var _this$val20;
|
|
20231
|
+
if ((_this$val20 = this.val) !== null && _this$val20 !== void 0 && _this$val20.isFreeText) {
|
|
20280
20232
|
if (this.val.measureMaximum && Number(this.freeText) > Number(this.val.measureMaximum) || this.val.measureMinimum && Number(this.freeText) < Number(this.val.measureMinimum)) {
|
|
20281
20233
|
return 'measureWarning';
|
|
20282
20234
|
}
|
|
@@ -20374,8 +20326,8 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
20374
20326
|
}]);
|
|
20375
20327
|
}();
|
|
20376
20328
|
|
|
20377
|
-
function ownKeys$
|
|
20378
|
-
function _objectSpread$
|
|
20329
|
+
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; }
|
|
20330
|
+
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(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; }
|
|
20379
20331
|
var LOG$c = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
20380
20332
|
var DivaArticle = /*#__PURE__*/function () {
|
|
20381
20333
|
//Hier steht die aktuelle Konfiguration
|
|
@@ -20585,7 +20537,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
20585
20537
|
var partlistArticle = this.partlistArticles[basketId];
|
|
20586
20538
|
if (!onlyVisible || partlistArticle.partlistArticleVisibleInTree) partlistArticles[basketId] = partlistArticle;
|
|
20587
20539
|
if (partlistArticle.hasPartlistArticle) {
|
|
20588
|
-
partlistArticles = _objectSpread$
|
|
20540
|
+
partlistArticles = _objectSpread$d(_objectSpread$d({}, partlistArticles), partlistArticle.getRecursivePartlistArticles(onlyVisible));
|
|
20589
20541
|
}
|
|
20590
20542
|
}
|
|
20591
20543
|
return partlistArticles;
|
|
@@ -20672,17 +20624,6 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
20672
20624
|
set: function set(val) {
|
|
20673
20625
|
this.article.toDeleteAfterInit = val;
|
|
20674
20626
|
}
|
|
20675
|
-
}, {
|
|
20676
|
-
key: "articleHasNotVisualizedValues",
|
|
20677
|
-
get: function get() {
|
|
20678
|
-
if (!this.model3DName) return false;
|
|
20679
|
-
for (var key in this.articleOptionStates) {
|
|
20680
|
-
if (!this.articleOptionStates[key].isNotVisualized) {
|
|
20681
|
-
return true;
|
|
20682
|
-
}
|
|
20683
|
-
}
|
|
20684
|
-
return false;
|
|
20685
|
-
}
|
|
20686
20627
|
}, {
|
|
20687
20628
|
key: "actSizeText",
|
|
20688
20629
|
get: function get() {
|
|
@@ -21057,13 +20998,13 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
21057
20998
|
}, {
|
|
21058
20999
|
key: "articleOptionStatesWithParents",
|
|
21059
21000
|
get: function get() {
|
|
21060
|
-
return _objectSpread$
|
|
21001
|
+
return _objectSpread$d(_objectSpread$d({}, this.getReqursiveArticleOptionStates()), this.articleOptionStatesData);
|
|
21061
21002
|
}
|
|
21062
21003
|
}, {
|
|
21063
21004
|
key: "getReqursiveArticleOptionStates",
|
|
21064
21005
|
value: function getReqursiveArticleOptionStates() {
|
|
21065
21006
|
var _this$partListParentA6, _this$partListParentA7, _this$partListParentA8, _this$partListParentA9, _this$accessoireParen3, _this$accessoireParen4, _this$accessoireParen5, _this$accessoireParen6;
|
|
21066
|
-
return _objectSpread$
|
|
21007
|
+
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 : {});
|
|
21067
21008
|
}
|
|
21068
21009
|
}, {
|
|
21069
21010
|
key: "clearArticleOptionStates",
|
|
@@ -22826,7 +22767,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22826
22767
|
RuleDesc: myRuleDesc,
|
|
22827
22768
|
RuleDesc_locales: myRuleDesc_locales,
|
|
22828
22769
|
PosInvisibility: myPartListPos.PosInvisibility,
|
|
22829
|
-
VariantValues: _objectSpread$
|
|
22770
|
+
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 : {}),
|
|
22830
22771
|
VariantItemData: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantItemData,
|
|
22831
22772
|
optionImgForPrint: optionImgForPrint,
|
|
22832
22773
|
optionsForPrint: optionsForPrint
|
|
@@ -22900,7 +22841,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22900
22841
|
}
|
|
22901
22842
|
for (var key in this.articleOptionStates) {
|
|
22902
22843
|
var myOPS = this.articleOptionStates[key];
|
|
22903
|
-
myOPS.visibleOptionValues = _objectSpread$
|
|
22844
|
+
myOPS.visibleOptionValues = _objectSpread$d({}, myOPS.option.articleOptionValues);
|
|
22904
22845
|
myOPS.visibleCount = Object.keys(myOPS.option.articleOptionValues).length;
|
|
22905
22846
|
myOPS.definedBySetFeatureFixed = false;
|
|
22906
22847
|
}
|
|
@@ -23131,7 +23072,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23131
23072
|
}
|
|
23132
23073
|
if (ruleValid) {
|
|
23133
23074
|
ruleWasValidOnce = true;
|
|
23134
|
-
if (m == 0) validOPVs[OPT] = _objectSpread$
|
|
23075
|
+
if (m == 0) validOPVs[OPT] = _objectSpread$d({}, possibleOPVs);
|
|
23135
23076
|
opvCodex = opvCodex.slice(1);
|
|
23136
23077
|
if (possibleOPVs[opvCodex] != null) delete validOPVs[OPT][opvCodex];
|
|
23137
23078
|
}
|
|
@@ -23527,7 +23468,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23527
23468
|
break;
|
|
23528
23469
|
}
|
|
23529
23470
|
_context.next = 4;
|
|
23530
|
-
return import('./ShelfPlanner-
|
|
23471
|
+
return import('./ShelfPlanner-84b8de24.js');
|
|
23531
23472
|
case 4:
|
|
23532
23473
|
_yield$import = _context.sent;
|
|
23533
23474
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -24130,7 +24071,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24130
24071
|
*/
|
|
24131
24072
|
}, {
|
|
24132
24073
|
key: "getPlannerConfigData",
|
|
24133
|
-
value: function getPlannerConfigData(accessoireArticles,
|
|
24074
|
+
value: function getPlannerConfigData(accessoireArticles, alternateRenderInfo) {
|
|
24134
24075
|
var _this$doorPlanner2, _this$doorPlanner3;
|
|
24135
24076
|
var ret = {
|
|
24136
24077
|
N: this.name,
|
|
@@ -24138,8 +24079,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24138
24079
|
ArtNr: this.article.catalogArticle.articleCodex,
|
|
24139
24080
|
CFG: []
|
|
24140
24081
|
};
|
|
24141
|
-
|
|
24142
|
-
|
|
24082
|
+
this.addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo);
|
|
24083
|
+
ret.CFG.push({
|
|
24143
24084
|
OPT: 'QUANTITY',
|
|
24144
24085
|
OPV: this.quantity.toString()
|
|
24145
24086
|
});
|
|
@@ -24168,41 +24109,32 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24168
24109
|
ret['MOVE'] = doorInfo;
|
|
24169
24110
|
}
|
|
24170
24111
|
return {
|
|
24171
|
-
config: ret
|
|
24172
|
-
containsTextureNotDigitalized: containsTextureNotDigitalized
|
|
24112
|
+
config: ret
|
|
24173
24113
|
};
|
|
24174
24114
|
}
|
|
24175
24115
|
}, {
|
|
24176
24116
|
key: "addOptionStateFromArticleToPlannerData",
|
|
24177
24117
|
value: function addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo) {
|
|
24178
|
-
var containsTextureNotDigitalized = false;
|
|
24179
24118
|
for (var key in this.articleOptionStates) {
|
|
24180
|
-
|
|
24181
|
-
containsTextureNotDigitalized = true;
|
|
24182
|
-
}
|
|
24119
|
+
this.addOptionStateToPlannerData(ret, this.articleOptionStates[key], alternateRenderInfo);
|
|
24183
24120
|
}
|
|
24184
24121
|
for (var _key5 in this.article.partlistArticles) {
|
|
24185
24122
|
var partlistArticle = this.article.partlistArticles[_key5];
|
|
24186
24123
|
if (!partlistArticle.hasOptionsThatParentDoesNotHave) continue;
|
|
24187
|
-
|
|
24188
|
-
containsTextureNotDigitalized = true;
|
|
24189
|
-
}
|
|
24124
|
+
partlistArticle.addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo);
|
|
24190
24125
|
}
|
|
24191
|
-
return containsTextureNotDigitalized;
|
|
24192
24126
|
}
|
|
24193
24127
|
}, {
|
|
24194
24128
|
key: "addOptionStateToPlannerData",
|
|
24195
24129
|
value: function addOptionStateToPlannerData(ret, ops, alternateRenderInfo) {
|
|
24196
24130
|
var opv;
|
|
24197
24131
|
var opt;
|
|
24198
|
-
var containsTextureNotDigitalized = false;
|
|
24199
24132
|
if (ops.val) {
|
|
24200
24133
|
var _ops$val$ocd, _ops$option$ocd;
|
|
24201
24134
|
opv = (_ops$val$ocd = ops.val.ocd) !== null && _ops$val$ocd !== void 0 ? _ops$val$ocd : ops.val.codex;
|
|
24202
24135
|
if (this.CatalogData.isIDM3DCat && ops.val.vCodex) opv = 'OPV' + ops.idmVariantenArt + '_' + ops.val.vCodex;
|
|
24203
24136
|
opt = (_ops$option$ocd = ops.option.ocd) !== null && _ops$option$ocd !== void 0 ? _ops$option$ocd : ops.optionCodex;
|
|
24204
24137
|
if (alternateRenderInfo != undefined && alternateRenderInfo.hideOptionsIn3DImage.includes(opt)) return;
|
|
24205
|
-
if (!ops.val.isDigitalized && ops.val.isTexture) containsTextureNotDigitalized = true;
|
|
24206
24138
|
ret.CFG.push({
|
|
24207
24139
|
OPT: opt,
|
|
24208
24140
|
OPV: opv
|
|
@@ -24227,7 +24159,6 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24227
24159
|
});
|
|
24228
24160
|
}
|
|
24229
24161
|
}
|
|
24230
|
-
return containsTextureNotDigitalized;
|
|
24231
24162
|
}
|
|
24232
24163
|
}, {
|
|
24233
24164
|
key: "getAccessoireMATData",
|
|
@@ -24289,7 +24220,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24289
24220
|
key: "getVariantBasketData",
|
|
24290
24221
|
value: function getVariantBasketData() {
|
|
24291
24222
|
var variantBasketData = [];
|
|
24292
|
-
var opsObj = _objectSpread$
|
|
24223
|
+
var opsObj = _objectSpread$d({}, this.articleOptionStates);
|
|
24293
24224
|
if (this.article.optionsForPrint) {
|
|
24294
24225
|
for (var i = 0; i < this.article.optionsForPrint.length; i++) {
|
|
24295
24226
|
var ops = this.getArticleOptionState(this.article.optionsForPrint[i]);
|
|
@@ -24475,8 +24406,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24475
24406
|
}]);
|
|
24476
24407
|
}();
|
|
24477
24408
|
|
|
24478
|
-
function ownKeys$
|
|
24479
|
-
function _objectSpread$
|
|
24409
|
+
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; }
|
|
24410
|
+
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(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; }
|
|
24480
24411
|
var LOG$b = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
24481
24412
|
|
|
24482
24413
|
//Diese Klasse verwaltet den Optionsbaum und ladelogik etc. eines Artikels
|
|
@@ -24695,7 +24626,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
24695
24626
|
return _context5.abrupt("continue", 37);
|
|
24696
24627
|
case 11:
|
|
24697
24628
|
if (targetArticlesWithNewValues.includes(targetArticlesToUpdate[i])) {
|
|
24698
|
-
valuesArray[i] = actArticle.getValidValues(_objectSpread$
|
|
24629
|
+
valuesArray[i] = actArticle.getValidValues(_objectSpread$c({}, myValues), actArticle.CatalogData.mergeOptionsToSameOption);
|
|
24699
24630
|
}
|
|
24700
24631
|
if (!(Object.entries(valuesArray[i]).length > 0 || from !== null && from !== void 0 && from.startsWith('initializing'))) {
|
|
24701
24632
|
_context5.next = 32;
|
|
@@ -25329,7 +25260,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25329
25260
|
}
|
|
25330
25261
|
doLoadItem.BasketID = nArticle.basketId;
|
|
25331
25262
|
_context14.next = 9;
|
|
25332
|
-
return this.toDoAfterArticleLoaded(nArticle, {}, _objectSpread$
|
|
25263
|
+
return this.toDoAfterArticleLoaded(nArticle, {}, _objectSpread$c(_objectSpread$c({}, doLoadItem.VariantValues), newConfigValues), 'initializingPartlist', doLoadItem.VariantItemData);
|
|
25333
25264
|
case 9:
|
|
25334
25265
|
article.addPartlistArticle(nArticle);
|
|
25335
25266
|
case 10:
|
|
@@ -25473,7 +25404,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25473
25404
|
if (ruleValid) break;
|
|
25474
25405
|
}
|
|
25475
25406
|
if (ruleValid) {
|
|
25476
|
-
returnValue.push(_objectSpread$
|
|
25407
|
+
returnValue.push(_objectSpread$c(_objectSpread$c({}, entry), {}, {
|
|
25477
25408
|
index: i
|
|
25478
25409
|
}));
|
|
25479
25410
|
break;
|
|
@@ -26455,7 +26386,6 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
26455
26386
|
var optionStep = step === null || step === void 0 ? void 0 : step.optionStep;
|
|
26456
26387
|
var paletteType = 'SMALL';
|
|
26457
26388
|
if (configStep && optionStep) {
|
|
26458
|
-
var _set$api$ReturnToFrom;
|
|
26459
26389
|
var optionState = articles[configStep.targetArticles[0]][configStep.option];
|
|
26460
26390
|
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) {
|
|
26461
26391
|
paletteType = 'GAL';
|
|
@@ -26483,31 +26413,15 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
26483
26413
|
if (paletteType == 'GALLERY') {
|
|
26484
26414
|
paletteType = 'GAL';
|
|
26485
26415
|
}
|
|
26486
|
-
//TODO correct with franz
|
|
26487
|
-
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';
|
|
26488
26416
|
}
|
|
26489
26417
|
return paletteType;
|
|
26490
26418
|
}
|
|
26491
26419
|
}, {
|
|
26492
26420
|
key: "getStepInfo",
|
|
26493
26421
|
value: function getStepInfo(configStepKey, optionStatesOfArticle) {
|
|
26494
|
-
var
|
|
26495
|
-
|
|
26496
|
-
|
|
26497
|
-
if (allSteps !== null && allSteps !== void 0 && allSteps.optionStep) {
|
|
26498
|
-
for (var i = 0; i < targetArticles.length; i++) {
|
|
26499
|
-
if (optionStatesOfArticle[targetArticles[i]][allSteps.optionStep.codex].isNotVisualized) {
|
|
26500
|
-
isNotVisualized = true;
|
|
26501
|
-
break;
|
|
26502
|
-
}
|
|
26503
|
-
}
|
|
26504
|
-
}
|
|
26505
|
-
if (isNotVisualized) {
|
|
26506
|
-
return 'SHOW_NOT_VISUALIZED_WARNINIG';
|
|
26507
|
-
}
|
|
26508
|
-
if (allSteps !== null && allSteps !== void 0 && allSteps.configStep.warning) {
|
|
26509
|
-
return allSteps.configStep.warning;
|
|
26510
|
-
}
|
|
26422
|
+
var allSteps = this.getAllByKey(configStepKey);
|
|
26423
|
+
if (allSteps !== null && allSteps !== void 0 && allSteps.optionStep) ;
|
|
26424
|
+
if (allSteps !== null && allSteps !== void 0 && allSteps.configStep.warning) return allSteps.configStep.warning;
|
|
26511
26425
|
return undefined;
|
|
26512
26426
|
}
|
|
26513
26427
|
}, {
|
|
@@ -26815,8 +26729,8 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
26815
26729
|
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; } } }; }
|
|
26816
26730
|
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; } }
|
|
26817
26731
|
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; }
|
|
26818
|
-
function ownKeys$
|
|
26819
|
-
function _objectSpread$
|
|
26732
|
+
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; }
|
|
26733
|
+
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(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; }
|
|
26820
26734
|
var LOG$9 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
26821
26735
|
var DivaSet = /*#__PURE__*/function () {
|
|
26822
26736
|
function DivaSet(catalog, _setId, orderSet, initSetState) {
|
|
@@ -26911,7 +26825,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
26911
26825
|
_context.next = 10;
|
|
26912
26826
|
break;
|
|
26913
26827
|
}
|
|
26914
|
-
validValues = repairVariantValuesAndPlanner ? article.getValidValues(_objectSpread$
|
|
26828
|
+
validValues = repairVariantValuesAndPlanner ? article.getValidValues(_objectSpread$b({}, variantValues), article.CatalogData.mergeOptionsToSameOption) : {};
|
|
26915
26829
|
_context.t0 = partlistArticlesToLoad;
|
|
26916
26830
|
_context.next = 8;
|
|
26917
26831
|
return articleHandlerInstance.updateCfgValues(article, repairVariantValuesAndPlanner ? validValues : variantValues, {}, undefined, loadPlas);
|
|
@@ -27026,7 +26940,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27026
26940
|
}
|
|
27027
26941
|
return false;
|
|
27028
26942
|
});
|
|
27029
|
-
_defineProperty(this, "getPlannerConfigData", function (elementId,
|
|
26943
|
+
_defineProperty(this, "getPlannerConfigData", function (elementId, alternateRenderInfo) {
|
|
27030
26944
|
var article = _this.getArticleByElementId(elementId);
|
|
27031
26945
|
var articleAccs = [];
|
|
27032
26946
|
for (var key in article === null || article === void 0 ? void 0 : article.accessoires) {
|
|
@@ -27034,7 +26948,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27034
26948
|
}
|
|
27035
26949
|
var plannerConfigData = {
|
|
27036
26950
|
config: {},
|
|
27037
|
-
containsTextureNotDigitalized: false,
|
|
27038
26951
|
accs: articleAccs
|
|
27039
26952
|
};
|
|
27040
26953
|
if (article) {
|
|
@@ -27048,9 +26961,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27048
26961
|
}
|
|
27049
26962
|
}
|
|
27050
26963
|
}
|
|
27051
|
-
var result = article.getPlannerConfigData(accessoireArticles,
|
|
26964
|
+
var result = article.getPlannerConfigData(accessoireArticles, alternateRenderInfo);
|
|
27052
26965
|
plannerConfigData.config = result.config;
|
|
27053
|
-
plannerConfigData.containsTextureNotDigitalized = result.containsTextureNotDigitalized;
|
|
27054
26966
|
}
|
|
27055
26967
|
return plannerConfigData;
|
|
27056
26968
|
});
|
|
@@ -27058,7 +26970,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27058
26970
|
var article = _this.getArticleByBasketId(basketId);
|
|
27059
26971
|
var plannerConfigData = {
|
|
27060
26972
|
config: {},
|
|
27061
|
-
containsTextureNotDigitalized: false,
|
|
27062
26973
|
accs: []
|
|
27063
26974
|
};
|
|
27064
26975
|
if (article) {
|
|
@@ -27066,9 +26977,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27066
26977
|
for (var key in article === null || article === void 0 ? void 0 : article.accessoires) {
|
|
27067
26978
|
if (article.accessoires[key].elementId) articleAccs.push(article.accessoires[key].elementId);
|
|
27068
26979
|
}
|
|
27069
|
-
var result = article.getPlannerConfigData(article.accessoires
|
|
26980
|
+
var result = article.getPlannerConfigData(article.accessoires);
|
|
27070
26981
|
plannerConfigData.config = result.config;
|
|
27071
|
-
plannerConfigData.containsTextureNotDigitalized = result.containsTextureNotDigitalized;
|
|
27072
26982
|
plannerConfigData.accs = articleAccs;
|
|
27073
26983
|
}
|
|
27074
26984
|
return plannerConfigData;
|
|
@@ -27164,7 +27074,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27164
27074
|
if (this.catalogData.useBoxPlanner) {
|
|
27165
27075
|
plannerMode = 'BoxPlanner';
|
|
27166
27076
|
} else if (this.catalogData.has3dModels) {
|
|
27167
|
-
var _this$WebConfig;
|
|
27168
27077
|
for (var key in this.divaArticles) {
|
|
27169
27078
|
if (this.divaArticles[key].model3DName) {
|
|
27170
27079
|
plannerMode = '3DImage';
|
|
@@ -27176,9 +27085,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27176
27085
|
if (Object.entries(this.divaArticles).length == 0) {
|
|
27177
27086
|
plannerMode = '3DImage';
|
|
27178
27087
|
}
|
|
27179
|
-
if ((_this$WebConfig = this.WebConfig) !== null && _this$WebConfig !== void 0 && _this$WebConfig.diva3dUseSirvViewer) {
|
|
27180
|
-
plannerMode = 'SirvViewer_only';
|
|
27181
|
-
}
|
|
27182
27088
|
if (this.catalogData.divaArReady && this.catalogData.useShelfPlannerRTV) {
|
|
27183
27089
|
//TODO Matthias sauber initialisieren ob in RTV oder IMAGE3D gestartet wird.
|
|
27184
27090
|
plannerMode = 'RTViewer';
|
|
@@ -27197,7 +27103,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27197
27103
|
plannerMode = 'No';
|
|
27198
27104
|
}
|
|
27199
27105
|
this.plannerMode = plannerMode;
|
|
27200
|
-
this.setType = plannerMode == 'No'
|
|
27106
|
+
this.setType = plannerMode == 'No' ? 'ARTICLE' : 'PLANNING';
|
|
27201
27107
|
return plannerMode;
|
|
27202
27108
|
}
|
|
27203
27109
|
}, {
|
|
@@ -27492,8 +27398,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27492
27398
|
var articles = {};
|
|
27493
27399
|
for (var basketId in this.divaArticles) {
|
|
27494
27400
|
articles[basketId] = this.divaArticles[basketId];
|
|
27495
|
-
if (allPartlistArticlesAlso) articles = _objectSpread$
|
|
27496
|
-
if (visiblePartlistArticlesAlso) articles = _objectSpread$
|
|
27401
|
+
if (allPartlistArticlesAlso) articles = _objectSpread$b(_objectSpread$b({}, articles), articles[basketId].getRecursivePartlistArticles());
|
|
27402
|
+
if (visiblePartlistArticlesAlso) articles = _objectSpread$b(_objectSpread$b({}, articles), articles[basketId].getRecursivePartlistArticles(true));
|
|
27497
27403
|
}
|
|
27498
27404
|
return articles;
|
|
27499
27405
|
}
|
|
@@ -28015,7 +27921,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28015
27921
|
break;
|
|
28016
27922
|
}
|
|
28017
27923
|
_context4.next = 3;
|
|
28018
|
-
return import('./DoorPlanner-
|
|
27924
|
+
return import('./DoorPlanner-f3376859.js');
|
|
28019
27925
|
case 3:
|
|
28020
27926
|
_yield$import = _context4.sent;
|
|
28021
27927
|
DoorPlanner = _yield$import["default"];
|
|
@@ -28120,8 +28026,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28120
28026
|
}, {
|
|
28121
28027
|
key: "hasStaticRoomList",
|
|
28122
28028
|
get: function get() {
|
|
28123
|
-
var _this$
|
|
28124
|
-
if (this.CatalogData.roomList3DStaticBGImage.size > 0 && (_this$
|
|
28029
|
+
var _this$WebConfig;
|
|
28030
|
+
if (this.CatalogData.roomList3DStaticBGImage.size > 0 && (_this$WebConfig = this.WebConfig) !== null && _this$WebConfig !== void 0 && _this$WebConfig.diva3dStaticBGImage) {
|
|
28125
28031
|
return true;
|
|
28126
28032
|
}
|
|
28127
28033
|
return false;
|
|
@@ -28162,8 +28068,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28162
28068
|
}, {
|
|
28163
28069
|
key: "ViewConfig",
|
|
28164
28070
|
get: function get() {
|
|
28165
|
-
var _this$
|
|
28166
|
-
return (_this$
|
|
28071
|
+
var _this$WebConfig2;
|
|
28072
|
+
return (_this$WebConfig2 = this.WebConfig) === null || _this$WebConfig2 === void 0 ? void 0 : _this$WebConfig2.viewConfig;
|
|
28167
28073
|
}
|
|
28168
28074
|
}, {
|
|
28169
28075
|
key: "i18n",
|
|
@@ -29650,8 +29556,8 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
29650
29556
|
}();
|
|
29651
29557
|
var summaryHandlerInstance = new SummaryHandler();
|
|
29652
29558
|
|
|
29653
|
-
function ownKeys$
|
|
29654
|
-
function _objectSpread$
|
|
29559
|
+
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; }
|
|
29560
|
+
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(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; }
|
|
29655
29561
|
DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
29656
29562
|
var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
29657
29563
|
function DivaFavoritesHandler() {
|
|
@@ -30329,7 +30235,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30329
30235
|
if (targetArticle[opt] && !variantValues[opt]) variantValues[opt] = targetArticle[opt];
|
|
30330
30236
|
}
|
|
30331
30237
|
}
|
|
30332
|
-
configVariant = new ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils.encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$
|
|
30238
|
+
configVariant = new ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils.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.encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils.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);
|
|
30333
30239
|
set.basketConfigVariants.push(configVariant);
|
|
30334
30240
|
case 28:
|
|
30335
30241
|
case "end":
|
|
@@ -30384,11 +30290,11 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30384
30290
|
}, {
|
|
30385
30291
|
key: "isFavorite",
|
|
30386
30292
|
value: function isFavorite(set, targetArticles, item, optionCodex) {
|
|
30387
|
-
var _item$ocd, _set$
|
|
30293
|
+
var _item$ocd, _set$api$ReturnToFrom, _favorites$VariantVal, _Object$keys;
|
|
30388
30294
|
var favorites = set.favorites;
|
|
30389
30295
|
var opvCodex = (_item$ocd = item.ocd) !== null && _item$ocd !== void 0 ? _item$ocd : item.codex;
|
|
30390
30296
|
var opt = optionCodex ? optionCodex : item.parent.codex;
|
|
30391
|
-
var doShowFav =
|
|
30297
|
+
var doShowFav = !!((_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.startsWith('FAVORITS'));
|
|
30392
30298
|
if (!doShowFav) return undefined;
|
|
30393
30299
|
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)) {
|
|
30394
30300
|
for (var i = 0; i < targetArticles.length; i++) {
|
|
@@ -30409,8 +30315,8 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30409
30315
|
}();
|
|
30410
30316
|
var favoritesHandlerInstance = new DivaFavoritesHandler();
|
|
30411
30317
|
|
|
30412
|
-
function ownKeys$
|
|
30413
|
-
function _objectSpread$
|
|
30318
|
+
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; }
|
|
30319
|
+
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(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; }
|
|
30414
30320
|
|
|
30415
30321
|
//Diese Klasse beinhaltet die Logik wie eine aktuelle Konfiguration mit allen möglicheen Ausprägungen mit Preisen in einem Set aussieht.
|
|
30416
30322
|
//Der in einem Set gemergte Optionsbaum
|
|
@@ -30967,7 +30873,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
30967
30873
|
//get schnittmenge of all the articles
|
|
30968
30874
|
if (i === 0) {
|
|
30969
30875
|
constructionRules = myOptionState.constructionRules;
|
|
30970
|
-
configItems = _objectSpread$
|
|
30876
|
+
configItems = _objectSpread$9({}, myOptionState.visibleOptionValues);
|
|
30971
30877
|
} else {
|
|
30972
30878
|
for (var _key2 in configItems) {
|
|
30973
30879
|
if (!myOptionState.visibleOptionValues[_key2]) {
|
|
@@ -31198,8 +31104,8 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
31198
31104
|
}();
|
|
31199
31105
|
var configTreeHandler = new DivaConfigTreeHandler();
|
|
31200
31106
|
|
|
31201
|
-
function ownKeys$
|
|
31202
|
-
function _objectSpread$
|
|
31107
|
+
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; }
|
|
31108
|
+
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(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; }
|
|
31203
31109
|
var LOG$8 = DivaUtils.initLog('Planner', 'DIVA-SET-HANDLER');
|
|
31204
31110
|
|
|
31205
31111
|
/*
|
|
@@ -31689,7 +31595,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31689
31595
|
}
|
|
31690
31596
|
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;
|
|
31691
31597
|
_context6.next = 18;
|
|
31692
|
-
return this.addPlannerElement(set, articlesToInitialize[j], _objectSpread$
|
|
31598
|
+
return this.addPlannerElement(set, articlesToInitialize[j], _objectSpread$8(_objectSpread$8({}, params), variantValues ? {
|
|
31693
31599
|
variantValues: variantValues
|
|
31694
31600
|
} : {}));
|
|
31695
31601
|
case 18:
|
|
@@ -32322,7 +32228,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32322
32228
|
_context17.next = 24;
|
|
32323
32229
|
break;
|
|
32324
32230
|
}
|
|
32325
|
-
return _context17.abrupt("return", _objectSpread$
|
|
32231
|
+
return _context17.abrupt("return", _objectSpread$8(_objectSpread$8({}, doesFit), {}, {
|
|
32326
32232
|
accessoire: accessoire
|
|
32327
32233
|
}));
|
|
32328
32234
|
case 24:
|
|
@@ -32754,7 +32660,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32754
32660
|
var articlecodex = plannerElement.articleCodex;
|
|
32755
32661
|
if (type == 'PLANNERSWITCH' && Object.keys(set.getDivaArticles())[0]) {
|
|
32756
32662
|
if (plannerViewInfo.catalogPlannerArticles[i].filterType == 'Accessoire') continue;
|
|
32757
|
-
cleanedCaltaogPlannerArticles.push(_objectSpread$
|
|
32663
|
+
cleanedCaltaogPlannerArticles.push(_objectSpread$8({}, plannerElement));
|
|
32758
32664
|
var index = cleanedCaltaogPlannerArticles.length - 1;
|
|
32759
32665
|
cleanedCaltaogPlannerArticles[index].groupName = '';
|
|
32760
32666
|
if (set.getArticlesByArticleCodex(articlecodex).length > 0) {
|
|
@@ -32772,10 +32678,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32772
32678
|
plannerViewInfo.plannerConfiguration.updatePaletteAfterPlanningChanged = true;
|
|
32773
32679
|
}
|
|
32774
32680
|
}
|
|
32775
|
-
if (!dontPushElement) cleanedCaltaogPlannerArticles.push(_objectSpread$
|
|
32681
|
+
if (!dontPushElement) cleanedCaltaogPlannerArticles.push(_objectSpread$8({}, plannerElement));
|
|
32776
32682
|
}
|
|
32777
32683
|
}
|
|
32778
|
-
return _objectSpread$
|
|
32684
|
+
return _objectSpread$8(_objectSpread$8({}, plannerViewInfo), {}, {
|
|
32779
32685
|
catalogPlannerArticles: cleanedCaltaogPlannerArticles
|
|
32780
32686
|
});
|
|
32781
32687
|
}
|
|
@@ -32974,7 +32880,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32974
32880
|
filterType = set.configTree.getCurFilterType(configStepKey, optionStatesOfArticle, configItems.configItems);
|
|
32975
32881
|
stepInfo = set.configTree.getStepInfo(configStepKey, optionStatesOfArticle);
|
|
32976
32882
|
contentItemId = (_configItems$option = configItems.option) === null || _configItems$option === void 0 ? void 0 : _configItems$option.contentItemId;
|
|
32977
|
-
return _context24.abrupt("return", _objectSpread$
|
|
32883
|
+
return _context24.abrupt("return", _objectSpread$8(_objectSpread$8(_objectSpread$8({
|
|
32978
32884
|
isRenderedNotInSettingPalette: set.configTree.isRenderedNotInSettingPalette(configStepKey),
|
|
32979
32885
|
isRenderedInAccessorieStep: set.configTree.isRenderedInAccessorieStep(configStepKey),
|
|
32980
32886
|
visible: set.configTree.getVisibility(configStepKey, visible, set.CatalogData)
|
|
@@ -33397,7 +33303,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33397
33303
|
break;
|
|
33398
33304
|
}
|
|
33399
33305
|
_context28.next = 17;
|
|
33400
|
-
return this.addArticleToActSet(set, edoArticlesToLoad[_i5].ArticleCodex, _objectSpread$
|
|
33306
|
+
return this.addArticleToActSet(set, edoArticlesToLoad[_i5].ArticleCodex, _objectSpread$8(_objectSpread$8({}, edoArticlesToLoad[_i5]), {}, {
|
|
33401
33307
|
basketId: oldBasketIds[_i5]
|
|
33402
33308
|
}), true);
|
|
33403
33309
|
case 17:
|
|
@@ -33794,7 +33700,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33794
33700
|
origOrderSet.BBox = actOrderSet.BBox;
|
|
33795
33701
|
origOrderSet.VariantDescription = actOrderSet.VariantDescription;
|
|
33796
33702
|
if (actOrderSet.ConfigVariants && origOrderSet.ConfigVariants) origOrderSet.ConfigVariants = actOrderSet.ConfigVariants.map(function (variant, index) {
|
|
33797
|
-
return _objectSpread$
|
|
33703
|
+
return _objectSpread$8(_objectSpread$8({}, variant), {}, {
|
|
33798
33704
|
SetImage: origOrderSet.ConfigVariants[index].SetImage,
|
|
33799
33705
|
HQRenderScript: origOrderSet.ConfigVariants[index].HQRenderScript,
|
|
33800
33706
|
Set2DImage: origOrderSet.ConfigVariants[index].Set2DImage,
|
|
@@ -33832,25 +33738,12 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33832
33738
|
DivaUtils.startSpanOfApm('GetSet3D und 2D Image');
|
|
33833
33739
|
GroupType = 'PLANNING';
|
|
33834
33740
|
plannerData = set.plannerHandler.savePlanner(set.getSetId());
|
|
33835
|
-
|
|
33836
|
-
_context31.next = 10;
|
|
33837
|
-
break;
|
|
33838
|
-
}
|
|
33839
|
-
_context31.next = 7;
|
|
33840
|
-
return set.plannerHandler.getSetImageAsUrl(set.getSetId());
|
|
33841
|
-
case 7:
|
|
33842
|
-
_context31.t0 = _context31.sent;
|
|
33843
|
-
_context31.next = 11;
|
|
33844
|
-
break;
|
|
33845
|
-
case 10:
|
|
33846
|
-
_context31.t0 = undefined;
|
|
33847
|
-
case 11:
|
|
33848
|
-
setImage = _context31.t0;
|
|
33741
|
+
setImage = undefined;
|
|
33849
33742
|
urlToPlanning2D = undefined;
|
|
33850
33743
|
alternateSetImages = undefined;
|
|
33851
33744
|
hqRenderScript = undefined;
|
|
33852
33745
|
if (dontGenerateImages) {
|
|
33853
|
-
_context31.next =
|
|
33746
|
+
_context31.next = 25;
|
|
33854
33747
|
break;
|
|
33855
33748
|
}
|
|
33856
33749
|
promise3D = this.getSetImage(set, typeof window === 'undefined');
|
|
@@ -33858,22 +33751,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33858
33751
|
if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
|
|
33859
33752
|
promise3DAlternate = this.getAlternateSetImages(set);
|
|
33860
33753
|
}
|
|
33861
|
-
_context31.next =
|
|
33754
|
+
_context31.next = 14;
|
|
33862
33755
|
return Promise.all([promise3D, promise2D, promise3DAlternate]);
|
|
33863
|
-
case
|
|
33756
|
+
case 14:
|
|
33864
33757
|
_yield$Promise$all = _context31.sent;
|
|
33865
33758
|
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
|
|
33866
33759
|
setImage = _yield$Promise$all2[0];
|
|
33867
33760
|
urlToPlanning2D = _yield$Promise$all2[1];
|
|
33868
33761
|
alternateSetImages = _yield$Promise$all2[2];
|
|
33869
33762
|
promiseHQRenderScript = this.getHQRenderScript(set, divaNr);
|
|
33870
|
-
_context31.next =
|
|
33763
|
+
_context31.next = 22;
|
|
33871
33764
|
return Promise.all([promiseHQRenderScript]);
|
|
33872
|
-
case
|
|
33765
|
+
case 22:
|
|
33873
33766
|
_yield$Promise$all3 = _context31.sent;
|
|
33874
33767
|
_yield$Promise$all4 = _slicedToArray(_yield$Promise$all3, 1);
|
|
33875
33768
|
hqRenderScript = _yield$Promise$all4[0];
|
|
33876
|
-
case
|
|
33769
|
+
case 25:
|
|
33877
33770
|
LOG$8.startTransaction({
|
|
33878
33771
|
event: 'FillBakset',
|
|
33879
33772
|
eventId: 'FILL_BASKET',
|
|
@@ -33939,7 +33832,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33939
33832
|
MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
|
|
33940
33833
|
});
|
|
33941
33834
|
return _context31.abrupt("return", orderSet);
|
|
33942
|
-
case
|
|
33835
|
+
case 32:
|
|
33943
33836
|
case "end":
|
|
33944
33837
|
return _context31.stop();
|
|
33945
33838
|
}
|
|
@@ -33967,7 +33860,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33967
33860
|
catalogData = set.CatalogData;
|
|
33968
33861
|
is3D = ['3DImage', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
33969
33862
|
if (!is3D) {
|
|
33970
|
-
_context32.next =
|
|
33863
|
+
_context32.next = 11;
|
|
33971
33864
|
break;
|
|
33972
33865
|
}
|
|
33973
33866
|
LOG$8.startTransaction({
|
|
@@ -33983,20 +33876,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33983
33876
|
case 9:
|
|
33984
33877
|
setImage = _context32.sent;
|
|
33985
33878
|
LOG$8.successTransaction('RENDER_3D_IMAGE');
|
|
33986
|
-
|
|
33987
|
-
break;
|
|
33988
|
-
case 13:
|
|
33989
|
-
if (!(set.getPlannerMode() == 'SirvViewer_only')) {
|
|
33990
|
-
_context32.next = 17;
|
|
33991
|
-
break;
|
|
33992
|
-
}
|
|
33993
|
-
_context32.next = 16;
|
|
33994
|
-
return set.plannerHandler.getSetImageAsUrl(set.getSetId());
|
|
33995
|
-
case 16:
|
|
33996
|
-
setImage = _context32.sent;
|
|
33997
|
-
case 17:
|
|
33879
|
+
case 11:
|
|
33998
33880
|
return _context32.abrupt("return", setImage);
|
|
33999
|
-
case
|
|
33881
|
+
case 12:
|
|
34000
33882
|
case "end":
|
|
34001
33883
|
return _context32.stop();
|
|
34002
33884
|
}
|
|
@@ -34148,77 +34030,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34148
34030
|
Info: bbox.width + 'cm x ' + bbox.depth + 'cm'
|
|
34149
34031
|
};
|
|
34150
34032
|
}
|
|
34151
|
-
|
|
34152
|
-
/****************************Cache building***************************/
|
|
34153
|
-
|
|
34154
|
-
/**
|
|
34155
|
-
* This function creates the cache for all images.
|
|
34156
|
-
* @returns returns true if the whole set was created correctly
|
|
34157
|
-
*/
|
|
34158
34033
|
}, {
|
|
34159
|
-
key: "
|
|
34160
|
-
value:
|
|
34161
|
-
var
|
|
34162
|
-
var _set$getAlternateRend3;
|
|
34163
|
-
var timeout;
|
|
34034
|
+
key: "loadProductsOfSets",
|
|
34035
|
+
value: function () {
|
|
34036
|
+
var _loadProductsOfSets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(orderSets, involvedSetIds) {
|
|
34164
34037
|
return _regeneratorRuntime.wrap(function _callee34$(_context36) {
|
|
34165
34038
|
while (1) switch (_context36.prev = _context36.next) {
|
|
34166
34039
|
case 0:
|
|
34167
|
-
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, {
|
|
34168
|
-
width: 100,
|
|
34169
|
-
height: 100,
|
|
34170
|
-
isFullscreenRendering: false,
|
|
34171
|
-
planner3DGridEnabled: false,
|
|
34172
|
-
mediaServiceSaveMode: 'PERMANENT',
|
|
34173
|
-
doShow3DDimensionLines: false
|
|
34174
|
-
});
|
|
34175
|
-
timeout = 50;
|
|
34176
|
-
case 2:
|
|
34177
|
-
if (!set.plannerHandler.checkIsWaitingForRendering()) {
|
|
34178
|
-
_context36.next = 10;
|
|
34179
|
-
break;
|
|
34180
|
-
}
|
|
34181
|
-
timeout--;
|
|
34182
|
-
if (!(timeout == 0)) {
|
|
34183
|
-
_context36.next = 6;
|
|
34184
|
-
break;
|
|
34185
|
-
}
|
|
34186
|
-
return _context36.abrupt("return", false);
|
|
34187
|
-
case 6:
|
|
34188
|
-
_context36.next = 8;
|
|
34189
|
-
return DivaUtils.Sleep(300);
|
|
34190
|
-
case 8:
|
|
34191
34040
|
_context36.next = 2;
|
|
34192
|
-
break;
|
|
34193
|
-
case 10:
|
|
34194
|
-
return _context36.abrupt("return", true);
|
|
34195
|
-
case 11:
|
|
34196
|
-
case "end":
|
|
34197
|
-
return _context36.stop();
|
|
34198
|
-
}
|
|
34199
|
-
}, _callee34);
|
|
34200
|
-
}));
|
|
34201
|
-
function createRenderCache(_x113) {
|
|
34202
|
-
return _createRenderCache.apply(this, arguments);
|
|
34203
|
-
}
|
|
34204
|
-
return createRenderCache;
|
|
34205
|
-
}())
|
|
34206
|
-
}, {
|
|
34207
|
-
key: "loadProductsOfSets",
|
|
34208
|
-
value: function () {
|
|
34209
|
-
var _loadProductsOfSets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(orderSets, involvedSetIds) {
|
|
34210
|
-
return _regeneratorRuntime.wrap(function _callee35$(_context37) {
|
|
34211
|
-
while (1) switch (_context37.prev = _context37.next) {
|
|
34212
|
-
case 0:
|
|
34213
|
-
_context37.next = 2;
|
|
34214
34041
|
return productHandlerInstance.loadProductsOfSets(orderSets, involvedSetIds);
|
|
34215
34042
|
case 2:
|
|
34216
34043
|
case "end":
|
|
34217
|
-
return
|
|
34044
|
+
return _context36.stop();
|
|
34218
34045
|
}
|
|
34219
|
-
},
|
|
34046
|
+
}, _callee34);
|
|
34220
34047
|
}));
|
|
34221
|
-
function loadProductsOfSets(
|
|
34048
|
+
function loadProductsOfSets(_x113, _x114) {
|
|
34222
34049
|
return _loadProductsOfSets.apply(this, arguments);
|
|
34223
34050
|
}
|
|
34224
34051
|
return loadProductsOfSets;
|
|
@@ -34255,28 +34082,28 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34255
34082
|
}, {
|
|
34256
34083
|
key: "addOrderSetArticlesToExistingSet",
|
|
34257
34084
|
value: function () {
|
|
34258
|
-
var _addOrderSetArticlesToExistingSet = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
34259
|
-
return _regeneratorRuntime.wrap(function
|
|
34260
|
-
while (1) switch (
|
|
34085
|
+
var _addOrderSetArticlesToExistingSet = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(set, orderSet, lastSetToInitialize) {
|
|
34086
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context37) {
|
|
34087
|
+
while (1) switch (_context37.prev = _context37.next) {
|
|
34261
34088
|
case 0:
|
|
34262
34089
|
//TODO: GLOBAL STUFF
|
|
34263
34090
|
//this.updateActSet(set);
|
|
34264
34091
|
orderSet.changeBasketIds();
|
|
34265
|
-
|
|
34092
|
+
_context37.next = 3;
|
|
34266
34093
|
return this.initOrderLineArticles(set, orderSet);
|
|
34267
34094
|
case 3:
|
|
34268
|
-
|
|
34095
|
+
_context37.next = 5;
|
|
34269
34096
|
return set.plannerHandler.extendSet(set, orderSet.SetPlanData, lastSetToInitialize);
|
|
34270
34097
|
case 5:
|
|
34271
|
-
|
|
34098
|
+
_context37.next = 7;
|
|
34272
34099
|
return productHandlerInstance.updateProducts(set, 'onAdd');
|
|
34273
34100
|
case 7:
|
|
34274
34101
|
case "end":
|
|
34275
|
-
return
|
|
34102
|
+
return _context37.stop();
|
|
34276
34103
|
}
|
|
34277
|
-
},
|
|
34104
|
+
}, _callee35, this);
|
|
34278
34105
|
}));
|
|
34279
|
-
function addOrderSetArticlesToExistingSet(_x116, _x117
|
|
34106
|
+
function addOrderSetArticlesToExistingSet(_x115, _x116, _x117) {
|
|
34280
34107
|
return _addOrderSetArticlesToExistingSet.apply(this, arguments);
|
|
34281
34108
|
}
|
|
34282
34109
|
return addOrderSetArticlesToExistingSet;
|
|
@@ -34293,576 +34120,99 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34293
34120
|
}();
|
|
34294
34121
|
var setHandlerInstance = new DivaSetHandler();
|
|
34295
34122
|
|
|
34296
|
-
|
|
34123
|
+
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; }
|
|
34124
|
+
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(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; }
|
|
34297
34125
|
var LOG$7 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
34298
|
-
var
|
|
34299
|
-
function
|
|
34300
|
-
|
|
34301
|
-
|
|
34302
|
-
|
|
34303
|
-
|
|
34304
|
-
|
|
34305
|
-
_defineProperty(this, "
|
|
34306
|
-
_defineProperty(this, "
|
|
34307
|
-
_defineProperty(this, "
|
|
34308
|
-
|
|
34309
|
-
|
|
34310
|
-
|
|
34311
|
-
|
|
34312
|
-
|
|
34313
|
-
_defineProperty(this, "
|
|
34314
|
-
|
|
34315
|
-
_defineProperty(this, "
|
|
34316
|
-
_defineProperty(this, "
|
|
34317
|
-
_defineProperty(this, "
|
|
34318
|
-
_defineProperty(this, "
|
|
34319
|
-
|
|
34320
|
-
_defineProperty(this, "
|
|
34321
|
-
|
|
34322
|
-
|
|
34323
|
-
|
|
34324
|
-
_defineProperty(this, "
|
|
34325
|
-
|
|
34326
|
-
|
|
34327
|
-
|
|
34328
|
-
|
|
34329
|
-
|
|
34330
|
-
|
|
34331
|
-
|
|
34332
|
-
|
|
34333
|
-
|
|
34334
|
-
this.renderWidth = width;
|
|
34335
|
-
this.renderHeight = height;
|
|
34336
|
-
this.uiInfo = '';
|
|
34337
|
-
this.imgForSrc = '';
|
|
34338
|
-
this.layerMaskAsBase64 = '';
|
|
34339
|
-
this.isFullscreenRendering = isFullscreenRendering;
|
|
34340
|
-
this.hasDimensionLines = hasDimensionLines;
|
|
34341
|
-
this.plannerMeasureDigits = plannerMeasureDigits;
|
|
34342
|
-
this.hasLayerMask = hasLayerMask;
|
|
34343
|
-
this.creationTime = new Date();
|
|
34344
|
-
this.layerMaskThreeTexture = undefined;
|
|
34345
|
-
this.hasStaticBackground = hasStaticBG;
|
|
34346
|
-
this.mediaServiceSaveMode = mediaServiceSaveMode;
|
|
34347
|
-
this.urlToSavedRendering = '';
|
|
34348
|
-
this.catalogData = {
|
|
34349
|
-
catalogCodex: '',
|
|
34350
|
-
catalogGUID: ''
|
|
34351
|
-
};
|
|
34352
|
-
this.isLoadedFromCache = false;
|
|
34353
|
-
this.HQRenderingUrl = '';
|
|
34354
|
-
this.SpinUrl = '';
|
|
34355
|
-
this.ArUrl = '';
|
|
34356
|
-
if (alternateRendererInfo != undefined) this.isAlternateRendering = true;else this.isAlternateRendering = false;
|
|
34357
|
-
this.alternateRendererInfo = alternateRendererInfo;
|
|
34358
|
-
this.alternateRenderingsExist = !!alternateRenderingsExist;
|
|
34359
|
-
}
|
|
34360
|
-
return _createClass(Rendering, [{
|
|
34361
|
-
key: "clone",
|
|
34362
|
-
value: function clone(rendering) {
|
|
34363
|
-
this.planningHash = rendering.planningHash;
|
|
34364
|
-
this.renderHash = rendering.renderHash;
|
|
34365
|
-
this.creationTime = rendering.creationTime;
|
|
34366
|
-
this.renderWidth = rendering.renderWidth;
|
|
34367
|
-
this.renderHeight = rendering.renderHeight;
|
|
34368
|
-
this.uiInfo = rendering.uiInfo;
|
|
34369
|
-
this.urlToSavedRendering = rendering.urlToSavedRendering;
|
|
34370
|
-
this.hasLayerMask = rendering.hasLayerMask;
|
|
34371
|
-
this.imgForSrc = rendering.imgForSrc;
|
|
34372
|
-
this.HQRenderingUrl = rendering.HQRenderingUrl;
|
|
34373
|
-
this.layerMaskAsBase64 = rendering.layerMaskAsBase64;
|
|
34374
|
-
this.layerMaskThreeTexture = rendering.layerMaskThreeTexture;
|
|
34375
|
-
this.isFullscreenRendering = rendering.isFullscreenRendering;
|
|
34376
|
-
this.hasStaticBackground = rendering.hasStaticBackground;
|
|
34377
|
-
this.hasDimensionLines = rendering.hasDimensionLines;
|
|
34378
|
-
this.plannerMeasureDigits = rendering.plannerMeasureDigits;
|
|
34379
|
-
this.alternateRendererInfo = rendering.alternateRendererInfo;
|
|
34380
|
-
this.isAlternateRendering = rendering.isAlternateRendering;
|
|
34381
|
-
this.alternateRenderingsExist = rendering.alternateRenderingsExist;
|
|
34382
|
-
this.mediaServiceSaveMode = rendering.mediaServiceSaveMode;
|
|
34383
|
-
this.isLoadedFromCache = rendering.isLoadedFromCache;
|
|
34384
|
-
this.catalogData = rendering.catalogData;
|
|
34385
|
-
}
|
|
34386
|
-
}, {
|
|
34387
|
-
key: "getAllDockingPoints",
|
|
34388
|
-
value: function getAllDockingPoints(setId, elementId) {
|
|
34389
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34390
|
-
return this.uiInfo['S1']['E' + elementId]['DP'];
|
|
34391
|
-
}
|
|
34392
|
-
return this.uiInfo[setId]['E' + elementId]['DP'];
|
|
34393
|
-
}
|
|
34394
|
-
}, {
|
|
34395
|
-
key: "getHasStaticBackground",
|
|
34396
|
-
value: function getHasStaticBackground() {
|
|
34397
|
-
return this.hasStaticBackground;
|
|
34398
|
-
}
|
|
34399
|
-
}, {
|
|
34400
|
-
key: "getIsFullscreenRendering",
|
|
34401
|
-
value: function getIsFullscreenRendering() {
|
|
34402
|
-
return this.isFullscreenRendering;
|
|
34403
|
-
}
|
|
34404
|
-
}, {
|
|
34405
|
-
key: "setIsFullscreenRendering",
|
|
34406
|
-
value: function setIsFullscreenRendering(isFullscreen) {
|
|
34407
|
-
this.isFullscreenRendering = isFullscreen;
|
|
34408
|
-
}
|
|
34409
|
-
}, {
|
|
34410
|
-
key: "getHasDimensionLines",
|
|
34411
|
-
value: function getHasDimensionLines() {
|
|
34412
|
-
return this.hasDimensionLines;
|
|
34126
|
+
var DivaBasketHandler = /*#__PURE__*/function () {
|
|
34127
|
+
function DivaBasketHandler(plannerConfig) {
|
|
34128
|
+
var _this = this,
|
|
34129
|
+
_this$plannerConfig$s,
|
|
34130
|
+
_this$plannerConfig$s2,
|
|
34131
|
+
_this$plannerConfig$a;
|
|
34132
|
+
_classCallCheck(this, DivaBasketHandler);
|
|
34133
|
+
_defineProperty(this, "baskets", {});
|
|
34134
|
+
_defineProperty(this, "ignoreInitObjectWhenInitializing", false);
|
|
34135
|
+
_defineProperty(this, "plannerConfig", void 0);
|
|
34136
|
+
_defineProperty(this, "divaNr", void 0);
|
|
34137
|
+
_defineProperty(this, "loadDivaNr", void 0);
|
|
34138
|
+
_defineProperty(this, "specificSetIdToLoad", void 0);
|
|
34139
|
+
_defineProperty(this, "assignNewDivaNr", false);
|
|
34140
|
+
_defineProperty(this, "basketWasSavedWithCurrentDocVersion", void 0);
|
|
34141
|
+
_defineProperty(this, "emailConfig", void 0);
|
|
34142
|
+
_defineProperty(this, "reportConfig", void 0);
|
|
34143
|
+
_defineProperty(this, "_divaWWSHandler", void 0);
|
|
34144
|
+
_defineProperty(this, "_handler", void 0);
|
|
34145
|
+
_defineProperty(this, "_basketHandler", void 0);
|
|
34146
|
+
_defineProperty(this, "startProductId", void 0);
|
|
34147
|
+
//Only helper variable
|
|
34148
|
+
_defineProperty(this, "origConfiguration", {});
|
|
34149
|
+
/**
|
|
34150
|
+
* This function returns the originalConfiguration options
|
|
34151
|
+
*/
|
|
34152
|
+
_defineProperty(this, "getOrigConfiguration", function () {
|
|
34153
|
+
return _this.origConfiguration;
|
|
34154
|
+
});
|
|
34155
|
+
this.plannerConfig = plannerConfig;
|
|
34156
|
+
this.assignNewDivaNr = !!this.plannerConfig.assignNewDivaNr;
|
|
34157
|
+
this._handler = plannerConfig.handler;
|
|
34158
|
+
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'))) {
|
|
34159
|
+
LOG$7.error(new DivaError('Keine Öffnungsparameter', {
|
|
34160
|
+
code: 'WC_0003'
|
|
34161
|
+
}));
|
|
34413
34162
|
}
|
|
34414
|
-
|
|
34415
|
-
|
|
34416
|
-
|
|
34417
|
-
return this.plannerMeasureDigits;
|
|
34163
|
+
this.loadDivaNr = this.plannerConfig.divaNr;
|
|
34164
|
+
if (this.plannerConfig.initEmptyPlanner) {
|
|
34165
|
+
this.assignNewDivaNr = true;
|
|
34418
34166
|
}
|
|
34419
|
-
|
|
34420
|
-
|
|
34421
|
-
|
|
34422
|
-
return this.isAlternateRendering;
|
|
34167
|
+
if ((_this$plannerConfig$a = this.plannerConfig.apiConfig) !== null && _this$plannerConfig$a !== void 0 && _this$plannerConfig$a.basketService) {
|
|
34168
|
+
var _this$plannerConfig$a2, _this$plannerConfig$a3;
|
|
34169
|
+
this._basketHandler = new BasketHandler(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"]);
|
|
34423
34170
|
}
|
|
34424
|
-
}
|
|
34425
|
-
|
|
34426
|
-
|
|
34427
|
-
|
|
34171
|
+
}
|
|
34172
|
+
return _createClass(DivaBasketHandler, [{
|
|
34173
|
+
key: "actDivaNr",
|
|
34174
|
+
get: function get() {
|
|
34175
|
+
return this.divaNr;
|
|
34428
34176
|
}
|
|
34429
34177
|
}, {
|
|
34430
|
-
key: "
|
|
34431
|
-
|
|
34432
|
-
return this.
|
|
34178
|
+
key: "actBasket",
|
|
34179
|
+
get: function get() {
|
|
34180
|
+
return this.baskets[this.divaNr];
|
|
34433
34181
|
}
|
|
34434
34182
|
}, {
|
|
34435
|
-
key: "
|
|
34436
|
-
|
|
34437
|
-
|
|
34438
|
-
|
|
34439
|
-
|
|
34440
|
-
|
|
34183
|
+
key: "catalogCodexesOfOrderSets",
|
|
34184
|
+
get: function get() {
|
|
34185
|
+
var orderSets = this.baskets[this.divaNr].OrderSets;
|
|
34186
|
+
var ret = [];
|
|
34187
|
+
var _loop = function _loop(i) {
|
|
34188
|
+
if (!ret.find(function (catalogCodex) {
|
|
34189
|
+
return catalogCodex == orderSets[i].CatalogCodex;
|
|
34190
|
+
})) ret.push(orderSets[i].CatalogCodex);
|
|
34191
|
+
};
|
|
34192
|
+
for (var i = 0; i < orderSets.length; i++) {
|
|
34193
|
+
_loop(i);
|
|
34441
34194
|
}
|
|
34195
|
+
return ret;
|
|
34442
34196
|
}
|
|
34443
34197
|
}, {
|
|
34444
|
-
key: "
|
|
34445
|
-
|
|
34446
|
-
|
|
34447
|
-
var avgCamDist = 0;
|
|
34448
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34449
|
-
poly = this.uiInfo['S1']['E' + elementId]['POLYOUTLINE'];
|
|
34450
|
-
avgCamDist = this.uiInfo['S1']['E' + elementId]['AVGCAMDIST'];
|
|
34451
|
-
} else if (this.uiInfo[setId]) {
|
|
34452
|
-
poly = this.uiInfo[setId]['E' + elementId]['POLYOUTLINE'];
|
|
34453
|
-
avgCamDist = this.uiInfo[setId]['E' + elementId]['AVGCAMDIST'];
|
|
34454
|
-
} else {
|
|
34455
|
-
poly = this.uiInfo['E' + elementId]['POLYOUTLINE'];
|
|
34456
|
-
avgCamDist = this.uiInfo['E' + elementId]['AVGCAMDIST'];
|
|
34457
|
-
}
|
|
34458
|
-
if (!poly) return undefined;
|
|
34459
|
-
var points = '';
|
|
34460
|
-
for (var i = 0; i < poly.length; i++) {
|
|
34461
|
-
points += Math.round(poly[i].x * 0.01 * viewPortSize.imgWidth) + ',' + Math.round((100 - poly[i].y) * 0.01 * viewPortSize.imgHeight) + ' ';
|
|
34462
|
-
}
|
|
34463
|
-
return {
|
|
34464
|
-
points: points,
|
|
34465
|
-
avgCamDist: avgCamDist
|
|
34466
|
-
};
|
|
34198
|
+
key: "ArticlesToInitialize",
|
|
34199
|
+
get: function get() {
|
|
34200
|
+
return this.plannerConfig.articleCodexes;
|
|
34467
34201
|
}
|
|
34468
|
-
|
|
34469
|
-
//Left/Right_Bottom/Top_Back/Front
|
|
34470
34202
|
}, {
|
|
34471
|
-
key: "
|
|
34472
|
-
value: function
|
|
34473
|
-
|
|
34474
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34475
|
-
bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
|
|
34476
|
-
} else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
|
|
34477
|
-
if (!bbox) return;
|
|
34478
|
-
for (var i = 0; i < bbox.length; i++) {
|
|
34479
|
-
if (bbox[i].C == 'RTB') {
|
|
34480
|
-
return bbox[i];
|
|
34481
|
-
}
|
|
34482
|
-
}
|
|
34203
|
+
key: "updatePlannerConfig",
|
|
34204
|
+
value: function updatePlannerConfig(plannerConfig) {
|
|
34205
|
+
this.plannerConfig = plannerConfig;
|
|
34483
34206
|
}
|
|
34484
|
-
//Left/Right_Bottom/Top_Back/Front
|
|
34485
34207
|
}, {
|
|
34486
|
-
key: "
|
|
34487
|
-
value: function
|
|
34488
|
-
|
|
34489
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34490
|
-
bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
|
|
34491
|
-
} else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
|
|
34492
|
-
if (!bbox) return;
|
|
34493
|
-
for (var i = 0; i < bbox.length; i++) {
|
|
34494
|
-
if (bbox[i].C == 'LTB') {
|
|
34495
|
-
return bbox[i];
|
|
34496
|
-
}
|
|
34497
|
-
}
|
|
34208
|
+
key: "updateDivaNrInBasket",
|
|
34209
|
+
value: function updateDivaNrInBasket(divaNr) {
|
|
34210
|
+
this.loadDivaNr = divaNr;
|
|
34498
34211
|
}
|
|
34499
|
-
//Left/Right_Bottom/Top_Back/Front
|
|
34500
|
-
//elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
|
|
34501
34212
|
}, {
|
|
34502
|
-
key: "
|
|
34503
|
-
value: function
|
|
34504
|
-
|
|
34505
|
-
if (this.uiInfo == '') return null;
|
|
34506
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34507
|
-
if (!this.uiInfo['S1']['E' + elemId]) return;
|
|
34508
|
-
bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
|
|
34509
|
-
} else if (this.uiInfo[setId]) {
|
|
34510
|
-
if (!this.uiInfo[setId]['E' + elemId]) return;
|
|
34511
|
-
bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];
|
|
34512
|
-
} else {
|
|
34513
|
-
var _this$uiInfo;
|
|
34514
|
-
bbox = (_this$uiInfo = this.uiInfo['E' + elemId]) === null || _this$uiInfo === void 0 ? void 0 : _this$uiInfo['BBOX3D'];
|
|
34515
|
-
}
|
|
34516
|
-
if (!bbox) return;
|
|
34517
|
-
for (var i = 0; i < bbox.length; i++) {
|
|
34518
|
-
if (bbox[i].C == 'LBF') {
|
|
34519
|
-
return bbox[i];
|
|
34520
|
-
}
|
|
34521
|
-
}
|
|
34522
|
-
}
|
|
34523
|
-
}, {
|
|
34524
|
-
key: "getBoxPlannerCornerUIPos",
|
|
34525
|
-
value: function getBoxPlannerCornerUIPos(setId, elemId, corner) {
|
|
34526
|
-
var boxPlan = [];
|
|
34527
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34528
|
-
boxPlan = this.uiInfo['S1']['E' + elemId]['BoxPlan'];
|
|
34529
|
-
} else if (this.uiInfo[setId]) boxPlan = this.uiInfo[setId]['E' + elemId]['BoxPlan'];else boxPlan = this.uiInfo['E' + elemId]['BoxPlan'];
|
|
34530
|
-
for (var i = 0; i < boxPlan.length; i++) {
|
|
34531
|
-
if (!boxPlan[i].N || !boxPlan[i].x || !boxPlan[i].y) continue;
|
|
34532
|
-
switch (corner) {
|
|
34533
|
-
case 'TOPCENTER':
|
|
34534
|
-
if (boxPlan[i].N == 'TC') {
|
|
34535
|
-
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
34536
|
-
}
|
|
34537
|
-
break;
|
|
34538
|
-
case 'LEFTCENTER':
|
|
34539
|
-
if (boxPlan[i].N == 'LC') {
|
|
34540
|
-
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
34541
|
-
}
|
|
34542
|
-
break;
|
|
34543
|
-
case 'RIGHTCENTER':
|
|
34544
|
-
if (boxPlan[i].N == 'RC') {
|
|
34545
|
-
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
34546
|
-
}
|
|
34547
|
-
break;
|
|
34548
|
-
case 'RIGHTTOPFRONT':
|
|
34549
|
-
if (boxPlan[i].N == 'RTF') {
|
|
34550
|
-
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
34551
|
-
}
|
|
34552
|
-
break;
|
|
34553
|
-
}
|
|
34554
|
-
}
|
|
34555
|
-
return undefined;
|
|
34556
|
-
}
|
|
34557
|
-
}, {
|
|
34558
|
-
key: "getUnityCamPos",
|
|
34559
|
-
value: function getUnityCamPos() {
|
|
34560
|
-
return new Vector3(parseFloat(this.uiInfo['CAM']['X']), parseFloat(this.uiInfo['CAM']['Y']), parseFloat(this.uiInfo['CAM']['Z']));
|
|
34561
|
-
}
|
|
34562
|
-
}, {
|
|
34563
|
-
key: "getUnityCamRot",
|
|
34564
|
-
value: function getUnityCamRot() {
|
|
34565
|
-
// return new Vector3(parseFloat(this.uiInfo["CAM"]["RX"]), parseFloat(this.uiInfo["CAM"]["RY"]), parseFloat(this.uiInfo["CAM"]["RZ"]));
|
|
34566
|
-
var quatVec = new Vector4(parseFloat(this.uiInfo['CAM']['QX']), parseFloat(this.uiInfo['CAM']['QY']), parseFloat(this.uiInfo['CAM']['QZ']), parseFloat(this.uiInfo['CAM']['QW']));
|
|
34567
|
-
return quatVec;
|
|
34568
|
-
}
|
|
34569
|
-
}, {
|
|
34570
|
-
key: "getUnityFOV",
|
|
34571
|
-
value: function getUnityFOV() {
|
|
34572
|
-
return parseFloat(this.uiInfo['CAM']['FOV']);
|
|
34573
|
-
}
|
|
34574
|
-
|
|
34575
|
-
//elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
|
|
34576
|
-
//It returns the distance of an element to the ground in cm
|
|
34577
|
-
}, {
|
|
34578
|
-
key: "getDistanceToGround",
|
|
34579
|
-
value: function getDistanceToGround(setId, elementId) {
|
|
34580
|
-
setId = this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined ? 'S1' : setId;
|
|
34581
|
-
if (this.uiInfo[setId] && this.uiInfo[setId]['E' + elementId] && this.uiInfo[setId]['E' + elementId]['DIM'] && this.uiInfo[setId]['E' + elementId]['DIM']['dfg']) {
|
|
34582
|
-
return this.uiInfo[setId]['E' + elementId]['DIM']['dfg'] * 100;
|
|
34583
|
-
}
|
|
34584
|
-
return -1;
|
|
34585
|
-
}
|
|
34586
|
-
}, {
|
|
34587
|
-
key: "addUIInfo",
|
|
34588
|
-
value: function addUIInfo(uiInfo) {
|
|
34589
|
-
try {
|
|
34590
|
-
this.uiInfo = JSON.parse(uiInfo);
|
|
34591
|
-
//this.calcOutlinePolygon();
|
|
34592
|
-
} catch (error) {
|
|
34593
|
-
LOG$7.error(new DivaError('Error when parsing UI Info in rendering. Corrupt UIInfo: ' + uiInfo, {
|
|
34594
|
-
code: 'WC_0013',
|
|
34595
|
-
cause: error
|
|
34596
|
-
}));
|
|
34597
|
-
}
|
|
34598
|
-
}
|
|
34599
|
-
|
|
34600
|
-
/**
|
|
34601
|
-
* This function adds a blobImage to the rendering .
|
|
34602
|
-
* It is parsed to a base64 image.
|
|
34603
|
-
* @param blob The blob contains the image
|
|
34604
|
-
* @param isLayerMask True if the Image is the layer mask image
|
|
34605
|
-
*/
|
|
34606
|
-
}, {
|
|
34607
|
-
key: "addImgAsBlob",
|
|
34608
|
-
value: function addImgAsBlob(buffer, isLayerMask) {
|
|
34609
|
-
if (isLayerMask) this.layerMaskAsBase64 = buffer.toString('base64');else this.imgForSrc = 'data:image/jpeg;base64,' + buffer.toString('base64');
|
|
34610
|
-
}
|
|
34611
|
-
|
|
34612
|
-
//Write $("img.einBild").src
|
|
34613
|
-
}, {
|
|
34614
|
-
key: "getHQRenderingURL",
|
|
34615
|
-
value: function getHQRenderingURL() {
|
|
34616
|
-
return this.HQRenderingUrl;
|
|
34617
|
-
}
|
|
34618
|
-
}, {
|
|
34619
|
-
key: "getArURl",
|
|
34620
|
-
value: function getArURl() {
|
|
34621
|
-
return this.ArUrl;
|
|
34622
|
-
}
|
|
34623
|
-
}, {
|
|
34624
|
-
key: "getSpinURL",
|
|
34625
|
-
value: function getSpinURL() {
|
|
34626
|
-
return this.SpinUrl;
|
|
34627
|
-
}
|
|
34628
|
-
}, {
|
|
34629
|
-
key: "getImageForSrc",
|
|
34630
|
-
value: function getImageForSrc() {
|
|
34631
|
-
return this.imgForSrc;
|
|
34632
|
-
}
|
|
34633
|
-
}, {
|
|
34634
|
-
key: "containsSirvUrl",
|
|
34635
|
-
value: function containsSirvUrl() {
|
|
34636
|
-
return this.HQRenderingUrl != '';
|
|
34637
|
-
}
|
|
34638
|
-
}, {
|
|
34639
|
-
key: "setArUrl",
|
|
34640
|
-
value: function setArUrl(url) {
|
|
34641
|
-
this.ArUrl = url;
|
|
34642
|
-
}
|
|
34643
|
-
}, {
|
|
34644
|
-
key: "setSpinUrl",
|
|
34645
|
-
value: function setSpinUrl(url) {
|
|
34646
|
-
this.SpinUrl = url;
|
|
34647
|
-
}
|
|
34648
|
-
}, {
|
|
34649
|
-
key: "setHQRenderingUrl",
|
|
34650
|
-
value: function setHQRenderingUrl(url, useSirvViewer) {
|
|
34651
|
-
if (useSirvViewer) {
|
|
34652
|
-
this.HQRenderingUrl = url;
|
|
34653
|
-
} else {
|
|
34654
|
-
this.imgForSrc = url;
|
|
34655
|
-
}
|
|
34656
|
-
}
|
|
34657
|
-
|
|
34658
|
-
//*****************************************GETTER und SETTER********************************************** */
|
|
34659
|
-
}, {
|
|
34660
|
-
key: "CatalogCodex",
|
|
34661
|
-
get: function get() {
|
|
34662
|
-
return this.catalogData.catalogCodex;
|
|
34663
|
-
},
|
|
34664
|
-
set: function set(val) {
|
|
34665
|
-
this.catalogData.catalogCodex = val;
|
|
34666
|
-
}
|
|
34667
|
-
}, {
|
|
34668
|
-
key: "CatalogGUID",
|
|
34669
|
-
get: function get() {
|
|
34670
|
-
return this.catalogData.catalogGUID;
|
|
34671
|
-
},
|
|
34672
|
-
set: function set(val) {
|
|
34673
|
-
this.catalogData.catalogGUID = val;
|
|
34674
|
-
}
|
|
34675
|
-
}, {
|
|
34676
|
-
key: "IsLoadedFromCache",
|
|
34677
|
-
get: function get() {
|
|
34678
|
-
return this.isLoadedFromCache;
|
|
34679
|
-
},
|
|
34680
|
-
set: function set(val) {
|
|
34681
|
-
this.isLoadedFromCache = val;
|
|
34682
|
-
}
|
|
34683
|
-
}, {
|
|
34684
|
-
key: "PlanningHash",
|
|
34685
|
-
get: function get() {
|
|
34686
|
-
return this.planningHash;
|
|
34687
|
-
}
|
|
34688
|
-
}, {
|
|
34689
|
-
key: "RenderHash",
|
|
34690
|
-
get: function get() {
|
|
34691
|
-
return this.renderHash;
|
|
34692
|
-
}
|
|
34693
|
-
}, {
|
|
34694
|
-
key: "UrlToSavedRendering",
|
|
34695
|
-
get: function get() {
|
|
34696
|
-
return this.urlToSavedRendering;
|
|
34697
|
-
},
|
|
34698
|
-
set: function set(url) {
|
|
34699
|
-
this.urlToSavedRendering = url;
|
|
34700
|
-
}
|
|
34701
|
-
}, {
|
|
34702
|
-
key: "HasLayerMask",
|
|
34703
|
-
get: function get() {
|
|
34704
|
-
return this.hasLayerMask;
|
|
34705
|
-
},
|
|
34706
|
-
set: function set(hasLayerMask) {
|
|
34707
|
-
this.hasLayerMask = hasLayerMask;
|
|
34708
|
-
}
|
|
34709
|
-
}, {
|
|
34710
|
-
key: "RenderWidth",
|
|
34711
|
-
get: function get() {
|
|
34712
|
-
return this.renderWidth;
|
|
34713
|
-
}
|
|
34714
|
-
}, {
|
|
34715
|
-
key: "RenderHeight",
|
|
34716
|
-
get: function get() {
|
|
34717
|
-
return this.renderHeight;
|
|
34718
|
-
}
|
|
34719
|
-
}, {
|
|
34720
|
-
key: "getHasLayerMask",
|
|
34721
|
-
value: function getHasLayerMask() {
|
|
34722
|
-
return this.hasLayerMask;
|
|
34723
|
-
}
|
|
34724
|
-
}, {
|
|
34725
|
-
key: "getLayerMaskForSrc",
|
|
34726
|
-
value: function getLayerMaskForSrc() {
|
|
34727
|
-
return this.layerMaskAsBase64;
|
|
34728
|
-
}
|
|
34729
|
-
}, {
|
|
34730
|
-
key: "HasLayerMaskThreeTexture",
|
|
34731
|
-
get: function get() {
|
|
34732
|
-
return this.layerMaskThreeTexture != undefined;
|
|
34733
|
-
}
|
|
34734
|
-
}, {
|
|
34735
|
-
key: "LayerMaskThreeTexture",
|
|
34736
|
-
get: function get() {
|
|
34737
|
-
return this.layerMaskThreeTexture;
|
|
34738
|
-
},
|
|
34739
|
-
set: function set(tex) {
|
|
34740
|
-
this.layerMaskThreeTexture = tex;
|
|
34741
|
-
}
|
|
34742
|
-
/*
|
|
34743
|
-
get DoStream() {
|
|
34744
|
-
return this.doStream;
|
|
34745
|
-
}
|
|
34746
|
-
*/
|
|
34747
|
-
}, {
|
|
34748
|
-
key: "AllImgLoaded",
|
|
34749
|
-
get: function get() {
|
|
34750
|
-
return (this.imgForSrc != '' || this.HQRenderingUrl != '') && (!this.hasLayerMask || this.layerMaskAsBase64 != '');
|
|
34751
|
-
}
|
|
34752
|
-
}, {
|
|
34753
|
-
key: "UiInfoLoaded",
|
|
34754
|
-
get: function get() {
|
|
34755
|
-
return this.uiInfo != '';
|
|
34756
|
-
}
|
|
34757
|
-
}, {
|
|
34758
|
-
key: "CreationTime",
|
|
34759
|
-
get: function get() {
|
|
34760
|
-
return this.creationTime.getTime();
|
|
34761
|
-
}
|
|
34762
|
-
}, {
|
|
34763
|
-
key: "MediaServiceSaveMode",
|
|
34764
|
-
get: function get() {
|
|
34765
|
-
return this.mediaServiceSaveMode;
|
|
34766
|
-
},
|
|
34767
|
-
set: function set(mode) {
|
|
34768
|
-
this.mediaServiceSaveMode = mode;
|
|
34769
|
-
}
|
|
34770
|
-
}]);
|
|
34771
|
-
}();
|
|
34772
|
-
|
|
34773
|
-
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; }
|
|
34774
|
-
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(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; }
|
|
34775
|
-
var LOG$6 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
34776
|
-
var DivaBasketHandler = /*#__PURE__*/function () {
|
|
34777
|
-
function DivaBasketHandler(plannerConfig) {
|
|
34778
|
-
var _this = this,
|
|
34779
|
-
_this$plannerConfig$s,
|
|
34780
|
-
_this$plannerConfig$s2,
|
|
34781
|
-
_this$plannerConfig$a;
|
|
34782
|
-
_classCallCheck(this, DivaBasketHandler);
|
|
34783
|
-
_defineProperty(this, "baskets", {});
|
|
34784
|
-
_defineProperty(this, "ignoreInitObjectWhenInitializing", false);
|
|
34785
|
-
_defineProperty(this, "plannerConfig", void 0);
|
|
34786
|
-
_defineProperty(this, "divaNr", void 0);
|
|
34787
|
-
_defineProperty(this, "loadDivaNr", void 0);
|
|
34788
|
-
_defineProperty(this, "specificSetIdToLoad", void 0);
|
|
34789
|
-
_defineProperty(this, "assignNewDivaNr", false);
|
|
34790
|
-
_defineProperty(this, "basketWasSavedWithCurrentDocVersion", void 0);
|
|
34791
|
-
_defineProperty(this, "emailConfig", void 0);
|
|
34792
|
-
_defineProperty(this, "reportConfig", void 0);
|
|
34793
|
-
_defineProperty(this, "_divaWWSHandler", void 0);
|
|
34794
|
-
_defineProperty(this, "_handler", void 0);
|
|
34795
|
-
_defineProperty(this, "_basketHandler", void 0);
|
|
34796
|
-
_defineProperty(this, "startProductId", void 0);
|
|
34797
|
-
//Only helper variable
|
|
34798
|
-
_defineProperty(this, "origConfiguration", {});
|
|
34799
|
-
/**
|
|
34800
|
-
* This function returns the originalConfiguration options
|
|
34801
|
-
*/
|
|
34802
|
-
_defineProperty(this, "getOrigConfiguration", function () {
|
|
34803
|
-
return _this.origConfiguration;
|
|
34804
|
-
});
|
|
34805
|
-
this.plannerConfig = plannerConfig;
|
|
34806
|
-
this.assignNewDivaNr = !!this.plannerConfig.assignNewDivaNr;
|
|
34807
|
-
this._handler = plannerConfig.handler;
|
|
34808
|
-
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'))) {
|
|
34809
|
-
LOG$6.error(new DivaError('Keine Öffnungsparameter', {
|
|
34810
|
-
code: 'WC_0003'
|
|
34811
|
-
}));
|
|
34812
|
-
}
|
|
34813
|
-
this.loadDivaNr = this.plannerConfig.divaNr;
|
|
34814
|
-
if (this.plannerConfig.initEmptyPlanner) {
|
|
34815
|
-
this.assignNewDivaNr = true;
|
|
34816
|
-
}
|
|
34817
|
-
if ((_this$plannerConfig$a = this.plannerConfig.apiConfig) !== null && _this$plannerConfig$a !== void 0 && _this$plannerConfig$a.basketService) {
|
|
34818
|
-
var _this$plannerConfig$a2, _this$plannerConfig$a3;
|
|
34819
|
-
this._basketHandler = new BasketHandler(LOG$6, (_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"]);
|
|
34820
|
-
}
|
|
34821
|
-
}
|
|
34822
|
-
return _createClass(DivaBasketHandler, [{
|
|
34823
|
-
key: "actDivaNr",
|
|
34824
|
-
get: function get() {
|
|
34825
|
-
return this.divaNr;
|
|
34826
|
-
}
|
|
34827
|
-
}, {
|
|
34828
|
-
key: "actBasket",
|
|
34829
|
-
get: function get() {
|
|
34830
|
-
return this.baskets[this.divaNr];
|
|
34831
|
-
}
|
|
34832
|
-
}, {
|
|
34833
|
-
key: "catalogCodexesOfOrderSets",
|
|
34834
|
-
get: function get() {
|
|
34835
|
-
var orderSets = this.baskets[this.divaNr].OrderSets;
|
|
34836
|
-
var ret = [];
|
|
34837
|
-
var _loop = function _loop(i) {
|
|
34838
|
-
if (!ret.find(function (catalogCodex) {
|
|
34839
|
-
return catalogCodex == orderSets[i].CatalogCodex;
|
|
34840
|
-
})) ret.push(orderSets[i].CatalogCodex);
|
|
34841
|
-
};
|
|
34842
|
-
for (var i = 0; i < orderSets.length; i++) {
|
|
34843
|
-
_loop(i);
|
|
34844
|
-
}
|
|
34845
|
-
return ret;
|
|
34846
|
-
}
|
|
34847
|
-
}, {
|
|
34848
|
-
key: "ArticlesToInitialize",
|
|
34849
|
-
get: function get() {
|
|
34850
|
-
return this.plannerConfig.articleCodexes;
|
|
34851
|
-
}
|
|
34852
|
-
}, {
|
|
34853
|
-
key: "updatePlannerConfig",
|
|
34854
|
-
value: function updatePlannerConfig(plannerConfig) {
|
|
34855
|
-
this.plannerConfig = plannerConfig;
|
|
34856
|
-
}
|
|
34857
|
-
}, {
|
|
34858
|
-
key: "updateDivaNrInBasket",
|
|
34859
|
-
value: function updateDivaNrInBasket(divaNr) {
|
|
34860
|
-
this.loadDivaNr = divaNr;
|
|
34861
|
-
}
|
|
34862
|
-
}, {
|
|
34863
|
-
key: "setIgnoreInitObjectWhenInitializing",
|
|
34864
|
-
value: function setIgnoreInitObjectWhenInitializing() {
|
|
34865
|
-
this.ignoreInitObjectWhenInitializing = true;
|
|
34213
|
+
key: "setIgnoreInitObjectWhenInitializing",
|
|
34214
|
+
value: function setIgnoreInitObjectWhenInitializing() {
|
|
34215
|
+
this.ignoreInitObjectWhenInitializing = true;
|
|
34866
34216
|
}
|
|
34867
34217
|
}, {
|
|
34868
34218
|
key: "initializeBasket",
|
|
@@ -34875,7 +34225,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34875
34225
|
case 0:
|
|
34876
34226
|
this.basketWasSavedWithCurrentDocVersion = false;
|
|
34877
34227
|
this.startProductId = undefined;
|
|
34878
|
-
LOG$
|
|
34228
|
+
LOG$7.debug("Basket initialising. initObject is: '", this.plannerConfig, "' divaNr to load is: '" + this.loadDivaNr + "'");
|
|
34879
34229
|
if (this.ignoreInitObjectWhenInitializing) {
|
|
34880
34230
|
_context.next = 34;
|
|
34881
34231
|
break;
|
|
@@ -35041,7 +34391,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35041
34391
|
title: (_api$getI18n = api.getI18n()) === null || _api$getI18n === void 0 ? void 0 : _api$getI18n.t('configurator.no_startproduct_defined_title'),
|
|
35042
34392
|
text: (_api$getI18n2 = api.getI18n()) === null || _api$getI18n2 === void 0 ? void 0 : _api$getI18n2.t('configurator.no_startproduct_defined_text')
|
|
35043
34393
|
});
|
|
35044
|
-
LOG$
|
|
34394
|
+
LOG$7.error(new 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"!'));
|
|
35045
34395
|
case 77:
|
|
35046
34396
|
_context.next = 83;
|
|
35047
34397
|
break;
|
|
@@ -35189,12 +34539,12 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35189
34539
|
case 0:
|
|
35190
34540
|
basketFromAPI = (_dataFromApi$basket = dataFromApi.basket) !== null && _dataFromApi$basket !== void 0 ? _dataFromApi$basket : dataFromApi.Basket; //evaluateRopoEffect(basketFromAPI,);
|
|
35191
34541
|
if (origProductId) basketFromAPI.OrigProductId = origProductId;
|
|
35192
|
-
basket = _objectSpread$
|
|
34542
|
+
basket = _objectSpread$7({}, basketFromAPI);
|
|
35193
34543
|
if (!basketFromAPI) {
|
|
35194
|
-
_context5.next =
|
|
34544
|
+
_context5.next = 48;
|
|
35195
34545
|
break;
|
|
35196
34546
|
}
|
|
35197
|
-
LOG$
|
|
34547
|
+
LOG$7.debug('divaNr: ' + divaNr + ' was loaded successfully from server!');
|
|
35198
34548
|
if (basketFromAPI.OrigDivaNr) {
|
|
35199
34549
|
this.origConfiguration.originDivaNr = basketFromAPI.OrigDivaNr;
|
|
35200
34550
|
} else if (basketFromAPI.OrigCatalogCodex) {
|
|
@@ -35288,20 +34638,14 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35288
34638
|
this.baskets[newDivaNr] = new BasketData(basket);
|
|
35289
34639
|
this.baskets[newDivaNr].clearRenderData();
|
|
35290
34640
|
if (!keepOldDivaNr) this.divaNr = newDivaNr;
|
|
35291
|
-
_context5.next = 46;
|
|
35292
|
-
return DivaUtils.initCache({
|
|
35293
|
-
accountGuid: this.baskets[newDivaNr].OrderSets[0].AccountGUID,
|
|
35294
|
-
catalogCodex: this.baskets[newDivaNr].OrderSets[0].CatalogCodex
|
|
35295
|
-
});
|
|
35296
|
-
case 46:
|
|
35297
34641
|
if (this.assignNewDivaNr) {
|
|
35298
34642
|
this.baskets[newDivaNr].clearBasketClientData();
|
|
35299
34643
|
this.baskets[newDivaNr].ProductSetName = '';
|
|
35300
34644
|
}
|
|
35301
34645
|
return _context5.abrupt("return", true);
|
|
35302
|
-
case
|
|
34646
|
+
case 48:
|
|
35303
34647
|
return _context5.abrupt("return", false);
|
|
35304
|
-
case
|
|
34648
|
+
case 49:
|
|
35305
34649
|
case "end":
|
|
35306
34650
|
return _context5.stop();
|
|
35307
34651
|
}
|
|
@@ -35335,7 +34679,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35335
34679
|
key: "loadBasketByCatalogCodex",
|
|
35336
34680
|
value: function () {
|
|
35337
34681
|
var _loadBasketByCatalogCodex = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(api) {
|
|
35338
|
-
var _this$plannerConfig$s8
|
|
34682
|
+
var _this$plannerConfig$s8;
|
|
35339
34683
|
var newBasket, _this$baskets$this$di;
|
|
35340
34684
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
35341
34685
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -35346,37 +34690,23 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35346
34690
|
if (this.plannerConfig.articleCodexes) {
|
|
35347
34691
|
this.origConfiguration.originArticleCodexes = this.plannerConfig.articleCodexes;
|
|
35348
34692
|
}
|
|
35349
|
-
if (!(
|
|
34693
|
+
if (!((_this$plannerConfig$s8 = this.plannerConfig.startDivaNr) !== null && _this$plannerConfig$s8 !== void 0)) {
|
|
35350
34694
|
_context6.next = 6;
|
|
35351
34695
|
break;
|
|
35352
34696
|
}
|
|
35353
|
-
|
|
35354
|
-
_context6.next =
|
|
34697
|
+
_context6.t0 = _this$plannerConfig$s8;
|
|
34698
|
+
_context6.next = 9;
|
|
35355
34699
|
break;
|
|
35356
34700
|
case 6:
|
|
35357
34701
|
_context6.next = 8;
|
|
35358
|
-
return DivaUtils.initCache({
|
|
35359
|
-
accountGuid: this.plannerConfig.accountGuid,
|
|
35360
|
-
catalogCodex: this.plannerConfig.catalogCodex
|
|
35361
|
-
});
|
|
35362
|
-
case 8:
|
|
35363
|
-
if (!((_this$plannerConfig$s8 = this.plannerConfig.startDivaNr) !== null && _this$plannerConfig$s8 !== void 0)) {
|
|
35364
|
-
_context6.next = 12;
|
|
35365
|
-
break;
|
|
35366
|
-
}
|
|
35367
|
-
_context6.t0 = _this$plannerConfig$s8;
|
|
35368
|
-
_context6.next = 15;
|
|
35369
|
-
break;
|
|
35370
|
-
case 12:
|
|
35371
|
-
_context6.next = 14;
|
|
35372
34702
|
return this.createNewDivaNr(api);
|
|
35373
|
-
case
|
|
34703
|
+
case 8:
|
|
35374
34704
|
_context6.t0 = _context6.sent;
|
|
35375
|
-
case
|
|
34705
|
+
case 9:
|
|
35376
34706
|
this.divaNr = _context6.t0;
|
|
35377
|
-
_context6.next =
|
|
34707
|
+
_context6.next = 12;
|
|
35378
34708
|
return this.createNewBasket(api, this.plannerConfig, this.divaNr, api.getLanguage());
|
|
35379
|
-
case
|
|
34709
|
+
case 12:
|
|
35380
34710
|
newBasket = _context6.sent;
|
|
35381
34711
|
if (!this.plannerConfig.basketData) {
|
|
35382
34712
|
this.baskets[this.divaNr] = newBasket;
|
|
@@ -35393,14 +34723,8 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35393
34723
|
if (this.baskets[this.divaNr].SetPlannerInfos) ;
|
|
35394
34724
|
}
|
|
35395
34725
|
this.specificSetIdToLoad = this.plannerConfig.setId;
|
|
35396
|
-
_context6.next = 23;
|
|
35397
|
-
return DivaUtils.initCache({
|
|
35398
|
-
accountGuid: (_this$actBasket$Order = this.actBasket.OrderSets[0]) === null || _this$actBasket$Order === void 0 ? void 0 : _this$actBasket$Order.AccountGUID,
|
|
35399
|
-
catalogCodex: (_this$actBasket$Order2 = this.actBasket.OrderSets[0]) === null || _this$actBasket$Order2 === void 0 ? void 0 : _this$actBasket$Order2.CatalogCodex
|
|
35400
|
-
});
|
|
35401
|
-
case 23:
|
|
35402
34726
|
return _context6.abrupt("return", true);
|
|
35403
|
-
case
|
|
34727
|
+
case 16:
|
|
35404
34728
|
case "end":
|
|
35405
34729
|
return _context6.stop();
|
|
35406
34730
|
}
|
|
@@ -35431,7 +34755,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35431
34755
|
case 9:
|
|
35432
34756
|
_context7.prev = 9;
|
|
35433
34757
|
_context7.t0 = _context7["catch"](0);
|
|
35434
|
-
LOG$
|
|
34758
|
+
LOG$7.error(new DivaError('DivaNr konnte in der Datenbank nicht gefunden werden', {
|
|
35435
34759
|
code: 'WC_0004',
|
|
35436
34760
|
custom: {
|
|
35437
34761
|
divaNr: divaNr
|
|
@@ -35467,7 +34791,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35467
34791
|
_context8.next = 8;
|
|
35468
34792
|
break;
|
|
35469
34793
|
}
|
|
35470
|
-
LOG$
|
|
34794
|
+
LOG$7.error(new DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
|
|
35471
34795
|
code: 'WC_0005',
|
|
35472
34796
|
custom: {
|
|
35473
34797
|
productId: productId
|
|
@@ -35551,7 +34875,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35551
34875
|
_context10.next = 6;
|
|
35552
34876
|
break;
|
|
35553
34877
|
}
|
|
35554
|
-
LOG$
|
|
34878
|
+
LOG$7.error(new DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
|
|
35555
34879
|
code: 'WC_0005',
|
|
35556
34880
|
custom: {
|
|
35557
34881
|
productId: productId
|
|
@@ -35588,8 +34912,8 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35588
34912
|
CatalogGUID: initObject.catalogGuid,
|
|
35589
34913
|
AccountGUID: initObject.accountGuid,
|
|
35590
34914
|
Favorites: new Favorites()
|
|
35591
|
-
});
|
|
35592
|
-
if (!(initObject.accountGuid && !orderSet.AccountSessionGUID
|
|
34915
|
+
});
|
|
34916
|
+
if (!(initObject.accountGuid && !orderSet.AccountSessionGUID)) {
|
|
35593
34917
|
_context11.next = 5;
|
|
35594
34918
|
break;
|
|
35595
34919
|
}
|
|
@@ -35643,7 +34967,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35643
34967
|
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
35644
34968
|
while (1) switch (_context12.prev = _context12.next) {
|
|
35645
34969
|
case 0:
|
|
35646
|
-
LOG$
|
|
34970
|
+
LOG$7.startTransaction({
|
|
35647
34971
|
event: 'SaveBasketOnAPI',
|
|
35648
34972
|
eventId: 'SAVE_BASKET_ON_API',
|
|
35649
34973
|
message: 'Save Basket on API'
|
|
@@ -35682,7 +35006,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35682
35006
|
}
|
|
35683
35007
|
return _context12.abrupt("return", response);
|
|
35684
35008
|
case 19:
|
|
35685
|
-
LOG$
|
|
35009
|
+
LOG$7.successTransaction('saveBasketOnAPI');
|
|
35686
35010
|
return _context12.abrupt("return", response === null || response === void 0 ? void 0 : response._id);
|
|
35687
35011
|
case 21:
|
|
35688
35012
|
case "end":
|
|
@@ -35788,7 +35112,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35788
35112
|
if (_loop2()) continue;
|
|
35789
35113
|
}
|
|
35790
35114
|
var variantValues = article.VariantValuesParentOption;
|
|
35791
|
-
var data = _objectSpread$
|
|
35115
|
+
var data = _objectSpread$7(_objectSpread$7({}, this.actBasket), {}, {
|
|
35792
35116
|
changedValues: changedValues,
|
|
35793
35117
|
variantValues: variantValues,
|
|
35794
35118
|
isInit: isInit,
|
|
@@ -35813,7 +35137,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35813
35137
|
break;
|
|
35814
35138
|
case 3:
|
|
35815
35139
|
_context13.next = 5;
|
|
35816
|
-
return import('./PfisterWWSHandler-
|
|
35140
|
+
return import('./PfisterWWSHandler-1e137ace.js');
|
|
35817
35141
|
case 5:
|
|
35818
35142
|
_yield$import = _context13.sent;
|
|
35819
35143
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -35821,7 +35145,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35821
35145
|
return _context13.abrupt("break", 33);
|
|
35822
35146
|
case 9:
|
|
35823
35147
|
_context13.next = 11;
|
|
35824
|
-
return import('./LiviqueWWSHandler-
|
|
35148
|
+
return import('./LiviqueWWSHandler-bba79129.js');
|
|
35825
35149
|
case 11:
|
|
35826
35150
|
_yield$import2 = _context13.sent;
|
|
35827
35151
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -35829,7 +35153,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35829
35153
|
return _context13.abrupt("break", 33);
|
|
35830
35154
|
case 15:
|
|
35831
35155
|
_context13.next = 17;
|
|
35832
|
-
return import('./SeriousBasketHandler-
|
|
35156
|
+
return import('./SeriousBasketHandler-cdc26222.js');
|
|
35833
35157
|
case 17:
|
|
35834
35158
|
_yield$import3 = _context13.sent;
|
|
35835
35159
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -35837,7 +35161,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35837
35161
|
return _context13.abrupt("break", 33);
|
|
35838
35162
|
case 21:
|
|
35839
35163
|
_context13.next = 23;
|
|
35840
|
-
return import('./ProductBasketHandler-
|
|
35164
|
+
return import('./ProductBasketHandler-68455ac4.js');
|
|
35841
35165
|
case 23:
|
|
35842
35166
|
_yield$import4 = _context13.sent;
|
|
35843
35167
|
ProductWWSHandler = _yield$import4["default"];
|
|
@@ -35845,7 +35169,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35845
35169
|
return _context13.abrupt("break", 33);
|
|
35846
35170
|
case 27:
|
|
35847
35171
|
_context13.next = 29;
|
|
35848
|
-
return import('./StandardWWSHandler-
|
|
35172
|
+
return import('./StandardWWSHandler-5b7ca10e.js');
|
|
35849
35173
|
case 29:
|
|
35850
35174
|
_yield$import5 = _context13.sent;
|
|
35851
35175
|
StandardWWSHandler = _yield$import5["default"];
|
|
@@ -35877,28 +35201,28 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35877
35201
|
if (!organization.shopType) return;
|
|
35878
35202
|
if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'store') {
|
|
35879
35203
|
var _this$plannerConfig$c5;
|
|
35880
|
-
LOG$
|
|
35204
|
+
LOG$7.businessEvent('ropoEffectStoreToStore', 'Seller', 'Evaluating the ROPO Effect Store To Store', {
|
|
35881
35205
|
sourceDivaNr: sourceBasket.DivaNr,
|
|
35882
35206
|
sourceOrgId: sourceOrganizationId.id,
|
|
35883
35207
|
targetOrgId: (_this$plannerConfig$c5 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c5 === void 0 ? void 0 : _this$plannerConfig$c5._id
|
|
35884
35208
|
});
|
|
35885
35209
|
} else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'webshop') {
|
|
35886
35210
|
var _this$plannerConfig$c6;
|
|
35887
|
-
LOG$
|
|
35211
|
+
LOG$7.businessEvent('ropoEffectWebToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Web', {
|
|
35888
35212
|
sourceDivaNr: sourceBasket.DivaNr,
|
|
35889
35213
|
sourceOrgId: sourceOrganizationId.id,
|
|
35890
35214
|
targetOrgId: (_this$plannerConfig$c6 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c6 === void 0 ? void 0 : _this$plannerConfig$c6._id
|
|
35891
35215
|
});
|
|
35892
35216
|
} else if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'webshop') {
|
|
35893
35217
|
var _this$plannerConfig$c7;
|
|
35894
|
-
LOG$
|
|
35218
|
+
LOG$7.businessEvent('ropoEffectStoreToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Store', {
|
|
35895
35219
|
sourceDivaNr: sourceBasket.DivaNr,
|
|
35896
35220
|
sourceOrgId: sourceOrganizationId.id,
|
|
35897
35221
|
targetOrgId: (_this$plannerConfig$c7 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c7 === void 0 ? void 0 : _this$plannerConfig$c7._id
|
|
35898
35222
|
});
|
|
35899
35223
|
} else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'store') {
|
|
35900
35224
|
var _this$plannerConfig$c8;
|
|
35901
|
-
LOG$
|
|
35225
|
+
LOG$7.businessEvent('ropoEffectWebToStore', 'Seller', 'Evaluating the ROPO Effect Store To Web', {
|
|
35902
35226
|
sourceDivaNr: sourceBasket.DivaNr,
|
|
35903
35227
|
sourceOrgId: sourceOrganizationId.id,
|
|
35904
35228
|
targetOrgId: (_this$plannerConfig$c8 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c8 === void 0 ? void 0 : _this$plannerConfig$c8._id
|
|
@@ -35906,7 +35230,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35906
35230
|
}
|
|
35907
35231
|
} catch (e) {
|
|
35908
35232
|
var _this$plannerConfig$c9;
|
|
35909
|
-
LOG$
|
|
35233
|
+
LOG$7.error(new DivaError('Error on Evaluating ROPO Effect', {
|
|
35910
35234
|
code: 'SELLER_0006',
|
|
35911
35235
|
cause: e,
|
|
35912
35236
|
custom: {
|
|
@@ -35920,7 +35244,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35920
35244
|
}]);
|
|
35921
35245
|
}();
|
|
35922
35246
|
|
|
35923
|
-
var LOG$
|
|
35247
|
+
var LOG$6 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
35924
35248
|
var ViewPointHandler = /*#__PURE__*/function () {
|
|
35925
35249
|
function ViewPointHandler() {
|
|
35926
35250
|
_classCallCheck(this, ViewPointHandler);
|
|
@@ -36143,22 +35467,22 @@ var ViewPointHandler = /*#__PURE__*/function () {
|
|
|
36143
35467
|
var roomListObj = JSON.parse(roomlist);
|
|
36144
35468
|
var roomIsSel = true;
|
|
36145
35469
|
for (var roomCodex in roomListObj) {
|
|
36146
|
-
LOG$
|
|
35470
|
+
LOG$6.debug('Successfully Init roomList with Codex ' + roomCodex, 'ViewPointHandler - initRoomList');
|
|
36147
35471
|
var curRoom = roomListObj[roomCodex];
|
|
36148
35472
|
var mainCategory = '#WG#';
|
|
36149
35473
|
if (!this.staticRoomMainCategories.has(roomCodex)) {
|
|
36150
|
-
LOG$
|
|
35474
|
+
LOG$6.error(new DivaError('Error when parsing preview URL for a viewPoint. Please add a retailerMainCategory for this catalog in the CE!', {
|
|
36151
35475
|
code: 'WC_0013'
|
|
36152
35476
|
}));
|
|
36153
35477
|
} else {
|
|
36154
35478
|
var categories = this.staticRoomMainCategories.get(roomCodex);
|
|
36155
35479
|
if (categories.length == 0) {
|
|
36156
|
-
LOG$
|
|
35480
|
+
LOG$6.error(new DivaError('Error when parsing preview URL for a viewPoint. Please add a retailerMainCategory for this catalog in the CE!', {
|
|
36157
35481
|
code: 'WC_0013'
|
|
36158
35482
|
}));
|
|
36159
35483
|
} else {
|
|
36160
35484
|
if (categories.length > 1) {
|
|
36161
|
-
LOG$
|
|
35485
|
+
LOG$6.error(new DivaError('Error when parsing preview URL for a viewPoint. There is more than one Catalog loaded. Decide a strategy which mainCategory should be taken!', {
|
|
36162
35486
|
code: 'WC_0013'
|
|
36163
35487
|
}));
|
|
36164
35488
|
}
|
|
@@ -36172,7 +35496,7 @@ var ViewPointHandler = /*#__PURE__*/function () {
|
|
|
36172
35496
|
previewUrl = previewUrl.replace('#WG#', mainCategory);
|
|
36173
35497
|
}
|
|
36174
35498
|
if (curRoom.VP[i].R && curRoom.VP[i].R.indexOf(':') == -1) {
|
|
36175
|
-
LOG$
|
|
35499
|
+
LOG$6.error(new 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, {
|
|
36176
35500
|
code: 'WC_0013'
|
|
36177
35501
|
}));
|
|
36178
35502
|
}
|
|
@@ -36270,7 +35594,7 @@ var ViewPointHandler = /*#__PURE__*/function () {
|
|
|
36270
35594
|
this.navInfo3D.rotVert = 0;
|
|
36271
35595
|
this.navInfo3D.rotHori = 0;
|
|
36272
35596
|
} else {
|
|
36273
|
-
LOG$
|
|
35597
|
+
LOG$6.debug('There is no static frontend viewpoint room: ' + roomCodex);
|
|
36274
35598
|
}
|
|
36275
35599
|
} else if (this.curRoomCodex == roominfo.codex) {
|
|
36276
35600
|
roominfo.sel = false;
|
|
@@ -36415,207 +35739,415 @@ var ViewPointHandler = /*#__PURE__*/function () {
|
|
|
36415
35739
|
}]);
|
|
36416
35740
|
}();
|
|
36417
35741
|
|
|
36418
|
-
|
|
36419
|
-
|
|
36420
|
-
var
|
|
36421
|
-
|
|
36422
|
-
|
|
36423
|
-
|
|
36424
|
-
|
|
36425
|
-
|
|
36426
|
-
_defineProperty(this, "
|
|
36427
|
-
_defineProperty(this, "
|
|
36428
|
-
_defineProperty(this, "
|
|
36429
|
-
_defineProperty(this, "
|
|
36430
|
-
|
|
36431
|
-
|
|
36432
|
-
|
|
36433
|
-
|
|
36434
|
-
|
|
36435
|
-
this
|
|
35742
|
+
//This class saves all informations needed for a rendering
|
|
35743
|
+
var LOG$5 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
35744
|
+
var Rendering = /*#__PURE__*/function () {
|
|
35745
|
+
function Rendering(planningHash, renderHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, hasLayerMask, hasStaticBG, mediaServiceSaveMode, alternateRenderingsExist, alternateRendererInfo) {
|
|
35746
|
+
_classCallCheck(this, Rendering);
|
|
35747
|
+
_defineProperty(this, "planningHash", void 0);
|
|
35748
|
+
_defineProperty(this, "renderHash", void 0);
|
|
35749
|
+
_defineProperty(this, "creationTime", void 0);
|
|
35750
|
+
_defineProperty(this, "renderWidth", void 0);
|
|
35751
|
+
_defineProperty(this, "renderHeight", void 0);
|
|
35752
|
+
_defineProperty(this, "uiInfo", void 0);
|
|
35753
|
+
_defineProperty(this, "urlToSavedRendering", void 0);
|
|
35754
|
+
// viewPoint: string;
|
|
35755
|
+
// private posInfo: any;
|
|
35756
|
+
//private doStream: boolean; Streaming over 3D Host is deprected
|
|
35757
|
+
//private byteChunkArr: any;
|
|
35758
|
+
//private byteChunkLayerMaskArr: any;
|
|
35759
|
+
_defineProperty(this, "hasLayerMask", void 0);
|
|
35760
|
+
//private imgBytes: any;
|
|
35761
|
+
_defineProperty(this, "imgForSrc", void 0);
|
|
35762
|
+
_defineProperty(this, "layerMaskAsBase64", void 0);
|
|
35763
|
+
_defineProperty(this, "layerMaskThreeTexture", void 0);
|
|
35764
|
+
_defineProperty(this, "isFullscreenRendering", void 0);
|
|
35765
|
+
_defineProperty(this, "hasStaticBackground", void 0);
|
|
35766
|
+
_defineProperty(this, "hasDimensionLines", void 0);
|
|
35767
|
+
_defineProperty(this, "plannerMeasureDigits", void 0);
|
|
35768
|
+
_defineProperty(this, "alternateRendererInfo", void 0);
|
|
35769
|
+
_defineProperty(this, "isAlternateRendering", void 0);
|
|
35770
|
+
_defineProperty(this, "alternateRenderingsExist", void 0);
|
|
35771
|
+
_defineProperty(this, "mediaServiceSaveMode", void 0);
|
|
35772
|
+
_defineProperty(this, "catalogData", void 0);
|
|
35773
|
+
this.planningHash = planningHash;
|
|
35774
|
+
this.renderHash = renderHash;
|
|
35775
|
+
this.renderWidth = width;
|
|
35776
|
+
this.renderHeight = height;
|
|
35777
|
+
this.uiInfo = '';
|
|
35778
|
+
this.imgForSrc = '';
|
|
35779
|
+
this.layerMaskAsBase64 = '';
|
|
35780
|
+
this.isFullscreenRendering = isFullscreenRendering;
|
|
35781
|
+
this.hasDimensionLines = hasDimensionLines;
|
|
35782
|
+
this.plannerMeasureDigits = plannerMeasureDigits;
|
|
35783
|
+
this.hasLayerMask = hasLayerMask;
|
|
35784
|
+
this.creationTime = new Date();
|
|
35785
|
+
this.layerMaskThreeTexture = undefined;
|
|
35786
|
+
this.hasStaticBackground = hasStaticBG;
|
|
35787
|
+
this.mediaServiceSaveMode = mediaServiceSaveMode;
|
|
35788
|
+
this.urlToSavedRendering = '';
|
|
35789
|
+
this.catalogData = {
|
|
35790
|
+
catalogCodex: '',
|
|
35791
|
+
catalogGUID: ''
|
|
35792
|
+
};
|
|
35793
|
+
if (alternateRendererInfo != undefined) this.isAlternateRendering = true;else this.isAlternateRendering = false;
|
|
35794
|
+
this.alternateRendererInfo = alternateRendererInfo;
|
|
35795
|
+
this.alternateRenderingsExist = !!alternateRenderingsExist;
|
|
36436
35796
|
}
|
|
36437
|
-
return _createClass(
|
|
36438
|
-
key: "
|
|
36439
|
-
value: function
|
|
36440
|
-
this.
|
|
35797
|
+
return _createClass(Rendering, [{
|
|
35798
|
+
key: "clone",
|
|
35799
|
+
value: function clone(rendering) {
|
|
35800
|
+
this.planningHash = rendering.planningHash;
|
|
35801
|
+
this.renderHash = rendering.renderHash;
|
|
35802
|
+
this.creationTime = rendering.creationTime;
|
|
35803
|
+
this.renderWidth = rendering.renderWidth;
|
|
35804
|
+
this.renderHeight = rendering.renderHeight;
|
|
35805
|
+
this.uiInfo = rendering.uiInfo;
|
|
35806
|
+
this.urlToSavedRendering = rendering.urlToSavedRendering;
|
|
35807
|
+
this.hasLayerMask = rendering.hasLayerMask;
|
|
35808
|
+
this.imgForSrc = rendering.imgForSrc;
|
|
35809
|
+
this.layerMaskAsBase64 = rendering.layerMaskAsBase64;
|
|
35810
|
+
this.layerMaskThreeTexture = rendering.layerMaskThreeTexture;
|
|
35811
|
+
this.isFullscreenRendering = rendering.isFullscreenRendering;
|
|
35812
|
+
this.hasStaticBackground = rendering.hasStaticBackground;
|
|
35813
|
+
this.hasDimensionLines = rendering.hasDimensionLines;
|
|
35814
|
+
this.plannerMeasureDigits = rendering.plannerMeasureDigits;
|
|
35815
|
+
this.alternateRendererInfo = rendering.alternateRendererInfo;
|
|
35816
|
+
this.isAlternateRendering = rendering.isAlternateRendering;
|
|
35817
|
+
this.alternateRenderingsExist = rendering.alternateRenderingsExist;
|
|
35818
|
+
this.mediaServiceSaveMode = rendering.mediaServiceSaveMode;
|
|
35819
|
+
this.catalogData = rendering.catalogData;
|
|
36441
35820
|
}
|
|
36442
35821
|
}, {
|
|
36443
|
-
key: "
|
|
36444
|
-
value: function
|
|
36445
|
-
this.
|
|
35822
|
+
key: "getAllDockingPoints",
|
|
35823
|
+
value: function getAllDockingPoints(setId, elementId) {
|
|
35824
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35825
|
+
return this.uiInfo['S1']['E' + elementId]['DP'];
|
|
35826
|
+
}
|
|
35827
|
+
return this.uiInfo[setId]['E' + elementId]['DP'];
|
|
36446
35828
|
}
|
|
36447
35829
|
}, {
|
|
36448
|
-
key: "
|
|
36449
|
-
value: function
|
|
36450
|
-
this.
|
|
35830
|
+
key: "getHasStaticBackground",
|
|
35831
|
+
value: function getHasStaticBackground() {
|
|
35832
|
+
return this.hasStaticBackground;
|
|
36451
35833
|
}
|
|
36452
35834
|
}, {
|
|
36453
|
-
key: "
|
|
36454
|
-
value: function
|
|
36455
|
-
this.
|
|
35835
|
+
key: "getIsFullscreenRendering",
|
|
35836
|
+
value: function getIsFullscreenRendering() {
|
|
35837
|
+
return this.isFullscreenRendering;
|
|
36456
35838
|
}
|
|
36457
35839
|
}, {
|
|
36458
|
-
key: "
|
|
36459
|
-
value: function () {
|
|
36460
|
-
|
|
36461
|
-
|
|
36462
|
-
|
|
36463
|
-
|
|
36464
|
-
|
|
36465
|
-
|
|
36466
|
-
|
|
36467
|
-
|
|
36468
|
-
|
|
36469
|
-
|
|
36470
|
-
|
|
36471
|
-
|
|
36472
|
-
|
|
36473
|
-
|
|
36474
|
-
|
|
36475
|
-
|
|
36476
|
-
|
|
36477
|
-
|
|
36478
|
-
|
|
36479
|
-
|
|
36480
|
-
|
|
36481
|
-
|
|
36482
|
-
|
|
36483
|
-
|
|
36484
|
-
|
|
36485
|
-
|
|
36486
|
-
|
|
36487
|
-
|
|
36488
|
-
|
|
36489
|
-
|
|
36490
|
-
|
|
36491
|
-
|
|
36492
|
-
|
|
36493
|
-
|
|
36494
|
-
if (!response.ok) {
|
|
36495
|
-
_context.next = 20;
|
|
36496
|
-
break;
|
|
36497
|
-
}
|
|
36498
|
-
_context.next = 11;
|
|
36499
|
-
return response.json();
|
|
36500
|
-
case 11:
|
|
36501
|
-
result = _context.sent;
|
|
36502
|
-
if (!(result.data.length > 0)) {
|
|
36503
|
-
_context.next = 17;
|
|
36504
|
-
break;
|
|
36505
|
-
}
|
|
36506
|
-
LOG$4.successTransaction('ON_REQUEST_RENDERING', {});
|
|
36507
|
-
return _context.abrupt("return", result.data[0].url);
|
|
36508
|
-
case 17:
|
|
36509
|
-
error = true;
|
|
36510
|
-
case 18:
|
|
36511
|
-
_context.next = 21;
|
|
36512
|
-
break;
|
|
36513
|
-
case 20:
|
|
36514
|
-
error = true;
|
|
36515
|
-
case 21:
|
|
36516
|
-
if (error && logOnError) {
|
|
36517
|
-
LOG$4.errorTransaction('ON_REQUEST_RENDERING', 'WC_0015', 'loadRenderingFromCache not found (functionType C3D). Load rendering from Cache not successfull. Hash: ' + hash + 'response: ' + response);
|
|
36518
|
-
}
|
|
36519
|
-
LOG$4.successTransaction('ON_REQUEST_RENDERING', {});
|
|
36520
|
-
return _context.abrupt("return", '');
|
|
36521
|
-
case 24:
|
|
36522
|
-
case "end":
|
|
36523
|
-
return _context.stop();
|
|
36524
|
-
}
|
|
36525
|
-
}, _callee, this);
|
|
36526
|
-
}));
|
|
36527
|
-
function loadRenderingFromCache(_x) {
|
|
36528
|
-
return _loadRenderingFromCache.apply(this, arguments);
|
|
35840
|
+
key: "setIsFullscreenRendering",
|
|
35841
|
+
value: function setIsFullscreenRendering(isFullscreen) {
|
|
35842
|
+
this.isFullscreenRendering = isFullscreen;
|
|
35843
|
+
}
|
|
35844
|
+
}, {
|
|
35845
|
+
key: "getHasDimensionLines",
|
|
35846
|
+
value: function getHasDimensionLines() {
|
|
35847
|
+
return this.hasDimensionLines;
|
|
35848
|
+
}
|
|
35849
|
+
}, {
|
|
35850
|
+
key: "getPlannerMeasureDigits",
|
|
35851
|
+
value: function getPlannerMeasureDigits() {
|
|
35852
|
+
return this.plannerMeasureDigits;
|
|
35853
|
+
}
|
|
35854
|
+
}, {
|
|
35855
|
+
key: "getIsAlternateRendering",
|
|
35856
|
+
value: function getIsAlternateRendering() {
|
|
35857
|
+
return this.isAlternateRendering;
|
|
35858
|
+
}
|
|
35859
|
+
}, {
|
|
35860
|
+
key: "getAlternateRenderInfo",
|
|
35861
|
+
value: function getAlternateRenderInfo() {
|
|
35862
|
+
return this.alternateRendererInfo;
|
|
35863
|
+
}
|
|
35864
|
+
}, {
|
|
35865
|
+
key: "getAlternateRenderingsExist",
|
|
35866
|
+
value: function getAlternateRenderingsExist() {
|
|
35867
|
+
return this.alternateRenderingsExist;
|
|
35868
|
+
}
|
|
35869
|
+
}, {
|
|
35870
|
+
key: "hasUIInfosOfElement",
|
|
35871
|
+
value: function hasUIInfosOfElement(setId, elementid) {
|
|
35872
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35873
|
+
return this.uiInfo['S1']['E' + elementid] != undefined;
|
|
35874
|
+
} else {
|
|
35875
|
+
return this.uiInfo[setId] != undefined && this.uiInfo[setId]['E' + elementid] != undefined;
|
|
36529
35876
|
}
|
|
36530
|
-
|
|
36531
|
-
}()
|
|
35877
|
+
}
|
|
36532
35878
|
}, {
|
|
36533
|
-
key: "
|
|
36534
|
-
value: function
|
|
36535
|
-
|
|
36536
|
-
|
|
36537
|
-
|
|
35879
|
+
key: "getOutlinePolygonForSVG",
|
|
35880
|
+
value: function getOutlinePolygonForSVG(setId, elementId, viewPortSize) {
|
|
35881
|
+
var poly = [];
|
|
35882
|
+
var avgCamDist = 0;
|
|
35883
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35884
|
+
poly = this.uiInfo['S1']['E' + elementId]['POLYOUTLINE'];
|
|
35885
|
+
avgCamDist = this.uiInfo['S1']['E' + elementId]['AVGCAMDIST'];
|
|
35886
|
+
} else if (this.uiInfo[setId]) {
|
|
35887
|
+
poly = this.uiInfo[setId]['E' + elementId]['POLYOUTLINE'];
|
|
35888
|
+
avgCamDist = this.uiInfo[setId]['E' + elementId]['AVGCAMDIST'];
|
|
35889
|
+
} else {
|
|
35890
|
+
poly = this.uiInfo['E' + elementId]['POLYOUTLINE'];
|
|
35891
|
+
avgCamDist = this.uiInfo['E' + elementId]['AVGCAMDIST'];
|
|
36538
35892
|
}
|
|
36539
|
-
|
|
36540
|
-
var
|
|
36541
|
-
var
|
|
36542
|
-
|
|
36543
|
-
bytes[i] = binary_string.charCodeAt(i);
|
|
35893
|
+
if (!poly) return undefined;
|
|
35894
|
+
var points = '';
|
|
35895
|
+
for (var i = 0; i < poly.length; i++) {
|
|
35896
|
+
points += Math.round(poly[i].x * 0.01 * viewPortSize.imgWidth) + ',' + Math.round((100 - poly[i].y) * 0.01 * viewPortSize.imgHeight) + ' ';
|
|
36544
35897
|
}
|
|
36545
|
-
|
|
36546
|
-
|
|
36547
|
-
|
|
36548
|
-
|
|
36549
|
-
return blob;
|
|
35898
|
+
return {
|
|
35899
|
+
points: points,
|
|
35900
|
+
avgCamDist: avgCamDist
|
|
35901
|
+
};
|
|
36550
35902
|
}
|
|
35903
|
+
|
|
35904
|
+
//Left/Right_Bottom/Top_Back/Front
|
|
36551
35905
|
}, {
|
|
36552
|
-
key: "
|
|
36553
|
-
value: function () {
|
|
36554
|
-
var
|
|
36555
|
-
|
|
36556
|
-
|
|
36557
|
-
|
|
36558
|
-
|
|
36559
|
-
|
|
36560
|
-
|
|
36561
|
-
|
|
36562
|
-
|
|
36563
|
-
data = new FormData();
|
|
36564
|
-
data.append('file', imageBlob);
|
|
36565
|
-
mediaItem = {
|
|
36566
|
-
organizationId: this.organizationId,
|
|
36567
|
-
mediaType: 'PCT',
|
|
36568
|
-
fileName: hash + '.jpg'
|
|
36569
|
-
};
|
|
36570
|
-
data.append('mediaItem', JSON.stringify(mediaItem));
|
|
36571
|
-
mediaItemRef = {
|
|
36572
|
-
functionType: 'P2D',
|
|
36573
|
-
planningHash: hash,
|
|
36574
|
-
catalogCodex: catalogCodex,
|
|
36575
|
-
catalogGuid: catalogGUID
|
|
36576
|
-
};
|
|
36577
|
-
data.append('mediaItemRef', JSON.stringify(mediaItemRef));
|
|
36578
|
-
_context2.next = 11;
|
|
36579
|
-
return fetch(url, {
|
|
36580
|
-
method: 'POST',
|
|
36581
|
-
body: data,
|
|
36582
|
-
headers: {
|
|
36583
|
-
'X-API-KEY': this.mediaServiceApiKey
|
|
36584
|
-
}
|
|
36585
|
-
});
|
|
36586
|
-
case 11:
|
|
36587
|
-
response = _context2.sent;
|
|
36588
|
-
if (!response.ok) {
|
|
36589
|
-
_context2.next = 20;
|
|
36590
|
-
break;
|
|
36591
|
-
}
|
|
36592
|
-
_context2.next = 15;
|
|
36593
|
-
return response.json();
|
|
36594
|
-
case 15:
|
|
36595
|
-
res = _context2.sent;
|
|
36596
|
-
LOG$4.debug('Successfully saved 2D Planning in media Service. URL: ' + res.url);
|
|
36597
|
-
return _context2.abrupt("return", res.url);
|
|
36598
|
-
case 20:
|
|
36599
|
-
LOG$4.error(new DivaError('Error when saving the Planning2D image on mediaService. Hash: ' + hash + 'response: ' + response, {
|
|
36600
|
-
code: 'WC_0016'
|
|
36601
|
-
}));
|
|
36602
|
-
case 21:
|
|
36603
|
-
DivaUtils.endSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
|
|
36604
|
-
return _context2.abrupt("return", '');
|
|
36605
|
-
case 23:
|
|
36606
|
-
case "end":
|
|
36607
|
-
return _context2.stop();
|
|
36608
|
-
}
|
|
36609
|
-
}, _callee2, this);
|
|
36610
|
-
}));
|
|
36611
|
-
function savePlanning2DPermanent(_x2, _x3, _x4, _x5) {
|
|
36612
|
-
return _savePlanning2DPermanent.apply(this, arguments);
|
|
35906
|
+
key: "getRightTopBackUIPos",
|
|
35907
|
+
value: function getRightTopBackUIPos(setId, elemId) {
|
|
35908
|
+
var bbox = null;
|
|
35909
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35910
|
+
bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
|
|
35911
|
+
} else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
|
|
35912
|
+
if (!bbox) return;
|
|
35913
|
+
for (var i = 0; i < bbox.length; i++) {
|
|
35914
|
+
if (bbox[i].C == 'RTB') {
|
|
35915
|
+
return bbox[i];
|
|
35916
|
+
}
|
|
36613
35917
|
}
|
|
36614
|
-
|
|
36615
|
-
|
|
35918
|
+
}
|
|
35919
|
+
//Left/Right_Bottom/Top_Back/Front
|
|
35920
|
+
}, {
|
|
35921
|
+
key: "getLeftTopBackUIPos",
|
|
35922
|
+
value: function getLeftTopBackUIPos(setId, elemId) {
|
|
35923
|
+
var bbox = null;
|
|
35924
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35925
|
+
bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
|
|
35926
|
+
} else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
|
|
35927
|
+
if (!bbox) return;
|
|
35928
|
+
for (var i = 0; i < bbox.length; i++) {
|
|
35929
|
+
if (bbox[i].C == 'LTB') {
|
|
35930
|
+
return bbox[i];
|
|
35931
|
+
}
|
|
35932
|
+
}
|
|
35933
|
+
}
|
|
35934
|
+
//Left/Right_Bottom/Top_Back/Front
|
|
35935
|
+
//elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
|
|
35936
|
+
}, {
|
|
35937
|
+
key: "getLeftBottomFrontUIPos",
|
|
35938
|
+
value: function getLeftBottomFrontUIPos(setId, elemId) {
|
|
35939
|
+
var bbox = null;
|
|
35940
|
+
if (this.uiInfo == '') return null;
|
|
35941
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35942
|
+
if (!this.uiInfo['S1']['E' + elemId]) return;
|
|
35943
|
+
bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
|
|
35944
|
+
} else if (this.uiInfo[setId]) {
|
|
35945
|
+
if (!this.uiInfo[setId]['E' + elemId]) return;
|
|
35946
|
+
bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];
|
|
35947
|
+
} else {
|
|
35948
|
+
var _this$uiInfo;
|
|
35949
|
+
bbox = (_this$uiInfo = this.uiInfo['E' + elemId]) === null || _this$uiInfo === void 0 ? void 0 : _this$uiInfo['BBOX3D'];
|
|
35950
|
+
}
|
|
35951
|
+
if (!bbox) return;
|
|
35952
|
+
for (var i = 0; i < bbox.length; i++) {
|
|
35953
|
+
if (bbox[i].C == 'LBF') {
|
|
35954
|
+
return bbox[i];
|
|
35955
|
+
}
|
|
35956
|
+
}
|
|
35957
|
+
}
|
|
35958
|
+
}, {
|
|
35959
|
+
key: "getBoxPlannerCornerUIPos",
|
|
35960
|
+
value: function getBoxPlannerCornerUIPos(setId, elemId, corner) {
|
|
35961
|
+
var boxPlan = [];
|
|
35962
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35963
|
+
boxPlan = this.uiInfo['S1']['E' + elemId]['BoxPlan'];
|
|
35964
|
+
} else if (this.uiInfo[setId]) boxPlan = this.uiInfo[setId]['E' + elemId]['BoxPlan'];else boxPlan = this.uiInfo['E' + elemId]['BoxPlan'];
|
|
35965
|
+
for (var i = 0; i < boxPlan.length; i++) {
|
|
35966
|
+
if (!boxPlan[i].N || !boxPlan[i].x || !boxPlan[i].y) continue;
|
|
35967
|
+
switch (corner) {
|
|
35968
|
+
case 'TOPCENTER':
|
|
35969
|
+
if (boxPlan[i].N == 'TC') {
|
|
35970
|
+
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
35971
|
+
}
|
|
35972
|
+
break;
|
|
35973
|
+
case 'LEFTCENTER':
|
|
35974
|
+
if (boxPlan[i].N == 'LC') {
|
|
35975
|
+
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
35976
|
+
}
|
|
35977
|
+
break;
|
|
35978
|
+
case 'RIGHTCENTER':
|
|
35979
|
+
if (boxPlan[i].N == 'RC') {
|
|
35980
|
+
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
35981
|
+
}
|
|
35982
|
+
break;
|
|
35983
|
+
case 'RIGHTTOPFRONT':
|
|
35984
|
+
if (boxPlan[i].N == 'RTF') {
|
|
35985
|
+
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
35986
|
+
}
|
|
35987
|
+
break;
|
|
35988
|
+
}
|
|
35989
|
+
}
|
|
35990
|
+
return undefined;
|
|
35991
|
+
}
|
|
35992
|
+
}, {
|
|
35993
|
+
key: "getUnityCamPos",
|
|
35994
|
+
value: function getUnityCamPos() {
|
|
35995
|
+
return new Vector3(parseFloat(this.uiInfo['CAM']['X']), parseFloat(this.uiInfo['CAM']['Y']), parseFloat(this.uiInfo['CAM']['Z']));
|
|
35996
|
+
}
|
|
35997
|
+
}, {
|
|
35998
|
+
key: "getUnityCamRot",
|
|
35999
|
+
value: function getUnityCamRot() {
|
|
36000
|
+
var quatVec = new Vector4(parseFloat(this.uiInfo['CAM']['QX']), parseFloat(this.uiInfo['CAM']['QY']), parseFloat(this.uiInfo['CAM']['QZ']), parseFloat(this.uiInfo['CAM']['QW']));
|
|
36001
|
+
return quatVec;
|
|
36002
|
+
}
|
|
36003
|
+
}, {
|
|
36004
|
+
key: "getUnityFOV",
|
|
36005
|
+
value: function getUnityFOV() {
|
|
36006
|
+
return parseFloat(this.uiInfo['CAM']['FOV']);
|
|
36007
|
+
}
|
|
36008
|
+
|
|
36009
|
+
//elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
|
|
36010
|
+
//It returns the distance of an element to the ground in cm
|
|
36011
|
+
}, {
|
|
36012
|
+
key: "getDistanceToGround",
|
|
36013
|
+
value: function getDistanceToGround(setId, elementId) {
|
|
36014
|
+
setId = this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined ? 'S1' : setId;
|
|
36015
|
+
if (this.uiInfo[setId] && this.uiInfo[setId]['E' + elementId] && this.uiInfo[setId]['E' + elementId]['DIM'] && this.uiInfo[setId]['E' + elementId]['DIM']['dfg']) {
|
|
36016
|
+
return this.uiInfo[setId]['E' + elementId]['DIM']['dfg'] * 100;
|
|
36017
|
+
}
|
|
36018
|
+
return -1;
|
|
36019
|
+
}
|
|
36020
|
+
}, {
|
|
36021
|
+
key: "addUIInfo",
|
|
36022
|
+
value: function addUIInfo(uiInfo) {
|
|
36023
|
+
try {
|
|
36024
|
+
this.uiInfo = JSON.parse(uiInfo);
|
|
36025
|
+
} catch (error) {
|
|
36026
|
+
LOG$5.error(new DivaError('Error when parsing UI Info in rendering. Corrupt UIInfo: ' + uiInfo, {
|
|
36027
|
+
code: 'WC_0013',
|
|
36028
|
+
cause: error
|
|
36029
|
+
}));
|
|
36030
|
+
}
|
|
36031
|
+
}
|
|
36032
|
+
|
|
36033
|
+
/**
|
|
36034
|
+
* This function adds a blobImage to the rendering .
|
|
36035
|
+
* It is parsed to a base64 image.
|
|
36036
|
+
* @param blob The blob contains the image
|
|
36037
|
+
* @param isLayerMask True if the Image is the layer mask image
|
|
36038
|
+
*/
|
|
36039
|
+
}, {
|
|
36040
|
+
key: "addImgAsBlob",
|
|
36041
|
+
value: function addImgAsBlob(buffer, isLayerMask) {
|
|
36042
|
+
if (isLayerMask) this.layerMaskAsBase64 = buffer.toString('base64');else this.imgForSrc = 'data:image/jpeg;base64,' + buffer.toString('base64');
|
|
36043
|
+
}
|
|
36044
|
+
}, {
|
|
36045
|
+
key: "getImageForSrc",
|
|
36046
|
+
value: function getImageForSrc() {
|
|
36047
|
+
return this.imgForSrc;
|
|
36048
|
+
}
|
|
36049
|
+
|
|
36050
|
+
//*****************************************GETTER und SETTER********************************************** */
|
|
36051
|
+
}, {
|
|
36052
|
+
key: "CatalogCodex",
|
|
36053
|
+
get: function get() {
|
|
36054
|
+
return this.catalogData.catalogCodex;
|
|
36055
|
+
},
|
|
36056
|
+
set: function set(val) {
|
|
36057
|
+
this.catalogData.catalogCodex = val;
|
|
36058
|
+
}
|
|
36059
|
+
}, {
|
|
36060
|
+
key: "CatalogGUID",
|
|
36061
|
+
get: function get() {
|
|
36062
|
+
return this.catalogData.catalogGUID;
|
|
36063
|
+
},
|
|
36064
|
+
set: function set(val) {
|
|
36065
|
+
this.catalogData.catalogGUID = val;
|
|
36066
|
+
}
|
|
36067
|
+
}, {
|
|
36068
|
+
key: "PlanningHash",
|
|
36069
|
+
get: function get() {
|
|
36070
|
+
return this.planningHash;
|
|
36071
|
+
}
|
|
36072
|
+
}, {
|
|
36073
|
+
key: "RenderHash",
|
|
36074
|
+
get: function get() {
|
|
36075
|
+
return this.renderHash;
|
|
36076
|
+
}
|
|
36077
|
+
}, {
|
|
36078
|
+
key: "UrlToSavedRendering",
|
|
36079
|
+
get: function get() {
|
|
36080
|
+
return this.urlToSavedRendering;
|
|
36081
|
+
},
|
|
36082
|
+
set: function set(url) {
|
|
36083
|
+
this.urlToSavedRendering = url;
|
|
36084
|
+
}
|
|
36085
|
+
}, {
|
|
36086
|
+
key: "HasLayerMask",
|
|
36087
|
+
get: function get() {
|
|
36088
|
+
return this.hasLayerMask;
|
|
36089
|
+
},
|
|
36090
|
+
set: function set(hasLayerMask) {
|
|
36091
|
+
this.hasLayerMask = hasLayerMask;
|
|
36092
|
+
}
|
|
36093
|
+
}, {
|
|
36094
|
+
key: "RenderWidth",
|
|
36095
|
+
get: function get() {
|
|
36096
|
+
return this.renderWidth;
|
|
36097
|
+
}
|
|
36098
|
+
}, {
|
|
36099
|
+
key: "RenderHeight",
|
|
36100
|
+
get: function get() {
|
|
36101
|
+
return this.renderHeight;
|
|
36102
|
+
}
|
|
36103
|
+
}, {
|
|
36104
|
+
key: "getHasLayerMask",
|
|
36105
|
+
value: function getHasLayerMask() {
|
|
36106
|
+
return this.hasLayerMask;
|
|
36107
|
+
}
|
|
36108
|
+
}, {
|
|
36109
|
+
key: "getLayerMaskForSrc",
|
|
36110
|
+
value: function getLayerMaskForSrc() {
|
|
36111
|
+
return this.layerMaskAsBase64;
|
|
36112
|
+
}
|
|
36113
|
+
}, {
|
|
36114
|
+
key: "HasLayerMaskThreeTexture",
|
|
36115
|
+
get: function get() {
|
|
36116
|
+
return this.layerMaskThreeTexture != undefined;
|
|
36117
|
+
}
|
|
36118
|
+
}, {
|
|
36119
|
+
key: "LayerMaskThreeTexture",
|
|
36120
|
+
get: function get() {
|
|
36121
|
+
return this.layerMaskThreeTexture;
|
|
36122
|
+
},
|
|
36123
|
+
set: function set(tex) {
|
|
36124
|
+
this.layerMaskThreeTexture = tex;
|
|
36125
|
+
}
|
|
36126
|
+
}, {
|
|
36127
|
+
key: "AllImgLoaded",
|
|
36128
|
+
get: function get() {
|
|
36129
|
+
return this.imgForSrc != '' && (!this.hasLayerMask || this.layerMaskAsBase64 != '');
|
|
36130
|
+
}
|
|
36131
|
+
}, {
|
|
36132
|
+
key: "UiInfoLoaded",
|
|
36133
|
+
get: function get() {
|
|
36134
|
+
return this.uiInfo != '';
|
|
36135
|
+
}
|
|
36136
|
+
}, {
|
|
36137
|
+
key: "CreationTime",
|
|
36138
|
+
get: function get() {
|
|
36139
|
+
return this.creationTime.getTime();
|
|
36140
|
+
}
|
|
36141
|
+
}, {
|
|
36142
|
+
key: "MediaServiceSaveMode",
|
|
36143
|
+
get: function get() {
|
|
36144
|
+
return this.mediaServiceSaveMode;
|
|
36145
|
+
},
|
|
36146
|
+
set: function set(mode) {
|
|
36147
|
+
this.mediaServiceSaveMode = mode;
|
|
36148
|
+
}
|
|
36616
36149
|
}]);
|
|
36617
36150
|
}();
|
|
36618
|
-
var mediaServiceHandler = new DivaMediaServiceHandler();
|
|
36619
36151
|
|
|
36620
36152
|
var RenderSettings = /*#__PURE__*/function () {
|
|
36621
36153
|
function RenderSettings() {
|
|
@@ -36636,9 +36168,6 @@ var RenderSettings = /*#__PURE__*/function () {
|
|
|
36636
36168
|
_defineProperty(this, "applicationName", void 0);
|
|
36637
36169
|
_defineProperty(this, "divaMediaServiceUrl", void 0);
|
|
36638
36170
|
_defineProperty(this, "renderGroup", void 0);
|
|
36639
|
-
_defineProperty(this, "useSirvViewer", void 0);
|
|
36640
|
-
_defineProperty(this, "useMediaServiceImageCache", void 0);
|
|
36641
|
-
_defineProperty(this, "suppressCacheCreation", void 0);
|
|
36642
36171
|
this.organizationId = '';
|
|
36643
36172
|
this.diva3DServerURL = '';
|
|
36644
36173
|
this.userID = '';
|
|
@@ -36647,9 +36176,6 @@ var RenderSettings = /*#__PURE__*/function () {
|
|
|
36647
36176
|
this.applicationName = '';
|
|
36648
36177
|
this.divaMediaServiceUrl = '';
|
|
36649
36178
|
this.renderGroup = '';
|
|
36650
|
-
this.useSirvViewer = false;
|
|
36651
|
-
this.useMediaServiceImageCache = false;
|
|
36652
|
-
this.suppressCacheCreation = false;
|
|
36653
36179
|
}
|
|
36654
36180
|
return _createClass(RenderSettings, [{
|
|
36655
36181
|
key: "OrganizationId",
|
|
@@ -36715,30 +36241,6 @@ var RenderSettings = /*#__PURE__*/function () {
|
|
|
36715
36241
|
set: function set(group) {
|
|
36716
36242
|
this.renderGroup = group;
|
|
36717
36243
|
}
|
|
36718
|
-
}, {
|
|
36719
|
-
key: "UseSirvViewer",
|
|
36720
|
-
get: function get() {
|
|
36721
|
-
return this.useSirvViewer;
|
|
36722
|
-
},
|
|
36723
|
-
set: function set(viewer) {
|
|
36724
|
-
this.useSirvViewer = viewer;
|
|
36725
|
-
}
|
|
36726
|
-
}, {
|
|
36727
|
-
key: "UseMediaServiceImageCache",
|
|
36728
|
-
get: function get() {
|
|
36729
|
-
return this.useMediaServiceImageCache;
|
|
36730
|
-
},
|
|
36731
|
-
set: function set(cache) {
|
|
36732
|
-
this.useMediaServiceImageCache = cache;
|
|
36733
|
-
}
|
|
36734
|
-
}, {
|
|
36735
|
-
key: "SuppressCacheCreation",
|
|
36736
|
-
get: function get() {
|
|
36737
|
-
return this.suppressCacheCreation;
|
|
36738
|
-
},
|
|
36739
|
-
set: function set(cache) {
|
|
36740
|
-
this.suppressCacheCreation = cache;
|
|
36741
|
-
}
|
|
36742
36244
|
}]);
|
|
36743
36245
|
}();
|
|
36744
36246
|
/*
|
|
@@ -36787,7 +36289,7 @@ function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
36787
36289
|
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; } } }; }
|
|
36788
36290
|
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; } }
|
|
36789
36291
|
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; }
|
|
36790
|
-
var LOG$
|
|
36292
|
+
var LOG$4 = DivaUtils.initLog('Planner', 'PLANNER-HANDLER-3D');
|
|
36791
36293
|
var PlannerHandler3D = /*#__PURE__*/function () {
|
|
36792
36294
|
//-------------------------------------------------Initialization---------------------------------------------------------------
|
|
36793
36295
|
|
|
@@ -36905,12 +36407,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36905
36407
|
};
|
|
36906
36408
|
}
|
|
36907
36409
|
return _createClass(PlannerHandler3D, [{
|
|
36908
|
-
key: "doUseRealtimeRendering",
|
|
36909
|
-
value: function doUseRealtimeRendering() {
|
|
36910
|
-
if (this.renderSettings.SuppressCacheCreation && this.renderSettings.UseMediaServiceImageCache) return false;
|
|
36911
|
-
return true;
|
|
36912
|
-
}
|
|
36913
|
-
}, {
|
|
36914
36410
|
key: "setJwt",
|
|
36915
36411
|
value: function setJwt(jwt) {
|
|
36916
36412
|
this.jwt = jwt;
|
|
@@ -37030,9 +36526,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37030
36526
|
}
|
|
37031
36527
|
this.renderSettings.DivaMediaServiceUrl = params.divaMediaServiceUrl;
|
|
37032
36528
|
this.renderSettings.OrganizationId = params.organizationId;
|
|
37033
|
-
this.renderSettings.UseSirvViewer = params.useSirvViewer;
|
|
37034
|
-
this.renderSettings.UseMediaServiceImageCache = params.useMediaServiceImageCache;
|
|
37035
|
-
this.renderSettings.SuppressCacheCreation = params.suppressCacheCreation;
|
|
37036
36529
|
this.liveArViewerUrl = params.arViewerUrl;
|
|
37037
36530
|
return result;
|
|
37038
36531
|
}
|
|
@@ -37045,21 +36538,16 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37045
36538
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
37046
36539
|
while (1) switch (_context3.prev = _context3.next) {
|
|
37047
36540
|
case 0:
|
|
37048
|
-
|
|
37049
|
-
|
|
37050
|
-
|
|
37051
|
-
}
|
|
37052
|
-
_context3.next = 3;
|
|
37053
|
-
return import('./Host3DSignalR-9c502b78.js');
|
|
37054
|
-
case 3:
|
|
36541
|
+
_context3.next = 2;
|
|
36542
|
+
return import('./Host3DSignalR-ae25b944.js');
|
|
36543
|
+
case 2:
|
|
37055
36544
|
_yield$import = _context3.sent;
|
|
37056
36545
|
Host3DSignalR = _yield$import["default"];
|
|
37057
36546
|
this.connectionHandler = new Host3DSignalR(this.renderSettings, this);
|
|
37058
|
-
LOG$
|
|
37059
|
-
|
|
37060
|
-
_context3.next = 9;
|
|
36547
|
+
LOG$4.debug('initializeConnection to Host3DSignalR');
|
|
36548
|
+
_context3.next = 8;
|
|
37061
36549
|
return (_this$connectionHandl2 = this.connectionHandler) === null || _this$connectionHandl2 === void 0 ? void 0 : _this$connectionHandl2.initializeConnection();
|
|
37062
|
-
case
|
|
36550
|
+
case 8:
|
|
37063
36551
|
case "end":
|
|
37064
36552
|
return _context3.stop();
|
|
37065
36553
|
}
|
|
@@ -37122,7 +36610,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37122
36610
|
value: function onConnectedToDivaNr(status) {
|
|
37123
36611
|
//Check if request3D has to be called againe
|
|
37124
36612
|
if (status != 'SUCCESSFULL' || !this.todoAfterLogin.request3D.doRequest3D) return;
|
|
37125
|
-
LOG$
|
|
36613
|
+
LOG$4.debug('Return Login - joind successfully but during loggin, a render or hqRenderScript Request was made. Remake it now');
|
|
37126
36614
|
this.todoAfterLogin.request3D.doRequest3D = false;
|
|
37127
36615
|
this.request3D(this.todoAfterLogin.request3D.params);
|
|
37128
36616
|
this.todoAfterLogin.request3D.params = undefined;
|
|
@@ -37176,36 +36664,36 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37176
36664
|
* @param buffer
|
|
37177
36665
|
*/
|
|
37178
36666
|
function handleReceiveRendering(params) {
|
|
37179
|
-
LOG$
|
|
36667
|
+
LOG$4.debug('handleReceiveRendering ' + params.hash + '; SameMode: ' + params.saveMode);
|
|
37180
36668
|
var isLayerMask = params.hash.endsWith('_m') ? true : false;
|
|
37181
36669
|
params.hash = isLayerMask ? params.hash.substring(0, params.hash.length - 2) : params.hash;
|
|
37182
36670
|
var cachedRendering = this.getRenderingFromCache(params.hash);
|
|
37183
36671
|
var waitedRendering = this.getWaitForRendering(params.hash);
|
|
37184
36672
|
if (!cachedRendering && !waitedRendering) {
|
|
37185
|
-
LOG$
|
|
36673
|
+
LOG$4.error(new DivaError('Error when handling receive Rendering. Not waiting for new Rendering but also not in cache ' + params.hash + '; saveMode: ' + params.saveMode));
|
|
37186
36674
|
return;
|
|
37187
36675
|
}
|
|
37188
36676
|
if (waitedRendering) {
|
|
37189
|
-
LOG$
|
|
36677
|
+
LOG$4.debug('handleReceiveRendering ' + params.hash + '; Found in waitForRenderings');
|
|
37190
36678
|
//If the last requested rendering was in another saving mode than the received rendering - do nothing and wait for the correct rendering
|
|
37191
36679
|
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') {
|
|
37192
|
-
LOG$
|
|
36680
|
+
LOG$4.debug('Rendering with wrong savemode arrived. Wait for correct rendering');
|
|
37193
36681
|
return;
|
|
37194
36682
|
}
|
|
37195
36683
|
if (params.url && waitedRendering.MediaServiceSaveMode == 'PERMANENT') {
|
|
37196
36684
|
waitedRendering.UrlToSavedRendering = params.url;
|
|
37197
|
-
LOG$
|
|
36685
|
+
LOG$4.debug('handleReceiveRendering Set lastSavedRendering URL ' + params.url);
|
|
37198
36686
|
}
|
|
37199
|
-
|
|
36687
|
+
waitedRendering.addImgAsBlob(Buffer.from(params.buffer), isLayerMask);
|
|
37200
36688
|
|
|
37201
36689
|
//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
|
|
37202
36690
|
|
|
37203
|
-
if (
|
|
36691
|
+
if (waitedRendering.MediaServiceSaveMode == 'STREAM' && this.checkRenderingReady(params.hash, waitedRendering)) this.updatePlannerRendering(waitedRendering);
|
|
37204
36692
|
return;
|
|
37205
36693
|
}
|
|
37206
36694
|
if (params.url) {
|
|
37207
36695
|
//If several renderings of the same hash are requested contemoranely (first Stream then TEMP). Then save the tempURL in the rendering
|
|
37208
|
-
LOG$
|
|
36696
|
+
LOG$4.debug('handleReceiveRendering load from cache');
|
|
37209
36697
|
cachedRendering.UrlToSavedRendering = params.url;
|
|
37210
36698
|
}
|
|
37211
36699
|
}
|
|
@@ -37236,10 +36724,10 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37236
36724
|
}, {
|
|
37237
36725
|
key: "checkRenderingReady",
|
|
37238
36726
|
value: function checkRenderingReady(hash, rendering) {
|
|
37239
|
-
if (!rendering.AllImgLoaded || !rendering.UiInfoLoaded
|
|
36727
|
+
if (!rendering.AllImgLoaded || !rendering.UiInfoLoaded) return false;
|
|
37240
36728
|
this.waitForRenderings["delete"](hash);
|
|
37241
36729
|
this.renderCache.set(hash, rendering);
|
|
37242
|
-
LOG$
|
|
36730
|
+
LOG$4.debug('Send to view. CurrentHash: ' + hash + '; lastRequestedHash: ' + this.lastRequestedRenderHash);
|
|
37243
36731
|
return true;
|
|
37244
36732
|
}
|
|
37245
36733
|
/**
|
|
@@ -37254,7 +36742,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37254
36742
|
this.waitForRenderings["delete"](hash);
|
|
37255
36743
|
return false;
|
|
37256
36744
|
}
|
|
37257
|
-
LOG$
|
|
36745
|
+
LOG$4.debug('Wait for rendering - The same rendering was asked not 4 seconds ago. !', 'PlannerHandler3D checkWaitForImage');
|
|
37258
36746
|
return true;
|
|
37259
36747
|
}
|
|
37260
36748
|
}, {
|
|
@@ -37266,7 +36754,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37266
36754
|
this.waitForHQRenderScript["delete"](hash);
|
|
37267
36755
|
return false;
|
|
37268
36756
|
}
|
|
37269
|
-
LOG$
|
|
36757
|
+
LOG$4.debug('Wait for rendering - The same rendering was asked not 4 seconds ago. !', 'PlannerHandler3D checkWaitForImage');
|
|
37270
36758
|
return true;
|
|
37271
36759
|
}
|
|
37272
36760
|
|
|
@@ -37288,10 +36776,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37288
36776
|
result.renderHeight = curRoomListVP.backgroundImg_Height;
|
|
37289
36777
|
result.renderHeight = result.renderHeight * 1.3;
|
|
37290
36778
|
result.renderWidth = result.renderWidth * 1.3;
|
|
37291
|
-
} else if (this.renderSettings.UseMediaServiceImageCache) {
|
|
37292
|
-
//Force the size of the rendering to be a standard size
|
|
37293
|
-
result.renderWidth = this.renderSettings.CACHE_16_9_RENDER_WIDTH;
|
|
37294
|
-
result.renderHeight = this.renderSettings.CACHE_16_9_RENDER_HEIGHT;
|
|
37295
36779
|
} else if (mediaServiceSaveMode == 'PERMANENT') {
|
|
37296
36780
|
//SAVE with correct Resolution
|
|
37297
36781
|
result.renderWidth = this.renderSettings.SAVE_16_9_RENDER_WIDTH;
|
|
@@ -37335,7 +36819,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37335
36819
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
37336
36820
|
while (1) switch (_context5.prev = _context5.next) {
|
|
37337
36821
|
case 0:
|
|
37338
|
-
LOG$
|
|
36822
|
+
LOG$4.debug('getLastSavedRendering ' + ((_this$lastSavedRender = this.lastSavedRendering) === null || _this$lastSavedRender === void 0 ? void 0 : _this$lastSavedRender.UrlToSavedRendering));
|
|
37339
36823
|
if (!(this.lastSavedRendering == undefined)) {
|
|
37340
36824
|
_context5.next = 3;
|
|
37341
36825
|
break;
|
|
@@ -37350,7 +36834,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37350
36834
|
_context5.next = 12;
|
|
37351
36835
|
break;
|
|
37352
36836
|
}
|
|
37353
|
-
LOG$
|
|
36837
|
+
LOG$4.debug('getLAstSavedRendering - wait here');
|
|
37354
36838
|
_context5.next = 8;
|
|
37355
36839
|
return this.delay(100);
|
|
37356
36840
|
case 8:
|
|
@@ -37504,20 +36988,20 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37504
36988
|
value: (function () {
|
|
37505
36989
|
var _request3D = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(params) {
|
|
37506
36990
|
var _params$renderRequest, _params$renderRequest2, _params$renderRequest3, _params$renderRequest4, _params$renderRequest5, _params$renderRequest6, _this$viewPointHandle;
|
|
37507
|
-
var room, newRenderSize, doReloadWholePlanning, planningHash, requestRenderingFrom3DHost, requestHqRenderScriptFrom3DHost, rendering, renderHash, viewPointName, functionType, _params$camera, sizeInfo,
|
|
36991
|
+
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;
|
|
37508
36992
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
37509
36993
|
while (1) switch (_context7.prev = _context7.next) {
|
|
37510
36994
|
case 0:
|
|
37511
|
-
if (!(this.
|
|
36995
|
+
if (!(this.connectionHandler && (!this.connectionHandler.getConnectionReady() || !this.connectionHandler.getSuccessfullyJoinedToDivaNr()))) {
|
|
37512
36996
|
_context7.next = 5;
|
|
37513
36997
|
break;
|
|
37514
36998
|
}
|
|
37515
|
-
LOG$
|
|
36999
|
+
LOG$4.debug('RequestRendering - but connection Not Ready');
|
|
37516
37000
|
this.todoAfterLogin.request3D.params = params;
|
|
37517
37001
|
this.todoAfterLogin.request3D.doRequest3D = true;
|
|
37518
37002
|
return _context7.abrupt("return");
|
|
37519
37003
|
case 5:
|
|
37520
|
-
LOG$
|
|
37004
|
+
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');
|
|
37521
37005
|
room = this.viewPointHandler.getCurRoomCodex();
|
|
37522
37006
|
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);
|
|
37523
37007
|
doReloadWholePlanning = true;
|
|
@@ -37536,103 +37020,63 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37536
37020
|
this.lastFramePlanningHash = planningHash;
|
|
37537
37021
|
requestRenderingFrom3DHost = false;
|
|
37538
37022
|
requestHqRenderScriptFrom3DHost = false;
|
|
37539
|
-
if (
|
|
37540
|
-
|
|
37541
|
-
|
|
37542
|
-
|
|
37543
|
-
|
|
37544
|
-
|
|
37545
|
-
|
|
37546
|
-
|
|
37547
|
-
|
|
37548
|
-
|
|
37549
|
-
|
|
37550
|
-
|
|
37551
|
-
|
|
37552
|
-
|
|
37553
|
-
|
|
37554
|
-
this.updatePlannerHqRenderScriptInView(rendering);
|
|
37555
|
-
this.sendARRenderScript(rendering);
|
|
37556
|
-
params.doRequestHqRenderScript = false;
|
|
37557
|
-
} else {
|
|
37558
|
-
if (!this.checkWaitForHQRenderScript(planningHash)) {
|
|
37559
|
-
requestHqRenderScriptFrom3DHost = true;
|
|
37560
|
-
this.waitForHQRenderScript.set(planningHash, new HQRenderScript('PLACEHOLDER'));
|
|
37561
|
-
//If a new HQRenderscript has to be loaded - always reload planning
|
|
37562
|
-
doReloadWholePlanning = true;
|
|
37023
|
+
if (params.doRequestHqRenderScript) {
|
|
37024
|
+
rendering = this.hqRenderScriptCache.get(planningHash);
|
|
37025
|
+
if (rendering) {
|
|
37026
|
+
LOG$4.debug('Get HQRenderScript from cache');
|
|
37027
|
+
this.lastSavedHQRenderScript = JSON.parse(rendering.HQRenderScript);
|
|
37028
|
+
this.updatePlannerHqRenderScriptInView(rendering);
|
|
37029
|
+
this.sendARRenderScript(rendering);
|
|
37030
|
+
params.doRequestHqRenderScript = false;
|
|
37031
|
+
} else {
|
|
37032
|
+
if (!this.checkWaitForHQRenderScript(planningHash)) {
|
|
37033
|
+
requestHqRenderScriptFrom3DHost = true;
|
|
37034
|
+
this.waitForHQRenderScript.set(planningHash, new HQRenderScript('PLACEHOLDER'));
|
|
37035
|
+
//If a new HQRenderscript has to be loaded - always reload planning
|
|
37036
|
+
doReloadWholePlanning = true;
|
|
37037
|
+
}
|
|
37563
37038
|
}
|
|
37564
37039
|
}
|
|
37565
|
-
case 23:
|
|
37566
37040
|
renderHash = '';
|
|
37567
37041
|
viewPointName = '';
|
|
37568
37042
|
functionType = 'P3D';
|
|
37569
|
-
if (
|
|
37570
|
-
|
|
37571
|
-
|
|
37572
|
-
|
|
37573
|
-
|
|
37574
|
-
|
|
37575
|
-
|
|
37576
|
-
|
|
37577
|
-
|
|
37578
|
-
|
|
37579
|
-
|
|
37580
|
-
|
|
37581
|
-
|
|
37582
|
-
|
|
37583
|
-
|
|
37584
|
-
|
|
37585
|
-
|
|
37586
|
-
|
|
37587
|
-
|
|
37588
|
-
|
|
37589
|
-
|
|
37590
|
-
|
|
37591
|
-
|
|
37592
|
-
|
|
37593
|
-
|
|
37594
|
-
}
|
|
37595
|
-
//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.
|
|
37596
|
-
//When the client then rotates - nothing changes in the hash - but the exe loads 2 elements.
|
|
37597
|
-
LOG$3.debug('Load Rendering from Cache with hash ' + renderHash, 'PlannerHandler3D');
|
|
37598
|
-
this.lastFramePlanningHash = '';
|
|
37599
|
-
_rendering = this.getRenderingFromCache(renderHash); //check if current rendering is fullscreenrendering
|
|
37600
|
-
if ((!params.renderRequestInfos.planner3DGridEnabled || _rendering !== null && _rendering !== void 0 && _rendering.getHasLayerMask()) && !this.onlyRunLogic) {
|
|
37601
|
-
if (params.renderRequestInfos.isFullscreenRendering != (_rendering === null || _rendering === void 0 ? void 0 : _rendering.getIsFullscreenRendering())) {
|
|
37602
|
-
fullscreenRendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'PERMANENT', undefined);
|
|
37603
|
-
fullscreenRendering.clone(_rendering);
|
|
37604
|
-
fullscreenRendering.setIsFullscreenRendering(params.renderRequestInfos.isFullscreenRendering);
|
|
37605
|
-
this.updatePlannerRendering(fullscreenRendering); //load the rendering as fullscreen image
|
|
37606
|
-
params.doRequestRendering = false;
|
|
37043
|
+
if (params.doRequestRendering) {
|
|
37044
|
+
viewPointName = this.viewPointHandler.getCurViewPointToRender();
|
|
37045
|
+
sizeInfo = params.renderRequestInfos.width + ':' + params.renderRequestInfos.height;
|
|
37046
|
+
renderHash = md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify((_params$camera = params.camera) !== null && _params$camera !== void 0 ? _params$camera : this.latestCamera));
|
|
37047
|
+
this.lastRequestedRenderHash = renderHash;
|
|
37048
|
+
LOG$4.debug('Request New Rendering with hash ' + renderHash + '; and planningHash: ' + planningHash, 'PlannerHandler3D');
|
|
37049
|
+
if (this.checkIsRenderingCached(renderHash, params.renderRequestInfos.planner3DGridEnabled, params.renderRequestInfos.mediaServiceSaveMode)) {
|
|
37050
|
+
//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.
|
|
37051
|
+
//When the client then rotates - nothing changes in the hash - but the exe loads 2 elements.
|
|
37052
|
+
LOG$4.debug('Load Rendering from Cache with hash ' + renderHash, 'PlannerHandler3D');
|
|
37053
|
+
this.lastFramePlanningHash = '';
|
|
37054
|
+
_rendering = this.getRenderingFromCache(renderHash); //check if current rendering is fullscreenrendering
|
|
37055
|
+
if ((!params.renderRequestInfos.planner3DGridEnabled || _rendering !== null && _rendering !== void 0 && _rendering.getHasLayerMask()) && !this.onlyRunLogic) {
|
|
37056
|
+
if (params.renderRequestInfos.isFullscreenRendering != (_rendering === null || _rendering === void 0 ? void 0 : _rendering.getIsFullscreenRendering())) {
|
|
37057
|
+
fullscreenRendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'PERMANENT', undefined);
|
|
37058
|
+
fullscreenRendering.clone(_rendering);
|
|
37059
|
+
fullscreenRendering.setIsFullscreenRendering(params.renderRequestInfos.isFullscreenRendering);
|
|
37060
|
+
this.updatePlannerRendering(fullscreenRendering); //load the rendering as fullscreen image
|
|
37061
|
+
params.doRequestRendering = false;
|
|
37062
|
+
} else {
|
|
37063
|
+
this.updatePlannerRendering(_rendering); //lade einfach
|
|
37064
|
+
params.doRequestRendering = false;
|
|
37065
|
+
LOG$4.debug('Do load rendering from cache with renderHash: ' + renderHash);
|
|
37066
|
+
}
|
|
37067
|
+
}
|
|
37607
37068
|
} else {
|
|
37608
|
-
|
|
37609
|
-
|
|
37610
|
-
|
|
37611
|
-
|
|
37612
|
-
|
|
37613
|
-
|
|
37614
|
-
|
|
37615
|
-
case 47:
|
|
37616
|
-
renderingInCacheFound = false;
|
|
37617
|
-
if (!(this.renderSettings.UseMediaServiceImageCache && this.viewPointHandler.getCurVPIsStart())) {
|
|
37618
|
-
_context7.next = 53;
|
|
37619
|
-
break;
|
|
37620
|
-
}
|
|
37621
|
-
_productHash = this.getProductHash(params.planningData);
|
|
37622
|
-
_context7.next = 52;
|
|
37623
|
-
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);
|
|
37624
|
-
case 52:
|
|
37625
|
-
renderingInCacheFound = _context7.sent;
|
|
37626
|
-
case 53:
|
|
37627
|
-
if (!this.renderSettings.UseMediaServiceImageCache || !renderingInCacheFound) {
|
|
37628
|
-
if (!this.checkWaitForImage(renderHash)) {
|
|
37629
|
-
requestRenderingFrom3DHost = true;
|
|
37630
|
-
this.waitForRenderings.set(renderHash, new Rendering('PLACEHOLDER', 'PLACEHOLDER', '', 0, 0, false, false, 0, false, false, 'STREAM'));
|
|
37069
|
+
renderingInCacheFound = false;
|
|
37070
|
+
if (!renderingInCacheFound) {
|
|
37071
|
+
if (!this.checkWaitForImage(renderHash)) {
|
|
37072
|
+
requestRenderingFrom3DHost = true;
|
|
37073
|
+
this.waitForRenderings.set(renderHash, new Rendering('PLACEHOLDER', 'PLACEHOLDER', '', 0, 0, false, false, 0, false, false, 'STREAM'));
|
|
37074
|
+
}
|
|
37075
|
+
}
|
|
37631
37076
|
}
|
|
37632
37077
|
}
|
|
37633
|
-
case 54:
|
|
37634
37078
|
if (!(requestHqRenderScriptFrom3DHost || requestRenderingFrom3DHost)) {
|
|
37635
|
-
_context7.next =
|
|
37079
|
+
_context7.next = 31;
|
|
37636
37080
|
break;
|
|
37637
37081
|
}
|
|
37638
37082
|
if (params.catalogData.lang) params.planningData.SCE.Lang = params.catalogData.lang;
|
|
@@ -37650,7 +37094,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37650
37094
|
height: params.renderRequestInfos.height,
|
|
37651
37095
|
isFullscreenRendering: params.renderRequestInfos.isFullscreenRendering,
|
|
37652
37096
|
hasDimensionLines: params.renderRequestInfos.doShow3DDimensionLines,
|
|
37653
|
-
plannerMeasureDigits: (
|
|
37097
|
+
plannerMeasureDigits: (_plannerMeasureDigits = params.renderRequestInfos.plannerMeasureDigits) !== null && _plannerMeasureDigits !== void 0 ? _plannerMeasureDigits : 0,
|
|
37654
37098
|
planner3DGridEnabled: params.renderRequestInfos.planner3DGridEnabled,
|
|
37655
37099
|
mediaServiceSaveMode: params.renderRequestInfos.mediaServiceSaveMode,
|
|
37656
37100
|
functionType: functionType,
|
|
@@ -37665,14 +37109,14 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37665
37109
|
});
|
|
37666
37110
|
if (params.camera) this.latestCamera = params.camera;
|
|
37667
37111
|
if (!(returnRequest === undefined || requestHqRenderScriptFrom3DHost && returnRequest.hqRenderScript == undefined || requestRenderingFrom3DHost && returnRequest.rendering == undefined)) {
|
|
37668
|
-
_context7.next =
|
|
37112
|
+
_context7.next = 29;
|
|
37669
37113
|
break;
|
|
37670
37114
|
}
|
|
37671
|
-
LOG$
|
|
37115
|
+
LOG$4.error(new DivaError('Error requesting the 3D from host. RequestHqRenderScript: ' + requestHqRenderScriptFrom3DHost + '; RequestRendering: ' + requestRenderingFrom3DHost, {
|
|
37672
37116
|
code: 'WC_0013'
|
|
37673
37117
|
}));
|
|
37674
37118
|
return _context7.abrupt("return");
|
|
37675
|
-
case
|
|
37119
|
+
case 29:
|
|
37676
37120
|
if (requestHqRenderScriptFrom3DHost) {
|
|
37677
37121
|
if (this.waitForHQRenderScript.has(planningHash)) this.waitForHQRenderScript["delete"](planningHash);
|
|
37678
37122
|
this.waitForHQRenderScript.set(planningHash, returnRequest.hqRenderScript);
|
|
@@ -37684,7 +37128,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37684
37128
|
if (returnRequest.rendering.getIsAlternateRendering()) this.addAlternateRenderingToSavedAlternateRenderings(returnRequest.rendering);else this.lastSavedRendering = returnRequest.rendering;
|
|
37685
37129
|
}
|
|
37686
37130
|
}
|
|
37687
|
-
case
|
|
37131
|
+
case 31:
|
|
37688
37132
|
case "end":
|
|
37689
37133
|
return _context7.stop();
|
|
37690
37134
|
}
|
|
@@ -37737,70 +37181,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37737
37181
|
});
|
|
37738
37182
|
if (index === -1) this.lastSavedAlternateRenderings.push(rendering);else this.lastSavedAlternateRenderings[index] = rendering;
|
|
37739
37183
|
}
|
|
37740
|
-
|
|
37741
|
-
/**
|
|
37742
|
-
* This function handles to load a rendering from the cache
|
|
37743
|
-
* @param hash
|
|
37744
|
-
* @param viewPointName
|
|
37745
|
-
* @param width
|
|
37746
|
-
* @param height
|
|
37747
|
-
* @param isFullscreenRendering
|
|
37748
|
-
*
|
|
37749
|
-
* @returns true, if the rendering was found in the cache
|
|
37750
|
-
*/
|
|
37751
|
-
}, {
|
|
37752
|
-
key: "requestRenderingCache",
|
|
37753
|
-
value: (function () {
|
|
37754
|
-
var _requestRenderingCache = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(planningHash, renderHash, productHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, catalogData, alternateRenderingsExist, alternateRendererInfo) {
|
|
37755
|
-
var renderingInCacheFound, rendering, promises, _yield$Promise$all, _yield$Promise$all2, urlRenderingCache, urlARCache, doUpdateRendering;
|
|
37756
|
-
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
37757
|
-
while (1) switch (_context8.prev = _context8.next) {
|
|
37758
|
-
case 0:
|
|
37759
|
-
renderingInCacheFound = false;
|
|
37760
|
-
if (this.waitForRenderings.has(renderHash)) {
|
|
37761
|
-
_context8.next = 12;
|
|
37762
|
-
break;
|
|
37763
|
-
}
|
|
37764
|
-
rendering = new Rendering(planningHash, renderHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, false, false, 'PERMANENT', alternateRenderingsExist, alternateRendererInfo);
|
|
37765
|
-
this.waitForRenderings.set(renderHash, rendering);
|
|
37766
|
-
//Try load image from cache
|
|
37767
|
-
promises = [mediaServiceHandler.loadRenderingFromCache(renderHash), mediaServiceHandler.loadRenderingFromCache(productHash, false)];
|
|
37768
|
-
_context8.next = 7;
|
|
37769
|
-
return Promise.all(promises);
|
|
37770
|
-
case 7:
|
|
37771
|
-
_yield$Promise$all = _context8.sent;
|
|
37772
|
-
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
|
|
37773
|
-
urlRenderingCache = _yield$Promise$all2[0];
|
|
37774
|
-
urlARCache = _yield$Promise$all2[1];
|
|
37775
|
-
if (urlRenderingCache || urlARCache) {
|
|
37776
|
-
renderingInCacheFound = true;
|
|
37777
|
-
if (urlRenderingCache) {
|
|
37778
|
-
rendering.setHQRenderingUrl(urlRenderingCache, this.renderSettings.UseSirvViewer);
|
|
37779
|
-
rendering.UrlToSavedRendering = rendering.getHQRenderingURL();
|
|
37780
|
-
}
|
|
37781
|
-
if (urlARCache) rendering.setArUrl(urlARCache);
|
|
37782
|
-
rendering.IsLoadedFromCache = true;
|
|
37783
|
-
rendering.CatalogCodex = catalogData.catalogCodex;
|
|
37784
|
-
rendering.CatalogGUID = catalogData.catalogGUID;
|
|
37785
|
-
LOG$3.debug('The rendering is loaded from the MediaServiceCache: ' + urlRenderingCache);
|
|
37786
|
-
doUpdateRendering = this.checkRenderingReady(renderHash, rendering);
|
|
37787
|
-
if (doUpdateRendering) this.updatePlannerRendering(rendering);
|
|
37788
|
-
} else {
|
|
37789
|
-
this.waitForRenderings["delete"](renderHash);
|
|
37790
|
-
}
|
|
37791
|
-
case 12:
|
|
37792
|
-
return _context8.abrupt("return", renderingInCacheFound);
|
|
37793
|
-
case 13:
|
|
37794
|
-
case "end":
|
|
37795
|
-
return _context8.stop();
|
|
37796
|
-
}
|
|
37797
|
-
}, _callee8, this);
|
|
37798
|
-
}));
|
|
37799
|
-
function requestRenderingCache(_x6, _x7, _x8, _x9, _x10, _x11, _x12, _x13, _x14, _x15, _x16, _x17) {
|
|
37800
|
-
return _requestRenderingCache.apply(this, arguments);
|
|
37801
|
-
}
|
|
37802
|
-
return requestRenderingCache;
|
|
37803
|
-
}())
|
|
37804
37184
|
}, {
|
|
37805
37185
|
key: "handleStaticVP",
|
|
37806
37186
|
value: function handleStaticVP(vpCodex) {
|
|
@@ -37904,20 +37284,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37904
37284
|
value: function getStaticRoomListItems() {
|
|
37905
37285
|
return this.viewPointHandler.getStaticRoomList();
|
|
37906
37286
|
}
|
|
37907
|
-
|
|
37908
|
-
/**
|
|
37909
|
-
* Clears the whole renderCache and sets the current rendering and the lastSavedRendering to undefined
|
|
37910
|
-
*/
|
|
37911
|
-
}, {
|
|
37912
|
-
key: "clearRenderCache",
|
|
37913
|
-
value: function clearRenderCache() {
|
|
37914
|
-
LOG$3.debug('PlannerHandler3D clearRenderCache');
|
|
37915
|
-
this.renderCache.clear();
|
|
37916
|
-
this.currRendering = undefined;
|
|
37917
|
-
this.lastSavedRendering = undefined;
|
|
37918
|
-
this.lastSavedAlternateRenderings = undefined;
|
|
37919
|
-
this.hqRenderScriptCache.clear();
|
|
37920
|
-
}
|
|
37921
37287
|
}, {
|
|
37922
37288
|
key: "clearCurrentRendering",
|
|
37923
37289
|
value: function clearCurrentRendering() {
|
|
@@ -37946,11 +37312,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37946
37312
|
value: function checkIsWaitingForHQRenderScript() {
|
|
37947
37313
|
return this.waitForHQRenderScript.size > 0;
|
|
37948
37314
|
}
|
|
37949
|
-
}, {
|
|
37950
|
-
key: "getUseMediaServiceImageCache",
|
|
37951
|
-
value: function getUseMediaServiceImageCache() {
|
|
37952
|
-
return this.renderSettings.UseMediaServiceImageCache;
|
|
37953
|
-
}
|
|
37954
37315
|
}, {
|
|
37955
37316
|
key: "setOrigConfigurationCallback",
|
|
37956
37317
|
value: function setOrigConfigurationCallback(callback) {
|
|
@@ -37964,19 +37325,19 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37964
37325
|
}, {
|
|
37965
37326
|
key: "openARObserverConnection",
|
|
37966
37327
|
value: function () {
|
|
37967
|
-
var _openARObserverConnection = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
37328
|
+
var _openARObserverConnection = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(handleNoHqrs) {
|
|
37968
37329
|
var _this2 = this;
|
|
37969
|
-
return _regeneratorRuntime.wrap(function
|
|
37970
|
-
while (1) switch (
|
|
37330
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
37331
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
37971
37332
|
case 0:
|
|
37972
|
-
return
|
|
37973
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
37333
|
+
return _context9.abrupt("return", new Promise( /*#__PURE__*/function () {
|
|
37334
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(resolve, reject) {
|
|
37974
37335
|
var socketUrl;
|
|
37975
|
-
return _regeneratorRuntime.wrap(function
|
|
37976
|
-
while (1) switch (
|
|
37336
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
37337
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
37977
37338
|
case 0:
|
|
37978
37339
|
if (_this2.liveArViewerUrl) {
|
|
37979
|
-
|
|
37340
|
+
_context8.next = 2;
|
|
37980
37341
|
break;
|
|
37981
37342
|
}
|
|
37982
37343
|
throw new Error('No Live AR Viewer URL set');
|
|
@@ -37992,26 +37353,26 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37992
37353
|
}
|
|
37993
37354
|
});
|
|
37994
37355
|
_this2.liveArSocket.on('disconnect', function () {
|
|
37995
|
-
LOG$
|
|
37356
|
+
LOG$4.error(new DivaError('AR Socket disconnected'));
|
|
37996
37357
|
});
|
|
37997
37358
|
_this2.liveArSocket.on('observer-joined', function () {
|
|
37998
37359
|
var _this2$liveArSocket;
|
|
37999
|
-
LOG$
|
|
37360
|
+
LOG$4.debug('AR Observer joined');
|
|
38000
37361
|
_this2.liveArClientsConnected = true;
|
|
38001
37362
|
var hqRenderScript = _this2.lastSavedHQRenderScript;
|
|
38002
37363
|
if (hqRenderScript) (_this2$liveArSocket = _this2.liveArSocket) === null || _this2$liveArSocket === void 0 || _this2$liveArSocket.emit('update', {
|
|
38003
37364
|
hqRenderScript: JSON.stringify(hqRenderScript)
|
|
38004
37365
|
});else {
|
|
38005
|
-
LOG$
|
|
37366
|
+
LOG$4.debug('No HQRenderScript found for observer-joined');
|
|
38006
37367
|
handleNoHqrs();
|
|
38007
37368
|
}
|
|
38008
37369
|
});
|
|
38009
37370
|
_this2.liveArSocket.on('observer-left', function () {
|
|
38010
|
-
LOG$
|
|
37371
|
+
LOG$4.debug('AR Observer left');
|
|
38011
37372
|
_this2.liveArClientsConnected = false;
|
|
38012
37373
|
});
|
|
38013
37374
|
_this2.liveArSocket.on('connected', function (data) {
|
|
38014
|
-
LOG$
|
|
37375
|
+
LOG$4.debug('AR Socket connected ' + data.connectionId);
|
|
38015
37376
|
_this2.liveArSocket.auth = _objectSpread$6(_objectSpread$6({}, _this2.liveArSocket.auth), {}, {
|
|
38016
37377
|
connectionId: data.connectionId
|
|
38017
37378
|
});
|
|
@@ -38025,21 +37386,21 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
38025
37386
|
}
|
|
38026
37387
|
case 3:
|
|
38027
37388
|
case "end":
|
|
38028
|
-
return
|
|
37389
|
+
return _context8.stop();
|
|
38029
37390
|
}
|
|
38030
|
-
},
|
|
37391
|
+
}, _callee8);
|
|
38031
37392
|
}));
|
|
38032
|
-
return function (
|
|
37393
|
+
return function (_x7, _x8) {
|
|
38033
37394
|
return _ref.apply(this, arguments);
|
|
38034
37395
|
};
|
|
38035
37396
|
}()));
|
|
38036
37397
|
case 1:
|
|
38037
37398
|
case "end":
|
|
38038
|
-
return
|
|
37399
|
+
return _context9.stop();
|
|
38039
37400
|
}
|
|
38040
|
-
},
|
|
37401
|
+
}, _callee9);
|
|
38041
37402
|
}));
|
|
38042
|
-
function openARObserverConnection(
|
|
37403
|
+
function openARObserverConnection(_x6) {
|
|
38043
37404
|
return _openARObserverConnection.apply(this, arguments);
|
|
38044
37405
|
}
|
|
38045
37406
|
return openARObserverConnection;
|
|
@@ -38049,10 +37410,10 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
38049
37410
|
value: function sendARRenderScript(hqRenderScript) {
|
|
38050
37411
|
var _this$liveArSocket;
|
|
38051
37412
|
if (!this.liveArClientsConnected) {
|
|
38052
|
-
LOG$
|
|
37413
|
+
LOG$4.debug('No AR Clients connected, dont send render script');
|
|
38053
37414
|
return;
|
|
38054
37415
|
}
|
|
38055
|
-
LOG$
|
|
37416
|
+
LOG$4.debug('Sending AR Render Script to clients');
|
|
38056
37417
|
(_this$liveArSocket = this.liveArSocket) === null || _this$liveArSocket === void 0 || _this$liveArSocket.emit('update', {
|
|
38057
37418
|
hqRenderScript: hqRenderScript.HQRenderScript
|
|
38058
37419
|
});
|
|
@@ -38060,6 +37421,131 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
38060
37421
|
}]);
|
|
38061
37422
|
}();
|
|
38062
37423
|
|
|
37424
|
+
var LOG$3 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
37425
|
+
var DivaMediaServiceHandler = /*#__PURE__*/function () {
|
|
37426
|
+
//-------------------------------------------------- INITIALIZATION--------------------------------------------------------------//
|
|
37427
|
+
|
|
37428
|
+
function DivaMediaServiceHandler() {
|
|
37429
|
+
_classCallCheck(this, DivaMediaServiceHandler);
|
|
37430
|
+
_defineProperty(this, "organizationId", void 0);
|
|
37431
|
+
_defineProperty(this, "mediaServiceUrl", void 0);
|
|
37432
|
+
_defineProperty(this, "mediaServiceApiKey", void 0);
|
|
37433
|
+
_defineProperty(this, "jwt", void 0);
|
|
37434
|
+
_defineProperty(this, "POST_saveTmp2PermanentPostfix", '/saveTmp2Permanent');
|
|
37435
|
+
_defineProperty(this, "GET_MediaItemrefs", '/v1/mediaitems/refs?limit=20&skip=0&filter=');
|
|
37436
|
+
_defineProperty(this, "POST_mediaItem", '/v1/mediaitems?ref=true');
|
|
37437
|
+
this.organizationId = '';
|
|
37438
|
+
this.mediaServiceUrl = '';
|
|
37439
|
+
this.mediaServiceApiKey = '';
|
|
37440
|
+
}
|
|
37441
|
+
return _createClass(DivaMediaServiceHandler, [{
|
|
37442
|
+
key: "setOrganizationId",
|
|
37443
|
+
value: function setOrganizationId(organizationId) {
|
|
37444
|
+
this.organizationId = organizationId;
|
|
37445
|
+
}
|
|
37446
|
+
}, {
|
|
37447
|
+
key: "setMediaServiceUrl",
|
|
37448
|
+
value: function setMediaServiceUrl(mediaServiceUrl) {
|
|
37449
|
+
this.mediaServiceUrl = mediaServiceUrl;
|
|
37450
|
+
}
|
|
37451
|
+
}, {
|
|
37452
|
+
key: "setMediaServiceApiKey",
|
|
37453
|
+
value: function setMediaServiceApiKey(mediaServiceApiKey) {
|
|
37454
|
+
this.mediaServiceApiKey = mediaServiceApiKey;
|
|
37455
|
+
}
|
|
37456
|
+
}, {
|
|
37457
|
+
key: "setJwt",
|
|
37458
|
+
value: function setJwt(jwt) {
|
|
37459
|
+
this.jwt = jwt;
|
|
37460
|
+
}
|
|
37461
|
+
}, {
|
|
37462
|
+
key: "base64ToBlob",
|
|
37463
|
+
value: function base64ToBlob(base64String, hash) {
|
|
37464
|
+
DivaUtils.startSpanOfApm('MediaServiceHandler base64ToBlob');
|
|
37465
|
+
if (base64String.startsWith('data:image/jpeg;base64,')) {
|
|
37466
|
+
base64String = base64String.replace('data:image/jpeg;base64,', '');
|
|
37467
|
+
}
|
|
37468
|
+
var binary_string = window.atob(base64String);
|
|
37469
|
+
var len = binary_string.length;
|
|
37470
|
+
var bytes = new Uint8Array(len);
|
|
37471
|
+
for (var i = 0; i < len; i++) {
|
|
37472
|
+
bytes[i] = binary_string.charCodeAt(i);
|
|
37473
|
+
}
|
|
37474
|
+
var blob = new File([bytes.buffer], hash + '.jpg', {
|
|
37475
|
+
type: 'image/jpeg'
|
|
37476
|
+
});
|
|
37477
|
+
DivaUtils.endSpanOfApm('MediaServiceHandler base64ToBlob');
|
|
37478
|
+
return blob;
|
|
37479
|
+
}
|
|
37480
|
+
}, {
|
|
37481
|
+
key: "savePlanning2DPermanent",
|
|
37482
|
+
value: function () {
|
|
37483
|
+
var _savePlanning2DPermanent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(hash, catalogCodex, catalogGUID, planning2DAsJPG) {
|
|
37484
|
+
var imageBlob, url, data, mediaItem, mediaItemRef, response, res;
|
|
37485
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
37486
|
+
while (1) switch (_context.prev = _context.next) {
|
|
37487
|
+
case 0:
|
|
37488
|
+
DivaUtils.startSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
|
|
37489
|
+
imageBlob = this.base64ToBlob(planning2DAsJPG, hash);
|
|
37490
|
+
url = this.mediaServiceUrl + this.POST_mediaItem; //push media item return url
|
|
37491
|
+
//create media item ref and set same paramters
|
|
37492
|
+
data = new FormData();
|
|
37493
|
+
data.append('file', imageBlob);
|
|
37494
|
+
mediaItem = {
|
|
37495
|
+
organizationId: this.organizationId,
|
|
37496
|
+
mediaType: 'PCT',
|
|
37497
|
+
fileName: hash + '.jpg'
|
|
37498
|
+
};
|
|
37499
|
+
data.append('mediaItem', JSON.stringify(mediaItem));
|
|
37500
|
+
mediaItemRef = {
|
|
37501
|
+
functionType: 'P2D',
|
|
37502
|
+
planningHash: hash,
|
|
37503
|
+
catalogCodex: catalogCodex,
|
|
37504
|
+
catalogGuid: catalogGUID
|
|
37505
|
+
};
|
|
37506
|
+
data.append('mediaItemRef', JSON.stringify(mediaItemRef));
|
|
37507
|
+
_context.next = 11;
|
|
37508
|
+
return fetch(url, {
|
|
37509
|
+
method: 'POST',
|
|
37510
|
+
body: data,
|
|
37511
|
+
headers: {
|
|
37512
|
+
'X-API-KEY': this.mediaServiceApiKey
|
|
37513
|
+
}
|
|
37514
|
+
});
|
|
37515
|
+
case 11:
|
|
37516
|
+
response = _context.sent;
|
|
37517
|
+
if (!response.ok) {
|
|
37518
|
+
_context.next = 20;
|
|
37519
|
+
break;
|
|
37520
|
+
}
|
|
37521
|
+
_context.next = 15;
|
|
37522
|
+
return response.json();
|
|
37523
|
+
case 15:
|
|
37524
|
+
res = _context.sent;
|
|
37525
|
+
LOG$3.debug('Successfully saved 2D Planning in media Service. URL: ' + res.url);
|
|
37526
|
+
return _context.abrupt("return", res.url);
|
|
37527
|
+
case 20:
|
|
37528
|
+
LOG$3.error(new DivaError('Error when saving the Planning2D image on mediaService. Hash: ' + hash + 'response: ' + response, {
|
|
37529
|
+
code: 'WC_0016'
|
|
37530
|
+
}));
|
|
37531
|
+
case 21:
|
|
37532
|
+
DivaUtils.endSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
|
|
37533
|
+
return _context.abrupt("return", '');
|
|
37534
|
+
case 23:
|
|
37535
|
+
case "end":
|
|
37536
|
+
return _context.stop();
|
|
37537
|
+
}
|
|
37538
|
+
}, _callee, this);
|
|
37539
|
+
}));
|
|
37540
|
+
function savePlanning2DPermanent(_x, _x2, _x3, _x4) {
|
|
37541
|
+
return _savePlanning2DPermanent.apply(this, arguments);
|
|
37542
|
+
}
|
|
37543
|
+
return savePlanning2DPermanent;
|
|
37544
|
+
}()
|
|
37545
|
+
}]);
|
|
37546
|
+
}();
|
|
37547
|
+
var mediaServiceHandler = new DivaMediaServiceHandler();
|
|
37548
|
+
|
|
38063
37549
|
/**
|
|
38064
37550
|
* This class saves a Bounding box. This bounding box can be of one Planner (one Set) or for several planner elements (multiple Sets)
|
|
38065
37551
|
*/
|
|
@@ -38394,7 +37880,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38394
37880
|
key: "initPlanner",
|
|
38395
37881
|
value: (function () {
|
|
38396
37882
|
var _initPlanner = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(initSetState, plannerHandlerFunctions) {
|
|
38397
|
-
var renderGroup, diva3dServerUrl, divaMediaServiceUrl, mediaServiceApiKey,
|
|
37883
|
+
var renderGroup, diva3dServerUrl, divaMediaServiceUrl, mediaServiceApiKey, _initSetState$api$web, result;
|
|
38398
37884
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
38399
37885
|
while (1) switch (_context.prev = _context.next) {
|
|
38400
37886
|
case 0:
|
|
@@ -38403,8 +37889,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38403
37889
|
this.plannerHandlerFunctions = plannerHandlerFunctions;
|
|
38404
37890
|
diva3dServerUrl = initSetState.api.get3DServerUrl();
|
|
38405
37891
|
divaMediaServiceUrl = initSetState.api.getDivaMediaServiceUrl();
|
|
38406
|
-
mediaServiceApiKey = initSetState.api.getDivaMediaServiceApiKey();
|
|
38407
|
-
useSirvViewer = initSetState.api.getDiva3dUseSirvViewer(); //renderGroup = 'LeaTest';
|
|
37892
|
+
mediaServiceApiKey = initSetState.api.getDivaMediaServiceApiKey(); //renderGroup = 'LeaTest';
|
|
38408
37893
|
//diva3dServerUrl = "https://test-einkauf-onboarding.pfister.ch/diva3d/diva3dhost2/";
|
|
38409
37894
|
// diva3dServerUrl = "https://diva3dhost.diva-portal.com/diva3d/diva3dhost2/";
|
|
38410
37895
|
//diva3dServerUrl = 'https://localhost:44315/';
|
|
@@ -38414,7 +37899,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38414
37899
|
//divaMediaServiceUrl = 'https://api-test.diva-portal.com/media/';
|
|
38415
37900
|
//divaMediaServiceUrl = 'http://localhost:3000';
|
|
38416
37901
|
if (!(!initSetState.onlyRunLogic && !initSetState.no3DConnection)) {
|
|
38417
|
-
_context.next =
|
|
37902
|
+
_context.next = 14;
|
|
38418
37903
|
break;
|
|
38419
37904
|
}
|
|
38420
37905
|
this.handler3D.initializeCallbackFunctions({
|
|
@@ -38426,34 +37911,31 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38426
37911
|
this.handler3D.setJwt(initSetState.api.getJwt());
|
|
38427
37912
|
//Only use if only 1 Planner/Set is used. Not possible in setPlanner
|
|
38428
37913
|
result = this.handler3D.initializeAPISettings({
|
|
38429
|
-
useMediaServiceImageCache: initSetState.api.getDiva3dUseImageCache(),
|
|
38430
|
-
suppressCacheCreation: initSetState.api.getDiva3DSuppressCacheCreation(),
|
|
38431
37914
|
renderGroup: renderGroup,
|
|
38432
37915
|
diva3dServerUrl: diva3dServerUrl,
|
|
38433
37916
|
divaMediaServiceUrl: divaMediaServiceUrl,
|
|
38434
37917
|
organizationId: initSetState.organizationId,
|
|
38435
|
-
useSirvViewer: useSirvViewer,
|
|
38436
37918
|
arViewerUrl: (_initSetState$api$web = initSetState.api.webConfig) === null || _initSetState$api$web === void 0 ? void 0 : _initSetState$api$web.arViewerUrl
|
|
38437
37919
|
});
|
|
38438
37920
|
if (!(!this.handler3D.checkConnectionInitialized() || result.renderGroupChanged || result.diva3dServerUrlChanged)) {
|
|
38439
|
-
_context.next =
|
|
37921
|
+
_context.next = 13;
|
|
38440
37922
|
break;
|
|
38441
37923
|
}
|
|
38442
|
-
_context.next =
|
|
37924
|
+
_context.next = 13;
|
|
38443
37925
|
return this.handler3D.initializeConnection();
|
|
38444
|
-
case
|
|
37926
|
+
case 13:
|
|
38445
37927
|
if (this.divaNr != initSetState.divaNr) {
|
|
38446
37928
|
this.divaNr = initSetState.divaNr;
|
|
38447
37929
|
this.handler3D.joinDivaNr(this.divaNr);
|
|
38448
37930
|
}
|
|
38449
|
-
case
|
|
37931
|
+
case 14:
|
|
38450
37932
|
mediaServiceHandler.setMediaServiceUrl(divaMediaServiceUrl);
|
|
38451
37933
|
mediaServiceHandler.setMediaServiceApiKey(mediaServiceApiKey);
|
|
38452
37934
|
mediaServiceHandler.setOrganizationId(initSetState.organizationId);
|
|
38453
37935
|
mediaServiceHandler.setJwt(initSetState.api.getJwt());
|
|
38454
37936
|
this.handler3D.setOrigConfigurationCallback(this.plannerHandlerFunctions.getOrigConfiguration);
|
|
38455
37937
|
DivaUtils.endSpanOfApm('DivaPlannerHandler initPlanner');
|
|
38456
|
-
case
|
|
37938
|
+
case 20:
|
|
38457
37939
|
case "end":
|
|
38458
37940
|
return _context.stop();
|
|
38459
37941
|
}
|
|
@@ -38570,10 +38052,8 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38570
38052
|
roomlistCodex,
|
|
38571
38053
|
roomLists,
|
|
38572
38054
|
_yield$import,
|
|
38573
|
-
DivaSingleProductPlanner,
|
|
38574
|
-
_yield$import2,
|
|
38575
38055
|
DivaStandardPlanner,
|
|
38576
|
-
_yield$
|
|
38056
|
+
_yield$import2,
|
|
38577
38057
|
DivaBoxPlanner,
|
|
38578
38058
|
_args4 = arguments;
|
|
38579
38059
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
@@ -38602,58 +38082,44 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38602
38082
|
}
|
|
38603
38083
|
this.handler3D.initializeViewPoint(catalogData.standardWhiteroom);
|
|
38604
38084
|
_context4.t0 = set.getPlannerEdition();
|
|
38605
|
-
_context4.next = _context4.t0 === 'STANDARD' ? 8 : _context4.t0 === 'BOX' ?
|
|
38085
|
+
_context4.next = _context4.t0 === 'STANDARD' ? 8 : _context4.t0 === 'BOX' ? 15 : 21;
|
|
38606
38086
|
break;
|
|
38607
38087
|
case 8:
|
|
38608
|
-
|
|
38609
|
-
|
|
38610
|
-
|
|
38611
|
-
}
|
|
38612
|
-
_context4.next = 11;
|
|
38613
|
-
return import('./DivaSingleProductPlanner-355443b6.js');
|
|
38614
|
-
case 11:
|
|
38088
|
+
_context4.next = 10;
|
|
38089
|
+
return import('./DivaStandardPlanner-af73d121.js');
|
|
38090
|
+
case 10:
|
|
38615
38091
|
_yield$import = _context4.sent;
|
|
38616
|
-
|
|
38617
|
-
planner = new DivaSingleProductPlanner(set, this.plannerIDCount, this.setPlannerHandler.getGlobalBoundingBox(), set.api.getHidePlanner());
|
|
38618
|
-
_context4.next = 22;
|
|
38619
|
-
break;
|
|
38620
|
-
case 16:
|
|
38621
|
-
_context4.next = 18;
|
|
38622
|
-
return import('./DivaStandardPlanner-f8d55f53.js');
|
|
38623
|
-
case 18:
|
|
38624
|
-
_yield$import2 = _context4.sent;
|
|
38625
|
-
DivaStandardPlanner = _yield$import2["default"];
|
|
38092
|
+
DivaStandardPlanner = _yield$import["default"];
|
|
38626
38093
|
planner = new DivaStandardPlanner(set, this.plannerHandlerFunctions.updatePlannerMsgContainer, this.plannerIDCount, this.setPlannerHandler.getGlobalBoundingBox(), set.api.getHidePlanner(), !!set.api.getDoShowAR(), set.api.getDoDisablePlanner2D(), hasStaticBackground);
|
|
38627
38094
|
if (catalogData.isIDM3DCat) {
|
|
38628
38095
|
planner.initIDM3DMeta(catalogData.IDM3DCatCodex);
|
|
38629
38096
|
}
|
|
38630
|
-
|
|
38631
|
-
|
|
38632
|
-
|
|
38633
|
-
|
|
38634
|
-
|
|
38635
|
-
|
|
38636
|
-
|
|
38637
|
-
DivaBoxPlanner = _yield$import3["default"];
|
|
38097
|
+
return _context4.abrupt("break", 21);
|
|
38098
|
+
case 15:
|
|
38099
|
+
_context4.next = 17;
|
|
38100
|
+
return import('./DivaBoxPlanner-c20559ca.js');
|
|
38101
|
+
case 17:
|
|
38102
|
+
_yield$import2 = _context4.sent;
|
|
38103
|
+
DivaBoxPlanner = _yield$import2["default"];
|
|
38638
38104
|
planner = new DivaBoxPlanner(set, this.plannerIDCount);
|
|
38639
|
-
return _context4.abrupt("break",
|
|
38640
|
-
case
|
|
38105
|
+
return _context4.abrupt("break", 21);
|
|
38106
|
+
case 21:
|
|
38641
38107
|
this.plannerList.set(set.getSetId(), planner);
|
|
38642
38108
|
this.plannerIDCount++;
|
|
38643
38109
|
if (!(setPlanData != null && setPlanData != '')) {
|
|
38644
|
-
_context4.next =
|
|
38110
|
+
_context4.next = 26;
|
|
38645
38111
|
break;
|
|
38646
38112
|
}
|
|
38647
|
-
_context4.next =
|
|
38113
|
+
_context4.next = 26;
|
|
38648
38114
|
return planner.initPlanner(setPlanData);
|
|
38649
|
-
case
|
|
38115
|
+
case 26:
|
|
38650
38116
|
if (lastSetToInitialize) {
|
|
38651
38117
|
this.updateAllPlannerBBs();
|
|
38652
38118
|
this.setPlannerHandler.calcGlobalBoundingBox(this.plannerList);
|
|
38653
38119
|
}
|
|
38654
38120
|
this.setPlannerHandler.updateSetPosNr(this.plannerList);
|
|
38655
38121
|
DivaUtils.endSpanOfApm('DivaPlannerHandler initSet');
|
|
38656
|
-
case
|
|
38122
|
+
case 29:
|
|
38657
38123
|
case "end":
|
|
38658
38124
|
return _context4.stop();
|
|
38659
38125
|
}
|
|
@@ -39123,7 +38589,6 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39123
38589
|
}, {
|
|
39124
38590
|
key: "clearHandler3D",
|
|
39125
38591
|
value: function clearHandler3D() {
|
|
39126
|
-
this.handler3D.clearRenderCache();
|
|
39127
38592
|
this.handler3D.closeConnection();
|
|
39128
38593
|
}
|
|
39129
38594
|
}, {
|
|
@@ -39372,7 +38837,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39372
38837
|
if (!renderRequestInfos) {
|
|
39373
38838
|
LOG$2.error(new DivaError('Error requesting 3D rendering. No renderRequestInfo is set'));
|
|
39374
38839
|
return;
|
|
39375
|
-
} else if (
|
|
38840
|
+
} else if (renderRequestInfos.width <= 0 || isNaN(renderRequestInfos.width) || renderRequestInfos.height <= 0 || isNaN(renderRequestInfos.height)) {
|
|
39376
38841
|
LOG$2.error(new DivaError('Error requesting rendering. Not valid width or height request width: ' + renderRequestInfos.width + ' height: ' + renderRequestInfos.height));
|
|
39377
38842
|
return;
|
|
39378
38843
|
}
|
|
@@ -39381,14 +38846,11 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39381
38846
|
var loadedCatData = [];
|
|
39382
38847
|
var plannerExists = false;
|
|
39383
38848
|
var savedSetId = undefined;
|
|
39384
|
-
var containsNotDigitalizedTextures = false;
|
|
39385
|
-
var useMediaServiceImageCache = doRequestRendering && this.handler3D.getUseMediaServiceImageCache() ? true : false;
|
|
39386
38849
|
this.plannerList.forEach(function (planner, setId) {
|
|
39387
38850
|
var _renderRequestInfos$d;
|
|
39388
38851
|
savedSetId = setId;
|
|
39389
|
-
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,
|
|
38852
|
+
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);
|
|
39390
38853
|
var setData = config.constructionSet;
|
|
39391
|
-
if (config.containsNotDigitalizedTextures) containsNotDigitalizedTextures = true;
|
|
39392
38854
|
|
|
39393
38855
|
//Add technical Info to setData
|
|
39394
38856
|
var bboxInfo2D = _this3.get2DViewPlannerBoundingBox();
|
|
@@ -39408,15 +38870,6 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39408
38870
|
});
|
|
39409
38871
|
});
|
|
39410
38872
|
if (plannerExists) {
|
|
39411
|
-
if (containsNotDigitalizedTextures) {
|
|
39412
|
-
var _this$plannerHandlerF3, _this$plannerHandlerF4;
|
|
39413
|
-
(_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);
|
|
39414
|
-
} else {
|
|
39415
|
-
var _this$plannerHandlerF5, _this$plannerHandlerF6;
|
|
39416
|
-
//Hide message warning if shown
|
|
39417
|
-
(_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);
|
|
39418
|
-
}
|
|
39419
|
-
|
|
39420
38873
|
// if not in set planner mode overwrite s1 with correct setId
|
|
39421
38874
|
if (!this.plannerHandlerFunctions.doAllowSetPlanner()) {
|
|
39422
38875
|
plannerData.SCE.ROO[0].SET[0].ID = savedSetId;
|
|
@@ -39459,12 +38912,12 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39459
38912
|
|
|
39460
38913
|
if (!setId) {
|
|
39461
38914
|
this.plannerList.forEach(function (planner, setId) {
|
|
39462
|
-
var config = planner.getSetData(true, _this4.plannerHandlerFunctions.doAllowSetPlanner(), false
|
|
38915
|
+
var config = planner.getSetData(true, _this4.plannerHandlerFunctions.doAllowSetPlanner(), false);
|
|
39463
38916
|
var setData = config.constructionSet;
|
|
39464
38917
|
plannerData.SCE.ROO[0].SET.push(setData);
|
|
39465
38918
|
});
|
|
39466
38919
|
} else {
|
|
39467
|
-
var config = this.plannerList.get(setId).getSetData(true, this.plannerHandlerFunctions.doAllowSetPlanner(), false
|
|
38920
|
+
var config = this.plannerList.get(setId).getSetData(true, this.plannerHandlerFunctions.doAllowSetPlanner(), false);
|
|
39468
38921
|
plannerData.SCE.ROO[0].SET.push(config.constructionSet);
|
|
39469
38922
|
}
|
|
39470
38923
|
return JSON.stringify(plannerData);
|
|
@@ -39491,7 +38944,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39491
38944
|
// let posInformation: any = {};
|
|
39492
38945
|
|
|
39493
38946
|
this.plannerList.forEach(function (planner, setId) {
|
|
39494
|
-
var config = planner.getSetData(false, _this5.plannerHandlerFunctions.doAllowSetPlanner(), false
|
|
38947
|
+
var config = planner.getSetData(false, _this5.plannerHandlerFunctions.doAllowSetPlanner(), false);
|
|
39495
38948
|
plannerData.SCE.ROO[0].SET.push(config.constructionSet);
|
|
39496
38949
|
});
|
|
39497
38950
|
return md5(JSON.stringify(plannerData));
|
|
@@ -39546,7 +38999,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39546
38999
|
_defineProperty(this, "updatePlanner3DImage", void 0);
|
|
39547
39000
|
_defineProperty(this, "setRotationOrbitCube", void 0);
|
|
39548
39001
|
_defineProperty(this, "getCanvas2DAsJPG", void 0);
|
|
39549
|
-
_defineProperty(this, "updateSirvViewer", void 0);
|
|
39550
39002
|
_defineProperty(this, "updateFullscreenRendering", void 0);
|
|
39551
39003
|
_defineProperty(this, "plannerHandler", void 0);
|
|
39552
39004
|
_defineProperty(this, "updateSetImage", void 0);
|
|
@@ -39636,18 +39088,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39636
39088
|
if (rendering.getIsFullscreenRendering()) {
|
|
39637
39089
|
_this.updateFullscreenRendering(rendering);
|
|
39638
39090
|
} else {
|
|
39639
|
-
|
|
39640
|
-
|
|
39641
|
-
(_this$actSet = _this.actSet()) === null || _this$actSet === void 0 || _this$actSet.getVariantBasketData();
|
|
39642
|
-
(_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());
|
|
39643
|
-
} else {
|
|
39644
|
-
var _this$actSet3;
|
|
39645
|
-
_this.updatePlanner3DImage(rendering, ((_this$actSet3 = _this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getAlternateRenderInfo().length) > 0);
|
|
39646
|
-
}
|
|
39091
|
+
var _this$actSet;
|
|
39092
|
+
_this.updatePlanner3DImage(rendering, ((_this$actSet = _this.actSet()) === null || _this$actSet === void 0 ? void 0 : _this$actSet.getAlternateRenderInfo().length) > 0);
|
|
39647
39093
|
}
|
|
39648
39094
|
if (_this.actions && (_this$state = _this.state) !== null && _this$state !== void 0 && _this$state.enableSupport) {
|
|
39649
|
-
var _this$
|
|
39650
|
-
_this.api.postPlanningInfo((_this$
|
|
39095
|
+
var _this$actSet2, _this$state$user, _this$state$user2, _this$state$user3;
|
|
39096
|
+
_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);
|
|
39651
39097
|
}
|
|
39652
39098
|
});
|
|
39653
39099
|
/**
|
|
@@ -40489,19 +39935,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40489
39935
|
}, {
|
|
40490
39936
|
key: "getDivaArticles",
|
|
40491
39937
|
value: function getDivaArticles() {
|
|
40492
|
-
var _this$
|
|
40493
|
-
return (_this$
|
|
39938
|
+
var _this$actSet3;
|
|
39939
|
+
return (_this$actSet3 = this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getDivaArticles();
|
|
40494
39940
|
}
|
|
40495
39941
|
}, {
|
|
40496
39942
|
key: "getDimension",
|
|
40497
39943
|
value: function () {
|
|
40498
39944
|
var _getDimension = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
|
|
40499
|
-
var _this$
|
|
39945
|
+
var _this$actSet4;
|
|
40500
39946
|
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
40501
39947
|
while (1) switch (_context14.prev = _context14.next) {
|
|
40502
39948
|
case 0:
|
|
40503
39949
|
_context14.next = 2;
|
|
40504
|
-
return (_this$
|
|
39950
|
+
return (_this$actSet4 = this.actSet()) === null || _this$actSet4 === void 0 ? void 0 : _this$actSet4.getDimensionPerVariant();
|
|
40505
39951
|
case 2:
|
|
40506
39952
|
return _context14.abrupt("return", _context14.sent);
|
|
40507
39953
|
case 3:
|
|
@@ -40560,7 +40006,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40560
40006
|
this.updateWebConfiguratorTitle();
|
|
40561
40007
|
//initialize planner view
|
|
40562
40008
|
(_this$updateViewPlann9 = this.updateViewPlannerElements) === null || _this$updateViewPlann9 === void 0 || _this$updateViewPlann9.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set), set.getSetId(), set.firstElementId);
|
|
40563
|
-
this.
|
|
40009
|
+
this.updatePlannerView('INIT_VIEW');
|
|
40564
40010
|
this.onBasketInitialized();
|
|
40565
40011
|
this.checkVariantData();
|
|
40566
40012
|
case 17:
|
|
@@ -40580,8 +40026,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40580
40026
|
}, {
|
|
40581
40027
|
key: "updateWebConfiguratorTitle",
|
|
40582
40028
|
value: function updateWebConfiguratorTitle() {
|
|
40583
|
-
var _this$setWebConifgura, _this$
|
|
40584
|
-
(_this$setWebConifgura = this.setWebConifguratorTitle) === null || _this$setWebConifgura === void 0 || _this$setWebConifgura.call(this, (_this$
|
|
40029
|
+
var _this$setWebConifgura, _this$actSet5;
|
|
40030
|
+
(_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());
|
|
40585
40031
|
}
|
|
40586
40032
|
}, {
|
|
40587
40033
|
key: "updateConfigStructure",
|
|
@@ -40593,7 +40039,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40593
40039
|
value: function () {
|
|
40594
40040
|
var _runInitMode = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(plannerMode) {
|
|
40595
40041
|
var _this$navigateToTabGr2;
|
|
40596
|
-
var doDefault, configStepKey, _this$
|
|
40042
|
+
var doDefault, configStepKey, _this$actSet6, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
|
|
40597
40043
|
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
40598
40044
|
while (1) switch (_context16.prev = _context16.next) {
|
|
40599
40045
|
case 0:
|
|
@@ -40628,7 +40074,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40628
40074
|
if (doDefault) {
|
|
40629
40075
|
if (plannerMode == 'ProductList') {
|
|
40630
40076
|
(_this$navigateToTabGr3 = this.navigateToTabGroup) === null || _this$navigateToTabGr3 === void 0 || _this$navigateToTabGr3.call(this, 'PRODUCTS');
|
|
40631
|
-
} else if ((_this$
|
|
40077
|
+
} else if ((_this$actSet6 = this.actSet()) !== null && _this$actSet6 !== void 0 && _this$actSet6.hasStaticRoomList) {
|
|
40632
40078
|
(_this$navigateToTabGr4 = this.navigateToTabGroup) === null || _this$navigateToTabGr4 === void 0 || _this$navigateToTabGr4.call(this, 'ROOMLIST', true);
|
|
40633
40079
|
} else {
|
|
40634
40080
|
(_this$navigateToTabGr5 = this.navigateToTabGroup) === null || _this$navigateToTabGr5 === void 0 || _this$navigateToTabGr5.call(this, this.getCurPlannerType(true), true);
|
|
@@ -40645,24 +40091,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40645
40091
|
}
|
|
40646
40092
|
return runInitMode;
|
|
40647
40093
|
}()
|
|
40648
|
-
}, {
|
|
40649
|
-
key: "initCache",
|
|
40650
|
-
value: function initCache() {
|
|
40651
|
-
//get cached image
|
|
40652
|
-
var initFirstRenderingByCache = false;
|
|
40653
|
-
if (DivaUtils.CacheIsEnabled) {
|
|
40654
|
-
var firstImageUrl = DivaUtils.getCacheData('FIRSTIMAGE', '');
|
|
40655
|
-
if (firstImageUrl) {
|
|
40656
|
-
initFirstRenderingByCache = true;
|
|
40657
|
-
var rendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'STREAM');
|
|
40658
|
-
rendering.setHQRenderingUrl(firstImageUrl, this.api.getDiva3dUseSirvViewer());
|
|
40659
|
-
this.updatePlannerRendering(rendering);
|
|
40660
|
-
}
|
|
40661
|
-
}
|
|
40662
|
-
if (!initFirstRenderingByCache) {
|
|
40663
|
-
this.updatePlannerView('INIT_VIEW');
|
|
40664
|
-
}
|
|
40665
|
-
}
|
|
40666
40094
|
}, {
|
|
40667
40095
|
key: "addSetToActPlanningByDivaNr",
|
|
40668
40096
|
value: function () {
|
|
@@ -40876,7 +40304,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40876
40304
|
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);
|
|
40877
40305
|
break;
|
|
40878
40306
|
case '3DImage':
|
|
40879
|
-
case 'SirvViewer_only':
|
|
40880
40307
|
//Request new Rendering
|
|
40881
40308
|
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);
|
|
40882
40309
|
break;
|
|
@@ -40923,8 +40350,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40923
40350
|
}, {
|
|
40924
40351
|
key: "getAlternateRenderingsForSummary",
|
|
40925
40352
|
value: function getAlternateRenderingsForSummary() {
|
|
40926
|
-
var _this$
|
|
40927
|
-
return (_this$
|
|
40353
|
+
var _this$actSet7;
|
|
40354
|
+
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;
|
|
40928
40355
|
}
|
|
40929
40356
|
}, {
|
|
40930
40357
|
key: "destroyWebPlanner",
|
|
@@ -41220,8 +40647,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41220
40647
|
}, {
|
|
41221
40648
|
key: "setDifferentOptions",
|
|
41222
40649
|
value: function setDifferentOptions(options) {
|
|
41223
|
-
var _this$
|
|
41224
|
-
(_this$
|
|
40650
|
+
var _this$actSet8;
|
|
40651
|
+
(_this$actSet8 = this.actSet()) === null || _this$actSet8 === void 0 || _this$actSet8.setDifferentOptions(options);
|
|
41225
40652
|
}
|
|
41226
40653
|
|
|
41227
40654
|
/**
|
|
@@ -41598,7 +41025,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41598
41025
|
* This function returns true if the Planner Mode should be visible and the planner Step should be shown.
|
|
41599
41026
|
* The planner step is not shown if:
|
|
41600
41027
|
* - There is no viewer Option set for the Planner
|
|
41601
|
-
* - The configurator config disables the planner Step (SuS + Cache System)
|
|
41602
41028
|
* - The box Planner is loaded
|
|
41603
41029
|
*/
|
|
41604
41030
|
}, {
|
|
@@ -41619,8 +41045,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41619
41045
|
|
|
41620
41046
|
//if planner is hidden by config but nothing is planned initially
|
|
41621
41047
|
if (plannerType === 'NONE') {
|
|
41622
|
-
var _this$plannerConfig$a7, _this$
|
|
41623
|
-
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$
|
|
41048
|
+
var _this$plannerConfig$a7, _this$actSet9;
|
|
41049
|
+
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)) {
|
|
41624
41050
|
plannerType = 'PLANNER';
|
|
41625
41051
|
}
|
|
41626
41052
|
}
|
|
@@ -41660,38 +41086,38 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41660
41086
|
}, {
|
|
41661
41087
|
key: "getCurCatalogCodex",
|
|
41662
41088
|
value: function getCurCatalogCodex() {
|
|
41663
|
-
var _this$
|
|
41664
|
-
return (_this$
|
|
41089
|
+
var _this$actSet10;
|
|
41090
|
+
return (_this$actSet10 = this.actSet()) === null || _this$actSet10 === void 0 ? void 0 : _this$actSet10.getCatalogCodex();
|
|
41665
41091
|
}
|
|
41666
41092
|
}, {
|
|
41667
41093
|
key: "getCurCatalogName",
|
|
41668
41094
|
value: function getCurCatalogName() {
|
|
41669
|
-
var _this$
|
|
41670
|
-
return (_this$
|
|
41095
|
+
var _this$actSet11;
|
|
41096
|
+
return (_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 ? void 0 : _this$actSet11.getCatalogName();
|
|
41671
41097
|
}
|
|
41672
41098
|
}, {
|
|
41673
41099
|
key: "getCurAccountName",
|
|
41674
41100
|
value: function getCurAccountName() {
|
|
41675
|
-
var _this$
|
|
41676
|
-
return (_this$
|
|
41101
|
+
var _this$actSet12;
|
|
41102
|
+
return (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.getAccountName();
|
|
41677
41103
|
}
|
|
41678
41104
|
}, {
|
|
41679
41105
|
key: "getCurSupplierGuid",
|
|
41680
41106
|
value: function getCurSupplierGuid() {
|
|
41681
|
-
var _this$
|
|
41682
|
-
return (_this$
|
|
41107
|
+
var _this$actSet13;
|
|
41108
|
+
return (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.getSupplierGuid();
|
|
41683
41109
|
}
|
|
41684
41110
|
}, {
|
|
41685
41111
|
key: "getCurSetPrice",
|
|
41686
41112
|
value: function getCurSetPrice() {
|
|
41687
|
-
var _this$actSet$getSetPr, _this$
|
|
41688
|
-
return (_this$actSet$getSetPr = (_this$
|
|
41113
|
+
var _this$actSet$getSetPr, _this$actSet14;
|
|
41114
|
+
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;
|
|
41689
41115
|
}
|
|
41690
41116
|
}, {
|
|
41691
41117
|
key: "getCurImageMode",
|
|
41692
41118
|
value: function getCurImageMode() {
|
|
41693
|
-
var _this$
|
|
41694
|
-
return (_this$
|
|
41119
|
+
var _this$actSet15;
|
|
41120
|
+
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';
|
|
41695
41121
|
}
|
|
41696
41122
|
}, {
|
|
41697
41123
|
key: "getViewConfig",
|
|
@@ -41722,73 +41148,63 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41722
41148
|
}, {
|
|
41723
41149
|
key: "doShow3DDimensionLines",
|
|
41724
41150
|
value: function doShow3DDimensionLines() {
|
|
41725
|
-
var _this$
|
|
41726
|
-
return (_this$
|
|
41151
|
+
var _this$actSet16;
|
|
41152
|
+
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;
|
|
41727
41153
|
}
|
|
41728
41154
|
}, {
|
|
41729
41155
|
key: "hidePlannerUiIcons",
|
|
41730
41156
|
value: function hidePlannerUiIcons() {
|
|
41731
|
-
var _this$
|
|
41732
|
-
return (_this$
|
|
41157
|
+
var _this$actSet17;
|
|
41158
|
+
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;
|
|
41733
41159
|
}
|
|
41734
41160
|
}, {
|
|
41735
41161
|
key: "doShowPlannerReplaceMode",
|
|
41736
41162
|
value: function doShowPlannerReplaceMode() {
|
|
41737
|
-
var _this$
|
|
41738
|
-
var catalogData = (_this$
|
|
41163
|
+
var _this$actSet18, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
|
|
41164
|
+
var catalogData = (_this$actSet18 = this.actSet()) === null || _this$actSet18 === void 0 ? void 0 : _this$actSet18.CatalogData;
|
|
41739
41165
|
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;
|
|
41740
41166
|
}
|
|
41741
41167
|
}, {
|
|
41742
41168
|
key: "doPlannerReplaceAutoSwitch",
|
|
41743
41169
|
value: function doPlannerReplaceAutoSwitch() {
|
|
41744
|
-
var _this$
|
|
41745
|
-
var catalogData = (_this$
|
|
41170
|
+
var _this$actSet19, _this$api$getViewConf3;
|
|
41171
|
+
var catalogData = (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.CatalogData;
|
|
41746
41172
|
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);
|
|
41747
41173
|
}
|
|
41748
41174
|
}, {
|
|
41749
41175
|
key: "getHidePlanner",
|
|
41750
41176
|
value: function getHidePlanner() {
|
|
41751
|
-
var _this$
|
|
41752
|
-
return this.api.getHidePlanner() || !!((_this$
|
|
41177
|
+
var _this$actSet20;
|
|
41178
|
+
return this.api.getHidePlanner() || !!((_this$actSet20 = this.actSet()) !== null && _this$actSet20 !== void 0 && _this$actSet20.CatalogData.useBoxPlanner);
|
|
41753
41179
|
}
|
|
41754
41180
|
}, {
|
|
41755
41181
|
key: "getAllowRTV",
|
|
41756
41182
|
value: function getAllowRTV() {
|
|
41757
|
-
var _this$
|
|
41758
|
-
if ((_this$
|
|
41759
|
-
if (this.api.getDoShowRTV() && (_this$
|
|
41183
|
+
var _this$actSet21, _this$actSet22;
|
|
41184
|
+
if ((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.divaForceRTV) return true;
|
|
41185
|
+
if (this.api.getDoShowRTV() && (_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaArReady) return true;
|
|
41760
41186
|
return false;
|
|
41761
41187
|
}
|
|
41762
41188
|
}, {
|
|
41763
41189
|
key: "geAllowQRCodeAR",
|
|
41764
41190
|
value: function geAllowQRCodeAR() {
|
|
41765
|
-
var _this$
|
|
41766
|
-
if (this.api.getDoShowAR() && (_this$
|
|
41191
|
+
var _this$actSet23;
|
|
41192
|
+
if (this.api.getDoShowAR() && (_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaArReady) return true;
|
|
41767
41193
|
return false;
|
|
41768
41194
|
}
|
|
41769
41195
|
}, {
|
|
41770
41196
|
key: "getEnableUnityRtvKombi",
|
|
41771
41197
|
value: function getEnableUnityRtvKombi() {
|
|
41772
|
-
var _this$
|
|
41198
|
+
var _this$actSet24;
|
|
41773
41199
|
// if force rtv disable unity kombi - biohort
|
|
41774
|
-
if ((_this$
|
|
41200
|
+
if ((_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaForceRTV) return false;
|
|
41775
41201
|
return this.api.getEnableRTVUnityKombi();
|
|
41776
41202
|
}
|
|
41777
41203
|
}, {
|
|
41778
41204
|
key: "getShelfPlannerRTV",
|
|
41779
41205
|
value: function getShelfPlannerRTV() {
|
|
41780
|
-
var _this$
|
|
41781
|
-
return (_this$
|
|
41782
|
-
}
|
|
41783
|
-
}, {
|
|
41784
|
-
key: "getDiva3DSuppressCacheCreation",
|
|
41785
|
-
value: function getDiva3DSuppressCacheCreation() {
|
|
41786
|
-
return this.api.getDiva3DSuppressCacheCreation();
|
|
41787
|
-
}
|
|
41788
|
-
}, {
|
|
41789
|
-
key: "getDiva3dUseImageCache",
|
|
41790
|
-
value: function getDiva3dUseImageCache() {
|
|
41791
|
-
return this.api.getDiva3dUseImageCache();
|
|
41206
|
+
var _this$actSet25;
|
|
41207
|
+
return (_this$actSet25 = this.actSet()) === null || _this$actSet25 === void 0 ? void 0 : _this$actSet25.CatalogData.useShelfPlannerRTV;
|
|
41792
41208
|
}
|
|
41793
41209
|
}, {
|
|
41794
41210
|
key: "getBasketData",
|
|
@@ -41829,8 +41245,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41829
41245
|
}, {
|
|
41830
41246
|
key: "getCatalogData",
|
|
41831
41247
|
value: function getCatalogData() {
|
|
41832
|
-
var _this$
|
|
41833
|
-
return (_this$
|
|
41248
|
+
var _this$actSet26;
|
|
41249
|
+
return (_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.CatalogData;
|
|
41834
41250
|
}
|
|
41835
41251
|
}, {
|
|
41836
41252
|
key: "ReturnTo",
|
|
@@ -42111,11 +41527,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42111
41527
|
value: function registerGetCanvas2DAsJPG(getCanvas2DAsJPG) {
|
|
42112
41528
|
this.getCanvas2DAsJPG = getCanvas2DAsJPG;
|
|
42113
41529
|
}
|
|
42114
|
-
}, {
|
|
42115
|
-
key: "registerUpdateSirvViewer",
|
|
42116
|
-
value: function registerUpdateSirvViewer(updateSirvViewer) {
|
|
42117
|
-
this.updateSirvViewer = updateSirvViewer;
|
|
42118
|
-
}
|
|
42119
41530
|
}, {
|
|
42120
41531
|
key: "registerUpdatePlanner2DGrid",
|
|
42121
41532
|
value: function registerUpdatePlanner2DGrid(updatePlanner2DGrid) {
|
|
@@ -42583,7 +41994,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42583
41994
|
this.updatePlanner3DImage = undefined;
|
|
42584
41995
|
this.setRotationOrbitCube = undefined;
|
|
42585
41996
|
this.getCanvas2DAsJPG = undefined;
|
|
42586
|
-
this.updateSirvViewer = undefined;
|
|
42587
41997
|
this.updatePlannerMsgContainer = undefined;
|
|
42588
41998
|
this.updateFullscreenRendering = undefined;
|
|
42589
41999
|
this.updateSetImage = undefined;
|