kitchen-simulator 4.4.1 → 4.4.2-new-json
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/es/LiteRenderer.js +15 -53
- package/es/catalog/factories/area-factory-3d.js +0 -4
- package/es/catalog/holes/door-double/door_double.png +0 -0
- package/es/catalog/holes/door-panic/panicDoor.png +0 -0
- package/es/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
- package/es/catalog/holes/gate/gate.jpg +0 -0
- package/es/catalog/holes/window-clear/texture.png +0 -0
- package/es/catalog/holes/window-cross/texture.png +0 -0
- package/es/catalog/holes/window-double-hung/texture.png +0 -0
- package/es/catalog/holes/window-vertical/texture.png +0 -0
- package/es/catalog/utils/item-loader.js +3 -22
- package/es/class/item.js +1 -1
- package/es/constants/catalog/skinPanel.js +9 -0
- package/es/constants.js +11 -13
- package/es/devLiteRenderer.js +91 -109
- package/es/mappings/external-events/mapExternalEventPayload.js +21 -0
- package/es/mappings/external-events/mappers/addItemMapper.js +86 -0
- package/es/mappings/external-events/mappers/ccdfMapper.js +101 -0
- package/es/mappings/external-events/mappers/changeDoorStyleMapper.js +65 -0
- package/es/mappings/holesToCatalog.js +139 -0
- package/es/models.js +3 -1
- package/es/utils/helper.js +18 -9
- package/es/utils/isolate-event-handler.js +621 -173
- package/es/utils/molding.js +20 -236
- package/es/utils/skinPanelEngine.js +230 -26
- package/lib/LiteRenderer.js +17 -55
- package/lib/catalog/factories/area-factory-3d.js +0 -4
- package/lib/catalog/holes/door-double/door_double.png +0 -0
- package/lib/catalog/holes/door-panic/panicDoor.png +0 -0
- package/lib/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
- package/lib/catalog/holes/gate/gate.jpg +0 -0
- package/lib/catalog/holes/window-clear/texture.png +0 -0
- package/lib/catalog/holes/window-cross/texture.png +0 -0
- package/lib/catalog/holes/window-double-hung/texture.png +0 -0
- package/lib/catalog/holes/window-vertical/texture.png +0 -0
- package/lib/catalog/utils/item-loader.js +2 -21
- package/lib/class/item.js +1 -1
- package/lib/constants/catalog/skinPanel.js +15 -0
- package/lib/constants.js +16 -18
- package/lib/devLiteRenderer.js +93 -111
- package/lib/mappings/external-events/mapExternalEventPayload.js +26 -0
- package/lib/mappings/external-events/mappers/addItemMapper.js +92 -0
- package/lib/mappings/external-events/mappers/ccdfMapper.js +108 -0
- package/lib/mappings/external-events/mappers/changeDoorStyleMapper.js +72 -0
- package/lib/mappings/holesToCatalog.js +148 -0
- package/lib/models.js +3 -1
- package/lib/utils/helper.js +20 -9
- package/lib/utils/isolate-event-handler.js +620 -172
- package/lib/utils/molding.js +20 -237
- package/lib/utils/skinPanelEngine.js +232 -28
- package/package.json +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
function ownKeys(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; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
import { DEFAULT_INTERIOR_URL } from "../../../constants";
|
|
5
|
+
import { isEmpty } from "../../../utils/helper";
|
|
6
|
+
export function mapChangeDoorStyleEvent(evt, state) {
|
|
7
|
+
var _evt$payload, _layer$toJS, _targetDoorStyle$ccdf;
|
|
8
|
+
if (isEmpty(evt)) return null;
|
|
9
|
+
var targetDoorStyle = evt === null || evt === void 0 || (_evt$payload = evt.payload) === null || _evt$payload === void 0 ? void 0 : _evt$payload.doorStyle;
|
|
10
|
+
if (isEmpty(targetDoorStyle)) return evt;
|
|
11
|
+
var layerId = state.getIn(['scene', 'selectedLayer']);
|
|
12
|
+
var layer = state.getIn(['scene', 'layers', layerId]);
|
|
13
|
+
if (isEmpty(layer)) return evt;
|
|
14
|
+
var handleTexture = layer.get('doorHandle');
|
|
15
|
+
var counterToptexture = layer === null || layer === void 0 || (_layer$toJS = layer.toJS()) === null || _layer$toJS === void 0 || (_layer$toJS = _layer$toJS.counterTop) === null || _layer$toJS === void 0 ? void 0 : _layer$toJS.uri;
|
|
16
|
+
|
|
17
|
+
// make doorStyles and update the doorStyle payload
|
|
18
|
+
var Max_PH = 9;
|
|
19
|
+
var doorStyles = {
|
|
20
|
+
base: targetDoorStyle.texture,
|
|
21
|
+
counttop: counterToptexture,
|
|
22
|
+
interior: DEFAULT_INTERIOR_URL
|
|
23
|
+
};
|
|
24
|
+
for (var i = 1; i <= Max_PH; i++) {
|
|
25
|
+
doorStyles['base_door_' + i] = targetDoorStyle.texture;
|
|
26
|
+
doorStyles['base_fixed_drawer_door_' + i] = targetDoorStyle.texture;
|
|
27
|
+
doorStyles['base_drawer_' + i] = targetDoorStyle.texture;
|
|
28
|
+
doorStyles['base_drawer_door_' + i] = targetDoorStyle.texture;
|
|
29
|
+
doorStyles['door_handle_' + i] = handleTexture;
|
|
30
|
+
doorStyles['fixed_drawer_door_handle_' + i] = handleTexture;
|
|
31
|
+
doorStyles['drawer_door_handle_' + i] = handleTexture;
|
|
32
|
+
}
|
|
33
|
+
evt.payload.doorStyle = _objectSpread(_objectSpread({}, targetDoorStyle), {}, {
|
|
34
|
+
doorStyles: doorStyles
|
|
35
|
+
});
|
|
36
|
+
// make itemCDS using assets3d
|
|
37
|
+
var itemCDS = [];
|
|
38
|
+
var itemCDSData = {};
|
|
39
|
+
var cabitnetDoorStyleId;
|
|
40
|
+
targetDoorStyle === null || targetDoorStyle === void 0 || (_targetDoorStyle$ccdf = targetDoorStyle.ccdf_list) === null || _targetDoorStyle$ccdf === void 0 || _targetDoorStyle$ccdf.forEach(function (asItem) {
|
|
41
|
+
if (!isEmpty(asItem === null || asItem === void 0 ? void 0 : asItem.id)) {
|
|
42
|
+
cabitnetDoorStyleId = asItem.id;
|
|
43
|
+
}
|
|
44
|
+
asItem === null || asItem === void 0 || asItem.assets3d.forEach(function (as) {
|
|
45
|
+
if (!isEmpty(as === null || as === void 0 ? void 0 : as.placeholder_name) && !isEmpty(as === null || as === void 0 ? void 0 : as.gltf)) {
|
|
46
|
+
var updatedName = 'base_' + (as === null || as === void 0 ? void 0 : as.placeholder_name) + '_gltf';
|
|
47
|
+
itemCDSData[updatedName] = as === null || as === void 0 ? void 0 : as.gltf;
|
|
48
|
+
}
|
|
49
|
+
itemCDSData['is_euro_cds'] = !isEmpty(as === null || as === void 0 ? void 0 : as.is_euro_cds) ? as.is_euro_cds : 0;
|
|
50
|
+
itemCDSData['euro_shape_svg'] = !isEmpty(as === null || as === void 0 ? void 0 : as.euro_shape_svg) ? as.is_euro_cds : null;
|
|
51
|
+
itemCDSData['euro_width'] = !isEmpty(as === null || as === void 0 ? void 0 : as.euro_width) ? as.is_euro_cds : null;
|
|
52
|
+
itemCDSData['euro_height'] = !isEmpty(as === null || as === void 0 ? void 0 : as.euro_height) ? as.is_euro_cds : null;
|
|
53
|
+
itemCDSData['euro_length'] = !isEmpty(as === null || as === void 0 ? void 0 : as.euro_length) ? as.is_euro_cds : null;
|
|
54
|
+
});
|
|
55
|
+
var data = [];
|
|
56
|
+
data.push(itemCDSData);
|
|
57
|
+
itemCDS.push({
|
|
58
|
+
itemID: asItem.cabinet_id,
|
|
59
|
+
data: data,
|
|
60
|
+
cabinet_door_style_id: cabitnetDoorStyleId
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
evt.payload.itemCDS = itemCDS;
|
|
64
|
+
return evt;
|
|
65
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
function ownKeys(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; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
import * as Holes from "../catalog/holes/export";
|
|
6
|
+
var INCH_TO_CM = 2.54;
|
|
7
|
+
var normalizeKey = function normalizeKey(value) {
|
|
8
|
+
return (value !== null && value !== void 0 ? value : '').toString().toLowerCase().replace(/[^a-z0-9]+/g, '');
|
|
9
|
+
};
|
|
10
|
+
var safeParseJson = function safeParseJson(value) {
|
|
11
|
+
if (!value) return null;
|
|
12
|
+
try {
|
|
13
|
+
return JSON.parse(value);
|
|
14
|
+
} catch (_unused) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
var toCatalogLength = function toCatalogLength(value, prop) {
|
|
19
|
+
var _prop$defaultValue;
|
|
20
|
+
if (value == null) return null;
|
|
21
|
+
var unit = prop === null || prop === void 0 || (_prop$defaultValue = prop.defaultValue) === null || _prop$defaultValue === void 0 ? void 0 : _prop$defaultValue.unit;
|
|
22
|
+
if (unit && unit.toLowerCase() === 'in') return value;
|
|
23
|
+
return value * INCH_TO_CM;
|
|
24
|
+
};
|
|
25
|
+
var overrideLengthProperty = function overrideLengthProperty(prop, value) {
|
|
26
|
+
if (!prop || value == null) return prop;
|
|
27
|
+
var length = toCatalogLength(value, prop);
|
|
28
|
+
if (length == null) return prop;
|
|
29
|
+
return _objectSpread(_objectSpread({}, prop), {}, {
|
|
30
|
+
defaultValue: _objectSpread(_objectSpread({}, prop.defaultValue), {}, {
|
|
31
|
+
length: length
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
var findBaseHoleTemplate = function findBaseHoleTemplate(hole, templates) {
|
|
36
|
+
var target = normalizeKey(hole === null || hole === void 0 ? void 0 : hole.name);
|
|
37
|
+
if (!target) return null;
|
|
38
|
+
return templates.find(function (template) {
|
|
39
|
+
var _template$info, _template$info2;
|
|
40
|
+
var candidates = [template === null || template === void 0 ? void 0 : template.name, template === null || template === void 0 || (_template$info = template.info) === null || _template$info === void 0 ? void 0 : _template$info.title, template === null || template === void 0 || (_template$info2 = template.info) === null || _template$info2 === void 0 ? void 0 : _template$info2.description].map(normalizeKey);
|
|
41
|
+
return candidates.includes(target);
|
|
42
|
+
}) || null;
|
|
43
|
+
};
|
|
44
|
+
var buildHoleElementFromTemplate = function buildHoleElementFromTemplate(hole, base) {
|
|
45
|
+
var _base$info, _base$info2, _base$info3, _base$info4, _base$info5, _base$structure_json;
|
|
46
|
+
if (!hole || !base) return null;
|
|
47
|
+
var nextInfo = _objectSpread(_objectSpread({}, base.info), {}, {
|
|
48
|
+
title: hole.name || ((_base$info = base.info) === null || _base$info === void 0 ? void 0 : _base$info.title),
|
|
49
|
+
description: ((_base$info2 = base.info) === null || _base$info2 === void 0 ? void 0 : _base$info2.description) || hole.name || ((_base$info3 = base.info) === null || _base$info3 === void 0 ? void 0 : _base$info3.title),
|
|
50
|
+
image: hole.menu_thumbnail || ((_base$info4 = base.info) === null || _base$info4 === void 0 ? void 0 : _base$info4.image),
|
|
51
|
+
url: hole.gltf || ((_base$info5 = base.info) === null || _base$info5 === void 0 ? void 0 : _base$info5.url)
|
|
52
|
+
});
|
|
53
|
+
var nextProperties = _objectSpread({}, base.properties);
|
|
54
|
+
if (nextProperties.width) {
|
|
55
|
+
nextProperties.width = overrideLengthProperty(nextProperties.width, hole.width);
|
|
56
|
+
}
|
|
57
|
+
if (nextProperties.height) {
|
|
58
|
+
nextProperties.height = overrideLengthProperty(nextProperties.height, hole.height);
|
|
59
|
+
}
|
|
60
|
+
if (nextProperties.length) {
|
|
61
|
+
nextProperties.length = overrideLengthProperty(nextProperties.length, hole.length);
|
|
62
|
+
}
|
|
63
|
+
var customConfig = safeParseJson(hole.custom_config);
|
|
64
|
+
var customProps = (customConfig === null || customConfig === void 0 ? void 0 : customConfig.properties) || {};
|
|
65
|
+
Object.keys(customProps).forEach(function (key) {
|
|
66
|
+
if (!nextProperties[key]) return;
|
|
67
|
+
nextProperties[key] = overrideLengthProperty(nextProperties[key], customProps[key]);
|
|
68
|
+
});
|
|
69
|
+
return _objectSpread(_objectSpread({}, base), {}, {
|
|
70
|
+
name: hole.name || base.name,
|
|
71
|
+
info: nextInfo,
|
|
72
|
+
properties: nextProperties,
|
|
73
|
+
structure_json: _objectSpread(_objectSpread({}, base.structure_json || {}), {}, {
|
|
74
|
+
hole_id: hole.id || ((_base$structure_json = base.structure_json) === null || _base$structure_json === void 0 ? void 0 : _base$structure_json.hole_id)
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
export var buildHoleElements = function buildHoleElements(holes) {
|
|
79
|
+
var categories = {
|
|
80
|
+
Doors: [],
|
|
81
|
+
Windows: []
|
|
82
|
+
};
|
|
83
|
+
var elements = [];
|
|
84
|
+
if (!Array.isArray(holes)) return {
|
|
85
|
+
elements: elements,
|
|
86
|
+
categories: categories
|
|
87
|
+
};
|
|
88
|
+
var templates = Object.values(Holes);
|
|
89
|
+
var usedNames = new Set();
|
|
90
|
+
holes.forEach(function (hole) {
|
|
91
|
+
var _base$info6;
|
|
92
|
+
if (!hole || hole.is_deleted) return;
|
|
93
|
+
var base = findBaseHoleTemplate(hole, templates);
|
|
94
|
+
if (!base) return;
|
|
95
|
+
var element = buildHoleElementFromTemplate(hole, base);
|
|
96
|
+
if (!element || !element.name || usedNames.has(element.name)) return;
|
|
97
|
+
usedNames.add(element.name);
|
|
98
|
+
elements.push(element);
|
|
99
|
+
var typeKey = normalizeKey(hole.type);
|
|
100
|
+
if (typeKey === 'window') {
|
|
101
|
+
categories.Windows.push(element);
|
|
102
|
+
} else if (typeKey === 'door') {
|
|
103
|
+
categories.Doors.push(element);
|
|
104
|
+
} else if ((_base$info6 = base.info) !== null && _base$info6 !== void 0 && (_base$info6 = _base$info6.tag) !== null && _base$info6 !== void 0 && _base$info6.includes('window')) {
|
|
105
|
+
categories.Windows.push(element);
|
|
106
|
+
} else {
|
|
107
|
+
categories.Doors.push(element);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
return {
|
|
111
|
+
elements: elements,
|
|
112
|
+
categories: categories
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
export var registerDynamicHoles = function registerDynamicHoles(catalog, holePayload) {
|
|
116
|
+
if (!catalog) return;
|
|
117
|
+
var holeElements = (holePayload === null || holePayload === void 0 ? void 0 : holePayload.elements) || [];
|
|
118
|
+
holeElements.forEach(function (element) {
|
|
119
|
+
if (!catalog.hasElement(element.name)) {
|
|
120
|
+
catalog.registerElement(element);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
var categories = (holePayload === null || holePayload === void 0 ? void 0 : holePayload.categories) || {};
|
|
124
|
+
Object.entries(categories).forEach(function (_ref) {
|
|
125
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
126
|
+
name = _ref2[0],
|
|
127
|
+
elements = _ref2[1];
|
|
128
|
+
if (!elements.length) return;
|
|
129
|
+
if (!catalog.hasCategory(name)) {
|
|
130
|
+
catalog.registerCategory(name, name, elements);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
elements.forEach(function (element) {
|
|
134
|
+
if (!catalog.categoryHasElement(name, element.name)) {
|
|
135
|
+
catalog.addToCategory(name, element);
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
};
|
package/es/models.js
CHANGED
|
@@ -336,13 +336,15 @@ export var CatalogElement = /*#__PURE__*/function (_Record1) {
|
|
|
336
336
|
}(Record({
|
|
337
337
|
itemID: -1,
|
|
338
338
|
name: '',
|
|
339
|
+
long_name: '',
|
|
339
340
|
prototype: '',
|
|
340
341
|
info: new Map(),
|
|
341
342
|
properties: new Map(),
|
|
342
343
|
obj: new Map(),
|
|
343
344
|
type: '',
|
|
344
345
|
cds: new Map(),
|
|
345
|
-
structure_json: {}
|
|
346
|
+
structure_json: {},
|
|
347
|
+
gltf: ''
|
|
346
348
|
}, 'CatalogElement'));
|
|
347
349
|
export var Catalog = /*#__PURE__*/function (_Record10) {
|
|
348
350
|
function Catalog() {
|
package/es/utils/helper.js
CHANGED
|
@@ -413,7 +413,6 @@ export function updatePayloadOfInternalEvent(currentObject, layer, catalog) {
|
|
|
413
413
|
updatedPayload.length = _length;
|
|
414
414
|
//////////////////////////////////////
|
|
415
415
|
} else if ((currentObject === null || currentObject === void 0 ? void 0 : currentObject.prototype) === 'items') {
|
|
416
|
-
var _catalog$elements$cur;
|
|
417
416
|
// check this cabinet has warning box
|
|
418
417
|
updatedPayload.isWarning = isWarningItem(currentObject);
|
|
419
418
|
// check this item is available molding
|
|
@@ -424,14 +423,7 @@ export function updatePayloadOfInternalEvent(currentObject, layer, catalog) {
|
|
|
424
423
|
if (pointArray) updatedPayload.distArray = pointArray;
|
|
425
424
|
|
|
426
425
|
// update sku_number using sku_array
|
|
427
|
-
|
|
428
|
-
var skuArray = catalog === null || catalog === void 0 || (_catalog$elements$cur = catalog.elements[currentObject.get('name')]) === null || _catalog$elements$cur === void 0 || (_catalog$elements$cur = _catalog$elements$cur.obj) === null || _catalog$elements$cur === void 0 ? void 0 : _catalog$elements$cur.skuArray;
|
|
429
|
-
var correctSKU = skuArray === null || skuArray === void 0 ? void 0 : skuArray.find(function (sku) {
|
|
430
|
-
return sku.door_color_id === currentDoorColorId;
|
|
431
|
-
});
|
|
432
|
-
if (correctSKU) {
|
|
433
|
-
updatedPayload.sku_number = correctSKU.sku;
|
|
434
|
-
}
|
|
426
|
+
updatedPayload.sku_number = getSkuAliasFromCatalog(catalog, currentObject);
|
|
435
427
|
} else if ((currentObject === null || currentObject === void 0 ? void 0 : currentObject.prototype) === 'holes') {
|
|
436
428
|
var _calcDistancesFromHol = calcDistancesFromHoleToNearestOneOrWall(currentObject, layer),
|
|
437
429
|
distLeft = _calcDistancesFromHol.distLeft,
|
|
@@ -448,4 +440,21 @@ export function updatePayloadOfInternalEvent(currentObject, layer, catalog) {
|
|
|
448
440
|
};
|
|
449
441
|
}
|
|
450
442
|
return updatedPayload;
|
|
443
|
+
}
|
|
444
|
+
export function getSkuAliasFromCatalog(catalog, sceneObject) {
|
|
445
|
+
var _catalog$elements;
|
|
446
|
+
var sceneObjectJS = typeof (sceneObject === null || sceneObject === void 0 ? void 0 : sceneObject.toJS) === 'function' ? sceneObject.toJS() : sceneObject;
|
|
447
|
+
var elementName = sceneObjectJS === null || sceneObjectJS === void 0 ? void 0 : sceneObjectJS.name;
|
|
448
|
+
var catalogElement = catalog === null || catalog === void 0 || (_catalog$elements = catalog.elements) === null || _catalog$elements === void 0 ? void 0 : _catalog$elements[elementName];
|
|
449
|
+
return getSkuAliasFromCatalogElement(catalogElement, sceneObjectJS);
|
|
450
|
+
}
|
|
451
|
+
export function getSkuAliasFromCatalogElement(catalogElement, sceneObject) {
|
|
452
|
+
var _sceneObjectJS$doorSt, _catalogElement$obj, _skuAlias$sku;
|
|
453
|
+
var sceneObjectJS = typeof (sceneObject === null || sceneObject === void 0 ? void 0 : sceneObject.toJS) === 'function' ? sceneObject.toJS() : sceneObject;
|
|
454
|
+
var doorColorId = sceneObjectJS === null || sceneObjectJS === void 0 || (_sceneObjectJS$doorSt = sceneObjectJS.doorStyle) === null || _sceneObjectJS$doorSt === void 0 ? void 0 : _sceneObjectJS$doorSt.id;
|
|
455
|
+
var skuArray = catalogElement === null || catalogElement === void 0 || (_catalogElement$obj = catalogElement.obj) === null || _catalogElement$obj === void 0 ? void 0 : _catalogElement$obj.skuArray;
|
|
456
|
+
var skuAlias = skuArray === null || skuArray === void 0 ? void 0 : skuArray.find(function (sku) {
|
|
457
|
+
return sku.door_color_id === doorColorId;
|
|
458
|
+
});
|
|
459
|
+
return (_skuAlias$sku = skuAlias === null || skuAlias === void 0 ? void 0 : skuAlias.sku) !== null && _skuAlias$sku !== void 0 ? _skuAlias$sku : sceneObjectJS === null || sceneObjectJS === void 0 ? void 0 : sceneObjectJS.sku_number;
|
|
451
460
|
}
|