kitchen-simulator 11.30.1 → 11.30.3

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.
Files changed (63) hide show
  1. package/es/assets/img/svg/accessories.svg +4 -4
  2. package/es/assets/img/svg/bottombar/elevation-back.svg +6 -6
  3. package/es/assets/img/svg/bottombar/elevation-front.svg +6 -6
  4. package/es/assets/img/svg/bottombar/elevation-left.svg +6 -6
  5. package/es/assets/img/svg/bottombar/elevation-right.svg +7 -7
  6. package/es/assets/img/svg/bottombar/elevation.svg +13 -13
  7. package/es/assets/img/svg/detail.svg +77 -77
  8. package/es/assets/img/svg/filtersActive.svg +19 -19
  9. package/es/assets/img/svg/invert.svg +12 -12
  10. package/es/assets/img/svg/menubar/login.svg +84 -84
  11. package/es/assets/img/svg/menubar/my_projects.svg +85 -85
  12. package/es/assets/img/svg/menubar/new_project.svg +110 -110
  13. package/es/assets/img/svg/menubar/save_project.svg +84 -84
  14. package/es/assets/img/svg/options.svg +3 -3
  15. package/es/assets/img/svg/positioning.svg +3 -3
  16. package/es/assets/img/svg/toggleFilters.svg +19 -19
  17. package/es/assets/img/svg/toolbar/shopping-cart.svg +13 -13
  18. package/es/assets/img/svg/wizardstep/detail_view.svg +87 -87
  19. package/es/assets/img/svg/wizardstep/tile_view.svg +95 -95
  20. package/es/class/vertex.js +7 -1
  21. package/es/components/viewer2d/viewer2d.js +7 -22
  22. package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +556 -556
  23. package/es/components/viewer3d/scene-creator.js +6 -5
  24. package/es/constants/applianceCategories.js +19 -0
  25. package/es/engine/2d/viewer-utils.js +20 -0
  26. package/es/mappings/external-events/mapExternalEventPayload.js +4 -4
  27. package/es/mappings/external-events/mappers/addItemMapper.js +9 -9
  28. package/es/shared/domain/asset/sanitize-asset-url.js +5 -5
  29. package/es/shared/math/line-metrics.js +11 -11
  30. package/es/utils/geometry.js +13 -12
  31. package/es/utils/skinPanelEngine.js +14 -14
  32. package/lib/assets/img/svg/accessories.svg +4 -4
  33. package/lib/assets/img/svg/bottombar/elevation-back.svg +6 -6
  34. package/lib/assets/img/svg/bottombar/elevation-front.svg +6 -6
  35. package/lib/assets/img/svg/bottombar/elevation-left.svg +6 -6
  36. package/lib/assets/img/svg/bottombar/elevation-right.svg +7 -7
  37. package/lib/assets/img/svg/bottombar/elevation.svg +13 -13
  38. package/lib/assets/img/svg/detail.svg +77 -77
  39. package/lib/assets/img/svg/filtersActive.svg +19 -19
  40. package/lib/assets/img/svg/invert.svg +12 -12
  41. package/lib/assets/img/svg/menubar/login.svg +84 -84
  42. package/lib/assets/img/svg/menubar/my_projects.svg +85 -85
  43. package/lib/assets/img/svg/menubar/new_project.svg +110 -110
  44. package/lib/assets/img/svg/menubar/save_project.svg +84 -84
  45. package/lib/assets/img/svg/options.svg +3 -3
  46. package/lib/assets/img/svg/positioning.svg +3 -3
  47. package/lib/assets/img/svg/toggleFilters.svg +19 -19
  48. package/lib/assets/img/svg/toolbar/shopping-cart.svg +13 -13
  49. package/lib/assets/img/svg/wizardstep/detail_view.svg +87 -87
  50. package/lib/assets/img/svg/wizardstep/tile_view.svg +95 -95
  51. package/lib/class/vertex.js +7 -1
  52. package/lib/components/viewer2d/viewer2d.js +7 -22
  53. package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +556 -556
  54. package/lib/components/viewer3d/scene-creator.js +6 -5
  55. package/lib/constants/applianceCategories.js +25 -0
  56. package/lib/engine/2d/viewer-utils.js +25 -0
  57. package/lib/mappings/external-events/mapExternalEventPayload.js +4 -4
  58. package/lib/mappings/external-events/mappers/addItemMapper.js +9 -9
  59. package/lib/shared/domain/asset/sanitize-asset-url.js +5 -5
  60. package/lib/shared/math/line-metrics.js +11 -11
  61. package/lib/utils/geometry.js +13 -12
  62. package/lib/utils/skinPanelEngine.js +14 -14
  63. package/package.json +1 -1
@@ -49,6 +49,7 @@ var _helper = require("../../utils/helper");
49
49
  var _math = require("../../utils/math");
50
50
  var _immutable = require("../../shared/objects/immutable");
51
51
  var _cabinetCorner = require("../../shared/domain/cabinet-corner");
52
+ var _applianceCategories = require("../../constants/applianceCategories");
52
53
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
53
54
  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; }
54
55
  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) { (0, _defineProperty2["default"])(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; }
@@ -2508,13 +2509,13 @@ function createMDFromItem(item, lines, molding) {
2508
2509
  };
2509
2510
  }
2510
2511
  function tryAdjacent(ct1, ct2) {
2511
- if (ct1.catid.includes('Dishwasher') && ct1.catid.includes('BF')) {
2512
+ if (ct1.catid.includes(_applianceCategories.APPLIANCE_CATEGORY_DISHWASHER) && ct1.catid.includes('BF')) {
2512
2513
  var temp = ct1;
2513
2514
  ct1 = ct2;
2514
2515
  ct2 = temp;
2515
2516
  }
2516
2517
  log('----tryAdjacent', ct1.id, ct2.id);
2517
- if (!ct2.catid.includes('Dishwasher') && !ct2.catid.includes('BF') && ct1.catid != ct2.catid) return false;
2518
+ if (!ct2.catid.includes(_applianceCategories.APPLIANCE_CATEGORY_DISHWASHER) && !ct2.catid.includes('BF') && ct1.catid != ct2.catid) return false;
2518
2519
  if (ct1.items[0].layoutpos === 'Vanity' || ct2.items[0].layoutpos === 'Vanity') return false;
2519
2520
  if (ct1.rotRad != ct2.rotRad) return false;
2520
2521
  log('ct1', ct1.pos.x, ct1.pos.y, ct1.size.width);
@@ -2659,7 +2660,7 @@ function showItemCT(item, CT, visible, planData, layer) {
2659
2660
  });
2660
2661
  }
2661
2662
  function getCountertopMesh(item, visible, planData, layer) {
2662
- if (item.type.includes('Dishwasher')) return undefined;
2663
+ if (item.type.includes(_applianceCategories.APPLIANCE_CATEGORY_DISHWASHER)) return undefined;
2663
2664
  if (item.type.includes('BF')) return undefined;
2664
2665
  var item3D = planData.sceneGraph.layers[layer.id].items[item.id];
2665
2666
  var countertop = null;
@@ -2729,10 +2730,10 @@ function addCTMesh(countertop, planData, layer) {
2729
2730
  var pivotMat = ctMesh.parent.parent.matrix;
2730
2731
  pivotMat.setPosition(new Three.Vector3(countertop.pos.x, 0, -countertop.pos.y));
2731
2732
  var width = countertop.items.find(function (ct) {
2732
- return !ct.type.includes('Dishwasher') && !ct.type.includes('BF');
2733
+ return !ct.type.includes(_applianceCategories.APPLIANCE_CATEGORY_DISHWASHER) && !ct.type.includes('BF');
2733
2734
  }).properties.get('width').get('_length');
2734
2735
  var unit_width = countertop.items.find(function (ct) {
2735
- return !ct.type.includes('Dishwasher') && !ct.type.includes('BF');
2736
+ return !ct.type.includes(_applianceCategories.APPLIANCE_CATEGORY_DISHWASHER) && !ct.type.includes('BF');
2736
2737
  }).properties.get('width').get('_unit') || 'cm';
2737
2738
  width = (0, _convertUnitsLite.convert)(width).from(unit_width).to('cm');
2738
2739
  pivotMat.scale(new Three.Vector3(countertop.size.width / width, 1, 1));
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.EXCLUDED_APPLIANCE_CATEGORIES = exports.APPLIANCE_CATEGORY_REFRIGERATOR = exports.APPLIANCE_CATEGORY_RANGE = exports.APPLIANCE_CATEGORY_MICROWAVE = exports.APPLIANCE_CATEGORY_HOOD = exports.APPLIANCE_CATEGORY_DISHWASHER = exports.APPLIANCE_CATEGORY_COOK_TOP = void 0;
7
+ // Appliance category/name constants
8
+ //
9
+ // NOTE: Keep these in a small dedicated module instead of adding more
10
+ // hardcoded strings into src/constants.js (which is already very large).
11
+
12
+ // wall-like appliances
13
+ var APPLIANCE_CATEGORY_COOK_TOP = exports.APPLIANCE_CATEGORY_COOK_TOP = 'Cook Top';
14
+ var APPLIANCE_CATEGORY_MICROWAVE = exports.APPLIANCE_CATEGORY_MICROWAVE = 'Microwave';
15
+ var APPLIANCE_CATEGORY_HOOD = exports.APPLIANCE_CATEGORY_HOOD = 'Hood';
16
+
17
+ // base-like appliances
18
+ var APPLIANCE_CATEGORY_DISHWASHER = exports.APPLIANCE_CATEGORY_DISHWASHER = 'Dishwasher';
19
+ var APPLIANCE_CATEGORY_REFRIGERATOR = exports.APPLIANCE_CATEGORY_REFRIGERATOR = 'Refrigerator';
20
+ var APPLIANCE_CATEGORY_RANGE = exports.APPLIANCE_CATEGORY_RANGE = 'Range';
21
+
22
+ // Categories that we exclude from some snapping/overlap logic.
23
+ // (exported as an array so call-sites can create their own Set and avoid
24
+ // accidental shared mutation)
25
+ var EXCLUDED_APPLIANCE_CATEGORIES = exports.EXCLUDED_APPLIANCE_CATEGORIES = Object.freeze([APPLIANCE_CATEGORY_COOK_TOP, APPLIANCE_CATEGORY_MICROWAVE, APPLIANCE_CATEGORY_HOOD]);
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.shouldBypassItemIntersectionValidation = void 0;
7
+ var _applianceCategories = require("../../constants/applianceCategories");
8
+ /**
9
+ * Returns `true` for items that are intentionally allowed to overlap other
10
+ * elements while being placed/dragged in the 2D viewer.
11
+ *
12
+ * Why this exists:
13
+ * - `GeometryUtils.validInterSect(...)` is used as a collision/intersection gate.
14
+ * - Some appliances (e.g. cooktops/ranges/hoods) are expected to be placed "on"
15
+ * or "inside" cabinetry/countertops, so they must not be blocked by that gate.
16
+ *
17
+ * NOTE: This currently identifies items by the appliance category strings found
18
+ * in `itemInfo.name` / `itemInfo.cabinet_category`.
19
+ */
20
+ var shouldBypassItemIntersectionValidation = exports.shouldBypassItemIntersectionValidation = function shouldBypassItemIntersectionValidation(itemRect) {
21
+ var itemInfo = itemRect === null || itemRect === void 0 ? void 0 : itemRect.itemInfo;
22
+ var name = typeof (itemInfo === null || itemInfo === void 0 ? void 0 : itemInfo.name) === 'string' ? itemInfo.name : '';
23
+ var cabinetCategory = typeof (itemInfo === null || itemInfo === void 0 ? void 0 : itemInfo.cabinet_category) === 'string' ? itemInfo.cabinet_category : '';
24
+ return name.includes(_applianceCategories.APPLIANCE_CATEGORY_HOOD) || cabinetCategory.toLowerCase().includes(_applianceCategories.APPLIANCE_CATEGORY_HOOD.toLowerCase()) || name.includes(_applianceCategories.APPLIANCE_CATEGORY_RANGE) || name.includes(_applianceCategories.APPLIANCE_CATEGORY_COOK_TOP);
25
+ };
@@ -9,10 +9,10 @@ var _helper = require("../../utils/helper");
9
9
  var _addItemMapper = require("./mappers/addItemMapper");
10
10
  var _changeDoorStyleMapper = require("./mappers/changeDoorStyleMapper");
11
11
  var _loadProjectMapper = require("./mappers/loadProjectMapper");
12
- /**
13
- * Main dispatcher for external event payload mapping.
14
- * Converts new API formats into legacy internal formats (e.g. assets3d -> structure_json)
15
- * without changing the behavior of the existing 3D tool.
12
+ /**
13
+ * Main dispatcher for external event payload mapping.
14
+ * Converts new API formats into legacy internal formats (e.g. assets3d -> structure_json)
15
+ * without changing the behavior of the existing 3D tool.
16
16
  */
17
17
  function mapExternalEventPayload(evt, state, defaultTextures) {
18
18
  if ((0, _helper.isEmpty)(evt)) return null;
@@ -11,15 +11,15 @@ var _constants = require("../../../constants");
11
11
  var _helper = require("../../../utils/helper");
12
12
  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; }
13
13
  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) { (0, _defineProperty2["default"])(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; }
14
- /**
15
- * Mapping logic for EXTERNAL_EVENT_ADD_ITEM.
16
- *
17
- * Converts the new assets3d payload shape into the legacy structure_json format
18
- * expected by the existing 3D tool.
19
- *
20
- * @param {Object} evt.payload External event payload
21
- * @param {Immutable.Map} state Planner state
22
- * @returns {Object|null} Updated event (or null when payload is empty)
14
+ /**
15
+ * Mapping logic for EXTERNAL_EVENT_ADD_ITEM.
16
+ *
17
+ * Converts the new assets3d payload shape into the legacy structure_json format
18
+ * expected by the existing 3D tool.
19
+ *
20
+ * @param {Object} evt.payload External event payload
21
+ * @param {Immutable.Map} state Planner state
22
+ * @returns {Object|null} Updated event (or null when payload is empty)
23
23
  */
24
24
  function mapAddItemEvent(orgEvtPayload, state) {
25
25
  var _evtPayload, _evtPayload3;
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.sanitizeAssetUrl = void 0;
7
- /**
8
- * Strip stray dots from the **path portion** of a GLTF/BIN URL.
9
- * e.g. `…/B36_36x34.5x24.gltf` → `…/B36_36x345x24.gltf`
10
- *
11
- * Leaves the protocol/domain and the final file extension untouched.
7
+ /**
8
+ * Strip stray dots from the **path portion** of a GLTF/BIN URL.
9
+ * e.g. `…/B36_36x34.5x24.gltf` → `…/B36_36x345x24.gltf`
10
+ *
11
+ * Leaves the protocol/domain and the final file extension untouched.
12
12
  */
13
13
  var sanitizeAssetUrl = exports.sanitizeAssetUrl = function sanitizeAssetUrl(url) {
14
14
  if (!url) return url;
@@ -14,17 +14,17 @@ function getVertex(vertices, vertexId) {
14
14
  return typeof vertices.get === 'function' ? vertices.get(vertexId) : vertices[vertexId];
15
15
  }
16
16
 
17
- /**
18
- * Computes a line length using its 2 vertices.
19
- *
20
- * Assumptions (matches existing DRAG logic):
21
- * - vertex coordinates are stored in centimeters
22
- * - result is converted to the provided unit
23
- *
24
- * @param {object} line - line object/record with `vertices` (array or immutable List)
25
- * @param {object} vertices - vertices collection (plain object map or immutable Map)
26
- * @param {string} unit - target unit (e.g. 'in', 'cm')
27
- * @returns {number|null}
17
+ /**
18
+ * Computes a line length using its 2 vertices.
19
+ *
20
+ * Assumptions (matches existing DRAG logic):
21
+ * - vertex coordinates are stored in centimeters
22
+ * - result is converted to the provided unit
23
+ *
24
+ * @param {object} line - line object/record with `vertices` (array or immutable List)
25
+ * @param {object} vertices - vertices collection (plain object map or immutable Map)
26
+ * @param {string} unit - target unit (e.g. 'in', 'cm')
27
+ * @returns {number|null}
28
28
  */
29
29
  function getLineLength(line, vertices) {
30
30
  var _v0$x, _v1$x, _v0$y, _v1$y;
@@ -107,6 +107,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
107
107
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
108
108
  var _math = require("./math.js");
109
109
  var _constants = require("../constants");
110
+ var _applianceCategories = require("../constants/applianceCategories");
111
+ var _viewerUtils = require("../engine/2d/viewer-utils.js");
110
112
  var _convertUnitsLite = require("./convert-units-lite");
111
113
  var Three = _interopRequireWildcard(require("three"));
112
114
  var _utils = require("../components/viewer2d/utils.js");
@@ -833,8 +835,9 @@ function getAllItemSpecified(scene, catalog, filter) {
833
835
  };
834
836
  var curiteminfo;
835
837
  var iteminfo = [];
838
+ var excludedApplianceCategories = new Set(_applianceCategories.EXCLUDED_APPLIANCE_CATEGORIES);
836
839
  layer.items.forEach(function (item) {
837
- var _cat$obj;
840
+ var _cat$obj, _cat$obj2;
838
841
  if (!item) return;
839
842
  var val = {
840
843
  pos: {
@@ -860,11 +863,9 @@ function getAllItemSpecified(scene, catalog, filter) {
860
863
  val.item = item;
861
864
 
862
865
  // Filter check
863
- if (Array.isArray(filter)) {
864
- if (!val.layoutpos || !filter.includes(val.layoutpos)) return;
865
- } else if (val.layoutpos !== filter || (0, _helper.isEmpty)(cat) || (cat === null || cat === void 0 ? void 0 : cat.type) === 'appliance' && ['Cook Top', 'Microwave'].includes(cat === null || cat === void 0 || (_cat$obj = cat.obj) === null || _cat$obj === void 0 ? void 0 : _cat$obj.category)) {
866
- return;
867
- }
866
+ var isExcludedItem = (0, _helper.isEmpty)(cat) || (cat === null || cat === void 0 ? void 0 : cat.type) === 'appliance' && excludedApplianceCategories.has(cat === null || cat === void 0 || (_cat$obj = cat.obj) === null || _cat$obj === void 0 ? void 0 : _cat$obj.category) || excludedApplianceCategories.has(cat === null || cat === void 0 || (_cat$obj2 = cat.obj) === null || _cat$obj2 === void 0 ? void 0 : _cat$obj2.cabinet_category);
867
+ var layoutMatches = Array.isArray(filter) ? !!val.layoutpos && filter.includes(val.layoutpos) : val.layoutpos === filter;
868
+ if (!layoutMatches || isExcludedItem) return;
868
869
 
869
870
  // Current vs others
870
871
  var rect = getCalcRectFromItem3D(val);
@@ -1737,7 +1738,7 @@ function calcSnap2(allItemRect, allItemSnap, allLineRects, allLineSnap, allRect,
1737
1738
  rotRad = snap.rotRad;
1738
1739
  }
1739
1740
  });
1740
- if (allItemRect.cur.itemInfo.name.includes('Cook Top')) {
1741
+ if (allItemRect.cur.itemInfo.name.includes(_applianceCategories.APPLIANCE_CATEGORY_COOK_TOP)) {
1741
1742
  var intersects = allItemRect.others.filter(function (others) {
1742
1743
  return intersectRect(others.rect, curitem.rect);
1743
1744
  });
@@ -1749,12 +1750,12 @@ function calcSnap2(allItemRect, allItemSnap, allLineRects, allLineSnap, allRect,
1749
1750
  }
1750
1751
  });
1751
1752
  }
1752
- if (allItemRect.cur.itemInfo.name.includes('Hood') || allItemRect.cur.itemInfo.cabinet_category.toLowerCase().includes('hood') || allItemRect.cur.itemInfo.name.includes('Range') || allItemRect.cur.itemInfo.name.includes('Cook Top')) {
1753
+ if ((0, _viewerUtils.shouldBypassItemIntersectionValidation)(allItemRect.cur)) {
1753
1754
  var _intersects = allItemRect.others.filter(function (others) {
1754
1755
  return intersectRect(others.rect, curitem.rect);
1755
1756
  });
1756
1757
  _intersects.forEach(function (rect) {
1757
- if (isPointInArea(allArea, rect.itemInfo) || !allArea.length) if (rect.itemInfo.name.includes('Hood') || rect.itemInfo.cabinet_category.toLowerCase().includes('hood') || rect.itemInfo.name.includes('Range') || rect.itemInfo.name.includes('Cook Top')) {
1758
+ if ((isPointInArea(allArea, rect.itemInfo) || !allArea.length) && (0, _viewerUtils.shouldBypassItemIntersectionValidation)(rect)) {
1758
1759
  nx = rect.itemInfo.x;
1759
1760
  ny = rect.itemInfo.y;
1760
1761
  rotRad = rect.itemInfo.rotation * Math.PI / 180;
@@ -2143,9 +2144,9 @@ function needSnap(curItem, othItem) {
2143
2144
  var isBlsnapOth = othItem.item.category === 'cabinet' && othItem.item.layoutpos === _constants.BASE_CABINET_LAYOUTPOS && Math.abs(curFloor - otherFloor) >= delta;
2144
2145
  var isBlsnapCur = curItem.selectedItem.category === 'cabinet' && curItem.selectedItem.layoutpos === _constants.BASE_CABINET_LAYOUTPOS && Math.abs(curFloor - otherFloor) >= delta;
2145
2146
  if (curItem.cat.hasOwnProperty('long_name') || othItem.cat && othItem.cat.hasOwnProperty('long_name')) {
2146
- if (curItem.cat.long_name.includes('Hood') || othItem.cat && othItem.cat.long_name.includes('Hood')) blSnap = true;
2147
- if (curItem.cat.long_name.includes('Hood') && othItem.cat && isBlsnapOth || isBlsnapCur && othItem.cat.long_name.includes('Hood')) blSnap = false;
2148
- if (curItem.cat.long_name.includes('Cook Top') && othItem.cat && othItem.cat.long_name.includes('Cabinet') || curItem.cat.long_name.includes('Cabinet') && othItem.cat && othItem.cat.long_name.includes('Cook Top')) blSnap = true;
2147
+ if (curItem.cat.long_name.includes(_applianceCategories.APPLIANCE_CATEGORY_HOOD) || othItem.cat && othItem.cat.long_name.includes(_applianceCategories.APPLIANCE_CATEGORY_HOOD)) blSnap = true;
2148
+ if (curItem.cat.long_name.includes(_applianceCategories.APPLIANCE_CATEGORY_HOOD) && othItem.cat && isBlsnapOth || isBlsnapCur && othItem.cat.long_name.includes(_applianceCategories.APPLIANCE_CATEGORY_HOOD)) blSnap = false;
2149
+ if (curItem.cat.long_name.includes(_applianceCategories.APPLIANCE_CATEGORY_COOK_TOP) && othItem.cat && othItem.cat.long_name.includes('Cabinet') || curItem.cat.long_name.includes('Cabinet') && othItem.cat && othItem.cat.long_name.includes(_applianceCategories.APPLIANCE_CATEGORY_COOK_TOP)) blSnap = true;
2149
2150
  }
2150
2151
  return blSnap;
2151
2152
  }
@@ -145,10 +145,10 @@ function isSnappedWithCornerCabient(srcItem, desItem) {
145
145
  } else return false;
146
146
  }
147
147
 
148
- /**
149
- * @param {*} faceSegs
150
- * @param {*} otherFaces
151
- * @returns
148
+ /**
149
+ * @param {*} faceSegs
150
+ * @param {*} otherFaces
151
+ * @returns
152
152
  */
153
153
  function getTrimmedFaceSegs(faceSegs, otherFaces, cnt) {
154
154
  try {
@@ -309,8 +309,8 @@ function applyGroupingRules(faces) {
309
309
  };
310
310
  }
311
311
 
312
- /**
313
- * Horizontal Grouping (for base cabinets back-to-back : BSV48 48" x 34.5")
312
+ /**
313
+ * Horizontal Grouping (for base cabinets back-to-back : BSV48 48" x 34.5")
314
314
  */
315
315
  function applyHorizontalGrouping(faces) {
316
316
  var removeIdxs = [];
@@ -352,8 +352,8 @@ function applyHorizontalGrouping(faces) {
352
352
  };
353
353
  }
354
354
 
355
- /**
356
- * Vertical Grouping (For CT3DR or CT2DR SKUs + stacked wall cabinets)
355
+ /**
356
+ * Vertical Grouping (For CT3DR or CT2DR SKUs + stacked wall cabinets)
357
357
  */
358
358
  function applyVerticalGrouping(faces) {
359
359
  var removeIdxs = [];
@@ -444,8 +444,8 @@ function buildMP3SkinPanelArray(bottomHeight, topHeight, mp3SkinPanelArray) {
444
444
  return skinPanelTypeArray;
445
445
  }
446
446
 
447
- /**
448
- * Decide which skin panel pieces are needed for a tall cabinet.
447
+ /**
448
+ * Decide which skin panel pieces are needed for a tall cabinet.
449
449
  */
450
450
  function resolveTallCabinetBundle(face) {
451
451
  var item = face.itemInfo;
@@ -465,8 +465,8 @@ function resolveTallCabinetBundle(face) {
465
465
  return face !== null && face !== void 0 && face.skinPanelSKU ? [face.skinPanelSKU] : [];
466
466
  }
467
467
 
468
- /**
469
- * Converts a face → list of SKUs
468
+ /**
469
+ * Converts a face → list of SKUs
470
470
  */
471
471
  function resolveSkinPanelSKU(face) {
472
472
  var layout = face.itemInfo.layoutpos;
@@ -476,8 +476,8 @@ function resolveSkinPanelSKU(face) {
476
476
  return [face.skinPanelSKU];
477
477
  }
478
478
 
479
- /**
480
- * Make skin panel data with grouping skinPanelSKU & doorStyle
479
+ /**
480
+ * Make skin panel data with grouping skinPanelSKU & doorStyle
481
481
  */
482
482
  function buildSkinPanelData(faces) {
483
483
  var tempResult = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitchen-simulator",
3
- "version": "11.30.1",
3
+ "version": "11.30.3",
4
4
  "description": "It is a kitchen simulator (self-contained micro-frontend).",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",