@crystaldesign/web-planner-logic 26.13.0-beta.15 → 26.13.0-beta.17
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-be749bb5.js → DivaBoxPlanner-593d689c.js} +3 -2
- package/build/cjs/{DivaStandardPlanner-fc05728f.js → DivaStandardPlanner-f5ba6ead.js} +3 -2
- package/build/cjs/{DoorPlanner-a862ebe1.js → DoorPlanner-35be7adf.js} +2 -1
- package/build/cjs/{Host3DSignalR-05fb621f.js → Host3DSignalR-b8beb958.js} +2 -1
- package/build/cjs/{LiviqueWWSHandler-e78d2805.js → LiviqueWWSHandler-13757823.js} +2 -1
- package/build/cjs/{PfisterWWSHandler-af7f8c21.js → PfisterWWSHandler-7404917e.js} +2 -1
- package/build/cjs/{PlannerHandler2D-24a840c9.js → PlannerHandler2D-d266ccd0.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-37c085b7.js → SeriousBasketHandler-2b3d0f22.js} +2 -1
- package/build/cjs/{ShelfPlanner-8eeb10d6.js → ShelfPlanner-4eb63a5c.js} +2 -1
- package/build/cjs/{StandardWWSHandler-a0b03684.js → StandardWWSHandler-9fce580d.js} +2 -1
- package/build/cjs/{index-411c6d20.js → index-ecd4dc0b.js} +947 -849
- package/build/cjs/index.js +2 -6
- package/build/esm/{DivaBoxPlanner-e86a9c78.js → DivaBoxPlanner-7291fc69.js} +3 -2
- package/build/esm/{DivaStandardPlanner-34cb94ca.js → DivaStandardPlanner-cde0a04a.js} +3 -2
- package/build/esm/{DoorPlanner-34fcedfe.js → DoorPlanner-599bd2a0.js} +2 -1
- package/build/esm/{Host3DSignalR-06a154e9.js → Host3DSignalR-c12d1c95.js} +2 -1
- package/build/esm/{LiviqueWWSHandler-08e0fd3f.js → LiviqueWWSHandler-443dd9fb.js} +2 -1
- package/build/esm/{PfisterWWSHandler-d5129b6b.js → PfisterWWSHandler-aeeeca0a.js} +2 -1
- package/build/esm/{PlannerHandler2D-fa2f950e.js → PlannerHandler2D-eb466bb9.js} +1 -1
- package/build/esm/{SeriousBasketHandler-fadb9e59.js → SeriousBasketHandler-8e25438e.js} +2 -1
- package/build/esm/{ShelfPlanner-4d988daa.js → ShelfPlanner-93e07971.js} +2 -1
- package/build/esm/{StandardWWSHandler-1b06b955.js → StandardWWSHandler-d71f9500.js} +2 -1
- package/build/esm/{index-79c27c8c.js → index-d4042c10.js} +947 -845
- package/build/esm/index.js +2 -1
- package/build/types/web-planner-logic/src/index.d.ts +1 -7
- package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts +4 -2
- package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts +2 -3
- package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts +1 -0
- package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/IDM3D/idm3dTranslation.d.ts +2 -2
- package/build/types/web-planner-logic/src/logic/Planner/IDM3D/idm3dTranslation.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/DivaCatalogData.d.ts +3 -0
- package/build/types/web-planner-logic/src/model/Catalog/DivaCatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/IDMCatalogData.d.ts +4 -2
- package/build/types/web-planner-logic/src/model/Catalog/IDMCatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts +2 -3
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Properties/propertySchemaRegistry.d.ts +23 -11
- package/build/types/web-planner-logic/src/model/Properties/propertySchemaRegistry.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Properties/propertyValueCodec.d.ts +1 -34
- package/build/types/web-planner-logic/src/model/Properties/propertyValueCodec.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Properties/propertyValues.d.ts +41 -0
- package/build/types/web-planner-logic/src/model/Properties/propertyValues.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/propertyParsers.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/propertyParsers.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/propertyValues.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/propertyValues.test.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -11,6 +11,7 @@ var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
|
11
11
|
var axios$1 = require('axios');
|
|
12
12
|
var DivaUtils = require('@crystaldesign/diva-utils');
|
|
13
13
|
var _typeof = require('@babel/runtime/helpers/typeof');
|
|
14
|
+
var _toArray = require('@babel/runtime/helpers/toArray');
|
|
14
15
|
var planner2dCore = require('@crystaldesign/planner-2d-core');
|
|
15
16
|
var basketModel = require('@crystaldesign/basket-model');
|
|
16
17
|
var fastXmlParser = require('fast-xml-parser');
|
|
@@ -34,6 +35,7 @@ var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumab
|
|
|
34
35
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios$1);
|
|
35
36
|
var DivaUtils__default = /*#__PURE__*/_interopDefaultLegacy(DivaUtils);
|
|
36
37
|
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
38
|
+
var _toArray__default = /*#__PURE__*/_interopDefaultLegacy(_toArray);
|
|
37
39
|
var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultLegacy(_possibleConstructorReturn);
|
|
38
40
|
var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultLegacy(_getPrototypeOf);
|
|
39
41
|
var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
|
|
@@ -160,12 +162,12 @@ function bootRequestName(url) {
|
|
|
160
162
|
}
|
|
161
163
|
|
|
162
164
|
var _excluded = ["type"];
|
|
163
|
-
function ownKeys$
|
|
164
|
-
function _objectSpread$
|
|
165
|
+
function ownKeys$s(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; }
|
|
166
|
+
function _objectSpread$s(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$s(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$s(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
165
167
|
|
|
166
168
|
// Import types from AI service
|
|
167
169
|
|
|
168
|
-
var LOG$
|
|
170
|
+
var LOG$s = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
169
171
|
|
|
170
172
|
/**
|
|
171
173
|
* Deadline for the optional catalog XML preload. Axios has no default timeout, and planner start-up
|
|
@@ -231,7 +233,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
231
233
|
if (plannerConfig.settings) {
|
|
232
234
|
this.initalizeWebConfigData(plannerConfig);
|
|
233
235
|
} else {
|
|
234
|
-
LOG$
|
|
236
|
+
LOG$s.error(new DivaUtils.DivaError('Fehler beim laden der WebConfig', {
|
|
235
237
|
code: 'WC_0001'
|
|
236
238
|
}));
|
|
237
239
|
throw Error('Initalize failed!');
|
|
@@ -292,7 +294,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
292
294
|
case 0:
|
|
293
295
|
skip = _args.length > 2 && _args[2] !== undefined ? _args[2] : 0;
|
|
294
296
|
dontLogError = _args.length > 3 ? _args[3] : undefined;
|
|
295
|
-
LOG$
|
|
297
|
+
LOG$s.debug('DivaApiHandler.fetchData ' + url, 'DivaApiHandler, fetchData');
|
|
296
298
|
if (init) {
|
|
297
299
|
_context.next = 5;
|
|
298
300
|
break;
|
|
@@ -333,7 +335,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
333
335
|
netBytes = typeof data === 'string' ? data.length : Number((_response$headers = response.headers) === null || _response$headers === void 0 ? void 0 : _response$headers['content-length']) || undefined;
|
|
334
336
|
}
|
|
335
337
|
if (data !== null && data !== void 0 && data.Error) {
|
|
336
|
-
if (dontLogError) LOG$
|
|
338
|
+
if (dontLogError) LOG$s.warn(data.Error + ' ' + url);else LOG$s.error(new DivaUtils.DivaError(data.Error, {
|
|
337
339
|
code: 'WC_0001',
|
|
338
340
|
custom: {
|
|
339
341
|
url: url
|
|
@@ -455,7 +457,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
455
457
|
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
456
458
|
while (1) switch (_context2.prev = _context2.next) {
|
|
457
459
|
case 0:
|
|
458
|
-
LOG$
|
|
460
|
+
LOG$s.debug('getDataWithoutCache: ', {
|
|
459
461
|
queryString: queryString,
|
|
460
462
|
init: init,
|
|
461
463
|
useWebServiceApi: useWebServiceApi
|
|
@@ -497,8 +499,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
497
499
|
if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig7 = this.apiConfig) !== null && _this$apiConfig7 !== void 0 && _this$apiConfig7.api2.web) {
|
|
498
500
|
api2Url = this.apiConfig.api2.web;
|
|
499
501
|
}
|
|
500
|
-
_context2.t0 = _objectSpread$
|
|
501
|
-
_context2.t1 = _objectSpread$
|
|
502
|
+
_context2.t0 = _objectSpread$s;
|
|
503
|
+
_context2.t1 = _objectSpread$s({}, init.config.headers);
|
|
502
504
|
_context2.t2 = {};
|
|
503
505
|
_context2.next = 21;
|
|
504
506
|
return this.getSessionGuid('V', undefined, this.OrganizationId, api2Url);
|
|
@@ -533,7 +535,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
533
535
|
return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context3) {
|
|
534
536
|
while (1) switch (_context3.prev = _context3.next) {
|
|
535
537
|
case 0:
|
|
536
|
-
LOG$
|
|
538
|
+
LOG$s.debug('getDataCache: ', {
|
|
537
539
|
queryString: queryString,
|
|
538
540
|
cacheMD5: cacheMD5,
|
|
539
541
|
accountSessionGuid: accountSessionGuid,
|
|
@@ -554,14 +556,14 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
554
556
|
_context3.next = 9;
|
|
555
557
|
break;
|
|
556
558
|
}
|
|
557
|
-
LOG$
|
|
559
|
+
LOG$s.debug('getDataFromInternalCache: ' + queryString);
|
|
558
560
|
return _context3.abrupt("return", cacheHit);
|
|
559
561
|
case 9:
|
|
560
562
|
if (!(cacheMD5 && this.jsonDataCache.get(cacheMD5) && !((_this$divaWebConfigDa2 = this.divaWebConfigData) !== null && _this$divaWebConfigDa2 !== void 0 && _this$divaWebConfigDa2.addOrganizationIdToCacheKey))) {
|
|
561
563
|
_context3.next = 12;
|
|
562
564
|
break;
|
|
563
565
|
}
|
|
564
|
-
LOG$
|
|
566
|
+
LOG$s.debug('getDataFromInternalCache: ' + queryString);
|
|
565
567
|
return _context3.abrupt("return", this.jsonDataCache.get(cacheMD5));
|
|
566
568
|
case 12:
|
|
567
569
|
if (!addSession) {
|
|
@@ -611,7 +613,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
611
613
|
// SHOULD have been authenticated against an account, the planner ends up using a
|
|
612
614
|
// visitor sessionGuid (cached per organization in DataStore). Surface it so we
|
|
613
615
|
// can spot regressions instead of silently sending the wrong GUID.
|
|
614
|
-
LOG$
|
|
616
|
+
LOG$s.warn('[SESSION-GUID][API] visitor fallback used for api2 call (no accountSessionGuid passed)', {
|
|
615
617
|
callTag: "api#".concat(this.instanceId, "/call#").concat(this.apiCallCount),
|
|
616
618
|
queryString: queryString,
|
|
617
619
|
organizationId: this.OrganizationId
|
|
@@ -633,7 +635,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
633
635
|
this.jsonDataCache.set(myQS, result);
|
|
634
636
|
if (cacheMD5 && !((_this$divaWebConfigDa3 = this.divaWebConfigData) !== null && _this$divaWebConfigDa3 !== void 0 && _this$divaWebConfigDa3.addOrganizationIdToCacheKey)) this.jsonDataCache.set(cacheMD5, result);
|
|
635
637
|
}
|
|
636
|
-
LOG$
|
|
638
|
+
LOG$s.debug('getDataFromApi: ' + queryString);
|
|
637
639
|
return _context3.abrupt("return", result);
|
|
638
640
|
case 41:
|
|
639
641
|
case "end":
|
|
@@ -669,7 +671,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
669
671
|
case 5:
|
|
670
672
|
_context4.prev = 5;
|
|
671
673
|
_context4.t0 = _context4["catch"](1);
|
|
672
|
-
LOG$
|
|
674
|
+
LOG$s.error(new DivaUtils.DivaError('could not create product in Configurator', {
|
|
673
675
|
cause: _context4.t0
|
|
674
676
|
}));
|
|
675
677
|
return _context4.abrupt("return", false);
|
|
@@ -1532,11 +1534,11 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1532
1534
|
headers = this.getAiServiceAuthHeaders(leadKey);
|
|
1533
1535
|
_context9.next = 4;
|
|
1534
1536
|
return this.fetchData(url, {
|
|
1535
|
-
data: _objectSpread$
|
|
1537
|
+
data: _objectSpread$s(_objectSpread$s({}, data), {}, {
|
|
1536
1538
|
organizationId: this.OrganizationId
|
|
1537
1539
|
}),
|
|
1538
1540
|
config: {
|
|
1539
|
-
headers: _objectSpread$
|
|
1541
|
+
headers: _objectSpread$s(_objectSpread$s({}, headers), {}, {
|
|
1540
1542
|
'X-Session-Id': DivaUtils__default["default"].SessionId,
|
|
1541
1543
|
'X-Configurator-Id': (_DivaUtils$Configurat = DivaUtils__default["default"].ConfigurationId) !== null && _DivaUtils$Configurat !== void 0 ? _DivaUtils$Configurat : ''
|
|
1542
1544
|
})
|
|
@@ -1654,7 +1656,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1654
1656
|
status = _context12.t0 === null || _context12.t0 === void 0 || (_e$response3 = _context12.t0.response) === null || _e$response3 === void 0 ? void 0 : _e$response3.status;
|
|
1655
1657
|
body = _context12.t0 === null || _context12.t0 === void 0 || (_e$response4 = _context12.t0.response) === null || _e$response4 === void 0 ? void 0 : _e$response4.data;
|
|
1656
1658
|
apiMessage = typeof (body === null || body === void 0 ? void 0 : body.error) === 'string' ? body.error : _context12.t0 === null || _context12.t0 === void 0 ? void 0 : _context12.t0.message;
|
|
1657
|
-
LOG$
|
|
1659
|
+
LOG$s.error(new Error("Failed to create lead key for email ".concat(email, ": ").concat(apiMessage)));
|
|
1658
1660
|
throw new DivaUtils.DivaError(apiMessage || 'Failed to create lead key', {
|
|
1659
1661
|
code: 'LEAD_KEY_REQUEST_FAILED',
|
|
1660
1662
|
custom: {
|
|
@@ -1750,7 +1752,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1750
1752
|
case 9:
|
|
1751
1753
|
_context14.prev = 9;
|
|
1752
1754
|
_context14.t0 = _context14["catch"](4);
|
|
1753
|
-
LOG$
|
|
1755
|
+
LOG$s.error(new DivaUtils.DivaError('Error Connecting to Support-Service-LivePlanner', {
|
|
1754
1756
|
cause: _context14.t0
|
|
1755
1757
|
}));
|
|
1756
1758
|
case 12:
|
|
@@ -1797,7 +1799,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1797
1799
|
case 10:
|
|
1798
1800
|
_context15.prev = 10;
|
|
1799
1801
|
_context15.t0 = _context15["catch"](3);
|
|
1800
|
-
LOG$
|
|
1802
|
+
LOG$s.error({
|
|
1801
1803
|
message: 'Could not fetch dimension',
|
|
1802
1804
|
name: 'get dimension error'
|
|
1803
1805
|
});
|
|
@@ -1855,7 +1857,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1855
1857
|
case 9:
|
|
1856
1858
|
_context16.prev = 9;
|
|
1857
1859
|
_context16.t0 = _context16["catch"](3);
|
|
1858
|
-
LOG$
|
|
1860
|
+
LOG$s.error({
|
|
1859
1861
|
message: 'Could not fetch catalogXml',
|
|
1860
1862
|
name: 'get catalogXml error'
|
|
1861
1863
|
});
|
|
@@ -1934,7 +1936,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1934
1936
|
case 14:
|
|
1935
1937
|
_context17.prev = 14;
|
|
1936
1938
|
_context17.t0 = _context17["catch"](6);
|
|
1937
|
-
LOG$
|
|
1939
|
+
LOG$s.error(new DivaUtils.DivaError('Error Connecting to Report Service', {
|
|
1938
1940
|
cause: _context17.t0
|
|
1939
1941
|
}));
|
|
1940
1942
|
case 17:
|
|
@@ -2005,6 +2007,550 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
2005
2007
|
}]);
|
|
2006
2008
|
}();
|
|
2007
2009
|
|
|
2010
|
+
/**
|
|
2011
|
+
* Whether a flag property is switched on: empty, '0' and 'false' (any case, trimmed) are OFF, any other value is ON.
|
|
2012
|
+
* Every flag parser reads its value through this.
|
|
2013
|
+
*/
|
|
2014
|
+
function isPropertyOn(value) {
|
|
2015
|
+
if (value === undefined || value === null) return false;
|
|
2016
|
+
if (typeof value === 'boolean') return value;
|
|
2017
|
+
if (typeof value === 'number') return value !== 0;
|
|
2018
|
+
var token = String(value).trim().toLowerCase();
|
|
2019
|
+
return token !== '' && token !== '0' && token !== 'false';
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
/**
|
|
2023
|
+
* The VALUE ENCODING of every catalog/article/option/option-value property, keyed by codex: the type the planner reads
|
|
2024
|
+
* the value as, and how a legacy TEXT of it is read.
|
|
2025
|
+
*
|
|
2026
|
+
* Enricher values are typed (a flag, a number, a list, JSON - stored under ALL) and taken as they are. A text - of a
|
|
2027
|
+
* CE catalog or mask, or the legacy text the enricher renders for old configurators - is read the way the parsers read
|
|
2028
|
+
* it before values were typed: '1' for one flag, 'true' for the next, a ';' list for a third (readPropertyValue,
|
|
2029
|
+
* propertyValues.ts). The agent's property-encodings knowhow doc is generated from this table
|
|
2030
|
+
* (scripts/generatePropertyEncodingsDoc.py).
|
|
2031
|
+
*
|
|
2032
|
+
* Hand-maintained: add the codex here when one of the four parsers gets a `case` for it
|
|
2033
|
+
* CatalogData.ts | CatalogArticleData.ts | CatalogOptionData.ts | CatalogOptionValueData.ts
|
|
2034
|
+
* `propertyValueCodec.test.ts` fails when a parser case has no entry here.
|
|
2035
|
+
*/
|
|
2036
|
+
|
|
2037
|
+
/** The entity a property hangs on; the same codex can mean different things on different entities. */
|
|
2038
|
+
|
|
2039
|
+
/**
|
|
2040
|
+
* The type a property is read as, and how its legacy text is read. The boolean dialects are NOT interchangeable: a
|
|
2041
|
+
* text 'true' where the dialect is `boolean:1` reads as false.
|
|
2042
|
+
* - `string`: a text, as it is. `opaque`: a text in a format of its own, which the property's parser reads.
|
|
2043
|
+
* - `number`: Number(text).
|
|
2044
|
+
* - `boolean:1`: true for '1' only. `boolean:1|true`: for '1' or 'true' (any case). `boolean:on`: isPropertyOn - false
|
|
2045
|
+
* for empty, '0' and 'false'. `boolean:not-0`: false for '0' only.
|
|
2046
|
+
* - `list:;` / `list:,`: a list of texts, the text split at ';' / ','.
|
|
2047
|
+
* - `all-or-list:;`: `{ all: true }` for '1', else `{ only: [...] }` split at ';'. `boolean-or-list:;`: the same, and
|
|
2048
|
+
* `{ all: false }` for '0'.
|
|
2049
|
+
* - `json`: a JSON value, JSON.parse(text). `shape`: a JSON value of a fixed shape whose text has a format of its own.
|
|
2050
|
+
* - `ignored`: recognised by the parser and deliberately not read.
|
|
2051
|
+
*/
|
|
2052
|
+
|
|
2053
|
+
/** The encoding per property codex, for one entity. */
|
|
2054
|
+
|
|
2055
|
+
/** 96 properties parsed on the catalog entity. */
|
|
2056
|
+
var CATALOG_PROPERTIES = {
|
|
2057
|
+
'3D_COMPATIBLE_WITH_IMAGE_CACHE': 'boolean:1',
|
|
2058
|
+
ACCESSOIRE_STEP_AS_PLANNER: 'boolean:1',
|
|
2059
|
+
ADD_NEW_LINE_BEFOR_RULEDESC: 'boolean:1',
|
|
2060
|
+
ADD_PA_ON_EDO: 'opaque',
|
|
2061
|
+
ADD_POS_INVISIBILITY_TO_OL: 'boolean:1',
|
|
2062
|
+
ARTICLECONFIGALL: 'boolean:1',
|
|
2063
|
+
ARTICLECONFIGSINGLE: 'boolean:1',
|
|
2064
|
+
ARTICLE_NR: 'string',
|
|
2065
|
+
AUTO_OPEN_CONTENTITEM: 'all-or-list:;',
|
|
2066
|
+
BANNER: 'json',
|
|
2067
|
+
BUNDLE_RULES: 'json',
|
|
2068
|
+
CHECK_COLLISION_DIFFERENT_LAYERS: 'list:;',
|
|
2069
|
+
CONFIG_ACCESSOIRES: 'boolean:1',
|
|
2070
|
+
CONFIG_ONLY_ACCESSOIRES: 'boolean:1',
|
|
2071
|
+
DEFAULT_DO_SHOW_3DDIMENSIONS: 'boolean:1|true',
|
|
2072
|
+
DEFAULT_GROUPS_CLOSED: 'boolean-or-list:;',
|
|
2073
|
+
DIMENSION_CONFIG: 'json',
|
|
2074
|
+
DIVA3D_AR_FORCERTV: 'boolean:1',
|
|
2075
|
+
DIVA3D_AR_READY: 'boolean:1',
|
|
2076
|
+
DIVA3D_DISABLE_3DEXPORT: 'boolean:1',
|
|
2077
|
+
DIVA3D_PLANER_DIGITS: 'number',
|
|
2078
|
+
DIVA3D_PLANER_SHOW_ARTICLE_SVG: 'boolean:1',
|
|
2079
|
+
DIVA3D_RENDERING: 'boolean:1|true',
|
|
2080
|
+
DIVA3D_ROOM: 'string',
|
|
2081
|
+
DIVA3D_STATIC_BG_IMAGE_ROOMLIST: 'list:;',
|
|
2082
|
+
DIVA3D_USE_RTV_NEXT: 'boolean:1',
|
|
2083
|
+
DIVA_KI_READY: 'boolean:1|true',
|
|
2084
|
+
DOCKACCONAVOONLY: 'boolean:1',
|
|
2085
|
+
DONTCALCBASEPRICE: 'boolean:1',
|
|
2086
|
+
DONTHIDEOPTION: 'list:,',
|
|
2087
|
+
DONT_SAVE_ALTERNATIVERENDERINGS: 'boolean:1',
|
|
2088
|
+
DONT_SET_POSNR_FROM_PLANNER: 'boolean:1',
|
|
2089
|
+
DONT_SHOW_ACC_STEP: 'boolean:1',
|
|
2090
|
+
DONT_USE_VCODEX_FOR_BASKET: 'boolean:1',
|
|
2091
|
+
DO_SHOW_MAIN_DIMENSIONS: 'boolean:1|true',
|
|
2092
|
+
DO_USE_RULEDESC_FOR_PARTLIST: 'boolean:1',
|
|
2093
|
+
ELEMENT_COPY_AVLR: 'all-or-list:;',
|
|
2094
|
+
ENABLE_DO_SHOW_3DDIMENSIONS: 'boolean:1|true',
|
|
2095
|
+
FILTER_FOR_CHECKOUT_BUTTONS: 'list:;',
|
|
2096
|
+
FORCECONSTRUCTIONWARNINGARTICLES: 'list:;',
|
|
2097
|
+
FORCE_CONFIG_ALL_ACCESSOIRES: 'boolean:1',
|
|
2098
|
+
FORCE_CONFIG_SINGLE: 'boolean:1',
|
|
2099
|
+
HEADER_DIMENSION_IDS: 'list:;',
|
|
2100
|
+
HIDECOMPLETENESSWARNING: 'boolean:1',
|
|
2101
|
+
HIDECONSTRUCTIONWARNING: 'boolean:not-0',
|
|
2102
|
+
HIDE_2D_PLANNER: 'boolean:1',
|
|
2103
|
+
HIDE_AV_BUTTONS: 'list:;',
|
|
2104
|
+
HIDE_PLANNER_UI_ICONS: 'boolean:1',
|
|
2105
|
+
HIDE_PRICEPREVIEW_ON_OPTIONS: 'list:;',
|
|
2106
|
+
HIDE_PRICE_GROUPS_OF_OPGS: 'boolean:1',
|
|
2107
|
+
HIDE_SUBPOS_ARTICLECODEX_EKTEXT: 'boolean:1',
|
|
2108
|
+
IDM3D_CAT_CODEX: 'string',
|
|
2109
|
+
IDM3D_ENVIRONMENT: 'string',
|
|
2110
|
+
IDM3D_TRANSLATION: 'json',
|
|
2111
|
+
IGNOREDOCKINGNUMBER: 'boolean:1',
|
|
2112
|
+
IGNORELAYERAVC: 'boolean:1',
|
|
2113
|
+
IGNORELAYERAVNAVS: 'boolean:1',
|
|
2114
|
+
IGNORELAYERAVOAVU: 'boolean:1',
|
|
2115
|
+
IGNORE_ARTICLERELATIONS: 'boolean:1',
|
|
2116
|
+
IGNORE_ISDEFINED_CHECK: 'boolean:1',
|
|
2117
|
+
IGNORE_MAX_PRICE_AS_BASEPRICE: 'boolean:1',
|
|
2118
|
+
INIT_OPTIONTREE_TWICE: 'boolean:1',
|
|
2119
|
+
IS_IDM3D_CAT: 'boolean:1|true',
|
|
2120
|
+
MERGE_OPTIONS_TO_SAME_OPTION: 'shape',
|
|
2121
|
+
NOTIFICATIONS: 'json',
|
|
2122
|
+
ONCONFIG_SINGLE_DONT_GENERALIZE: 'boolean:1',
|
|
2123
|
+
PARTLIST_POSTFIX: 'shape',
|
|
2124
|
+
PLANNERTYPE: 'string',
|
|
2125
|
+
PLANNER_2DOT0: 'boolean:1',
|
|
2126
|
+
PLANNER_REPLACE_MODE: 'boolean:1',
|
|
2127
|
+
PLAN_2D_FONT_URL: 'string',
|
|
2128
|
+
PROGRAM_NR: 'string',
|
|
2129
|
+
RECONFIG_AFTER_ARTICLE_DOCKED: 'boolean:1',
|
|
2130
|
+
REPAIR_VARIANT_VALUES: 'shape',
|
|
2131
|
+
RTV_PRESET: 'json',
|
|
2132
|
+
SHOWACCESSOIREONLASTTAB: 'boolean:1',
|
|
2133
|
+
SHOWACCONDPONLY: 'boolean:1',
|
|
2134
|
+
SHOWTYPENRINPLANNER: 'boolean:1',
|
|
2135
|
+
SHOW_AI_ROOM_RENDERING_IN_SUMMARY: 'boolean:1',
|
|
2136
|
+
SHOW_AI_ROOM_RENDERING_SUMMARY: 'boolean:1',
|
|
2137
|
+
SHOW_ALL_ITEMS_IN_PLANNER: 'boolean:1',
|
|
2138
|
+
SHOW_PRICEPREVIEW_ON_OPTIONS: 'list:;',
|
|
2139
|
+
STARTFILTERPARAMS: 'list:,',
|
|
2140
|
+
STARTHIDEARTICLES: 'list:;',
|
|
2141
|
+
START_PLANNER_ARTICLE: 'list:;',
|
|
2142
|
+
SUMMARY_TABGROUP_POSITION: 'list:;',
|
|
2143
|
+
USEBOXPLANNER: 'all-or-list:;',
|
|
2144
|
+
USEGLOBALSVGSCALE: 'boolean:1',
|
|
2145
|
+
USEPOSCOUNTVALUE: 'boolean:1',
|
|
2146
|
+
USEPRGASOPVARTICLENR: 'boolean:1',
|
|
2147
|
+
USE_DECISION_POS_COUNT_VALUE: 'boolean:1',
|
|
2148
|
+
USE_DIOMEX_CONFIG_LOGIC: 'boolean:1',
|
|
2149
|
+
USE_SHELFPLANNER_RTV: 'boolean:1',
|
|
2150
|
+
USE_SHORT_NAME_AS_NAME: 'boolean:1',
|
|
2151
|
+
USE_TYPENR_AS_ARTICLENR_EKTEXT: 'boolean:1',
|
|
2152
|
+
WARNINGS: 'json'
|
|
2153
|
+
};
|
|
2154
|
+
|
|
2155
|
+
/** 31 properties parsed on the article entity. */
|
|
2156
|
+
var ARTICLE_PROPERTIES = {
|
|
2157
|
+
'3DMODELNAME': 'string',
|
|
2158
|
+
ACCESSOIRE_POS_PRIO: 'number',
|
|
2159
|
+
ADD_AS_ZKAT: 'boolean:1|true',
|
|
2160
|
+
BASIC_UNIT_PRICE: 'number',
|
|
2161
|
+
BUNDLE_RULES: 'json',
|
|
2162
|
+
CONTENT_ITEM: 'string',
|
|
2163
|
+
DEPTH_HAS_PRICE: 'boolean:on',
|
|
2164
|
+
DO_NOT_DEL_ACC_IF_NOT_DOCKED: 'boolean:on',
|
|
2165
|
+
GROUP_CONTENT_ITEM: 'string',
|
|
2166
|
+
HAS3D: 'boolean:on',
|
|
2167
|
+
HEIGHTGRIDABOVE: 'number',
|
|
2168
|
+
HEIGHTGRIDBELOW: 'number',
|
|
2169
|
+
HEIGHTGRIDUSED: 'number',
|
|
2170
|
+
HEIGHT_HAS_PRICE: 'boolean:on',
|
|
2171
|
+
HIDE_IN_PLANNERSTEP: 'boolean:on',
|
|
2172
|
+
IDM3D_SKIP: 'boolean:on',
|
|
2173
|
+
INVALID_ACCESSORIES: 'list:,',
|
|
2174
|
+
MAX_PLANNING_COUNT: 'number',
|
|
2175
|
+
ON_CONFIG_OPTION: 'string',
|
|
2176
|
+
ON_SET_CONFIG_OPTION: 'string',
|
|
2177
|
+
OPTIONS_FOR_PRINT: 'list:;',
|
|
2178
|
+
ORDER_POSNR: 'string',
|
|
2179
|
+
OVERWRITE_PARENT_DEPTH: 'boolean:on',
|
|
2180
|
+
OVERWRITE_PARENT_HEIGHT: 'boolean:on',
|
|
2181
|
+
OVERWRITE_PARENT_WIDTH: 'boolean:on',
|
|
2182
|
+
RETAIL_PREFIX: 'string',
|
|
2183
|
+
TABGROUP: 'string',
|
|
2184
|
+
TABGROUP_OPTIONS: 'string',
|
|
2185
|
+
TYPE_NO: 'string',
|
|
2186
|
+
WIDTH_HAS_PRICE: 'boolean:on',
|
|
2187
|
+
ZUBEHOER_FAMILIE: 'string'
|
|
2188
|
+
};
|
|
2189
|
+
|
|
2190
|
+
/** 41 properties parsed on the option entity. */
|
|
2191
|
+
var OPTION_PROPERTIES = {
|
|
2192
|
+
ADDITIONAL_GROUP_FILTER: 'json',
|
|
2193
|
+
ADD_OPT_TO_TABGROUP_IN_PL_SUM: 'string',
|
|
2194
|
+
ADD_TO_WWS: 'boolean:on',
|
|
2195
|
+
CHECK_FOR_REVERSE_CHANGES: 'shape',
|
|
2196
|
+
CONTENT_ITEM: 'string',
|
|
2197
|
+
CONTENT_ITEM_TEASER: 'json',
|
|
2198
|
+
CUSTOM_DIMENSION: 'boolean:on',
|
|
2199
|
+
CUSTOM_DIMENSION_TEXT: 'string',
|
|
2200
|
+
DEFAULT_SIBLING_OPTION: 'string',
|
|
2201
|
+
DESCRIPTION: 'string',
|
|
2202
|
+
DIAMETER: 'boolean:on',
|
|
2203
|
+
EshopCategoryMapping: 'ignored',
|
|
2204
|
+
EshopSearchRelevant: 'ignored',
|
|
2205
|
+
FEATURE_TYPE: 'ignored',
|
|
2206
|
+
FREETEXT_DEFAULT_VALUE: 'string',
|
|
2207
|
+
GROUP_OPTIONS_LEFT_AND_RIGHT: 'shape',
|
|
2208
|
+
HIDE_OPTION_IN_CONFIGURATOR: 'boolean:on',
|
|
2209
|
+
IDM3D_TARGET: 'list:,',
|
|
2210
|
+
IGNORE_GROUPS: 'boolean:1',
|
|
2211
|
+
IGNORE_PGR_GROUP_POSITION: 'boolean:1',
|
|
2212
|
+
INFO_PDF: 'string',
|
|
2213
|
+
INFO_URL: 'string',
|
|
2214
|
+
ION_COMMENT_TEXT: 'ignored',
|
|
2215
|
+
ISDEFAULTVALUEFOROPTIONS: 'string',
|
|
2216
|
+
IS_MAIN_COLOR: 'boolean:on',
|
|
2217
|
+
IS_STATE: 'boolean:on',
|
|
2218
|
+
IsArtName: 'ignored',
|
|
2219
|
+
IsSalesText: 'ignored',
|
|
2220
|
+
MERGE_IDM_TO_OPG: 'string',
|
|
2221
|
+
ONLY_VISIBLE_IF_CONFIG_ALL: 'boolean:on',
|
|
2222
|
+
ONLY_VISIBLE_IF_CONFIG_SINGLE: 'boolean:on',
|
|
2223
|
+
ONLY_VISIBLE_IF_NOT_UNDOCK: 'boolean:on',
|
|
2224
|
+
REQUIRED_OPTION: 'boolean:on',
|
|
2225
|
+
REQUIRES_USER_INPUT: 'boolean:on',
|
|
2226
|
+
SETNAME: 'boolean:on',
|
|
2227
|
+
SHOW_FILTER: 'boolean:1',
|
|
2228
|
+
SHOW_IN_BASKET_WHEN_HAS_PRICE: 'ignored',
|
|
2229
|
+
SHOW_IN_VARIANTDESC: 'boolean:on',
|
|
2230
|
+
SHOW_SEARCHBAR: 'boolean:1',
|
|
2231
|
+
SHOW_SEPARAT_ON_TABGROUP: 'string',
|
|
2232
|
+
SUGGESTED_OPTION: 'boolean:on'
|
|
2233
|
+
};
|
|
2234
|
+
|
|
2235
|
+
/** 31 properties parsed on the optionValue entity. */
|
|
2236
|
+
var OPTIONVALUE_PROPERTIES = {
|
|
2237
|
+
ADD_TO_MEASURE: 'shape',
|
|
2238
|
+
CONTENT_ITEM: 'string',
|
|
2239
|
+
CUSTOM_DIMENSION: 'opaque',
|
|
2240
|
+
DEFAULT_VALUE: 'boolean:on',
|
|
2241
|
+
EshopCategoryMapping: 'ignored',
|
|
2242
|
+
GROUP_CONTENT_ITEM: 'string',
|
|
2243
|
+
HIDE_IN_SUMMARY: 'boolean:on',
|
|
2244
|
+
IDM3D_VALUE: 'string',
|
|
2245
|
+
INFO_PDF: 'string',
|
|
2246
|
+
INFO_URL: 'string',
|
|
2247
|
+
ION_COMMENT_TEXT: 'ignored',
|
|
2248
|
+
IS_NOT_RELEVANT: 'boolean:on',
|
|
2249
|
+
IsArtName: 'ignored',
|
|
2250
|
+
IsVariantAttribute: 'boolean:1',
|
|
2251
|
+
MEASURE_MAXIMUM: 'string',
|
|
2252
|
+
MEASURE_MINIMUM: 'string',
|
|
2253
|
+
MEASURE_STEP: 'string',
|
|
2254
|
+
MEASURE_UNIT: 'string',
|
|
2255
|
+
ONLY_VISIBLE_IF_NOT_UNDOCK: 'string',
|
|
2256
|
+
ON_RULE: 'string',
|
|
2257
|
+
OPTION_FREE_TEXT: 'boolean:on',
|
|
2258
|
+
PIMFlatValues: 'boolean:1',
|
|
2259
|
+
PRICE_UNIT: 'string',
|
|
2260
|
+
PriceTageRelevant: 'ignored',
|
|
2261
|
+
SAME_OPV: 'string',
|
|
2262
|
+
SETNAME: 'string',
|
|
2263
|
+
SET_BY_RULE: 'string',
|
|
2264
|
+
SET_CONFIG: 'string',
|
|
2265
|
+
SUMMARY_CODEX: 'string',
|
|
2266
|
+
TopFilterAttribute: 'ignored',
|
|
2267
|
+
VIEWPOINTNAME: 'string'
|
|
2268
|
+
};
|
|
2269
|
+
var PROPERTY_SCHEMAS = {
|
|
2270
|
+
catalog: CATALOG_PROPERTIES,
|
|
2271
|
+
article: ARTICLE_PROPERTIES,
|
|
2272
|
+
option: OPTION_PROPERTIES,
|
|
2273
|
+
optionValue: OPTIONVALUE_PROPERTIES
|
|
2274
|
+
};
|
|
2275
|
+
|
|
2276
|
+
/** A catalog-prefixed codex ('MYCAT__USEBOXPLANNER') in its bare form, the same way the parsers strip the prefix. */
|
|
2277
|
+
var bareCodex = function bareCodex(codex) {
|
|
2278
|
+
return codex.includes('__') ? codex.slice(codex.indexOf('__') + 2) : codex;
|
|
2279
|
+
};
|
|
2280
|
+
|
|
2281
|
+
/**
|
|
2282
|
+
* The encoding of one property, or undefined when the codex is not one the engine parses - an organization's own
|
|
2283
|
+
* key, which stays free text. A catalog-prefixed codex resolves to its bare form (bareCodex).
|
|
2284
|
+
*/
|
|
2285
|
+
function propertyEncodingOf(codex, entity) {
|
|
2286
|
+
var bare = bareCodex(codex);
|
|
2287
|
+
var entities = entity ? [entity] : ['catalog', 'article', 'option', 'optionValue'];
|
|
2288
|
+
for (var _i = 0, _entities = entities; _i < _entities.length; _i++) {
|
|
2289
|
+
var candidate = _entities[_i];
|
|
2290
|
+
// Own keys only: a codex like 'constructor' or 'toString' would otherwise resolve to an inherited function.
|
|
2291
|
+
if (Object.prototype.hasOwnProperty.call(PROPERTY_SCHEMAS[candidate], bare)) return PROPERTY_SCHEMAS[candidate][bare];
|
|
2292
|
+
}
|
|
2293
|
+
return undefined;
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
function _createForOfIteratorHelper$q(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$q(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; } } }; }
|
|
2297
|
+
function _unsupportedIterableToArray$q(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$q(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$q(r, a) : void 0; } }
|
|
2298
|
+
function _arrayLikeToArray$q(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; }
|
|
2299
|
+
var LOG$r = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
2300
|
+
|
|
2301
|
+
/** A JSON value: an object or an array. */
|
|
2302
|
+
|
|
2303
|
+
/**
|
|
2304
|
+
* A property value as the planner reads it, in the type of its definition: a flag, a number, a list of texts, a JSON
|
|
2305
|
+
* value or a text.
|
|
2306
|
+
*/
|
|
2307
|
+
|
|
2308
|
+
/** What an IDM / enricher property carries: a typed value under ALL, or a text per language. */
|
|
2309
|
+
|
|
2310
|
+
/** The key a typed value is stored under: one value for all languages. */
|
|
2311
|
+
var ALL = 'ALL';
|
|
2312
|
+
var isValues = function isValues(stored) {
|
|
2313
|
+
return _typeof__default["default"](stored) === 'object' && stored !== null && !Array.isArray(stored);
|
|
2314
|
+
};
|
|
2315
|
+
var isPropertyValue = function isPropertyValue(value) {
|
|
2316
|
+
return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' || _typeof__default["default"](value) === 'object' && value !== null;
|
|
2317
|
+
};
|
|
2318
|
+
|
|
2319
|
+
/** The typed value under ALL, else the value of the language, else the first one - as DivaUtils.getLocals picks it. */
|
|
2320
|
+
function valueOf(values, lang) {
|
|
2321
|
+
if (ALL in values) return values[ALL];
|
|
2322
|
+
return values[lang.toUpperCase()] || values[lang.toLowerCase()] || Object.values(values)[0];
|
|
2323
|
+
}
|
|
2324
|
+
function readJson(codex, text) {
|
|
2325
|
+
try {
|
|
2326
|
+
return JSON.parse(text);
|
|
2327
|
+
} catch (e) {
|
|
2328
|
+
LOG$r.warn("Invalid JSON in property ".concat(codex), e);
|
|
2329
|
+
return undefined;
|
|
2330
|
+
}
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
/** The legacy texts of the JSON values with a fixed shape, read the way their parsers read them. */
|
|
2334
|
+
var SHAPE_TEXTS = {
|
|
2335
|
+
// 'name;l' - a side other than l/r is no side
|
|
2336
|
+
GROUP_OPTIONS_LEFT_AND_RIGHT: function GROUP_OPTIONS_LEFT_AND_RIGHT(text) {
|
|
2337
|
+
var _text$split = text.split(';'),
|
|
2338
|
+
_text$split2 = _slicedToArray__default["default"](_text$split, 2),
|
|
2339
|
+
group = _text$split2[0],
|
|
2340
|
+
side = _text$split2[1];
|
|
2341
|
+
return {
|
|
2342
|
+
group: group,
|
|
2343
|
+
side: side === null || side === void 0 ? void 0 : side.toLowerCase()
|
|
2344
|
+
};
|
|
2345
|
+
},
|
|
2346
|
+
// 'BLOCK;A;B' - anything but BLOCK warns; an empty text checks nothing
|
|
2347
|
+
CHECK_FOR_REVERSE_CHANGES: function CHECK_FOR_REVERSE_CHANGES(text) {
|
|
2348
|
+
if (!text) return undefined;
|
|
2349
|
+
var _text$split3 = text.split(';'),
|
|
2350
|
+
_text$split4 = _toArray__default["default"](_text$split3),
|
|
2351
|
+
mode = _text$split4[0],
|
|
2352
|
+
options = _text$split4.slice(1);
|
|
2353
|
+
return {
|
|
2354
|
+
mode: mode.startsWith('BLOCK') ? 'BLOCK' : 'WARN',
|
|
2355
|
+
options: options
|
|
2356
|
+
};
|
|
2357
|
+
},
|
|
2358
|
+
// 'A,B;C,D'
|
|
2359
|
+
MERGE_OPTIONS_TO_SAME_OPTION: function MERGE_OPTIONS_TO_SAME_OPTION(text) {
|
|
2360
|
+
return text.split(';').map(function (group) {
|
|
2361
|
+
return group.split(',');
|
|
2362
|
+
});
|
|
2363
|
+
},
|
|
2364
|
+
// 'rule:postfix;rule:postfix'
|
|
2365
|
+
PARTLIST_POSTFIX: function PARTLIST_POSTFIX(text) {
|
|
2366
|
+
return text.split(';').map(function (entry) {
|
|
2367
|
+
var _entry$split = entry.split(':'),
|
|
2368
|
+
_entry$split2 = _slicedToArray__default["default"](_entry$split, 2),
|
|
2369
|
+
rule = _entry$split2[0],
|
|
2370
|
+
postfix = _entry$split2[1];
|
|
2371
|
+
return {
|
|
2372
|
+
rule: rule,
|
|
2373
|
+
postfix: postfix
|
|
2374
|
+
};
|
|
2375
|
+
});
|
|
2376
|
+
},
|
|
2377
|
+
// 'op:value:option;...'
|
|
2378
|
+
ADD_TO_MEASURE: function ADD_TO_MEASURE(text) {
|
|
2379
|
+
return text.split(';').map(function (entry) {
|
|
2380
|
+
var _entry$split3 = entry.split(':'),
|
|
2381
|
+
_entry$split4 = _slicedToArray__default["default"](_entry$split3, 3),
|
|
2382
|
+
op = _entry$split4[0],
|
|
2383
|
+
value = _entry$split4[1],
|
|
2384
|
+
option = _entry$split4[2];
|
|
2385
|
+
return {
|
|
2386
|
+
op: op,
|
|
2387
|
+
value: Number(value),
|
|
2388
|
+
option: option
|
|
2389
|
+
};
|
|
2390
|
+
});
|
|
2391
|
+
},
|
|
2392
|
+
// 'feature:value;feature:value;;...' - an entry without a target repairs nothing
|
|
2393
|
+
REPAIR_VARIANT_VALUES: function REPAIR_VARIANT_VALUES(text) {
|
|
2394
|
+
var repairs = {};
|
|
2395
|
+
var _iterator = _createForOfIteratorHelper$q(text.split(';;').map(function (entry) {
|
|
2396
|
+
return entry.split(';');
|
|
2397
|
+
})),
|
|
2398
|
+
_step;
|
|
2399
|
+
try {
|
|
2400
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
2401
|
+
var _step$value = _slicedToArray__default["default"](_step.value, 2),
|
|
2402
|
+
from = _step$value[0],
|
|
2403
|
+
to = _step$value[1];
|
|
2404
|
+
if (to !== undefined) repairs[from] = to;
|
|
2405
|
+
}
|
|
2406
|
+
} catch (err) {
|
|
2407
|
+
_iterator.e(err);
|
|
2408
|
+
} finally {
|
|
2409
|
+
_iterator.f();
|
|
2410
|
+
}
|
|
2411
|
+
return repairs;
|
|
2412
|
+
}
|
|
2413
|
+
};
|
|
2414
|
+
var isRecord = function isRecord(value) {
|
|
2415
|
+
return _typeof__default["default"](value) === 'object' && value !== null && !Array.isArray(value);
|
|
2416
|
+
};
|
|
2417
|
+
var isTexts = function isTexts(value) {
|
|
2418
|
+
return Array.isArray(value) && value.every(function (entry) {
|
|
2419
|
+
return typeof entry === 'string';
|
|
2420
|
+
});
|
|
2421
|
+
};
|
|
2422
|
+
/** {"all": true} or {"only": [texts]} - and {"all": false} where the key knows "none". */
|
|
2423
|
+
var allOrOnly = function allOrOnly(allowNone) {
|
|
2424
|
+
return function (value) {
|
|
2425
|
+
return isRecord(value) && (typeof value.all === 'boolean' ? value.all || allowNone : isTexts(value.only));
|
|
2426
|
+
};
|
|
2427
|
+
};
|
|
2428
|
+
|
|
2429
|
+
/** The shapes of the JSON values the parsers read member by member - as the enricher checks them on a write (idm PropertyValueShapes). */
|
|
2430
|
+
var SHAPES = {
|
|
2431
|
+
GROUP_OPTIONS_LEFT_AND_RIGHT: isRecord,
|
|
2432
|
+
CHECK_FOR_REVERSE_CHANGES: function CHECK_FOR_REVERSE_CHANGES(value) {
|
|
2433
|
+
return isRecord(value) && isTexts(value.options);
|
|
2434
|
+
},
|
|
2435
|
+
MERGE_OPTIONS_TO_SAME_OPTION: function MERGE_OPTIONS_TO_SAME_OPTION(value) {
|
|
2436
|
+
return Array.isArray(value) && value.every(isTexts);
|
|
2437
|
+
},
|
|
2438
|
+
PARTLIST_POSTFIX: function PARTLIST_POSTFIX(value) {
|
|
2439
|
+
return Array.isArray(value) && value.every(isRecord);
|
|
2440
|
+
},
|
|
2441
|
+
ADD_TO_MEASURE: function ADD_TO_MEASURE(value) {
|
|
2442
|
+
return Array.isArray(value) && value.every(isRecord);
|
|
2443
|
+
},
|
|
2444
|
+
REPAIR_VARIANT_VALUES: function REPAIR_VARIANT_VALUES(value) {
|
|
2445
|
+
return isRecord(value) && Object.values(value).every(function (to) {
|
|
2446
|
+
return typeof to === 'string';
|
|
2447
|
+
});
|
|
2448
|
+
},
|
|
2449
|
+
DEFAULT_GROUPS_CLOSED: allOrOnly(true),
|
|
2450
|
+
USEBOXPLANNER: allOrOnly(false),
|
|
2451
|
+
ELEMENT_COPY_AVLR: allOrOnly(false),
|
|
2452
|
+
AUTO_OPEN_CONTENTITEM: allOrOnly(false)
|
|
2453
|
+
};
|
|
2454
|
+
|
|
2455
|
+
/**
|
|
2456
|
+
* The value of a JSON property with a fixed shape; undefined for a value of another shape - set elsewhere, or left from
|
|
2457
|
+
* before its definition's type changed - which is logged and ignored instead of failing the whole catalog.
|
|
2458
|
+
*/
|
|
2459
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- the shape is checked; its members are the key's own
|
|
2460
|
+
function shapedJsonOf(codex, value) {
|
|
2461
|
+
var _SHAPES$codex;
|
|
2462
|
+
if (value === undefined || (_SHAPES$codex = SHAPES[codex]) !== null && _SHAPES$codex !== void 0 && _SHAPES$codex.call(SHAPES, value)) return value;
|
|
2463
|
+
LOG$r.warn("Invalid ".concat(codex, " property - its value does not have the shape the key takes"), value);
|
|
2464
|
+
return undefined;
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
/** A legacy text in the type of its encoding, read exactly the way the parsers read the text before values were typed. */
|
|
2468
|
+
function readText(codex, encoding, text) {
|
|
2469
|
+
switch (encoding) {
|
|
2470
|
+
case 'boolean:1':
|
|
2471
|
+
return text == '1';
|
|
2472
|
+
case 'boolean:1|true':
|
|
2473
|
+
return text == '1' || text.toLowerCase() == 'true';
|
|
2474
|
+
case 'boolean:on':
|
|
2475
|
+
return isPropertyOn(text);
|
|
2476
|
+
case 'boolean:not-0':
|
|
2477
|
+
return text != '0';
|
|
2478
|
+
case 'number':
|
|
2479
|
+
return Number(text);
|
|
2480
|
+
case 'list:;':
|
|
2481
|
+
return text.split(';');
|
|
2482
|
+
case 'list:,':
|
|
2483
|
+
return text.split(',');
|
|
2484
|
+
case 'all-or-list:;':
|
|
2485
|
+
return text == '1' ? {
|
|
2486
|
+
all: true
|
|
2487
|
+
} : {
|
|
2488
|
+
only: text.split(';')
|
|
2489
|
+
};
|
|
2490
|
+
case 'boolean-or-list:;':
|
|
2491
|
+
return text == '1' || text == '0' ? {
|
|
2492
|
+
all: text == '1'
|
|
2493
|
+
} : {
|
|
2494
|
+
only: text.split(';')
|
|
2495
|
+
};
|
|
2496
|
+
case 'json':
|
|
2497
|
+
return readJson(codex, text);
|
|
2498
|
+
case 'shape':
|
|
2499
|
+
return SHAPE_TEXTS[codex](text);
|
|
2500
|
+
default:
|
|
2501
|
+
return text;
|
|
2502
|
+
}
|
|
2503
|
+
}
|
|
2504
|
+
|
|
2505
|
+
/**
|
|
2506
|
+
* The value of a property as the planner reads it. `stored` is what the property carries: the values per language of
|
|
2507
|
+
* an IDM / enricher property, or the text of a CE property. A typed value (under ALL) is taken as it is; a text - of a
|
|
2508
|
+
* CE catalog or mask, of a text property, or the legacy text the enricher renders for old configurators - is read in
|
|
2509
|
+
* the encoding the entity parses the codex with. A codex the planner does not parse keeps its text.
|
|
2510
|
+
*/
|
|
2511
|
+
function readPropertyValue(entity, codex, stored, lang) {
|
|
2512
|
+
var value = isValues(stored) ? valueOf(stored, lang) : stored;
|
|
2513
|
+
if (typeof value === 'string') {
|
|
2514
|
+
var encoding = propertyEncodingOf(codex, entity);
|
|
2515
|
+
return encoding ? readText(bareCodex(codex), encoding, value) : value;
|
|
2516
|
+
}
|
|
2517
|
+
return isPropertyValue(value) ? value : undefined;
|
|
2518
|
+
}
|
|
2519
|
+
|
|
2520
|
+
/** A text property's text; undefined for any other value. */
|
|
2521
|
+
var textOf = function textOf(value) {
|
|
2522
|
+
return typeof value === 'string' ? value : undefined;
|
|
2523
|
+
};
|
|
2524
|
+
|
|
2525
|
+
/** A list property's entries; an empty list for any other value. */
|
|
2526
|
+
var listOf = function listOf(value) {
|
|
2527
|
+
return Array.isArray(value) ? value.map(String) : [];
|
|
2528
|
+
};
|
|
2529
|
+
|
|
2530
|
+
/**
|
|
2531
|
+
* A JSON property's value - handed on unchecked, as `JSON.parse` handed on the text before: its structure is the
|
|
2532
|
+
* property's own (bundle rules, notifications, a fixed shape, ...). Undefined for any other value.
|
|
2533
|
+
*/
|
|
2534
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- the structure is each property's own, as JSON.parse's result was
|
|
2535
|
+
var jsonOf = function jsonOf(value) {
|
|
2536
|
+
return _typeof__default["default"](value) === 'object' ? value : undefined;
|
|
2537
|
+
};
|
|
2538
|
+
|
|
2539
|
+
/**
|
|
2540
|
+
* The texts the basket's MetaData carries for a property the planner does not parse (`values: string[]`): a text split
|
|
2541
|
+
* at ';' as before, a list its entries, a flag '1' or '0', a number its text, a JSON value its JSON text.
|
|
2542
|
+
*/
|
|
2543
|
+
function propertyTexts(value) {
|
|
2544
|
+
if (value === undefined) return [];
|
|
2545
|
+
if (typeof value === 'string') return value.split(';');
|
|
2546
|
+
if (typeof value === 'boolean') return [value ? '1' : '0'];
|
|
2547
|
+
if (typeof value === 'number') return [String(value)];
|
|
2548
|
+
if (Array.isArray(value) && value.every(function (entry) {
|
|
2549
|
+
return typeof entry === 'string';
|
|
2550
|
+
})) return value.map(String);
|
|
2551
|
+
return [JSON.stringify(value)];
|
|
2552
|
+
}
|
|
2553
|
+
|
|
2008
2554
|
var Vector2 = /*#__PURE__*/function () {
|
|
2009
2555
|
function Vector2(x, y) {
|
|
2010
2556
|
var interpretation = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'any';
|
|
@@ -2484,239 +3030,6 @@ var CatalogPlannerArticleData = /*#__PURE__*/function () {
|
|
|
2484
3030
|
}]);
|
|
2485
3031
|
}();
|
|
2486
3032
|
|
|
2487
|
-
/**
|
|
2488
|
-
* Reading and writing a property VALUE in the encoding its own parser expects.
|
|
2489
|
-
*
|
|
2490
|
-
* Every property travels as a string and each one decides how that string is read (see propertySchemaRegistry).
|
|
2491
|
-
* An editor therefore cannot write "a boolean" - it has to write the dialect of THAT property, or the parser reads
|
|
2492
|
-
* the opposite of what the user chose. These two functions are that translation:
|
|
2493
|
-
*
|
|
2494
|
-
* - `decodePropertyValue` is DELIBERATELY TOLERANT. Stored values are a decade of history: the raw strings the
|
|
2495
|
-
* parsers document, real booleans and numbers written by editors that typed them natively, and the '.ToString()'
|
|
2496
|
-
* spellings those turn into on the way out ('True'). All of them must display as what they mean, or an editor
|
|
2497
|
-
* would show a flag as off and silently turn it off on the next save.
|
|
2498
|
-
* - `encodePropertyValue` is STRICT. It emits exactly one spelling per encoding - the one the parser reads.
|
|
2499
|
-
*/
|
|
2500
|
-
|
|
2501
|
-
/** What a decoded property value can be, before an editor renders it. */
|
|
2502
|
-
|
|
2503
|
-
/**
|
|
2504
|
-
* Whether a flag property is switched on: empty, '0' and 'false' (any case, trimmed) are OFF, any other value is ON.
|
|
2505
|
-
* Every flag parser reads its value through this, so an editor's off-state and the engine's agree.
|
|
2506
|
-
*/
|
|
2507
|
-
function isPropertyOn(value) {
|
|
2508
|
-
if (value === undefined || value === null) return false;
|
|
2509
|
-
if (typeof value === 'boolean') return value;
|
|
2510
|
-
if (typeof value === 'number') return value !== 0;
|
|
2511
|
-
var token = String(value).trim().toLowerCase();
|
|
2512
|
-
return token !== '' && token !== '0' && token !== 'false';
|
|
2513
|
-
}
|
|
2514
|
-
|
|
2515
|
-
/** The raw string a stored value amounts to - what `.ToString()` would hand the parser. */
|
|
2516
|
-
function rawStringOf(stored) {
|
|
2517
|
-
if (stored === undefined || stored === null) return '';
|
|
2518
|
-
if (typeof stored === 'string') return stored;
|
|
2519
|
-
// A real boolean stored natively reaches the parser as .NET spells it, capital included.
|
|
2520
|
-
if (typeof stored === 'boolean') return stored ? 'True' : 'False';
|
|
2521
|
-
if (typeof stored === 'number') return String(stored);
|
|
2522
|
-
return JSON.stringify(stored);
|
|
2523
|
-
}
|
|
2524
|
-
|
|
2525
|
-
/**
|
|
2526
|
-
* Reads a stored boolean EXACTLY the way the property's parser does - the editor must show what the engine sees.
|
|
2527
|
-
* A `== '1'` property holding 'true' (or a natively stored True) is OFF in the engine; showing it as on would let
|
|
2528
|
-
* the next save switch the flag on for real.
|
|
2529
|
-
*/
|
|
2530
|
-
function decodeBoolean(raw, encoding) {
|
|
2531
|
-
if (encoding === 'boolean:on') return isPropertyOn(raw);
|
|
2532
|
-
var token = raw.trim();
|
|
2533
|
-
// The `'true'` parsers mostly lower-case before comparing, the `'1'` parsers compare the digit as is.
|
|
2534
|
-
var isOne = token === '1';
|
|
2535
|
-
var isTrue = token.toLowerCase() === 'true';
|
|
2536
|
-
if (encoding === 'boolean:1') return isOne;
|
|
2537
|
-
if (encoding === 'boolean:true') return isTrue;
|
|
2538
|
-
return isOne || isTrue;
|
|
2539
|
-
}
|
|
2540
|
-
|
|
2541
|
-
/** Splits a delimited list, dropping the empty segments a trailing delimiter leaves behind. */
|
|
2542
|
-
function decodeList(raw, separator) {
|
|
2543
|
-
return raw.split(separator).map(function (entry) {
|
|
2544
|
-
return entry.trim();
|
|
2545
|
-
}).filter(function (entry) {
|
|
2546
|
-
return entry !== '';
|
|
2547
|
-
});
|
|
2548
|
-
}
|
|
2549
|
-
|
|
2550
|
-
/**
|
|
2551
|
-
* Joins list entries, or removes the property when nothing is left: '' would reach the parser's `split` and come
|
|
2552
|
-
* back as the single entry '' - a cleared list must not turn into a list of one nameless group.
|
|
2553
|
-
*/
|
|
2554
|
-
function encodeList(value, separator) {
|
|
2555
|
-
if (Array.isArray(value)) {
|
|
2556
|
-
var entries = value.map(function (entry) {
|
|
2557
|
-
return String(entry).trim();
|
|
2558
|
-
}).filter(function (entry) {
|
|
2559
|
-
return entry !== '';
|
|
2560
|
-
});
|
|
2561
|
-
return entries.length === 0 ? undefined : entries.join(separator);
|
|
2562
|
-
}
|
|
2563
|
-
// A boolean has no list spelling: 'True' would come back as a list of one entry literally named 'True'.
|
|
2564
|
-
if (typeof value === 'boolean') return undefined;
|
|
2565
|
-
var raw = rawStringOf(value);
|
|
2566
|
-
return raw === '' ? undefined : raw;
|
|
2567
|
-
}
|
|
2568
|
-
|
|
2569
|
-
/**
|
|
2570
|
-
* The value an editor should show for a stored property. `stored` is what the record holds - a string in the
|
|
2571
|
-
* normal case, or a natively-typed value from an editor that wrote one.
|
|
2572
|
-
*/
|
|
2573
|
-
function decodePropertyValue(encoding, stored) {
|
|
2574
|
-
var raw = rawStringOf(stored);
|
|
2575
|
-
switch (encoding) {
|
|
2576
|
-
case 'boolean:1':
|
|
2577
|
-
case 'boolean:1|true':
|
|
2578
|
-
case 'boolean:true':
|
|
2579
|
-
case 'boolean:on':
|
|
2580
|
-
return decodeBoolean(raw, encoding);
|
|
2581
|
-
case 'number':
|
|
2582
|
-
{
|
|
2583
|
-
if (raw.trim() === '') return undefined;
|
|
2584
|
-
// German decimal commas reach these fields through spreadsheets and locale-formatted writers.
|
|
2585
|
-
var parsed = Number(raw.trim().replace(',', '.'));
|
|
2586
|
-
return Number.isFinite(parsed) ? parsed : undefined;
|
|
2587
|
-
}
|
|
2588
|
-
case 'list:;':
|
|
2589
|
-
return decodeList(raw, ';');
|
|
2590
|
-
case 'list:,':
|
|
2591
|
-
return decodeList(raw, ',');
|
|
2592
|
-
|
|
2593
|
-
// '1' means EVERYTHING; any other value is a list. Kept as the literal '1' so an editor can offer the two
|
|
2594
|
-
// states as a choice rather than making the user know the convention.
|
|
2595
|
-
case 'all-or-list:;':
|
|
2596
|
-
return raw.trim() === '1' ? true : decodeList(raw, ';');
|
|
2597
|
-
|
|
2598
|
-
// Three states, not two: '1' is ALL, '0' is NONE, and anything else is the list of the ones that apply.
|
|
2599
|
-
// '0' must NOT read as a one-entry list - that is how an off-state turns into the group literally named '0'.
|
|
2600
|
-
case 'boolean-or-list:;':
|
|
2601
|
-
{
|
|
2602
|
-
var token = raw.trim();
|
|
2603
|
-
if (token === '1') return true;
|
|
2604
|
-
if (token === '0') return false;
|
|
2605
|
-
return decodeList(raw, ';');
|
|
2606
|
-
}
|
|
2607
|
-
case 'json':
|
|
2608
|
-
{
|
|
2609
|
-
if (raw.trim() === '') return undefined;
|
|
2610
|
-
try {
|
|
2611
|
-
return JSON.parse(raw);
|
|
2612
|
-
} catch (_unused) {
|
|
2613
|
-
// Invalid JSON is still the user's text - hand it back so the editor can show and repair it rather than
|
|
2614
|
-
// replacing their work with an empty object.
|
|
2615
|
-
return raw;
|
|
2616
|
-
}
|
|
2617
|
-
}
|
|
2618
|
-
default:
|
|
2619
|
-
return raw === '' ? undefined : raw;
|
|
2620
|
-
}
|
|
2621
|
-
}
|
|
2622
|
-
|
|
2623
|
-
/**
|
|
2624
|
-
* The string to store for an edited value - exactly the spelling the property's parser reads.
|
|
2625
|
-
* `undefined` means the property should be REMOVED rather than written empty, which is how a `boolean:on` flag is
|
|
2626
|
-
* switched off.
|
|
2627
|
-
*/
|
|
2628
|
-
function encodePropertyValue(encoding, value) {
|
|
2629
|
-
switch (encoding) {
|
|
2630
|
-
case 'boolean:1':
|
|
2631
|
-
case 'boolean:1|true':
|
|
2632
|
-
return value ? '1' : '0';
|
|
2633
|
-
case 'boolean:true':
|
|
2634
|
-
return value ? 'true' : 'false';
|
|
2635
|
-
|
|
2636
|
-
// Off is written as the absence of a value: an engine older than isPropertyOn read '0' as ON. So a child enrichment
|
|
2637
|
-
// cannot switch off a '1' inherited from a base package.
|
|
2638
|
-
case 'boolean:on':
|
|
2639
|
-
return isPropertyOn(value) ? '1' : undefined;
|
|
2640
|
-
case 'number':
|
|
2641
|
-
{
|
|
2642
|
-
// Blank input (including whitespace) clears the property; Number('') would be 0.
|
|
2643
|
-
if (value === undefined || value === null || String(value).trim() === '') return undefined;
|
|
2644
|
-
var parsed = typeof value === 'number' ? value : Number(String(value).trim().replace(',', '.'));
|
|
2645
|
-
// A decimal point, never a comma - the parsers run Number() on this string.
|
|
2646
|
-
return Number.isFinite(parsed) ? String(parsed) : undefined;
|
|
2647
|
-
}
|
|
2648
|
-
case 'list:;':
|
|
2649
|
-
return encodeList(value, ';');
|
|
2650
|
-
case 'list:,':
|
|
2651
|
-
return encodeList(value, ',');
|
|
2652
|
-
|
|
2653
|
-
// '1' is ALL; there is no spelling for OFF, so `false` removes the property (the list branch would otherwise
|
|
2654
|
-
// store the text 'False' as a one-entry list).
|
|
2655
|
-
case 'all-or-list:;':
|
|
2656
|
-
if (value === true) return '1';
|
|
2657
|
-
if (value === false) return undefined;
|
|
2658
|
-
return encodeList(value, ';');
|
|
2659
|
-
case 'boolean-or-list:;':
|
|
2660
|
-
if (value === true) return '1';
|
|
2661
|
-
// The off-state has its own spelling here, so it is written rather than left to the list branch, which
|
|
2662
|
-
// would REMOVE the property for an empty list instead of switching the state off.
|
|
2663
|
-
if (value === false) return '0';
|
|
2664
|
-
return encodeList(value, ';');
|
|
2665
|
-
case 'json':
|
|
2666
|
-
{
|
|
2667
|
-
if (value === undefined || value === '') return undefined;
|
|
2668
|
-
// Already-text stays text: it is either JSON the user typed or something they are still repairing.
|
|
2669
|
-
return typeof value === 'string' ? value : JSON.stringify(value);
|
|
2670
|
-
}
|
|
2671
|
-
default:
|
|
2672
|
-
{
|
|
2673
|
-
var raw = rawStringOf(value);
|
|
2674
|
-
return raw === '' ? undefined : raw;
|
|
2675
|
-
}
|
|
2676
|
-
}
|
|
2677
|
-
}
|
|
2678
|
-
|
|
2679
|
-
/** Whether a value can be stored for this encoding at all - what an editor blocks saving on. */
|
|
2680
|
-
function propertyValueProblem(encoding, value) {
|
|
2681
|
-
if (encoding === 'json' && typeof value === 'string' && value.trim() !== '') {
|
|
2682
|
-
try {
|
|
2683
|
-
JSON.parse(value);
|
|
2684
|
-
} catch (_unused2) {
|
|
2685
|
-
return 'invalidJson';
|
|
2686
|
-
}
|
|
2687
|
-
}
|
|
2688
|
-
if (encoding === 'number' && value !== undefined && String(value).trim() !== '') {
|
|
2689
|
-
var parsed = typeof value === 'number' ? value : Number(String(value).trim().replace(',', '.'));
|
|
2690
|
-
if (!Number.isFinite(parsed)) return 'notANumber';
|
|
2691
|
-
}
|
|
2692
|
-
|
|
2693
|
-
// A ';' inside a ';'-list entry would split it into two on the way back in - and every encoding that JOINS on
|
|
2694
|
-
// ';' is exposed to it, not just the plain list.
|
|
2695
|
-
var joinsOnSemicolon = encoding === 'list:;' || encoding === 'all-or-list:;' || encoding === 'boolean-or-list:;';
|
|
2696
|
-
if (joinsOnSemicolon && Array.isArray(value) && value.some(function (entry) {
|
|
2697
|
-
return String(entry).includes(';');
|
|
2698
|
-
})) {
|
|
2699
|
-
return 'separatorInEntry';
|
|
2700
|
-
}
|
|
2701
|
-
if (encoding === 'list:,' && Array.isArray(value) && value.some(function (entry) {
|
|
2702
|
-
return String(entry).includes(',');
|
|
2703
|
-
})) {
|
|
2704
|
-
return 'separatorInEntry';
|
|
2705
|
-
}
|
|
2706
|
-
return undefined;
|
|
2707
|
-
}
|
|
2708
|
-
|
|
2709
|
-
/** The control an editor should render for an encoding. */
|
|
2710
|
-
function editorKindOf(encoding) {
|
|
2711
|
-
if (encoding.startsWith('boolean:')) return 'checkbox';
|
|
2712
|
-
if (encoding === 'number') return 'number';
|
|
2713
|
-
if (encoding === 'list:;' || encoding === 'list:,') return 'list';
|
|
2714
|
-
if (encoding === 'all-or-list:;') return 'allOrList';
|
|
2715
|
-
if (encoding === 'boolean-or-list:;') return 'boolOrList';
|
|
2716
|
-
if (encoding === 'json') return 'json';
|
|
2717
|
-
return 'text';
|
|
2718
|
-
}
|
|
2719
|
-
|
|
2720
3033
|
var LOG$q = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
2721
3034
|
var OptionCatalogData = /*#__PURE__*/function () {
|
|
2722
3035
|
function OptionCatalogData(opt, catalogData) {
|
|
@@ -3022,122 +3335,129 @@ var OptionCatalogData = /*#__PURE__*/function () {
|
|
|
3022
3335
|
}]);
|
|
3023
3336
|
}();
|
|
3024
3337
|
var setOptionsProperties = function setOptionsProperties(catalogData, opt, properties) {
|
|
3025
|
-
var _groupOptions$;
|
|
3026
3338
|
for (var i = 0; i < (properties === null || properties === void 0 ? void 0 : properties.length); i++) {
|
|
3027
3339
|
var prop = properties[i];
|
|
3028
3340
|
var key = prop.Codex;
|
|
3029
3341
|
if (key.startsWith(catalogData.catalogCodex + '__')) key = key.replace(catalogData.catalogCodex + '__', '');
|
|
3030
3342
|
switch (key) {
|
|
3031
3343
|
case 'INFO_URL':
|
|
3032
|
-
opt.url = prop.Value;
|
|
3344
|
+
opt.url = textOf(prop.Value);
|
|
3033
3345
|
break;
|
|
3034
3346
|
case 'IGNORE_GROUPS':
|
|
3035
|
-
opt.ignoreGroups = prop.Value
|
|
3347
|
+
opt.ignoreGroups = prop.Value === true;
|
|
3036
3348
|
break;
|
|
3037
3349
|
case 'IGNORE_PGR_GROUP_POSITION':
|
|
3038
|
-
opt.ignorePgrGroupPosition = prop.Value
|
|
3350
|
+
opt.ignorePgrGroupPosition = prop.Value === true;
|
|
3039
3351
|
break;
|
|
3040
3352
|
case 'SHOW_SEARCHBAR':
|
|
3041
|
-
opt.showSearchbar = prop.Value
|
|
3353
|
+
opt.showSearchbar = prop.Value === true;
|
|
3042
3354
|
break;
|
|
3043
3355
|
case 'SHOW_FILTER':
|
|
3044
|
-
opt.showFilter = prop.Value
|
|
3356
|
+
opt.showFilter = prop.Value === true;
|
|
3045
3357
|
break;
|
|
3046
3358
|
case 'INFO_PDF':
|
|
3047
|
-
opt.pdfUrl = prop.Value;
|
|
3359
|
+
opt.pdfUrl = textOf(prop.Value);
|
|
3048
3360
|
break;
|
|
3049
3361
|
case 'DIAMETER':
|
|
3050
|
-
opt.diameter =
|
|
3362
|
+
opt.diameter = prop.Value === true;
|
|
3051
3363
|
break;
|
|
3052
3364
|
case 'GROUP_OPTIONS_LEFT_AND_RIGHT':
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3365
|
+
{
|
|
3366
|
+
var groupOptions = shapedJsonOf('GROUP_OPTIONS_LEFT_AND_RIGHT', prop.Value);
|
|
3367
|
+
if (groupOptions) {
|
|
3368
|
+
var group = groupOptions.group,
|
|
3369
|
+
side = groupOptions.side;
|
|
3370
|
+
opt.partOfGroup = {
|
|
3371
|
+
groupName: group,
|
|
3372
|
+
position: side === 'l' || side === 'r' ? side : undefined
|
|
3373
|
+
};
|
|
3374
|
+
}
|
|
3375
|
+
break;
|
|
3376
|
+
}
|
|
3060
3377
|
case 'REQUIRES_USER_INPUT':
|
|
3061
|
-
opt.requiresUserInput =
|
|
3378
|
+
opt.requiresUserInput = prop.Value === true;
|
|
3062
3379
|
break;
|
|
3063
3380
|
case 'IS_STATE':
|
|
3064
|
-
opt.isDescribingState =
|
|
3381
|
+
opt.isDescribingState = prop.Value === true;
|
|
3065
3382
|
break;
|
|
3066
3383
|
case 'CUSTOM_DIMENSION':
|
|
3067
|
-
opt.customDimension =
|
|
3384
|
+
opt.customDimension = prop.Value === true;
|
|
3068
3385
|
break;
|
|
3069
3386
|
case 'CUSTOM_DIMENSION_TEXT':
|
|
3070
|
-
opt.customDimensionText = prop.Value;
|
|
3387
|
+
opt.customDimensionText = textOf(prop.Value);
|
|
3071
3388
|
break;
|
|
3072
3389
|
case 'HIDE_OPTION_IN_CONFIGURATOR':
|
|
3073
|
-
opt.hideOptionInConfigurator =
|
|
3390
|
+
opt.hideOptionInConfigurator = prop.Value === true;
|
|
3074
3391
|
break;
|
|
3075
3392
|
case 'MERGE_IDM_TO_OPG':
|
|
3076
|
-
opt.mergeIDMToOPG = prop.Value;
|
|
3393
|
+
opt.mergeIDMToOPG = textOf(prop.Value);
|
|
3077
3394
|
break;
|
|
3078
3395
|
case 'ONLY_VISIBLE_IF_NOT_UNDOCK':
|
|
3079
|
-
opt.onlyVisibleIfNotDocked =
|
|
3396
|
+
opt.onlyVisibleIfNotDocked = prop.Value === true;
|
|
3080
3397
|
break;
|
|
3081
3398
|
case 'ONLY_VISIBLE_IF_CONFIG_SINGLE':
|
|
3082
|
-
opt.onlyVisibleIfConfigSingle =
|
|
3399
|
+
opt.onlyVisibleIfConfigSingle = prop.Value === true;
|
|
3083
3400
|
break;
|
|
3084
3401
|
case 'ONLY_VISIBLE_IF_CONFIG_ALL':
|
|
3085
|
-
opt.onlyVisibleIfConfigAll =
|
|
3402
|
+
opt.onlyVisibleIfConfigAll = prop.Value === true;
|
|
3086
3403
|
break;
|
|
3087
3404
|
case 'ISDEFAULTVALUEFOROPTIONS':
|
|
3088
|
-
opt.isDefaultValueForOptions = prop.Value;
|
|
3405
|
+
opt.isDefaultValueForOptions = textOf(prop.Value);
|
|
3089
3406
|
break;
|
|
3090
3407
|
case 'CHECK_FOR_REVERSE_CHANGES':
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3408
|
+
{
|
|
3409
|
+
var reverseChanges = shapedJsonOf('CHECK_FOR_REVERSE_CHANGES', prop.Value);
|
|
3410
|
+
if (reverseChanges) {
|
|
3411
|
+
opt.checkForReversed = {
|
|
3412
|
+
checkForReversingChanges: reverseChanges.mode === 'BLOCK' ? 'BLOCK' : 'WARN',
|
|
3413
|
+
checkOnlyForOptions: reverseChanges.options.map(function (t) {
|
|
3414
|
+
return (!catalogData.isIDMFormat ? 'OPT' : '') + t;
|
|
3415
|
+
})
|
|
3416
|
+
};
|
|
3417
|
+
}
|
|
3418
|
+
break;
|
|
3098
3419
|
}
|
|
3099
|
-
break;
|
|
3100
3420
|
case 'FREETEXT_DEFAULT_VALUE':
|
|
3101
|
-
opt.freetextDefaultValue = prop.Value;
|
|
3421
|
+
opt.freetextDefaultValue = textOf(prop.Value);
|
|
3102
3422
|
break;
|
|
3103
3423
|
case 'SHOW_IN_VARIANTDESC':
|
|
3104
|
-
opt.forceShowVariantDesc =
|
|
3424
|
+
opt.forceShowVariantDesc = prop.Value === true;
|
|
3105
3425
|
break;
|
|
3106
3426
|
case 'SHOW_SEPARAT_ON_TABGROUP':
|
|
3107
|
-
opt.showOnSeparatTabgroup = prop.Value;
|
|
3427
|
+
opt.showOnSeparatTabgroup = textOf(prop.Value);
|
|
3108
3428
|
break;
|
|
3109
3429
|
case 'SETNAME':
|
|
3110
|
-
opt.setName =
|
|
3430
|
+
opt.setName = prop.Value === true;
|
|
3111
3431
|
break;
|
|
3112
3432
|
case 'ADD_OPT_TO_TABGROUP_IN_PL_SUM':
|
|
3113
|
-
opt.addOptionToTabgroupInPartlistSummary = prop.Value;
|
|
3433
|
+
opt.addOptionToTabgroupInPartlistSummary = textOf(prop.Value);
|
|
3114
3434
|
break;
|
|
3115
3435
|
case 'ADD_TO_WWS':
|
|
3116
|
-
opt.addToWWS =
|
|
3436
|
+
opt.addToWWS = prop.Value === true;
|
|
3117
3437
|
break;
|
|
3118
3438
|
case 'IS_MAIN_COLOR':
|
|
3119
|
-
opt.isMainColor =
|
|
3439
|
+
opt.isMainColor = prop.Value === true;
|
|
3120
3440
|
break;
|
|
3121
3441
|
case 'DESCRIPTION':
|
|
3122
|
-
opt.description = prop.Value;
|
|
3442
|
+
opt.description = textOf(prop.Value);
|
|
3123
3443
|
break;
|
|
3124
3444
|
case 'DEFAULT_SIBLING_OPTION':
|
|
3125
|
-
opt.isDefaultSiblingOption = prop.Value;
|
|
3445
|
+
opt.isDefaultSiblingOption = textOf(prop.Value);
|
|
3126
3446
|
break;
|
|
3127
3447
|
case 'CONTENT_ITEM':
|
|
3128
|
-
opt.contentItemId = prop.Value;
|
|
3448
|
+
opt.contentItemId = textOf(prop.Value);
|
|
3129
3449
|
break;
|
|
3130
3450
|
case 'CONTENT_ITEM_TEASER':
|
|
3131
|
-
opt.contentItemTeaser =
|
|
3451
|
+
opt.contentItemTeaser = jsonOf(prop.Value);
|
|
3132
3452
|
break;
|
|
3133
3453
|
case 'REQUIRED_OPTION':
|
|
3134
|
-
opt.requiredOption =
|
|
3454
|
+
opt.requiredOption = prop.Value === true;
|
|
3135
3455
|
break;
|
|
3136
3456
|
case 'SUGGESTED_OPTION':
|
|
3137
|
-
opt.suggestedOption =
|
|
3457
|
+
opt.suggestedOption = prop.Value === true;
|
|
3138
3458
|
break;
|
|
3139
3459
|
case 'ADDITIONAL_GROUP_FILTER':
|
|
3140
|
-
opt.additionalGroupFilter =
|
|
3460
|
+
opt.additionalGroupFilter = jsonOf(prop.Value);
|
|
3141
3461
|
break;
|
|
3142
3462
|
case 'ION_COMMENT_TEXT':
|
|
3143
3463
|
case 'SHOW_IN_BASKET_WHEN_HAS_PRICE':
|
|
@@ -3148,7 +3468,7 @@ var setOptionsProperties = function setOptionsProperties(catalogData, opt, prope
|
|
|
3148
3468
|
case 'IsArtName':
|
|
3149
3469
|
break;
|
|
3150
3470
|
case 'IDM3D_TARGET':
|
|
3151
|
-
// read
|
|
3471
|
+
// read by the IDM3D translation (logic/Planner/IDM3D/idm3dTranslation.ts)
|
|
3152
3472
|
break;
|
|
3153
3473
|
default:
|
|
3154
3474
|
LOG$q.debug('implement mapping for these props for options: ' + prop.Codex);
|
|
@@ -17396,34 +17716,34 @@ var setOptionValueProperties = function setOptionValueProperties(catalogData, op
|
|
|
17396
17716
|
if (key.startsWith(catalogData.catalogCodex + '__')) key = key.replace(catalogData.catalogCodex + '__', '');
|
|
17397
17717
|
switch (key) {
|
|
17398
17718
|
case 'INFO_URL':
|
|
17399
|
-
opv.url = prop.Value;
|
|
17719
|
+
opv.url = textOf(prop.Value);
|
|
17400
17720
|
break;
|
|
17401
17721
|
case 'INFO_PDF':
|
|
17402
|
-
opv.pdfUrl = prop.Value;
|
|
17722
|
+
opv.pdfUrl = textOf(prop.Value);
|
|
17403
17723
|
break;
|
|
17404
17724
|
case 'SAME_OPV':
|
|
17405
|
-
opv.sameopv = prop.Value;
|
|
17725
|
+
opv.sameopv = textOf(prop.Value);
|
|
17406
17726
|
break;
|
|
17407
17727
|
case 'ONLY_VISIBLE_IF_NOT_UNDOCK':
|
|
17408
|
-
opv.onlyVisibleIfNotDocked = prop.Value;
|
|
17728
|
+
opv.onlyVisibleIfNotDocked = textOf(prop.Value);
|
|
17409
17729
|
break;
|
|
17410
17730
|
case 'DEFAULT_VALUE':
|
|
17411
|
-
opv.defaultValue =
|
|
17731
|
+
opv.defaultValue = prop.Value === true;
|
|
17412
17732
|
break;
|
|
17413
17733
|
case 'SUMMARY_CODEX':
|
|
17414
|
-
opv.summaryCodex = prop.Value;
|
|
17734
|
+
opv.summaryCodex = textOf(prop.Value);
|
|
17415
17735
|
break;
|
|
17416
17736
|
case 'VIEWPOINTNAME':
|
|
17417
|
-
opv.viewPointName = prop.Value;
|
|
17737
|
+
opv.viewPointName = textOf(prop.Value);
|
|
17418
17738
|
break;
|
|
17419
17739
|
case 'HIDE_IN_SUMMARY':
|
|
17420
|
-
opv.hideInSummary =
|
|
17740
|
+
opv.hideInSummary = prop.Value === true;
|
|
17421
17741
|
break;
|
|
17422
17742
|
case 'SETNAME':
|
|
17423
|
-
opv.setName = prop.Value;
|
|
17743
|
+
opv.setName = textOf(prop.Value);
|
|
17424
17744
|
break;
|
|
17425
17745
|
case 'SET_CONFIG':
|
|
17426
|
-
opv.setConfig = prop.Value;
|
|
17746
|
+
opv.setConfig = textOf(prop.Value);
|
|
17427
17747
|
break;
|
|
17428
17748
|
case 'CUSTOM_DIMENSION':
|
|
17429
17749
|
if (prop.Value == '1' || prop.Value == '0') {
|
|
@@ -17436,52 +17756,55 @@ var setOptionValueProperties = function setOptionValueProperties(catalogData, op
|
|
|
17436
17756
|
}
|
|
17437
17757
|
break;
|
|
17438
17758
|
case 'ON_RULE':
|
|
17439
|
-
opv.onRule = prop.Value;
|
|
17759
|
+
opv.onRule = textOf(prop.Value);
|
|
17440
17760
|
break;
|
|
17441
17761
|
case 'CONTENT_ITEM':
|
|
17442
|
-
opv.contentItemId = prop.Value;
|
|
17762
|
+
opv.contentItemId = textOf(prop.Value);
|
|
17443
17763
|
break;
|
|
17444
17764
|
case 'IS_NOT_RELEVANT':
|
|
17445
|
-
opv.isNotRelevant =
|
|
17765
|
+
opv.isNotRelevant = prop.Value === true;
|
|
17446
17766
|
break;
|
|
17447
17767
|
case 'GROUP_CONTENT_ITEM':
|
|
17448
|
-
opv.groupContentItemId = prop.Value;
|
|
17768
|
+
opv.groupContentItemId = textOf(prop.Value);
|
|
17449
17769
|
break;
|
|
17450
17770
|
case 'SET_BY_RULE':
|
|
17451
|
-
opv.setByRule = prop.Value;
|
|
17771
|
+
opv.setByRule = textOf(prop.Value);
|
|
17452
17772
|
break;
|
|
17453
17773
|
case 'ADD_TO_MEASURE':
|
|
17454
|
-
|
|
17455
|
-
|
|
17456
|
-
|
|
17457
|
-
|
|
17458
|
-
|
|
17459
|
-
|
|
17460
|
-
|
|
17461
|
-
|
|
17774
|
+
{
|
|
17775
|
+
var measures = shapedJsonOf('ADD_TO_MEASURE', prop.Value);
|
|
17776
|
+
if (measures) opv.addToMeasure = measures.map(function (entry) {
|
|
17777
|
+
return {
|
|
17778
|
+
op: entry.op,
|
|
17779
|
+
value: entry.value,
|
|
17780
|
+
opt: 'OPT' + entry.option
|
|
17781
|
+
};
|
|
17782
|
+
});
|
|
17783
|
+
break;
|
|
17784
|
+
}
|
|
17462
17785
|
case 'PIMFlatValues':
|
|
17463
|
-
opv.isPIMFlatValue = prop.Value
|
|
17786
|
+
opv.isPIMFlatValue = prop.Value === true;
|
|
17464
17787
|
break;
|
|
17465
17788
|
case 'IsVariantAttribute':
|
|
17466
|
-
opv.isVariantAttribute = prop.Value
|
|
17789
|
+
opv.isVariantAttribute = prop.Value === true;
|
|
17467
17790
|
break;
|
|
17468
17791
|
case 'OPTION_FREE_TEXT':
|
|
17469
|
-
opv.optionFreeText =
|
|
17792
|
+
opv.optionFreeText = prop.Value === true;
|
|
17470
17793
|
break;
|
|
17471
17794
|
case 'MEASURE_UNIT':
|
|
17472
|
-
opv.measureUnit = prop.Value;
|
|
17795
|
+
opv.measureUnit = textOf(prop.Value);
|
|
17473
17796
|
break;
|
|
17474
17797
|
case 'MEASURE_MINIMUM':
|
|
17475
|
-
opv.measureMinimum = prop.Value;
|
|
17798
|
+
opv.measureMinimum = textOf(prop.Value);
|
|
17476
17799
|
break;
|
|
17477
17800
|
case 'MEASURE_MAXIMUM':
|
|
17478
|
-
opv.measureMaximum = prop.Value;
|
|
17801
|
+
opv.measureMaximum = textOf(prop.Value);
|
|
17479
17802
|
break;
|
|
17480
17803
|
case 'MEASURE_STEP':
|
|
17481
|
-
opv.measureStep = prop.Value;
|
|
17804
|
+
opv.measureStep = textOf(prop.Value);
|
|
17482
17805
|
break;
|
|
17483
17806
|
case 'PRICE_UNIT':
|
|
17484
|
-
opv.priceUnit = prop.Value;
|
|
17807
|
+
opv.priceUnit = textOf(prop.Value);
|
|
17485
17808
|
break;
|
|
17486
17809
|
case 'ION_COMMENT_TEXT':
|
|
17487
17810
|
case 'EshopCategoryMapping':
|
|
@@ -17490,7 +17813,7 @@ var setOptionValueProperties = function setOptionValueProperties(catalogData, op
|
|
|
17490
17813
|
case 'IsArtName':
|
|
17491
17814
|
break;
|
|
17492
17815
|
case 'IDM3D_VALUE':
|
|
17493
|
-
// read
|
|
17816
|
+
// read by the IDM3D translation (logic/Planner/IDM3D/idm3dTranslation.ts)
|
|
17494
17817
|
break;
|
|
17495
17818
|
default:
|
|
17496
17819
|
if (key.includes('__')) break;
|
|
@@ -17511,7 +17834,7 @@ var setOptionValueProperties = function setOptionValueProperties(catalogData, op
|
|
|
17511
17834
|
metaDatas.push({
|
|
17512
17835
|
codex: prop.Codex,
|
|
17513
17836
|
name: prop.Name,
|
|
17514
|
-
values: prop.Value
|
|
17837
|
+
values: propertyTexts(prop.Value),
|
|
17515
17838
|
values_locales: values_locales
|
|
17516
17839
|
});
|
|
17517
17840
|
break;
|
|
@@ -17527,7 +17850,8 @@ function _arrayLikeToArray$p(r, a) { (null == a || a > r.length) && (a = r.lengt
|
|
|
17527
17850
|
//kaufmännischer Artikel
|
|
17528
17851
|
var CatalogArticleData = /*#__PURE__*/function () {
|
|
17529
17852
|
function CatalogArticleData(catalogArticle, catalogData) {
|
|
17530
|
-
var _this = this
|
|
17853
|
+
var _this = this,
|
|
17854
|
+
_textOf;
|
|
17531
17855
|
_classCallCheck__default["default"](this, CatalogArticleData);
|
|
17532
17856
|
_defineProperty__default["default"](this, "_catalogArticle", void 0);
|
|
17533
17857
|
_defineProperty__default["default"](this, "useShortNameAsName", void 0);
|
|
@@ -17549,13 +17873,13 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17549
17873
|
if (_key.startsWith(this.catalogCodex + '__')) _key = _key.replace(this.catalogCodex + '__', '');
|
|
17550
17874
|
switch (_key) {
|
|
17551
17875
|
case 'BUNDLE_RULES':
|
|
17552
|
-
this._catalogArticle.bundleRules =
|
|
17876
|
+
this._catalogArticle.bundleRules = jsonOf(prop.Value);
|
|
17553
17877
|
break;
|
|
17554
17878
|
case 'ACCESSOIRE_POS_PRIO':
|
|
17555
17879
|
this._catalogArticle.accPosPrio = Number(prop.Value);
|
|
17556
17880
|
break;
|
|
17557
17881
|
case 'ADD_AS_ZKAT':
|
|
17558
|
-
this._catalogArticle.addAsZKAT = prop.Value ===
|
|
17882
|
+
this._catalogArticle.addAsZKAT = prop.Value === true;
|
|
17559
17883
|
break;
|
|
17560
17884
|
case 'HEIGHTGRIDUSED':
|
|
17561
17885
|
this._catalogArticle.heightGridUsed = Number(prop.Value);
|
|
@@ -17567,83 +17891,83 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17567
17891
|
this._catalogArticle.heightGridAbove = Number(prop.Value);
|
|
17568
17892
|
break;
|
|
17569
17893
|
case 'OVERWRITE_PARENT_WIDTH':
|
|
17570
|
-
this._catalogArticle.overwriteParentWidth =
|
|
17894
|
+
this._catalogArticle.overwriteParentWidth = prop.Value === true;
|
|
17571
17895
|
break;
|
|
17572
17896
|
case 'OVERWRITE_PARENT_HEIGHT':
|
|
17573
|
-
this._catalogArticle.overwriteParentHeight =
|
|
17897
|
+
this._catalogArticle.overwriteParentHeight = prop.Value === true;
|
|
17574
17898
|
break;
|
|
17575
17899
|
case 'OVERWRITE_PARENT_DEPTH':
|
|
17576
|
-
this._catalogArticle.overwriteParentDepth =
|
|
17900
|
+
this._catalogArticle.overwriteParentDepth = prop.Value === true;
|
|
17577
17901
|
break;
|
|
17578
17902
|
case 'DO_NOT_DEL_ACC_IF_NOT_DOCKED':
|
|
17579
|
-
this._catalogArticle.doNotDelAccIfNotDocked =
|
|
17903
|
+
this._catalogArticle.doNotDelAccIfNotDocked = prop.Value === true;
|
|
17580
17904
|
break;
|
|
17581
17905
|
case 'HEIGHT_HAS_PRICE':
|
|
17582
|
-
this._catalogArticle.heightHasPrice =
|
|
17906
|
+
this._catalogArticle.heightHasPrice = prop.Value === true;
|
|
17583
17907
|
break;
|
|
17584
17908
|
case 'DEPTH_HAS_PRICE':
|
|
17585
|
-
this._catalogArticle.depthHasPrice =
|
|
17909
|
+
this._catalogArticle.depthHasPrice = prop.Value === true;
|
|
17586
17910
|
break;
|
|
17587
17911
|
case 'WIDTH_HAS_PRICE':
|
|
17588
|
-
this._catalogArticle.widthHasPrice =
|
|
17912
|
+
this._catalogArticle.widthHasPrice = prop.Value === true;
|
|
17589
17913
|
break;
|
|
17590
17914
|
case 'TYPE_NO':
|
|
17591
|
-
if (!this._catalogArticle.typeNr && catalogData.isIDMFormat) this._catalogArticle.typeNr = prop.Value;
|
|
17915
|
+
if (!this._catalogArticle.typeNr && catalogData.isIDMFormat) this._catalogArticle.typeNr = (_textOf = textOf(prop.Value)) !== null && _textOf !== void 0 ? _textOf : '';
|
|
17592
17916
|
break;
|
|
17593
17917
|
case 'BASIC_UNIT_PRICE':
|
|
17594
17918
|
this._catalogArticle.basicUnitPrice = Number(prop.Value);
|
|
17595
17919
|
break;
|
|
17596
17920
|
case 'INVALID_ACCESSORIES':
|
|
17597
|
-
this._catalogArticle.invalidAccessoires = prop.Value
|
|
17921
|
+
this._catalogArticle.invalidAccessoires = listOf(prop.Value);
|
|
17598
17922
|
break;
|
|
17599
17923
|
case 'ON_CONFIG_OPTION':
|
|
17600
|
-
this._catalogArticle.onConfigOption = prop.Value;
|
|
17924
|
+
this._catalogArticle.onConfigOption = textOf(prop.Value);
|
|
17601
17925
|
break;
|
|
17602
17926
|
case 'ON_SET_CONFIG_OPTION':
|
|
17603
|
-
this._catalogArticle.onSetConfigOtpion = prop.Value;
|
|
17927
|
+
this._catalogArticle.onSetConfigOtpion = textOf(prop.Value);
|
|
17604
17928
|
break;
|
|
17605
17929
|
case '3DMODELNAME':
|
|
17606
|
-
this._catalogArticle.modelName3D = prop.Value;
|
|
17930
|
+
this._catalogArticle.modelName3D = textOf(prop.Value);
|
|
17607
17931
|
break;
|
|
17608
17932
|
case 'ZUBEHOER_FAMILIE':
|
|
17609
|
-
this._catalogArticle.accessoireFamily = prop.Value;
|
|
17933
|
+
this._catalogArticle.accessoireFamily = textOf(prop.Value);
|
|
17610
17934
|
break;
|
|
17611
17935
|
case 'ORDER_POSNR':
|
|
17612
|
-
this._catalogArticle.orderPosNr = prop.Value;
|
|
17936
|
+
this._catalogArticle.orderPosNr = textOf(prop.Value);
|
|
17613
17937
|
break;
|
|
17614
17938
|
case 'HIDE_IN_PLANNERSTEP':
|
|
17615
|
-
this._catalogArticle.hideInPlannerStep =
|
|
17939
|
+
this._catalogArticle.hideInPlannerStep = prop.Value === true;
|
|
17616
17940
|
break;
|
|
17617
17941
|
case 'MAX_PLANNING_COUNT':
|
|
17618
17942
|
this._catalogArticle.maxPlanningCount = Number(prop.Value);
|
|
17619
17943
|
break;
|
|
17620
17944
|
case 'CONTENT_ITEM':
|
|
17621
|
-
this._catalogArticle.contentItemId = prop.Value;
|
|
17945
|
+
this._catalogArticle.contentItemId = textOf(prop.Value);
|
|
17622
17946
|
break;
|
|
17623
17947
|
case 'GROUP_CONTENT_ITEM':
|
|
17624
|
-
this._catalogArticle.groupContentItemId = prop.Value;
|
|
17948
|
+
this._catalogArticle.groupContentItemId = textOf(prop.Value);
|
|
17625
17949
|
break;
|
|
17626
17950
|
case 'IDM3D_SKIP':
|
|
17627
|
-
this._catalogArticle.idm3DSkip =
|
|
17951
|
+
this._catalogArticle.idm3DSkip = prop.Value === true;
|
|
17628
17952
|
break;
|
|
17629
17953
|
case 'HAS3D':
|
|
17630
|
-
this._catalogArticle.isVisualized =
|
|
17954
|
+
this._catalogArticle.isVisualized = prop.Value === true;
|
|
17631
17955
|
break;
|
|
17632
17956
|
case 'RETAIL_PREFIX':
|
|
17633
17957
|
this._catalogArticle.retailPrefix = prop.Value;
|
|
17634
17958
|
break;
|
|
17635
17959
|
case 'OPTIONS_FOR_PRINT':
|
|
17636
|
-
this.catalogArticle.optionsForPrint = prop.Value
|
|
17960
|
+
this.catalogArticle.optionsForPrint = listOf(prop.Value);
|
|
17637
17961
|
break;
|
|
17638
17962
|
case 'TABGROUP':
|
|
17639
|
-
if (!this._catalogArticle.tabGroup) this._catalogArticle.tabGroup = prop.Value;
|
|
17963
|
+
if (!this._catalogArticle.tabGroup) this._catalogArticle.tabGroup = textOf(prop.Value);
|
|
17640
17964
|
break;
|
|
17641
17965
|
case 'TABGROUP_OPTIONS':
|
|
17642
|
-
if (!this._catalogArticle.tabGroupOption) this._catalogArticle.tabGroupOption = prop.Value;
|
|
17966
|
+
if (!this._catalogArticle.tabGroupOption) this._catalogArticle.tabGroupOption = textOf(prop.Value);
|
|
17643
17967
|
break;
|
|
17644
17968
|
default:
|
|
17645
17969
|
if (_key.includes('__')) break;
|
|
17646
|
-
var values = prop.Value
|
|
17970
|
+
var values = propertyTexts(prop.Value);
|
|
17647
17971
|
var values_locales = [];
|
|
17648
17972
|
if (prop.Value_locales) {
|
|
17649
17973
|
var _prop$Value_locales;
|
|
@@ -18386,6 +18710,8 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
18386
18710
|
}]);
|
|
18387
18711
|
}();
|
|
18388
18712
|
|
|
18713
|
+
function ownKeys$r(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; }
|
|
18714
|
+
function _objectSpread$r(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$r(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$r(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18389
18715
|
var LOG$o = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
18390
18716
|
function initDivaCatalogData(json, orderSet, api) {
|
|
18391
18717
|
var _json$MainCategory;
|
|
@@ -18484,13 +18810,13 @@ function setCatalogPlannsCompletely(catalogData) {
|
|
|
18484
18810
|
}
|
|
18485
18811
|
}
|
|
18486
18812
|
function getCatalogArticle$1(jsonArticle, catalogData) {
|
|
18487
|
-
var _catalogData$catalogM, _catalogData$catalogM2, _catalogData$catalogM3, _articleMask$name$cat, _articleMask$name, _articleMask$shortNam, _articleMask$shortNam2,
|
|
18813
|
+
var _catalogData$catalogM, _catalogData$catalogM2, _catalogData$catalogM3, _articleMask$name$cat, _articleMask$name, _articleMask$shortNam, _articleMask$shortNam2, _articleMask$groupnam, _articleMask$groupnam2, _articleMask$hidden;
|
|
18488
18814
|
var articleMask = (_catalogData$catalogM = catalogData.catalogMask) === null || _catalogData$catalogM === void 0 || (_catalogData$catalogM = _catalogData$catalogM.articles) === null || _catalogData$catalogM === void 0 ? void 0 : _catalogData$catalogM[jsonArticle.Codex];
|
|
18489
18815
|
var maskProperties = getPropertiesForItemNo((_catalogData$catalogM2 = (_catalogData$catalogM3 = catalogData.catalogMask) === null || _catalogData$catalogM3 === void 0 ? void 0 : _catalogData$catalogM3.properties) !== null && _catalogData$catalogM2 !== void 0 ? _catalogData$catalogM2 : [], jsonArticle.Codex, catalogData.api.getLanguage());
|
|
18490
18816
|
//parse den Json Article und erstelle CatalogArticle
|
|
18491
18817
|
var name = (_articleMask$name$cat = articleMask === null || articleMask === void 0 || (_articleMask$name = articleMask.name) === null || _articleMask$name === void 0 ? void 0 : _articleMask$name[catalogData.api.getLanguage()]) !== null && _articleMask$name$cat !== void 0 ? _articleMask$name$cat : jsonArticle.Name;
|
|
18492
18818
|
var shortName = (_articleMask$shortNam = articleMask === null || articleMask === void 0 || (_articleMask$shortNam2 = articleMask.shortName) === null || _articleMask$shortNam2 === void 0 ? void 0 : _articleMask$shortNam2[catalogData.api.getLanguage()]) !== null && _articleMask$shortNam !== void 0 ? _articleMask$shortNam : jsonArticle.ShortName;
|
|
18493
|
-
var properties = [].concat(_toConsumableArray__default["default"]((
|
|
18819
|
+
var properties = [].concat(_toConsumableArray__default["default"](readProperties('article', jsonArticle.Metadatas, catalogData.api.getLanguage())), _toConsumableArray__default["default"](maskProperties !== null && maskProperties !== void 0 ? maskProperties : []));
|
|
18494
18820
|
return {
|
|
18495
18821
|
articleCodex: jsonArticle.Codex,
|
|
18496
18822
|
catalogName: jsonArticle.CatalogName,
|
|
@@ -18596,10 +18922,10 @@ function initCatalogOptions(catalogData, jsonOptions) {
|
|
|
18596
18922
|
return options;
|
|
18597
18923
|
}
|
|
18598
18924
|
function getCatalogOptionDataType(codex, jsonOPT, catalogData) {
|
|
18599
|
-
var _catalogData$catalogM4, _catalogData$catalogM5, _catalogData$catalogM6, _catalogData$catalogM7, _catalogData$catalogM8,
|
|
18925
|
+
var _catalogData$catalogM4, _catalogData$catalogM5, _catalogData$catalogM6, _catalogData$catalogM7, _catalogData$catalogM8, _optionMask$name$cata, _optionMask$name, _optionMask$name2, _optionMask$tabGroup, _ref, _optionMask$layout, _properties$find, _jsonOPT$showOPVAsArt, _properties$find2, _properties$find3;
|
|
18600
18926
|
var maskProperties = getPropertiesForFeatureNo((_catalogData$catalogM4 = (_catalogData$catalogM5 = catalogData.catalogMask) === null || _catalogData$catalogM5 === void 0 ? void 0 : _catalogData$catalogM5.properties) !== null && _catalogData$catalogM4 !== void 0 ? _catalogData$catalogM4 : [], undefined, codex, catalogData.api.getLanguage());
|
|
18601
18927
|
var optionMask = (_catalogData$catalogM6 = (_catalogData$catalogM7 = catalogData.catalogMask) === null || _catalogData$catalogM7 === void 0 || (_catalogData$catalogM7 = _catalogData$catalogM7.options) === null || _catalogData$catalogM7 === void 0 ? void 0 : _catalogData$catalogM7[codex]) !== null && _catalogData$catalogM6 !== void 0 ? _catalogData$catalogM6 : codex.startsWith('OPT') ? (_catalogData$catalogM8 = catalogData.catalogMask) === null || _catalogData$catalogM8 === void 0 || (_catalogData$catalogM8 = _catalogData$catalogM8.options) === null || _catalogData$catalogM8 === void 0 ? void 0 : _catalogData$catalogM8[codex.substring(3)] : undefined;
|
|
18602
|
-
var properties = [].concat(_toConsumableArray__default["default"]((
|
|
18928
|
+
var properties = [].concat(_toConsumableArray__default["default"](readProperties('option', jsonOPT.Properties, catalogData.api.getLanguage())), _toConsumableArray__default["default"](maskProperties !== null && maskProperties !== void 0 ? maskProperties : []));
|
|
18603
18929
|
var opt = {
|
|
18604
18930
|
codex: codex,
|
|
18605
18931
|
name: (_optionMask$name$cata = optionMask === null || optionMask === void 0 || (_optionMask$name = optionMask.name) === null || _optionMask$name === void 0 ? void 0 : _optionMask$name[catalogData.api.getLanguage()]) !== null && _optionMask$name$cata !== void 0 ? _optionMask$name$cata : jsonOPT.Name,
|
|
@@ -18611,9 +18937,9 @@ function getCatalogOptionDataType(codex, jsonOPT, catalogData) {
|
|
|
18611
18937
|
invisible: jsonOPT.Invisible != undefined ? jsonOPT.Invisible : false,
|
|
18612
18938
|
hiddenByMask: optionMask === null || optionMask === void 0 ? void 0 : optionMask.hidden,
|
|
18613
18939
|
maskTabgroup: optionMask === null || optionMask === void 0 || (_optionMask$tabGroup = optionMask.tabGroup) === null || _optionMask$tabGroup === void 0 ? void 0 : _optionMask$tabGroup[catalogData.api.getLanguage()],
|
|
18614
|
-
layout: (_ref = (_optionMask$layout = optionMask === null || optionMask === void 0 ? void 0 : optionMask.layout) !== null && _optionMask$layout !== void 0 ? _optionMask$layout : properties === null || properties === void 0 || (_properties$find = properties.find(function (p) {
|
|
18940
|
+
layout: (_ref = (_optionMask$layout = optionMask === null || optionMask === void 0 ? void 0 : optionMask.layout) !== null && _optionMask$layout !== void 0 ? _optionMask$layout : textOf(properties === null || properties === void 0 || (_properties$find = properties.find(function (p) {
|
|
18615
18941
|
return p.Codex == 'LAYOUT';
|
|
18616
|
-
})) === null || _properties$find === void 0 ? void 0 : _properties$find.Value) !== null && _ref !== void 0 ? _ref : jsonOPT.Layout != undefined ? jsonOPT.Layout : 'IMAGE',
|
|
18942
|
+
})) === null || _properties$find === void 0 ? void 0 : _properties$find.Value)) !== null && _ref !== void 0 ? _ref : jsonOPT.Layout != undefined ? jsonOPT.Layout : 'IMAGE',
|
|
18617
18943
|
useMaxPriceOfGroup: jsonOPT.UseMaxPriceOfGroup != undefined ? Number(jsonOPT.UseMaxPriceOfGroup) : undefined,
|
|
18618
18944
|
calcPercentOnOptions: jsonOPT.CalcPercentOnOptions,
|
|
18619
18945
|
hideGroupNameInOrderText: jsonOPT.hideGroupNameInOrderText != undefined ? jsonOPT.hideGroupNameInOrderText == 'True' : false,
|
|
@@ -18644,11 +18970,11 @@ function initCatalogOptionValues(catalogData, jsonOptions) {
|
|
|
18644
18970
|
return optionValues;
|
|
18645
18971
|
}
|
|
18646
18972
|
function getCatalogOptionValueDataType(codex, jsonOPV, catalogData) {
|
|
18647
|
-
var _catalogData$catalogM9, _catalogData$catalogM10, _catalogData$catalogM11, _optionvalues$codex, _catalogData$catalogM12, _catalogData$catalogM13,
|
|
18973
|
+
var _catalogData$catalogM9, _catalogData$catalogM10, _catalogData$catalogM11, _optionvalues$codex, _catalogData$catalogM12, _catalogData$catalogM13, _mask$name$catalogDat, _mask$name, _mask$name2, _mask$groupname$catal, _mask$groupname, _mask$groupname2, _mask$hiddenInFeature, _jsonOPV$MeasureStep, _jsonOPV$Value;
|
|
18648
18974
|
var optionvalues = (_catalogData$catalogM9 = (_catalogData$catalogM10 = catalogData.catalogMask) === null || _catalogData$catalogM10 === void 0 ? void 0 : _catalogData$catalogM10.optionvalues) !== null && _catalogData$catalogM9 !== void 0 ? _catalogData$catalogM9 : (_catalogData$catalogM11 = catalogData.catalogMask) === null || _catalogData$catalogM11 === void 0 ? void 0 : _catalogData$catalogM11.optionValues;
|
|
18649
18975
|
var mask = (_optionvalues$codex = optionvalues === null || optionvalues === void 0 ? void 0 : optionvalues[codex]) !== null && _optionvalues$codex !== void 0 ? _optionvalues$codex : codex.startsWith('OPV') ? optionvalues === null || optionvalues === void 0 ? void 0 : optionvalues[codex.substring(3)] : undefined;
|
|
18650
18976
|
var maskProperties = getPropertiesForOptionKey((_catalogData$catalogM12 = (_catalogData$catalogM13 = catalogData.catalogMask) === null || _catalogData$catalogM13 === void 0 ? void 0 : _catalogData$catalogM13.properties) !== null && _catalogData$catalogM12 !== void 0 ? _catalogData$catalogM12 : [], undefined, codex, catalogData.api.getLanguage());
|
|
18651
|
-
var properties = [].concat(_toConsumableArray__default["default"]((
|
|
18977
|
+
var properties = [].concat(_toConsumableArray__default["default"](readProperties('optionValue', jsonOPV.Metadatas, catalogData.api.getLanguage())), _toConsumableArray__default["default"](maskProperties !== null && maskProperties !== void 0 ? maskProperties : []));
|
|
18652
18978
|
var opv = {
|
|
18653
18979
|
codex: codex,
|
|
18654
18980
|
vCodex: jsonOPV.VCodex,
|
|
@@ -18970,13 +19296,22 @@ function getImageURL(image, mediaUrl) {
|
|
|
18970
19296
|
}
|
|
18971
19297
|
return ret;
|
|
18972
19298
|
}
|
|
19299
|
+
|
|
19300
|
+
/** Properties whose Value is a text (CE catalogs, the catalog mask) with their values read for the parser of `entity`. */
|
|
19301
|
+
function readProperties(entity, properties, lang) {
|
|
19302
|
+
return (properties !== null && properties !== void 0 ? properties : []).map(function (p) {
|
|
19303
|
+
return _objectSpread$r(_objectSpread$r({}, p), {}, {
|
|
19304
|
+
Value: readPropertyValue(entity, p.Codex, p.Value, lang)
|
|
19305
|
+
});
|
|
19306
|
+
});
|
|
19307
|
+
}
|
|
18973
19308
|
function getPropertiesForFeatureNo(properties, typeNo, featureNo, lang) {
|
|
18974
19309
|
return properties.filter(function (p) {
|
|
18975
19310
|
var _p$featureNos, _p$optionKeys, _p$typeNos, _p$typeNos2;
|
|
18976
19311
|
return ((_p$featureNos = p.featureNos) === null || _p$featureNos === void 0 ? void 0 : _p$featureNos.includes(featureNo)) && !((_p$optionKeys = p.optionKeys) !== null && _p$optionKeys !== void 0 && _p$optionKeys.length) && (!typeNo || !((_p$typeNos = p.typeNos) !== null && _p$typeNos !== void 0 && _p$typeNos.length) || ((_p$typeNos2 = p.typeNos) === null || _p$typeNos2 === void 0 ? void 0 : _p$typeNos2.includes(typeNo)));
|
|
18977
19312
|
}).map(function (p) {
|
|
18978
19313
|
return {
|
|
18979
|
-
Value:
|
|
19314
|
+
Value: readPropertyValue('option', p.key, p.value, lang),
|
|
18980
19315
|
Codex: p.key,
|
|
18981
19316
|
Name: DivaUtils__default["default"].getLocals(p.name, lang),
|
|
18982
19317
|
Value_locales: p.valueLocales
|
|
@@ -18991,7 +19326,7 @@ function getPropertiesForOptionKey(properties, featureNo, optionKey, lang) {
|
|
|
18991
19326
|
})) === null || _p$optionKeys2 === void 0 ? void 0 : _p$optionKeys2.includes(optionKey));
|
|
18992
19327
|
}).map(function (p) {
|
|
18993
19328
|
return {
|
|
18994
|
-
Value:
|
|
19329
|
+
Value: readPropertyValue('optionValue', p.key, p.value, lang),
|
|
18995
19330
|
Codex: p.key,
|
|
18996
19331
|
Name: DivaUtils__default["default"].getLocals(p.name, lang),
|
|
18997
19332
|
Value_locales: p.valueLocales
|
|
@@ -19006,7 +19341,7 @@ function getPropertiesForSerieNo(properties, serieNo, lang) {
|
|
|
19006
19341
|
.map(function (p) {
|
|
19007
19342
|
return {
|
|
19008
19343
|
Codex: p.key,
|
|
19009
|
-
Value:
|
|
19344
|
+
Value: readPropertyValue('catalog', p.key, p.value, lang),
|
|
19010
19345
|
Name: DivaUtils__default["default"].getLocals(p.name, lang),
|
|
19011
19346
|
Value_locales: p.valueLocales
|
|
19012
19347
|
};
|
|
@@ -19018,7 +19353,7 @@ function getPropertiesForItemNo(properties, itemNo, lang) {
|
|
|
19018
19353
|
return (_p$typeNos3 = p.typeNos) === null || _p$typeNos3 === void 0 ? void 0 : _p$typeNos3.includes(itemNo);
|
|
19019
19354
|
}).map(function (p) {
|
|
19020
19355
|
return {
|
|
19021
|
-
Value:
|
|
19356
|
+
Value: readPropertyValue('article', p.key, p.value, lang),
|
|
19022
19357
|
Codex: p.key,
|
|
19023
19358
|
Name: DivaUtils__default["default"].getLocals(p.name, lang),
|
|
19024
19359
|
Value_locales: p.valueLocales
|
|
@@ -20361,14 +20696,14 @@ function getActionTargets(decisions, type) {
|
|
|
20361
20696
|
return targets;
|
|
20362
20697
|
}
|
|
20363
20698
|
function getArticleOptionType(myOPT, set, articleCodex) {
|
|
20364
|
-
var _set$CatalogData$cata, _set$CatalogData$cata2, _set$CatalogData$cata3, _set$CatalogData$cata4, _set$CatalogData$cata5
|
|
20699
|
+
var _set$CatalogData$cata, _set$CatalogData$cata2, _set$CatalogData$cata3, _set$CatalogData$cata4, _set$CatalogData$cata5;
|
|
20365
20700
|
var OP = myOPT.OCD ? myOPT.OCD : myOPT.Codex;
|
|
20366
20701
|
var catOPT = set.CatalogData.getOption(OP);
|
|
20367
20702
|
var optionMask = (_set$CatalogData$cata = (_set$CatalogData$cata2 = set.CatalogData.catalogMask) === null || _set$CatalogData$cata2 === void 0 || (_set$CatalogData$cata2 = _set$CatalogData$cata2.options) === null || _set$CatalogData$cata2 === void 0 ? void 0 : _set$CatalogData$cata2[OP]) !== null && _set$CatalogData$cata !== void 0 ? _set$CatalogData$cata : OP.startsWith('OPT') ? (_set$CatalogData$cata3 = set.CatalogData.catalogMask) === null || _set$CatalogData$cata3 === void 0 || (_set$CatalogData$cata3 = _set$CatalogData$cata3.options) === null || _set$CatalogData$cata3 === void 0 ? void 0 : _set$CatalogData$cata3[OP.substring(3)] : undefined;
|
|
20368
20703
|
if (!catOPT) throw new Error('Option: ' + OP + ' not in CatalogData');
|
|
20369
20704
|
var optHasOpg = myOPT.OPG && myOPT.OPG.length > 0;
|
|
20370
20705
|
var maskProperties = getPropertiesForFeatureNo((_set$CatalogData$cata4 = (_set$CatalogData$cata5 = set.CatalogData.catalogMask) === null || _set$CatalogData$cata5 === void 0 ? void 0 : _set$CatalogData$cata5.properties) !== null && _set$CatalogData$cata4 !== void 0 ? _set$CatalogData$cata4 : [], articleCodex, OP, set.CatalogData.api.getLanguage());
|
|
20371
|
-
var properties = [].concat(_toConsumableArray__default["default"]((
|
|
20706
|
+
var properties = [].concat(_toConsumableArray__default["default"](readProperties('option', myOPT.Properties, set.CatalogData.api.getLanguage())), _toConsumableArray__default["default"](maskProperties !== null && maskProperties !== void 0 ? maskProperties : []));
|
|
20372
20707
|
return {
|
|
20373
20708
|
codex: myOPT.Codex,
|
|
20374
20709
|
catalogOPT: catOPT,
|
|
@@ -21908,7 +22243,7 @@ function getCatalogFeatureType(feature, catalogArticleData, set, catalogData) {
|
|
|
21908
22243
|
var featureClass = catalogData.getFeatureClass(catalogArticleData.featureClassRefNo);
|
|
21909
22244
|
var optionMask = (_catalogData$catalogM = catalogData.catalogMask) === null || _catalogData$catalogM === void 0 || (_catalogData$catalogM = _catalogData$catalogM.options) === null || _catalogData$catalogM === void 0 ? void 0 : _catalogData$catalogM[feature.featureNo];
|
|
21910
22245
|
var maskProperties = getPropertiesForFeatureNo((_catalogData$catalogM2 = (_catalogData$catalogM3 = catalogData.catalogMask) === null || _catalogData$catalogM3 === void 0 ? void 0 : _catalogData$catalogM3.properties) !== null && _catalogData$catalogM2 !== void 0 ? _catalogData$catalogM2 : [], undefined, feature.featureNo, catalogData.api.getLanguage());
|
|
21911
|
-
var properties = [].concat(_toConsumableArray__default["default"](convertProperties(feature.properties, set.api.getLanguageLowercase())), _toConsumableArray__default["default"](maskProperties !== null && maskProperties !== void 0 ? maskProperties : []));
|
|
22246
|
+
var properties = [].concat(_toConsumableArray__default["default"](convertProperties(feature.properties, set.api.getLanguageLowercase(), 'option')), _toConsumableArray__default["default"](maskProperties !== null && maskProperties !== void 0 ? maskProperties : []));
|
|
21912
22247
|
return {
|
|
21913
22248
|
name: DivaUtils__default["default"].getLocals(feature.featureText, set.api.getLanguageLowercase()),
|
|
21914
22249
|
origName: DivaUtils__default["default"].getLocals(feature.featureText, set.api.getLanguageLowercase()),
|
|
@@ -21981,7 +22316,7 @@ function getCatalogOptionType(option, set, catalogData) {
|
|
|
21981
22316
|
var _catalogData$catalogM6, _catalogData$catalogM7, _option$detailInfos, _option$detailInfos2, _option$measureValue;
|
|
21982
22317
|
var name = DivaUtils__default["default"].getLocals(option.optionText, set.api.getLanguageLowercase());
|
|
21983
22318
|
var maskProperties = getPropertiesForOptionKey((_catalogData$catalogM6 = (_catalogData$catalogM7 = catalogData.catalogMask) === null || _catalogData$catalogM7 === void 0 ? void 0 : _catalogData$catalogM7.properties) !== null && _catalogData$catalogM6 !== void 0 ? _catalogData$catalogM6 : [], undefined, option.optionKey, catalogData.api.getLanguage());
|
|
21984
|
-
var properties = [].concat(_toConsumableArray__default["default"](convertProperties(option.properties, catalogData.api.getLanguageLowercase())), _toConsumableArray__default["default"](maskProperties !== null && maskProperties !== void 0 ? maskProperties : []));
|
|
22319
|
+
var properties = [].concat(_toConsumableArray__default["default"](convertProperties(option.properties, catalogData.api.getLanguageLowercase(), 'optionValue')), _toConsumableArray__default["default"](maskProperties !== null && maskProperties !== void 0 ? maskProperties : []));
|
|
21985
22320
|
var opiton = {
|
|
21986
22321
|
codex: option.optionKey,
|
|
21987
22322
|
name: name,
|
|
@@ -22152,14 +22487,14 @@ function initIDMArticles(jsonItems, catalogData) {
|
|
|
22152
22487
|
}
|
|
22153
22488
|
}
|
|
22154
22489
|
function getCatalogArticle(article, catalogData) {
|
|
22155
|
-
var _catalogData$catalogM, _article$typeKey, _article$salesNumber, _articleMask$name,
|
|
22490
|
+
var _catalogData$catalogM, _article$typeKey, _article$salesNumber, _articleMask$name, _article$flatPrice, _article$depthBasicSh, _article$depthBasicSh2, _article$depthBasicSh3, _article$widthBasicSh, _article$widthBasicSh2, _article$widthBasicSh3, _article$heightBasicS, _article$heightBasicS2, _article$heightBasicS3, _article$weightNetto, _article$detailInfos, _article$detailInfos2, _article$detailInfos3, _ref, _ref2, _articleMask$groupnam;
|
|
22156
22491
|
var articleMask = (_catalogData$catalogM = catalogData.catalogMask) === null || _catalogData$catalogM === void 0 || (_catalogData$catalogM = _catalogData$catalogM.articles) === null || _catalogData$catalogM === void 0 ? void 0 : _catalogData$catalogM[article.typeNo];
|
|
22157
22492
|
var lang = catalogData.api.getLanguageLowercase();
|
|
22158
22493
|
// empty locale objects ({} or only empty strings) are truthy, so ?? alone doesn't fall back
|
|
22159
22494
|
var fullText = hasLocaleText(article.fullText) ? article.fullText : article.shortText;
|
|
22160
22495
|
var shortText = hasLocaleText(article.shortText) ? article.shortText : article.fullText;
|
|
22161
|
-
var featureProperties = convertProperties(article.properties, lang, 'featureNos');
|
|
22162
|
-
var optionProperties = convertProperties(article.properties, lang, 'optionKeys');
|
|
22496
|
+
var featureProperties = convertProperties(article.properties, lang, 'option', 'featureNos');
|
|
22497
|
+
var optionProperties = convertProperties(article.properties, lang, 'optionValue', 'optionKeys');
|
|
22163
22498
|
return {
|
|
22164
22499
|
areOptionsLoaded: false,
|
|
22165
22500
|
arePricesLoaded: false,
|
|
@@ -22189,7 +22524,7 @@ function getCatalogArticle(article, catalogData) {
|
|
|
22189
22524
|
shortName: DivaUtils__default["default"].getLocals(shortText, lang),
|
|
22190
22525
|
origShortName: DivaUtils__default["default"].getLocals(shortText, lang),
|
|
22191
22526
|
shortName_locales: shortText,
|
|
22192
|
-
properties: [].concat(_toConsumableArray__default["default"](convertProperties(article.properties, lang)), _toConsumableArray__default["default"]((
|
|
22527
|
+
properties: [].concat(_toConsumableArray__default["default"](convertProperties(article.properties, lang, 'article')), _toConsumableArray__default["default"](readProperties('article', articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties, lang))),
|
|
22193
22528
|
optionProperties: optionProperties,
|
|
22194
22529
|
featureProperties: featureProperties,
|
|
22195
22530
|
// the service decides what is complete from the list - a missing feature class alone still leaves prices to load
|
|
@@ -22260,31 +22595,35 @@ function hasLocaleText(locales) {
|
|
|
22260
22595
|
function getLowResUrl(url) {
|
|
22261
22596
|
return url === null || url === void 0 ? void 0 : url.replace('.jpg', '_low.jpg').replace('.jpeg', '_low.jpeg').replace('.png', '_low.png');
|
|
22262
22597
|
}
|
|
22598
|
+
|
|
22599
|
+
/** The properties for the parser of `entity`, their values read as it reads them (readPropertyValue). */
|
|
22263
22600
|
function convertProperties() {
|
|
22264
22601
|
var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
22265
22602
|
var lang = arguments.length > 1 ? arguments[1] : undefined;
|
|
22266
|
-
var
|
|
22603
|
+
var entity = arguments.length > 2 ? arguments[2] : undefined;
|
|
22604
|
+
var forCase = arguments.length > 3 ? arguments[3] : undefined;
|
|
22267
22605
|
switch (forCase) {
|
|
22268
22606
|
case 'featureNos':
|
|
22269
22607
|
return mapProp(properties.filter(function (p) {
|
|
22270
22608
|
var _p$featureNos;
|
|
22271
22609
|
return (_p$featureNos = p.featureNos) === null || _p$featureNos === void 0 ? void 0 : _p$featureNos.length;
|
|
22272
|
-
}), lang);
|
|
22610
|
+
}), lang, entity);
|
|
22273
22611
|
case 'optionKeys':
|
|
22274
22612
|
return mapProp(properties.filter(function (p) {
|
|
22275
22613
|
var _p$optionKeys;
|
|
22276
22614
|
return (_p$optionKeys = p.optionKeys) === null || _p$optionKeys === void 0 ? void 0 : _p$optionKeys.length;
|
|
22277
|
-
}), lang);
|
|
22615
|
+
}), lang, entity);
|
|
22278
22616
|
default:
|
|
22279
|
-
return mapProp(properties, lang);
|
|
22617
|
+
return mapProp(properties, lang, entity);
|
|
22280
22618
|
}
|
|
22281
22619
|
}
|
|
22282
22620
|
function mapProp() {
|
|
22283
22621
|
var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
22284
22622
|
var lang = arguments.length > 1 ? arguments[1] : undefined;
|
|
22623
|
+
var entity = arguments.length > 2 ? arguments[2] : undefined;
|
|
22285
22624
|
return properties.map(function (p) {
|
|
22286
22625
|
return {
|
|
22287
|
-
Value:
|
|
22626
|
+
Value: readPropertyValue(entity, p.key, p.value, lang),
|
|
22288
22627
|
Codex: p.key,
|
|
22289
22628
|
Name: DivaUtils__default["default"].getLocals(p.name, lang),
|
|
22290
22629
|
FeatureNos: p.featureNos,
|
|
@@ -22428,7 +22767,7 @@ Diese KLasse enthält Inforamtion zu einem Catalog (C)
|
|
|
22428
22767
|
var LOG$j = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
22429
22768
|
var DivaCatalogData = /*#__PURE__*/function () {
|
|
22430
22769
|
function DivaCatalogData(json, catalogCodex, orderSet, api, articleJson, plannerElementsJson, isIDMFormat, additionalModelInfos) {
|
|
22431
|
-
var
|
|
22770
|
+
var _ref, _json$properties, _this$catalogMask;
|
|
22432
22771
|
_classCallCheck__default["default"](this, DivaCatalogData);
|
|
22433
22772
|
_defineProperty__default["default"](this, "options", {});
|
|
22434
22773
|
_defineProperty__default["default"](this, "optionValues", void 0);
|
|
@@ -22610,7 +22949,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
22610
22949
|
};
|
|
22611
22950
|
this._api = api;
|
|
22612
22951
|
this.additionalModelInfos = additionalModelInfos;
|
|
22613
|
-
var properties = [].concat(_toConsumableArray__default["default"]((
|
|
22952
|
+
var properties = [].concat(_toConsumableArray__default["default"](readProperties('catalog', json.Properties, this.api.getLanguage())), _toConsumableArray__default["default"](getPropertiesForSerieNo((_ref = (_json$properties = json.properties) !== null && _json$properties !== void 0 ? _json$properties : (_this$catalogMask = this.catalogMask) === null || _this$catalogMask === void 0 ? void 0 : _this$catalogMask.properties) !== null && _ref !== void 0 ? _ref : [], undefined, this.api.getLanguage())));
|
|
22614
22953
|
if (properties.length) {
|
|
22615
22954
|
var _json$properties2;
|
|
22616
22955
|
this.origProperties = json.Properties || json.properties ? getPropertiesForSerieNo((_json$properties2 = json.properties) !== null && _json$properties2 !== void 0 ? _json$properties2 : [], undefined, this.api.getLanguage()) : [];
|
|
@@ -22646,9 +22985,9 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
22646
22985
|
initIDMArticles(articleJson, this);
|
|
22647
22986
|
}
|
|
22648
22987
|
if (this.origProperties) {
|
|
22649
|
-
var _this$catalogMask$pro, _this$catalogMask2
|
|
22988
|
+
var _this$catalogMask$pro, _this$catalogMask2;
|
|
22650
22989
|
var maskProperties = getPropertiesForSerieNo((_this$catalogMask$pro = (_this$catalogMask2 = this.catalogMask) === null || _this$catalogMask2 === void 0 ? void 0 : _this$catalogMask2.properties) !== null && _this$catalogMask$pro !== void 0 ? _this$catalogMask$pro : [], 1, this.api.getLanguage());
|
|
22651
|
-
this.initPropertiesAfterOptionsInit(catalogCodex, [].concat(_toConsumableArray__default["default"]((
|
|
22990
|
+
this.initPropertiesAfterOptionsInit(catalogCodex, [].concat(_toConsumableArray__default["default"](readProperties('catalog', json.Properties, this.api.getLanguage())), _toConsumableArray__default["default"](maskProperties !== null && maskProperties !== void 0 ? maskProperties : [])));
|
|
22652
22991
|
}
|
|
22653
22992
|
}
|
|
22654
22993
|
return _createClass__default["default"](DivaCatalogData, [{
|
|
@@ -23742,18 +24081,18 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
23742
24081
|
var _this2 = this;
|
|
23743
24082
|
var diva3DRenderingIsSet = false;
|
|
23744
24083
|
properties.forEach(function (item, index) {
|
|
23745
|
-
var
|
|
24084
|
+
var _textOf, _textOf2, _textOf3, _jsonOf, _jsonOf2, _jsonOf3, _jsonOf4;
|
|
23746
24085
|
//3D Allgemein
|
|
23747
24086
|
|
|
23748
24087
|
var key = item.Codex;
|
|
23749
24088
|
if (key.startsWith(catalogCodex + '__')) key = key.replace(catalogCodex + '__', '');
|
|
23750
24089
|
switch (key) {
|
|
23751
24090
|
case 'DIVA3D_ROOM':
|
|
23752
|
-
_this2.catalogProps.diva3dRoom = item.Value;
|
|
24091
|
+
_this2.catalogProps.diva3dRoom = (_textOf = textOf(item.Value)) !== null && _textOf !== void 0 ? _textOf : '';
|
|
23753
24092
|
if (_this2.catalogProps.diva3dRoom == 'raumatlantis') _this2.catalogProps.diva3dRoom = 'weissraumatlantis';
|
|
23754
24093
|
break;
|
|
23755
24094
|
case 'DIVA3D_RENDERING':
|
|
23756
|
-
diva3DRenderingIsSet = item.Value
|
|
24095
|
+
diva3DRenderingIsSet = item.Value === true;
|
|
23757
24096
|
if (_this2.isIDMFormat) {
|
|
23758
24097
|
_this2.catalogProps.has3dModels = diva3DRenderingIsSet;
|
|
23759
24098
|
}
|
|
@@ -23762,333 +24101,336 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
23762
24101
|
}
|
|
23763
24102
|
break;
|
|
23764
24103
|
case 'DIVA3D_AR_READY':
|
|
23765
|
-
_this2.catalogProps.divaArReady = item.Value
|
|
24104
|
+
_this2.catalogProps.divaArReady = item.Value === true;
|
|
23766
24105
|
break;
|
|
23767
24106
|
case 'DIVA3D_AR_FORCERTV':
|
|
23768
|
-
_this2.catalogProps.divaForceRTV = item.Value
|
|
24107
|
+
_this2.catalogProps.divaForceRTV = item.Value === true;
|
|
23769
24108
|
break;
|
|
23770
24109
|
case 'DIVA3D_USE_RTV_NEXT':
|
|
23771
|
-
_this2.catalogProps.divaUseRtvNext = item.Value
|
|
24110
|
+
_this2.catalogProps.divaUseRtvNext = item.Value === true;
|
|
23772
24111
|
break;
|
|
23773
24112
|
case 'HEADER_DIMENSION_IDS':
|
|
23774
|
-
_this2.catalogProps.headerDimensionIds = item.Value
|
|
24113
|
+
_this2.catalogProps.headerDimensionIds = listOf(item.Value);
|
|
23775
24114
|
break;
|
|
23776
24115
|
case 'DONTCALCBASEPRICE':
|
|
23777
|
-
_this2.catalogProps.dontShowBasePrice = item.Value
|
|
24116
|
+
_this2.catalogProps.dontShowBasePrice = item.Value === true;
|
|
23778
24117
|
break;
|
|
23779
24118
|
case 'DIVA3D_STATIC_BG_IMAGE_ROOMLIST':
|
|
23780
|
-
_this2.catalogProps.roomList3DStaticBGImage.set('3D_STATBG_ROOMLIST', item.Value
|
|
24119
|
+
_this2.catalogProps.roomList3DStaticBGImage.set('3D_STATBG_ROOMLIST', listOf(item.Value));
|
|
23781
24120
|
break;
|
|
23782
24121
|
case 'DIVA3D_DISABLE_3DEXPORT':
|
|
23783
|
-
_this2.catalogProps.disable3DExport = item.Value
|
|
24122
|
+
_this2.catalogProps.disable3DExport = item.Value === true;
|
|
23784
24123
|
break;
|
|
23785
24124
|
case '3D_COMPATIBLE_WITH_IMAGE_CACHE':
|
|
23786
|
-
_this2.catalogProps.diva3dCompatibleWithImageCache = item.Value
|
|
24125
|
+
_this2.catalogProps.diva3dCompatibleWithImageCache = item.Value === true;
|
|
23787
24126
|
break;
|
|
23788
24127
|
case 'ENABLE_DO_SHOW_3DDIMENSIONS':
|
|
23789
|
-
_this2.catalogProps.doShow3DDimensionLines = item.Value
|
|
24128
|
+
_this2.catalogProps.doShow3DDimensionLines = item.Value === true;
|
|
23790
24129
|
break;
|
|
23791
24130
|
case 'DO_SHOW_MAIN_DIMENSIONS':
|
|
23792
|
-
_this2.catalogProps.doShowMainDimensions = item.Value
|
|
24131
|
+
_this2.catalogProps.doShowMainDimensions = item.Value === true;
|
|
23793
24132
|
break;
|
|
23794
24133
|
case 'DEFAULT_DO_SHOW_3DDIMENSIONS':
|
|
23795
|
-
_this2.catalogProps.defaultDimensionsActive =
|
|
24134
|
+
_this2.catalogProps.defaultDimensionsActive = item.Value === true;
|
|
23796
24135
|
break;
|
|
23797
24136
|
case 'DIVA_KI_READY':
|
|
23798
|
-
_this2.catalogProps.divaKiReady = item.Value
|
|
24137
|
+
_this2.catalogProps.divaKiReady = item.Value === true;
|
|
23799
24138
|
break;
|
|
23800
24139
|
// Planner Topics
|
|
23801
24140
|
case 'IS_IDM3D_CAT':
|
|
23802
|
-
_this2.catalogProps.isIDM3DCat = item.Value
|
|
24141
|
+
_this2.catalogProps.isIDM3DCat = item.Value === true;
|
|
23803
24142
|
break;
|
|
23804
24143
|
case 'IDM3D_ENVIRONMENT':
|
|
23805
|
-
_this2.catalogProps.IDM3DEnvironment = (
|
|
24144
|
+
_this2.catalogProps.IDM3DEnvironment = (_textOf2 = textOf(item.Value)) !== null && _textOf2 !== void 0 ? _textOf2 : 'diva.ro';
|
|
23806
24145
|
break;
|
|
23807
24146
|
case 'IDM3D_CAT_CODEX':
|
|
23808
|
-
_this2.catalogProps.IDM3DCatCodex = item.Value;
|
|
24147
|
+
_this2.catalogProps.IDM3DCatCodex = (_textOf3 = textOf(item.Value)) !== null && _textOf3 !== void 0 ? _textOf3 : '';
|
|
23809
24148
|
break;
|
|
23810
24149
|
case 'IDM3D_TRANSLATION':
|
|
23811
|
-
|
|
23812
|
-
var translation =
|
|
24150
|
+
{
|
|
24151
|
+
var translation = jsonOf(item.Value);
|
|
23813
24152
|
if (translation !== null && translation !== void 0 && translation.features && _typeof__default["default"](translation.features) === 'object') _this2.catalogProps.IDM3DTranslation = translation;else LOG$j.warn('Invalid IDM3D_TRANSLATION meta tag - expected a JSON object with a features map');
|
|
23814
|
-
|
|
23815
|
-
LOG$j.warn('Invalid IDM3D_TRANSLATION meta tag - expected a JSON object with a features map', e);
|
|
24153
|
+
break;
|
|
23816
24154
|
}
|
|
23817
|
-
break;
|
|
23818
24155
|
case 'DIVA3D_PLANER_DIGITS':
|
|
23819
24156
|
_this2.catalogProps.divaPlanerDigits = Number(item.Value);
|
|
23820
24157
|
break;
|
|
23821
24158
|
case 'DIVA3D_PLANER_SHOW_ARTICLE_SVG':
|
|
23822
|
-
_this2.catalogProps.diva3dPlanerShowArticleAsSvg = item.Value
|
|
24159
|
+
_this2.catalogProps.diva3dPlanerShowArticleAsSvg = item.Value === true;
|
|
23823
24160
|
break;
|
|
23824
24161
|
case 'SHOWTYPENRINPLANNER':
|
|
23825
|
-
_this2.catalogProps.showTypeNrInPlanner = item.Value
|
|
24162
|
+
_this2.catalogProps.showTypeNrInPlanner = item.Value === true;
|
|
23826
24163
|
break;
|
|
23827
24164
|
case 'STARTFILTERPARAMS':
|
|
23828
|
-
_this2.catalogProps.startFilterParams =
|
|
24165
|
+
_this2.catalogProps.startFilterParams = listOf(item.Value).join(',');
|
|
23829
24166
|
break;
|
|
23830
24167
|
case 'STARTHIDEARTICLES':
|
|
23831
|
-
_this2.catalogProps.startHideArticles = item.Value
|
|
24168
|
+
_this2.catalogProps.startHideArticles = listOf(item.Value);
|
|
23832
24169
|
break;
|
|
23833
24170
|
case 'USEGLOBALSVGSCALE':
|
|
23834
|
-
_this2.catalogProps.useGlobalSVGScale = item.Value
|
|
24171
|
+
_this2.catalogProps.useGlobalSVGScale = item.Value === true;
|
|
23835
24172
|
break;
|
|
23836
24173
|
case 'USEBOXPLANNER':
|
|
23837
|
-
|
|
23838
|
-
|
|
24174
|
+
{
|
|
24175
|
+
var boxPlanner = shapedJsonOf('USEBOXPLANNER', item.Value);
|
|
24176
|
+
if (boxPlanner) _this2.catalogProps.useBoxPlanner = boxPlanner.all === true || boxPlanner.only;
|
|
24177
|
+
break;
|
|
24178
|
+
}
|
|
23839
24179
|
case 'ELEMENT_COPY_AVLR':
|
|
23840
|
-
|
|
23841
|
-
|
|
23842
|
-
|
|
23843
|
-
|
|
24180
|
+
{
|
|
24181
|
+
var copyAVLR = shapedJsonOf('ELEMENT_COPY_AVLR', item.Value);
|
|
24182
|
+
if (copyAVLR) _this2.catalogProps.elementCopyAVLR = copyAVLR.all === true || copyAVLR.only.map(function (o) {
|
|
24183
|
+
return (!_this2.isIDMFormat ? 'OPT' : '') + o;
|
|
24184
|
+
});
|
|
24185
|
+
break;
|
|
24186
|
+
}
|
|
23844
24187
|
case 'PLAN_2D_FONT_URL':
|
|
23845
|
-
_this2.catalogProps.plan2DFontUrl = item.Value || undefined;
|
|
24188
|
+
_this2.catalogProps.plan2DFontUrl = textOf(item.Value) || undefined;
|
|
23846
24189
|
break;
|
|
23847
24190
|
case 'DIMENSION_CONFIG':
|
|
23848
24191
|
// One catalog-level dictionary keyed by articleCodex; entries carry the 2D planner
|
|
23849
24192
|
// dimension/annotation config (consumed structurally by the RTV-next bridge).
|
|
23850
|
-
|
|
23851
|
-
_this2.catalogProps.dimensionConfig2D = JSON.parse(item.Value);
|
|
23852
|
-
} catch (e) {
|
|
23853
|
-
LOG$j.warn('Invalid DIMENSION_CONFIG meta tag - expected a JSON dictionary keyed by articleCodex', e);
|
|
23854
|
-
}
|
|
24193
|
+
_this2.catalogProps.dimensionConfig2D = jsonOf(item.Value);
|
|
23855
24194
|
break;
|
|
23856
24195
|
case 'RTV_PRESET':
|
|
23857
24196
|
// RTV-next environment preset bundle (profileMode/profiles/camera); overrides the
|
|
23858
24197
|
// host's default preset (white-room). Later fed from a DB instead of the catalog.
|
|
23859
|
-
|
|
23860
|
-
_this2.catalogProps.rtvPreset = JSON.parse(item.Value);
|
|
23861
|
-
} catch (e) {
|
|
23862
|
-
LOG$j.warn('Invalid RTV_PRESET meta tag - expected a JSON preset bundle (profileMode/profiles/camera)', e);
|
|
23863
|
-
}
|
|
24198
|
+
_this2.catalogProps.rtvPreset = jsonOf(item.Value);
|
|
23864
24199
|
break;
|
|
23865
24200
|
case 'PLANNERTYPE':
|
|
23866
|
-
_this2.catalogProps.plannerType = item.Value;
|
|
24201
|
+
_this2.catalogProps.plannerType = textOf(item.Value);
|
|
23867
24202
|
break;
|
|
23868
24203
|
case 'START_PLANNER_ARTICLE':
|
|
23869
|
-
_this2.catalogProps.startPlannerArticle = item.Value;
|
|
24204
|
+
_this2.catalogProps.startPlannerArticle = listOf(item.Value).join(';');
|
|
23870
24205
|
break;
|
|
23871
24206
|
case 'HIDE_2D_PLANNER':
|
|
23872
|
-
_this2.catalogProps.hide2DPlanner = item.Value
|
|
24207
|
+
_this2.catalogProps.hide2DPlanner = item.Value === true;
|
|
23873
24208
|
break;
|
|
23874
24209
|
case 'ACCESSOIRE_STEP_AS_PLANNER':
|
|
23875
|
-
_this2.catalogProps.accessorieStepAsPlanner = item.Value
|
|
24210
|
+
_this2.catalogProps.accessorieStepAsPlanner = item.Value === true;
|
|
23876
24211
|
break;
|
|
23877
24212
|
case 'PLANNER_2DOT0':
|
|
23878
|
-
_this2.catalogProps.planner2Dot0 = item.Value
|
|
24213
|
+
_this2.catalogProps.planner2Dot0 = item.Value === true;
|
|
23879
24214
|
break;
|
|
23880
24215
|
case 'DONT_SAVE_ALTERNATIVERENDERINGS':
|
|
23881
|
-
_this2.catalogProps.dontSaveAlternativeRenderings = item.Value
|
|
24216
|
+
_this2.catalogProps.dontSaveAlternativeRenderings = item.Value === true;
|
|
23882
24217
|
break;
|
|
23883
24218
|
case 'SHOW_ALL_ITEMS_IN_PLANNER':
|
|
23884
|
-
_this2.catalogProps.showAllItemsInPlanner = item.Value
|
|
24219
|
+
_this2.catalogProps.showAllItemsInPlanner = item.Value === true;
|
|
23885
24220
|
break;
|
|
23886
24221
|
case 'HIDE_AV_BUTTONS':
|
|
23887
|
-
_this2.catalogProps.hideAVButtons = item.Value;
|
|
24222
|
+
_this2.catalogProps.hideAVButtons = listOf(item.Value).join(';');
|
|
23888
24223
|
break;
|
|
23889
24224
|
case 'PLANNER_REPLACE_MODE':
|
|
23890
|
-
_this2.catalogProps.replaceModeActive = item.Value
|
|
24225
|
+
_this2.catalogProps.replaceModeActive = item.Value === true;
|
|
23891
24226
|
break;
|
|
23892
24227
|
case 'HIDE_PLANNER_UI_ICONS':
|
|
23893
|
-
_this2.catalogProps.hidePlannerUiIcons = item.Value
|
|
24228
|
+
_this2.catalogProps.hidePlannerUiIcons = item.Value === true;
|
|
23894
24229
|
break;
|
|
23895
24230
|
case 'DONT_SET_POSNR_FROM_PLANNER':
|
|
23896
|
-
_this2.catalogProps.dontSetPosNrFromPlanner = item.Value
|
|
24231
|
+
_this2.catalogProps.dontSetPosNrFromPlanner = item.Value === true;
|
|
23897
24232
|
break;
|
|
23898
24233
|
case 'SHOW_AI_ROOM_RENDERING_SUMMARY':
|
|
23899
|
-
_this2.catalogProps.showAiRoomRenderingInSummary = item.Value
|
|
24234
|
+
_this2.catalogProps.showAiRoomRenderingInSummary = item.Value === true;
|
|
23900
24235
|
break;
|
|
23901
24236
|
case 'ARTICLE_NR':
|
|
23902
|
-
_this2.catalogProps.retailArticleNr = item.Value;
|
|
24237
|
+
_this2.catalogProps.retailArticleNr = textOf(item.Value);
|
|
23903
24238
|
break;
|
|
23904
24239
|
case 'PROGRAM_NR':
|
|
23905
|
-
_this2.catalogProps.retailCatalogNr = item.Value;
|
|
24240
|
+
_this2.catalogProps.retailCatalogNr = textOf(item.Value);
|
|
23906
24241
|
break;
|
|
23907
24242
|
// Warnings
|
|
23908
24243
|
case 'HIDECONSTRUCTIONWARNING':
|
|
23909
|
-
_this2.catalogProps.doCheckConstructionWarnings = item.Value
|
|
24244
|
+
_this2.catalogProps.doCheckConstructionWarnings = item.Value !== true;
|
|
23910
24245
|
break;
|
|
23911
24246
|
case 'FORCECONSTRUCTIONWARNINGARTICLES':
|
|
23912
|
-
_this2.catalogProps.forceConstructionWarningForArticles = item.Value
|
|
24247
|
+
_this2.catalogProps.forceConstructionWarningForArticles = listOf(item.Value);
|
|
23913
24248
|
break;
|
|
23914
24249
|
case 'HIDECOMPLETENESSWARNING':
|
|
23915
|
-
_this2.catalogProps.hideCompletenessWarning = item.Value
|
|
24250
|
+
_this2.catalogProps.hideCompletenessWarning = item.Value === true;
|
|
23916
24251
|
break;
|
|
23917
24252
|
// DP Logic
|
|
23918
24253
|
case 'IGNORELAYERAVC':
|
|
23919
|
-
_this2.catalogProps.ignoreLayerAVC = item.Value
|
|
24254
|
+
_this2.catalogProps.ignoreLayerAVC = item.Value === true;
|
|
23920
24255
|
break;
|
|
23921
24256
|
case 'IGNORELAYERAVOAVU':
|
|
23922
|
-
_this2.catalogProps.ignoreLayerAVOAVU = item.Value
|
|
24257
|
+
_this2.catalogProps.ignoreLayerAVOAVU = item.Value === true;
|
|
23923
24258
|
break;
|
|
23924
24259
|
case 'IGNORELAYERAVNAVS':
|
|
23925
|
-
_this2.catalogProps.ignoreLayerAVNAVS = item.Value
|
|
24260
|
+
_this2.catalogProps.ignoreLayerAVNAVS = item.Value === true;
|
|
23926
24261
|
break;
|
|
23927
24262
|
case 'IGNOREDOCKINGNUMBER':
|
|
23928
|
-
_this2.catalogProps.ignoreDockingNumber = item.Value
|
|
24263
|
+
_this2.catalogProps.ignoreDockingNumber = item.Value === true;
|
|
23929
24264
|
break;
|
|
23930
24265
|
case 'CHECK_COLLISION_DIFFERENT_LAYERS':
|
|
23931
|
-
_this2.catalogProps.checkCollisionForDifferentLayers = item.Value
|
|
24266
|
+
_this2.catalogProps.checkCollisionForDifferentLayers = listOf(item.Value).map(function (t) {
|
|
23932
24267
|
return parseInt(t);
|
|
23933
24268
|
});
|
|
23934
24269
|
break;
|
|
23935
24270
|
case 'DOCKACCONAVOONLY':
|
|
23936
|
-
_this2.catalogProps.dockAccOnAvoOnly = item.Value
|
|
24271
|
+
_this2.catalogProps.dockAccOnAvoOnly = item.Value === true;
|
|
23937
24272
|
break;
|
|
23938
24273
|
case 'SHOWACCONDPONLY':
|
|
23939
|
-
_this2.catalogProps.showAccOnDpOnly = item.Value
|
|
24274
|
+
_this2.catalogProps.showAccOnDpOnly = item.Value === true;
|
|
23940
24275
|
break;
|
|
23941
24276
|
case 'RECONFIG_AFTER_ARTICLE_DOCKED':
|
|
23942
|
-
_this2.catalogProps.reconfigAfterArticleDocked = item.Value
|
|
24277
|
+
_this2.catalogProps.reconfigAfterArticleDocked = item.Value === true;
|
|
23943
24278
|
break;
|
|
23944
24279
|
// Configuration
|
|
23945
24280
|
|
|
23946
24281
|
case 'USE_SHORT_NAME_AS_NAME':
|
|
23947
|
-
_this2.catalogProps.useShortNameAsName = item.Value
|
|
24282
|
+
_this2.catalogProps.useShortNameAsName = item.Value === true;
|
|
23948
24283
|
break;
|
|
23949
24284
|
case 'USE_DIOMEX_CONFIG_LOGIC':
|
|
23950
|
-
_this2.catalogProps.useDiomexConfigLogic = item.Value
|
|
24285
|
+
_this2.catalogProps.useDiomexConfigLogic = item.Value === true;
|
|
23951
24286
|
break;
|
|
23952
24287
|
case 'USEPRGASOPVARTICLENR':
|
|
23953
|
-
_this2.catalogProps.UsePrgAsOpvArticleNr = item.Value
|
|
24288
|
+
_this2.catalogProps.UsePrgAsOpvArticleNr = item.Value === true;
|
|
23954
24289
|
break;
|
|
23955
24290
|
case 'ARTICLECONFIGSINGLE':
|
|
23956
|
-
_this2.catalogProps.articleConfigSingle = item.Value
|
|
24291
|
+
_this2.catalogProps.articleConfigSingle = item.Value === true;
|
|
23957
24292
|
break;
|
|
23958
24293
|
case 'DEFAULT_GROUPS_CLOSED':
|
|
23959
|
-
|
|
23960
|
-
|
|
23961
|
-
|
|
23962
|
-
_this2.catalogProps.defaultGroupsClosed =
|
|
24294
|
+
{
|
|
24295
|
+
var _groupsClosed$only;
|
|
24296
|
+
var groupsClosed = shapedJsonOf('DEFAULT_GROUPS_CLOSED', item.Value);
|
|
24297
|
+
if (groupsClosed) _this2.catalogProps.defaultGroupsClosed = (_groupsClosed$only = groupsClosed.only) !== null && _groupsClosed$only !== void 0 ? _groupsClosed$only : groupsClosed.all;
|
|
24298
|
+
break;
|
|
23963
24299
|
}
|
|
23964
|
-
break;
|
|
23965
24300
|
case 'ARTICLECONFIGALL':
|
|
23966
|
-
_this2.catalogProps.articleConfigAll = item.Value
|
|
24301
|
+
_this2.catalogProps.articleConfigAll = item.Value === true;
|
|
23967
24302
|
break;
|
|
23968
24303
|
case 'AUTO_OPEN_CONTENTITEM':
|
|
23969
|
-
|
|
23970
|
-
|
|
23971
|
-
|
|
23972
|
-
|
|
24304
|
+
{
|
|
24305
|
+
var autoOpen = shapedJsonOf('AUTO_OPEN_CONTENTITEM', item.Value);
|
|
24306
|
+
if (autoOpen) _this2.catalogProps.autoOpenContentItem = autoOpen.all === true || autoOpen.only.map(function (o) {
|
|
24307
|
+
return (!_this2.isIDMFormat ? 'OPT' : '') + o;
|
|
24308
|
+
});
|
|
24309
|
+
break;
|
|
24310
|
+
}
|
|
23973
24311
|
case 'HIDE_PRICE_GROUPS_OF_OPGS':
|
|
23974
|
-
_this2.catalogProps.hidePriceGroupsOfOPGs = item.Value
|
|
24312
|
+
_this2.catalogProps.hidePriceGroupsOfOPGs = item.Value === true;
|
|
23975
24313
|
break;
|
|
23976
24314
|
case 'DONTHIDEOPTION':
|
|
23977
|
-
_this2.catalogProps.dontHideOption =
|
|
24315
|
+
_this2.catalogProps.dontHideOption = listOf(item.Value);
|
|
23978
24316
|
break;
|
|
23979
24317
|
case 'SHOW_AI_ROOM_RENDERING_IN_SUMMARY':
|
|
23980
|
-
_this2.catalogProps.showAiRoomRenderingInSummary = item.Value
|
|
24318
|
+
_this2.catalogProps.showAiRoomRenderingInSummary = item.Value === true;
|
|
23981
24319
|
break;
|
|
23982
24320
|
case 'SHOWACCESSOIREONLASTTAB':
|
|
23983
|
-
_this2.catalogProps.showAccessioreOnLastTab = item.Value
|
|
24321
|
+
_this2.catalogProps.showAccessioreOnLastTab = item.Value === true;
|
|
23984
24322
|
break;
|
|
23985
24323
|
case 'FORCE_CONFIG_ALL_ACCESSOIRES':
|
|
23986
|
-
_this2.catalogProps.forceConfigAllAccessoires = item.Value
|
|
24324
|
+
_this2.catalogProps.forceConfigAllAccessoires = item.Value === true;
|
|
23987
24325
|
break;
|
|
23988
24326
|
case 'CONFIG_ACCESSOIRES':
|
|
23989
|
-
_this2.catalogProps.configAccessoires = item.Value
|
|
24327
|
+
_this2.catalogProps.configAccessoires = item.Value === true;
|
|
23990
24328
|
break;
|
|
23991
24329
|
case 'CONFIG_ONLY_ACCESSOIRES':
|
|
23992
|
-
_this2.catalogProps.configOnlyAccessoires = item.Value
|
|
24330
|
+
_this2.catalogProps.configOnlyAccessoires = item.Value === true;
|
|
23993
24331
|
break;
|
|
23994
24332
|
case 'IGNORE_ARTICLERELATIONS':
|
|
23995
|
-
_this2.catalogProps.ignoreArticleRelations = item.Value
|
|
24333
|
+
_this2.catalogProps.ignoreArticleRelations = item.Value === true;
|
|
23996
24334
|
break;
|
|
23997
24335
|
case 'REPAIR_VARIANT_VALUES':
|
|
23998
|
-
|
|
23999
|
-
|
|
24000
|
-
|
|
24001
|
-
|
|
24002
|
-
|
|
24336
|
+
{
|
|
24337
|
+
var repairs = shapedJsonOf('REPAIR_VARIANT_VALUES', item.Value);
|
|
24338
|
+
if (!repairs) break;
|
|
24339
|
+
_this2.catalogProps.repairVariantValues = {};
|
|
24340
|
+
for (var _i = 0, _Object$entries = Object.entries(repairs); _i < _Object$entries.length; _i++) {
|
|
24341
|
+
var _Object$entries$_i = _slicedToArray__default["default"](_Object$entries[_i], 2),
|
|
24342
|
+
from = _Object$entries$_i[0],
|
|
24343
|
+
to = _Object$entries$_i[1];
|
|
24344
|
+
_this2.catalogProps.repairVariantValues['OPT' + from.replace(':', ':OPV')] = 'OPT' + to.replace(':', ':OPV');
|
|
24345
|
+
}
|
|
24346
|
+
break;
|
|
24003
24347
|
}
|
|
24004
|
-
break;
|
|
24005
24348
|
case 'FILTER_FOR_CHECKOUT_BUTTONS':
|
|
24006
|
-
_this2.catalogProps.filterForCheckoutButtons = item.Value
|
|
24007
|
-
return t;
|
|
24008
|
-
});
|
|
24349
|
+
_this2.catalogProps.filterForCheckoutButtons = listOf(item.Value);
|
|
24009
24350
|
break;
|
|
24010
24351
|
case 'DO_USE_RULEDESC_FOR_PARTLIST':
|
|
24011
|
-
_this2.catalogProps.doUseRuleDescForPartListArticles =
|
|
24352
|
+
_this2.catalogProps.doUseRuleDescForPartListArticles = item.Value === true;
|
|
24012
24353
|
break;
|
|
24013
24354
|
case 'USEPOSCOUNTVALUE':
|
|
24014
|
-
_this2.catalogProps.usePosCountValue =
|
|
24355
|
+
_this2.catalogProps.usePosCountValue = item.Value === true;
|
|
24015
24356
|
break;
|
|
24016
24357
|
case 'USE_DECISION_POS_COUNT_VALUE':
|
|
24017
|
-
_this2.catalogProps.useDecisionPosCountValue =
|
|
24358
|
+
_this2.catalogProps.useDecisionPosCountValue = item.Value === true;
|
|
24018
24359
|
break;
|
|
24019
24360
|
case 'USE_SHELFPLANNER_RTV':
|
|
24020
|
-
_this2.catalogProps.useShelfPlannerRTV =
|
|
24361
|
+
_this2.catalogProps.useShelfPlannerRTV = item.Value === true;
|
|
24021
24362
|
break;
|
|
24022
24363
|
case 'DONT_SHOW_ACC_STEP':
|
|
24023
|
-
_this2.catalogProps.dontShowAccStep =
|
|
24364
|
+
_this2.catalogProps.dontShowAccStep = item.Value === true;
|
|
24024
24365
|
break;
|
|
24025
24366
|
case 'MERGE_OPTIONS_TO_SAME_OPTION':
|
|
24026
|
-
|
|
24027
|
-
|
|
24028
|
-
|
|
24367
|
+
{
|
|
24368
|
+
var merges = shapedJsonOf('MERGE_OPTIONS_TO_SAME_OPTION', item.Value);
|
|
24369
|
+
if (merges) _this2.catalogProps.mergeOptionsToSameOption = merges;
|
|
24370
|
+
break;
|
|
24371
|
+
}
|
|
24029
24372
|
case 'FORCE_CONFIG_SINGLE':
|
|
24030
|
-
_this2.catalogProps.forceConfigSingle =
|
|
24373
|
+
_this2.catalogProps.forceConfigSingle = item.Value === true;
|
|
24031
24374
|
break;
|
|
24032
24375
|
case 'SHOW_PRICEPREVIEW_ON_OPTIONS':
|
|
24033
|
-
_this2.catalogProps.showPricePreviewOnlyOnOptions = item.Value
|
|
24034
|
-
return t;
|
|
24035
|
-
});
|
|
24376
|
+
_this2.catalogProps.showPricePreviewOnlyOnOptions = listOf(item.Value);
|
|
24036
24377
|
break;
|
|
24037
24378
|
case 'HIDE_PRICEPREVIEW_ON_OPTIONS':
|
|
24038
|
-
_this2.catalogProps.hidePricePreviewOnlyOnOptions = item.Value
|
|
24039
|
-
return t;
|
|
24040
|
-
});
|
|
24379
|
+
_this2.catalogProps.hidePricePreviewOnlyOnOptions = listOf(item.Value);
|
|
24041
24380
|
break;
|
|
24042
24381
|
case 'INIT_OPTIONTREE_TWICE':
|
|
24043
|
-
_this2.catalogProps.initOptionTreeTwice =
|
|
24382
|
+
_this2.catalogProps.initOptionTreeTwice = item.Value === true;
|
|
24044
24383
|
break;
|
|
24045
24384
|
case 'USE_TYPENR_AS_ARTICLENR_EKTEXT':
|
|
24046
|
-
_this2.catalogProps.useTypeNrAsArticleNrEKText =
|
|
24385
|
+
_this2.catalogProps.useTypeNrAsArticleNrEKText = item.Value === true;
|
|
24047
24386
|
break;
|
|
24048
24387
|
case 'HIDE_SUBPOS_ARTICLECODEX_EKTEXT':
|
|
24049
|
-
_this2.catalogProps.hideSubPosArticleCodexEKText =
|
|
24388
|
+
_this2.catalogProps.hideSubPosArticleCodexEKText = item.Value === true;
|
|
24050
24389
|
break;
|
|
24051
24390
|
case 'ADD_POS_INVISIBILITY_TO_OL':
|
|
24052
|
-
_this2.catalogProps.addPosInvisibilityToOL =
|
|
24391
|
+
_this2.catalogProps.addPosInvisibilityToOL = item.Value === true;
|
|
24053
24392
|
break;
|
|
24054
24393
|
case 'ADD_NEW_LINE_BEFOR_RULEDESC':
|
|
24055
|
-
_this2.catalogProps.addNewLineBeforRuleDesc =
|
|
24394
|
+
_this2.catalogProps.addNewLineBeforRuleDesc = item.Value === true;
|
|
24056
24395
|
break;
|
|
24057
24396
|
case 'ONCONFIG_SINGLE_DONT_GENERALIZE':
|
|
24058
|
-
_this2.catalogProps.onConfigSingleDontGeneralize =
|
|
24397
|
+
_this2.catalogProps.onConfigSingleDontGeneralize = item.Value === true;
|
|
24059
24398
|
break;
|
|
24060
24399
|
case 'SUMMARY_TABGROUP_POSITION':
|
|
24061
|
-
_this2.catalogProps.summaryTabGroupPosition = item.Value
|
|
24400
|
+
_this2.catalogProps.summaryTabGroupPosition = listOf(item.Value);
|
|
24062
24401
|
break;
|
|
24063
24402
|
case 'BUNDLE_RULES':
|
|
24064
|
-
_this2.catalogProps.bundleRules =
|
|
24403
|
+
_this2.catalogProps.bundleRules = (_jsonOf = jsonOf(item.Value)) !== null && _jsonOf !== void 0 ? _jsonOf : [];
|
|
24065
24404
|
break;
|
|
24066
24405
|
case 'NOTIFICATIONS':
|
|
24067
|
-
_this2.catalogProps.notificationsRules =
|
|
24406
|
+
_this2.catalogProps.notificationsRules = (_jsonOf2 = jsonOf(item.Value)) !== null && _jsonOf2 !== void 0 ? _jsonOf2 : [];
|
|
24068
24407
|
break;
|
|
24069
24408
|
case 'WARNINGS':
|
|
24070
|
-
_this2.catalogProps.warningRules =
|
|
24409
|
+
_this2.catalogProps.warningRules = (_jsonOf3 = jsonOf(item.Value)) !== null && _jsonOf3 !== void 0 ? _jsonOf3 : [];
|
|
24071
24410
|
break;
|
|
24072
24411
|
case 'BANNER':
|
|
24073
|
-
_this2.catalogProps.bannerRules =
|
|
24412
|
+
_this2.catalogProps.bannerRules = (_jsonOf4 = jsonOf(item.Value)) !== null && _jsonOf4 !== void 0 ? _jsonOf4 : [];
|
|
24074
24413
|
break;
|
|
24075
24414
|
case 'IGNORE_MAX_PRICE_AS_BASEPRICE':
|
|
24076
|
-
_this2.catalogProps.ignoreMaxPriceAsBP =
|
|
24415
|
+
_this2.catalogProps.ignoreMaxPriceAsBP = item.Value === true;
|
|
24077
24416
|
break;
|
|
24078
24417
|
case 'DONT_USE_VCODEX_FOR_BASKET':
|
|
24079
|
-
_this2.catalogProps.dontUseVCodexInBasket =
|
|
24418
|
+
_this2.catalogProps.dontUseVCodexInBasket = item.Value === true;
|
|
24080
24419
|
break;
|
|
24081
24420
|
case 'IGNORE_ISDEFINED_CHECK':
|
|
24082
|
-
_this2.catalogProps.ignoreIsDefinedCheck =
|
|
24421
|
+
_this2.catalogProps.ignoreIsDefinedCheck = item.Value === true;
|
|
24083
24422
|
break;
|
|
24084
24423
|
case 'PARTLIST_POSTFIX':
|
|
24085
|
-
|
|
24086
|
-
|
|
24087
|
-
|
|
24088
|
-
|
|
24089
|
-
|
|
24090
|
-
|
|
24091
|
-
|
|
24424
|
+
{
|
|
24425
|
+
var postfixes = shapedJsonOf('PARTLIST_POSTFIX', item.Value);
|
|
24426
|
+
if (postfixes) _this2.catalogProps.partlistPostFix = postfixes.map(function (entry) {
|
|
24427
|
+
return {
|
|
24428
|
+
rule: entry.rule,
|
|
24429
|
+
postFix: entry.postfix
|
|
24430
|
+
};
|
|
24431
|
+
});
|
|
24432
|
+
break;
|
|
24433
|
+
}
|
|
24092
24434
|
case 'ADD_PA_ON_EDO':
|
|
24093
24435
|
_this2.handleEdoArticles(properties, item);
|
|
24094
24436
|
break;
|
|
@@ -24111,9 +24453,10 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
24111
24453
|
if (key.startsWith('3D_STATBG_ROOMLIST')) {
|
|
24112
24454
|
// item.Value =
|
|
24113
24455
|
// "weissraum_LUECK;backgroundimgroom_lueck_modern;backgroundimgroom_lueck_romantic;backgroundimgroom_lueck_loft;backgroundimgroom_lueck_night";
|
|
24114
|
-
_this3.catalogProps.roomList3DStaticBGImage.set(item.Codex, item.Value
|
|
24456
|
+
_this3.catalogProps.roomList3DStaticBGImage.set(item.Codex, propertyTexts(item.Value));
|
|
24115
24457
|
} else if (key.startsWith('3D_STANDARD_WHITEROOM')) {
|
|
24116
|
-
|
|
24458
|
+
var _textOf4;
|
|
24459
|
+
_this3.catalogProps.diva3dStandardWhiteroom = (_textOf4 = textOf(item.Value)) !== null && _textOf4 !== void 0 ? _textOf4 : '';
|
|
24117
24460
|
} else if (key.startsWith('DIVA3D_IMAGE')) {
|
|
24118
24461
|
_this3.handleDIVA3DMetaTag(item);
|
|
24119
24462
|
}
|
|
@@ -24122,14 +24465,16 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
24122
24465
|
}, {
|
|
24123
24466
|
key: "handleDIVA3DMetaTag",
|
|
24124
24467
|
value: function handleDIVA3DMetaTag(item) {
|
|
24468
|
+
var _textOf5;
|
|
24125
24469
|
//this.Value = "ON.ZUBEHOER_KORPUS1;ON.ZUBEHOER_KORPUS2;ON.ZUBEHOER_KORPUS3:HIDEOPTIONS.FAF;PANEEL;ACP:VIEWPOINTNAME.START_RECHTS";
|
|
24126
24470
|
//Diese Regel gilt für Optionen ZUBEHOER_KORPUS1, ZUBEHOER_KORPUS2 und ZUBEHOER_KORPUS3
|
|
24127
24471
|
|
|
24128
24472
|
//this.Value: "ON.ZUBEHOER*:HIDEOPTIONS.TUER*;TUER_FARB_AF*;TUEREN*;GRIFF_AF*;GRIFF_AF_KOMBI*"
|
|
24129
24473
|
//Diese Regel gilt für alle Optionen beginnend mit ZUBEHOER*
|
|
24130
24474
|
|
|
24131
|
-
var alternateRenderInfo = item.Value.split(':');
|
|
24132
|
-
|
|
24475
|
+
var alternateRenderInfo = ((_textOf5 = textOf(item.Value)) !== null && _textOf5 !== void 0 ? _textOf5 : '').split(':');
|
|
24476
|
+
// A rule without the options to hide after the ':' is no rule
|
|
24477
|
+
if (alternateRenderInfo.length > 1) {
|
|
24133
24478
|
var onValues = alternateRenderInfo[0].split(';');
|
|
24134
24479
|
var hideOptionValues = alternateRenderInfo[1].split(';');
|
|
24135
24480
|
var viewPointName = undefined;
|
|
@@ -24241,9 +24586,9 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
24241
24586
|
key: "handleEdoArticles",
|
|
24242
24587
|
value: function handleEdoArticles(properties, item) {
|
|
24243
24588
|
var _properties$find;
|
|
24244
|
-
var thisCodex = (_properties$find = properties.find(function (item) {
|
|
24589
|
+
var thisCodex = textOf((_properties$find = properties.find(function (item) {
|
|
24245
24590
|
return item.Codex == 'ADD_PA_ON_EDO_ARTICLECODEX';
|
|
24246
|
-
})) === null || _properties$find === void 0 ? void 0 : _properties$find.Value;
|
|
24591
|
+
})) === null || _properties$find === void 0 ? void 0 : _properties$find.Value);
|
|
24247
24592
|
var thisPropertie;
|
|
24248
24593
|
if (!thisCodex) {
|
|
24249
24594
|
console.error('ADD_PA_ON_EDO_ARTICLECODEX not defined!');
|
|
@@ -28467,18 +28812,10 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
28467
28812
|
var ops = this.article.getArticleOptionState(action.featureNo.toString());
|
|
28468
28813
|
if (ops && (isNull && ops.val === undefined || !isNull && (ops.val === undefined || !ops.valueWasSet))) {
|
|
28469
28814
|
if (action.formulaRef) {
|
|
28470
|
-
|
|
28471
|
-
var _ops2 = this.article.getArticleOptionState((_action$featureNo = action.featureNo) === null || _action$featureNo === void 0 ? void 0 : _action$featureNo.toString());
|
|
28472
|
-
var option = _ops2 === null || _ops2 === void 0 ? void 0 : _ops2.val;
|
|
28473
|
-
var formula = (_this$article$Catalog = this.article.CatalogData.idmFormulas) === null || _this$article$Catalog === void 0 ? void 0 : _this$article$Catalog[action.formulaRef.formulaKey];
|
|
28474
|
-
if (!formula) throw new Error('formula ' + action.formulaRef.formulaKey + ' not found in catalog but used in decision: ' + decision.decisionNo);
|
|
28475
|
-
var freeText = this.evalMeasureFormula(formula);
|
|
28476
|
-
if (option) {
|
|
28477
|
-
this.updateArtOPV(option, action.featureNo.toString(), _ops2, freeText, freeText ? Number(freeText) : undefined);
|
|
28478
|
-
}
|
|
28815
|
+
this.applyFormulaRef(action.featureNo.toString(), action.formulaRef.formulaKey, decision);
|
|
28479
28816
|
} else if (action.featureRef) {
|
|
28480
|
-
var
|
|
28481
|
-
if (
|
|
28817
|
+
var _ops2 = this.article.getArticleOptionState(action.featureRef.featureNo);
|
|
28818
|
+
if (_ops2 !== null && _ops2 !== void 0 && _ops2.valCodex) this.assignOptionValue(action.featureNo.toString(), _ops2.valCodex, 'default', _ops2);
|
|
28482
28819
|
} else if (action.optionRef) {
|
|
28483
28820
|
this.assignOptionValue(action.featureNo.toString(), action.optionRef.optionKey, 'default');
|
|
28484
28821
|
} else {
|
|
@@ -28500,46 +28837,38 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
28500
28837
|
_step19;
|
|
28501
28838
|
try {
|
|
28502
28839
|
for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
|
|
28503
|
-
var _action$
|
|
28840
|
+
var _action$featureNo;
|
|
28504
28841
|
var action = _step19.value;
|
|
28505
|
-
if (!this.article.getArticleOptionState((_action$
|
|
28842
|
+
if (!this.article.getArticleOptionState((_action$featureNo = action.featureNo) === null || _action$featureNo === void 0 ? void 0 : _action$featureNo.toString()) || !action.featureNo) {
|
|
28506
28843
|
//usecase is that it want to be set on partlistarticle that is not currently loaded so its not found
|
|
28507
28844
|
LOG$g.debug('evalSetFeature decision ' + decision.decisionNo + ' (isFixed=' + isFixed + '): target feature ' + action.featureNo + ' has no option state on article ' + this.article.articleCodex + ' - action skipped');
|
|
28508
28845
|
continue;
|
|
28509
28846
|
}
|
|
28510
28847
|
if (action.formulaRef) {
|
|
28511
|
-
|
|
28512
|
-
var ops = this.article.getArticleOptionState((_action$featureNo3 = action.featureNo) === null || _action$featureNo3 === void 0 ? void 0 : _action$featureNo3.toString());
|
|
28513
|
-
var option = ops === null || ops === void 0 ? void 0 : ops.val;
|
|
28514
|
-
var formula = (_this$article$Catalog2 = this.article.CatalogData.idmFormulas) === null || _this$article$Catalog2 === void 0 ? void 0 : _this$article$Catalog2[action.formulaRef.formulaKey];
|
|
28515
|
-
if (!formula) throw new Error('formula ' + action.formulaRef.formulaKey + ' not found in catalog but used in decision: ' + decision.decisionNo);
|
|
28516
|
-
var freeText = this.evalMeasureFormula(formula);
|
|
28517
|
-
if (option) {
|
|
28518
|
-
this.updateArtOPV(option, action.featureNo.toString(), ops, freeText, freeText ? Number(freeText) : undefined);
|
|
28519
|
-
}
|
|
28848
|
+
this.applyFormulaRef(action.featureNo.toString(), action.formulaRef.formulaKey, decision);
|
|
28520
28849
|
} else if (action.featureRef) {
|
|
28521
|
-
var
|
|
28850
|
+
var ops = this.article.getArticleOptionState(action.featureRef.featureNo);
|
|
28522
28851
|
var targetOps = this.article.getArticleOptionState(action.featureNo.toString());
|
|
28523
|
-
var targetHasSourceValue =
|
|
28852
|
+
var targetHasSourceValue = ops !== null && ops !== void 0 && ops.valCodex ? !!(targetOps !== null && targetOps !== void 0 && targetOps.visibleOptionValues.get(ops.valCodex)) : undefined;
|
|
28524
28853
|
LOG$g.debug('evalSetFeature(featureRef) decision ' + decision.decisionNo + ': set feature ' + action.featureNo + ' from feature ' + action.featureRef.featureNo, {
|
|
28525
28854
|
sourceFeatureNo: action.featureRef.featureNo,
|
|
28526
|
-
sourceFeatureFound: !!
|
|
28527
|
-
sourceValCodex:
|
|
28528
|
-
sourceVisibleKeys:
|
|
28855
|
+
sourceFeatureFound: !!ops,
|
|
28856
|
+
sourceValCodex: ops === null || ops === void 0 ? void 0 : ops.valCodex,
|
|
28857
|
+
sourceVisibleKeys: ops ? ops.visibleOPVKeys : undefined,
|
|
28529
28858
|
targetFeatureNo: action.featureNo,
|
|
28530
28859
|
targetFeatureFound: !!targetOps,
|
|
28531
28860
|
targetHasSourceValue: targetHasSourceValue,
|
|
28532
28861
|
targetVisibleKeys: targetOps ? Array.from(targetOps.visibleOptionValues.keys()) : undefined
|
|
28533
28862
|
});
|
|
28534
|
-
if (!
|
|
28863
|
+
if (!ops) {
|
|
28535
28864
|
LOG$g.warn('evalSetFeature(featureRef) decision ' + decision.decisionNo + ': referenced source feature ' + action.featureRef.featureNo + ' has no option state on article ' + this.article.articleCodex + ' - target feature ' + action.featureNo + ' will NOT be set (price relevant)');
|
|
28536
|
-
} else if (!
|
|
28865
|
+
} else if (!ops.valCodex) {
|
|
28537
28866
|
LOG$g.warn('evalSetFeature(featureRef) decision ' + decision.decisionNo + ': referenced source feature ' + action.featureRef.featureNo + ' has no selected value (valCodex undefined) - target feature ' + action.featureNo + ' will NOT be set (price relevant)');
|
|
28538
28867
|
} else if (!targetHasSourceValue) {
|
|
28539
|
-
LOG$g.warn('evalSetFeature(featureRef) decision ' + decision.decisionNo + ': target feature ' + action.featureNo + ' does not have source feature ' + action.featureRef.featureNo + "'s value '" +
|
|
28868
|
+
LOG$g.warn('evalSetFeature(featureRef) decision ' + decision.decisionNo + ': target feature ' + action.featureNo + ' does not have source feature ' + action.featureRef.featureNo + "'s value '" + ops.valCodex + "' among its visible option values - assignOptionValue will be a no-op (price relevant). Target visible values: " + (targetOps ? Array.from(targetOps.visibleOptionValues.keys()).join(', ') : '<no target>'));
|
|
28540
28869
|
}
|
|
28541
28870
|
// The typed number travels with the option key, or the target shows the option without the user's entry.
|
|
28542
|
-
if (
|
|
28871
|
+
if (ops !== null && ops !== void 0 && ops.valCodex) this.assignOptionValue(action.featureNo.toString(), ops.valCodex, isFixed ? 'fix' : 'set', ops);
|
|
28543
28872
|
} else if (action.optionRef) {
|
|
28544
28873
|
this.assignOptionValue(action.featureNo.toString(), action.optionRef.optionKey, isFixed ? 'fix' : 'set');
|
|
28545
28874
|
} else {
|
|
@@ -28552,6 +28881,41 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
28552
28881
|
_iterator19.f();
|
|
28553
28882
|
}
|
|
28554
28883
|
}
|
|
28884
|
+
}, {
|
|
28885
|
+
key: "applyFormulaRef",
|
|
28886
|
+
value: function applyFormulaRef(featureNo, formulaKey, decision) {
|
|
28887
|
+
var _this$article$Catalog;
|
|
28888
|
+
var formula = (_this$article$Catalog = this.article.CatalogData.idmFormulas) === null || _this$article$Catalog === void 0 ? void 0 : _this$article$Catalog[formulaKey];
|
|
28889
|
+
if (!formula) throw new Error('formula ' + formulaKey + ' not found in catalog but used in decision: ' + decision.decisionNo);
|
|
28890
|
+
var ops = this.article.getArticleOptionState(featureNo);
|
|
28891
|
+
var freeText = this.evalMeasureFormula(formula);
|
|
28892
|
+
var option = ops === null || ops === void 0 ? void 0 : ops.val;
|
|
28893
|
+
var isThisWarning = function isThisWarning(error) {
|
|
28894
|
+
var _error$custom, _error$custom2;
|
|
28895
|
+
return error.code === 'WC_0020' && ((_error$custom = error.custom) === null || _error$custom === void 0 ? void 0 : _error$custom.decisionNo) === decision.decisionNo && ((_error$custom2 = error.custom) === null || _error$custom2 === void 0 ? void 0 : _error$custom2.featureNo) === featureNo;
|
|
28896
|
+
};
|
|
28897
|
+
if (option) {
|
|
28898
|
+
this.updateArtOPV(option, featureNo, ops, freeText, freeText ? Number(freeText) : undefined);
|
|
28899
|
+
// an earlier convergence pass may have reported it before the feature got its option
|
|
28900
|
+
var reported = this.article.dataCreationErrors.findIndex(isThisWarning);
|
|
28901
|
+
if (reported >= 0) this.article.dataCreationErrors.splice(reported, 1);
|
|
28902
|
+
return;
|
|
28903
|
+
}
|
|
28904
|
+
if (this.article.dataCreationErrors.some(isThisWarning)) return;
|
|
28905
|
+
this.article.pushDataCreationError({
|
|
28906
|
+
code: 'WC_0020',
|
|
28907
|
+
message: "Formula '".concat(formulaKey, "' of decision ").concat(decision.decisionNo, " computed ").concat(freeText, ", but feature ").concat(featureNo, " has no selected value to hold it - the result is dropped (give the feature an option value)"),
|
|
28908
|
+
severity: 'warning',
|
|
28909
|
+
custom: {
|
|
28910
|
+
decisionNo: decision.decisionNo,
|
|
28911
|
+
featureNo: featureNo,
|
|
28912
|
+
formulaKey: formulaKey,
|
|
28913
|
+
result: freeText,
|
|
28914
|
+
catalogCodex: this.article.catalogCodex,
|
|
28915
|
+
articleCodex: this.article.articleCodex
|
|
28916
|
+
}
|
|
28917
|
+
});
|
|
28918
|
+
}
|
|
28555
28919
|
|
|
28556
28920
|
/** Selects an option on a feature; a FEATURE_REF passes its `source`, whose typed text and formula measure (cm) come along. */
|
|
28557
28921
|
}, {
|
|
@@ -29117,8 +29481,8 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
29117
29481
|
key: "isShadowedRowReported",
|
|
29118
29482
|
value: function isShadowedRowReported(decisionNo, ruleSet, combinationIndex) {
|
|
29119
29483
|
return this.article.dataCreationErrors.some(function (error) {
|
|
29120
|
-
var _error$
|
|
29121
|
-
return error.code === 'WC_0012' && ((_error$
|
|
29484
|
+
var _error$custom3, _error$custom4, _error$custom5;
|
|
29485
|
+
return error.code === 'WC_0012' && ((_error$custom3 = error.custom) === null || _error$custom3 === void 0 ? void 0 : _error$custom3.decisionNo) === decisionNo && ((_error$custom4 = error.custom) === null || _error$custom4 === void 0 ? void 0 : _error$custom4.ruleSet) === ruleSet && ((_error$custom5 = error.custom) === null || _error$custom5 === void 0 ? void 0 : _error$custom5.combinationIndex) === combinationIndex;
|
|
29122
29486
|
});
|
|
29123
29487
|
}
|
|
29124
29488
|
}, {
|
|
@@ -29197,9 +29561,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
29197
29561
|
_step22;
|
|
29198
29562
|
try {
|
|
29199
29563
|
for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
|
|
29200
|
-
var _action$
|
|
29564
|
+
var _action$featureNo2, _byFeature$get;
|
|
29201
29565
|
var action = _step22.value;
|
|
29202
|
-
var featureNo = (_action$
|
|
29566
|
+
var featureNo = (_action$featureNo2 = action.featureNo) === null || _action$featureNo2 === void 0 ? void 0 : _action$featureNo2.toString();
|
|
29203
29567
|
if (!featureNo) continue;
|
|
29204
29568
|
var list = (_byFeature$get = byFeature.get(featureNo)) !== null && _byFeature$get !== void 0 ? _byFeature$get : [];
|
|
29205
29569
|
if (!list.includes(decision)) list.push(decision);
|
|
@@ -29766,7 +30130,7 @@ function _createForOfIteratorHelper$f(r, e) { var t = "undefined" != typeof Symb
|
|
|
29766
30130
|
function _unsupportedIterableToArray$f(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$f(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$f(r, a) : void 0; } }
|
|
29767
30131
|
function _arrayLikeToArray$f(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; }
|
|
29768
30132
|
/**
|
|
29769
|
-
* Feature property
|
|
30133
|
+
* Feature property listing the Diomex properties a feature feeds, e.g. `["13", "15/L2"]`. `<group>@@<property>` scopes a
|
|
29770
30134
|
* property to one partlist group of the set, e.g. `PrRef_Füsse@@13` for the wood of the feet only.
|
|
29771
30135
|
*/
|
|
29772
30136
|
var IDM3D_TARGET = 'IDM3D_TARGET';
|
|
@@ -29779,7 +30143,7 @@ var GROUP_SEPARATOR = '@@';
|
|
|
29779
30143
|
var IDM3D_VALUE = 'IDM3D_VALUE';
|
|
29780
30144
|
var IDM3D_SKIP = 'SKIP';
|
|
29781
30145
|
|
|
29782
|
-
/** One selected value of the article tree together with its
|
|
30146
|
+
/** One selected value of the article tree together with its feature and value properties. */
|
|
29783
30147
|
|
|
29784
30148
|
// the parsers also accept the codex prefixed with its catalog codex (`<catalogCodex>__IDM3D_TARGET`)
|
|
29785
30149
|
var findProperty = function findProperty(properties, codex) {
|
|
@@ -29829,21 +30193,19 @@ function translateToIDM3DConfig(sources, model, translation) {
|
|
|
29829
30193
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
29830
30194
|
var source = _step.value;
|
|
29831
30195
|
var tier = source.hidden ? 2 : 0;
|
|
29832
|
-
var override = findProperty(source.valueProperties, IDM3D_VALUE);
|
|
30196
|
+
var override = textOf(findProperty(source.valueProperties, IDM3D_VALUE));
|
|
29833
30197
|
if (override === IDM3D_SKIP) continue;
|
|
29834
30198
|
if (override !== null && override !== void 0 && override.includes('=')) {
|
|
29835
30199
|
var _tiers$tier;
|
|
29836
30200
|
(_tiers$tier = tiers[tier]).push.apply(_tiers$tier, _toConsumableArray__default["default"](parsePairs(override)));
|
|
29837
30201
|
continue;
|
|
29838
30202
|
}
|
|
29839
|
-
var
|
|
29840
|
-
if (!targets) continue;
|
|
29841
|
-
var _iterator3 = _createForOfIteratorHelper$f(targets.split(',')),
|
|
30203
|
+
var _iterator3 = _createForOfIteratorHelper$f(listOf(findProperty(source.featureProperties, IDM3D_TARGET))),
|
|
29842
30204
|
_step3;
|
|
29843
30205
|
try {
|
|
29844
30206
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
29845
30207
|
var target = _step3.value;
|
|
29846
|
-
tiers[tier + 1].push({
|
|
30208
|
+
if (target.trim()) tiers[tier + 1].push({
|
|
29847
30209
|
target: target.trim(),
|
|
29848
30210
|
value: override !== null && override !== void 0 ? override : source.value
|
|
29849
30211
|
});
|
|
@@ -32908,7 +33270,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
32908
33270
|
break;
|
|
32909
33271
|
}
|
|
32910
33272
|
_context.next = 4;
|
|
32911
|
-
return Promise.resolve().then(function () { return require('./ShelfPlanner-
|
|
33273
|
+
return Promise.resolve().then(function () { return require('./ShelfPlanner-4eb63a5c.js'); });
|
|
32912
33274
|
case 4:
|
|
32913
33275
|
_yield$import = _context.sent;
|
|
32914
33276
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -41630,7 +41992,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
41630
41992
|
break;
|
|
41631
41993
|
}
|
|
41632
41994
|
_context5.next = 3;
|
|
41633
|
-
return Promise.resolve().then(function () { return require('./DoorPlanner-
|
|
41995
|
+
return Promise.resolve().then(function () { return require('./DoorPlanner-35be7adf.js'); });
|
|
41634
41996
|
case 3:
|
|
41635
41997
|
_yield$import = _context5.sent;
|
|
41636
41998
|
DoorPlanner = _yield$import["default"];
|
|
@@ -49601,7 +49963,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
49601
49963
|
break;
|
|
49602
49964
|
case 3:
|
|
49603
49965
|
_context12.next = 5;
|
|
49604
|
-
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-
|
|
49966
|
+
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-7404917e.js'); });
|
|
49605
49967
|
case 5:
|
|
49606
49968
|
_yield$import = _context12.sent;
|
|
49607
49969
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -49609,7 +49971,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
49609
49971
|
return _context12.abrupt("break", 27);
|
|
49610
49972
|
case 9:
|
|
49611
49973
|
_context12.next = 11;
|
|
49612
|
-
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-
|
|
49974
|
+
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-13757823.js'); });
|
|
49613
49975
|
case 11:
|
|
49614
49976
|
_yield$import2 = _context12.sent;
|
|
49615
49977
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -49617,7 +49979,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
49617
49979
|
return _context12.abrupt("break", 27);
|
|
49618
49980
|
case 15:
|
|
49619
49981
|
_context12.next = 17;
|
|
49620
|
-
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-
|
|
49982
|
+
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-2b3d0f22.js'); });
|
|
49621
49983
|
case 17:
|
|
49622
49984
|
_yield$import3 = _context12.sent;
|
|
49623
49985
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -49625,7 +49987,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
49625
49987
|
return _context12.abrupt("break", 27);
|
|
49626
49988
|
case 21:
|
|
49627
49989
|
_context12.next = 23;
|
|
49628
|
-
return Promise.resolve().then(function () { return require('./StandardWWSHandler-
|
|
49990
|
+
return Promise.resolve().then(function () { return require('./StandardWWSHandler-9fce580d.js'); });
|
|
49629
49991
|
case 23:
|
|
49630
49992
|
_yield$import4 = _context12.sent;
|
|
49631
49993
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -51012,7 +51374,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
51012
51374
|
//If we need real time rendering initialize the SignalR and 3D host connection Handler
|
|
51013
51375
|
bootMark('signalr: chunk import start');
|
|
51014
51376
|
_context3.next = 3;
|
|
51015
|
-
return Promise.resolve().then(function () { return require('./Host3DSignalR-
|
|
51377
|
+
return Promise.resolve().then(function () { return require('./Host3DSignalR-b8beb958.js'); });
|
|
51016
51378
|
case 3:
|
|
51017
51379
|
_yield$import = _context3.sent;
|
|
51018
51380
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -52757,7 +53119,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
52757
53119
|
break;
|
|
52758
53120
|
case 8:
|
|
52759
53121
|
_context5.next = 10;
|
|
52760
|
-
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-
|
|
53122
|
+
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-f5ba6ead.js'); });
|
|
52761
53123
|
case 10:
|
|
52762
53124
|
_yield$import = _context5.sent;
|
|
52763
53125
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -52768,7 +53130,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
52768
53130
|
return _context5.abrupt("break", 21);
|
|
52769
53131
|
case 15:
|
|
52770
53132
|
_context5.next = 17;
|
|
52771
|
-
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-
|
|
53133
|
+
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-593d689c.js'); });
|
|
52772
53134
|
case 17:
|
|
52773
53135
|
_yield$import2 = _context5.sent;
|
|
52774
53136
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -59526,265 +59888,6 @@ var PlannerElementData = /*#__PURE__*/function () {
|
|
|
59526
59888
|
}]);
|
|
59527
59889
|
}();
|
|
59528
59890
|
|
|
59529
|
-
/**
|
|
59530
|
-
* The VALUE ENCODING of every catalog/article/option/option-value property, keyed by codex.
|
|
59531
|
-
*
|
|
59532
|
-
* A property's `Value` travels as a STRING and each property decides how that string is read - '1' for one flag,
|
|
59533
|
-
* 'true' for the next, a ';' list for a third. This table records which, so an editor can offer the right control
|
|
59534
|
-
* and write back exactly what the parser reads, and so a caller can validate a value before storing it.
|
|
59535
|
-
*
|
|
59536
|
-
* GENERATED from the four parsers - do not hand-edit; regenerate when a `case` is added there:
|
|
59537
|
-
* CatalogData.ts | CatalogArticleData.ts | CatalogOptionData.ts | CatalogOptionValueData.ts
|
|
59538
|
-
* `propertyValueCodec.test.ts` fails when a parser case has no entry here.
|
|
59539
|
-
*/
|
|
59540
|
-
|
|
59541
|
-
/** The entity a property hangs on; the same codex can mean different things on different entities. */
|
|
59542
|
-
|
|
59543
|
-
/**
|
|
59544
|
-
* How the raw string is turned into a value. The boolean variants are NOT interchangeable: writing 'true' where
|
|
59545
|
-
* the parser tests `== '1'` silently yields false. `boolean:on` is read by isPropertyOn: empty, '0' and 'false'
|
|
59546
|
-
* are off, any other value is on.
|
|
59547
|
-
*/
|
|
59548
|
-
|
|
59549
|
-
/** The encoding per property codex, for one entity. */
|
|
59550
|
-
|
|
59551
|
-
/** 96 properties parsed on the catalog entity. */
|
|
59552
|
-
var CATALOG_PROPERTIES = {
|
|
59553
|
-
'3D_COMPATIBLE_WITH_IMAGE_CACHE': 'boolean:1',
|
|
59554
|
-
ACCESSOIRE_STEP_AS_PLANNER: 'boolean:1',
|
|
59555
|
-
ADD_NEW_LINE_BEFOR_RULEDESC: 'boolean:1',
|
|
59556
|
-
ADD_PA_ON_EDO: 'opaque',
|
|
59557
|
-
ADD_POS_INVISIBILITY_TO_OL: 'boolean:1',
|
|
59558
|
-
ARTICLECONFIGALL: 'boolean:1',
|
|
59559
|
-
ARTICLECONFIGSINGLE: 'boolean:1',
|
|
59560
|
-
ARTICLE_NR: 'string',
|
|
59561
|
-
AUTO_OPEN_CONTENTITEM: 'all-or-list:;',
|
|
59562
|
-
BANNER: 'json',
|
|
59563
|
-
BUNDLE_RULES: 'json',
|
|
59564
|
-
CHECK_COLLISION_DIFFERENT_LAYERS: 'list:;',
|
|
59565
|
-
CONFIG_ACCESSOIRES: 'boolean:1',
|
|
59566
|
-
CONFIG_ONLY_ACCESSOIRES: 'boolean:1',
|
|
59567
|
-
DEFAULT_DO_SHOW_3DDIMENSIONS: 'boolean:1|true',
|
|
59568
|
-
DEFAULT_GROUPS_CLOSED: 'boolean-or-list:;',
|
|
59569
|
-
DIMENSION_CONFIG: 'json',
|
|
59570
|
-
DIVA3D_AR_FORCERTV: 'boolean:1',
|
|
59571
|
-
DIVA3D_AR_READY: 'boolean:1',
|
|
59572
|
-
DIVA3D_DISABLE_3DEXPORT: 'boolean:1',
|
|
59573
|
-
DIVA3D_PLANER_DIGITS: 'number',
|
|
59574
|
-
DIVA3D_PLANER_SHOW_ARTICLE_SVG: 'boolean:1',
|
|
59575
|
-
DIVA3D_RENDERING: 'boolean:1|true',
|
|
59576
|
-
DIVA3D_ROOM: 'string',
|
|
59577
|
-
DIVA3D_STATIC_BG_IMAGE_ROOMLIST: 'list:;',
|
|
59578
|
-
DIVA3D_USE_RTV_NEXT: 'boolean:1',
|
|
59579
|
-
DIVA_KI_READY: 'boolean:1|true',
|
|
59580
|
-
DOCKACCONAVOONLY: 'boolean:1',
|
|
59581
|
-
DONTCALCBASEPRICE: 'boolean:1',
|
|
59582
|
-
DONTHIDEOPTION: 'list:,',
|
|
59583
|
-
DONT_SAVE_ALTERNATIVERENDERINGS: 'boolean:1',
|
|
59584
|
-
DONT_SET_POSNR_FROM_PLANNER: 'boolean:1',
|
|
59585
|
-
DONT_SHOW_ACC_STEP: 'boolean:1',
|
|
59586
|
-
DONT_USE_VCODEX_FOR_BASKET: 'boolean:1',
|
|
59587
|
-
DO_SHOW_MAIN_DIMENSIONS: 'boolean:1|true',
|
|
59588
|
-
DO_USE_RULEDESC_FOR_PARTLIST: 'boolean:1',
|
|
59589
|
-
ELEMENT_COPY_AVLR: 'all-or-list:;',
|
|
59590
|
-
ENABLE_DO_SHOW_3DDIMENSIONS: 'boolean:1|true',
|
|
59591
|
-
FILTER_FOR_CHECKOUT_BUTTONS: 'list:;',
|
|
59592
|
-
FORCECONSTRUCTIONWARNINGARTICLES: 'list:;',
|
|
59593
|
-
FORCE_CONFIG_ALL_ACCESSOIRES: 'boolean:1',
|
|
59594
|
-
FORCE_CONFIG_SINGLE: 'boolean:1',
|
|
59595
|
-
HEADER_DIMENSION_IDS: 'list:;',
|
|
59596
|
-
HIDECOMPLETENESSWARNING: 'boolean:1',
|
|
59597
|
-
HIDECONSTRUCTIONWARNING: 'opaque',
|
|
59598
|
-
HIDE_2D_PLANNER: 'boolean:1',
|
|
59599
|
-
HIDE_AV_BUTTONS: 'string',
|
|
59600
|
-
HIDE_PLANNER_UI_ICONS: 'boolean:1',
|
|
59601
|
-
HIDE_PRICEPREVIEW_ON_OPTIONS: 'list:;',
|
|
59602
|
-
HIDE_PRICE_GROUPS_OF_OPGS: 'boolean:1',
|
|
59603
|
-
HIDE_SUBPOS_ARTICLECODEX_EKTEXT: 'boolean:1',
|
|
59604
|
-
IDM3D_CAT_CODEX: 'string',
|
|
59605
|
-
IDM3D_ENVIRONMENT: 'string',
|
|
59606
|
-
IDM3D_TRANSLATION: 'json',
|
|
59607
|
-
IGNOREDOCKINGNUMBER: 'boolean:1',
|
|
59608
|
-
IGNORELAYERAVC: 'boolean:1',
|
|
59609
|
-
IGNORELAYERAVNAVS: 'boolean:1',
|
|
59610
|
-
IGNORELAYERAVOAVU: 'boolean:1',
|
|
59611
|
-
IGNORE_ARTICLERELATIONS: 'boolean:1',
|
|
59612
|
-
IGNORE_ISDEFINED_CHECK: 'boolean:1',
|
|
59613
|
-
IGNORE_MAX_PRICE_AS_BASEPRICE: 'boolean:1',
|
|
59614
|
-
INIT_OPTIONTREE_TWICE: 'boolean:1',
|
|
59615
|
-
IS_IDM3D_CAT: 'boolean:1|true',
|
|
59616
|
-
MERGE_OPTIONS_TO_SAME_OPTION: 'list:;',
|
|
59617
|
-
NOTIFICATIONS: 'json',
|
|
59618
|
-
ONCONFIG_SINGLE_DONT_GENERALIZE: 'boolean:1',
|
|
59619
|
-
PARTLIST_POSTFIX: 'list:;',
|
|
59620
|
-
PLANNERTYPE: 'string',
|
|
59621
|
-
PLANNER_2DOT0: 'boolean:1',
|
|
59622
|
-
PLANNER_REPLACE_MODE: 'boolean:1',
|
|
59623
|
-
PLAN_2D_FONT_URL: 'string',
|
|
59624
|
-
PROGRAM_NR: 'string',
|
|
59625
|
-
RECONFIG_AFTER_ARTICLE_DOCKED: 'boolean:1',
|
|
59626
|
-
REPAIR_VARIANT_VALUES: 'opaque',
|
|
59627
|
-
RTV_PRESET: 'json',
|
|
59628
|
-
SHOWACCESSOIREONLASTTAB: 'boolean:1',
|
|
59629
|
-
SHOWACCONDPONLY: 'boolean:1',
|
|
59630
|
-
SHOWTYPENRINPLANNER: 'boolean:1',
|
|
59631
|
-
SHOW_AI_ROOM_RENDERING_IN_SUMMARY: 'boolean:1',
|
|
59632
|
-
SHOW_AI_ROOM_RENDERING_SUMMARY: 'boolean:1',
|
|
59633
|
-
SHOW_ALL_ITEMS_IN_PLANNER: 'boolean:1',
|
|
59634
|
-
SHOW_PRICEPREVIEW_ON_OPTIONS: 'list:;',
|
|
59635
|
-
STARTFILTERPARAMS: 'string',
|
|
59636
|
-
STARTHIDEARTICLES: 'list:;',
|
|
59637
|
-
START_PLANNER_ARTICLE: 'string',
|
|
59638
|
-
SUMMARY_TABGROUP_POSITION: 'list:;',
|
|
59639
|
-
USEBOXPLANNER: 'all-or-list:;',
|
|
59640
|
-
USEGLOBALSVGSCALE: 'boolean:1',
|
|
59641
|
-
USEPOSCOUNTVALUE: 'boolean:1',
|
|
59642
|
-
USEPRGASOPVARTICLENR: 'boolean:1',
|
|
59643
|
-
USE_DECISION_POS_COUNT_VALUE: 'boolean:1',
|
|
59644
|
-
USE_DIOMEX_CONFIG_LOGIC: 'boolean:1',
|
|
59645
|
-
USE_SHELFPLANNER_RTV: 'boolean:1',
|
|
59646
|
-
USE_SHORT_NAME_AS_NAME: 'boolean:1',
|
|
59647
|
-
USE_TYPENR_AS_ARTICLENR_EKTEXT: 'boolean:1',
|
|
59648
|
-
WARNINGS: 'json'
|
|
59649
|
-
};
|
|
59650
|
-
|
|
59651
|
-
/** 31 properties parsed on the article entity. */
|
|
59652
|
-
var ARTICLE_PROPERTIES = {
|
|
59653
|
-
'3DMODELNAME': 'string',
|
|
59654
|
-
ACCESSOIRE_POS_PRIO: 'number',
|
|
59655
|
-
ADD_AS_ZKAT: 'boolean:1|true',
|
|
59656
|
-
BASIC_UNIT_PRICE: 'number',
|
|
59657
|
-
BUNDLE_RULES: 'json',
|
|
59658
|
-
CONTENT_ITEM: 'string',
|
|
59659
|
-
DEPTH_HAS_PRICE: 'boolean:on',
|
|
59660
|
-
DO_NOT_DEL_ACC_IF_NOT_DOCKED: 'boolean:on',
|
|
59661
|
-
GROUP_CONTENT_ITEM: 'string',
|
|
59662
|
-
HAS3D: 'boolean:on',
|
|
59663
|
-
HEIGHTGRIDABOVE: 'number',
|
|
59664
|
-
HEIGHTGRIDBELOW: 'number',
|
|
59665
|
-
HEIGHTGRIDUSED: 'number',
|
|
59666
|
-
HEIGHT_HAS_PRICE: 'boolean:on',
|
|
59667
|
-
HIDE_IN_PLANNERSTEP: 'boolean:on',
|
|
59668
|
-
IDM3D_SKIP: 'boolean:1|true',
|
|
59669
|
-
INVALID_ACCESSORIES: 'list:,',
|
|
59670
|
-
MAX_PLANNING_COUNT: 'number',
|
|
59671
|
-
ON_CONFIG_OPTION: 'string',
|
|
59672
|
-
ON_SET_CONFIG_OPTION: 'string',
|
|
59673
|
-
OPTIONS_FOR_PRINT: 'list:;',
|
|
59674
|
-
ORDER_POSNR: 'string',
|
|
59675
|
-
OVERWRITE_PARENT_DEPTH: 'boolean:on',
|
|
59676
|
-
OVERWRITE_PARENT_HEIGHT: 'boolean:on',
|
|
59677
|
-
OVERWRITE_PARENT_WIDTH: 'boolean:on',
|
|
59678
|
-
RETAIL_PREFIX: 'string',
|
|
59679
|
-
TABGROUP: 'string',
|
|
59680
|
-
TABGROUP_OPTIONS: 'string',
|
|
59681
|
-
TYPE_NO: 'string',
|
|
59682
|
-
WIDTH_HAS_PRICE: 'boolean:on',
|
|
59683
|
-
ZUBEHOER_FAMILIE: 'string'
|
|
59684
|
-
};
|
|
59685
|
-
|
|
59686
|
-
/** 41 properties parsed on the option entity. */
|
|
59687
|
-
var OPTION_PROPERTIES = {
|
|
59688
|
-
ADDITIONAL_GROUP_FILTER: 'json',
|
|
59689
|
-
ADD_OPT_TO_TABGROUP_IN_PL_SUM: 'string',
|
|
59690
|
-
ADD_TO_WWS: 'boolean:on',
|
|
59691
|
-
CHECK_FOR_REVERSE_CHANGES: 'list:;',
|
|
59692
|
-
CONTENT_ITEM: 'string',
|
|
59693
|
-
CONTENT_ITEM_TEASER: 'json',
|
|
59694
|
-
CUSTOM_DIMENSION: 'boolean:on',
|
|
59695
|
-
CUSTOM_DIMENSION_TEXT: 'string',
|
|
59696
|
-
DEFAULT_SIBLING_OPTION: 'string',
|
|
59697
|
-
DESCRIPTION: 'string',
|
|
59698
|
-
DIAMETER: 'boolean:on',
|
|
59699
|
-
EshopCategoryMapping: 'ignored',
|
|
59700
|
-
EshopSearchRelevant: 'ignored',
|
|
59701
|
-
FEATURE_TYPE: 'ignored',
|
|
59702
|
-
FREETEXT_DEFAULT_VALUE: 'string',
|
|
59703
|
-
GROUP_OPTIONS_LEFT_AND_RIGHT: 'list:;',
|
|
59704
|
-
HIDE_OPTION_IN_CONFIGURATOR: 'boolean:on',
|
|
59705
|
-
IDM3D_TARGET: 'list:,',
|
|
59706
|
-
IGNORE_GROUPS: 'boolean:1',
|
|
59707
|
-
IGNORE_PGR_GROUP_POSITION: 'boolean:1',
|
|
59708
|
-
INFO_PDF: 'string',
|
|
59709
|
-
INFO_URL: 'string',
|
|
59710
|
-
ION_COMMENT_TEXT: 'ignored',
|
|
59711
|
-
ISDEFAULTVALUEFOROPTIONS: 'string',
|
|
59712
|
-
IS_MAIN_COLOR: 'boolean:on',
|
|
59713
|
-
IS_STATE: 'boolean:on',
|
|
59714
|
-
IsArtName: 'ignored',
|
|
59715
|
-
IsSalesText: 'ignored',
|
|
59716
|
-
MERGE_IDM_TO_OPG: 'string',
|
|
59717
|
-
ONLY_VISIBLE_IF_CONFIG_ALL: 'boolean:on',
|
|
59718
|
-
ONLY_VISIBLE_IF_CONFIG_SINGLE: 'boolean:on',
|
|
59719
|
-
ONLY_VISIBLE_IF_NOT_UNDOCK: 'boolean:on',
|
|
59720
|
-
REQUIRED_OPTION: 'boolean:on',
|
|
59721
|
-
REQUIRES_USER_INPUT: 'boolean:on',
|
|
59722
|
-
SETNAME: 'boolean:on',
|
|
59723
|
-
SHOW_FILTER: 'boolean:1',
|
|
59724
|
-
SHOW_IN_BASKET_WHEN_HAS_PRICE: 'ignored',
|
|
59725
|
-
SHOW_IN_VARIANTDESC: 'boolean:on',
|
|
59726
|
-
SHOW_SEARCHBAR: 'boolean:1',
|
|
59727
|
-
SHOW_SEPARAT_ON_TABGROUP: 'string',
|
|
59728
|
-
SUGGESTED_OPTION: 'boolean:on'
|
|
59729
|
-
};
|
|
59730
|
-
|
|
59731
|
-
/** 31 properties parsed on the optionValue entity. */
|
|
59732
|
-
var OPTIONVALUE_PROPERTIES = {
|
|
59733
|
-
ADD_TO_MEASURE: 'list:;',
|
|
59734
|
-
CONTENT_ITEM: 'string',
|
|
59735
|
-
CUSTOM_DIMENSION: 'opaque',
|
|
59736
|
-
DEFAULT_VALUE: 'boolean:on',
|
|
59737
|
-
EshopCategoryMapping: 'ignored',
|
|
59738
|
-
GROUP_CONTENT_ITEM: 'string',
|
|
59739
|
-
HIDE_IN_SUMMARY: 'boolean:on',
|
|
59740
|
-
IDM3D_VALUE: 'string',
|
|
59741
|
-
INFO_PDF: 'string',
|
|
59742
|
-
INFO_URL: 'string',
|
|
59743
|
-
ION_COMMENT_TEXT: 'ignored',
|
|
59744
|
-
IS_NOT_RELEVANT: 'boolean:on',
|
|
59745
|
-
IsArtName: 'ignored',
|
|
59746
|
-
IsVariantAttribute: 'boolean:1',
|
|
59747
|
-
MEASURE_MAXIMUM: 'string',
|
|
59748
|
-
MEASURE_MINIMUM: 'string',
|
|
59749
|
-
MEASURE_STEP: 'string',
|
|
59750
|
-
MEASURE_UNIT: 'string',
|
|
59751
|
-
ONLY_VISIBLE_IF_NOT_UNDOCK: 'string',
|
|
59752
|
-
ON_RULE: 'string',
|
|
59753
|
-
OPTION_FREE_TEXT: 'boolean:on',
|
|
59754
|
-
PIMFlatValues: 'boolean:1',
|
|
59755
|
-
PRICE_UNIT: 'string',
|
|
59756
|
-
PriceTageRelevant: 'ignored',
|
|
59757
|
-
SAME_OPV: 'string',
|
|
59758
|
-
SETNAME: 'string',
|
|
59759
|
-
SET_BY_RULE: 'string',
|
|
59760
|
-
SET_CONFIG: 'string',
|
|
59761
|
-
SUMMARY_CODEX: 'string',
|
|
59762
|
-
TopFilterAttribute: 'ignored',
|
|
59763
|
-
VIEWPOINTNAME: 'string'
|
|
59764
|
-
};
|
|
59765
|
-
var PROPERTY_SCHEMAS = {
|
|
59766
|
-
catalog: CATALOG_PROPERTIES,
|
|
59767
|
-
article: ARTICLE_PROPERTIES,
|
|
59768
|
-
option: OPTION_PROPERTIES,
|
|
59769
|
-
optionValue: OPTIONVALUE_PROPERTIES
|
|
59770
|
-
};
|
|
59771
|
-
|
|
59772
|
-
/**
|
|
59773
|
-
* The encoding of one property, or undefined when the codex is not one the engine parses - an organization's own
|
|
59774
|
-
* key, which stays free text. A catalog-prefixed codex ('MYCAT__USEBOXPLANNER') resolves to its bare form, the
|
|
59775
|
-
* same way the parsers strip it.
|
|
59776
|
-
*/
|
|
59777
|
-
function propertyEncodingOf(codex, entity) {
|
|
59778
|
-
var bare = codex.includes('__') ? codex.slice(codex.indexOf('__') + 2) : codex;
|
|
59779
|
-
var entities = entity ? [entity] : ['catalog', 'article', 'option', 'optionValue'];
|
|
59780
|
-
for (var _i = 0, _entities = entities; _i < _entities.length; _i++) {
|
|
59781
|
-
var candidate = _entities[_i];
|
|
59782
|
-
// Own keys only: a codex like 'constructor' or 'toString' would otherwise resolve to an inherited function.
|
|
59783
|
-
if (Object.prototype.hasOwnProperty.call(PROPERTY_SCHEMAS[candidate], bare)) return PROPERTY_SCHEMAS[candidate][bare];
|
|
59784
|
-
}
|
|
59785
|
-
return undefined;
|
|
59786
|
-
}
|
|
59787
|
-
|
|
59788
59891
|
/**
|
|
59789
59892
|
* Placeholder for the set name in the Serious checkout. API2 bed catalogs yield "<headboard> - <width> X <length>" from the
|
|
59790
59893
|
* OPTBR / OPTLAE options and the headboard partlist article. IDM catalogs have none of these, so the selected values of the
|
|
@@ -77048,16 +77151,11 @@ exports.bootNow = bootNow;
|
|
|
77048
77151
|
exports.bootRequestName = bootRequestName;
|
|
77049
77152
|
exports.collectStructureStepKeys = collectStructureStepKeys;
|
|
77050
77153
|
exports.creatRenderOrders = creatRenderOrders;
|
|
77051
|
-
exports.decodePropertyValue = decodePropertyValue;
|
|
77052
|
-
exports.editorKindOf = editorKindOf;
|
|
77053
|
-
exports.encodePropertyValue = encodePropertyValue;
|
|
77054
77154
|
exports.getOrigProductId = getOrigProductId;
|
|
77055
77155
|
exports.getSeriousSetNamePlaceholder = getSeriousSetNamePlaceholder;
|
|
77056
77156
|
exports.headlessSession = headlessSession;
|
|
77057
77157
|
exports.loadAndRepairBasket = loadAndRepairBasket;
|
|
77058
77158
|
exports.propertyEncodingOf = propertyEncodingOf;
|
|
77059
|
-
exports.propertyValueProblem = propertyValueProblem;
|
|
77060
|
-
exports.rawStringOf = rawStringOf;
|
|
77061
77159
|
exports.runHeadlessArtifactPass = runHeadlessArtifactPass;
|
|
77062
77160
|
exports.runHeadlessArtifactPassBatch = runHeadlessArtifactPassBatch;
|
|
77063
77161
|
exports.setHandlerInstance = setHandlerInstance;
|