kitchen-simulator 3.1.12 → 3.1.14

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.
@@ -1007,53 +1007,87 @@ function setFinishing(props, state, payload) {
1007
1007
  break;
1008
1008
  }
1009
1009
  }
1010
- function movePan2D3D(props, payload, state) {
1011
- var moveType = payload.moveType,
1012
- moveValue = payload.moveValue;
1013
- var value = state.getIn(['viewer2D']).toJS();
1014
- if (state.mode === _constants.MODE_IDLE) {
1015
- switch (moveType) {
1016
- case _constants.TOP:
1017
- value.f -= moveValue;
1018
- break;
1019
- case _constants.BOTTOM:
1020
- value.f += moveValue;
1021
- break;
1022
- case _constants.RIGHT:
1023
- value.e += moveValue;
1024
- break;
1025
- case _constants.LEFT:
1026
- value.e -= moveValue;
1027
- break;
1010
+ function moveAndRotatePan2D3D(eventType, props, payload, state) {
1011
+ if (eventType === _constants.EXTERNAL_EVENT_MOVE_PAN) {
1012
+ var moveType = payload.moveType,
1013
+ moveValue = payload.moveValue;
1014
+ var value = state.getIn(['viewer2D']).toJS();
1015
+ if (state.mode === _constants.MODE_IDLE) {
1016
+ switch (moveType) {
1017
+ case _constants.TOP:
1018
+ value.f -= moveValue;
1019
+ break;
1020
+ case _constants.BOTTOM:
1021
+ value.f += moveValue;
1022
+ break;
1023
+ case _constants.RIGHT:
1024
+ value.e += moveValue;
1025
+ break;
1026
+ case _constants.LEFT:
1027
+ value.e -= moveValue;
1028
+ break;
1029
+ }
1030
+ (0, _helper.updateViwer2D)(value, props.viewer2DActions);
1031
+ } else if (state.mode === _constants.MODE_IDLE_3D) {
1032
+ switch (moveType) {
1033
+ case _constants.TOP:
1034
+ window.interval = setTimeout(function () {
1035
+ window.tDKeyDown({
1036
+ keyCode: 38
1037
+ });
1038
+ }, 50);
1039
+ break;
1040
+ case _constants.BOTTOM:
1041
+ window.interval = setTimeout(function () {
1042
+ window.tDKeyDown({
1043
+ keyCode: 40
1044
+ });
1045
+ }, 50);
1046
+ break;
1047
+ case _constants.RIGHT:
1048
+ window.interval = setTimeout(function () {
1049
+ window.tDKeyDown({
1050
+ keyCode: 37
1051
+ });
1052
+ }, 50);
1053
+ break;
1054
+ case _constants.LEFT:
1055
+ window.interval = setTimeout(function () {
1056
+ window.tDKeyDown({
1057
+ keyCode: 39
1058
+ });
1059
+ }, 50);
1060
+ break;
1061
+ }
1028
1062
  }
1029
- (0, _helper.updateViwer2D)(value, props.viewer2DActions);
1030
- } else if (state.mode === _constants.MODE_IDLE_3D) {
1031
- switch (moveType) {
1063
+ } else if (eventType === _constants.EXTERNAL_EVENT_ROTATE_PAN) {
1064
+ var rotateType = payload.rotateType;
1065
+ switch (rotateType) {
1032
1066
  case _constants.TOP:
1033
1067
  window.interval = setTimeout(function () {
1034
- window.tDKeyDown({
1035
- keyCode: 38
1068
+ window.SPKeyDown({
1069
+ keyCode: 87
1036
1070
  });
1037
1071
  }, 50);
1038
1072
  break;
1039
1073
  case _constants.BOTTOM:
1040
1074
  window.interval = setTimeout(function () {
1041
- window.tDKeyDown({
1042
- keyCode: 40
1075
+ window.SPKeyDown({
1076
+ keyCode: 83
1043
1077
  });
1044
1078
  }, 50);
1045
1079
  break;
1046
1080
  case _constants.RIGHT:
1047
1081
  window.interval = setTimeout(function () {
1048
- window.tDKeyDown({
1049
- keyCode: 39
1082
+ window.SPKeyDown({
1083
+ keyCode: 68
1050
1084
  });
1051
1085
  }, 50);
1052
1086
  break;
1053
1087
  case _constants.LEFT:
1054
1088
  window.interval = setTimeout(function () {
1055
- window.tDKeyDown({
1056
- keyCode: 37
1089
+ window.SPKeyDown({
1090
+ keyCode: 65
1057
1091
  });
1058
1092
  }, 50);
1059
1093
  break;
@@ -1066,7 +1100,7 @@ function handleExternalEvent(_x10) {
1066
1100
  function _handleExternalEvent() {
1067
1101
  _handleExternalEvent = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9(props) {
1068
1102
  var _evt$payload3, _evt$payload4;
1069
- var evt, state, layerId, layer, _evt$payload, cdsItems, itemKeys, _loop3, i, _props$onInternalEven, sLineCnt, element, _state$viewer2D, _evt$payload$initialP, mouseX, mouseY, v2d, vPosX, vPosY, layerID, defaulTitle, _Object$keys, _evt$payload5, doorStyle, itemCDS, isAll, _layerId, _cdsItems, allItems, selectedItemId, _itemKeys, _loop4, _i2, _props$onInternalEven2, _evt$payload6, roomShapeType, width, height, _doorStyle, value, _value, _evt$payload7, moldingInfo, isGlobal, distElement, _distElement, _evt$payload8, option, _value2, _layerId2, _layer, _layer$getIn, selectedLines, selectedHoles, selectedItems, _i4, _i5, _i6, _evt$payload9, _evt$payload0, _evt$payload1, _evt$payload10, _layerID, _layer2, orginalItemInfo, originalItem, originalItemPos, replaceItem, _props$onInternalEven3, sceneData, currentTexture, _t5;
1103
+ var evt, state, layerId, layer, _evt$payload, cdsItems, itemKeys, _loop3, i, _props$onInternalEven, sLineCnt, _state$getIn, element, cds, _cds$find, currentCdsId, _state$viewer2D, _evt$payload$initialP, mouseX, mouseY, v2d, vPosX, vPosY, layerID, defaulTitle, _Object$keys, _evt$payload5, doorStyle, itemCDS, isAll, _layerId, _cdsItems, allItems, selectedItemId, _itemKeys, _loop4, _i2, _props$onInternalEven2, _evt$payload6, roomShapeType, width, height, _doorStyle, value, _value, _evt$payload7, moldingInfo, isGlobal, distElement, _distElement, _evt$payload8, option, _value2, _layerId2, _layer, _layer$getIn, selectedLines, selectedHoles, selectedItems, _i4, _i5, _i6, _evt$payload9, _evt$payload0, _evt$payload1, _evt$payload10, _layerID, _layer2, orginalItemInfo, originalItem, originalItemPos, replaceItem, _props$onInternalEven3, sceneData, currentTexture, _t5, _t6;
1070
1104
  return _regenerator["default"].wrap(function (_context1) {
1071
1105
  while (1) switch (_context1.prev = _context1.next) {
1072
1106
  case 0:
@@ -1076,7 +1110,7 @@ function _handleExternalEvent() {
1076
1110
  layerId = state.getIn(['scene', 'selectedLayer']);
1077
1111
  layer = state.getIn(['scene', 'layers', layerId]);
1078
1112
  _t5 = evt === null || evt === void 0 ? void 0 : evt.type;
1079
- _context1.next = _t5 === _constants.EXTERNAL_EVENT_LOAD_PROJECT ? 1 : _t5 === _constants.EXTERNAL_EVENT_TOGGLE_TO_3D ? 5 : _t5 === _constants.EXTERNAL_EVENT_TOGGLE_TO_2D ? 6 : _t5 === _constants.EXTERNAL_EVENT_TOGGLE_TO_ELEVATION ? 7 : _t5 === _constants.EXTERNAL_EVENT_ADD_WALL ? 8 : _t5 === _constants.EXTERNAL_EVENT_ADD_ITEM ? 9 : _t5 === _constants.EXTERNAL_EVENT_ADD_HOLE ? 12 : _t5 === _constants.EXTERNAL_EVENT_MOVE_PAN ? 13 : _t5 === _constants.EXTERNAL_EVENT_NEW_PROJECT ? 14 : _t5 === _constants.EXTERNAL_EVENT_CHANGE_DOORSTYLE ? 15 : _t5 === _constants.EXTERNAL_EVENT_ADD_ROOM_SHAPE ? 19 : _t5 === _constants.EXTERNAL_EVENT_ZOOM_IN ? 20 : _t5 === _constants.EXTERNAL_EVENT_ZOOM_OUT ? 21 : _t5 === _constants.EXTERNAL_EVENT_CENTERING_2D ? 22 : _t5 === _constants.EXTERNAL_EVENT_UNDO ? 23 : _t5 === _constants.EXTERNAL_EVENT_REDO ? 24 : _t5 === _constants.EXTERNAL_EVENT_SET_MOLDING ? 25 : _t5 === _constants.EXTERNAL_EVENT_DUPLICATE_ELEMENT ? 27 : _t5 === _constants.EXTERNAL_EVENT_DELETE_ELEMENT ? 28 : _t5 === _constants.EXTERNAL_EVENT_PROJECT_SETTING ? 29 : _t5 === _constants.EXTERNAL_EVENT_UPDATE_ATTRIBUTE ? 30 : _t5 === _constants.EXTERNAL_EVENT_UPDATE_PROPERTY ? 30 : _t5 === _constants.EXTERNAL_EVENT_REPLACE_CABINET ? 31 : _t5 === _constants.EXTERNAL_EVENT_SET_FINISHING ? 33 : _t5 === _constants.EXTERNAL_EVENT_SYNC_SCENE ? 34 : 35;
1113
+ _context1.next = _t5 === _constants.EXTERNAL_EVENT_LOAD_PROJECT ? 1 : _t5 === _constants.EXTERNAL_EVENT_TOGGLE_TO_3D ? 5 : _t5 === _constants.EXTERNAL_EVENT_TOGGLE_TO_2D ? 6 : _t5 === _constants.EXTERNAL_EVENT_TOGGLE_TO_ELEVATION ? 7 : _t5 === _constants.EXTERNAL_EVENT_ADD_WALL ? 8 : _t5 === _constants.EXTERNAL_EVENT_ADD_ITEM ? 9 : _t5 === _constants.EXTERNAL_EVENT_ADD_HOLE ? 12 : _t5 === _constants.EXTERNAL_EVENT_ROTATE_PAN ? 13 : _t5 === _constants.EXTERNAL_EVENT_MOVE_PAN ? 13 : _t5 === _constants.EXTERNAL_EVENT_NEW_PROJECT ? 14 : _t5 === _constants.EXTERNAL_EVENT_CHANGE_DOORSTYLE ? 15 : _t5 === _constants.EXTERNAL_EVENT_ADD_ROOM_SHAPE ? 19 : _t5 === _constants.EXTERNAL_EVENT_ZOOM_IN ? 20 : _t5 === _constants.EXTERNAL_EVENT_ZOOM_OUT ? 21 : _t5 === _constants.EXTERNAL_EVENT_CENTERING_2D ? 22 : _t5 === _constants.EXTERNAL_EVENT_UNDO ? 23 : _t5 === _constants.EXTERNAL_EVENT_REDO ? 24 : _t5 === _constants.EXTERNAL_EVENT_SET_MOLDING ? 25 : _t5 === _constants.EXTERNAL_EVENT_DUPLICATE_ELEMENT ? 27 : _t5 === _constants.EXTERNAL_EVENT_DELETE_ELEMENT ? 28 : _t5 === _constants.EXTERNAL_EVENT_PROJECT_SETTING ? 29 : _t5 === _constants.EXTERNAL_EVENT_UPDATE_ATTRIBUTE ? 38 : _t5 === _constants.EXTERNAL_EVENT_UPDATE_PROPERTY ? 38 : _t5 === _constants.EXTERNAL_EVENT_REPLACE_CABINET ? 39 : _t5 === _constants.EXTERNAL_EVENT_SET_FINISHING ? 41 : _t5 === _constants.EXTERNAL_EVENT_SYNC_SCENE ? 42 : 43;
1080
1114
  break;
1081
1115
  case 1:
1082
1116
  // prepare item data request
@@ -1161,29 +1195,41 @@ function _handleExternalEvent() {
1161
1195
  };
1162
1196
  }());
1163
1197
  }
1164
- return _context1.abrupt("continue", 35);
1198
+ return _context1.abrupt("continue", 43);
1165
1199
  case 5:
1166
1200
  props.projectActions.setMode(_constants.MODE_IDLE_3D);
1167
- return _context1.abrupt("continue", 35);
1201
+ return _context1.abrupt("continue", 43);
1168
1202
  case 6:
1169
1203
  props.projectActions.setMode(_constants.MODE_IDLE);
1170
- return _context1.abrupt("continue", 35);
1204
+ return _context1.abrupt("continue", 43);
1171
1205
  case 7:
1172
1206
  sLineCnt = layer.selected.lines.size;
1173
1207
  if (sLineCnt > 0) props.projectActions.setMode(_constants.MODE_ELEVATION_VIEW);
1174
- return _context1.abrupt("continue", 35);
1208
+ return _context1.abrupt("continue", 43);
1175
1209
  case 8:
1176
1210
  if (state.mode === _constants.MODE_IDLE || state.mode === _constants.MODE_2D_PAN) props.linesActions.selectToolDrawingLine('wall');else {
1177
1211
  props.projectActions.setMode(_constants.MODE_IDLE);
1178
1212
  props.linesActions.selectToolDrawingLine('wall');
1179
1213
  }
1180
- return _context1.abrupt("continue", 35);
1214
+ return _context1.abrupt("continue", 43);
1181
1215
  case 9:
1182
1216
  if ((0, _helper.isEmpty)(evt === null || evt === void 0 ? void 0 : evt.payload)) {
1183
1217
  _context1.next = 11;
1184
1218
  break;
1185
1219
  }
1186
- element = evt.payload;
1220
+ element = evt.payload; ///// filter the tempPlaceholders using layer-doorstyle-cds
1221
+ cds = (_state$getIn = state.getIn(['scene', 'layers', 'layer-1', 'doorStyle'])) === null || _state$getIn === void 0 ? void 0 : _state$getIn.cds;
1222
+ if (cds) {
1223
+ currentCdsId = (_cds$find = cds.find(function (c) {
1224
+ return c.itemID === element.itemID;
1225
+ })) === null || _cds$find === void 0 ? void 0 : _cds$find.cabinet_door_style_id;
1226
+ if (currentCdsId && element.structure_json.tempPlaceholders.length > 0) {
1227
+ element.structure_json.tempPlaceholders[0] = element.structure_json.tempPlaceholders.find(function (tPlaceholder) {
1228
+ return tPlaceholder.id === currentCdsId;
1229
+ });
1230
+ }
1231
+ }
1232
+ /////
1187
1233
  _context1.next = 10;
1188
1234
  return addItemToCatalog(element, state, props.catalog, props.projectActions);
1189
1235
  case 10:
@@ -1208,18 +1254,18 @@ function _handleExternalEvent() {
1208
1254
  props.projectActions.pushLastSelectedCatalogElementToHistory(element);
1209
1255
  props.projectActions.setIsCabinetDrawing(true);
1210
1256
  case 11:
1211
- return _context1.abrupt("continue", 35);
1257
+ return _context1.abrupt("continue", 43);
1212
1258
  case 12:
1213
1259
  _constants.ARRAY_3D_MODES.includes(state.mode) ? props.holesActions.selectToolDrawingHole3D(evt === null || evt === void 0 || (_evt$payload3 = evt.payload) === null || _evt$payload3 === void 0 ? void 0 : _evt$payload3.holeName) : props.holesActions.selectToolDrawingHole(evt === null || evt === void 0 || (_evt$payload4 = evt.payload) === null || _evt$payload4 === void 0 ? void 0 : _evt$payload4.holeName);
1214
- return _context1.abrupt("continue", 35);
1260
+ return _context1.abrupt("continue", 43);
1215
1261
  case 13:
1216
- movePan2D3D(props, evt.payload, state);
1217
- return _context1.abrupt("continue", 35);
1262
+ moveAndRotatePan2D3D(evt.type, props, evt.payload, state);
1263
+ return _context1.abrupt("continue", 43);
1218
1264
  case 14:
1219
1265
  defaulTitle = 'Untitle';
1220
1266
  props.projectActions.newProject();
1221
1267
  props.projectActions.rename(defaulTitle);
1222
- return _context1.abrupt("continue", 35);
1268
+ return _context1.abrupt("continue", 43);
1223
1269
  case 15:
1224
1270
  _evt$payload5 = evt.payload, doorStyle = _evt$payload5.doorStyle, itemCDS = _evt$payload5.itemCDS, isAll = _evt$payload5.isAll; // prepare item data request
1225
1271
  _layerId = state.getIn(['scene', 'selectedLayer']);
@@ -1304,11 +1350,11 @@ function _handleExternalEvent() {
1304
1350
  };
1305
1351
  }());
1306
1352
  } else props.itemsActions.setDoorStyle(doorStyle, itemCDS, isAll);
1307
- return _context1.abrupt("continue", 35);
1353
+ return _context1.abrupt("continue", 43);
1308
1354
  case 19:
1309
1355
  _evt$payload6 = evt.payload, roomShapeType = _evt$payload6.roomShapeType, width = _evt$payload6.width, height = _evt$payload6.height, _doorStyle = _evt$payload6.doorStyle;
1310
1356
  props.projectActions.createRoomWithShape(roomShapeType, width, height, _doorStyle);
1311
- return _context1.abrupt("continue", 35);
1357
+ return _context1.abrupt("continue", 43);
1312
1358
  case 20:
1313
1359
  value = state.getIn(['viewer2D']).toJS();
1314
1360
  value.a += 0.1;
@@ -1316,7 +1362,7 @@ function _handleExternalEvent() {
1316
1362
  value.e -= value.SVGWidth * 0.1 / 2;
1317
1363
  value.f -= value.SVGHeight * 0.1 / 2;
1318
1364
  (0, _helper.updateViwer2D)(value, props.viewer2DActions);
1319
- return _context1.abrupt("continue", 35);
1365
+ return _context1.abrupt("continue", 43);
1320
1366
  case 21:
1321
1367
  _value = state.getIn(['viewer2D']).toJS();
1322
1368
  _value.a -= 0.1;
@@ -1324,62 +1370,74 @@ function _handleExternalEvent() {
1324
1370
  _value.e += _value.SVGWidth * 0.1 / 2;
1325
1371
  _value.f += _value.SVGHeight * 0.1 / 2;
1326
1372
  (0, _helper.updateViwer2D)(_value, props.viewer2DActions);
1327
- return _context1.abrupt("continue", 35);
1373
+ return _context1.abrupt("continue", 43);
1328
1374
  case 22:
1329
1375
  (0, _helper.centering2D)(state, props.viewer2DActions);
1330
- return _context1.abrupt("continue", 35);
1376
+ return _context1.abrupt("continue", 43);
1331
1377
  case 23:
1332
1378
  props.projectActions.undo();
1333
- return _context1.abrupt("continue", 35);
1379
+ return _context1.abrupt("continue", 43);
1334
1380
  case 24:
1335
1381
  props.projectActions.redo();
1336
- return _context1.abrupt("continue", 35);
1382
+ return _context1.abrupt("continue", 43);
1337
1383
  case 25:
1338
1384
  _evt$payload7 = evt.payload, moldingInfo = _evt$payload7.moldingInfo, isGlobal = _evt$payload7.isGlobal;
1339
1385
  _context1.next = 26;
1340
1386
  return loadMoldingSvg(moldingInfo);
1341
1387
  case 26:
1342
1388
  props.itemsActions.setMolding(moldingInfo, isGlobal);
1343
- return _context1.abrupt("continue", 35);
1389
+ return _context1.abrupt("continue", 43);
1344
1390
  case 27:
1345
1391
  distElement = getElement(evt.payload, state);
1346
1392
  if (distElement) props.itemsActions.duplicateSelected(distElement, props.onInternalEvent);
1347
- return _context1.abrupt("continue", 35);
1393
+ return _context1.abrupt("continue", 43);
1348
1394
  case 28:
1349
1395
  _distElement = getElement(evt.payload, state);
1350
1396
  if (_distElement) props.projectActions.remove(_distElement);
1351
- return _context1.abrupt("continue", 35);
1397
+ return _context1.abrupt("continue", 43);
1352
1398
  case 29:
1353
1399
  _evt$payload8 = evt.payload, option = _evt$payload8.option, _value2 = _evt$payload8.value;
1354
- if (option === _constants.PROJECT_SETTING_OPTION.UPDATE_CEIL_HEIGHT) {
1355
- props.viewer2DActions.updateCeilHeight(_value2);
1356
- props.viewer3DActions.update3DCeilHeight(_value2);
1357
- } else if (option === _constants.PROJECT_SETTING_OPTION.CHANGE_WALL_LENGTH_MEASURE) {
1358
- props.viewer2DActions.changeWallLengthMeasure(_value2);
1359
- } else if (option === _constants.PROJECT_SETTING_OPTION.CHANGE_BASE_CABINET_MEASURE) {
1360
- props.viewer2DActions.changeBaseCabinetMeasure(_value2);
1361
- } else if (option === _constants.PROJECT_SETTING_OPTION.CHANGE_WALL_CABINET_MEASURE) {
1362
- props.viewer2DActions.changeWallCabinetMeasure(_value2);
1363
- } else if (option === _constants.PROJECT_SETTING_OPTION.CHANGE_WINDOW_DOOR_MEASURE) {
1364
- props.viewer2DActions.changeWindowDoorMeasure(_value2);
1365
- }
1366
- return _context1.abrupt("continue", 35);
1400
+ _t6 = option;
1401
+ _context1.next = _t6 === _constants.PROJECT_SETTING_OPTION.CHANGE_MEASUREMENT_UNIT ? 30 : _t6 === _constants.PROJECT_SETTING_OPTION.UPDATE_CEIL_HEIGHT ? 31 : _t6 === _constants.PROJECT_SETTING_OPTION.CHANGE_WALL_LENGTH_MEASURE ? 32 : _t6 === _constants.PROJECT_SETTING_OPTION.CHANGE_BASE_CABINET_MEASURE ? 33 : _t6 === _constants.PROJECT_SETTING_OPTION.CHANGE_WALL_CABINET_MEASURE ? 34 : _t6 === _constants.PROJECT_SETTING_OPTION.CHANGE_WINDOW_DOOR_MEASURE ? 35 : 36;
1402
+ break;
1367
1403
  case 30:
1404
+ props.viewer2DActions.updateCeilHeightUnit(_value2);
1405
+ case 31:
1406
+ props.viewer2DActions.updateCeilHeight(_value2);
1407
+ props.viewer3DActions.update3DCeilHeight(_value2);
1408
+ return _context1.abrupt("continue", 37);
1409
+ case 32:
1410
+ props.viewer2DActions.changeWallLengthMeasure(_value2);
1411
+ return _context1.abrupt("continue", 37);
1412
+ case 33:
1413
+ props.viewer2DActions.changeBaseCabinetMeasure(_value2);
1414
+ return _context1.abrupt("continue", 37);
1415
+ case 34:
1416
+ props.viewer2DActions.changeWallCabinetMeasure(_value2);
1417
+ return _context1.abrupt("continue", 37);
1418
+ case 35:
1419
+ props.viewer2DActions.changeWindowDoorMeasure(_value2);
1420
+ return _context1.abrupt("continue", 37);
1421
+ case 36:
1422
+ return _context1.abrupt("continue", 37);
1423
+ case 37:
1424
+ return _context1.abrupt("continue", 43);
1425
+ case 38:
1368
1426
  _layerId2 = state.getIn(['scene', 'selectedLayer']);
1369
1427
  _layer = state.getIn(['scene', 'layers', _layerId2]);
1370
1428
  _layer$getIn = _layer.getIn(['selected']), selectedLines = _layer$getIn.lines, selectedHoles = _layer$getIn.holes, selectedItems = _layer$getIn.items;
1371
1429
  for (_i4 = 0; _i4 < selectedLines.size; _i4++) (evt === null || evt === void 0 ? void 0 : evt.type) === _constants.EXTERNAL_EVENT_UPDATE_ATTRIBUTE ? updateAttributeOfSelectedElement(_layer.getIn(['lines', selectedLines.get(_i4)]), evt.payload, state, _layer, props.catalog, props.projectActions, evt.callback) : updatePropertyOfSelectedElement(_layer.getIn(['lines', selectedLines.get(_i4)]), evt.payload, props.catalog, props.projectActions, evt.callback);
1372
1430
  for (_i5 = 0; _i5 < selectedHoles.size; _i5++) (evt === null || evt === void 0 ? void 0 : evt.type) === _constants.EXTERNAL_EVENT_UPDATE_ATTRIBUTE ? updateAttributeOfSelectedElement(_layer.getIn(['holes', selectedHoles.get(_i5)]), evt.payload, state, _layer, props.catalog, props.projectActions, evt.callback) : updatePropertyOfSelectedElement(_layer.getIn(['holes', selectedHoles.get(_i5)]), evt.payload, props.catalog, props.projectActions, evt.callback);
1373
1431
  for (_i6 = 0; _i6 < selectedItems.size; _i6++) (evt === null || evt === void 0 ? void 0 : evt.type) === _constants.EXTERNAL_EVENT_UPDATE_ATTRIBUTE ? updateAttributeOfSelectedElement(_layer.getIn(['items', selectedItems.get(_i6)]), evt.payload, state, _layer, props.catalog, props.projectActions, evt.callback) : updatePropertyOfSelectedElement(_layer.getIn(['items', selectedItems.get(_i6)]), evt.payload, props.catalog, props.projectActions, evt.callback);
1374
- return _context1.abrupt("continue", 35);
1375
- case 31:
1432
+ return _context1.abrupt("continue", 43);
1433
+ case 39:
1376
1434
  _layerID = state.scene.selectedLayer;
1377
1435
  _layer2 = state.scene.getIn(['layers', _layerID]).toJS();
1378
1436
  orginalItemInfo = evt === null || evt === void 0 || (_evt$payload9 = evt.payload) === null || _evt$payload9 === void 0 ? void 0 : _evt$payload9.orginalItemInfo;
1379
1437
  originalItem = _layer2 === null || _layer2 === void 0 ? void 0 : _layer2.items[orginalItemInfo.id];
1380
- _context1.next = 32;
1438
+ _context1.next = 40;
1381
1439
  return addItemToCatalog(evt.payload.replaceItemInfo, state, props.catalog, props.projectActions);
1382
- case 32:
1440
+ case 40:
1383
1441
  originalItemPos = {
1384
1442
  rotation: originalItem.rotation,
1385
1443
  selectedItemId: originalItem.id,
@@ -1394,10 +1452,11 @@ function _handleExternalEvent() {
1394
1452
  }
1395
1453
  };
1396
1454
  props.itemsActions.replaceItem(originalItemPos, originalItem, replaceItem);
1397
- return _context1.abrupt("continue", 35);
1398
- case 33:
1455
+ return _context1.abrupt("continue", 43);
1456
+ case 41:
1399
1457
  setFinishing(props, state, evt.payload);
1400
- case 34:
1458
+ return _context1.abrupt("continue", 43);
1459
+ case 42:
1401
1460
  sceneData = state.scene.toJS(); // get molding data for "ReviewForQuote"
1402
1461
  currentTexture = layer.doorStyle !== null || layer.doorStyle !== undefined ? layer.doorStyle : props.state.doorStyle.toJS();
1403
1462
  sceneData.layers[layerId].moldingData = (0, _molding.getMoldingDataOfScene)(layer, props.catalog, currentTexture);
@@ -1408,8 +1467,8 @@ function _handleExternalEvent() {
1408
1467
  scene: sceneData
1409
1468
  }
1410
1469
  });
1411
- return _context1.abrupt("continue", 35);
1412
- case 35:
1470
+ return _context1.abrupt("continue", 43);
1471
+ case 43:
1413
1472
  case "end":
1414
1473
  return _context1.stop();
1415
1474
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitchen-simulator",
3
- "version": "3.1.12",
3
+ "version": "3.1.14",
4
4
  "description": "It is a kitchen simulator (self-contained micro-frontend).",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",