@crystaldesign/web-planner-logic 24.10.0-beta.10 → 24.10.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/{DivaBoxPlanner-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
|
@@ -43,8 +43,8 @@ var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
|
43
43
|
})();
|
|
44
44
|
|
|
45
45
|
var _excluded = ["type"];
|
|
46
|
-
function ownKeys$
|
|
47
|
-
function _objectSpread$
|
|
46
|
+
function ownKeys$e(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
47
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
48
48
|
var LOG$g = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
49
49
|
var JsonDataCache = /*#__PURE__*/function () {
|
|
50
50
|
function JsonDataCache() {
|
|
@@ -250,8 +250,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
250
250
|
if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig2 = this.apiConfig) !== null && _this$apiConfig2 !== void 0 && _this$apiConfig2.api2.web) {
|
|
251
251
|
api2Url = this.apiConfig.api2.web;
|
|
252
252
|
}
|
|
253
|
-
_context2.t0 = _objectSpread$
|
|
254
|
-
_context2.t1 = _objectSpread$
|
|
253
|
+
_context2.t0 = _objectSpread$e;
|
|
254
|
+
_context2.t1 = _objectSpread$e({}, init.config.headers);
|
|
255
255
|
_context2.t2 = {};
|
|
256
256
|
_context2.next = 20;
|
|
257
257
|
return this.getSessionGuid('V', undefined, this.OrganizationId, api2Url);
|
|
@@ -281,7 +281,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
281
281
|
key: "getDataCache",
|
|
282
282
|
value: function () {
|
|
283
283
|
var _getDataCache = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(queryString, cacheMD5, accountSessionGuid, useWebServiceApi, method, data) {
|
|
284
|
-
var myQS, url, init, addSession,
|
|
284
|
+
var myQS, url, init, addSession, _this$apiConfig3, _this$apiConfig4, api2Url, result;
|
|
285
285
|
return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context3) {
|
|
286
286
|
while (1) switch (_context3.prev = _context3.next) {
|
|
287
287
|
case 0:
|
|
@@ -294,7 +294,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
294
294
|
};
|
|
295
295
|
addSession = true;
|
|
296
296
|
if (!(this.jsonDataCache.get(myQS) || cacheMD5 && this.jsonDataCache.get(cacheMD5))) {
|
|
297
|
-
_context3.next =
|
|
297
|
+
_context3.next = 9;
|
|
298
298
|
break;
|
|
299
299
|
}
|
|
300
300
|
LOG$g.debug('getDataFromInternalCache: ' + queryString);
|
|
@@ -305,77 +305,68 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
305
305
|
return _context3.abrupt("return", this.jsonDataCache.get(myQS));
|
|
306
306
|
case 8:
|
|
307
307
|
return _context3.abrupt("return", this.jsonDataCache.get(cacheMD5));
|
|
308
|
-
case
|
|
309
|
-
if (cacheMD5) {
|
|
310
|
-
cacheUrl = DivaUtils__default["default"].getCacheData(cacheMD5, queryString);
|
|
311
|
-
if (cacheUrl) {
|
|
312
|
-
LOG$g.debug('getDataFromCDNCache: ' + queryString);
|
|
313
|
-
url = cacheUrl;
|
|
314
|
-
addSession = false;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
case 12:
|
|
308
|
+
case 9:
|
|
318
309
|
if (!addSession) {
|
|
319
|
-
_context3.next =
|
|
310
|
+
_context3.next = 31;
|
|
320
311
|
break;
|
|
321
312
|
}
|
|
322
313
|
if (!useWebServiceApi) {
|
|
323
|
-
_context3.next =
|
|
314
|
+
_context3.next = 22;
|
|
324
315
|
break;
|
|
325
316
|
}
|
|
326
317
|
if (!this.jwt) {
|
|
327
|
-
_context3.next =
|
|
318
|
+
_context3.next = 15;
|
|
328
319
|
break;
|
|
329
320
|
}
|
|
330
321
|
init.config.headers = {
|
|
331
322
|
Authorization: 'Bearer ' + this.jwt
|
|
332
323
|
};
|
|
333
|
-
_context3.next =
|
|
324
|
+
_context3.next = 20;
|
|
334
325
|
break;
|
|
335
|
-
case
|
|
326
|
+
case 15:
|
|
336
327
|
if (!this.apiKey) {
|
|
337
|
-
_context3.next =
|
|
328
|
+
_context3.next = 19;
|
|
338
329
|
break;
|
|
339
330
|
}
|
|
340
331
|
init.config.headers = {
|
|
341
332
|
'X-API-KEY': this.apiKey
|
|
342
333
|
};
|
|
343
|
-
_context3.next =
|
|
334
|
+
_context3.next = 20;
|
|
344
335
|
break;
|
|
345
|
-
case
|
|
336
|
+
case 19:
|
|
346
337
|
throw new Error('not jwt or API Key Found');
|
|
347
|
-
case
|
|
348
|
-
_context3.next =
|
|
338
|
+
case 20:
|
|
339
|
+
_context3.next = 31;
|
|
349
340
|
break;
|
|
350
|
-
case
|
|
341
|
+
case 22:
|
|
351
342
|
api2Url = (_this$apiConfig3 = this.apiConfig) === null || _this$apiConfig3 === void 0 ? void 0 : _this$apiConfig3.api2["default"];
|
|
352
343
|
if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig4 = this.apiConfig) !== null && _this$apiConfig4 !== void 0 && _this$apiConfig4.api2.web) {
|
|
353
344
|
api2Url = this.apiConfig.api2.web;
|
|
354
345
|
}
|
|
355
346
|
_context3.t0 = accountSessionGuid;
|
|
356
347
|
if (_context3.t0) {
|
|
357
|
-
_context3.next =
|
|
348
|
+
_context3.next = 29;
|
|
358
349
|
break;
|
|
359
350
|
}
|
|
360
|
-
_context3.next =
|
|
351
|
+
_context3.next = 28;
|
|
361
352
|
return this.getSessionGuid('V', undefined, this.OrganizationId, api2Url);
|
|
362
|
-
case
|
|
353
|
+
case 28:
|
|
363
354
|
_context3.t0 = _context3.sent;
|
|
364
|
-
case
|
|
355
|
+
case 29:
|
|
365
356
|
_context3.t1 = _context3.t0;
|
|
366
357
|
init.config.headers = {
|
|
367
358
|
sessionGuid: _context3.t1
|
|
368
359
|
};
|
|
369
|
-
case
|
|
370
|
-
_context3.next =
|
|
360
|
+
case 31:
|
|
361
|
+
_context3.next = 33;
|
|
371
362
|
return this.fetchData(url, init);
|
|
372
|
-
case
|
|
363
|
+
case 33:
|
|
373
364
|
result = _context3.sent;
|
|
374
365
|
this.jsonDataCache.set(myQS, result);
|
|
375
366
|
if (cacheMD5) this.jsonDataCache.set(cacheMD5, result);
|
|
376
367
|
LOG$g.debug('getDataFromApi: ' + queryString);
|
|
377
368
|
return _context3.abrupt("return", result);
|
|
378
|
-
case
|
|
369
|
+
case 38:
|
|
379
370
|
case "end":
|
|
380
371
|
return _context3.stop();
|
|
381
372
|
}
|
|
@@ -438,9 +429,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
438
429
|
diva3dServerMode: data.diva3dServerMode != undefined ? data.diva3dServerMode : 'SignalR',
|
|
439
430
|
diva3dRenderGroup: data.diva3dRenderGroup != undefined ? data.diva3dRenderGroup : 'MYCC7',
|
|
440
431
|
mediaServiceApiKey: data.divaMediaServiceApiKey,
|
|
441
|
-
diva3dUseImageCache: data.diva3dUseImageCache != undefined ? data.diva3dUseImageCache : false,
|
|
442
|
-
diva3dSuppressCacheCreation: data.diva3dSuppressCacheCreation != undefined ? data.diva3dSuppressCacheCreation : false,
|
|
443
|
-
diva3dUseSirvViewer: data.diva3dUseSirvViewer != undefined ? data.diva3dUseSirvViewer : false,
|
|
444
432
|
language: lang !== null && lang !== void 0 ? lang : this.getLanguage(),
|
|
445
433
|
abTestCases: data.abTestCases !== undefined ? data.abTestCases : [],
|
|
446
434
|
checkForProductsInStock: data.checkForProductsInStock,
|
|
@@ -559,24 +547,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
559
547
|
var _this$divaWebConfigDa8, _this$divaWebConfigDa9;
|
|
560
548
|
return (_this$divaWebConfigDa8 = (_this$divaWebConfigDa9 = this.divaWebConfigData) === null || _this$divaWebConfigDa9 === void 0 ? void 0 : _this$divaWebConfigDa9.diva3dRenderGroup) !== null && _this$divaWebConfigDa8 !== void 0 ? _this$divaWebConfigDa8 : '';
|
|
561
549
|
}
|
|
562
|
-
}, {
|
|
563
|
-
key: "getDiva3dUseImageCache",
|
|
564
|
-
value: function getDiva3dUseImageCache() {
|
|
565
|
-
var _this$divaWebConfigDa10;
|
|
566
|
-
return !!((_this$divaWebConfigDa10 = this.divaWebConfigData) !== null && _this$divaWebConfigDa10 !== void 0 && _this$divaWebConfigDa10.diva3dUseImageCache);
|
|
567
|
-
}
|
|
568
|
-
}, {
|
|
569
|
-
key: "getDiva3DSuppressCacheCreation",
|
|
570
|
-
value: function getDiva3DSuppressCacheCreation() {
|
|
571
|
-
var _this$divaWebConfigDa11;
|
|
572
|
-
return !!((_this$divaWebConfigDa11 = this.divaWebConfigData) !== null && _this$divaWebConfigDa11 !== void 0 && _this$divaWebConfigDa11.diva3dSuppressCacheCreation);
|
|
573
|
-
}
|
|
574
|
-
}, {
|
|
575
|
-
key: "getDiva3dUseSirvViewer",
|
|
576
|
-
value: function getDiva3dUseSirvViewer() {
|
|
577
|
-
var _this$divaWebConfigDa12;
|
|
578
|
-
return !!((_this$divaWebConfigDa12 = this.divaWebConfigData) !== null && _this$divaWebConfigDa12 !== void 0 && _this$divaWebConfigDa12.diva3dUseSirvViewer);
|
|
579
|
-
}
|
|
580
550
|
}, {
|
|
581
551
|
key: "getServerId",
|
|
582
552
|
value: function getServerId() {
|
|
@@ -612,80 +582,80 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
612
582
|
}, {
|
|
613
583
|
key: "getDiva3dStaticBGImage",
|
|
614
584
|
value: function getDiva3dStaticBGImage() {
|
|
615
|
-
var _this$
|
|
616
|
-
return (_this$
|
|
585
|
+
var _this$divaWebConfigDa10;
|
|
586
|
+
return (_this$divaWebConfigDa10 = this.divaWebConfigData) === null || _this$divaWebConfigDa10 === void 0 ? void 0 : _this$divaWebConfigDa10.diva3dStaticBGImage;
|
|
617
587
|
}
|
|
618
588
|
}, {
|
|
619
589
|
key: "getDiva3dStaticBGImage_DefaultRoomList",
|
|
620
590
|
value: function getDiva3dStaticBGImage_DefaultRoomList() {
|
|
621
|
-
var _this$
|
|
622
|
-
return ((_this$
|
|
591
|
+
var _this$divaWebConfigDa11, _this$divaWebConfigDa12;
|
|
592
|
+
return ((_this$divaWebConfigDa11 = this.divaWebConfigData) === null || _this$divaWebConfigDa11 === void 0 ? void 0 : _this$divaWebConfigDa11.diva3dStaticBGImage_DefaultRoomList) == '' ? '3D_STATBG_ROOMLIST' : (_this$divaWebConfigDa12 = this.divaWebConfigData) === null || _this$divaWebConfigDa12 === void 0 ? void 0 : _this$divaWebConfigDa12.diva3dStaticBGImage_DefaultRoomList;
|
|
623
593
|
}
|
|
624
594
|
}, {
|
|
625
595
|
key: "getDiva3DAllowDefaultCatRoomList",
|
|
626
596
|
value: function getDiva3DAllowDefaultCatRoomList() {
|
|
627
|
-
var _this$
|
|
628
|
-
return (_this$
|
|
597
|
+
var _this$divaWebConfigDa13;
|
|
598
|
+
return (_this$divaWebConfigDa13 = this.divaWebConfigData) === null || _this$divaWebConfigDa13 === void 0 ? void 0 : _this$divaWebConfigDa13.diva3DAllowDefaultCatRoomList;
|
|
629
599
|
}
|
|
630
600
|
}, {
|
|
631
601
|
key: "doAllowSetPlanner",
|
|
632
602
|
value: function doAllowSetPlanner() {
|
|
633
|
-
var _this$
|
|
634
|
-
return (_this$
|
|
603
|
+
var _this$divaWebConfigDa14;
|
|
604
|
+
return (_this$divaWebConfigDa14 = this.divaWebConfigData) === null || _this$divaWebConfigDa14 === void 0 ? void 0 : _this$divaWebConfigDa14.doAllowSetPlanner;
|
|
635
605
|
}
|
|
636
606
|
}, {
|
|
637
607
|
key: "getHidePlanner",
|
|
638
608
|
value: function getHidePlanner() {
|
|
639
|
-
var _this$
|
|
640
|
-
return !!((_this$
|
|
609
|
+
var _this$divaWebConfigDa15;
|
|
610
|
+
return !!((_this$divaWebConfigDa15 = this.divaWebConfigData) !== null && _this$divaWebConfigDa15 !== void 0 && (_this$divaWebConfigDa15 = _this$divaWebConfigDa15.viewConfig) !== null && _this$divaWebConfigDa15 !== void 0 && _this$divaWebConfigDa15.hidePlanner);
|
|
641
611
|
}
|
|
642
612
|
}, {
|
|
643
613
|
key: "getDoShowAR",
|
|
644
614
|
value: function getDoShowAR() {
|
|
645
|
-
var _this$
|
|
646
|
-
return (_this$
|
|
615
|
+
var _this$divaWebConfigDa16;
|
|
616
|
+
return (_this$divaWebConfigDa16 = this.divaWebConfigData) === null || _this$divaWebConfigDa16 === void 0 || (_this$divaWebConfigDa16 = _this$divaWebConfigDa16.viewConfig) === null || _this$divaWebConfigDa16 === void 0 ? void 0 : _this$divaWebConfigDa16.enableAR;
|
|
647
617
|
}
|
|
648
618
|
}, {
|
|
649
619
|
key: "getDoShowRTV",
|
|
650
620
|
value: function getDoShowRTV() {
|
|
651
|
-
var _this$
|
|
652
|
-
return (_this$
|
|
621
|
+
var _this$divaWebConfigDa17;
|
|
622
|
+
return (_this$divaWebConfigDa17 = this.divaWebConfigData) === null || _this$divaWebConfigDa17 === void 0 || (_this$divaWebConfigDa17 = _this$divaWebConfigDa17.viewConfig) === null || _this$divaWebConfigDa17 === void 0 ? void 0 : _this$divaWebConfigDa17.enableRTV;
|
|
653
623
|
}
|
|
654
624
|
}, {
|
|
655
625
|
key: "getEnableRTVUnityKombi",
|
|
656
626
|
value: function getEnableRTVUnityKombi() {
|
|
657
|
-
var _this$
|
|
658
|
-
return !!((_this$
|
|
627
|
+
var _this$divaWebConfigDa18;
|
|
628
|
+
return !!((_this$divaWebConfigDa18 = this.divaWebConfigData) !== null && _this$divaWebConfigDa18 !== void 0 && _this$divaWebConfigDa18.viewConfig.enableRtvUnityKombi);
|
|
659
629
|
}
|
|
660
630
|
}, {
|
|
661
631
|
key: "getDoDisablePlanner2D",
|
|
662
632
|
value: function getDoDisablePlanner2D() {
|
|
663
|
-
var _this$
|
|
664
|
-
return !!((_this$
|
|
633
|
+
var _this$divaWebConfigDa19;
|
|
634
|
+
return !!((_this$divaWebConfigDa19 = this.divaWebConfigData) !== null && _this$divaWebConfigDa19 !== void 0 && _this$divaWebConfigDa19.doDisablePlanner2D);
|
|
665
635
|
}
|
|
666
636
|
}, {
|
|
667
637
|
key: "getRoomListInProduct",
|
|
668
638
|
value: function getRoomListInProduct() {
|
|
669
|
-
var _this$
|
|
670
|
-
return !!((_this$
|
|
639
|
+
var _this$divaWebConfigDa20;
|
|
640
|
+
return !!((_this$divaWebConfigDa20 = this.divaWebConfigData) !== null && _this$divaWebConfigDa20 !== void 0 && (_this$divaWebConfigDa20 = _this$divaWebConfigDa20.viewConfig) !== null && _this$divaWebConfigDa20 !== void 0 && _this$divaWebConfigDa20.roomListInProduct);
|
|
671
641
|
}
|
|
672
642
|
}, {
|
|
673
643
|
key: "getPlannerType",
|
|
674
644
|
value: function getPlannerType() {
|
|
675
|
-
var _this$
|
|
676
|
-
return (_this$
|
|
645
|
+
var _this$divaWebConfigDa21;
|
|
646
|
+
return (_this$divaWebConfigDa21 = this.divaWebConfigData) === null || _this$divaWebConfigDa21 === void 0 || (_this$divaWebConfigDa21 = _this$divaWebConfigDa21.viewConfig) === null || _this$divaWebConfigDa21 === void 0 ? void 0 : _this$divaWebConfigDa21.plannerType;
|
|
677
647
|
}
|
|
678
648
|
}, {
|
|
679
649
|
key: "getLoadSupplierColors",
|
|
680
650
|
value: function getLoadSupplierColors() {
|
|
681
|
-
var _this$
|
|
682
|
-
return !!((_this$
|
|
651
|
+
var _this$divaWebConfigDa22;
|
|
652
|
+
return !!((_this$divaWebConfigDa22 = this.divaWebConfigData) !== null && _this$divaWebConfigDa22 !== void 0 && _this$divaWebConfigDa22.loadSupplierColors);
|
|
683
653
|
}
|
|
684
654
|
}, {
|
|
685
655
|
key: "showSelectionModeZero",
|
|
686
656
|
value: function showSelectionModeZero() {
|
|
687
|
-
var _this$
|
|
688
|
-
return !!((_this$
|
|
657
|
+
var _this$divaWebConfigDa23;
|
|
658
|
+
return !!((_this$divaWebConfigDa23 = this.divaWebConfigData) !== null && _this$divaWebConfigDa23 !== void 0 && _this$divaWebConfigDa23.showSelectionModeZero);
|
|
689
659
|
}
|
|
690
660
|
}, {
|
|
691
661
|
key: "ruleDescSeperator",
|
|
@@ -705,8 +675,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
705
675
|
}, {
|
|
706
676
|
key: "getDoCheckVariantData",
|
|
707
677
|
value: function getDoCheckVariantData() {
|
|
708
|
-
var _this$
|
|
709
|
-
return (_this$
|
|
678
|
+
var _this$divaWebConfigDa24;
|
|
679
|
+
return (_this$divaWebConfigDa24 = this.divaWebConfigData) === null || _this$divaWebConfigDa24 === void 0 ? void 0 : _this$divaWebConfigDa24.doCheckVariantData;
|
|
710
680
|
}
|
|
711
681
|
}, {
|
|
712
682
|
key: "setI18n",
|
|
@@ -799,50 +769,50 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
799
769
|
}, {
|
|
800
770
|
key: "getViewConfig",
|
|
801
771
|
value: function getViewConfig() {
|
|
802
|
-
var _this$
|
|
803
|
-
return (_this$
|
|
772
|
+
var _this$divaWebConfigDa25;
|
|
773
|
+
return (_this$divaWebConfigDa25 = this.divaWebConfigData) === null || _this$divaWebConfigDa25 === void 0 ? void 0 : _this$divaWebConfigDa25.viewConfig;
|
|
804
774
|
}
|
|
805
775
|
}, {
|
|
806
776
|
key: "getEmailConfig",
|
|
807
777
|
value: function getEmailConfig() {
|
|
808
|
-
var _this$
|
|
809
|
-
return (_this$
|
|
778
|
+
var _this$divaWebConfigDa26;
|
|
779
|
+
return (_this$divaWebConfigDa26 = this.divaWebConfigData) === null || _this$divaWebConfigDa26 === void 0 ? void 0 : _this$divaWebConfigDa26.emailConfig;
|
|
810
780
|
}
|
|
811
781
|
}, {
|
|
812
782
|
key: "getABTestCases",
|
|
813
783
|
value: function getABTestCases() {
|
|
814
|
-
var _this$
|
|
815
|
-
return (_this$
|
|
784
|
+
var _this$divaWebConfigDa27, _this$divaWebConfigDa28;
|
|
785
|
+
return (_this$divaWebConfigDa27 = (_this$divaWebConfigDa28 = this.divaWebConfigData) === null || _this$divaWebConfigDa28 === void 0 ? void 0 : _this$divaWebConfigDa28.abTestCases) !== null && _this$divaWebConfigDa27 !== void 0 ? _this$divaWebConfigDa27 : [];
|
|
816
786
|
}
|
|
817
787
|
}, {
|
|
818
788
|
key: "getBarrierConfig",
|
|
819
789
|
value: function getBarrierConfig() {
|
|
820
|
-
var _this$
|
|
821
|
-
return (_this$
|
|
790
|
+
var _this$divaWebConfigDa29;
|
|
791
|
+
return (_this$divaWebConfigDa29 = this.divaWebConfigData) === null || _this$divaWebConfigDa29 === void 0 ? void 0 : _this$divaWebConfigDa29.barrierConfig;
|
|
822
792
|
}
|
|
823
793
|
}, {
|
|
824
794
|
key: "getTemplateConfig",
|
|
825
795
|
value: function getTemplateConfig() {
|
|
826
|
-
var _this$
|
|
827
|
-
return (_this$
|
|
796
|
+
var _this$divaWebConfigDa30;
|
|
797
|
+
return (_this$divaWebConfigDa30 = this.divaWebConfigData) === null || _this$divaWebConfigDa30 === void 0 ? void 0 : _this$divaWebConfigDa30.templateConfig;
|
|
828
798
|
}
|
|
829
799
|
}, {
|
|
830
800
|
key: "showDivaNr",
|
|
831
801
|
value: function showDivaNr() {
|
|
832
|
-
var _this$
|
|
833
|
-
return (_this$
|
|
802
|
+
var _this$divaWebConfigDa31;
|
|
803
|
+
return (_this$divaWebConfigDa31 = this.divaWebConfigData) === null || _this$divaWebConfigDa31 === void 0 ? void 0 : _this$divaWebConfigDa31.showDivaNr;
|
|
834
804
|
}
|
|
835
805
|
}, {
|
|
836
806
|
key: "onErrorHandling",
|
|
837
807
|
value: function onErrorHandling() {
|
|
838
|
-
var _this$
|
|
839
|
-
return (_this$
|
|
808
|
+
var _this$divaWebConfigDa32;
|
|
809
|
+
return (_this$divaWebConfigDa32 = this.divaWebConfigData) === null || _this$divaWebConfigDa32 === void 0 ? void 0 : _this$divaWebConfigDa32.onErrorHandling;
|
|
840
810
|
}
|
|
841
811
|
}, {
|
|
842
812
|
key: "diva3DRenderingDefault",
|
|
843
813
|
value: function diva3DRenderingDefault() {
|
|
844
|
-
var _this$
|
|
845
|
-
return (_this$
|
|
814
|
+
var _this$divaWebConfigDa33;
|
|
815
|
+
return (_this$divaWebConfigDa33 = this.divaWebConfigData) === null || _this$divaWebConfigDa33 === void 0 ? void 0 : _this$divaWebConfigDa33.diva3DRenderingDefault;
|
|
846
816
|
}
|
|
847
817
|
}, {
|
|
848
818
|
key: "getJwt",
|
|
@@ -857,8 +827,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
857
827
|
}, {
|
|
858
828
|
key: "getUseMask",
|
|
859
829
|
value: function getUseMask() {
|
|
860
|
-
var _this$
|
|
861
|
-
return (_this$
|
|
830
|
+
var _this$divaWebConfigDa34;
|
|
831
|
+
return (_this$divaWebConfigDa34 = this.divaWebConfigData) === null || _this$divaWebConfigDa34 === void 0 ? void 0 : _this$divaWebConfigDa34.useMask;
|
|
862
832
|
}
|
|
863
833
|
}, {
|
|
864
834
|
key: "apiUrl",
|
|
@@ -1150,12 +1120,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1150
1120
|
value: function getImageURL(image, mediaURL) {
|
|
1151
1121
|
var ret = '';
|
|
1152
1122
|
if (image != '' && image != null) {
|
|
1153
|
-
if (DivaUtils__default["default"].CacheIsEnabled) {
|
|
1154
|
-
ret = DivaUtils__default["default"].getCacheData(image.toUpperCase(), '');
|
|
1155
|
-
if (ret) {
|
|
1156
|
-
return ret;
|
|
1157
|
-
}
|
|
1158
|
-
}
|
|
1159
1123
|
var header = image.substring(0, 4).toLowerCase();
|
|
1160
1124
|
if (header == 'http' || header == 'data') {
|
|
1161
1125
|
ret = image;
|
|
@@ -1396,8 +1360,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1396
1360
|
}, {
|
|
1397
1361
|
key: "dontLoadAdditionalModelInfos",
|
|
1398
1362
|
get: function get() {
|
|
1399
|
-
var _this$
|
|
1400
|
-
return (_this$
|
|
1363
|
+
var _this$divaWebConfigDa35;
|
|
1364
|
+
return (_this$divaWebConfigDa35 = this.divaWebConfigData) === null || _this$divaWebConfigDa35 === void 0 ? void 0 : _this$divaWebConfigDa35.dontLoadAdditionalModelInfos;
|
|
1401
1365
|
}
|
|
1402
1366
|
}, {
|
|
1403
1367
|
key: "OrganizationId",
|
|
@@ -1708,7 +1672,6 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
|
|
|
1708
1672
|
catalogOPV: catalogOPV,
|
|
1709
1673
|
pac: jsonOPV.PAC,
|
|
1710
1674
|
pgr: jsonOPV.PGR,
|
|
1711
|
-
isRendered: jsonOPV.IsRendered != undefined ? jsonOPV.IsRendered : true,
|
|
1712
1675
|
subArticleCodex: jsonOPV.SubArticleCodex && jsonOPV.SubArticleCodex != '' ? jsonOPV.SubArticleCodex : undefined,
|
|
1713
1676
|
subArticleTypeNr: jsonOPV.SubArticleTypeNr && jsonOPV.SubArticleTypeNr != '' ? jsonOPV.SubArticleTypeNr : undefined,
|
|
1714
1677
|
subRetailArticleNr: jsonOPV.SubRetailArticleNr && jsonOPV.SubRetailArticleNr != '' ? jsonOPV.SubRetailArticleNr : undefined,
|
|
@@ -2045,11 +2008,6 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
|
|
|
2045
2008
|
get: function get() {
|
|
2046
2009
|
return this.opv.catalogOPV.value;
|
|
2047
2010
|
}
|
|
2048
|
-
}, {
|
|
2049
|
-
key: "isDigitalized",
|
|
2050
|
-
get: function get() {
|
|
2051
|
-
return this.opv.isRendered;
|
|
2052
|
-
}
|
|
2053
2011
|
}, {
|
|
2054
2012
|
key: "metaData",
|
|
2055
2013
|
get: function get() {
|
|
@@ -20259,12 +20217,6 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
20259
20217
|
set: function set(val) {
|
|
20260
20218
|
this.articleOptionState.freeTextLang = val;
|
|
20261
20219
|
}
|
|
20262
|
-
}, {
|
|
20263
|
-
key: "isNotVisualized",
|
|
20264
|
-
get: function get() {
|
|
20265
|
-
var _this$val20;
|
|
20266
|
-
return ((_this$val20 = this.val) === null || _this$val20 === void 0 ? void 0 : _this$val20.isDigitalized) == false && this.val.isTexture;
|
|
20267
|
-
}
|
|
20268
20220
|
}, {
|
|
20269
20221
|
key: "onlyVisibleIfNotUndock",
|
|
20270
20222
|
get: function get() {
|
|
@@ -20292,8 +20244,8 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
20292
20244
|
}, {
|
|
20293
20245
|
key: "warning",
|
|
20294
20246
|
get: function get() {
|
|
20295
|
-
var _this$
|
|
20296
|
-
if ((_this$
|
|
20247
|
+
var _this$val20;
|
|
20248
|
+
if ((_this$val20 = this.val) !== null && _this$val20 !== void 0 && _this$val20.isFreeText) {
|
|
20297
20249
|
if (this.val.measureMaximum && Number(this.freeText) > Number(this.val.measureMaximum) || this.val.measureMinimum && Number(this.freeText) < Number(this.val.measureMinimum)) {
|
|
20298
20250
|
return 'measureWarning';
|
|
20299
20251
|
}
|
|
@@ -20391,8 +20343,8 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
20391
20343
|
}]);
|
|
20392
20344
|
}();
|
|
20393
20345
|
|
|
20394
|
-
function ownKeys$
|
|
20395
|
-
function _objectSpread$
|
|
20346
|
+
function ownKeys$d(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20347
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20396
20348
|
var LOG$c = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
20397
20349
|
var DivaArticle = /*#__PURE__*/function () {
|
|
20398
20350
|
//Hier steht die aktuelle Konfiguration
|
|
@@ -20602,7 +20554,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
20602
20554
|
var partlistArticle = this.partlistArticles[basketId];
|
|
20603
20555
|
if (!onlyVisible || partlistArticle.partlistArticleVisibleInTree) partlistArticles[basketId] = partlistArticle;
|
|
20604
20556
|
if (partlistArticle.hasPartlistArticle) {
|
|
20605
|
-
partlistArticles = _objectSpread$
|
|
20557
|
+
partlistArticles = _objectSpread$d(_objectSpread$d({}, partlistArticles), partlistArticle.getRecursivePartlistArticles(onlyVisible));
|
|
20606
20558
|
}
|
|
20607
20559
|
}
|
|
20608
20560
|
return partlistArticles;
|
|
@@ -20689,17 +20641,6 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
20689
20641
|
set: function set(val) {
|
|
20690
20642
|
this.article.toDeleteAfterInit = val;
|
|
20691
20643
|
}
|
|
20692
|
-
}, {
|
|
20693
|
-
key: "articleHasNotVisualizedValues",
|
|
20694
|
-
get: function get() {
|
|
20695
|
-
if (!this.model3DName) return false;
|
|
20696
|
-
for (var key in this.articleOptionStates) {
|
|
20697
|
-
if (!this.articleOptionStates[key].isNotVisualized) {
|
|
20698
|
-
return true;
|
|
20699
|
-
}
|
|
20700
|
-
}
|
|
20701
|
-
return false;
|
|
20702
|
-
}
|
|
20703
20644
|
}, {
|
|
20704
20645
|
key: "actSizeText",
|
|
20705
20646
|
get: function get() {
|
|
@@ -21074,13 +21015,13 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
21074
21015
|
}, {
|
|
21075
21016
|
key: "articleOptionStatesWithParents",
|
|
21076
21017
|
get: function get() {
|
|
21077
|
-
return _objectSpread$
|
|
21018
|
+
return _objectSpread$d(_objectSpread$d({}, this.getReqursiveArticleOptionStates()), this.articleOptionStatesData);
|
|
21078
21019
|
}
|
|
21079
21020
|
}, {
|
|
21080
21021
|
key: "getReqursiveArticleOptionStates",
|
|
21081
21022
|
value: function getReqursiveArticleOptionStates() {
|
|
21082
21023
|
var _this$partListParentA6, _this$partListParentA7, _this$partListParentA8, _this$partListParentA9, _this$accessoireParen3, _this$accessoireParen4, _this$accessoireParen5, _this$accessoireParen6;
|
|
21083
|
-
return _objectSpread$
|
|
21024
|
+
return _objectSpread$d(_objectSpread$d(_objectSpread$d(_objectSpread$d({}, (_this$partListParentA6 = (_this$partListParentA7 = this.partListParentArticle) === null || _this$partListParentA7 === void 0 ? void 0 : _this$partListParentA7.articleOptionStatesData) !== null && _this$partListParentA6 !== void 0 ? _this$partListParentA6 : {}), (_this$partListParentA8 = (_this$partListParentA9 = this.partListParentArticle) === null || _this$partListParentA9 === void 0 ? void 0 : _this$partListParentA9.getReqursiveArticleOptionStates()) !== null && _this$partListParentA8 !== void 0 ? _this$partListParentA8 : {}), (_this$accessoireParen3 = (_this$accessoireParen4 = this.accessoireParentArticle) === null || _this$accessoireParen4 === void 0 ? void 0 : _this$accessoireParen4.articleOptionStatesData) !== null && _this$accessoireParen3 !== void 0 ? _this$accessoireParen3 : {}), (_this$accessoireParen5 = (_this$accessoireParen6 = this.accessoireParentArticle) === null || _this$accessoireParen6 === void 0 ? void 0 : _this$accessoireParen6.getReqursiveArticleOptionStates()) !== null && _this$accessoireParen5 !== void 0 ? _this$accessoireParen5 : {});
|
|
21084
21025
|
}
|
|
21085
21026
|
}, {
|
|
21086
21027
|
key: "clearArticleOptionStates",
|
|
@@ -22843,7 +22784,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22843
22784
|
RuleDesc: myRuleDesc,
|
|
22844
22785
|
RuleDesc_locales: myRuleDesc_locales,
|
|
22845
22786
|
PosInvisibility: myPartListPos.PosInvisibility,
|
|
22846
|
-
VariantValues: _objectSpread$
|
|
22787
|
+
VariantValues: _objectSpread$d(_objectSpread$d({}, (_previousPartlistArti = previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantValues) !== null && _previousPartlistArti !== void 0 ? _previousPartlistArti : {}), newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {}),
|
|
22847
22788
|
VariantItemData: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantItemData,
|
|
22848
22789
|
optionImgForPrint: optionImgForPrint,
|
|
22849
22790
|
optionsForPrint: optionsForPrint
|
|
@@ -22917,7 +22858,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22917
22858
|
}
|
|
22918
22859
|
for (var key in this.articleOptionStates) {
|
|
22919
22860
|
var myOPS = this.articleOptionStates[key];
|
|
22920
|
-
myOPS.visibleOptionValues = _objectSpread$
|
|
22861
|
+
myOPS.visibleOptionValues = _objectSpread$d({}, myOPS.option.articleOptionValues);
|
|
22921
22862
|
myOPS.visibleCount = Object.keys(myOPS.option.articleOptionValues).length;
|
|
22922
22863
|
myOPS.definedBySetFeatureFixed = false;
|
|
22923
22864
|
}
|
|
@@ -23148,7 +23089,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23148
23089
|
}
|
|
23149
23090
|
if (ruleValid) {
|
|
23150
23091
|
ruleWasValidOnce = true;
|
|
23151
|
-
if (m == 0) validOPVs[OPT] = _objectSpread$
|
|
23092
|
+
if (m == 0) validOPVs[OPT] = _objectSpread$d({}, possibleOPVs);
|
|
23152
23093
|
opvCodex = opvCodex.slice(1);
|
|
23153
23094
|
if (possibleOPVs[opvCodex] != null) delete validOPVs[OPT][opvCodex];
|
|
23154
23095
|
}
|
|
@@ -23544,7 +23485,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23544
23485
|
break;
|
|
23545
23486
|
}
|
|
23546
23487
|
_context.next = 4;
|
|
23547
|
-
return Promise.resolve().then(function () { return require('./ShelfPlanner-
|
|
23488
|
+
return Promise.resolve().then(function () { return require('./ShelfPlanner-0329c88f.js'); });
|
|
23548
23489
|
case 4:
|
|
23549
23490
|
_yield$import = _context.sent;
|
|
23550
23491
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -24147,7 +24088,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24147
24088
|
*/
|
|
24148
24089
|
}, {
|
|
24149
24090
|
key: "getPlannerConfigData",
|
|
24150
|
-
value: function getPlannerConfigData(accessoireArticles,
|
|
24091
|
+
value: function getPlannerConfigData(accessoireArticles, alternateRenderInfo) {
|
|
24151
24092
|
var _this$doorPlanner2, _this$doorPlanner3;
|
|
24152
24093
|
var ret = {
|
|
24153
24094
|
N: this.name,
|
|
@@ -24155,8 +24096,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24155
24096
|
ArtNr: this.article.catalogArticle.articleCodex,
|
|
24156
24097
|
CFG: []
|
|
24157
24098
|
};
|
|
24158
|
-
|
|
24159
|
-
|
|
24099
|
+
this.addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo);
|
|
24100
|
+
ret.CFG.push({
|
|
24160
24101
|
OPT: 'QUANTITY',
|
|
24161
24102
|
OPV: this.quantity.toString()
|
|
24162
24103
|
});
|
|
@@ -24185,41 +24126,32 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24185
24126
|
ret['MOVE'] = doorInfo;
|
|
24186
24127
|
}
|
|
24187
24128
|
return {
|
|
24188
|
-
config: ret
|
|
24189
|
-
containsTextureNotDigitalized: containsTextureNotDigitalized
|
|
24129
|
+
config: ret
|
|
24190
24130
|
};
|
|
24191
24131
|
}
|
|
24192
24132
|
}, {
|
|
24193
24133
|
key: "addOptionStateFromArticleToPlannerData",
|
|
24194
24134
|
value: function addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo) {
|
|
24195
|
-
var containsTextureNotDigitalized = false;
|
|
24196
24135
|
for (var key in this.articleOptionStates) {
|
|
24197
|
-
|
|
24198
|
-
containsTextureNotDigitalized = true;
|
|
24199
|
-
}
|
|
24136
|
+
this.addOptionStateToPlannerData(ret, this.articleOptionStates[key], alternateRenderInfo);
|
|
24200
24137
|
}
|
|
24201
24138
|
for (var _key5 in this.article.partlistArticles) {
|
|
24202
24139
|
var partlistArticle = this.article.partlistArticles[_key5];
|
|
24203
24140
|
if (!partlistArticle.hasOptionsThatParentDoesNotHave) continue;
|
|
24204
|
-
|
|
24205
|
-
containsTextureNotDigitalized = true;
|
|
24206
|
-
}
|
|
24141
|
+
partlistArticle.addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo);
|
|
24207
24142
|
}
|
|
24208
|
-
return containsTextureNotDigitalized;
|
|
24209
24143
|
}
|
|
24210
24144
|
}, {
|
|
24211
24145
|
key: "addOptionStateToPlannerData",
|
|
24212
24146
|
value: function addOptionStateToPlannerData(ret, ops, alternateRenderInfo) {
|
|
24213
24147
|
var opv;
|
|
24214
24148
|
var opt;
|
|
24215
|
-
var containsTextureNotDigitalized = false;
|
|
24216
24149
|
if (ops.val) {
|
|
24217
24150
|
var _ops$val$ocd, _ops$option$ocd;
|
|
24218
24151
|
opv = (_ops$val$ocd = ops.val.ocd) !== null && _ops$val$ocd !== void 0 ? _ops$val$ocd : ops.val.codex;
|
|
24219
24152
|
if (this.CatalogData.isIDM3DCat && ops.val.vCodex) opv = 'OPV' + ops.idmVariantenArt + '_' + ops.val.vCodex;
|
|
24220
24153
|
opt = (_ops$option$ocd = ops.option.ocd) !== null && _ops$option$ocd !== void 0 ? _ops$option$ocd : ops.optionCodex;
|
|
24221
24154
|
if (alternateRenderInfo != undefined && alternateRenderInfo.hideOptionsIn3DImage.includes(opt)) return;
|
|
24222
|
-
if (!ops.val.isDigitalized && ops.val.isTexture) containsTextureNotDigitalized = true;
|
|
24223
24155
|
ret.CFG.push({
|
|
24224
24156
|
OPT: opt,
|
|
24225
24157
|
OPV: opv
|
|
@@ -24244,7 +24176,6 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24244
24176
|
});
|
|
24245
24177
|
}
|
|
24246
24178
|
}
|
|
24247
|
-
return containsTextureNotDigitalized;
|
|
24248
24179
|
}
|
|
24249
24180
|
}, {
|
|
24250
24181
|
key: "getAccessoireMATData",
|
|
@@ -24306,7 +24237,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24306
24237
|
key: "getVariantBasketData",
|
|
24307
24238
|
value: function getVariantBasketData() {
|
|
24308
24239
|
var variantBasketData = [];
|
|
24309
|
-
var opsObj = _objectSpread$
|
|
24240
|
+
var opsObj = _objectSpread$d({}, this.articleOptionStates);
|
|
24310
24241
|
if (this.article.optionsForPrint) {
|
|
24311
24242
|
for (var i = 0; i < this.article.optionsForPrint.length; i++) {
|
|
24312
24243
|
var ops = this.getArticleOptionState(this.article.optionsForPrint[i]);
|
|
@@ -24492,8 +24423,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24492
24423
|
}]);
|
|
24493
24424
|
}();
|
|
24494
24425
|
|
|
24495
|
-
function ownKeys$
|
|
24496
|
-
function _objectSpread$
|
|
24426
|
+
function ownKeys$c(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24427
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24497
24428
|
var LOG$b = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
24498
24429
|
|
|
24499
24430
|
//Diese Klasse verwaltet den Optionsbaum und ladelogik etc. eines Artikels
|
|
@@ -24712,7 +24643,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
24712
24643
|
return _context5.abrupt("continue", 37);
|
|
24713
24644
|
case 11:
|
|
24714
24645
|
if (targetArticlesWithNewValues.includes(targetArticlesToUpdate[i])) {
|
|
24715
|
-
valuesArray[i] = actArticle.getValidValues(_objectSpread$
|
|
24646
|
+
valuesArray[i] = actArticle.getValidValues(_objectSpread$c({}, myValues), actArticle.CatalogData.mergeOptionsToSameOption);
|
|
24716
24647
|
}
|
|
24717
24648
|
if (!(Object.entries(valuesArray[i]).length > 0 || from !== null && from !== void 0 && from.startsWith('initializing'))) {
|
|
24718
24649
|
_context5.next = 32;
|
|
@@ -25346,7 +25277,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25346
25277
|
}
|
|
25347
25278
|
doLoadItem.BasketID = nArticle.basketId;
|
|
25348
25279
|
_context14.next = 9;
|
|
25349
|
-
return this.toDoAfterArticleLoaded(nArticle, {}, _objectSpread$
|
|
25280
|
+
return this.toDoAfterArticleLoaded(nArticle, {}, _objectSpread$c(_objectSpread$c({}, doLoadItem.VariantValues), newConfigValues), 'initializingPartlist', doLoadItem.VariantItemData);
|
|
25350
25281
|
case 9:
|
|
25351
25282
|
article.addPartlistArticle(nArticle);
|
|
25352
25283
|
case 10:
|
|
@@ -25490,7 +25421,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25490
25421
|
if (ruleValid) break;
|
|
25491
25422
|
}
|
|
25492
25423
|
if (ruleValid) {
|
|
25493
|
-
returnValue.push(_objectSpread$
|
|
25424
|
+
returnValue.push(_objectSpread$c(_objectSpread$c({}, entry), {}, {
|
|
25494
25425
|
index: i
|
|
25495
25426
|
}));
|
|
25496
25427
|
break;
|
|
@@ -26472,7 +26403,6 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
26472
26403
|
var optionStep = step === null || step === void 0 ? void 0 : step.optionStep;
|
|
26473
26404
|
var paletteType = 'SMALL';
|
|
26474
26405
|
if (configStep && optionStep) {
|
|
26475
|
-
var _set$api$ReturnToFrom;
|
|
26476
26406
|
var optionState = articles[configStep.targetArticles[0]][configStep.option];
|
|
26477
26407
|
if (configStep.option == 'OPTVINYL' || configStep.option == 'OPTVINYL_1' || configStep.option == 'OPTFABRIC' || configStep.option == 'OPTBE' || configStep.option == 'OPTBE_AUSSEN' || configStep.option == 'OPTBE_INNEN' || configStep.option == 'OPTBE_PANEELE' || configStep.option == 'OPTMATRATZE_BE' || configStep.option == 'OPTBE_UG' || configStep.option == 'OPTBEZUG' || configStep.option == 'OPTKO' || configStep.option == 'OPTFR' || configStep.option == 'OPTNI' || configStep.option == 'OPTUF_FA' || configStep.option == 'OPTBE_NETZ' || configStep.option == 'OPTBE_AL' || configStep.option == 'OPTKISSEN_BE' || configStep.option == 'OPTKP_BE' || configStep.option == 'OPTARM_BE' || configStep.option == 'OPTBE_KT' || configStep.option == 'OPT3' || configStep.option == 'OPT5' || configStep.option == 'OPTBE_KNOEPFE' || configStep.option == 'OPTSK_FARBE' || configStep.option == 'OPTBANDFARBE' || configStep.option == 'OPTBE_BOX' || configStep.option == 'OPTMA_AF_BE' || configStep.option == 'OPTTOPPER_BE' || optionState.option.hasOPG && optionState.hasImages || optionStep.mergesToOPG) {
|
|
26478
26408
|
paletteType = 'GAL';
|
|
@@ -26500,31 +26430,15 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
26500
26430
|
if (paletteType == 'GALLERY') {
|
|
26501
26431
|
paletteType = 'GAL';
|
|
26502
26432
|
}
|
|
26503
|
-
//TODO correct with franz
|
|
26504
|
-
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';
|
|
26505
26433
|
}
|
|
26506
26434
|
return paletteType;
|
|
26507
26435
|
}
|
|
26508
26436
|
}, {
|
|
26509
26437
|
key: "getStepInfo",
|
|
26510
26438
|
value: function getStepInfo(configStepKey, optionStatesOfArticle) {
|
|
26511
|
-
var
|
|
26512
|
-
|
|
26513
|
-
|
|
26514
|
-
if (allSteps !== null && allSteps !== void 0 && allSteps.optionStep) {
|
|
26515
|
-
for (var i = 0; i < targetArticles.length; i++) {
|
|
26516
|
-
if (optionStatesOfArticle[targetArticles[i]][allSteps.optionStep.codex].isNotVisualized) {
|
|
26517
|
-
isNotVisualized = true;
|
|
26518
|
-
break;
|
|
26519
|
-
}
|
|
26520
|
-
}
|
|
26521
|
-
}
|
|
26522
|
-
if (isNotVisualized) {
|
|
26523
|
-
return 'SHOW_NOT_VISUALIZED_WARNINIG';
|
|
26524
|
-
}
|
|
26525
|
-
if (allSteps !== null && allSteps !== void 0 && allSteps.configStep.warning) {
|
|
26526
|
-
return allSteps.configStep.warning;
|
|
26527
|
-
}
|
|
26439
|
+
var allSteps = this.getAllByKey(configStepKey);
|
|
26440
|
+
if (allSteps !== null && allSteps !== void 0 && allSteps.optionStep) ;
|
|
26441
|
+
if (allSteps !== null && allSteps !== void 0 && allSteps.configStep.warning) return allSteps.configStep.warning;
|
|
26528
26442
|
return undefined;
|
|
26529
26443
|
}
|
|
26530
26444
|
}, {
|
|
@@ -26832,8 +26746,8 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
26832
26746
|
function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
26833
26747
|
function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
|
|
26834
26748
|
function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
26835
|
-
function ownKeys$
|
|
26836
|
-
function _objectSpread$
|
|
26749
|
+
function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26750
|
+
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26837
26751
|
var LOG$9 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
26838
26752
|
var DivaSet = /*#__PURE__*/function () {
|
|
26839
26753
|
function DivaSet(catalog, _setId, orderSet, initSetState) {
|
|
@@ -26928,7 +26842,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
26928
26842
|
_context.next = 10;
|
|
26929
26843
|
break;
|
|
26930
26844
|
}
|
|
26931
|
-
validValues = repairVariantValuesAndPlanner ? article.getValidValues(_objectSpread$
|
|
26845
|
+
validValues = repairVariantValuesAndPlanner ? article.getValidValues(_objectSpread$b({}, variantValues), article.CatalogData.mergeOptionsToSameOption) : {};
|
|
26932
26846
|
_context.t0 = partlistArticlesToLoad;
|
|
26933
26847
|
_context.next = 8;
|
|
26934
26848
|
return articleHandlerInstance.updateCfgValues(article, repairVariantValuesAndPlanner ? validValues : variantValues, {}, undefined, loadPlas);
|
|
@@ -27043,7 +26957,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27043
26957
|
}
|
|
27044
26958
|
return false;
|
|
27045
26959
|
});
|
|
27046
|
-
_defineProperty__default["default"](this, "getPlannerConfigData", function (elementId,
|
|
26960
|
+
_defineProperty__default["default"](this, "getPlannerConfigData", function (elementId, alternateRenderInfo) {
|
|
27047
26961
|
var article = _this.getArticleByElementId(elementId);
|
|
27048
26962
|
var articleAccs = [];
|
|
27049
26963
|
for (var key in article === null || article === void 0 ? void 0 : article.accessoires) {
|
|
@@ -27051,7 +26965,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27051
26965
|
}
|
|
27052
26966
|
var plannerConfigData = {
|
|
27053
26967
|
config: {},
|
|
27054
|
-
containsTextureNotDigitalized: false,
|
|
27055
26968
|
accs: articleAccs
|
|
27056
26969
|
};
|
|
27057
26970
|
if (article) {
|
|
@@ -27065,9 +26978,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27065
26978
|
}
|
|
27066
26979
|
}
|
|
27067
26980
|
}
|
|
27068
|
-
var result = article.getPlannerConfigData(accessoireArticles,
|
|
26981
|
+
var result = article.getPlannerConfigData(accessoireArticles, alternateRenderInfo);
|
|
27069
26982
|
plannerConfigData.config = result.config;
|
|
27070
|
-
plannerConfigData.containsTextureNotDigitalized = result.containsTextureNotDigitalized;
|
|
27071
26983
|
}
|
|
27072
26984
|
return plannerConfigData;
|
|
27073
26985
|
});
|
|
@@ -27075,7 +26987,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27075
26987
|
var article = _this.getArticleByBasketId(basketId);
|
|
27076
26988
|
var plannerConfigData = {
|
|
27077
26989
|
config: {},
|
|
27078
|
-
containsTextureNotDigitalized: false,
|
|
27079
26990
|
accs: []
|
|
27080
26991
|
};
|
|
27081
26992
|
if (article) {
|
|
@@ -27083,9 +26994,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27083
26994
|
for (var key in article === null || article === void 0 ? void 0 : article.accessoires) {
|
|
27084
26995
|
if (article.accessoires[key].elementId) articleAccs.push(article.accessoires[key].elementId);
|
|
27085
26996
|
}
|
|
27086
|
-
var result = article.getPlannerConfigData(article.accessoires
|
|
26997
|
+
var result = article.getPlannerConfigData(article.accessoires);
|
|
27087
26998
|
plannerConfigData.config = result.config;
|
|
27088
|
-
plannerConfigData.containsTextureNotDigitalized = result.containsTextureNotDigitalized;
|
|
27089
26999
|
plannerConfigData.accs = articleAccs;
|
|
27090
27000
|
}
|
|
27091
27001
|
return plannerConfigData;
|
|
@@ -27181,7 +27091,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27181
27091
|
if (this.catalogData.useBoxPlanner) {
|
|
27182
27092
|
plannerMode = 'BoxPlanner';
|
|
27183
27093
|
} else if (this.catalogData.has3dModels) {
|
|
27184
|
-
var _this$WebConfig;
|
|
27185
27094
|
for (var key in this.divaArticles) {
|
|
27186
27095
|
if (this.divaArticles[key].model3DName) {
|
|
27187
27096
|
plannerMode = '3DImage';
|
|
@@ -27193,9 +27102,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27193
27102
|
if (Object.entries(this.divaArticles).length == 0) {
|
|
27194
27103
|
plannerMode = '3DImage';
|
|
27195
27104
|
}
|
|
27196
|
-
if ((_this$WebConfig = this.WebConfig) !== null && _this$WebConfig !== void 0 && _this$WebConfig.diva3dUseSirvViewer) {
|
|
27197
|
-
plannerMode = 'SirvViewer_only';
|
|
27198
|
-
}
|
|
27199
27105
|
if (this.catalogData.divaArReady && this.catalogData.useShelfPlannerRTV) {
|
|
27200
27106
|
//TODO Matthias sauber initialisieren ob in RTV oder IMAGE3D gestartet wird.
|
|
27201
27107
|
plannerMode = 'RTViewer';
|
|
@@ -27214,7 +27120,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27214
27120
|
plannerMode = 'No';
|
|
27215
27121
|
}
|
|
27216
27122
|
this.plannerMode = plannerMode;
|
|
27217
|
-
this.setType = plannerMode == 'No'
|
|
27123
|
+
this.setType = plannerMode == 'No' ? 'ARTICLE' : 'PLANNING';
|
|
27218
27124
|
return plannerMode;
|
|
27219
27125
|
}
|
|
27220
27126
|
}, {
|
|
@@ -27509,8 +27415,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27509
27415
|
var articles = {};
|
|
27510
27416
|
for (var basketId in this.divaArticles) {
|
|
27511
27417
|
articles[basketId] = this.divaArticles[basketId];
|
|
27512
|
-
if (allPartlistArticlesAlso) articles = _objectSpread$
|
|
27513
|
-
if (visiblePartlistArticlesAlso) articles = _objectSpread$
|
|
27418
|
+
if (allPartlistArticlesAlso) articles = _objectSpread$b(_objectSpread$b({}, articles), articles[basketId].getRecursivePartlistArticles());
|
|
27419
|
+
if (visiblePartlistArticlesAlso) articles = _objectSpread$b(_objectSpread$b({}, articles), articles[basketId].getRecursivePartlistArticles(true));
|
|
27514
27420
|
}
|
|
27515
27421
|
return articles;
|
|
27516
27422
|
}
|
|
@@ -28032,7 +27938,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28032
27938
|
break;
|
|
28033
27939
|
}
|
|
28034
27940
|
_context4.next = 3;
|
|
28035
|
-
return Promise.resolve().then(function () { return require('./DoorPlanner-
|
|
27941
|
+
return Promise.resolve().then(function () { return require('./DoorPlanner-704880a1.js'); });
|
|
28036
27942
|
case 3:
|
|
28037
27943
|
_yield$import = _context4.sent;
|
|
28038
27944
|
DoorPlanner = _yield$import["default"];
|
|
@@ -28137,8 +28043,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28137
28043
|
}, {
|
|
28138
28044
|
key: "hasStaticRoomList",
|
|
28139
28045
|
get: function get() {
|
|
28140
|
-
var _this$
|
|
28141
|
-
if (this.CatalogData.roomList3DStaticBGImage.size > 0 && (_this$
|
|
28046
|
+
var _this$WebConfig;
|
|
28047
|
+
if (this.CatalogData.roomList3DStaticBGImage.size > 0 && (_this$WebConfig = this.WebConfig) !== null && _this$WebConfig !== void 0 && _this$WebConfig.diva3dStaticBGImage) {
|
|
28142
28048
|
return true;
|
|
28143
28049
|
}
|
|
28144
28050
|
return false;
|
|
@@ -28179,8 +28085,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28179
28085
|
}, {
|
|
28180
28086
|
key: "ViewConfig",
|
|
28181
28087
|
get: function get() {
|
|
28182
|
-
var _this$
|
|
28183
|
-
return (_this$
|
|
28088
|
+
var _this$WebConfig2;
|
|
28089
|
+
return (_this$WebConfig2 = this.WebConfig) === null || _this$WebConfig2 === void 0 ? void 0 : _this$WebConfig2.viewConfig;
|
|
28184
28090
|
}
|
|
28185
28091
|
}, {
|
|
28186
28092
|
key: "i18n",
|
|
@@ -29667,8 +29573,8 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
29667
29573
|
}();
|
|
29668
29574
|
var summaryHandlerInstance = new SummaryHandler();
|
|
29669
29575
|
|
|
29670
|
-
function ownKeys$
|
|
29671
|
-
function _objectSpread$
|
|
29576
|
+
function ownKeys$a(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29577
|
+
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29672
29578
|
DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
29673
29579
|
var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
29674
29580
|
function DivaFavoritesHandler() {
|
|
@@ -30346,7 +30252,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30346
30252
|
if (targetArticle[opt] && !variantValues[opt]) variantValues[opt] = targetArticle[opt];
|
|
30347
30253
|
}
|
|
30348
30254
|
}
|
|
30349
|
-
configVariant = new basketModel.ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils__default["default"].encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$
|
|
30255
|
+
configVariant = new basketModel.ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils__default["default"].encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$a(_objectSpread$a({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils__default["default"].stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
|
|
30350
30256
|
set.basketConfigVariants.push(configVariant);
|
|
30351
30257
|
case 28:
|
|
30352
30258
|
case "end":
|
|
@@ -30401,11 +30307,11 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30401
30307
|
}, {
|
|
30402
30308
|
key: "isFavorite",
|
|
30403
30309
|
value: function isFavorite(set, targetArticles, item, optionCodex) {
|
|
30404
|
-
var _item$ocd, _set$
|
|
30310
|
+
var _item$ocd, _set$api$ReturnToFrom, _favorites$VariantVal, _Object$keys;
|
|
30405
30311
|
var favorites = set.favorites;
|
|
30406
30312
|
var opvCodex = (_item$ocd = item.ocd) !== null && _item$ocd !== void 0 ? _item$ocd : item.codex;
|
|
30407
30313
|
var opt = optionCodex ? optionCodex : item.parent.codex;
|
|
30408
|
-
var doShowFav =
|
|
30314
|
+
var doShowFav = !!((_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.startsWith('FAVORITS'));
|
|
30409
30315
|
if (!doShowFav) return undefined;
|
|
30410
30316
|
if ((_favorites$VariantVal = favorites.VariantValues) !== null && _favorites$VariantVal !== void 0 && _favorites$VariantVal[opt] && (_Object$keys = Object.keys(favorites.VariantValues[opt])) !== null && _Object$keys !== void 0 && _Object$keys.includes(opvCodex)) {
|
|
30411
30317
|
for (var i = 0; i < targetArticles.length; i++) {
|
|
@@ -30426,8 +30332,8 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30426
30332
|
}();
|
|
30427
30333
|
var favoritesHandlerInstance = new DivaFavoritesHandler();
|
|
30428
30334
|
|
|
30429
|
-
function ownKeys$
|
|
30430
|
-
function _objectSpread$
|
|
30335
|
+
function ownKeys$9(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30336
|
+
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30431
30337
|
|
|
30432
30338
|
//Diese Klasse beinhaltet die Logik wie eine aktuelle Konfiguration mit allen möglicheen Ausprägungen mit Preisen in einem Set aussieht.
|
|
30433
30339
|
//Der in einem Set gemergte Optionsbaum
|
|
@@ -30984,7 +30890,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
30984
30890
|
//get schnittmenge of all the articles
|
|
30985
30891
|
if (i === 0) {
|
|
30986
30892
|
constructionRules = myOptionState.constructionRules;
|
|
30987
|
-
configItems = _objectSpread$
|
|
30893
|
+
configItems = _objectSpread$9({}, myOptionState.visibleOptionValues);
|
|
30988
30894
|
} else {
|
|
30989
30895
|
for (var _key2 in configItems) {
|
|
30990
30896
|
if (!myOptionState.visibleOptionValues[_key2]) {
|
|
@@ -31215,8 +31121,8 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
31215
31121
|
}();
|
|
31216
31122
|
var configTreeHandler = new DivaConfigTreeHandler();
|
|
31217
31123
|
|
|
31218
|
-
function ownKeys$
|
|
31219
|
-
function _objectSpread$
|
|
31124
|
+
function ownKeys$8(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
31125
|
+
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31220
31126
|
var LOG$8 = DivaUtils__default["default"].initLog('Planner', 'DIVA-SET-HANDLER');
|
|
31221
31127
|
|
|
31222
31128
|
/*
|
|
@@ -31706,7 +31612,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31706
31612
|
}
|
|
31707
31613
|
variantValues = (_initSetState$initVar = initSetState.initVariantValues) !== null && _initSetState$initVar !== void 0 ? _initSetState$initVar : catalogData === null || catalogData === void 0 || (_catalogData$promoted = catalogData.promotedOpvs) === null || _catalogData$promoted === void 0 || (_catalogData$promoted = _catalogData$promoted.articles) === null || _catalogData$promoted === void 0 || (_catalogData$promoted = _catalogData$promoted[articlesToInitialize[j]]) === null || _catalogData$promoted === void 0 || (_catalogData$promoted = _catalogData$promoted[0]) === null || _catalogData$promoted === void 0 ? void 0 : _catalogData$promoted.variantValues;
|
|
31708
31614
|
_context6.next = 18;
|
|
31709
|
-
return this.addPlannerElement(set, articlesToInitialize[j], _objectSpread$
|
|
31615
|
+
return this.addPlannerElement(set, articlesToInitialize[j], _objectSpread$8(_objectSpread$8({}, params), variantValues ? {
|
|
31710
31616
|
variantValues: variantValues
|
|
31711
31617
|
} : {}));
|
|
31712
31618
|
case 18:
|
|
@@ -32339,7 +32245,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32339
32245
|
_context17.next = 24;
|
|
32340
32246
|
break;
|
|
32341
32247
|
}
|
|
32342
|
-
return _context17.abrupt("return", _objectSpread$
|
|
32248
|
+
return _context17.abrupt("return", _objectSpread$8(_objectSpread$8({}, doesFit), {}, {
|
|
32343
32249
|
accessoire: accessoire
|
|
32344
32250
|
}));
|
|
32345
32251
|
case 24:
|
|
@@ -32771,7 +32677,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32771
32677
|
var articlecodex = plannerElement.articleCodex;
|
|
32772
32678
|
if (type == 'PLANNERSWITCH' && Object.keys(set.getDivaArticles())[0]) {
|
|
32773
32679
|
if (plannerViewInfo.catalogPlannerArticles[i].filterType == 'Accessoire') continue;
|
|
32774
|
-
cleanedCaltaogPlannerArticles.push(_objectSpread$
|
|
32680
|
+
cleanedCaltaogPlannerArticles.push(_objectSpread$8({}, plannerElement));
|
|
32775
32681
|
var index = cleanedCaltaogPlannerArticles.length - 1;
|
|
32776
32682
|
cleanedCaltaogPlannerArticles[index].groupName = '';
|
|
32777
32683
|
if (set.getArticlesByArticleCodex(articlecodex).length > 0) {
|
|
@@ -32789,10 +32695,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32789
32695
|
plannerViewInfo.plannerConfiguration.updatePaletteAfterPlanningChanged = true;
|
|
32790
32696
|
}
|
|
32791
32697
|
}
|
|
32792
|
-
if (!dontPushElement) cleanedCaltaogPlannerArticles.push(_objectSpread$
|
|
32698
|
+
if (!dontPushElement) cleanedCaltaogPlannerArticles.push(_objectSpread$8({}, plannerElement));
|
|
32793
32699
|
}
|
|
32794
32700
|
}
|
|
32795
|
-
return _objectSpread$
|
|
32701
|
+
return _objectSpread$8(_objectSpread$8({}, plannerViewInfo), {}, {
|
|
32796
32702
|
catalogPlannerArticles: cleanedCaltaogPlannerArticles
|
|
32797
32703
|
});
|
|
32798
32704
|
}
|
|
@@ -32991,7 +32897,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32991
32897
|
filterType = set.configTree.getCurFilterType(configStepKey, optionStatesOfArticle, configItems.configItems);
|
|
32992
32898
|
stepInfo = set.configTree.getStepInfo(configStepKey, optionStatesOfArticle);
|
|
32993
32899
|
contentItemId = (_configItems$option = configItems.option) === null || _configItems$option === void 0 ? void 0 : _configItems$option.contentItemId;
|
|
32994
|
-
return _context24.abrupt("return", _objectSpread$
|
|
32900
|
+
return _context24.abrupt("return", _objectSpread$8(_objectSpread$8(_objectSpread$8({
|
|
32995
32901
|
isRenderedNotInSettingPalette: set.configTree.isRenderedNotInSettingPalette(configStepKey),
|
|
32996
32902
|
isRenderedInAccessorieStep: set.configTree.isRenderedInAccessorieStep(configStepKey),
|
|
32997
32903
|
visible: set.configTree.getVisibility(configStepKey, visible, set.CatalogData)
|
|
@@ -33414,7 +33320,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33414
33320
|
break;
|
|
33415
33321
|
}
|
|
33416
33322
|
_context28.next = 17;
|
|
33417
|
-
return this.addArticleToActSet(set, edoArticlesToLoad[_i5].ArticleCodex, _objectSpread$
|
|
33323
|
+
return this.addArticleToActSet(set, edoArticlesToLoad[_i5].ArticleCodex, _objectSpread$8(_objectSpread$8({}, edoArticlesToLoad[_i5]), {}, {
|
|
33418
33324
|
basketId: oldBasketIds[_i5]
|
|
33419
33325
|
}), true);
|
|
33420
33326
|
case 17:
|
|
@@ -33811,7 +33717,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33811
33717
|
origOrderSet.BBox = actOrderSet.BBox;
|
|
33812
33718
|
origOrderSet.VariantDescription = actOrderSet.VariantDescription;
|
|
33813
33719
|
if (actOrderSet.ConfigVariants && origOrderSet.ConfigVariants) origOrderSet.ConfigVariants = actOrderSet.ConfigVariants.map(function (variant, index) {
|
|
33814
|
-
return _objectSpread$
|
|
33720
|
+
return _objectSpread$8(_objectSpread$8({}, variant), {}, {
|
|
33815
33721
|
SetImage: origOrderSet.ConfigVariants[index].SetImage,
|
|
33816
33722
|
HQRenderScript: origOrderSet.ConfigVariants[index].HQRenderScript,
|
|
33817
33723
|
Set2DImage: origOrderSet.ConfigVariants[index].Set2DImage,
|
|
@@ -33849,25 +33755,12 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33849
33755
|
DivaUtils__default["default"].startSpanOfApm('GetSet3D und 2D Image');
|
|
33850
33756
|
GroupType = 'PLANNING';
|
|
33851
33757
|
plannerData = set.plannerHandler.savePlanner(set.getSetId());
|
|
33852
|
-
|
|
33853
|
-
_context31.next = 10;
|
|
33854
|
-
break;
|
|
33855
|
-
}
|
|
33856
|
-
_context31.next = 7;
|
|
33857
|
-
return set.plannerHandler.getSetImageAsUrl(set.getSetId());
|
|
33858
|
-
case 7:
|
|
33859
|
-
_context31.t0 = _context31.sent;
|
|
33860
|
-
_context31.next = 11;
|
|
33861
|
-
break;
|
|
33862
|
-
case 10:
|
|
33863
|
-
_context31.t0 = undefined;
|
|
33864
|
-
case 11:
|
|
33865
|
-
setImage = _context31.t0;
|
|
33758
|
+
setImage = undefined;
|
|
33866
33759
|
urlToPlanning2D = undefined;
|
|
33867
33760
|
alternateSetImages = undefined;
|
|
33868
33761
|
hqRenderScript = undefined;
|
|
33869
33762
|
if (dontGenerateImages) {
|
|
33870
|
-
_context31.next =
|
|
33763
|
+
_context31.next = 25;
|
|
33871
33764
|
break;
|
|
33872
33765
|
}
|
|
33873
33766
|
promise3D = this.getSetImage(set, typeof window === 'undefined');
|
|
@@ -33875,22 +33768,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33875
33768
|
if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
|
|
33876
33769
|
promise3DAlternate = this.getAlternateSetImages(set);
|
|
33877
33770
|
}
|
|
33878
|
-
_context31.next =
|
|
33771
|
+
_context31.next = 14;
|
|
33879
33772
|
return Promise.all([promise3D, promise2D, promise3DAlternate]);
|
|
33880
|
-
case
|
|
33773
|
+
case 14:
|
|
33881
33774
|
_yield$Promise$all = _context31.sent;
|
|
33882
33775
|
_yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 3);
|
|
33883
33776
|
setImage = _yield$Promise$all2[0];
|
|
33884
33777
|
urlToPlanning2D = _yield$Promise$all2[1];
|
|
33885
33778
|
alternateSetImages = _yield$Promise$all2[2];
|
|
33886
33779
|
promiseHQRenderScript = this.getHQRenderScript(set, divaNr);
|
|
33887
|
-
_context31.next =
|
|
33780
|
+
_context31.next = 22;
|
|
33888
33781
|
return Promise.all([promiseHQRenderScript]);
|
|
33889
|
-
case
|
|
33782
|
+
case 22:
|
|
33890
33783
|
_yield$Promise$all3 = _context31.sent;
|
|
33891
33784
|
_yield$Promise$all4 = _slicedToArray__default["default"](_yield$Promise$all3, 1);
|
|
33892
33785
|
hqRenderScript = _yield$Promise$all4[0];
|
|
33893
|
-
case
|
|
33786
|
+
case 25:
|
|
33894
33787
|
LOG$8.startTransaction({
|
|
33895
33788
|
event: 'FillBakset',
|
|
33896
33789
|
eventId: 'FILL_BASKET',
|
|
@@ -33956,7 +33849,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33956
33849
|
MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
|
|
33957
33850
|
});
|
|
33958
33851
|
return _context31.abrupt("return", orderSet);
|
|
33959
|
-
case
|
|
33852
|
+
case 32:
|
|
33960
33853
|
case "end":
|
|
33961
33854
|
return _context31.stop();
|
|
33962
33855
|
}
|
|
@@ -33984,7 +33877,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33984
33877
|
catalogData = set.CatalogData;
|
|
33985
33878
|
is3D = ['3DImage', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
33986
33879
|
if (!is3D) {
|
|
33987
|
-
_context32.next =
|
|
33880
|
+
_context32.next = 11;
|
|
33988
33881
|
break;
|
|
33989
33882
|
}
|
|
33990
33883
|
LOG$8.startTransaction({
|
|
@@ -34000,20 +33893,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34000
33893
|
case 9:
|
|
34001
33894
|
setImage = _context32.sent;
|
|
34002
33895
|
LOG$8.successTransaction('RENDER_3D_IMAGE');
|
|
34003
|
-
|
|
34004
|
-
break;
|
|
34005
|
-
case 13:
|
|
34006
|
-
if (!(set.getPlannerMode() == 'SirvViewer_only')) {
|
|
34007
|
-
_context32.next = 17;
|
|
34008
|
-
break;
|
|
34009
|
-
}
|
|
34010
|
-
_context32.next = 16;
|
|
34011
|
-
return set.plannerHandler.getSetImageAsUrl(set.getSetId());
|
|
34012
|
-
case 16:
|
|
34013
|
-
setImage = _context32.sent;
|
|
34014
|
-
case 17:
|
|
33896
|
+
case 11:
|
|
34015
33897
|
return _context32.abrupt("return", setImage);
|
|
34016
|
-
case
|
|
33898
|
+
case 12:
|
|
34017
33899
|
case "end":
|
|
34018
33900
|
return _context32.stop();
|
|
34019
33901
|
}
|
|
@@ -34165,77 +34047,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34165
34047
|
Info: bbox.width + 'cm x ' + bbox.depth + 'cm'
|
|
34166
34048
|
};
|
|
34167
34049
|
}
|
|
34168
|
-
|
|
34169
|
-
/****************************Cache building***************************/
|
|
34170
|
-
|
|
34171
|
-
/**
|
|
34172
|
-
* This function creates the cache for all images.
|
|
34173
|
-
* @returns returns true if the whole set was created correctly
|
|
34174
|
-
*/
|
|
34175
34050
|
}, {
|
|
34176
|
-
key: "
|
|
34177
|
-
value:
|
|
34178
|
-
var
|
|
34179
|
-
var _set$getAlternateRend3;
|
|
34180
|
-
var timeout;
|
|
34051
|
+
key: "loadProductsOfSets",
|
|
34052
|
+
value: function () {
|
|
34053
|
+
var _loadProductsOfSets = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34(orderSets, involvedSetIds) {
|
|
34181
34054
|
return _regeneratorRuntime__default["default"].wrap(function _callee34$(_context36) {
|
|
34182
34055
|
while (1) switch (_context36.prev = _context36.next) {
|
|
34183
34056
|
case 0:
|
|
34184
|
-
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, {
|
|
34185
|
-
width: 100,
|
|
34186
|
-
height: 100,
|
|
34187
|
-
isFullscreenRendering: false,
|
|
34188
|
-
planner3DGridEnabled: false,
|
|
34189
|
-
mediaServiceSaveMode: 'PERMANENT',
|
|
34190
|
-
doShow3DDimensionLines: false
|
|
34191
|
-
});
|
|
34192
|
-
timeout = 50;
|
|
34193
|
-
case 2:
|
|
34194
|
-
if (!set.plannerHandler.checkIsWaitingForRendering()) {
|
|
34195
|
-
_context36.next = 10;
|
|
34196
|
-
break;
|
|
34197
|
-
}
|
|
34198
|
-
timeout--;
|
|
34199
|
-
if (!(timeout == 0)) {
|
|
34200
|
-
_context36.next = 6;
|
|
34201
|
-
break;
|
|
34202
|
-
}
|
|
34203
|
-
return _context36.abrupt("return", false);
|
|
34204
|
-
case 6:
|
|
34205
|
-
_context36.next = 8;
|
|
34206
|
-
return DivaUtils__default["default"].Sleep(300);
|
|
34207
|
-
case 8:
|
|
34208
34057
|
_context36.next = 2;
|
|
34209
|
-
break;
|
|
34210
|
-
case 10:
|
|
34211
|
-
return _context36.abrupt("return", true);
|
|
34212
|
-
case 11:
|
|
34213
|
-
case "end":
|
|
34214
|
-
return _context36.stop();
|
|
34215
|
-
}
|
|
34216
|
-
}, _callee34);
|
|
34217
|
-
}));
|
|
34218
|
-
function createRenderCache(_x113) {
|
|
34219
|
-
return _createRenderCache.apply(this, arguments);
|
|
34220
|
-
}
|
|
34221
|
-
return createRenderCache;
|
|
34222
|
-
}())
|
|
34223
|
-
}, {
|
|
34224
|
-
key: "loadProductsOfSets",
|
|
34225
|
-
value: function () {
|
|
34226
|
-
var _loadProductsOfSets = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35(orderSets, involvedSetIds) {
|
|
34227
|
-
return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context37) {
|
|
34228
|
-
while (1) switch (_context37.prev = _context37.next) {
|
|
34229
|
-
case 0:
|
|
34230
|
-
_context37.next = 2;
|
|
34231
34058
|
return productHandlerInstance.loadProductsOfSets(orderSets, involvedSetIds);
|
|
34232
34059
|
case 2:
|
|
34233
34060
|
case "end":
|
|
34234
|
-
return
|
|
34061
|
+
return _context36.stop();
|
|
34235
34062
|
}
|
|
34236
|
-
},
|
|
34063
|
+
}, _callee34);
|
|
34237
34064
|
}));
|
|
34238
|
-
function loadProductsOfSets(
|
|
34065
|
+
function loadProductsOfSets(_x113, _x114) {
|
|
34239
34066
|
return _loadProductsOfSets.apply(this, arguments);
|
|
34240
34067
|
}
|
|
34241
34068
|
return loadProductsOfSets;
|
|
@@ -34272,28 +34099,28 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34272
34099
|
}, {
|
|
34273
34100
|
key: "addOrderSetArticlesToExistingSet",
|
|
34274
34101
|
value: function () {
|
|
34275
|
-
var _addOrderSetArticlesToExistingSet = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
34276
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
34277
|
-
while (1) switch (
|
|
34102
|
+
var _addOrderSetArticlesToExistingSet = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35(set, orderSet, lastSetToInitialize) {
|
|
34103
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context37) {
|
|
34104
|
+
while (1) switch (_context37.prev = _context37.next) {
|
|
34278
34105
|
case 0:
|
|
34279
34106
|
//TODO: GLOBAL STUFF
|
|
34280
34107
|
//this.updateActSet(set);
|
|
34281
34108
|
orderSet.changeBasketIds();
|
|
34282
|
-
|
|
34109
|
+
_context37.next = 3;
|
|
34283
34110
|
return this.initOrderLineArticles(set, orderSet);
|
|
34284
34111
|
case 3:
|
|
34285
|
-
|
|
34112
|
+
_context37.next = 5;
|
|
34286
34113
|
return set.plannerHandler.extendSet(set, orderSet.SetPlanData, lastSetToInitialize);
|
|
34287
34114
|
case 5:
|
|
34288
|
-
|
|
34115
|
+
_context37.next = 7;
|
|
34289
34116
|
return productHandlerInstance.updateProducts(set, 'onAdd');
|
|
34290
34117
|
case 7:
|
|
34291
34118
|
case "end":
|
|
34292
|
-
return
|
|
34119
|
+
return _context37.stop();
|
|
34293
34120
|
}
|
|
34294
|
-
},
|
|
34121
|
+
}, _callee35, this);
|
|
34295
34122
|
}));
|
|
34296
|
-
function addOrderSetArticlesToExistingSet(_x116, _x117
|
|
34123
|
+
function addOrderSetArticlesToExistingSet(_x115, _x116, _x117) {
|
|
34297
34124
|
return _addOrderSetArticlesToExistingSet.apply(this, arguments);
|
|
34298
34125
|
}
|
|
34299
34126
|
return addOrderSetArticlesToExistingSet;
|
|
@@ -34310,576 +34137,99 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34310
34137
|
}();
|
|
34311
34138
|
var setHandlerInstance = new DivaSetHandler();
|
|
34312
34139
|
|
|
34313
|
-
|
|
34140
|
+
function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
34141
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34314
34142
|
var LOG$7 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
34315
|
-
var
|
|
34316
|
-
function
|
|
34317
|
-
|
|
34318
|
-
|
|
34319
|
-
|
|
34320
|
-
|
|
34321
|
-
|
|
34322
|
-
_defineProperty__default["default"](this, "
|
|
34323
|
-
_defineProperty__default["default"](this, "
|
|
34324
|
-
_defineProperty__default["default"](this, "
|
|
34325
|
-
|
|
34326
|
-
|
|
34327
|
-
|
|
34328
|
-
|
|
34329
|
-
|
|
34330
|
-
_defineProperty__default["default"](this, "
|
|
34331
|
-
|
|
34332
|
-
_defineProperty__default["default"](this, "
|
|
34333
|
-
_defineProperty__default["default"](this, "
|
|
34334
|
-
_defineProperty__default["default"](this, "
|
|
34335
|
-
_defineProperty__default["default"](this, "
|
|
34336
|
-
|
|
34337
|
-
_defineProperty__default["default"](this, "
|
|
34338
|
-
|
|
34339
|
-
|
|
34340
|
-
|
|
34341
|
-
_defineProperty__default["default"](this, "
|
|
34342
|
-
|
|
34343
|
-
|
|
34344
|
-
|
|
34345
|
-
|
|
34346
|
-
|
|
34347
|
-
|
|
34348
|
-
|
|
34349
|
-
|
|
34350
|
-
|
|
34351
|
-
this.renderWidth = width;
|
|
34352
|
-
this.renderHeight = height;
|
|
34353
|
-
this.uiInfo = '';
|
|
34354
|
-
this.imgForSrc = '';
|
|
34355
|
-
this.layerMaskAsBase64 = '';
|
|
34356
|
-
this.isFullscreenRendering = isFullscreenRendering;
|
|
34357
|
-
this.hasDimensionLines = hasDimensionLines;
|
|
34358
|
-
this.plannerMeasureDigits = plannerMeasureDigits;
|
|
34359
|
-
this.hasLayerMask = hasLayerMask;
|
|
34360
|
-
this.creationTime = new Date();
|
|
34361
|
-
this.layerMaskThreeTexture = undefined;
|
|
34362
|
-
this.hasStaticBackground = hasStaticBG;
|
|
34363
|
-
this.mediaServiceSaveMode = mediaServiceSaveMode;
|
|
34364
|
-
this.urlToSavedRendering = '';
|
|
34365
|
-
this.catalogData = {
|
|
34366
|
-
catalogCodex: '',
|
|
34367
|
-
catalogGUID: ''
|
|
34368
|
-
};
|
|
34369
|
-
this.isLoadedFromCache = false;
|
|
34370
|
-
this.HQRenderingUrl = '';
|
|
34371
|
-
this.SpinUrl = '';
|
|
34372
|
-
this.ArUrl = '';
|
|
34373
|
-
if (alternateRendererInfo != undefined) this.isAlternateRendering = true;else this.isAlternateRendering = false;
|
|
34374
|
-
this.alternateRendererInfo = alternateRendererInfo;
|
|
34375
|
-
this.alternateRenderingsExist = !!alternateRenderingsExist;
|
|
34376
|
-
}
|
|
34377
|
-
return _createClass__default["default"](Rendering, [{
|
|
34378
|
-
key: "clone",
|
|
34379
|
-
value: function clone(rendering) {
|
|
34380
|
-
this.planningHash = rendering.planningHash;
|
|
34381
|
-
this.renderHash = rendering.renderHash;
|
|
34382
|
-
this.creationTime = rendering.creationTime;
|
|
34383
|
-
this.renderWidth = rendering.renderWidth;
|
|
34384
|
-
this.renderHeight = rendering.renderHeight;
|
|
34385
|
-
this.uiInfo = rendering.uiInfo;
|
|
34386
|
-
this.urlToSavedRendering = rendering.urlToSavedRendering;
|
|
34387
|
-
this.hasLayerMask = rendering.hasLayerMask;
|
|
34388
|
-
this.imgForSrc = rendering.imgForSrc;
|
|
34389
|
-
this.HQRenderingUrl = rendering.HQRenderingUrl;
|
|
34390
|
-
this.layerMaskAsBase64 = rendering.layerMaskAsBase64;
|
|
34391
|
-
this.layerMaskThreeTexture = rendering.layerMaskThreeTexture;
|
|
34392
|
-
this.isFullscreenRendering = rendering.isFullscreenRendering;
|
|
34393
|
-
this.hasStaticBackground = rendering.hasStaticBackground;
|
|
34394
|
-
this.hasDimensionLines = rendering.hasDimensionLines;
|
|
34395
|
-
this.plannerMeasureDigits = rendering.plannerMeasureDigits;
|
|
34396
|
-
this.alternateRendererInfo = rendering.alternateRendererInfo;
|
|
34397
|
-
this.isAlternateRendering = rendering.isAlternateRendering;
|
|
34398
|
-
this.alternateRenderingsExist = rendering.alternateRenderingsExist;
|
|
34399
|
-
this.mediaServiceSaveMode = rendering.mediaServiceSaveMode;
|
|
34400
|
-
this.isLoadedFromCache = rendering.isLoadedFromCache;
|
|
34401
|
-
this.catalogData = rendering.catalogData;
|
|
34402
|
-
}
|
|
34403
|
-
}, {
|
|
34404
|
-
key: "getAllDockingPoints",
|
|
34405
|
-
value: function getAllDockingPoints(setId, elementId) {
|
|
34406
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34407
|
-
return this.uiInfo['S1']['E' + elementId]['DP'];
|
|
34408
|
-
}
|
|
34409
|
-
return this.uiInfo[setId]['E' + elementId]['DP'];
|
|
34410
|
-
}
|
|
34411
|
-
}, {
|
|
34412
|
-
key: "getHasStaticBackground",
|
|
34413
|
-
value: function getHasStaticBackground() {
|
|
34414
|
-
return this.hasStaticBackground;
|
|
34415
|
-
}
|
|
34416
|
-
}, {
|
|
34417
|
-
key: "getIsFullscreenRendering",
|
|
34418
|
-
value: function getIsFullscreenRendering() {
|
|
34419
|
-
return this.isFullscreenRendering;
|
|
34420
|
-
}
|
|
34421
|
-
}, {
|
|
34422
|
-
key: "setIsFullscreenRendering",
|
|
34423
|
-
value: function setIsFullscreenRendering(isFullscreen) {
|
|
34424
|
-
this.isFullscreenRendering = isFullscreen;
|
|
34425
|
-
}
|
|
34426
|
-
}, {
|
|
34427
|
-
key: "getHasDimensionLines",
|
|
34428
|
-
value: function getHasDimensionLines() {
|
|
34429
|
-
return this.hasDimensionLines;
|
|
34143
|
+
var DivaBasketHandler = /*#__PURE__*/function () {
|
|
34144
|
+
function DivaBasketHandler(plannerConfig) {
|
|
34145
|
+
var _this = this,
|
|
34146
|
+
_this$plannerConfig$s,
|
|
34147
|
+
_this$plannerConfig$s2,
|
|
34148
|
+
_this$plannerConfig$a;
|
|
34149
|
+
_classCallCheck__default["default"](this, DivaBasketHandler);
|
|
34150
|
+
_defineProperty__default["default"](this, "baskets", {});
|
|
34151
|
+
_defineProperty__default["default"](this, "ignoreInitObjectWhenInitializing", false);
|
|
34152
|
+
_defineProperty__default["default"](this, "plannerConfig", void 0);
|
|
34153
|
+
_defineProperty__default["default"](this, "divaNr", void 0);
|
|
34154
|
+
_defineProperty__default["default"](this, "loadDivaNr", void 0);
|
|
34155
|
+
_defineProperty__default["default"](this, "specificSetIdToLoad", void 0);
|
|
34156
|
+
_defineProperty__default["default"](this, "assignNewDivaNr", false);
|
|
34157
|
+
_defineProperty__default["default"](this, "basketWasSavedWithCurrentDocVersion", void 0);
|
|
34158
|
+
_defineProperty__default["default"](this, "emailConfig", void 0);
|
|
34159
|
+
_defineProperty__default["default"](this, "reportConfig", void 0);
|
|
34160
|
+
_defineProperty__default["default"](this, "_divaWWSHandler", void 0);
|
|
34161
|
+
_defineProperty__default["default"](this, "_handler", void 0);
|
|
34162
|
+
_defineProperty__default["default"](this, "_basketHandler", void 0);
|
|
34163
|
+
_defineProperty__default["default"](this, "startProductId", void 0);
|
|
34164
|
+
//Only helper variable
|
|
34165
|
+
_defineProperty__default["default"](this, "origConfiguration", {});
|
|
34166
|
+
/**
|
|
34167
|
+
* This function returns the originalConfiguration options
|
|
34168
|
+
*/
|
|
34169
|
+
_defineProperty__default["default"](this, "getOrigConfiguration", function () {
|
|
34170
|
+
return _this.origConfiguration;
|
|
34171
|
+
});
|
|
34172
|
+
this.plannerConfig = plannerConfig;
|
|
34173
|
+
this.assignNewDivaNr = !!this.plannerConfig.assignNewDivaNr;
|
|
34174
|
+
this._handler = plannerConfig.handler;
|
|
34175
|
+
if (this.plannerConfig.divaNr == undefined && this.plannerConfig.basketData == undefined && this.plannerConfig.catalogCodex == undefined && this.plannerConfig.productId == undefined && this.plannerConfig.customProductId == undefined && this.plannerConfig.returnTo != 'TEST_CONFIGURATORLOGIC' && !((_this$plannerConfig$s = this.plannerConfig.settings) !== null && _this$plannerConfig$s !== void 0 && (_this$plannerConfig$s = _this$plannerConfig$s.ViewConfig) !== null && _this$plannerConfig$s !== void 0 && (_this$plannerConfig$s = _this$plannerConfig$s.plannerType) !== null && _this$plannerConfig$s !== void 0 && _this$plannerConfig$s.includes('PRODUCTS') || (_this$plannerConfig$s2 = this.plannerConfig.settings) !== null && _this$plannerConfig$s2 !== void 0 && (_this$plannerConfig$s2 = _this$plannerConfig$s2.ViewConfig) !== null && _this$plannerConfig$s2 !== void 0 && (_this$plannerConfig$s2 = _this$plannerConfig$s2.plannerType) !== null && _this$plannerConfig$s2 !== void 0 && _this$plannerConfig$s2.includes('PROMOTED'))) {
|
|
34176
|
+
LOG$7.error(new DivaUtils.DivaError('Keine Öffnungsparameter', {
|
|
34177
|
+
code: 'WC_0003'
|
|
34178
|
+
}));
|
|
34430
34179
|
}
|
|
34431
|
-
|
|
34432
|
-
|
|
34433
|
-
|
|
34434
|
-
return this.plannerMeasureDigits;
|
|
34180
|
+
this.loadDivaNr = this.plannerConfig.divaNr;
|
|
34181
|
+
if (this.plannerConfig.initEmptyPlanner) {
|
|
34182
|
+
this.assignNewDivaNr = true;
|
|
34435
34183
|
}
|
|
34436
|
-
|
|
34437
|
-
|
|
34438
|
-
|
|
34439
|
-
return this.isAlternateRendering;
|
|
34184
|
+
if ((_this$plannerConfig$a = this.plannerConfig.apiConfig) !== null && _this$plannerConfig$a !== void 0 && _this$plannerConfig$a.basketService) {
|
|
34185
|
+
var _this$plannerConfig$a2, _this$plannerConfig$a3;
|
|
34186
|
+
this._basketHandler = new BasketHandler__default["default"](LOG$7, (_this$plannerConfig$a2 = this.plannerConfig.apiConfig) === null || _this$plannerConfig$a2 === void 0 ? void 0 : _this$plannerConfig$a2.basketService, (_this$plannerConfig$a3 = this.plannerConfig.apiConfig) === null || _this$plannerConfig$a3 === void 0 ? void 0 : _this$plannerConfig$a3.api2["default"]);
|
|
34440
34187
|
}
|
|
34441
|
-
}
|
|
34442
|
-
|
|
34443
|
-
|
|
34444
|
-
|
|
34188
|
+
}
|
|
34189
|
+
return _createClass__default["default"](DivaBasketHandler, [{
|
|
34190
|
+
key: "actDivaNr",
|
|
34191
|
+
get: function get() {
|
|
34192
|
+
return this.divaNr;
|
|
34445
34193
|
}
|
|
34446
34194
|
}, {
|
|
34447
|
-
key: "
|
|
34448
|
-
|
|
34449
|
-
return this.
|
|
34195
|
+
key: "actBasket",
|
|
34196
|
+
get: function get() {
|
|
34197
|
+
return this.baskets[this.divaNr];
|
|
34450
34198
|
}
|
|
34451
34199
|
}, {
|
|
34452
|
-
key: "
|
|
34453
|
-
|
|
34454
|
-
|
|
34455
|
-
|
|
34456
|
-
|
|
34457
|
-
|
|
34200
|
+
key: "catalogCodexesOfOrderSets",
|
|
34201
|
+
get: function get() {
|
|
34202
|
+
var orderSets = this.baskets[this.divaNr].OrderSets;
|
|
34203
|
+
var ret = [];
|
|
34204
|
+
var _loop = function _loop(i) {
|
|
34205
|
+
if (!ret.find(function (catalogCodex) {
|
|
34206
|
+
return catalogCodex == orderSets[i].CatalogCodex;
|
|
34207
|
+
})) ret.push(orderSets[i].CatalogCodex);
|
|
34208
|
+
};
|
|
34209
|
+
for (var i = 0; i < orderSets.length; i++) {
|
|
34210
|
+
_loop(i);
|
|
34458
34211
|
}
|
|
34212
|
+
return ret;
|
|
34459
34213
|
}
|
|
34460
34214
|
}, {
|
|
34461
|
-
key: "
|
|
34462
|
-
|
|
34463
|
-
|
|
34464
|
-
var avgCamDist = 0;
|
|
34465
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34466
|
-
poly = this.uiInfo['S1']['E' + elementId]['POLYOUTLINE'];
|
|
34467
|
-
avgCamDist = this.uiInfo['S1']['E' + elementId]['AVGCAMDIST'];
|
|
34468
|
-
} else if (this.uiInfo[setId]) {
|
|
34469
|
-
poly = this.uiInfo[setId]['E' + elementId]['POLYOUTLINE'];
|
|
34470
|
-
avgCamDist = this.uiInfo[setId]['E' + elementId]['AVGCAMDIST'];
|
|
34471
|
-
} else {
|
|
34472
|
-
poly = this.uiInfo['E' + elementId]['POLYOUTLINE'];
|
|
34473
|
-
avgCamDist = this.uiInfo['E' + elementId]['AVGCAMDIST'];
|
|
34474
|
-
}
|
|
34475
|
-
if (!poly) return undefined;
|
|
34476
|
-
var points = '';
|
|
34477
|
-
for (var i = 0; i < poly.length; i++) {
|
|
34478
|
-
points += Math.round(poly[i].x * 0.01 * viewPortSize.imgWidth) + ',' + Math.round((100 - poly[i].y) * 0.01 * viewPortSize.imgHeight) + ' ';
|
|
34479
|
-
}
|
|
34480
|
-
return {
|
|
34481
|
-
points: points,
|
|
34482
|
-
avgCamDist: avgCamDist
|
|
34483
|
-
};
|
|
34215
|
+
key: "ArticlesToInitialize",
|
|
34216
|
+
get: function get() {
|
|
34217
|
+
return this.plannerConfig.articleCodexes;
|
|
34484
34218
|
}
|
|
34485
|
-
|
|
34486
|
-
//Left/Right_Bottom/Top_Back/Front
|
|
34487
34219
|
}, {
|
|
34488
|
-
key: "
|
|
34489
|
-
value: function
|
|
34490
|
-
|
|
34491
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34492
|
-
bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
|
|
34493
|
-
} else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
|
|
34494
|
-
if (!bbox) return;
|
|
34495
|
-
for (var i = 0; i < bbox.length; i++) {
|
|
34496
|
-
if (bbox[i].C == 'RTB') {
|
|
34497
|
-
return bbox[i];
|
|
34498
|
-
}
|
|
34499
|
-
}
|
|
34220
|
+
key: "updatePlannerConfig",
|
|
34221
|
+
value: function updatePlannerConfig(plannerConfig) {
|
|
34222
|
+
this.plannerConfig = plannerConfig;
|
|
34500
34223
|
}
|
|
34501
|
-
//Left/Right_Bottom/Top_Back/Front
|
|
34502
34224
|
}, {
|
|
34503
|
-
key: "
|
|
34504
|
-
value: function
|
|
34505
|
-
|
|
34506
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34507
|
-
bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
|
|
34508
|
-
} else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
|
|
34509
|
-
if (!bbox) return;
|
|
34510
|
-
for (var i = 0; i < bbox.length; i++) {
|
|
34511
|
-
if (bbox[i].C == 'LTB') {
|
|
34512
|
-
return bbox[i];
|
|
34513
|
-
}
|
|
34514
|
-
}
|
|
34225
|
+
key: "updateDivaNrInBasket",
|
|
34226
|
+
value: function updateDivaNrInBasket(divaNr) {
|
|
34227
|
+
this.loadDivaNr = divaNr;
|
|
34515
34228
|
}
|
|
34516
|
-
//Left/Right_Bottom/Top_Back/Front
|
|
34517
|
-
//elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
|
|
34518
34229
|
}, {
|
|
34519
|
-
key: "
|
|
34520
|
-
value: function
|
|
34521
|
-
|
|
34522
|
-
if (this.uiInfo == '') return null;
|
|
34523
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34524
|
-
if (!this.uiInfo['S1']['E' + elemId]) return;
|
|
34525
|
-
bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
|
|
34526
|
-
} else if (this.uiInfo[setId]) {
|
|
34527
|
-
if (!this.uiInfo[setId]['E' + elemId]) return;
|
|
34528
|
-
bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];
|
|
34529
|
-
} else {
|
|
34530
|
-
var _this$uiInfo;
|
|
34531
|
-
bbox = (_this$uiInfo = this.uiInfo['E' + elemId]) === null || _this$uiInfo === void 0 ? void 0 : _this$uiInfo['BBOX3D'];
|
|
34532
|
-
}
|
|
34533
|
-
if (!bbox) return;
|
|
34534
|
-
for (var i = 0; i < bbox.length; i++) {
|
|
34535
|
-
if (bbox[i].C == 'LBF') {
|
|
34536
|
-
return bbox[i];
|
|
34537
|
-
}
|
|
34538
|
-
}
|
|
34539
|
-
}
|
|
34540
|
-
}, {
|
|
34541
|
-
key: "getBoxPlannerCornerUIPos",
|
|
34542
|
-
value: function getBoxPlannerCornerUIPos(setId, elemId, corner) {
|
|
34543
|
-
var boxPlan = [];
|
|
34544
|
-
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
34545
|
-
boxPlan = this.uiInfo['S1']['E' + elemId]['BoxPlan'];
|
|
34546
|
-
} else if (this.uiInfo[setId]) boxPlan = this.uiInfo[setId]['E' + elemId]['BoxPlan'];else boxPlan = this.uiInfo['E' + elemId]['BoxPlan'];
|
|
34547
|
-
for (var i = 0; i < boxPlan.length; i++) {
|
|
34548
|
-
if (!boxPlan[i].N || !boxPlan[i].x || !boxPlan[i].y) continue;
|
|
34549
|
-
switch (corner) {
|
|
34550
|
-
case 'TOPCENTER':
|
|
34551
|
-
if (boxPlan[i].N == 'TC') {
|
|
34552
|
-
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
34553
|
-
}
|
|
34554
|
-
break;
|
|
34555
|
-
case 'LEFTCENTER':
|
|
34556
|
-
if (boxPlan[i].N == 'LC') {
|
|
34557
|
-
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
34558
|
-
}
|
|
34559
|
-
break;
|
|
34560
|
-
case 'RIGHTCENTER':
|
|
34561
|
-
if (boxPlan[i].N == 'RC') {
|
|
34562
|
-
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
34563
|
-
}
|
|
34564
|
-
break;
|
|
34565
|
-
case 'RIGHTTOPFRONT':
|
|
34566
|
-
if (boxPlan[i].N == 'RTF') {
|
|
34567
|
-
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
34568
|
-
}
|
|
34569
|
-
break;
|
|
34570
|
-
}
|
|
34571
|
-
}
|
|
34572
|
-
return undefined;
|
|
34573
|
-
}
|
|
34574
|
-
}, {
|
|
34575
|
-
key: "getUnityCamPos",
|
|
34576
|
-
value: function getUnityCamPos() {
|
|
34577
|
-
return new Vector3(parseFloat(this.uiInfo['CAM']['X']), parseFloat(this.uiInfo['CAM']['Y']), parseFloat(this.uiInfo['CAM']['Z']));
|
|
34578
|
-
}
|
|
34579
|
-
}, {
|
|
34580
|
-
key: "getUnityCamRot",
|
|
34581
|
-
value: function getUnityCamRot() {
|
|
34582
|
-
// return new Vector3(parseFloat(this.uiInfo["CAM"]["RX"]), parseFloat(this.uiInfo["CAM"]["RY"]), parseFloat(this.uiInfo["CAM"]["RZ"]));
|
|
34583
|
-
var quatVec = new Vector4(parseFloat(this.uiInfo['CAM']['QX']), parseFloat(this.uiInfo['CAM']['QY']), parseFloat(this.uiInfo['CAM']['QZ']), parseFloat(this.uiInfo['CAM']['QW']));
|
|
34584
|
-
return quatVec;
|
|
34585
|
-
}
|
|
34586
|
-
}, {
|
|
34587
|
-
key: "getUnityFOV",
|
|
34588
|
-
value: function getUnityFOV() {
|
|
34589
|
-
return parseFloat(this.uiInfo['CAM']['FOV']);
|
|
34590
|
-
}
|
|
34591
|
-
|
|
34592
|
-
//elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
|
|
34593
|
-
//It returns the distance of an element to the ground in cm
|
|
34594
|
-
}, {
|
|
34595
|
-
key: "getDistanceToGround",
|
|
34596
|
-
value: function getDistanceToGround(setId, elementId) {
|
|
34597
|
-
setId = this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined ? 'S1' : setId;
|
|
34598
|
-
if (this.uiInfo[setId] && this.uiInfo[setId]['E' + elementId] && this.uiInfo[setId]['E' + elementId]['DIM'] && this.uiInfo[setId]['E' + elementId]['DIM']['dfg']) {
|
|
34599
|
-
return this.uiInfo[setId]['E' + elementId]['DIM']['dfg'] * 100;
|
|
34600
|
-
}
|
|
34601
|
-
return -1;
|
|
34602
|
-
}
|
|
34603
|
-
}, {
|
|
34604
|
-
key: "addUIInfo",
|
|
34605
|
-
value: function addUIInfo(uiInfo) {
|
|
34606
|
-
try {
|
|
34607
|
-
this.uiInfo = JSON.parse(uiInfo);
|
|
34608
|
-
//this.calcOutlinePolygon();
|
|
34609
|
-
} catch (error) {
|
|
34610
|
-
LOG$7.error(new DivaUtils.DivaError('Error when parsing UI Info in rendering. Corrupt UIInfo: ' + uiInfo, {
|
|
34611
|
-
code: 'WC_0013',
|
|
34612
|
-
cause: error
|
|
34613
|
-
}));
|
|
34614
|
-
}
|
|
34615
|
-
}
|
|
34616
|
-
|
|
34617
|
-
/**
|
|
34618
|
-
* This function adds a blobImage to the rendering .
|
|
34619
|
-
* It is parsed to a base64 image.
|
|
34620
|
-
* @param blob The blob contains the image
|
|
34621
|
-
* @param isLayerMask True if the Image is the layer mask image
|
|
34622
|
-
*/
|
|
34623
|
-
}, {
|
|
34624
|
-
key: "addImgAsBlob",
|
|
34625
|
-
value: function addImgAsBlob(buffer, isLayerMask) {
|
|
34626
|
-
if (isLayerMask) this.layerMaskAsBase64 = buffer.toString('base64');else this.imgForSrc = 'data:image/jpeg;base64,' + buffer.toString('base64');
|
|
34627
|
-
}
|
|
34628
|
-
|
|
34629
|
-
//Write $("img.einBild").src
|
|
34630
|
-
}, {
|
|
34631
|
-
key: "getHQRenderingURL",
|
|
34632
|
-
value: function getHQRenderingURL() {
|
|
34633
|
-
return this.HQRenderingUrl;
|
|
34634
|
-
}
|
|
34635
|
-
}, {
|
|
34636
|
-
key: "getArURl",
|
|
34637
|
-
value: function getArURl() {
|
|
34638
|
-
return this.ArUrl;
|
|
34639
|
-
}
|
|
34640
|
-
}, {
|
|
34641
|
-
key: "getSpinURL",
|
|
34642
|
-
value: function getSpinURL() {
|
|
34643
|
-
return this.SpinUrl;
|
|
34644
|
-
}
|
|
34645
|
-
}, {
|
|
34646
|
-
key: "getImageForSrc",
|
|
34647
|
-
value: function getImageForSrc() {
|
|
34648
|
-
return this.imgForSrc;
|
|
34649
|
-
}
|
|
34650
|
-
}, {
|
|
34651
|
-
key: "containsSirvUrl",
|
|
34652
|
-
value: function containsSirvUrl() {
|
|
34653
|
-
return this.HQRenderingUrl != '';
|
|
34654
|
-
}
|
|
34655
|
-
}, {
|
|
34656
|
-
key: "setArUrl",
|
|
34657
|
-
value: function setArUrl(url) {
|
|
34658
|
-
this.ArUrl = url;
|
|
34659
|
-
}
|
|
34660
|
-
}, {
|
|
34661
|
-
key: "setSpinUrl",
|
|
34662
|
-
value: function setSpinUrl(url) {
|
|
34663
|
-
this.SpinUrl = url;
|
|
34664
|
-
}
|
|
34665
|
-
}, {
|
|
34666
|
-
key: "setHQRenderingUrl",
|
|
34667
|
-
value: function setHQRenderingUrl(url, useSirvViewer) {
|
|
34668
|
-
if (useSirvViewer) {
|
|
34669
|
-
this.HQRenderingUrl = url;
|
|
34670
|
-
} else {
|
|
34671
|
-
this.imgForSrc = url;
|
|
34672
|
-
}
|
|
34673
|
-
}
|
|
34674
|
-
|
|
34675
|
-
//*****************************************GETTER und SETTER********************************************** */
|
|
34676
|
-
}, {
|
|
34677
|
-
key: "CatalogCodex",
|
|
34678
|
-
get: function get() {
|
|
34679
|
-
return this.catalogData.catalogCodex;
|
|
34680
|
-
},
|
|
34681
|
-
set: function set(val) {
|
|
34682
|
-
this.catalogData.catalogCodex = val;
|
|
34683
|
-
}
|
|
34684
|
-
}, {
|
|
34685
|
-
key: "CatalogGUID",
|
|
34686
|
-
get: function get() {
|
|
34687
|
-
return this.catalogData.catalogGUID;
|
|
34688
|
-
},
|
|
34689
|
-
set: function set(val) {
|
|
34690
|
-
this.catalogData.catalogGUID = val;
|
|
34691
|
-
}
|
|
34692
|
-
}, {
|
|
34693
|
-
key: "IsLoadedFromCache",
|
|
34694
|
-
get: function get() {
|
|
34695
|
-
return this.isLoadedFromCache;
|
|
34696
|
-
},
|
|
34697
|
-
set: function set(val) {
|
|
34698
|
-
this.isLoadedFromCache = val;
|
|
34699
|
-
}
|
|
34700
|
-
}, {
|
|
34701
|
-
key: "PlanningHash",
|
|
34702
|
-
get: function get() {
|
|
34703
|
-
return this.planningHash;
|
|
34704
|
-
}
|
|
34705
|
-
}, {
|
|
34706
|
-
key: "RenderHash",
|
|
34707
|
-
get: function get() {
|
|
34708
|
-
return this.renderHash;
|
|
34709
|
-
}
|
|
34710
|
-
}, {
|
|
34711
|
-
key: "UrlToSavedRendering",
|
|
34712
|
-
get: function get() {
|
|
34713
|
-
return this.urlToSavedRendering;
|
|
34714
|
-
},
|
|
34715
|
-
set: function set(url) {
|
|
34716
|
-
this.urlToSavedRendering = url;
|
|
34717
|
-
}
|
|
34718
|
-
}, {
|
|
34719
|
-
key: "HasLayerMask",
|
|
34720
|
-
get: function get() {
|
|
34721
|
-
return this.hasLayerMask;
|
|
34722
|
-
},
|
|
34723
|
-
set: function set(hasLayerMask) {
|
|
34724
|
-
this.hasLayerMask = hasLayerMask;
|
|
34725
|
-
}
|
|
34726
|
-
}, {
|
|
34727
|
-
key: "RenderWidth",
|
|
34728
|
-
get: function get() {
|
|
34729
|
-
return this.renderWidth;
|
|
34730
|
-
}
|
|
34731
|
-
}, {
|
|
34732
|
-
key: "RenderHeight",
|
|
34733
|
-
get: function get() {
|
|
34734
|
-
return this.renderHeight;
|
|
34735
|
-
}
|
|
34736
|
-
}, {
|
|
34737
|
-
key: "getHasLayerMask",
|
|
34738
|
-
value: function getHasLayerMask() {
|
|
34739
|
-
return this.hasLayerMask;
|
|
34740
|
-
}
|
|
34741
|
-
}, {
|
|
34742
|
-
key: "getLayerMaskForSrc",
|
|
34743
|
-
value: function getLayerMaskForSrc() {
|
|
34744
|
-
return this.layerMaskAsBase64;
|
|
34745
|
-
}
|
|
34746
|
-
}, {
|
|
34747
|
-
key: "HasLayerMaskThreeTexture",
|
|
34748
|
-
get: function get() {
|
|
34749
|
-
return this.layerMaskThreeTexture != undefined;
|
|
34750
|
-
}
|
|
34751
|
-
}, {
|
|
34752
|
-
key: "LayerMaskThreeTexture",
|
|
34753
|
-
get: function get() {
|
|
34754
|
-
return this.layerMaskThreeTexture;
|
|
34755
|
-
},
|
|
34756
|
-
set: function set(tex) {
|
|
34757
|
-
this.layerMaskThreeTexture = tex;
|
|
34758
|
-
}
|
|
34759
|
-
/*
|
|
34760
|
-
get DoStream() {
|
|
34761
|
-
return this.doStream;
|
|
34762
|
-
}
|
|
34763
|
-
*/
|
|
34764
|
-
}, {
|
|
34765
|
-
key: "AllImgLoaded",
|
|
34766
|
-
get: function get() {
|
|
34767
|
-
return (this.imgForSrc != '' || this.HQRenderingUrl != '') && (!this.hasLayerMask || this.layerMaskAsBase64 != '');
|
|
34768
|
-
}
|
|
34769
|
-
}, {
|
|
34770
|
-
key: "UiInfoLoaded",
|
|
34771
|
-
get: function get() {
|
|
34772
|
-
return this.uiInfo != '';
|
|
34773
|
-
}
|
|
34774
|
-
}, {
|
|
34775
|
-
key: "CreationTime",
|
|
34776
|
-
get: function get() {
|
|
34777
|
-
return this.creationTime.getTime();
|
|
34778
|
-
}
|
|
34779
|
-
}, {
|
|
34780
|
-
key: "MediaServiceSaveMode",
|
|
34781
|
-
get: function get() {
|
|
34782
|
-
return this.mediaServiceSaveMode;
|
|
34783
|
-
},
|
|
34784
|
-
set: function set(mode) {
|
|
34785
|
-
this.mediaServiceSaveMode = mode;
|
|
34786
|
-
}
|
|
34787
|
-
}]);
|
|
34788
|
-
}();
|
|
34789
|
-
|
|
34790
|
-
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; }
|
|
34791
|
-
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34792
|
-
var LOG$6 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
34793
|
-
var DivaBasketHandler = /*#__PURE__*/function () {
|
|
34794
|
-
function DivaBasketHandler(plannerConfig) {
|
|
34795
|
-
var _this = this,
|
|
34796
|
-
_this$plannerConfig$s,
|
|
34797
|
-
_this$plannerConfig$s2,
|
|
34798
|
-
_this$plannerConfig$a;
|
|
34799
|
-
_classCallCheck__default["default"](this, DivaBasketHandler);
|
|
34800
|
-
_defineProperty__default["default"](this, "baskets", {});
|
|
34801
|
-
_defineProperty__default["default"](this, "ignoreInitObjectWhenInitializing", false);
|
|
34802
|
-
_defineProperty__default["default"](this, "plannerConfig", void 0);
|
|
34803
|
-
_defineProperty__default["default"](this, "divaNr", void 0);
|
|
34804
|
-
_defineProperty__default["default"](this, "loadDivaNr", void 0);
|
|
34805
|
-
_defineProperty__default["default"](this, "specificSetIdToLoad", void 0);
|
|
34806
|
-
_defineProperty__default["default"](this, "assignNewDivaNr", false);
|
|
34807
|
-
_defineProperty__default["default"](this, "basketWasSavedWithCurrentDocVersion", void 0);
|
|
34808
|
-
_defineProperty__default["default"](this, "emailConfig", void 0);
|
|
34809
|
-
_defineProperty__default["default"](this, "reportConfig", void 0);
|
|
34810
|
-
_defineProperty__default["default"](this, "_divaWWSHandler", void 0);
|
|
34811
|
-
_defineProperty__default["default"](this, "_handler", void 0);
|
|
34812
|
-
_defineProperty__default["default"](this, "_basketHandler", void 0);
|
|
34813
|
-
_defineProperty__default["default"](this, "startProductId", void 0);
|
|
34814
|
-
//Only helper variable
|
|
34815
|
-
_defineProperty__default["default"](this, "origConfiguration", {});
|
|
34816
|
-
/**
|
|
34817
|
-
* This function returns the originalConfiguration options
|
|
34818
|
-
*/
|
|
34819
|
-
_defineProperty__default["default"](this, "getOrigConfiguration", function () {
|
|
34820
|
-
return _this.origConfiguration;
|
|
34821
|
-
});
|
|
34822
|
-
this.plannerConfig = plannerConfig;
|
|
34823
|
-
this.assignNewDivaNr = !!this.plannerConfig.assignNewDivaNr;
|
|
34824
|
-
this._handler = plannerConfig.handler;
|
|
34825
|
-
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'))) {
|
|
34826
|
-
LOG$6.error(new DivaUtils.DivaError('Keine Öffnungsparameter', {
|
|
34827
|
-
code: 'WC_0003'
|
|
34828
|
-
}));
|
|
34829
|
-
}
|
|
34830
|
-
this.loadDivaNr = this.plannerConfig.divaNr;
|
|
34831
|
-
if (this.plannerConfig.initEmptyPlanner) {
|
|
34832
|
-
this.assignNewDivaNr = true;
|
|
34833
|
-
}
|
|
34834
|
-
if ((_this$plannerConfig$a = this.plannerConfig.apiConfig) !== null && _this$plannerConfig$a !== void 0 && _this$plannerConfig$a.basketService) {
|
|
34835
|
-
var _this$plannerConfig$a2, _this$plannerConfig$a3;
|
|
34836
|
-
this._basketHandler = new BasketHandler__default["default"](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"]);
|
|
34837
|
-
}
|
|
34838
|
-
}
|
|
34839
|
-
return _createClass__default["default"](DivaBasketHandler, [{
|
|
34840
|
-
key: "actDivaNr",
|
|
34841
|
-
get: function get() {
|
|
34842
|
-
return this.divaNr;
|
|
34843
|
-
}
|
|
34844
|
-
}, {
|
|
34845
|
-
key: "actBasket",
|
|
34846
|
-
get: function get() {
|
|
34847
|
-
return this.baskets[this.divaNr];
|
|
34848
|
-
}
|
|
34849
|
-
}, {
|
|
34850
|
-
key: "catalogCodexesOfOrderSets",
|
|
34851
|
-
get: function get() {
|
|
34852
|
-
var orderSets = this.baskets[this.divaNr].OrderSets;
|
|
34853
|
-
var ret = [];
|
|
34854
|
-
var _loop = function _loop(i) {
|
|
34855
|
-
if (!ret.find(function (catalogCodex) {
|
|
34856
|
-
return catalogCodex == orderSets[i].CatalogCodex;
|
|
34857
|
-
})) ret.push(orderSets[i].CatalogCodex);
|
|
34858
|
-
};
|
|
34859
|
-
for (var i = 0; i < orderSets.length; i++) {
|
|
34860
|
-
_loop(i);
|
|
34861
|
-
}
|
|
34862
|
-
return ret;
|
|
34863
|
-
}
|
|
34864
|
-
}, {
|
|
34865
|
-
key: "ArticlesToInitialize",
|
|
34866
|
-
get: function get() {
|
|
34867
|
-
return this.plannerConfig.articleCodexes;
|
|
34868
|
-
}
|
|
34869
|
-
}, {
|
|
34870
|
-
key: "updatePlannerConfig",
|
|
34871
|
-
value: function updatePlannerConfig(plannerConfig) {
|
|
34872
|
-
this.plannerConfig = plannerConfig;
|
|
34873
|
-
}
|
|
34874
|
-
}, {
|
|
34875
|
-
key: "updateDivaNrInBasket",
|
|
34876
|
-
value: function updateDivaNrInBasket(divaNr) {
|
|
34877
|
-
this.loadDivaNr = divaNr;
|
|
34878
|
-
}
|
|
34879
|
-
}, {
|
|
34880
|
-
key: "setIgnoreInitObjectWhenInitializing",
|
|
34881
|
-
value: function setIgnoreInitObjectWhenInitializing() {
|
|
34882
|
-
this.ignoreInitObjectWhenInitializing = true;
|
|
34230
|
+
key: "setIgnoreInitObjectWhenInitializing",
|
|
34231
|
+
value: function setIgnoreInitObjectWhenInitializing() {
|
|
34232
|
+
this.ignoreInitObjectWhenInitializing = true;
|
|
34883
34233
|
}
|
|
34884
34234
|
}, {
|
|
34885
34235
|
key: "initializeBasket",
|
|
@@ -34892,7 +34242,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34892
34242
|
case 0:
|
|
34893
34243
|
this.basketWasSavedWithCurrentDocVersion = false;
|
|
34894
34244
|
this.startProductId = undefined;
|
|
34895
|
-
LOG$
|
|
34245
|
+
LOG$7.debug("Basket initialising. initObject is: '", this.plannerConfig, "' divaNr to load is: '" + this.loadDivaNr + "'");
|
|
34896
34246
|
if (this.ignoreInitObjectWhenInitializing) {
|
|
34897
34247
|
_context.next = 34;
|
|
34898
34248
|
break;
|
|
@@ -35058,7 +34408,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35058
34408
|
title: (_api$getI18n = api.getI18n()) === null || _api$getI18n === void 0 ? void 0 : _api$getI18n.t('configurator.no_startproduct_defined_title'),
|
|
35059
34409
|
text: (_api$getI18n2 = api.getI18n()) === null || _api$getI18n2 === void 0 ? void 0 : _api$getI18n2.t('configurator.no_startproduct_defined_text')
|
|
35060
34410
|
});
|
|
35061
|
-
LOG$
|
|
34411
|
+
LOG$7.error(new DivaUtils.DivaError('it is configured to initialize the startProductForOrganizations if there are no other parameters. But no available product was found with organizationId: "' + this.plannerConfig.currentOrganization._id + '" in the field: "startProductForOrganizations"!'));
|
|
35062
34412
|
case 77:
|
|
35063
34413
|
_context.next = 83;
|
|
35064
34414
|
break;
|
|
@@ -35206,12 +34556,12 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35206
34556
|
case 0:
|
|
35207
34557
|
basketFromAPI = (_dataFromApi$basket = dataFromApi.basket) !== null && _dataFromApi$basket !== void 0 ? _dataFromApi$basket : dataFromApi.Basket; //evaluateRopoEffect(basketFromAPI,);
|
|
35208
34558
|
if (origProductId) basketFromAPI.OrigProductId = origProductId;
|
|
35209
|
-
basket = _objectSpread$
|
|
34559
|
+
basket = _objectSpread$7({}, basketFromAPI);
|
|
35210
34560
|
if (!basketFromAPI) {
|
|
35211
|
-
_context5.next =
|
|
34561
|
+
_context5.next = 48;
|
|
35212
34562
|
break;
|
|
35213
34563
|
}
|
|
35214
|
-
LOG$
|
|
34564
|
+
LOG$7.debug('divaNr: ' + divaNr + ' was loaded successfully from server!');
|
|
35215
34565
|
if (basketFromAPI.OrigDivaNr) {
|
|
35216
34566
|
this.origConfiguration.originDivaNr = basketFromAPI.OrigDivaNr;
|
|
35217
34567
|
} else if (basketFromAPI.OrigCatalogCodex) {
|
|
@@ -35305,20 +34655,14 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35305
34655
|
this.baskets[newDivaNr] = new basketModel.BasketData(basket);
|
|
35306
34656
|
this.baskets[newDivaNr].clearRenderData();
|
|
35307
34657
|
if (!keepOldDivaNr) this.divaNr = newDivaNr;
|
|
35308
|
-
_context5.next = 46;
|
|
35309
|
-
return DivaUtils__default["default"].initCache({
|
|
35310
|
-
accountGuid: this.baskets[newDivaNr].OrderSets[0].AccountGUID,
|
|
35311
|
-
catalogCodex: this.baskets[newDivaNr].OrderSets[0].CatalogCodex
|
|
35312
|
-
});
|
|
35313
|
-
case 46:
|
|
35314
34658
|
if (this.assignNewDivaNr) {
|
|
35315
34659
|
this.baskets[newDivaNr].clearBasketClientData();
|
|
35316
34660
|
this.baskets[newDivaNr].ProductSetName = '';
|
|
35317
34661
|
}
|
|
35318
34662
|
return _context5.abrupt("return", true);
|
|
35319
|
-
case
|
|
34663
|
+
case 48:
|
|
35320
34664
|
return _context5.abrupt("return", false);
|
|
35321
|
-
case
|
|
34665
|
+
case 49:
|
|
35322
34666
|
case "end":
|
|
35323
34667
|
return _context5.stop();
|
|
35324
34668
|
}
|
|
@@ -35352,7 +34696,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35352
34696
|
key: "loadBasketByCatalogCodex",
|
|
35353
34697
|
value: function () {
|
|
35354
34698
|
var _loadBasketByCatalogCodex = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(api) {
|
|
35355
|
-
var _this$plannerConfig$s8
|
|
34699
|
+
var _this$plannerConfig$s8;
|
|
35356
34700
|
var newBasket, _this$baskets$this$di;
|
|
35357
34701
|
return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context6) {
|
|
35358
34702
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -35363,37 +34707,23 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35363
34707
|
if (this.plannerConfig.articleCodexes) {
|
|
35364
34708
|
this.origConfiguration.originArticleCodexes = this.plannerConfig.articleCodexes;
|
|
35365
34709
|
}
|
|
35366
|
-
if (!(
|
|
34710
|
+
if (!((_this$plannerConfig$s8 = this.plannerConfig.startDivaNr) !== null && _this$plannerConfig$s8 !== void 0)) {
|
|
35367
34711
|
_context6.next = 6;
|
|
35368
34712
|
break;
|
|
35369
34713
|
}
|
|
35370
|
-
|
|
35371
|
-
_context6.next =
|
|
34714
|
+
_context6.t0 = _this$plannerConfig$s8;
|
|
34715
|
+
_context6.next = 9;
|
|
35372
34716
|
break;
|
|
35373
34717
|
case 6:
|
|
35374
34718
|
_context6.next = 8;
|
|
35375
|
-
return DivaUtils__default["default"].initCache({
|
|
35376
|
-
accountGuid: this.plannerConfig.accountGuid,
|
|
35377
|
-
catalogCodex: this.plannerConfig.catalogCodex
|
|
35378
|
-
});
|
|
35379
|
-
case 8:
|
|
35380
|
-
if (!((_this$plannerConfig$s8 = this.plannerConfig.startDivaNr) !== null && _this$plannerConfig$s8 !== void 0)) {
|
|
35381
|
-
_context6.next = 12;
|
|
35382
|
-
break;
|
|
35383
|
-
}
|
|
35384
|
-
_context6.t0 = _this$plannerConfig$s8;
|
|
35385
|
-
_context6.next = 15;
|
|
35386
|
-
break;
|
|
35387
|
-
case 12:
|
|
35388
|
-
_context6.next = 14;
|
|
35389
34719
|
return this.createNewDivaNr(api);
|
|
35390
|
-
case
|
|
34720
|
+
case 8:
|
|
35391
34721
|
_context6.t0 = _context6.sent;
|
|
35392
|
-
case
|
|
34722
|
+
case 9:
|
|
35393
34723
|
this.divaNr = _context6.t0;
|
|
35394
|
-
_context6.next =
|
|
34724
|
+
_context6.next = 12;
|
|
35395
34725
|
return this.createNewBasket(api, this.plannerConfig, this.divaNr, api.getLanguage());
|
|
35396
|
-
case
|
|
34726
|
+
case 12:
|
|
35397
34727
|
newBasket = _context6.sent;
|
|
35398
34728
|
if (!this.plannerConfig.basketData) {
|
|
35399
34729
|
this.baskets[this.divaNr] = newBasket;
|
|
@@ -35410,14 +34740,8 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35410
34740
|
if (this.baskets[this.divaNr].SetPlannerInfos) ;
|
|
35411
34741
|
}
|
|
35412
34742
|
this.specificSetIdToLoad = this.plannerConfig.setId;
|
|
35413
|
-
_context6.next = 23;
|
|
35414
|
-
return DivaUtils__default["default"].initCache({
|
|
35415
|
-
accountGuid: (_this$actBasket$Order = this.actBasket.OrderSets[0]) === null || _this$actBasket$Order === void 0 ? void 0 : _this$actBasket$Order.AccountGUID,
|
|
35416
|
-
catalogCodex: (_this$actBasket$Order2 = this.actBasket.OrderSets[0]) === null || _this$actBasket$Order2 === void 0 ? void 0 : _this$actBasket$Order2.CatalogCodex
|
|
35417
|
-
});
|
|
35418
|
-
case 23:
|
|
35419
34743
|
return _context6.abrupt("return", true);
|
|
35420
|
-
case
|
|
34744
|
+
case 16:
|
|
35421
34745
|
case "end":
|
|
35422
34746
|
return _context6.stop();
|
|
35423
34747
|
}
|
|
@@ -35448,7 +34772,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35448
34772
|
case 9:
|
|
35449
34773
|
_context7.prev = 9;
|
|
35450
34774
|
_context7.t0 = _context7["catch"](0);
|
|
35451
|
-
LOG$
|
|
34775
|
+
LOG$7.error(new DivaUtils.DivaError('DivaNr konnte in der Datenbank nicht gefunden werden', {
|
|
35452
34776
|
code: 'WC_0004',
|
|
35453
34777
|
custom: {
|
|
35454
34778
|
divaNr: divaNr
|
|
@@ -35484,7 +34808,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35484
34808
|
_context8.next = 8;
|
|
35485
34809
|
break;
|
|
35486
34810
|
}
|
|
35487
|
-
LOG$
|
|
34811
|
+
LOG$7.error(new DivaUtils.DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
|
|
35488
34812
|
code: 'WC_0005',
|
|
35489
34813
|
custom: {
|
|
35490
34814
|
productId: productId
|
|
@@ -35568,7 +34892,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35568
34892
|
_context10.next = 6;
|
|
35569
34893
|
break;
|
|
35570
34894
|
}
|
|
35571
|
-
LOG$
|
|
34895
|
+
LOG$7.error(new DivaUtils.DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
|
|
35572
34896
|
code: 'WC_0005',
|
|
35573
34897
|
custom: {
|
|
35574
34898
|
productId: productId
|
|
@@ -35605,8 +34929,8 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35605
34929
|
CatalogGUID: initObject.catalogGuid,
|
|
35606
34930
|
AccountGUID: initObject.accountGuid,
|
|
35607
34931
|
Favorites: new basketModel.Favorites()
|
|
35608
|
-
});
|
|
35609
|
-
if (!(initObject.accountGuid && !orderSet.AccountSessionGUID
|
|
34932
|
+
});
|
|
34933
|
+
if (!(initObject.accountGuid && !orderSet.AccountSessionGUID)) {
|
|
35610
34934
|
_context11.next = 5;
|
|
35611
34935
|
break;
|
|
35612
34936
|
}
|
|
@@ -35660,7 +34984,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35660
34984
|
return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context12) {
|
|
35661
34985
|
while (1) switch (_context12.prev = _context12.next) {
|
|
35662
34986
|
case 0:
|
|
35663
|
-
LOG$
|
|
34987
|
+
LOG$7.startTransaction({
|
|
35664
34988
|
event: 'SaveBasketOnAPI',
|
|
35665
34989
|
eventId: 'SAVE_BASKET_ON_API',
|
|
35666
34990
|
message: 'Save Basket on API'
|
|
@@ -35699,7 +35023,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35699
35023
|
}
|
|
35700
35024
|
return _context12.abrupt("return", response);
|
|
35701
35025
|
case 19:
|
|
35702
|
-
LOG$
|
|
35026
|
+
LOG$7.successTransaction('saveBasketOnAPI');
|
|
35703
35027
|
return _context12.abrupt("return", response === null || response === void 0 ? void 0 : response._id);
|
|
35704
35028
|
case 21:
|
|
35705
35029
|
case "end":
|
|
@@ -35805,7 +35129,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35805
35129
|
if (_loop2()) continue;
|
|
35806
35130
|
}
|
|
35807
35131
|
var variantValues = article.VariantValuesParentOption;
|
|
35808
|
-
var data = _objectSpread$
|
|
35132
|
+
var data = _objectSpread$7(_objectSpread$7({}, this.actBasket), {}, {
|
|
35809
35133
|
changedValues: changedValues,
|
|
35810
35134
|
variantValues: variantValues,
|
|
35811
35135
|
isInit: isInit,
|
|
@@ -35830,7 +35154,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35830
35154
|
break;
|
|
35831
35155
|
case 3:
|
|
35832
35156
|
_context13.next = 5;
|
|
35833
|
-
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-
|
|
35157
|
+
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-73a6a1bb.js'); });
|
|
35834
35158
|
case 5:
|
|
35835
35159
|
_yield$import = _context13.sent;
|
|
35836
35160
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -35838,7 +35162,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35838
35162
|
return _context13.abrupt("break", 33);
|
|
35839
35163
|
case 9:
|
|
35840
35164
|
_context13.next = 11;
|
|
35841
|
-
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-
|
|
35165
|
+
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-495734b8.js'); });
|
|
35842
35166
|
case 11:
|
|
35843
35167
|
_yield$import2 = _context13.sent;
|
|
35844
35168
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -35846,7 +35170,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35846
35170
|
return _context13.abrupt("break", 33);
|
|
35847
35171
|
case 15:
|
|
35848
35172
|
_context13.next = 17;
|
|
35849
|
-
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-
|
|
35173
|
+
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-4254c183.js'); });
|
|
35850
35174
|
case 17:
|
|
35851
35175
|
_yield$import3 = _context13.sent;
|
|
35852
35176
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -35854,7 +35178,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35854
35178
|
return _context13.abrupt("break", 33);
|
|
35855
35179
|
case 21:
|
|
35856
35180
|
_context13.next = 23;
|
|
35857
|
-
return Promise.resolve().then(function () { return require('./ProductBasketHandler-
|
|
35181
|
+
return Promise.resolve().then(function () { return require('./ProductBasketHandler-fca32045.js'); });
|
|
35858
35182
|
case 23:
|
|
35859
35183
|
_yield$import4 = _context13.sent;
|
|
35860
35184
|
ProductWWSHandler = _yield$import4["default"];
|
|
@@ -35862,7 +35186,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35862
35186
|
return _context13.abrupt("break", 33);
|
|
35863
35187
|
case 27:
|
|
35864
35188
|
_context13.next = 29;
|
|
35865
|
-
return Promise.resolve().then(function () { return require('./StandardWWSHandler-
|
|
35189
|
+
return Promise.resolve().then(function () { return require('./StandardWWSHandler-785777e5.js'); });
|
|
35866
35190
|
case 29:
|
|
35867
35191
|
_yield$import5 = _context13.sent;
|
|
35868
35192
|
StandardWWSHandler = _yield$import5["default"];
|
|
@@ -35894,28 +35218,28 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35894
35218
|
if (!organization.shopType) return;
|
|
35895
35219
|
if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'store') {
|
|
35896
35220
|
var _this$plannerConfig$c5;
|
|
35897
|
-
LOG$
|
|
35221
|
+
LOG$7.businessEvent('ropoEffectStoreToStore', 'Seller', 'Evaluating the ROPO Effect Store To Store', {
|
|
35898
35222
|
sourceDivaNr: sourceBasket.DivaNr,
|
|
35899
35223
|
sourceOrgId: sourceOrganizationId.id,
|
|
35900
35224
|
targetOrgId: (_this$plannerConfig$c5 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c5 === void 0 ? void 0 : _this$plannerConfig$c5._id
|
|
35901
35225
|
});
|
|
35902
35226
|
} else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'webshop') {
|
|
35903
35227
|
var _this$plannerConfig$c6;
|
|
35904
|
-
LOG$
|
|
35228
|
+
LOG$7.businessEvent('ropoEffectWebToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Web', {
|
|
35905
35229
|
sourceDivaNr: sourceBasket.DivaNr,
|
|
35906
35230
|
sourceOrgId: sourceOrganizationId.id,
|
|
35907
35231
|
targetOrgId: (_this$plannerConfig$c6 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c6 === void 0 ? void 0 : _this$plannerConfig$c6._id
|
|
35908
35232
|
});
|
|
35909
35233
|
} else if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'webshop') {
|
|
35910
35234
|
var _this$plannerConfig$c7;
|
|
35911
|
-
LOG$
|
|
35235
|
+
LOG$7.businessEvent('ropoEffectStoreToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Store', {
|
|
35912
35236
|
sourceDivaNr: sourceBasket.DivaNr,
|
|
35913
35237
|
sourceOrgId: sourceOrganizationId.id,
|
|
35914
35238
|
targetOrgId: (_this$plannerConfig$c7 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c7 === void 0 ? void 0 : _this$plannerConfig$c7._id
|
|
35915
35239
|
});
|
|
35916
35240
|
} else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'store') {
|
|
35917
35241
|
var _this$plannerConfig$c8;
|
|
35918
|
-
LOG$
|
|
35242
|
+
LOG$7.businessEvent('ropoEffectWebToStore', 'Seller', 'Evaluating the ROPO Effect Store To Web', {
|
|
35919
35243
|
sourceDivaNr: sourceBasket.DivaNr,
|
|
35920
35244
|
sourceOrgId: sourceOrganizationId.id,
|
|
35921
35245
|
targetOrgId: (_this$plannerConfig$c8 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c8 === void 0 ? void 0 : _this$plannerConfig$c8._id
|
|
@@ -35923,7 +35247,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35923
35247
|
}
|
|
35924
35248
|
} catch (e) {
|
|
35925
35249
|
var _this$plannerConfig$c9;
|
|
35926
|
-
LOG$
|
|
35250
|
+
LOG$7.error(new DivaUtils.DivaError('Error on Evaluating ROPO Effect', {
|
|
35927
35251
|
code: 'SELLER_0006',
|
|
35928
35252
|
cause: e,
|
|
35929
35253
|
custom: {
|
|
@@ -35937,7 +35261,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35937
35261
|
}]);
|
|
35938
35262
|
}();
|
|
35939
35263
|
|
|
35940
|
-
var LOG$
|
|
35264
|
+
var LOG$6 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
35941
35265
|
var ViewPointHandler = /*#__PURE__*/function () {
|
|
35942
35266
|
function ViewPointHandler() {
|
|
35943
35267
|
_classCallCheck__default["default"](this, ViewPointHandler);
|
|
@@ -36160,22 +35484,22 @@ var ViewPointHandler = /*#__PURE__*/function () {
|
|
|
36160
35484
|
var roomListObj = JSON.parse(roomlist);
|
|
36161
35485
|
var roomIsSel = true;
|
|
36162
35486
|
for (var roomCodex in roomListObj) {
|
|
36163
|
-
LOG$
|
|
35487
|
+
LOG$6.debug('Successfully Init roomList with Codex ' + roomCodex, 'ViewPointHandler - initRoomList');
|
|
36164
35488
|
var curRoom = roomListObj[roomCodex];
|
|
36165
35489
|
var mainCategory = '#WG#';
|
|
36166
35490
|
if (!this.staticRoomMainCategories.has(roomCodex)) {
|
|
36167
|
-
LOG$
|
|
35491
|
+
LOG$6.error(new DivaUtils.DivaError('Error when parsing preview URL for a viewPoint. Please add a retailerMainCategory for this catalog in the CE!', {
|
|
36168
35492
|
code: 'WC_0013'
|
|
36169
35493
|
}));
|
|
36170
35494
|
} else {
|
|
36171
35495
|
var categories = this.staticRoomMainCategories.get(roomCodex);
|
|
36172
35496
|
if (categories.length == 0) {
|
|
36173
|
-
LOG$
|
|
35497
|
+
LOG$6.error(new DivaUtils.DivaError('Error when parsing preview URL for a viewPoint. Please add a retailerMainCategory for this catalog in the CE!', {
|
|
36174
35498
|
code: 'WC_0013'
|
|
36175
35499
|
}));
|
|
36176
35500
|
} else {
|
|
36177
35501
|
if (categories.length > 1) {
|
|
36178
|
-
LOG$
|
|
35502
|
+
LOG$6.error(new DivaUtils.DivaError('Error when parsing preview URL for a viewPoint. There is more than one Catalog loaded. Decide a strategy which mainCategory should be taken!', {
|
|
36179
35503
|
code: 'WC_0013'
|
|
36180
35504
|
}));
|
|
36181
35505
|
}
|
|
@@ -36189,7 +35513,7 @@ var ViewPointHandler = /*#__PURE__*/function () {
|
|
|
36189
35513
|
previewUrl = previewUrl.replace('#WG#', mainCategory);
|
|
36190
35514
|
}
|
|
36191
35515
|
if (curRoom.VP[i].R && curRoom.VP[i].R.indexOf(':') == -1) {
|
|
36192
|
-
LOG$
|
|
35516
|
+
LOG$6.error(new DivaUtils.DivaError('The background has a custom width and custom height. However it is not formatted correctly. the width and height must be separated with ":" : ' + curRoom.VP[i].R, {
|
|
36193
35517
|
code: 'WC_0013'
|
|
36194
35518
|
}));
|
|
36195
35519
|
}
|
|
@@ -36287,7 +35611,7 @@ var ViewPointHandler = /*#__PURE__*/function () {
|
|
|
36287
35611
|
this.navInfo3D.rotVert = 0;
|
|
36288
35612
|
this.navInfo3D.rotHori = 0;
|
|
36289
35613
|
} else {
|
|
36290
|
-
LOG$
|
|
35614
|
+
LOG$6.debug('There is no static frontend viewpoint room: ' + roomCodex);
|
|
36291
35615
|
}
|
|
36292
35616
|
} else if (this.curRoomCodex == roominfo.codex) {
|
|
36293
35617
|
roominfo.sel = false;
|
|
@@ -36432,207 +35756,415 @@ var ViewPointHandler = /*#__PURE__*/function () {
|
|
|
36432
35756
|
}]);
|
|
36433
35757
|
}();
|
|
36434
35758
|
|
|
36435
|
-
|
|
36436
|
-
|
|
36437
|
-
var
|
|
36438
|
-
|
|
36439
|
-
|
|
36440
|
-
|
|
36441
|
-
|
|
36442
|
-
|
|
36443
|
-
_defineProperty__default["default"](this, "
|
|
36444
|
-
_defineProperty__default["default"](this, "
|
|
36445
|
-
_defineProperty__default["default"](this, "
|
|
36446
|
-
_defineProperty__default["default"](this, "
|
|
36447
|
-
|
|
36448
|
-
|
|
36449
|
-
|
|
36450
|
-
|
|
36451
|
-
|
|
36452
|
-
this
|
|
35759
|
+
//This class saves all informations needed for a rendering
|
|
35760
|
+
var LOG$5 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
35761
|
+
var Rendering = /*#__PURE__*/function () {
|
|
35762
|
+
function Rendering(planningHash, renderHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, hasLayerMask, hasStaticBG, mediaServiceSaveMode, alternateRenderingsExist, alternateRendererInfo) {
|
|
35763
|
+
_classCallCheck__default["default"](this, Rendering);
|
|
35764
|
+
_defineProperty__default["default"](this, "planningHash", void 0);
|
|
35765
|
+
_defineProperty__default["default"](this, "renderHash", void 0);
|
|
35766
|
+
_defineProperty__default["default"](this, "creationTime", void 0);
|
|
35767
|
+
_defineProperty__default["default"](this, "renderWidth", void 0);
|
|
35768
|
+
_defineProperty__default["default"](this, "renderHeight", void 0);
|
|
35769
|
+
_defineProperty__default["default"](this, "uiInfo", void 0);
|
|
35770
|
+
_defineProperty__default["default"](this, "urlToSavedRendering", void 0);
|
|
35771
|
+
// viewPoint: string;
|
|
35772
|
+
// private posInfo: any;
|
|
35773
|
+
//private doStream: boolean; Streaming over 3D Host is deprected
|
|
35774
|
+
//private byteChunkArr: any;
|
|
35775
|
+
//private byteChunkLayerMaskArr: any;
|
|
35776
|
+
_defineProperty__default["default"](this, "hasLayerMask", void 0);
|
|
35777
|
+
//private imgBytes: any;
|
|
35778
|
+
_defineProperty__default["default"](this, "imgForSrc", void 0);
|
|
35779
|
+
_defineProperty__default["default"](this, "layerMaskAsBase64", void 0);
|
|
35780
|
+
_defineProperty__default["default"](this, "layerMaskThreeTexture", void 0);
|
|
35781
|
+
_defineProperty__default["default"](this, "isFullscreenRendering", void 0);
|
|
35782
|
+
_defineProperty__default["default"](this, "hasStaticBackground", void 0);
|
|
35783
|
+
_defineProperty__default["default"](this, "hasDimensionLines", void 0);
|
|
35784
|
+
_defineProperty__default["default"](this, "plannerMeasureDigits", void 0);
|
|
35785
|
+
_defineProperty__default["default"](this, "alternateRendererInfo", void 0);
|
|
35786
|
+
_defineProperty__default["default"](this, "isAlternateRendering", void 0);
|
|
35787
|
+
_defineProperty__default["default"](this, "alternateRenderingsExist", void 0);
|
|
35788
|
+
_defineProperty__default["default"](this, "mediaServiceSaveMode", void 0);
|
|
35789
|
+
_defineProperty__default["default"](this, "catalogData", void 0);
|
|
35790
|
+
this.planningHash = planningHash;
|
|
35791
|
+
this.renderHash = renderHash;
|
|
35792
|
+
this.renderWidth = width;
|
|
35793
|
+
this.renderHeight = height;
|
|
35794
|
+
this.uiInfo = '';
|
|
35795
|
+
this.imgForSrc = '';
|
|
35796
|
+
this.layerMaskAsBase64 = '';
|
|
35797
|
+
this.isFullscreenRendering = isFullscreenRendering;
|
|
35798
|
+
this.hasDimensionLines = hasDimensionLines;
|
|
35799
|
+
this.plannerMeasureDigits = plannerMeasureDigits;
|
|
35800
|
+
this.hasLayerMask = hasLayerMask;
|
|
35801
|
+
this.creationTime = new Date();
|
|
35802
|
+
this.layerMaskThreeTexture = undefined;
|
|
35803
|
+
this.hasStaticBackground = hasStaticBG;
|
|
35804
|
+
this.mediaServiceSaveMode = mediaServiceSaveMode;
|
|
35805
|
+
this.urlToSavedRendering = '';
|
|
35806
|
+
this.catalogData = {
|
|
35807
|
+
catalogCodex: '',
|
|
35808
|
+
catalogGUID: ''
|
|
35809
|
+
};
|
|
35810
|
+
if (alternateRendererInfo != undefined) this.isAlternateRendering = true;else this.isAlternateRendering = false;
|
|
35811
|
+
this.alternateRendererInfo = alternateRendererInfo;
|
|
35812
|
+
this.alternateRenderingsExist = !!alternateRenderingsExist;
|
|
36453
35813
|
}
|
|
36454
|
-
return _createClass__default["default"](
|
|
36455
|
-
key: "
|
|
36456
|
-
value: function
|
|
36457
|
-
this.
|
|
35814
|
+
return _createClass__default["default"](Rendering, [{
|
|
35815
|
+
key: "clone",
|
|
35816
|
+
value: function clone(rendering) {
|
|
35817
|
+
this.planningHash = rendering.planningHash;
|
|
35818
|
+
this.renderHash = rendering.renderHash;
|
|
35819
|
+
this.creationTime = rendering.creationTime;
|
|
35820
|
+
this.renderWidth = rendering.renderWidth;
|
|
35821
|
+
this.renderHeight = rendering.renderHeight;
|
|
35822
|
+
this.uiInfo = rendering.uiInfo;
|
|
35823
|
+
this.urlToSavedRendering = rendering.urlToSavedRendering;
|
|
35824
|
+
this.hasLayerMask = rendering.hasLayerMask;
|
|
35825
|
+
this.imgForSrc = rendering.imgForSrc;
|
|
35826
|
+
this.layerMaskAsBase64 = rendering.layerMaskAsBase64;
|
|
35827
|
+
this.layerMaskThreeTexture = rendering.layerMaskThreeTexture;
|
|
35828
|
+
this.isFullscreenRendering = rendering.isFullscreenRendering;
|
|
35829
|
+
this.hasStaticBackground = rendering.hasStaticBackground;
|
|
35830
|
+
this.hasDimensionLines = rendering.hasDimensionLines;
|
|
35831
|
+
this.plannerMeasureDigits = rendering.plannerMeasureDigits;
|
|
35832
|
+
this.alternateRendererInfo = rendering.alternateRendererInfo;
|
|
35833
|
+
this.isAlternateRendering = rendering.isAlternateRendering;
|
|
35834
|
+
this.alternateRenderingsExist = rendering.alternateRenderingsExist;
|
|
35835
|
+
this.mediaServiceSaveMode = rendering.mediaServiceSaveMode;
|
|
35836
|
+
this.catalogData = rendering.catalogData;
|
|
36458
35837
|
}
|
|
36459
35838
|
}, {
|
|
36460
|
-
key: "
|
|
36461
|
-
value: function
|
|
36462
|
-
this.
|
|
35839
|
+
key: "getAllDockingPoints",
|
|
35840
|
+
value: function getAllDockingPoints(setId, elementId) {
|
|
35841
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35842
|
+
return this.uiInfo['S1']['E' + elementId]['DP'];
|
|
35843
|
+
}
|
|
35844
|
+
return this.uiInfo[setId]['E' + elementId]['DP'];
|
|
36463
35845
|
}
|
|
36464
35846
|
}, {
|
|
36465
|
-
key: "
|
|
36466
|
-
value: function
|
|
36467
|
-
this.
|
|
35847
|
+
key: "getHasStaticBackground",
|
|
35848
|
+
value: function getHasStaticBackground() {
|
|
35849
|
+
return this.hasStaticBackground;
|
|
36468
35850
|
}
|
|
36469
35851
|
}, {
|
|
36470
|
-
key: "
|
|
36471
|
-
value: function
|
|
36472
|
-
this.
|
|
35852
|
+
key: "getIsFullscreenRendering",
|
|
35853
|
+
value: function getIsFullscreenRendering() {
|
|
35854
|
+
return this.isFullscreenRendering;
|
|
36473
35855
|
}
|
|
36474
35856
|
}, {
|
|
36475
|
-
key: "
|
|
36476
|
-
value: function () {
|
|
36477
|
-
|
|
36478
|
-
|
|
36479
|
-
|
|
36480
|
-
|
|
36481
|
-
|
|
36482
|
-
|
|
36483
|
-
|
|
36484
|
-
|
|
36485
|
-
|
|
36486
|
-
|
|
36487
|
-
|
|
36488
|
-
|
|
36489
|
-
|
|
36490
|
-
|
|
36491
|
-
|
|
36492
|
-
|
|
36493
|
-
|
|
36494
|
-
|
|
36495
|
-
|
|
36496
|
-
|
|
36497
|
-
|
|
36498
|
-
|
|
36499
|
-
|
|
36500
|
-
|
|
36501
|
-
|
|
36502
|
-
|
|
36503
|
-
|
|
36504
|
-
|
|
36505
|
-
|
|
36506
|
-
|
|
36507
|
-
|
|
36508
|
-
|
|
36509
|
-
|
|
36510
|
-
|
|
36511
|
-
if (!response.ok) {
|
|
36512
|
-
_context.next = 20;
|
|
36513
|
-
break;
|
|
36514
|
-
}
|
|
36515
|
-
_context.next = 11;
|
|
36516
|
-
return response.json();
|
|
36517
|
-
case 11:
|
|
36518
|
-
result = _context.sent;
|
|
36519
|
-
if (!(result.data.length > 0)) {
|
|
36520
|
-
_context.next = 17;
|
|
36521
|
-
break;
|
|
36522
|
-
}
|
|
36523
|
-
LOG$4.successTransaction('ON_REQUEST_RENDERING', {});
|
|
36524
|
-
return _context.abrupt("return", result.data[0].url);
|
|
36525
|
-
case 17:
|
|
36526
|
-
error = true;
|
|
36527
|
-
case 18:
|
|
36528
|
-
_context.next = 21;
|
|
36529
|
-
break;
|
|
36530
|
-
case 20:
|
|
36531
|
-
error = true;
|
|
36532
|
-
case 21:
|
|
36533
|
-
if (error && logOnError) {
|
|
36534
|
-
LOG$4.errorTransaction('ON_REQUEST_RENDERING', 'WC_0015', 'loadRenderingFromCache not found (functionType C3D). Load rendering from Cache not successfull. Hash: ' + hash + 'response: ' + response);
|
|
36535
|
-
}
|
|
36536
|
-
LOG$4.successTransaction('ON_REQUEST_RENDERING', {});
|
|
36537
|
-
return _context.abrupt("return", '');
|
|
36538
|
-
case 24:
|
|
36539
|
-
case "end":
|
|
36540
|
-
return _context.stop();
|
|
36541
|
-
}
|
|
36542
|
-
}, _callee, this);
|
|
36543
|
-
}));
|
|
36544
|
-
function loadRenderingFromCache(_x) {
|
|
36545
|
-
return _loadRenderingFromCache.apply(this, arguments);
|
|
35857
|
+
key: "setIsFullscreenRendering",
|
|
35858
|
+
value: function setIsFullscreenRendering(isFullscreen) {
|
|
35859
|
+
this.isFullscreenRendering = isFullscreen;
|
|
35860
|
+
}
|
|
35861
|
+
}, {
|
|
35862
|
+
key: "getHasDimensionLines",
|
|
35863
|
+
value: function getHasDimensionLines() {
|
|
35864
|
+
return this.hasDimensionLines;
|
|
35865
|
+
}
|
|
35866
|
+
}, {
|
|
35867
|
+
key: "getPlannerMeasureDigits",
|
|
35868
|
+
value: function getPlannerMeasureDigits() {
|
|
35869
|
+
return this.plannerMeasureDigits;
|
|
35870
|
+
}
|
|
35871
|
+
}, {
|
|
35872
|
+
key: "getIsAlternateRendering",
|
|
35873
|
+
value: function getIsAlternateRendering() {
|
|
35874
|
+
return this.isAlternateRendering;
|
|
35875
|
+
}
|
|
35876
|
+
}, {
|
|
35877
|
+
key: "getAlternateRenderInfo",
|
|
35878
|
+
value: function getAlternateRenderInfo() {
|
|
35879
|
+
return this.alternateRendererInfo;
|
|
35880
|
+
}
|
|
35881
|
+
}, {
|
|
35882
|
+
key: "getAlternateRenderingsExist",
|
|
35883
|
+
value: function getAlternateRenderingsExist() {
|
|
35884
|
+
return this.alternateRenderingsExist;
|
|
35885
|
+
}
|
|
35886
|
+
}, {
|
|
35887
|
+
key: "hasUIInfosOfElement",
|
|
35888
|
+
value: function hasUIInfosOfElement(setId, elementid) {
|
|
35889
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35890
|
+
return this.uiInfo['S1']['E' + elementid] != undefined;
|
|
35891
|
+
} else {
|
|
35892
|
+
return this.uiInfo[setId] != undefined && this.uiInfo[setId]['E' + elementid] != undefined;
|
|
36546
35893
|
}
|
|
36547
|
-
|
|
36548
|
-
}()
|
|
35894
|
+
}
|
|
36549
35895
|
}, {
|
|
36550
|
-
key: "
|
|
36551
|
-
value: function
|
|
36552
|
-
|
|
36553
|
-
|
|
36554
|
-
|
|
35896
|
+
key: "getOutlinePolygonForSVG",
|
|
35897
|
+
value: function getOutlinePolygonForSVG(setId, elementId, viewPortSize) {
|
|
35898
|
+
var poly = [];
|
|
35899
|
+
var avgCamDist = 0;
|
|
35900
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35901
|
+
poly = this.uiInfo['S1']['E' + elementId]['POLYOUTLINE'];
|
|
35902
|
+
avgCamDist = this.uiInfo['S1']['E' + elementId]['AVGCAMDIST'];
|
|
35903
|
+
} else if (this.uiInfo[setId]) {
|
|
35904
|
+
poly = this.uiInfo[setId]['E' + elementId]['POLYOUTLINE'];
|
|
35905
|
+
avgCamDist = this.uiInfo[setId]['E' + elementId]['AVGCAMDIST'];
|
|
35906
|
+
} else {
|
|
35907
|
+
poly = this.uiInfo['E' + elementId]['POLYOUTLINE'];
|
|
35908
|
+
avgCamDist = this.uiInfo['E' + elementId]['AVGCAMDIST'];
|
|
36555
35909
|
}
|
|
36556
|
-
|
|
36557
|
-
var
|
|
36558
|
-
var
|
|
36559
|
-
|
|
36560
|
-
bytes[i] = binary_string.charCodeAt(i);
|
|
35910
|
+
if (!poly) return undefined;
|
|
35911
|
+
var points = '';
|
|
35912
|
+
for (var i = 0; i < poly.length; i++) {
|
|
35913
|
+
points += Math.round(poly[i].x * 0.01 * viewPortSize.imgWidth) + ',' + Math.round((100 - poly[i].y) * 0.01 * viewPortSize.imgHeight) + ' ';
|
|
36561
35914
|
}
|
|
36562
|
-
|
|
36563
|
-
|
|
36564
|
-
|
|
36565
|
-
|
|
36566
|
-
return blob;
|
|
35915
|
+
return {
|
|
35916
|
+
points: points,
|
|
35917
|
+
avgCamDist: avgCamDist
|
|
35918
|
+
};
|
|
36567
35919
|
}
|
|
35920
|
+
|
|
35921
|
+
//Left/Right_Bottom/Top_Back/Front
|
|
36568
35922
|
}, {
|
|
36569
|
-
key: "
|
|
36570
|
-
value: function () {
|
|
36571
|
-
var
|
|
36572
|
-
|
|
36573
|
-
|
|
36574
|
-
|
|
36575
|
-
|
|
36576
|
-
|
|
36577
|
-
|
|
36578
|
-
|
|
36579
|
-
|
|
36580
|
-
data = new FormData();
|
|
36581
|
-
data.append('file', imageBlob);
|
|
36582
|
-
mediaItem = {
|
|
36583
|
-
organizationId: this.organizationId,
|
|
36584
|
-
mediaType: 'PCT',
|
|
36585
|
-
fileName: hash + '.jpg'
|
|
36586
|
-
};
|
|
36587
|
-
data.append('mediaItem', JSON.stringify(mediaItem));
|
|
36588
|
-
mediaItemRef = {
|
|
36589
|
-
functionType: 'P2D',
|
|
36590
|
-
planningHash: hash,
|
|
36591
|
-
catalogCodex: catalogCodex,
|
|
36592
|
-
catalogGuid: catalogGUID
|
|
36593
|
-
};
|
|
36594
|
-
data.append('mediaItemRef', JSON.stringify(mediaItemRef));
|
|
36595
|
-
_context2.next = 11;
|
|
36596
|
-
return fetch(url, {
|
|
36597
|
-
method: 'POST',
|
|
36598
|
-
body: data,
|
|
36599
|
-
headers: {
|
|
36600
|
-
'X-API-KEY': this.mediaServiceApiKey
|
|
36601
|
-
}
|
|
36602
|
-
});
|
|
36603
|
-
case 11:
|
|
36604
|
-
response = _context2.sent;
|
|
36605
|
-
if (!response.ok) {
|
|
36606
|
-
_context2.next = 20;
|
|
36607
|
-
break;
|
|
36608
|
-
}
|
|
36609
|
-
_context2.next = 15;
|
|
36610
|
-
return response.json();
|
|
36611
|
-
case 15:
|
|
36612
|
-
res = _context2.sent;
|
|
36613
|
-
LOG$4.debug('Successfully saved 2D Planning in media Service. URL: ' + res.url);
|
|
36614
|
-
return _context2.abrupt("return", res.url);
|
|
36615
|
-
case 20:
|
|
36616
|
-
LOG$4.error(new DivaUtils.DivaError('Error when saving the Planning2D image on mediaService. Hash: ' + hash + 'response: ' + response, {
|
|
36617
|
-
code: 'WC_0016'
|
|
36618
|
-
}));
|
|
36619
|
-
case 21:
|
|
36620
|
-
DivaUtils__default["default"].endSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
|
|
36621
|
-
return _context2.abrupt("return", '');
|
|
36622
|
-
case 23:
|
|
36623
|
-
case "end":
|
|
36624
|
-
return _context2.stop();
|
|
36625
|
-
}
|
|
36626
|
-
}, _callee2, this);
|
|
36627
|
-
}));
|
|
36628
|
-
function savePlanning2DPermanent(_x2, _x3, _x4, _x5) {
|
|
36629
|
-
return _savePlanning2DPermanent.apply(this, arguments);
|
|
35923
|
+
key: "getRightTopBackUIPos",
|
|
35924
|
+
value: function getRightTopBackUIPos(setId, elemId) {
|
|
35925
|
+
var bbox = null;
|
|
35926
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35927
|
+
bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
|
|
35928
|
+
} else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
|
|
35929
|
+
if (!bbox) return;
|
|
35930
|
+
for (var i = 0; i < bbox.length; i++) {
|
|
35931
|
+
if (bbox[i].C == 'RTB') {
|
|
35932
|
+
return bbox[i];
|
|
35933
|
+
}
|
|
36630
35934
|
}
|
|
36631
|
-
|
|
36632
|
-
|
|
35935
|
+
}
|
|
35936
|
+
//Left/Right_Bottom/Top_Back/Front
|
|
35937
|
+
}, {
|
|
35938
|
+
key: "getLeftTopBackUIPos",
|
|
35939
|
+
value: function getLeftTopBackUIPos(setId, elemId) {
|
|
35940
|
+
var bbox = null;
|
|
35941
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35942
|
+
bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
|
|
35943
|
+
} else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
|
|
35944
|
+
if (!bbox) return;
|
|
35945
|
+
for (var i = 0; i < bbox.length; i++) {
|
|
35946
|
+
if (bbox[i].C == 'LTB') {
|
|
35947
|
+
return bbox[i];
|
|
35948
|
+
}
|
|
35949
|
+
}
|
|
35950
|
+
}
|
|
35951
|
+
//Left/Right_Bottom/Top_Back/Front
|
|
35952
|
+
//elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
|
|
35953
|
+
}, {
|
|
35954
|
+
key: "getLeftBottomFrontUIPos",
|
|
35955
|
+
value: function getLeftBottomFrontUIPos(setId, elemId) {
|
|
35956
|
+
var bbox = null;
|
|
35957
|
+
if (this.uiInfo == '') return null;
|
|
35958
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35959
|
+
if (!this.uiInfo['S1']['E' + elemId]) return;
|
|
35960
|
+
bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
|
|
35961
|
+
} else if (this.uiInfo[setId]) {
|
|
35962
|
+
if (!this.uiInfo[setId]['E' + elemId]) return;
|
|
35963
|
+
bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];
|
|
35964
|
+
} else {
|
|
35965
|
+
var _this$uiInfo;
|
|
35966
|
+
bbox = (_this$uiInfo = this.uiInfo['E' + elemId]) === null || _this$uiInfo === void 0 ? void 0 : _this$uiInfo['BBOX3D'];
|
|
35967
|
+
}
|
|
35968
|
+
if (!bbox) return;
|
|
35969
|
+
for (var i = 0; i < bbox.length; i++) {
|
|
35970
|
+
if (bbox[i].C == 'LBF') {
|
|
35971
|
+
return bbox[i];
|
|
35972
|
+
}
|
|
35973
|
+
}
|
|
35974
|
+
}
|
|
35975
|
+
}, {
|
|
35976
|
+
key: "getBoxPlannerCornerUIPos",
|
|
35977
|
+
value: function getBoxPlannerCornerUIPos(setId, elemId, corner) {
|
|
35978
|
+
var boxPlan = [];
|
|
35979
|
+
if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
|
|
35980
|
+
boxPlan = this.uiInfo['S1']['E' + elemId]['BoxPlan'];
|
|
35981
|
+
} else if (this.uiInfo[setId]) boxPlan = this.uiInfo[setId]['E' + elemId]['BoxPlan'];else boxPlan = this.uiInfo['E' + elemId]['BoxPlan'];
|
|
35982
|
+
for (var i = 0; i < boxPlan.length; i++) {
|
|
35983
|
+
if (!boxPlan[i].N || !boxPlan[i].x || !boxPlan[i].y) continue;
|
|
35984
|
+
switch (corner) {
|
|
35985
|
+
case 'TOPCENTER':
|
|
35986
|
+
if (boxPlan[i].N == 'TC') {
|
|
35987
|
+
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
35988
|
+
}
|
|
35989
|
+
break;
|
|
35990
|
+
case 'LEFTCENTER':
|
|
35991
|
+
if (boxPlan[i].N == 'LC') {
|
|
35992
|
+
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
35993
|
+
}
|
|
35994
|
+
break;
|
|
35995
|
+
case 'RIGHTCENTER':
|
|
35996
|
+
if (boxPlan[i].N == 'RC') {
|
|
35997
|
+
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
35998
|
+
}
|
|
35999
|
+
break;
|
|
36000
|
+
case 'RIGHTTOPFRONT':
|
|
36001
|
+
if (boxPlan[i].N == 'RTF') {
|
|
36002
|
+
return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
|
|
36003
|
+
}
|
|
36004
|
+
break;
|
|
36005
|
+
}
|
|
36006
|
+
}
|
|
36007
|
+
return undefined;
|
|
36008
|
+
}
|
|
36009
|
+
}, {
|
|
36010
|
+
key: "getUnityCamPos",
|
|
36011
|
+
value: function getUnityCamPos() {
|
|
36012
|
+
return new Vector3(parseFloat(this.uiInfo['CAM']['X']), parseFloat(this.uiInfo['CAM']['Y']), parseFloat(this.uiInfo['CAM']['Z']));
|
|
36013
|
+
}
|
|
36014
|
+
}, {
|
|
36015
|
+
key: "getUnityCamRot",
|
|
36016
|
+
value: function getUnityCamRot() {
|
|
36017
|
+
var quatVec = new Vector4(parseFloat(this.uiInfo['CAM']['QX']), parseFloat(this.uiInfo['CAM']['QY']), parseFloat(this.uiInfo['CAM']['QZ']), parseFloat(this.uiInfo['CAM']['QW']));
|
|
36018
|
+
return quatVec;
|
|
36019
|
+
}
|
|
36020
|
+
}, {
|
|
36021
|
+
key: "getUnityFOV",
|
|
36022
|
+
value: function getUnityFOV() {
|
|
36023
|
+
return parseFloat(this.uiInfo['CAM']['FOV']);
|
|
36024
|
+
}
|
|
36025
|
+
|
|
36026
|
+
//elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
|
|
36027
|
+
//It returns the distance of an element to the ground in cm
|
|
36028
|
+
}, {
|
|
36029
|
+
key: "getDistanceToGround",
|
|
36030
|
+
value: function getDistanceToGround(setId, elementId) {
|
|
36031
|
+
setId = this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined ? 'S1' : setId;
|
|
36032
|
+
if (this.uiInfo[setId] && this.uiInfo[setId]['E' + elementId] && this.uiInfo[setId]['E' + elementId]['DIM'] && this.uiInfo[setId]['E' + elementId]['DIM']['dfg']) {
|
|
36033
|
+
return this.uiInfo[setId]['E' + elementId]['DIM']['dfg'] * 100;
|
|
36034
|
+
}
|
|
36035
|
+
return -1;
|
|
36036
|
+
}
|
|
36037
|
+
}, {
|
|
36038
|
+
key: "addUIInfo",
|
|
36039
|
+
value: function addUIInfo(uiInfo) {
|
|
36040
|
+
try {
|
|
36041
|
+
this.uiInfo = JSON.parse(uiInfo);
|
|
36042
|
+
} catch (error) {
|
|
36043
|
+
LOG$5.error(new DivaUtils.DivaError('Error when parsing UI Info in rendering. Corrupt UIInfo: ' + uiInfo, {
|
|
36044
|
+
code: 'WC_0013',
|
|
36045
|
+
cause: error
|
|
36046
|
+
}));
|
|
36047
|
+
}
|
|
36048
|
+
}
|
|
36049
|
+
|
|
36050
|
+
/**
|
|
36051
|
+
* This function adds a blobImage to the rendering .
|
|
36052
|
+
* It is parsed to a base64 image.
|
|
36053
|
+
* @param blob The blob contains the image
|
|
36054
|
+
* @param isLayerMask True if the Image is the layer mask image
|
|
36055
|
+
*/
|
|
36056
|
+
}, {
|
|
36057
|
+
key: "addImgAsBlob",
|
|
36058
|
+
value: function addImgAsBlob(buffer, isLayerMask) {
|
|
36059
|
+
if (isLayerMask) this.layerMaskAsBase64 = buffer.toString('base64');else this.imgForSrc = 'data:image/jpeg;base64,' + buffer.toString('base64');
|
|
36060
|
+
}
|
|
36061
|
+
}, {
|
|
36062
|
+
key: "getImageForSrc",
|
|
36063
|
+
value: function getImageForSrc() {
|
|
36064
|
+
return this.imgForSrc;
|
|
36065
|
+
}
|
|
36066
|
+
|
|
36067
|
+
//*****************************************GETTER und SETTER********************************************** */
|
|
36068
|
+
}, {
|
|
36069
|
+
key: "CatalogCodex",
|
|
36070
|
+
get: function get() {
|
|
36071
|
+
return this.catalogData.catalogCodex;
|
|
36072
|
+
},
|
|
36073
|
+
set: function set(val) {
|
|
36074
|
+
this.catalogData.catalogCodex = val;
|
|
36075
|
+
}
|
|
36076
|
+
}, {
|
|
36077
|
+
key: "CatalogGUID",
|
|
36078
|
+
get: function get() {
|
|
36079
|
+
return this.catalogData.catalogGUID;
|
|
36080
|
+
},
|
|
36081
|
+
set: function set(val) {
|
|
36082
|
+
this.catalogData.catalogGUID = val;
|
|
36083
|
+
}
|
|
36084
|
+
}, {
|
|
36085
|
+
key: "PlanningHash",
|
|
36086
|
+
get: function get() {
|
|
36087
|
+
return this.planningHash;
|
|
36088
|
+
}
|
|
36089
|
+
}, {
|
|
36090
|
+
key: "RenderHash",
|
|
36091
|
+
get: function get() {
|
|
36092
|
+
return this.renderHash;
|
|
36093
|
+
}
|
|
36094
|
+
}, {
|
|
36095
|
+
key: "UrlToSavedRendering",
|
|
36096
|
+
get: function get() {
|
|
36097
|
+
return this.urlToSavedRendering;
|
|
36098
|
+
},
|
|
36099
|
+
set: function set(url) {
|
|
36100
|
+
this.urlToSavedRendering = url;
|
|
36101
|
+
}
|
|
36102
|
+
}, {
|
|
36103
|
+
key: "HasLayerMask",
|
|
36104
|
+
get: function get() {
|
|
36105
|
+
return this.hasLayerMask;
|
|
36106
|
+
},
|
|
36107
|
+
set: function set(hasLayerMask) {
|
|
36108
|
+
this.hasLayerMask = hasLayerMask;
|
|
36109
|
+
}
|
|
36110
|
+
}, {
|
|
36111
|
+
key: "RenderWidth",
|
|
36112
|
+
get: function get() {
|
|
36113
|
+
return this.renderWidth;
|
|
36114
|
+
}
|
|
36115
|
+
}, {
|
|
36116
|
+
key: "RenderHeight",
|
|
36117
|
+
get: function get() {
|
|
36118
|
+
return this.renderHeight;
|
|
36119
|
+
}
|
|
36120
|
+
}, {
|
|
36121
|
+
key: "getHasLayerMask",
|
|
36122
|
+
value: function getHasLayerMask() {
|
|
36123
|
+
return this.hasLayerMask;
|
|
36124
|
+
}
|
|
36125
|
+
}, {
|
|
36126
|
+
key: "getLayerMaskForSrc",
|
|
36127
|
+
value: function getLayerMaskForSrc() {
|
|
36128
|
+
return this.layerMaskAsBase64;
|
|
36129
|
+
}
|
|
36130
|
+
}, {
|
|
36131
|
+
key: "HasLayerMaskThreeTexture",
|
|
36132
|
+
get: function get() {
|
|
36133
|
+
return this.layerMaskThreeTexture != undefined;
|
|
36134
|
+
}
|
|
36135
|
+
}, {
|
|
36136
|
+
key: "LayerMaskThreeTexture",
|
|
36137
|
+
get: function get() {
|
|
36138
|
+
return this.layerMaskThreeTexture;
|
|
36139
|
+
},
|
|
36140
|
+
set: function set(tex) {
|
|
36141
|
+
this.layerMaskThreeTexture = tex;
|
|
36142
|
+
}
|
|
36143
|
+
}, {
|
|
36144
|
+
key: "AllImgLoaded",
|
|
36145
|
+
get: function get() {
|
|
36146
|
+
return this.imgForSrc != '' && (!this.hasLayerMask || this.layerMaskAsBase64 != '');
|
|
36147
|
+
}
|
|
36148
|
+
}, {
|
|
36149
|
+
key: "UiInfoLoaded",
|
|
36150
|
+
get: function get() {
|
|
36151
|
+
return this.uiInfo != '';
|
|
36152
|
+
}
|
|
36153
|
+
}, {
|
|
36154
|
+
key: "CreationTime",
|
|
36155
|
+
get: function get() {
|
|
36156
|
+
return this.creationTime.getTime();
|
|
36157
|
+
}
|
|
36158
|
+
}, {
|
|
36159
|
+
key: "MediaServiceSaveMode",
|
|
36160
|
+
get: function get() {
|
|
36161
|
+
return this.mediaServiceSaveMode;
|
|
36162
|
+
},
|
|
36163
|
+
set: function set(mode) {
|
|
36164
|
+
this.mediaServiceSaveMode = mode;
|
|
36165
|
+
}
|
|
36633
36166
|
}]);
|
|
36634
36167
|
}();
|
|
36635
|
-
var mediaServiceHandler = new DivaMediaServiceHandler();
|
|
36636
36168
|
|
|
36637
36169
|
var RenderSettings = /*#__PURE__*/function () {
|
|
36638
36170
|
function RenderSettings() {
|
|
@@ -36653,9 +36185,6 @@ var RenderSettings = /*#__PURE__*/function () {
|
|
|
36653
36185
|
_defineProperty__default["default"](this, "applicationName", void 0);
|
|
36654
36186
|
_defineProperty__default["default"](this, "divaMediaServiceUrl", void 0);
|
|
36655
36187
|
_defineProperty__default["default"](this, "renderGroup", void 0);
|
|
36656
|
-
_defineProperty__default["default"](this, "useSirvViewer", void 0);
|
|
36657
|
-
_defineProperty__default["default"](this, "useMediaServiceImageCache", void 0);
|
|
36658
|
-
_defineProperty__default["default"](this, "suppressCacheCreation", void 0);
|
|
36659
36188
|
this.organizationId = '';
|
|
36660
36189
|
this.diva3DServerURL = '';
|
|
36661
36190
|
this.userID = '';
|
|
@@ -36664,9 +36193,6 @@ var RenderSettings = /*#__PURE__*/function () {
|
|
|
36664
36193
|
this.applicationName = '';
|
|
36665
36194
|
this.divaMediaServiceUrl = '';
|
|
36666
36195
|
this.renderGroup = '';
|
|
36667
|
-
this.useSirvViewer = false;
|
|
36668
|
-
this.useMediaServiceImageCache = false;
|
|
36669
|
-
this.suppressCacheCreation = false;
|
|
36670
36196
|
}
|
|
36671
36197
|
return _createClass__default["default"](RenderSettings, [{
|
|
36672
36198
|
key: "OrganizationId",
|
|
@@ -36732,30 +36258,6 @@ var RenderSettings = /*#__PURE__*/function () {
|
|
|
36732
36258
|
set: function set(group) {
|
|
36733
36259
|
this.renderGroup = group;
|
|
36734
36260
|
}
|
|
36735
|
-
}, {
|
|
36736
|
-
key: "UseSirvViewer",
|
|
36737
|
-
get: function get() {
|
|
36738
|
-
return this.useSirvViewer;
|
|
36739
|
-
},
|
|
36740
|
-
set: function set(viewer) {
|
|
36741
|
-
this.useSirvViewer = viewer;
|
|
36742
|
-
}
|
|
36743
|
-
}, {
|
|
36744
|
-
key: "UseMediaServiceImageCache",
|
|
36745
|
-
get: function get() {
|
|
36746
|
-
return this.useMediaServiceImageCache;
|
|
36747
|
-
},
|
|
36748
|
-
set: function set(cache) {
|
|
36749
|
-
this.useMediaServiceImageCache = cache;
|
|
36750
|
-
}
|
|
36751
|
-
}, {
|
|
36752
|
-
key: "SuppressCacheCreation",
|
|
36753
|
-
get: function get() {
|
|
36754
|
-
return this.suppressCacheCreation;
|
|
36755
|
-
},
|
|
36756
|
-
set: function set(cache) {
|
|
36757
|
-
this.suppressCacheCreation = cache;
|
|
36758
|
-
}
|
|
36759
36261
|
}]);
|
|
36760
36262
|
}();
|
|
36761
36263
|
/*
|
|
@@ -36804,7 +36306,7 @@ function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
36804
36306
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
36805
36307
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
36806
36308
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
36807
|
-
var LOG$
|
|
36309
|
+
var LOG$4 = DivaUtils__default["default"].initLog('Planner', 'PLANNER-HANDLER-3D');
|
|
36808
36310
|
var PlannerHandler3D = /*#__PURE__*/function () {
|
|
36809
36311
|
//-------------------------------------------------Initialization---------------------------------------------------------------
|
|
36810
36312
|
|
|
@@ -36922,12 +36424,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36922
36424
|
};
|
|
36923
36425
|
}
|
|
36924
36426
|
return _createClass__default["default"](PlannerHandler3D, [{
|
|
36925
|
-
key: "doUseRealtimeRendering",
|
|
36926
|
-
value: function doUseRealtimeRendering() {
|
|
36927
|
-
if (this.renderSettings.SuppressCacheCreation && this.renderSettings.UseMediaServiceImageCache) return false;
|
|
36928
|
-
return true;
|
|
36929
|
-
}
|
|
36930
|
-
}, {
|
|
36931
36427
|
key: "setJwt",
|
|
36932
36428
|
value: function setJwt(jwt) {
|
|
36933
36429
|
this.jwt = jwt;
|
|
@@ -37047,9 +36543,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37047
36543
|
}
|
|
37048
36544
|
this.renderSettings.DivaMediaServiceUrl = params.divaMediaServiceUrl;
|
|
37049
36545
|
this.renderSettings.OrganizationId = params.organizationId;
|
|
37050
|
-
this.renderSettings.UseSirvViewer = params.useSirvViewer;
|
|
37051
|
-
this.renderSettings.UseMediaServiceImageCache = params.useMediaServiceImageCache;
|
|
37052
|
-
this.renderSettings.SuppressCacheCreation = params.suppressCacheCreation;
|
|
37053
36546
|
this.liveArViewerUrl = params.arViewerUrl;
|
|
37054
36547
|
return result;
|
|
37055
36548
|
}
|
|
@@ -37062,21 +36555,16 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37062
36555
|
return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context3) {
|
|
37063
36556
|
while (1) switch (_context3.prev = _context3.next) {
|
|
37064
36557
|
case 0:
|
|
37065
|
-
|
|
37066
|
-
|
|
37067
|
-
|
|
37068
|
-
}
|
|
37069
|
-
_context3.next = 3;
|
|
37070
|
-
return Promise.resolve().then(function () { return require('./Host3DSignalR-e4ca360e.js'); });
|
|
37071
|
-
case 3:
|
|
36558
|
+
_context3.next = 2;
|
|
36559
|
+
return Promise.resolve().then(function () { return require('./Host3DSignalR-59436bad.js'); });
|
|
36560
|
+
case 2:
|
|
37072
36561
|
_yield$import = _context3.sent;
|
|
37073
36562
|
Host3DSignalR = _yield$import["default"];
|
|
37074
36563
|
this.connectionHandler = new Host3DSignalR(this.renderSettings, this);
|
|
37075
|
-
LOG$
|
|
37076
|
-
|
|
37077
|
-
_context3.next = 9;
|
|
36564
|
+
LOG$4.debug('initializeConnection to Host3DSignalR');
|
|
36565
|
+
_context3.next = 8;
|
|
37078
36566
|
return (_this$connectionHandl2 = this.connectionHandler) === null || _this$connectionHandl2 === void 0 ? void 0 : _this$connectionHandl2.initializeConnection();
|
|
37079
|
-
case
|
|
36567
|
+
case 8:
|
|
37080
36568
|
case "end":
|
|
37081
36569
|
return _context3.stop();
|
|
37082
36570
|
}
|
|
@@ -37139,7 +36627,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37139
36627
|
value: function onConnectedToDivaNr(status) {
|
|
37140
36628
|
//Check if request3D has to be called againe
|
|
37141
36629
|
if (status != 'SUCCESSFULL' || !this.todoAfterLogin.request3D.doRequest3D) return;
|
|
37142
|
-
LOG$
|
|
36630
|
+
LOG$4.debug('Return Login - joind successfully but during loggin, a render or hqRenderScript Request was made. Remake it now');
|
|
37143
36631
|
this.todoAfterLogin.request3D.doRequest3D = false;
|
|
37144
36632
|
this.request3D(this.todoAfterLogin.request3D.params);
|
|
37145
36633
|
this.todoAfterLogin.request3D.params = undefined;
|
|
@@ -37193,36 +36681,36 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37193
36681
|
* @param buffer
|
|
37194
36682
|
*/
|
|
37195
36683
|
function handleReceiveRendering(params) {
|
|
37196
|
-
LOG$
|
|
36684
|
+
LOG$4.debug('handleReceiveRendering ' + params.hash + '; SameMode: ' + params.saveMode);
|
|
37197
36685
|
var isLayerMask = params.hash.endsWith('_m') ? true : false;
|
|
37198
36686
|
params.hash = isLayerMask ? params.hash.substring(0, params.hash.length - 2) : params.hash;
|
|
37199
36687
|
var cachedRendering = this.getRenderingFromCache(params.hash);
|
|
37200
36688
|
var waitedRendering = this.getWaitForRendering(params.hash);
|
|
37201
36689
|
if (!cachedRendering && !waitedRendering) {
|
|
37202
|
-
LOG$
|
|
36690
|
+
LOG$4.error(new DivaUtils.DivaError('Error when handling receive Rendering. Not waiting for new Rendering but also not in cache ' + params.hash + '; saveMode: ' + params.saveMode));
|
|
37203
36691
|
return;
|
|
37204
36692
|
}
|
|
37205
36693
|
if (waitedRendering) {
|
|
37206
|
-
LOG$
|
|
36694
|
+
LOG$4.debug('handleReceiveRendering ' + params.hash + '; Found in waitForRenderings');
|
|
37207
36695
|
//If the last requested rendering was in another saving mode than the received rendering - do nothing and wait for the correct rendering
|
|
37208
36696
|
if ((waitedRendering === null || waitedRendering === void 0 ? void 0 : waitedRendering.MediaServiceSaveMode) == 'PERMANENT' && params.saveMode != '1' || (waitedRendering === null || waitedRendering === void 0 ? void 0 : waitedRendering.MediaServiceSaveMode) == 'STREAM' && params.saveMode != '0') {
|
|
37209
|
-
LOG$
|
|
36697
|
+
LOG$4.debug('Rendering with wrong savemode arrived. Wait for correct rendering');
|
|
37210
36698
|
return;
|
|
37211
36699
|
}
|
|
37212
36700
|
if (params.url && waitedRendering.MediaServiceSaveMode == 'PERMANENT') {
|
|
37213
36701
|
waitedRendering.UrlToSavedRendering = params.url;
|
|
37214
|
-
LOG$
|
|
36702
|
+
LOG$4.debug('handleReceiveRendering Set lastSavedRendering URL ' + params.url);
|
|
37215
36703
|
}
|
|
37216
|
-
|
|
36704
|
+
waitedRendering.addImgAsBlob(Buffer.from(params.buffer), isLayerMask);
|
|
37217
36705
|
|
|
37218
36706
|
//Do not display the rendering if it was saved in real Time mode withough cache - it was only saved when entering the Zusammenfassung for saving it later in the Basket
|
|
37219
36707
|
|
|
37220
|
-
if (
|
|
36708
|
+
if (waitedRendering.MediaServiceSaveMode == 'STREAM' && this.checkRenderingReady(params.hash, waitedRendering)) this.updatePlannerRendering(waitedRendering);
|
|
37221
36709
|
return;
|
|
37222
36710
|
}
|
|
37223
36711
|
if (params.url) {
|
|
37224
36712
|
//If several renderings of the same hash are requested contemoranely (first Stream then TEMP). Then save the tempURL in the rendering
|
|
37225
|
-
LOG$
|
|
36713
|
+
LOG$4.debug('handleReceiveRendering load from cache');
|
|
37226
36714
|
cachedRendering.UrlToSavedRendering = params.url;
|
|
37227
36715
|
}
|
|
37228
36716
|
}
|
|
@@ -37253,10 +36741,10 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37253
36741
|
}, {
|
|
37254
36742
|
key: "checkRenderingReady",
|
|
37255
36743
|
value: function checkRenderingReady(hash, rendering) {
|
|
37256
|
-
if (!rendering.AllImgLoaded || !rendering.UiInfoLoaded
|
|
36744
|
+
if (!rendering.AllImgLoaded || !rendering.UiInfoLoaded) return false;
|
|
37257
36745
|
this.waitForRenderings["delete"](hash);
|
|
37258
36746
|
this.renderCache.set(hash, rendering);
|
|
37259
|
-
LOG$
|
|
36747
|
+
LOG$4.debug('Send to view. CurrentHash: ' + hash + '; lastRequestedHash: ' + this.lastRequestedRenderHash);
|
|
37260
36748
|
return true;
|
|
37261
36749
|
}
|
|
37262
36750
|
/**
|
|
@@ -37271,7 +36759,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37271
36759
|
this.waitForRenderings["delete"](hash);
|
|
37272
36760
|
return false;
|
|
37273
36761
|
}
|
|
37274
|
-
LOG$
|
|
36762
|
+
LOG$4.debug('Wait for rendering - The same rendering was asked not 4 seconds ago. !', 'PlannerHandler3D checkWaitForImage');
|
|
37275
36763
|
return true;
|
|
37276
36764
|
}
|
|
37277
36765
|
}, {
|
|
@@ -37283,7 +36771,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37283
36771
|
this.waitForHQRenderScript["delete"](hash);
|
|
37284
36772
|
return false;
|
|
37285
36773
|
}
|
|
37286
|
-
LOG$
|
|
36774
|
+
LOG$4.debug('Wait for rendering - The same rendering was asked not 4 seconds ago. !', 'PlannerHandler3D checkWaitForImage');
|
|
37287
36775
|
return true;
|
|
37288
36776
|
}
|
|
37289
36777
|
|
|
@@ -37305,10 +36793,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37305
36793
|
result.renderHeight = curRoomListVP.backgroundImg_Height;
|
|
37306
36794
|
result.renderHeight = result.renderHeight * 1.3;
|
|
37307
36795
|
result.renderWidth = result.renderWidth * 1.3;
|
|
37308
|
-
} else if (this.renderSettings.UseMediaServiceImageCache) {
|
|
37309
|
-
//Force the size of the rendering to be a standard size
|
|
37310
|
-
result.renderWidth = this.renderSettings.CACHE_16_9_RENDER_WIDTH;
|
|
37311
|
-
result.renderHeight = this.renderSettings.CACHE_16_9_RENDER_HEIGHT;
|
|
37312
36796
|
} else if (mediaServiceSaveMode == 'PERMANENT') {
|
|
37313
36797
|
//SAVE with correct Resolution
|
|
37314
36798
|
result.renderWidth = this.renderSettings.SAVE_16_9_RENDER_WIDTH;
|
|
@@ -37352,7 +36836,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37352
36836
|
return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context5) {
|
|
37353
36837
|
while (1) switch (_context5.prev = _context5.next) {
|
|
37354
36838
|
case 0:
|
|
37355
|
-
LOG$
|
|
36839
|
+
LOG$4.debug('getLastSavedRendering ' + ((_this$lastSavedRender = this.lastSavedRendering) === null || _this$lastSavedRender === void 0 ? void 0 : _this$lastSavedRender.UrlToSavedRendering));
|
|
37356
36840
|
if (!(this.lastSavedRendering == undefined)) {
|
|
37357
36841
|
_context5.next = 3;
|
|
37358
36842
|
break;
|
|
@@ -37367,7 +36851,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37367
36851
|
_context5.next = 12;
|
|
37368
36852
|
break;
|
|
37369
36853
|
}
|
|
37370
|
-
LOG$
|
|
36854
|
+
LOG$4.debug('getLAstSavedRendering - wait here');
|
|
37371
36855
|
_context5.next = 8;
|
|
37372
36856
|
return this.delay(100);
|
|
37373
36857
|
case 8:
|
|
@@ -37521,20 +37005,20 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37521
37005
|
value: (function () {
|
|
37522
37006
|
var _request3D = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(params) {
|
|
37523
37007
|
var _params$renderRequest, _params$renderRequest2, _params$renderRequest3, _params$renderRequest4, _params$renderRequest5, _params$renderRequest6, _this$viewPointHandle;
|
|
37524
|
-
var room, newRenderSize, doReloadWholePlanning, planningHash, requestRenderingFrom3DHost, requestHqRenderScriptFrom3DHost, rendering, renderHash, viewPointName, functionType, _params$camera, sizeInfo,
|
|
37008
|
+
var room, newRenderSize, doReloadWholePlanning, planningHash, requestRenderingFrom3DHost, requestHqRenderScriptFrom3DHost, rendering, renderHash, viewPointName, functionType, _params$camera, sizeInfo, _rendering, fullscreenRendering, renderingInCacheFound, _this$connectionHandl6, _plannerMeasureDigits, _params$camera2, _params$camera3, returnRequest;
|
|
37525
37009
|
return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context7) {
|
|
37526
37010
|
while (1) switch (_context7.prev = _context7.next) {
|
|
37527
37011
|
case 0:
|
|
37528
|
-
if (!(this.
|
|
37012
|
+
if (!(this.connectionHandler && (!this.connectionHandler.getConnectionReady() || !this.connectionHandler.getSuccessfullyJoinedToDivaNr()))) {
|
|
37529
37013
|
_context7.next = 5;
|
|
37530
37014
|
break;
|
|
37531
37015
|
}
|
|
37532
|
-
LOG$
|
|
37016
|
+
LOG$4.debug('RequestRendering - but connection Not Ready');
|
|
37533
37017
|
this.todoAfterLogin.request3D.params = params;
|
|
37534
37018
|
this.todoAfterLogin.request3D.doRequest3D = true;
|
|
37535
37019
|
return _context7.abrupt("return");
|
|
37536
37020
|
case 5:
|
|
37537
|
-
LOG$
|
|
37021
|
+
LOG$4.debug('Request New 3D rendering: ' + (params === null || params === void 0 ? void 0 : params.doRequestRendering) + ', hqRenderScript: ' + (params === null || params === void 0 ? void 0 : params.doRequestHqRenderScript), 'PlannerHandler3D');
|
|
37538
37022
|
room = this.viewPointHandler.getCurRoomCodex();
|
|
37539
37023
|
newRenderSize = this.setRoomInfoInPlanningData(params.planningData, (_params$renderRequest = (_params$renderRequest2 = params.renderRequestInfos) === null || _params$renderRequest2 === void 0 ? void 0 : _params$renderRequest2.width) !== null && _params$renderRequest !== void 0 ? _params$renderRequest : 500, (_params$renderRequest3 = (_params$renderRequest4 = params.renderRequestInfos) === null || _params$renderRequest4 === void 0 ? void 0 : _params$renderRequest4.height) !== null && _params$renderRequest3 !== void 0 ? _params$renderRequest3 : 500, (_params$renderRequest5 = (_params$renderRequest6 = params.renderRequestInfos) === null || _params$renderRequest6 === void 0 ? void 0 : _params$renderRequest6.mediaServiceSaveMode) !== null && _params$renderRequest5 !== void 0 ? _params$renderRequest5 : undefined);
|
|
37540
37024
|
doReloadWholePlanning = true;
|
|
@@ -37553,103 +37037,63 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37553
37037
|
this.lastFramePlanningHash = planningHash;
|
|
37554
37038
|
requestRenderingFrom3DHost = false;
|
|
37555
37039
|
requestHqRenderScriptFrom3DHost = false;
|
|
37556
|
-
if (
|
|
37557
|
-
|
|
37558
|
-
|
|
37559
|
-
|
|
37560
|
-
|
|
37561
|
-
|
|
37562
|
-
|
|
37563
|
-
|
|
37564
|
-
|
|
37565
|
-
|
|
37566
|
-
|
|
37567
|
-
|
|
37568
|
-
|
|
37569
|
-
|
|
37570
|
-
|
|
37571
|
-
this.updatePlannerHqRenderScriptInView(rendering);
|
|
37572
|
-
this.sendARRenderScript(rendering);
|
|
37573
|
-
params.doRequestHqRenderScript = false;
|
|
37574
|
-
} else {
|
|
37575
|
-
if (!this.checkWaitForHQRenderScript(planningHash)) {
|
|
37576
|
-
requestHqRenderScriptFrom3DHost = true;
|
|
37577
|
-
this.waitForHQRenderScript.set(planningHash, new HQRenderScript('PLACEHOLDER'));
|
|
37578
|
-
//If a new HQRenderscript has to be loaded - always reload planning
|
|
37579
|
-
doReloadWholePlanning = true;
|
|
37040
|
+
if (params.doRequestHqRenderScript) {
|
|
37041
|
+
rendering = this.hqRenderScriptCache.get(planningHash);
|
|
37042
|
+
if (rendering) {
|
|
37043
|
+
LOG$4.debug('Get HQRenderScript from cache');
|
|
37044
|
+
this.lastSavedHQRenderScript = JSON.parse(rendering.HQRenderScript);
|
|
37045
|
+
this.updatePlannerHqRenderScriptInView(rendering);
|
|
37046
|
+
this.sendARRenderScript(rendering);
|
|
37047
|
+
params.doRequestHqRenderScript = false;
|
|
37048
|
+
} else {
|
|
37049
|
+
if (!this.checkWaitForHQRenderScript(planningHash)) {
|
|
37050
|
+
requestHqRenderScriptFrom3DHost = true;
|
|
37051
|
+
this.waitForHQRenderScript.set(planningHash, new HQRenderScript('PLACEHOLDER'));
|
|
37052
|
+
//If a new HQRenderscript has to be loaded - always reload planning
|
|
37053
|
+
doReloadWholePlanning = true;
|
|
37054
|
+
}
|
|
37580
37055
|
}
|
|
37581
37056
|
}
|
|
37582
|
-
case 23:
|
|
37583
37057
|
renderHash = '';
|
|
37584
37058
|
viewPointName = '';
|
|
37585
37059
|
functionType = 'P3D';
|
|
37586
|
-
if (
|
|
37587
|
-
|
|
37588
|
-
|
|
37589
|
-
|
|
37590
|
-
|
|
37591
|
-
|
|
37592
|
-
|
|
37593
|
-
|
|
37594
|
-
|
|
37595
|
-
|
|
37596
|
-
|
|
37597
|
-
|
|
37598
|
-
|
|
37599
|
-
|
|
37600
|
-
|
|
37601
|
-
|
|
37602
|
-
|
|
37603
|
-
|
|
37604
|
-
|
|
37605
|
-
|
|
37606
|
-
|
|
37607
|
-
|
|
37608
|
-
|
|
37609
|
-
|
|
37610
|
-
|
|
37611
|
-
}
|
|
37612
|
-
//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.
|
|
37613
|
-
//When the client then rotates - nothing changes in the hash - but the exe loads 2 elements.
|
|
37614
|
-
LOG$3.debug('Load Rendering from Cache with hash ' + renderHash, 'PlannerHandler3D');
|
|
37615
|
-
this.lastFramePlanningHash = '';
|
|
37616
|
-
_rendering = this.getRenderingFromCache(renderHash); //check if current rendering is fullscreenrendering
|
|
37617
|
-
if ((!params.renderRequestInfos.planner3DGridEnabled || _rendering !== null && _rendering !== void 0 && _rendering.getHasLayerMask()) && !this.onlyRunLogic) {
|
|
37618
|
-
if (params.renderRequestInfos.isFullscreenRendering != (_rendering === null || _rendering === void 0 ? void 0 : _rendering.getIsFullscreenRendering())) {
|
|
37619
|
-
fullscreenRendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'PERMANENT', undefined);
|
|
37620
|
-
fullscreenRendering.clone(_rendering);
|
|
37621
|
-
fullscreenRendering.setIsFullscreenRendering(params.renderRequestInfos.isFullscreenRendering);
|
|
37622
|
-
this.updatePlannerRendering(fullscreenRendering); //load the rendering as fullscreen image
|
|
37623
|
-
params.doRequestRendering = false;
|
|
37060
|
+
if (params.doRequestRendering) {
|
|
37061
|
+
viewPointName = this.viewPointHandler.getCurViewPointToRender();
|
|
37062
|
+
sizeInfo = params.renderRequestInfos.width + ':' + params.renderRequestInfos.height;
|
|
37063
|
+
renderHash = DivaUtils.md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify((_params$camera = params.camera) !== null && _params$camera !== void 0 ? _params$camera : this.latestCamera));
|
|
37064
|
+
this.lastRequestedRenderHash = renderHash;
|
|
37065
|
+
LOG$4.debug('Request New Rendering with hash ' + renderHash + '; and planningHash: ' + planningHash, 'PlannerHandler3D');
|
|
37066
|
+
if (this.checkIsRenderingCached(renderHash, params.renderRequestInfos.planner3DGridEnabled, params.renderRequestInfos.mediaServiceSaveMode)) {
|
|
37067
|
+
//If planning is laoded from cache - reset lastFramePlanningHash. It can happen that something changed in the planning (Delete element) and the Rendering with 1 element is loaded from cahche - the exe has still 2 elements.
|
|
37068
|
+
//When the client then rotates - nothing changes in the hash - but the exe loads 2 elements.
|
|
37069
|
+
LOG$4.debug('Load Rendering from Cache with hash ' + renderHash, 'PlannerHandler3D');
|
|
37070
|
+
this.lastFramePlanningHash = '';
|
|
37071
|
+
_rendering = this.getRenderingFromCache(renderHash); //check if current rendering is fullscreenrendering
|
|
37072
|
+
if ((!params.renderRequestInfos.planner3DGridEnabled || _rendering !== null && _rendering !== void 0 && _rendering.getHasLayerMask()) && !this.onlyRunLogic) {
|
|
37073
|
+
if (params.renderRequestInfos.isFullscreenRendering != (_rendering === null || _rendering === void 0 ? void 0 : _rendering.getIsFullscreenRendering())) {
|
|
37074
|
+
fullscreenRendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'PERMANENT', undefined);
|
|
37075
|
+
fullscreenRendering.clone(_rendering);
|
|
37076
|
+
fullscreenRendering.setIsFullscreenRendering(params.renderRequestInfos.isFullscreenRendering);
|
|
37077
|
+
this.updatePlannerRendering(fullscreenRendering); //load the rendering as fullscreen image
|
|
37078
|
+
params.doRequestRendering = false;
|
|
37079
|
+
} else {
|
|
37080
|
+
this.updatePlannerRendering(_rendering); //lade einfach
|
|
37081
|
+
params.doRequestRendering = false;
|
|
37082
|
+
LOG$4.debug('Do load rendering from cache with renderHash: ' + renderHash);
|
|
37083
|
+
}
|
|
37084
|
+
}
|
|
37624
37085
|
} else {
|
|
37625
|
-
|
|
37626
|
-
|
|
37627
|
-
|
|
37628
|
-
|
|
37629
|
-
|
|
37630
|
-
|
|
37631
|
-
|
|
37632
|
-
case 47:
|
|
37633
|
-
renderingInCacheFound = false;
|
|
37634
|
-
if (!(this.renderSettings.UseMediaServiceImageCache && this.viewPointHandler.getCurVPIsStart())) {
|
|
37635
|
-
_context7.next = 53;
|
|
37636
|
-
break;
|
|
37637
|
-
}
|
|
37638
|
-
_productHash = this.getProductHash(params.planningData);
|
|
37639
|
-
_context7.next = 52;
|
|
37640
|
-
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);
|
|
37641
|
-
case 52:
|
|
37642
|
-
renderingInCacheFound = _context7.sent;
|
|
37643
|
-
case 53:
|
|
37644
|
-
if (!this.renderSettings.UseMediaServiceImageCache || !renderingInCacheFound) {
|
|
37645
|
-
if (!this.checkWaitForImage(renderHash)) {
|
|
37646
|
-
requestRenderingFrom3DHost = true;
|
|
37647
|
-
this.waitForRenderings.set(renderHash, new Rendering('PLACEHOLDER', 'PLACEHOLDER', '', 0, 0, false, false, 0, false, false, 'STREAM'));
|
|
37086
|
+
renderingInCacheFound = false;
|
|
37087
|
+
if (!renderingInCacheFound) {
|
|
37088
|
+
if (!this.checkWaitForImage(renderHash)) {
|
|
37089
|
+
requestRenderingFrom3DHost = true;
|
|
37090
|
+
this.waitForRenderings.set(renderHash, new Rendering('PLACEHOLDER', 'PLACEHOLDER', '', 0, 0, false, false, 0, false, false, 'STREAM'));
|
|
37091
|
+
}
|
|
37092
|
+
}
|
|
37648
37093
|
}
|
|
37649
37094
|
}
|
|
37650
|
-
case 54:
|
|
37651
37095
|
if (!(requestHqRenderScriptFrom3DHost || requestRenderingFrom3DHost)) {
|
|
37652
|
-
_context7.next =
|
|
37096
|
+
_context7.next = 31;
|
|
37653
37097
|
break;
|
|
37654
37098
|
}
|
|
37655
37099
|
if (params.catalogData.lang) params.planningData.SCE.Lang = params.catalogData.lang;
|
|
@@ -37667,7 +37111,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37667
37111
|
height: params.renderRequestInfos.height,
|
|
37668
37112
|
isFullscreenRendering: params.renderRequestInfos.isFullscreenRendering,
|
|
37669
37113
|
hasDimensionLines: params.renderRequestInfos.doShow3DDimensionLines,
|
|
37670
|
-
plannerMeasureDigits: (
|
|
37114
|
+
plannerMeasureDigits: (_plannerMeasureDigits = params.renderRequestInfos.plannerMeasureDigits) !== null && _plannerMeasureDigits !== void 0 ? _plannerMeasureDigits : 0,
|
|
37671
37115
|
planner3DGridEnabled: params.renderRequestInfos.planner3DGridEnabled,
|
|
37672
37116
|
mediaServiceSaveMode: params.renderRequestInfos.mediaServiceSaveMode,
|
|
37673
37117
|
functionType: functionType,
|
|
@@ -37682,14 +37126,14 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37682
37126
|
});
|
|
37683
37127
|
if (params.camera) this.latestCamera = params.camera;
|
|
37684
37128
|
if (!(returnRequest === undefined || requestHqRenderScriptFrom3DHost && returnRequest.hqRenderScript == undefined || requestRenderingFrom3DHost && returnRequest.rendering == undefined)) {
|
|
37685
|
-
_context7.next =
|
|
37129
|
+
_context7.next = 29;
|
|
37686
37130
|
break;
|
|
37687
37131
|
}
|
|
37688
|
-
LOG$
|
|
37132
|
+
LOG$4.error(new DivaUtils.DivaError('Error requesting the 3D from host. RequestHqRenderScript: ' + requestHqRenderScriptFrom3DHost + '; RequestRendering: ' + requestRenderingFrom3DHost, {
|
|
37689
37133
|
code: 'WC_0013'
|
|
37690
37134
|
}));
|
|
37691
37135
|
return _context7.abrupt("return");
|
|
37692
|
-
case
|
|
37136
|
+
case 29:
|
|
37693
37137
|
if (requestHqRenderScriptFrom3DHost) {
|
|
37694
37138
|
if (this.waitForHQRenderScript.has(planningHash)) this.waitForHQRenderScript["delete"](planningHash);
|
|
37695
37139
|
this.waitForHQRenderScript.set(planningHash, returnRequest.hqRenderScript);
|
|
@@ -37701,7 +37145,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37701
37145
|
if (returnRequest.rendering.getIsAlternateRendering()) this.addAlternateRenderingToSavedAlternateRenderings(returnRequest.rendering);else this.lastSavedRendering = returnRequest.rendering;
|
|
37702
37146
|
}
|
|
37703
37147
|
}
|
|
37704
|
-
case
|
|
37148
|
+
case 31:
|
|
37705
37149
|
case "end":
|
|
37706
37150
|
return _context7.stop();
|
|
37707
37151
|
}
|
|
@@ -37754,70 +37198,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37754
37198
|
});
|
|
37755
37199
|
if (index === -1) this.lastSavedAlternateRenderings.push(rendering);else this.lastSavedAlternateRenderings[index] = rendering;
|
|
37756
37200
|
}
|
|
37757
|
-
|
|
37758
|
-
/**
|
|
37759
|
-
* This function handles to load a rendering from the cache
|
|
37760
|
-
* @param hash
|
|
37761
|
-
* @param viewPointName
|
|
37762
|
-
* @param width
|
|
37763
|
-
* @param height
|
|
37764
|
-
* @param isFullscreenRendering
|
|
37765
|
-
*
|
|
37766
|
-
* @returns true, if the rendering was found in the cache
|
|
37767
|
-
*/
|
|
37768
|
-
}, {
|
|
37769
|
-
key: "requestRenderingCache",
|
|
37770
|
-
value: (function () {
|
|
37771
|
-
var _requestRenderingCache = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(planningHash, renderHash, productHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, catalogData, alternateRenderingsExist, alternateRendererInfo) {
|
|
37772
|
-
var renderingInCacheFound, rendering, promises, _yield$Promise$all, _yield$Promise$all2, urlRenderingCache, urlARCache, doUpdateRendering;
|
|
37773
|
-
return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
|
|
37774
|
-
while (1) switch (_context8.prev = _context8.next) {
|
|
37775
|
-
case 0:
|
|
37776
|
-
renderingInCacheFound = false;
|
|
37777
|
-
if (this.waitForRenderings.has(renderHash)) {
|
|
37778
|
-
_context8.next = 12;
|
|
37779
|
-
break;
|
|
37780
|
-
}
|
|
37781
|
-
rendering = new Rendering(planningHash, renderHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, false, false, 'PERMANENT', alternateRenderingsExist, alternateRendererInfo);
|
|
37782
|
-
this.waitForRenderings.set(renderHash, rendering);
|
|
37783
|
-
//Try load image from cache
|
|
37784
|
-
promises = [mediaServiceHandler.loadRenderingFromCache(renderHash), mediaServiceHandler.loadRenderingFromCache(productHash, false)];
|
|
37785
|
-
_context8.next = 7;
|
|
37786
|
-
return Promise.all(promises);
|
|
37787
|
-
case 7:
|
|
37788
|
-
_yield$Promise$all = _context8.sent;
|
|
37789
|
-
_yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 2);
|
|
37790
|
-
urlRenderingCache = _yield$Promise$all2[0];
|
|
37791
|
-
urlARCache = _yield$Promise$all2[1];
|
|
37792
|
-
if (urlRenderingCache || urlARCache) {
|
|
37793
|
-
renderingInCacheFound = true;
|
|
37794
|
-
if (urlRenderingCache) {
|
|
37795
|
-
rendering.setHQRenderingUrl(urlRenderingCache, this.renderSettings.UseSirvViewer);
|
|
37796
|
-
rendering.UrlToSavedRendering = rendering.getHQRenderingURL();
|
|
37797
|
-
}
|
|
37798
|
-
if (urlARCache) rendering.setArUrl(urlARCache);
|
|
37799
|
-
rendering.IsLoadedFromCache = true;
|
|
37800
|
-
rendering.CatalogCodex = catalogData.catalogCodex;
|
|
37801
|
-
rendering.CatalogGUID = catalogData.catalogGUID;
|
|
37802
|
-
LOG$3.debug('The rendering is loaded from the MediaServiceCache: ' + urlRenderingCache);
|
|
37803
|
-
doUpdateRendering = this.checkRenderingReady(renderHash, rendering);
|
|
37804
|
-
if (doUpdateRendering) this.updatePlannerRendering(rendering);
|
|
37805
|
-
} else {
|
|
37806
|
-
this.waitForRenderings["delete"](renderHash);
|
|
37807
|
-
}
|
|
37808
|
-
case 12:
|
|
37809
|
-
return _context8.abrupt("return", renderingInCacheFound);
|
|
37810
|
-
case 13:
|
|
37811
|
-
case "end":
|
|
37812
|
-
return _context8.stop();
|
|
37813
|
-
}
|
|
37814
|
-
}, _callee8, this);
|
|
37815
|
-
}));
|
|
37816
|
-
function requestRenderingCache(_x6, _x7, _x8, _x9, _x10, _x11, _x12, _x13, _x14, _x15, _x16, _x17) {
|
|
37817
|
-
return _requestRenderingCache.apply(this, arguments);
|
|
37818
|
-
}
|
|
37819
|
-
return requestRenderingCache;
|
|
37820
|
-
}())
|
|
37821
37201
|
}, {
|
|
37822
37202
|
key: "handleStaticVP",
|
|
37823
37203
|
value: function handleStaticVP(vpCodex) {
|
|
@@ -37921,20 +37301,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37921
37301
|
value: function getStaticRoomListItems() {
|
|
37922
37302
|
return this.viewPointHandler.getStaticRoomList();
|
|
37923
37303
|
}
|
|
37924
|
-
|
|
37925
|
-
/**
|
|
37926
|
-
* Clears the whole renderCache and sets the current rendering and the lastSavedRendering to undefined
|
|
37927
|
-
*/
|
|
37928
|
-
}, {
|
|
37929
|
-
key: "clearRenderCache",
|
|
37930
|
-
value: function clearRenderCache() {
|
|
37931
|
-
LOG$3.debug('PlannerHandler3D clearRenderCache');
|
|
37932
|
-
this.renderCache.clear();
|
|
37933
|
-
this.currRendering = undefined;
|
|
37934
|
-
this.lastSavedRendering = undefined;
|
|
37935
|
-
this.lastSavedAlternateRenderings = undefined;
|
|
37936
|
-
this.hqRenderScriptCache.clear();
|
|
37937
|
-
}
|
|
37938
37304
|
}, {
|
|
37939
37305
|
key: "clearCurrentRendering",
|
|
37940
37306
|
value: function clearCurrentRendering() {
|
|
@@ -37963,11 +37329,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37963
37329
|
value: function checkIsWaitingForHQRenderScript() {
|
|
37964
37330
|
return this.waitForHQRenderScript.size > 0;
|
|
37965
37331
|
}
|
|
37966
|
-
}, {
|
|
37967
|
-
key: "getUseMediaServiceImageCache",
|
|
37968
|
-
value: function getUseMediaServiceImageCache() {
|
|
37969
|
-
return this.renderSettings.UseMediaServiceImageCache;
|
|
37970
|
-
}
|
|
37971
37332
|
}, {
|
|
37972
37333
|
key: "setOrigConfigurationCallback",
|
|
37973
37334
|
value: function setOrigConfigurationCallback(callback) {
|
|
@@ -37981,19 +37342,19 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37981
37342
|
}, {
|
|
37982
37343
|
key: "openARObserverConnection",
|
|
37983
37344
|
value: function () {
|
|
37984
|
-
var _openARObserverConnection = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
37345
|
+
var _openARObserverConnection = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9(handleNoHqrs) {
|
|
37985
37346
|
var _this2 = this;
|
|
37986
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
37987
|
-
while (1) switch (
|
|
37347
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context9) {
|
|
37348
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
37988
37349
|
case 0:
|
|
37989
|
-
return
|
|
37990
|
-
var _ref = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
37350
|
+
return _context9.abrupt("return", new Promise( /*#__PURE__*/function () {
|
|
37351
|
+
var _ref = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(resolve, reject) {
|
|
37991
37352
|
var socketUrl;
|
|
37992
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
37993
|
-
while (1) switch (
|
|
37353
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
|
|
37354
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
37994
37355
|
case 0:
|
|
37995
37356
|
if (_this2.liveArViewerUrl) {
|
|
37996
|
-
|
|
37357
|
+
_context8.next = 2;
|
|
37997
37358
|
break;
|
|
37998
37359
|
}
|
|
37999
37360
|
throw new Error('No Live AR Viewer URL set');
|
|
@@ -38009,26 +37370,26 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
38009
37370
|
}
|
|
38010
37371
|
});
|
|
38011
37372
|
_this2.liveArSocket.on('disconnect', function () {
|
|
38012
|
-
LOG$
|
|
37373
|
+
LOG$4.error(new DivaUtils.DivaError('AR Socket disconnected'));
|
|
38013
37374
|
});
|
|
38014
37375
|
_this2.liveArSocket.on('observer-joined', function () {
|
|
38015
37376
|
var _this2$liveArSocket;
|
|
38016
|
-
LOG$
|
|
37377
|
+
LOG$4.debug('AR Observer joined');
|
|
38017
37378
|
_this2.liveArClientsConnected = true;
|
|
38018
37379
|
var hqRenderScript = _this2.lastSavedHQRenderScript;
|
|
38019
37380
|
if (hqRenderScript) (_this2$liveArSocket = _this2.liveArSocket) === null || _this2$liveArSocket === void 0 || _this2$liveArSocket.emit('update', {
|
|
38020
37381
|
hqRenderScript: JSON.stringify(hqRenderScript)
|
|
38021
37382
|
});else {
|
|
38022
|
-
LOG$
|
|
37383
|
+
LOG$4.debug('No HQRenderScript found for observer-joined');
|
|
38023
37384
|
handleNoHqrs();
|
|
38024
37385
|
}
|
|
38025
37386
|
});
|
|
38026
37387
|
_this2.liveArSocket.on('observer-left', function () {
|
|
38027
|
-
LOG$
|
|
37388
|
+
LOG$4.debug('AR Observer left');
|
|
38028
37389
|
_this2.liveArClientsConnected = false;
|
|
38029
37390
|
});
|
|
38030
37391
|
_this2.liveArSocket.on('connected', function (data) {
|
|
38031
|
-
LOG$
|
|
37392
|
+
LOG$4.debug('AR Socket connected ' + data.connectionId);
|
|
38032
37393
|
_this2.liveArSocket.auth = _objectSpread$6(_objectSpread$6({}, _this2.liveArSocket.auth), {}, {
|
|
38033
37394
|
connectionId: data.connectionId
|
|
38034
37395
|
});
|
|
@@ -38042,21 +37403,21 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
38042
37403
|
}
|
|
38043
37404
|
case 3:
|
|
38044
37405
|
case "end":
|
|
38045
|
-
return
|
|
37406
|
+
return _context8.stop();
|
|
38046
37407
|
}
|
|
38047
|
-
},
|
|
37408
|
+
}, _callee8);
|
|
38048
37409
|
}));
|
|
38049
|
-
return function (
|
|
37410
|
+
return function (_x7, _x8) {
|
|
38050
37411
|
return _ref.apply(this, arguments);
|
|
38051
37412
|
};
|
|
38052
37413
|
}()));
|
|
38053
37414
|
case 1:
|
|
38054
37415
|
case "end":
|
|
38055
|
-
return
|
|
37416
|
+
return _context9.stop();
|
|
38056
37417
|
}
|
|
38057
|
-
},
|
|
37418
|
+
}, _callee9);
|
|
38058
37419
|
}));
|
|
38059
|
-
function openARObserverConnection(
|
|
37420
|
+
function openARObserverConnection(_x6) {
|
|
38060
37421
|
return _openARObserverConnection.apply(this, arguments);
|
|
38061
37422
|
}
|
|
38062
37423
|
return openARObserverConnection;
|
|
@@ -38066,10 +37427,10 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
38066
37427
|
value: function sendARRenderScript(hqRenderScript) {
|
|
38067
37428
|
var _this$liveArSocket;
|
|
38068
37429
|
if (!this.liveArClientsConnected) {
|
|
38069
|
-
LOG$
|
|
37430
|
+
LOG$4.debug('No AR Clients connected, dont send render script');
|
|
38070
37431
|
return;
|
|
38071
37432
|
}
|
|
38072
|
-
LOG$
|
|
37433
|
+
LOG$4.debug('Sending AR Render Script to clients');
|
|
38073
37434
|
(_this$liveArSocket = this.liveArSocket) === null || _this$liveArSocket === void 0 || _this$liveArSocket.emit('update', {
|
|
38074
37435
|
hqRenderScript: hqRenderScript.HQRenderScript
|
|
38075
37436
|
});
|
|
@@ -38077,6 +37438,131 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
38077
37438
|
}]);
|
|
38078
37439
|
}();
|
|
38079
37440
|
|
|
37441
|
+
var LOG$3 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
37442
|
+
var DivaMediaServiceHandler = /*#__PURE__*/function () {
|
|
37443
|
+
//-------------------------------------------------- INITIALIZATION--------------------------------------------------------------//
|
|
37444
|
+
|
|
37445
|
+
function DivaMediaServiceHandler() {
|
|
37446
|
+
_classCallCheck__default["default"](this, DivaMediaServiceHandler);
|
|
37447
|
+
_defineProperty__default["default"](this, "organizationId", void 0);
|
|
37448
|
+
_defineProperty__default["default"](this, "mediaServiceUrl", void 0);
|
|
37449
|
+
_defineProperty__default["default"](this, "mediaServiceApiKey", void 0);
|
|
37450
|
+
_defineProperty__default["default"](this, "jwt", void 0);
|
|
37451
|
+
_defineProperty__default["default"](this, "POST_saveTmp2PermanentPostfix", '/saveTmp2Permanent');
|
|
37452
|
+
_defineProperty__default["default"](this, "GET_MediaItemrefs", '/v1/mediaitems/refs?limit=20&skip=0&filter=');
|
|
37453
|
+
_defineProperty__default["default"](this, "POST_mediaItem", '/v1/mediaitems?ref=true');
|
|
37454
|
+
this.organizationId = '';
|
|
37455
|
+
this.mediaServiceUrl = '';
|
|
37456
|
+
this.mediaServiceApiKey = '';
|
|
37457
|
+
}
|
|
37458
|
+
return _createClass__default["default"](DivaMediaServiceHandler, [{
|
|
37459
|
+
key: "setOrganizationId",
|
|
37460
|
+
value: function setOrganizationId(organizationId) {
|
|
37461
|
+
this.organizationId = organizationId;
|
|
37462
|
+
}
|
|
37463
|
+
}, {
|
|
37464
|
+
key: "setMediaServiceUrl",
|
|
37465
|
+
value: function setMediaServiceUrl(mediaServiceUrl) {
|
|
37466
|
+
this.mediaServiceUrl = mediaServiceUrl;
|
|
37467
|
+
}
|
|
37468
|
+
}, {
|
|
37469
|
+
key: "setMediaServiceApiKey",
|
|
37470
|
+
value: function setMediaServiceApiKey(mediaServiceApiKey) {
|
|
37471
|
+
this.mediaServiceApiKey = mediaServiceApiKey;
|
|
37472
|
+
}
|
|
37473
|
+
}, {
|
|
37474
|
+
key: "setJwt",
|
|
37475
|
+
value: function setJwt(jwt) {
|
|
37476
|
+
this.jwt = jwt;
|
|
37477
|
+
}
|
|
37478
|
+
}, {
|
|
37479
|
+
key: "base64ToBlob",
|
|
37480
|
+
value: function base64ToBlob(base64String, hash) {
|
|
37481
|
+
DivaUtils__default["default"].startSpanOfApm('MediaServiceHandler base64ToBlob');
|
|
37482
|
+
if (base64String.startsWith('data:image/jpeg;base64,')) {
|
|
37483
|
+
base64String = base64String.replace('data:image/jpeg;base64,', '');
|
|
37484
|
+
}
|
|
37485
|
+
var binary_string = window.atob(base64String);
|
|
37486
|
+
var len = binary_string.length;
|
|
37487
|
+
var bytes = new Uint8Array(len);
|
|
37488
|
+
for (var i = 0; i < len; i++) {
|
|
37489
|
+
bytes[i] = binary_string.charCodeAt(i);
|
|
37490
|
+
}
|
|
37491
|
+
var blob = new File([bytes.buffer], hash + '.jpg', {
|
|
37492
|
+
type: 'image/jpeg'
|
|
37493
|
+
});
|
|
37494
|
+
DivaUtils__default["default"].endSpanOfApm('MediaServiceHandler base64ToBlob');
|
|
37495
|
+
return blob;
|
|
37496
|
+
}
|
|
37497
|
+
}, {
|
|
37498
|
+
key: "savePlanning2DPermanent",
|
|
37499
|
+
value: function () {
|
|
37500
|
+
var _savePlanning2DPermanent = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(hash, catalogCodex, catalogGUID, planning2DAsJPG) {
|
|
37501
|
+
var imageBlob, url, data, mediaItem, mediaItemRef, response, res;
|
|
37502
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
37503
|
+
while (1) switch (_context.prev = _context.next) {
|
|
37504
|
+
case 0:
|
|
37505
|
+
DivaUtils__default["default"].startSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
|
|
37506
|
+
imageBlob = this.base64ToBlob(planning2DAsJPG, hash);
|
|
37507
|
+
url = this.mediaServiceUrl + this.POST_mediaItem; //push media item return url
|
|
37508
|
+
//create media item ref and set same paramters
|
|
37509
|
+
data = new FormData();
|
|
37510
|
+
data.append('file', imageBlob);
|
|
37511
|
+
mediaItem = {
|
|
37512
|
+
organizationId: this.organizationId,
|
|
37513
|
+
mediaType: 'PCT',
|
|
37514
|
+
fileName: hash + '.jpg'
|
|
37515
|
+
};
|
|
37516
|
+
data.append('mediaItem', JSON.stringify(mediaItem));
|
|
37517
|
+
mediaItemRef = {
|
|
37518
|
+
functionType: 'P2D',
|
|
37519
|
+
planningHash: hash,
|
|
37520
|
+
catalogCodex: catalogCodex,
|
|
37521
|
+
catalogGuid: catalogGUID
|
|
37522
|
+
};
|
|
37523
|
+
data.append('mediaItemRef', JSON.stringify(mediaItemRef));
|
|
37524
|
+
_context.next = 11;
|
|
37525
|
+
return fetch(url, {
|
|
37526
|
+
method: 'POST',
|
|
37527
|
+
body: data,
|
|
37528
|
+
headers: {
|
|
37529
|
+
'X-API-KEY': this.mediaServiceApiKey
|
|
37530
|
+
}
|
|
37531
|
+
});
|
|
37532
|
+
case 11:
|
|
37533
|
+
response = _context.sent;
|
|
37534
|
+
if (!response.ok) {
|
|
37535
|
+
_context.next = 20;
|
|
37536
|
+
break;
|
|
37537
|
+
}
|
|
37538
|
+
_context.next = 15;
|
|
37539
|
+
return response.json();
|
|
37540
|
+
case 15:
|
|
37541
|
+
res = _context.sent;
|
|
37542
|
+
LOG$3.debug('Successfully saved 2D Planning in media Service. URL: ' + res.url);
|
|
37543
|
+
return _context.abrupt("return", res.url);
|
|
37544
|
+
case 20:
|
|
37545
|
+
LOG$3.error(new DivaUtils.DivaError('Error when saving the Planning2D image on mediaService. Hash: ' + hash + 'response: ' + response, {
|
|
37546
|
+
code: 'WC_0016'
|
|
37547
|
+
}));
|
|
37548
|
+
case 21:
|
|
37549
|
+
DivaUtils__default["default"].endSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
|
|
37550
|
+
return _context.abrupt("return", '');
|
|
37551
|
+
case 23:
|
|
37552
|
+
case "end":
|
|
37553
|
+
return _context.stop();
|
|
37554
|
+
}
|
|
37555
|
+
}, _callee, this);
|
|
37556
|
+
}));
|
|
37557
|
+
function savePlanning2DPermanent(_x, _x2, _x3, _x4) {
|
|
37558
|
+
return _savePlanning2DPermanent.apply(this, arguments);
|
|
37559
|
+
}
|
|
37560
|
+
return savePlanning2DPermanent;
|
|
37561
|
+
}()
|
|
37562
|
+
}]);
|
|
37563
|
+
}();
|
|
37564
|
+
var mediaServiceHandler = new DivaMediaServiceHandler();
|
|
37565
|
+
|
|
38080
37566
|
/**
|
|
38081
37567
|
* This class saves a Bounding box. This bounding box can be of one Planner (one Set) or for several planner elements (multiple Sets)
|
|
38082
37568
|
*/
|
|
@@ -38411,7 +37897,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38411
37897
|
key: "initPlanner",
|
|
38412
37898
|
value: (function () {
|
|
38413
37899
|
var _initPlanner = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(initSetState, plannerHandlerFunctions) {
|
|
38414
|
-
var renderGroup, diva3dServerUrl, divaMediaServiceUrl, mediaServiceApiKey,
|
|
37900
|
+
var renderGroup, diva3dServerUrl, divaMediaServiceUrl, mediaServiceApiKey, _initSetState$api$web, result;
|
|
38415
37901
|
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
38416
37902
|
while (1) switch (_context.prev = _context.next) {
|
|
38417
37903
|
case 0:
|
|
@@ -38420,8 +37906,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38420
37906
|
this.plannerHandlerFunctions = plannerHandlerFunctions;
|
|
38421
37907
|
diva3dServerUrl = initSetState.api.get3DServerUrl();
|
|
38422
37908
|
divaMediaServiceUrl = initSetState.api.getDivaMediaServiceUrl();
|
|
38423
|
-
mediaServiceApiKey = initSetState.api.getDivaMediaServiceApiKey();
|
|
38424
|
-
useSirvViewer = initSetState.api.getDiva3dUseSirvViewer(); //renderGroup = 'LeaTest';
|
|
37909
|
+
mediaServiceApiKey = initSetState.api.getDivaMediaServiceApiKey(); //renderGroup = 'LeaTest';
|
|
38425
37910
|
//diva3dServerUrl = "https://test-einkauf-onboarding.pfister.ch/diva3d/diva3dhost2/";
|
|
38426
37911
|
// diva3dServerUrl = "https://diva3dhost.diva-portal.com/diva3d/diva3dhost2/";
|
|
38427
37912
|
//diva3dServerUrl = 'https://localhost:44315/';
|
|
@@ -38431,7 +37916,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38431
37916
|
//divaMediaServiceUrl = 'https://api-test.diva-portal.com/media/';
|
|
38432
37917
|
//divaMediaServiceUrl = 'http://localhost:3000';
|
|
38433
37918
|
if (!(!initSetState.onlyRunLogic && !initSetState.no3DConnection)) {
|
|
38434
|
-
_context.next =
|
|
37919
|
+
_context.next = 14;
|
|
38435
37920
|
break;
|
|
38436
37921
|
}
|
|
38437
37922
|
this.handler3D.initializeCallbackFunctions({
|
|
@@ -38443,34 +37928,31 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38443
37928
|
this.handler3D.setJwt(initSetState.api.getJwt());
|
|
38444
37929
|
//Only use if only 1 Planner/Set is used. Not possible in setPlanner
|
|
38445
37930
|
result = this.handler3D.initializeAPISettings({
|
|
38446
|
-
useMediaServiceImageCache: initSetState.api.getDiva3dUseImageCache(),
|
|
38447
|
-
suppressCacheCreation: initSetState.api.getDiva3DSuppressCacheCreation(),
|
|
38448
37931
|
renderGroup: renderGroup,
|
|
38449
37932
|
diva3dServerUrl: diva3dServerUrl,
|
|
38450
37933
|
divaMediaServiceUrl: divaMediaServiceUrl,
|
|
38451
37934
|
organizationId: initSetState.organizationId,
|
|
38452
|
-
useSirvViewer: useSirvViewer,
|
|
38453
37935
|
arViewerUrl: (_initSetState$api$web = initSetState.api.webConfig) === null || _initSetState$api$web === void 0 ? void 0 : _initSetState$api$web.arViewerUrl
|
|
38454
37936
|
});
|
|
38455
37937
|
if (!(!this.handler3D.checkConnectionInitialized() || result.renderGroupChanged || result.diva3dServerUrlChanged)) {
|
|
38456
|
-
_context.next =
|
|
37938
|
+
_context.next = 13;
|
|
38457
37939
|
break;
|
|
38458
37940
|
}
|
|
38459
|
-
_context.next =
|
|
37941
|
+
_context.next = 13;
|
|
38460
37942
|
return this.handler3D.initializeConnection();
|
|
38461
|
-
case
|
|
37943
|
+
case 13:
|
|
38462
37944
|
if (this.divaNr != initSetState.divaNr) {
|
|
38463
37945
|
this.divaNr = initSetState.divaNr;
|
|
38464
37946
|
this.handler3D.joinDivaNr(this.divaNr);
|
|
38465
37947
|
}
|
|
38466
|
-
case
|
|
37948
|
+
case 14:
|
|
38467
37949
|
mediaServiceHandler.setMediaServiceUrl(divaMediaServiceUrl);
|
|
38468
37950
|
mediaServiceHandler.setMediaServiceApiKey(mediaServiceApiKey);
|
|
38469
37951
|
mediaServiceHandler.setOrganizationId(initSetState.organizationId);
|
|
38470
37952
|
mediaServiceHandler.setJwt(initSetState.api.getJwt());
|
|
38471
37953
|
this.handler3D.setOrigConfigurationCallback(this.plannerHandlerFunctions.getOrigConfiguration);
|
|
38472
37954
|
DivaUtils__default["default"].endSpanOfApm('DivaPlannerHandler initPlanner');
|
|
38473
|
-
case
|
|
37955
|
+
case 20:
|
|
38474
37956
|
case "end":
|
|
38475
37957
|
return _context.stop();
|
|
38476
37958
|
}
|
|
@@ -38587,10 +38069,8 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38587
38069
|
roomlistCodex,
|
|
38588
38070
|
roomLists,
|
|
38589
38071
|
_yield$import,
|
|
38590
|
-
DivaSingleProductPlanner,
|
|
38591
|
-
_yield$import2,
|
|
38592
38072
|
DivaStandardPlanner,
|
|
38593
|
-
_yield$
|
|
38073
|
+
_yield$import2,
|
|
38594
38074
|
DivaBoxPlanner,
|
|
38595
38075
|
_args4 = arguments;
|
|
38596
38076
|
return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context4) {
|
|
@@ -38619,58 +38099,44 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38619
38099
|
}
|
|
38620
38100
|
this.handler3D.initializeViewPoint(catalogData.standardWhiteroom);
|
|
38621
38101
|
_context4.t0 = set.getPlannerEdition();
|
|
38622
|
-
_context4.next = _context4.t0 === 'STANDARD' ? 8 : _context4.t0 === 'BOX' ?
|
|
38102
|
+
_context4.next = _context4.t0 === 'STANDARD' ? 8 : _context4.t0 === 'BOX' ? 15 : 21;
|
|
38623
38103
|
break;
|
|
38624
38104
|
case 8:
|
|
38625
|
-
|
|
38626
|
-
|
|
38627
|
-
|
|
38628
|
-
}
|
|
38629
|
-
_context4.next = 11;
|
|
38630
|
-
return Promise.resolve().then(function () { return require('./DivaSingleProductPlanner-a308bc4c.js'); });
|
|
38631
|
-
case 11:
|
|
38105
|
+
_context4.next = 10;
|
|
38106
|
+
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-25919135.js'); });
|
|
38107
|
+
case 10:
|
|
38632
38108
|
_yield$import = _context4.sent;
|
|
38633
|
-
|
|
38634
|
-
planner = new DivaSingleProductPlanner(set, this.plannerIDCount, this.setPlannerHandler.getGlobalBoundingBox(), set.api.getHidePlanner());
|
|
38635
|
-
_context4.next = 22;
|
|
38636
|
-
break;
|
|
38637
|
-
case 16:
|
|
38638
|
-
_context4.next = 18;
|
|
38639
|
-
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-3ead2b7c.js'); });
|
|
38640
|
-
case 18:
|
|
38641
|
-
_yield$import2 = _context4.sent;
|
|
38642
|
-
DivaStandardPlanner = _yield$import2["default"];
|
|
38109
|
+
DivaStandardPlanner = _yield$import["default"];
|
|
38643
38110
|
planner = new DivaStandardPlanner(set, this.plannerHandlerFunctions.updatePlannerMsgContainer, this.plannerIDCount, this.setPlannerHandler.getGlobalBoundingBox(), set.api.getHidePlanner(), !!set.api.getDoShowAR(), set.api.getDoDisablePlanner2D(), hasStaticBackground);
|
|
38644
38111
|
if (catalogData.isIDM3DCat) {
|
|
38645
38112
|
planner.initIDM3DMeta(catalogData.IDM3DCatCodex);
|
|
38646
38113
|
}
|
|
38647
|
-
|
|
38648
|
-
|
|
38649
|
-
|
|
38650
|
-
|
|
38651
|
-
|
|
38652
|
-
|
|
38653
|
-
|
|
38654
|
-
DivaBoxPlanner = _yield$import3["default"];
|
|
38114
|
+
return _context4.abrupt("break", 21);
|
|
38115
|
+
case 15:
|
|
38116
|
+
_context4.next = 17;
|
|
38117
|
+
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-26e0cace.js'); });
|
|
38118
|
+
case 17:
|
|
38119
|
+
_yield$import2 = _context4.sent;
|
|
38120
|
+
DivaBoxPlanner = _yield$import2["default"];
|
|
38655
38121
|
planner = new DivaBoxPlanner(set, this.plannerIDCount);
|
|
38656
|
-
return _context4.abrupt("break",
|
|
38657
|
-
case
|
|
38122
|
+
return _context4.abrupt("break", 21);
|
|
38123
|
+
case 21:
|
|
38658
38124
|
this.plannerList.set(set.getSetId(), planner);
|
|
38659
38125
|
this.plannerIDCount++;
|
|
38660
38126
|
if (!(setPlanData != null && setPlanData != '')) {
|
|
38661
|
-
_context4.next =
|
|
38127
|
+
_context4.next = 26;
|
|
38662
38128
|
break;
|
|
38663
38129
|
}
|
|
38664
|
-
_context4.next =
|
|
38130
|
+
_context4.next = 26;
|
|
38665
38131
|
return planner.initPlanner(setPlanData);
|
|
38666
|
-
case
|
|
38132
|
+
case 26:
|
|
38667
38133
|
if (lastSetToInitialize) {
|
|
38668
38134
|
this.updateAllPlannerBBs();
|
|
38669
38135
|
this.setPlannerHandler.calcGlobalBoundingBox(this.plannerList);
|
|
38670
38136
|
}
|
|
38671
38137
|
this.setPlannerHandler.updateSetPosNr(this.plannerList);
|
|
38672
38138
|
DivaUtils__default["default"].endSpanOfApm('DivaPlannerHandler initSet');
|
|
38673
|
-
case
|
|
38139
|
+
case 29:
|
|
38674
38140
|
case "end":
|
|
38675
38141
|
return _context4.stop();
|
|
38676
38142
|
}
|
|
@@ -39140,7 +38606,6 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39140
38606
|
}, {
|
|
39141
38607
|
key: "clearHandler3D",
|
|
39142
38608
|
value: function clearHandler3D() {
|
|
39143
|
-
this.handler3D.clearRenderCache();
|
|
39144
38609
|
this.handler3D.closeConnection();
|
|
39145
38610
|
}
|
|
39146
38611
|
}, {
|
|
@@ -39389,7 +38854,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39389
38854
|
if (!renderRequestInfos) {
|
|
39390
38855
|
LOG$2.error(new DivaUtils.DivaError('Error requesting 3D rendering. No renderRequestInfo is set'));
|
|
39391
38856
|
return;
|
|
39392
|
-
} else if (
|
|
38857
|
+
} else if (renderRequestInfos.width <= 0 || isNaN(renderRequestInfos.width) || renderRequestInfos.height <= 0 || isNaN(renderRequestInfos.height)) {
|
|
39393
38858
|
LOG$2.error(new DivaUtils.DivaError('Error requesting rendering. Not valid width or height request width: ' + renderRequestInfos.width + ' height: ' + renderRequestInfos.height));
|
|
39394
38859
|
return;
|
|
39395
38860
|
}
|
|
@@ -39398,14 +38863,11 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39398
38863
|
var loadedCatData = [];
|
|
39399
38864
|
var plannerExists = false;
|
|
39400
38865
|
var savedSetId = undefined;
|
|
39401
|
-
var containsNotDigitalizedTextures = false;
|
|
39402
|
-
var useMediaServiceImageCache = doRequestRendering && this.handler3D.getUseMediaServiceImageCache() ? true : false;
|
|
39403
38866
|
this.plannerList.forEach(function (planner, setId) {
|
|
39404
38867
|
var _renderRequestInfos$d;
|
|
39405
38868
|
savedSetId = setId;
|
|
39406
|
-
var config = planner.getSetData(true, _this3.plannerHandlerFunctions.doAllowSetPlanner(), (_renderRequestInfos$d = renderRequestInfos === null || renderRequestInfos === void 0 ? void 0 : renderRequestInfos.doShow3DDimensionLines) !== null && _renderRequestInfos$d !== void 0 ? _renderRequestInfos$d : false,
|
|
38869
|
+
var config = planner.getSetData(true, _this3.plannerHandlerFunctions.doAllowSetPlanner(), (_renderRequestInfos$d = renderRequestInfos === null || renderRequestInfos === void 0 ? void 0 : renderRequestInfos.doShow3DDimensionLines) !== null && _renderRequestInfos$d !== void 0 ? _renderRequestInfos$d : false, alternateRenderInfo);
|
|
39407
38870
|
var setData = config.constructionSet;
|
|
39408
|
-
if (config.containsNotDigitalizedTextures) containsNotDigitalizedTextures = true;
|
|
39409
38871
|
|
|
39410
38872
|
//Add technical Info to setData
|
|
39411
38873
|
var bboxInfo2D = _this3.get2DViewPlannerBoundingBox();
|
|
@@ -39425,15 +38887,6 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39425
38887
|
});
|
|
39426
38888
|
});
|
|
39427
38889
|
if (plannerExists) {
|
|
39428
|
-
if (containsNotDigitalizedTextures) {
|
|
39429
|
-
var _this$plannerHandlerF3, _this$plannerHandlerF4;
|
|
39430
|
-
(_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);
|
|
39431
|
-
} else {
|
|
39432
|
-
var _this$plannerHandlerF5, _this$plannerHandlerF6;
|
|
39433
|
-
//Hide message warning if shown
|
|
39434
|
-
(_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);
|
|
39435
|
-
}
|
|
39436
|
-
|
|
39437
38890
|
// if not in set planner mode overwrite s1 with correct setId
|
|
39438
38891
|
if (!this.plannerHandlerFunctions.doAllowSetPlanner()) {
|
|
39439
38892
|
plannerData.SCE.ROO[0].SET[0].ID = savedSetId;
|
|
@@ -39476,12 +38929,12 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39476
38929
|
|
|
39477
38930
|
if (!setId) {
|
|
39478
38931
|
this.plannerList.forEach(function (planner, setId) {
|
|
39479
|
-
var config = planner.getSetData(true, _this4.plannerHandlerFunctions.doAllowSetPlanner(), false
|
|
38932
|
+
var config = planner.getSetData(true, _this4.plannerHandlerFunctions.doAllowSetPlanner(), false);
|
|
39480
38933
|
var setData = config.constructionSet;
|
|
39481
38934
|
plannerData.SCE.ROO[0].SET.push(setData);
|
|
39482
38935
|
});
|
|
39483
38936
|
} else {
|
|
39484
|
-
var config = this.plannerList.get(setId).getSetData(true, this.plannerHandlerFunctions.doAllowSetPlanner(), false
|
|
38937
|
+
var config = this.plannerList.get(setId).getSetData(true, this.plannerHandlerFunctions.doAllowSetPlanner(), false);
|
|
39485
38938
|
plannerData.SCE.ROO[0].SET.push(config.constructionSet);
|
|
39486
38939
|
}
|
|
39487
38940
|
return JSON.stringify(plannerData);
|
|
@@ -39508,7 +38961,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39508
38961
|
// let posInformation: any = {};
|
|
39509
38962
|
|
|
39510
38963
|
this.plannerList.forEach(function (planner, setId) {
|
|
39511
|
-
var config = planner.getSetData(false, _this5.plannerHandlerFunctions.doAllowSetPlanner(), false
|
|
38964
|
+
var config = planner.getSetData(false, _this5.plannerHandlerFunctions.doAllowSetPlanner(), false);
|
|
39512
38965
|
plannerData.SCE.ROO[0].SET.push(config.constructionSet);
|
|
39513
38966
|
});
|
|
39514
38967
|
return DivaUtils.md5(JSON.stringify(plannerData));
|
|
@@ -39563,7 +39016,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39563
39016
|
_defineProperty__default["default"](this, "updatePlanner3DImage", void 0);
|
|
39564
39017
|
_defineProperty__default["default"](this, "setRotationOrbitCube", void 0);
|
|
39565
39018
|
_defineProperty__default["default"](this, "getCanvas2DAsJPG", void 0);
|
|
39566
|
-
_defineProperty__default["default"](this, "updateSirvViewer", void 0);
|
|
39567
39019
|
_defineProperty__default["default"](this, "updateFullscreenRendering", void 0);
|
|
39568
39020
|
_defineProperty__default["default"](this, "plannerHandler", void 0);
|
|
39569
39021
|
_defineProperty__default["default"](this, "updateSetImage", void 0);
|
|
@@ -39653,18 +39105,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39653
39105
|
if (rendering.getIsFullscreenRendering()) {
|
|
39654
39106
|
_this.updateFullscreenRendering(rendering);
|
|
39655
39107
|
} else {
|
|
39656
|
-
|
|
39657
|
-
|
|
39658
|
-
(_this$actSet = _this.actSet()) === null || _this$actSet === void 0 || _this$actSet.getVariantBasketData();
|
|
39659
|
-
(_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());
|
|
39660
|
-
} else {
|
|
39661
|
-
var _this$actSet3;
|
|
39662
|
-
_this.updatePlanner3DImage(rendering, ((_this$actSet3 = _this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getAlternateRenderInfo().length) > 0);
|
|
39663
|
-
}
|
|
39108
|
+
var _this$actSet;
|
|
39109
|
+
_this.updatePlanner3DImage(rendering, ((_this$actSet = _this.actSet()) === null || _this$actSet === void 0 ? void 0 : _this$actSet.getAlternateRenderInfo().length) > 0);
|
|
39664
39110
|
}
|
|
39665
39111
|
if (_this.actions && (_this$state = _this.state) !== null && _this$state !== void 0 && _this$state.enableSupport) {
|
|
39666
|
-
var _this$
|
|
39667
|
-
_this.api.postPlanningInfo((_this$
|
|
39112
|
+
var _this$actSet2, _this$state$user, _this$state$user2, _this$state$user3;
|
|
39113
|
+
_this.api.postPlanningInfo((_this$actSet2 = _this.actSet()) === null || _this$actSet2 === void 0 ? void 0 : _this$actSet2.getVariantBasketData(), _this.divaNr, rendering.getImageForSrc(), _this.getCurSetPrice() + setHandlerInstance.getActSetPriceFormat(_this.actSet()), _this.getCurCatalogName(), (_this$state$user = _this.state.user) === null || _this$state$user === void 0 ? void 0 : _this$state$user._id, (_this$state$user2 = _this.state.user) === null || _this$state$user2 === void 0 ? void 0 : _this$state$user2.name, (_this$state$user3 = _this.state.user) === null || _this$state$user3 === void 0 ? void 0 : _this$state$user3.familyName, _this.state.organization._id);
|
|
39668
39114
|
}
|
|
39669
39115
|
});
|
|
39670
39116
|
/**
|
|
@@ -40506,19 +39952,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40506
39952
|
}, {
|
|
40507
39953
|
key: "getDivaArticles",
|
|
40508
39954
|
value: function getDivaArticles() {
|
|
40509
|
-
var _this$
|
|
40510
|
-
return (_this$
|
|
39955
|
+
var _this$actSet3;
|
|
39956
|
+
return (_this$actSet3 = this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getDivaArticles();
|
|
40511
39957
|
}
|
|
40512
39958
|
}, {
|
|
40513
39959
|
key: "getDimension",
|
|
40514
39960
|
value: function () {
|
|
40515
39961
|
var _getDimension = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14() {
|
|
40516
|
-
var _this$
|
|
39962
|
+
var _this$actSet4;
|
|
40517
39963
|
return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context14) {
|
|
40518
39964
|
while (1) switch (_context14.prev = _context14.next) {
|
|
40519
39965
|
case 0:
|
|
40520
39966
|
_context14.next = 2;
|
|
40521
|
-
return (_this$
|
|
39967
|
+
return (_this$actSet4 = this.actSet()) === null || _this$actSet4 === void 0 ? void 0 : _this$actSet4.getDimensionPerVariant();
|
|
40522
39968
|
case 2:
|
|
40523
39969
|
return _context14.abrupt("return", _context14.sent);
|
|
40524
39970
|
case 3:
|
|
@@ -40577,7 +40023,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40577
40023
|
this.updateWebConfiguratorTitle();
|
|
40578
40024
|
//initialize planner view
|
|
40579
40025
|
(_this$updateViewPlann9 = this.updateViewPlannerElements) === null || _this$updateViewPlann9 === void 0 || _this$updateViewPlann9.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set), set.getSetId(), set.firstElementId);
|
|
40580
|
-
this.
|
|
40026
|
+
this.updatePlannerView('INIT_VIEW');
|
|
40581
40027
|
this.onBasketInitialized();
|
|
40582
40028
|
this.checkVariantData();
|
|
40583
40029
|
case 17:
|
|
@@ -40597,8 +40043,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40597
40043
|
}, {
|
|
40598
40044
|
key: "updateWebConfiguratorTitle",
|
|
40599
40045
|
value: function updateWebConfiguratorTitle() {
|
|
40600
|
-
var _this$setWebConifgura, _this$
|
|
40601
|
-
(_this$setWebConifgura = this.setWebConifguratorTitle) === null || _this$setWebConifgura === void 0 || _this$setWebConifgura.call(this, (_this$
|
|
40046
|
+
var _this$setWebConifgura, _this$actSet5;
|
|
40047
|
+
(_this$setWebConifgura = this.setWebConifguratorTitle) === null || _this$setWebConifgura === void 0 || _this$setWebConifgura.call(this, (_this$actSet5 = this.actSet()) === null || _this$actSet5 === void 0 ? void 0 : _this$actSet5.getSetTitle());
|
|
40602
40048
|
}
|
|
40603
40049
|
}, {
|
|
40604
40050
|
key: "updateConfigStructure",
|
|
@@ -40610,7 +40056,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40610
40056
|
value: function () {
|
|
40611
40057
|
var _runInitMode = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(plannerMode) {
|
|
40612
40058
|
var _this$navigateToTabGr2;
|
|
40613
|
-
var doDefault, configStepKey, _this$
|
|
40059
|
+
var doDefault, configStepKey, _this$actSet6, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
|
|
40614
40060
|
return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context16) {
|
|
40615
40061
|
while (1) switch (_context16.prev = _context16.next) {
|
|
40616
40062
|
case 0:
|
|
@@ -40645,7 +40091,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40645
40091
|
if (doDefault) {
|
|
40646
40092
|
if (plannerMode == 'ProductList') {
|
|
40647
40093
|
(_this$navigateToTabGr3 = this.navigateToTabGroup) === null || _this$navigateToTabGr3 === void 0 || _this$navigateToTabGr3.call(this, 'PRODUCTS');
|
|
40648
|
-
} else if ((_this$
|
|
40094
|
+
} else if ((_this$actSet6 = this.actSet()) !== null && _this$actSet6 !== void 0 && _this$actSet6.hasStaticRoomList) {
|
|
40649
40095
|
(_this$navigateToTabGr4 = this.navigateToTabGroup) === null || _this$navigateToTabGr4 === void 0 || _this$navigateToTabGr4.call(this, 'ROOMLIST', true);
|
|
40650
40096
|
} else {
|
|
40651
40097
|
(_this$navigateToTabGr5 = this.navigateToTabGroup) === null || _this$navigateToTabGr5 === void 0 || _this$navigateToTabGr5.call(this, this.getCurPlannerType(true), true);
|
|
@@ -40662,24 +40108,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40662
40108
|
}
|
|
40663
40109
|
return runInitMode;
|
|
40664
40110
|
}()
|
|
40665
|
-
}, {
|
|
40666
|
-
key: "initCache",
|
|
40667
|
-
value: function initCache() {
|
|
40668
|
-
//get cached image
|
|
40669
|
-
var initFirstRenderingByCache = false;
|
|
40670
|
-
if (DivaUtils__default["default"].CacheIsEnabled) {
|
|
40671
|
-
var firstImageUrl = DivaUtils__default["default"].getCacheData('FIRSTIMAGE', '');
|
|
40672
|
-
if (firstImageUrl) {
|
|
40673
|
-
initFirstRenderingByCache = true;
|
|
40674
|
-
var rendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'STREAM');
|
|
40675
|
-
rendering.setHQRenderingUrl(firstImageUrl, this.api.getDiva3dUseSirvViewer());
|
|
40676
|
-
this.updatePlannerRendering(rendering);
|
|
40677
|
-
}
|
|
40678
|
-
}
|
|
40679
|
-
if (!initFirstRenderingByCache) {
|
|
40680
|
-
this.updatePlannerView('INIT_VIEW');
|
|
40681
|
-
}
|
|
40682
|
-
}
|
|
40683
40111
|
}, {
|
|
40684
40112
|
key: "addSetToActPlanningByDivaNr",
|
|
40685
40113
|
value: function () {
|
|
@@ -40893,7 +40321,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40893
40321
|
setHandlerInstance.update3DPlannerView(true, true, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime2 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime2 === void 0 ? void 0 : _this$getDoShow3DDime2.call(this), alternateRenderInfo, viewpoint);
|
|
40894
40322
|
break;
|
|
40895
40323
|
case '3DImage':
|
|
40896
|
-
case 'SirvViewer_only':
|
|
40897
40324
|
//Request new Rendering
|
|
40898
40325
|
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime3 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime3 === void 0 ? void 0 : _this$getDoShow3DDime3.call(this), alternateRenderInfo);
|
|
40899
40326
|
break;
|
|
@@ -40940,8 +40367,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40940
40367
|
}, {
|
|
40941
40368
|
key: "getAlternateRenderingsForSummary",
|
|
40942
40369
|
value: function getAlternateRenderingsForSummary() {
|
|
40943
|
-
var _this$
|
|
40944
|
-
return (_this$
|
|
40370
|
+
var _this$actSet7;
|
|
40371
|
+
return (_this$actSet7 = this.actSet()) === null || _this$actSet7 === void 0 || (_this$actSet7 = _this$actSet7.CatalogData) === null || _this$actSet7 === void 0 ? void 0 : _this$actSet7.alternateRenderingsForSummary;
|
|
40945
40372
|
}
|
|
40946
40373
|
}, {
|
|
40947
40374
|
key: "destroyWebPlanner",
|
|
@@ -41237,8 +40664,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41237
40664
|
}, {
|
|
41238
40665
|
key: "setDifferentOptions",
|
|
41239
40666
|
value: function setDifferentOptions(options) {
|
|
41240
|
-
var _this$
|
|
41241
|
-
(_this$
|
|
40667
|
+
var _this$actSet8;
|
|
40668
|
+
(_this$actSet8 = this.actSet()) === null || _this$actSet8 === void 0 || _this$actSet8.setDifferentOptions(options);
|
|
41242
40669
|
}
|
|
41243
40670
|
|
|
41244
40671
|
/**
|
|
@@ -41615,7 +41042,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41615
41042
|
* This function returns true if the Planner Mode should be visible and the planner Step should be shown.
|
|
41616
41043
|
* The planner step is not shown if:
|
|
41617
41044
|
* - There is no viewer Option set for the Planner
|
|
41618
|
-
* - The configurator config disables the planner Step (SuS + Cache System)
|
|
41619
41045
|
* - The box Planner is loaded
|
|
41620
41046
|
*/
|
|
41621
41047
|
}, {
|
|
@@ -41636,8 +41062,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41636
41062
|
|
|
41637
41063
|
//if planner is hidden by config but nothing is planned initially
|
|
41638
41064
|
if (plannerType === 'NONE') {
|
|
41639
|
-
var _this$plannerConfig$a7, _this$
|
|
41640
|
-
if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex && !((_this$plannerConfig$a7 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a7 !== void 0 && _this$plannerConfig$a7.length) && !this.plannerConfig.productId && !this.plannerConfig.customProductId && !this.plannerConfig.basketData && !((_this$
|
|
41065
|
+
var _this$plannerConfig$a7, _this$actSet9;
|
|
41066
|
+
if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex && !((_this$plannerConfig$a7 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a7 !== void 0 && _this$plannerConfig$a7.length) && !this.plannerConfig.productId && !this.plannerConfig.customProductId && !this.plannerConfig.basketData && !((_this$actSet9 = this.actSet()) !== null && _this$actSet9 !== void 0 && (_this$actSet9 = _this$actSet9.CatalogData.startPlannerArticle) !== null && _this$actSet9 !== void 0 && _this$actSet9.length)) {
|
|
41641
41067
|
plannerType = 'PLANNER';
|
|
41642
41068
|
}
|
|
41643
41069
|
}
|
|
@@ -41677,38 +41103,38 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41677
41103
|
}, {
|
|
41678
41104
|
key: "getCurCatalogCodex",
|
|
41679
41105
|
value: function getCurCatalogCodex() {
|
|
41680
|
-
var _this$
|
|
41681
|
-
return (_this$
|
|
41106
|
+
var _this$actSet10;
|
|
41107
|
+
return (_this$actSet10 = this.actSet()) === null || _this$actSet10 === void 0 ? void 0 : _this$actSet10.getCatalogCodex();
|
|
41682
41108
|
}
|
|
41683
41109
|
}, {
|
|
41684
41110
|
key: "getCurCatalogName",
|
|
41685
41111
|
value: function getCurCatalogName() {
|
|
41686
|
-
var _this$
|
|
41687
|
-
return (_this$
|
|
41112
|
+
var _this$actSet11;
|
|
41113
|
+
return (_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 ? void 0 : _this$actSet11.getCatalogName();
|
|
41688
41114
|
}
|
|
41689
41115
|
}, {
|
|
41690
41116
|
key: "getCurAccountName",
|
|
41691
41117
|
value: function getCurAccountName() {
|
|
41692
|
-
var _this$
|
|
41693
|
-
return (_this$
|
|
41118
|
+
var _this$actSet12;
|
|
41119
|
+
return (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.getAccountName();
|
|
41694
41120
|
}
|
|
41695
41121
|
}, {
|
|
41696
41122
|
key: "getCurSupplierGuid",
|
|
41697
41123
|
value: function getCurSupplierGuid() {
|
|
41698
|
-
var _this$
|
|
41699
|
-
return (_this$
|
|
41124
|
+
var _this$actSet13;
|
|
41125
|
+
return (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.getSupplierGuid();
|
|
41700
41126
|
}
|
|
41701
41127
|
}, {
|
|
41702
41128
|
key: "getCurSetPrice",
|
|
41703
41129
|
value: function getCurSetPrice() {
|
|
41704
|
-
var _this$actSet$getSetPr, _this$
|
|
41705
|
-
return (_this$actSet$getSetPr = (_this$
|
|
41130
|
+
var _this$actSet$getSetPr, _this$actSet14;
|
|
41131
|
+
return (_this$actSet$getSetPr = (_this$actSet14 = this.actSet()) === null || _this$actSet14 === void 0 ? void 0 : _this$actSet14.getSetPrice()) !== null && _this$actSet$getSetPr !== void 0 ? _this$actSet$getSetPr : 0;
|
|
41706
41132
|
}
|
|
41707
41133
|
}, {
|
|
41708
41134
|
key: "getCurImageMode",
|
|
41709
41135
|
value: function getCurImageMode() {
|
|
41710
|
-
var _this$
|
|
41711
|
-
return (_this$
|
|
41136
|
+
var _this$actSet15;
|
|
41137
|
+
return (_this$actSet15 = this.actSet()) !== null && _this$actSet15 !== void 0 && (_this$actSet15 = _this$actSet15.CatalogData) !== null && _this$actSet15 !== void 0 && _this$actSet15.has3dModels ? '3D' : '2D';
|
|
41712
41138
|
}
|
|
41713
41139
|
}, {
|
|
41714
41140
|
key: "getViewConfig",
|
|
@@ -41739,73 +41165,63 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41739
41165
|
}, {
|
|
41740
41166
|
key: "doShow3DDimensionLines",
|
|
41741
41167
|
value: function doShow3DDimensionLines() {
|
|
41742
|
-
var _this$
|
|
41743
|
-
return (_this$
|
|
41168
|
+
var _this$actSet16;
|
|
41169
|
+
return (_this$actSet16 = this.actSet()) === null || _this$actSet16 === void 0 || (_this$actSet16 = _this$actSet16.CatalogData) === null || _this$actSet16 === void 0 ? void 0 : _this$actSet16.doShow3DDimensionLines;
|
|
41744
41170
|
}
|
|
41745
41171
|
}, {
|
|
41746
41172
|
key: "hidePlannerUiIcons",
|
|
41747
41173
|
value: function hidePlannerUiIcons() {
|
|
41748
|
-
var _this$
|
|
41749
|
-
return (_this$
|
|
41174
|
+
var _this$actSet17;
|
|
41175
|
+
return (_this$actSet17 = this.actSet()) === null || _this$actSet17 === void 0 || (_this$actSet17 = _this$actSet17.CatalogData) === null || _this$actSet17 === void 0 ? void 0 : _this$actSet17.hidePlannerUiIcons;
|
|
41750
41176
|
}
|
|
41751
41177
|
}, {
|
|
41752
41178
|
key: "doShowPlannerReplaceMode",
|
|
41753
41179
|
value: function doShowPlannerReplaceMode() {
|
|
41754
|
-
var _this$
|
|
41755
|
-
var catalogData = (_this$
|
|
41180
|
+
var _this$actSet18, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
|
|
41181
|
+
var catalogData = (_this$actSet18 = this.actSet()) === null || _this$actSet18 === void 0 ? void 0 : _this$actSet18.CatalogData;
|
|
41756
41182
|
return (catalogData === null || catalogData === void 0 ? void 0 : catalogData.replaceModeActive) && ((_this$api$getViewConf2 = this.api.getViewConfig()) === null || _this$api$getViewConf2 === void 0 ? void 0 : _this$api$getViewConf2.showReplaceFunctionInPlanner) && Object.entries(catalogData.allCatalogPlannerArticles).length > 1 && Object.entries((_catalogData$PlannerP = (_catalogData$PlannerP2 = catalogData.PlannerPaletteViewInfo) === null || _catalogData$PlannerP2 === void 0 ? void 0 : _catalogData$PlannerP2.catalogPlannerArticles) !== null && _catalogData$PlannerP !== void 0 ? _catalogData$PlannerP : {}).length > 1;
|
|
41757
41183
|
}
|
|
41758
41184
|
}, {
|
|
41759
41185
|
key: "doPlannerReplaceAutoSwitch",
|
|
41760
41186
|
value: function doPlannerReplaceAutoSwitch() {
|
|
41761
|
-
var _this$
|
|
41762
|
-
var catalogData = (_this$
|
|
41187
|
+
var _this$actSet19, _this$api$getViewConf3;
|
|
41188
|
+
var catalogData = (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.CatalogData;
|
|
41763
41189
|
return (catalogData === null || catalogData === void 0 ? void 0 : catalogData.catalogPlannsCompletely) && this.doShowPlannerReplaceMode() && ((_this$api$getViewConf3 = this.api.getViewConfig()) === null || _this$api$getViewConf3 === void 0 ? void 0 : _this$api$getViewConf3.allowAutoSwitchInReplaceFunctionInPlanner);
|
|
41764
41190
|
}
|
|
41765
41191
|
}, {
|
|
41766
41192
|
key: "getHidePlanner",
|
|
41767
41193
|
value: function getHidePlanner() {
|
|
41768
|
-
var _this$
|
|
41769
|
-
return this.api.getHidePlanner() || !!((_this$
|
|
41194
|
+
var _this$actSet20;
|
|
41195
|
+
return this.api.getHidePlanner() || !!((_this$actSet20 = this.actSet()) !== null && _this$actSet20 !== void 0 && _this$actSet20.CatalogData.useBoxPlanner);
|
|
41770
41196
|
}
|
|
41771
41197
|
}, {
|
|
41772
41198
|
key: "getAllowRTV",
|
|
41773
41199
|
value: function getAllowRTV() {
|
|
41774
|
-
var _this$
|
|
41775
|
-
if ((_this$
|
|
41776
|
-
if (this.api.getDoShowRTV() && (_this$
|
|
41200
|
+
var _this$actSet21, _this$actSet22;
|
|
41201
|
+
if ((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.divaForceRTV) return true;
|
|
41202
|
+
if (this.api.getDoShowRTV() && (_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaArReady) return true;
|
|
41777
41203
|
return false;
|
|
41778
41204
|
}
|
|
41779
41205
|
}, {
|
|
41780
41206
|
key: "geAllowQRCodeAR",
|
|
41781
41207
|
value: function geAllowQRCodeAR() {
|
|
41782
|
-
var _this$
|
|
41783
|
-
if (this.api.getDoShowAR() && (_this$
|
|
41208
|
+
var _this$actSet23;
|
|
41209
|
+
if (this.api.getDoShowAR() && (_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaArReady) return true;
|
|
41784
41210
|
return false;
|
|
41785
41211
|
}
|
|
41786
41212
|
}, {
|
|
41787
41213
|
key: "getEnableUnityRtvKombi",
|
|
41788
41214
|
value: function getEnableUnityRtvKombi() {
|
|
41789
|
-
var _this$
|
|
41215
|
+
var _this$actSet24;
|
|
41790
41216
|
// if force rtv disable unity kombi - biohort
|
|
41791
|
-
if ((_this$
|
|
41217
|
+
if ((_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaForceRTV) return false;
|
|
41792
41218
|
return this.api.getEnableRTVUnityKombi();
|
|
41793
41219
|
}
|
|
41794
41220
|
}, {
|
|
41795
41221
|
key: "getShelfPlannerRTV",
|
|
41796
41222
|
value: function getShelfPlannerRTV() {
|
|
41797
|
-
var _this$
|
|
41798
|
-
return (_this$
|
|
41799
|
-
}
|
|
41800
|
-
}, {
|
|
41801
|
-
key: "getDiva3DSuppressCacheCreation",
|
|
41802
|
-
value: function getDiva3DSuppressCacheCreation() {
|
|
41803
|
-
return this.api.getDiva3DSuppressCacheCreation();
|
|
41804
|
-
}
|
|
41805
|
-
}, {
|
|
41806
|
-
key: "getDiva3dUseImageCache",
|
|
41807
|
-
value: function getDiva3dUseImageCache() {
|
|
41808
|
-
return this.api.getDiva3dUseImageCache();
|
|
41223
|
+
var _this$actSet25;
|
|
41224
|
+
return (_this$actSet25 = this.actSet()) === null || _this$actSet25 === void 0 ? void 0 : _this$actSet25.CatalogData.useShelfPlannerRTV;
|
|
41809
41225
|
}
|
|
41810
41226
|
}, {
|
|
41811
41227
|
key: "getBasketData",
|
|
@@ -41846,8 +41262,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41846
41262
|
}, {
|
|
41847
41263
|
key: "getCatalogData",
|
|
41848
41264
|
value: function getCatalogData() {
|
|
41849
|
-
var _this$
|
|
41850
|
-
return (_this$
|
|
41265
|
+
var _this$actSet26;
|
|
41266
|
+
return (_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.CatalogData;
|
|
41851
41267
|
}
|
|
41852
41268
|
}, {
|
|
41853
41269
|
key: "ReturnTo",
|
|
@@ -42128,11 +41544,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42128
41544
|
value: function registerGetCanvas2DAsJPG(getCanvas2DAsJPG) {
|
|
42129
41545
|
this.getCanvas2DAsJPG = getCanvas2DAsJPG;
|
|
42130
41546
|
}
|
|
42131
|
-
}, {
|
|
42132
|
-
key: "registerUpdateSirvViewer",
|
|
42133
|
-
value: function registerUpdateSirvViewer(updateSirvViewer) {
|
|
42134
|
-
this.updateSirvViewer = updateSirvViewer;
|
|
42135
|
-
}
|
|
42136
41547
|
}, {
|
|
42137
41548
|
key: "registerUpdatePlanner2DGrid",
|
|
42138
41549
|
value: function registerUpdatePlanner2DGrid(updatePlanner2DGrid) {
|
|
@@ -42600,7 +42011,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42600
42011
|
this.updatePlanner3DImage = undefined;
|
|
42601
42012
|
this.setRotationOrbitCube = undefined;
|
|
42602
42013
|
this.getCanvas2DAsJPG = undefined;
|
|
42603
|
-
this.updateSirvViewer = undefined;
|
|
42604
42014
|
this.updatePlannerMsgContainer = undefined;
|
|
42605
42015
|
this.updateFullscreenRendering = undefined;
|
|
42606
42016
|
this.updateSetImage = undefined;
|