kitchen-simulator 11.16.0 → 11.17.0

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.
@@ -26,7 +26,7 @@ export function ccdfMapper(ccdf_list, layer) {
26
26
  }
27
27
  var cd = layerJS.items[correctItemId];
28
28
  if (cd && !!(ccdf !== null && ccdf !== void 0 && ccdf.scene_cabinet_id) && (cd === null || cd === void 0 ? void 0 : cd.id) === ccdf.scene_cabinet_id) {
29
- var _cd$long_name, _cd$sizeinfo;
29
+ var _ccdf$cabinet_id, _cd$long_name, _cd$sizeinfo, _cd$shape_svg;
30
30
  if (!isEmpty(ccdf === null || ccdf === void 0 ? void 0 : ccdf.id)) {
31
31
  cdfId = ccdf.id;
32
32
  }
@@ -76,7 +76,8 @@ export function ccdfMapper(ccdf_list, layer) {
76
76
  // make cabinet definition using structure_json and catalog
77
77
  cabinetDefinition = {
78
78
  type: cd.category,
79
- itemID: cd.itemID,
79
+ itemID: (_ccdf$cabinet_id = ccdf === null || ccdf === void 0 ? void 0 : ccdf.cabinet_id) !== null && _ccdf$cabinet_id !== void 0 ? _ccdf$cabinet_id : cd.itemID,
80
+ // cd.itemID may be legacy from legacy project, so ccdf.cabinet_id is preferred if exists
80
81
  name: cd.name,
81
82
  long_name: (_cd$long_name = cd.long_name) !== null && _cd$long_name !== void 0 ? _cd$long_name : ccdf === null || ccdf === void 0 ? void 0 : ccdf.long_name,
82
83
  sizeinfo: (_cd$sizeinfo = cd.sizeinfo) !== null && _cd$sizeinfo !== void 0 ? _cd$sizeinfo : ccdf === null || ccdf === void 0 ? void 0 : ccdf.sizeinfo,
@@ -84,7 +85,7 @@ export function ccdfMapper(ccdf_list, layer) {
84
85
  prototype: cd.prototype,
85
86
  base: cd.base,
86
87
  ccdf: cd.ccdf,
87
- shape_svg: cd.shape_svg,
88
+ shape_svg: (_cd$shape_svg = cd.shape_svg) !== null && _cd$shape_svg !== void 0 ? _cd$shape_svg : ccdf === null || ccdf === void 0 ? void 0 : ccdf.shape_svg,
88
89
  // If host provides cabinet base gltf/bin at CCDF top-level, prefer it.
89
90
  gltf: (ccdf === null || ccdf === void 0 ? void 0 : ccdf.gltf) || cd.gltf,
90
91
  bin: (ccdf === null || ccdf === void 0 ? void 0 : ccdf.bin) || (cd === null || cd === void 0 ? void 0 : cd.bin),
@@ -579,15 +579,15 @@ export function computeSkinPanels(layer) {
579
579
  var _collectLayerItems = collectLayerItems(layer),
580
580
  skinPanelItems = _collectLayerItems.skinPanelItems,
581
581
  otherItems = _collectLayerItems.otherItems;
582
- var filteredSkinPanelItems = skinPanelItems.filter(function (item) {
583
- return !shouldExcludeSkinPanel(item.toJS(), exclusionSet);
584
- });
585
582
 
586
583
  // Get all skin face list of [skinPanelItems] & [otherItems]
587
- var skinFaces = collectFaces(filteredSkinPanelItems, layer);
584
+ var skinFaces = collectFaces(skinPanelItems, layer);
588
585
  var otherFaces = collectFaces(otherItems, layer);
589
586
  skinFaces = filterFacesBlockedByFaces(skinFaces, skinFaces);
590
587
  skinFaces = filterFacesBlockedByFaces(skinFaces, otherFaces);
588
+ skinFaces = skinFaces.filter(function (skinFace) {
589
+ return !shouldExcludeSkinPanel(skinFace.itemInfo, exclusionSet);
590
+ });
591
591
  var _applyGroupingRules = applyGroupingRules(skinFaces),
592
592
  remainingFaces = _applyGroupingRules.remainingFaces,
593
593
  groupedFaces = _applyGroupingRules.groupedFaces;
@@ -33,7 +33,7 @@ function ccdfMapper(ccdf_list, layer) {
33
33
  }
34
34
  var cd = layerJS.items[correctItemId];
35
35
  if (cd && !!(ccdf !== null && ccdf !== void 0 && ccdf.scene_cabinet_id) && (cd === null || cd === void 0 ? void 0 : cd.id) === ccdf.scene_cabinet_id) {
36
- var _cd$long_name, _cd$sizeinfo;
36
+ var _ccdf$cabinet_id, _cd$long_name, _cd$sizeinfo, _cd$shape_svg;
37
37
  if (!(0, _utils.isEmpty)(ccdf === null || ccdf === void 0 ? void 0 : ccdf.id)) {
38
38
  cdfId = ccdf.id;
39
39
  }
@@ -83,7 +83,8 @@ function ccdfMapper(ccdf_list, layer) {
83
83
  // make cabinet definition using structure_json and catalog
84
84
  cabinetDefinition = {
85
85
  type: cd.category,
86
- itemID: cd.itemID,
86
+ itemID: (_ccdf$cabinet_id = ccdf === null || ccdf === void 0 ? void 0 : ccdf.cabinet_id) !== null && _ccdf$cabinet_id !== void 0 ? _ccdf$cabinet_id : cd.itemID,
87
+ // cd.itemID may be legacy from legacy project, so ccdf.cabinet_id is preferred if exists
87
88
  name: cd.name,
88
89
  long_name: (_cd$long_name = cd.long_name) !== null && _cd$long_name !== void 0 ? _cd$long_name : ccdf === null || ccdf === void 0 ? void 0 : ccdf.long_name,
89
90
  sizeinfo: (_cd$sizeinfo = cd.sizeinfo) !== null && _cd$sizeinfo !== void 0 ? _cd$sizeinfo : ccdf === null || ccdf === void 0 ? void 0 : ccdf.sizeinfo,
@@ -91,7 +92,7 @@ function ccdfMapper(ccdf_list, layer) {
91
92
  prototype: cd.prototype,
92
93
  base: cd.base,
93
94
  ccdf: cd.ccdf,
94
- shape_svg: cd.shape_svg,
95
+ shape_svg: (_cd$shape_svg = cd.shape_svg) !== null && _cd$shape_svg !== void 0 ? _cd$shape_svg : ccdf === null || ccdf === void 0 ? void 0 : ccdf.shape_svg,
95
96
  // If host provides cabinet base gltf/bin at CCDF top-level, prefer it.
96
97
  gltf: (ccdf === null || ccdf === void 0 ? void 0 : ccdf.gltf) || cd.gltf,
97
98
  bin: (ccdf === null || ccdf === void 0 ? void 0 : ccdf.bin) || (cd === null || cd === void 0 ? void 0 : cd.bin),
@@ -587,15 +587,15 @@ function computeSkinPanels(layer) {
587
587
  var _collectLayerItems = collectLayerItems(layer),
588
588
  skinPanelItems = _collectLayerItems.skinPanelItems,
589
589
  otherItems = _collectLayerItems.otherItems;
590
- var filteredSkinPanelItems = skinPanelItems.filter(function (item) {
591
- return !shouldExcludeSkinPanel(item.toJS(), exclusionSet);
592
- });
593
590
 
594
591
  // Get all skin face list of [skinPanelItems] & [otherItems]
595
- var skinFaces = collectFaces(filteredSkinPanelItems, layer);
592
+ var skinFaces = collectFaces(skinPanelItems, layer);
596
593
  var otherFaces = collectFaces(otherItems, layer);
597
594
  skinFaces = filterFacesBlockedByFaces(skinFaces, skinFaces);
598
595
  skinFaces = filterFacesBlockedByFaces(skinFaces, otherFaces);
596
+ skinFaces = skinFaces.filter(function (skinFace) {
597
+ return !shouldExcludeSkinPanel(skinFace.itemInfo, exclusionSet);
598
+ });
599
599
  var _applyGroupingRules = applyGroupingRules(skinFaces),
600
600
  remainingFaces = _applyGroupingRules.remainingFaces,
601
601
  groupedFaces = _applyGroupingRules.groupedFaces;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitchen-simulator",
3
- "version": "11.16.0",
3
+ "version": "11.17.0",
4
4
  "description": "It is a kitchen simulator (self-contained micro-frontend).",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",