architwin 1.14.15 → 1.15.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.
Files changed (35) hide show
  1. package/lib/architwin.d.ts +13 -2
  2. package/lib/architwin.js +1 -1
  3. package/lib/atwinui/components/toolbar/i18n.js +71 -3
  4. package/lib/atwinui/components/toolbar/index.js +5 -1
  5. package/lib/atwinui/components/toolbar/menuBar.d.ts +1 -0
  6. package/lib/atwinui/components/toolbar/menuBar.js +12 -0
  7. package/lib/atwinui/components/toolbar/spacePartition/roomFormPane.d.ts +2 -0
  8. package/lib/atwinui/components/toolbar/spacePartition/roomFormPane.js +62 -24
  9. package/lib/atwinui/components/toolbar/spacePartition/roomTreePane.d.ts +21 -3
  10. package/lib/atwinui/components/toolbar/spacePartition/roomTreePane.js +62 -25
  11. package/lib/atwinui/components/toolbar/tagFormPane.js +2 -1
  12. package/lib/atwinui/components/toolbar/tagListPane.d.ts +7 -2
  13. package/lib/atwinui/components/toolbar/tagListPane.js +126 -38
  14. package/lib/atwinui/events.d.ts +5 -3
  15. package/lib/atwinui/events.js +633 -79
  16. package/lib/atwinui/index.js +9 -1
  17. package/lib/color.js +12 -1
  18. package/lib/loaders/polydrawerLoader.js +3 -0
  19. package/lib/types.d.ts +75 -1
  20. package/lib/types.js +17 -0
  21. package/package.json +1 -1
  22. package/static/atwinui.css +88 -7
  23. package/static/colors/SOFT_ROYAL_BLUE.png +0 -0
  24. package/static/colors/YELLOW_ORANGE.png +0 -0
  25. package/static/utility.css +157 -538
  26. package/lib/atwinui/components/toolbar/roomCreation/roomFormPane.d.ts +0 -68
  27. package/lib/atwinui/components/toolbar/roomCreation/roomFormPane.js +0 -798
  28. package/lib/atwinui/components/toolbar/roomCreation/roomLayerListPane.d.ts +0 -33
  29. package/lib/atwinui/components/toolbar/roomCreation/roomLayerListPane.js +0 -447
  30. package/lib/atwinui/components/toolbar/tagIotForm.d.ts +0 -20
  31. package/lib/atwinui/components/toolbar/tagIotForm.js +0 -391
  32. package/lib/atwinui/components/toolbar/usersPane.d.ts +0 -14
  33. package/lib/atwinui/components/toolbar/usersPane.js +0 -273
  34. package/lib/convert.d.ts +0 -13
  35. package/lib/convert.js +0 -54
@@ -167,6 +167,40 @@ i18n
167
167
  "RotateMinimap": "Rotate Minimap",
168
168
  "General Settings": "General Settings",
169
169
  "UploadImage": "Upload Image",
170
+ "IoTTags": "IoT Tags",
171
+ "AddIoTTag": "Add IoT Tag",
172
+ "LinkedSystems": "Linked Systems",
173
+ "BEMAC": "BEMAC",
174
+ "HANASYS": "HANASYS",
175
+ "URLLink": "URL Link",
176
+ "ModelName": "Model Name",
177
+ "SerialNumber": "Serial Number",
178
+ "ManufacturerSite": "Manufacturer Site",
179
+ "IoTDevices": "IoT Devices",
180
+ "SelectDevice": "Select Device",
181
+ "SystemLink": "System Link",
182
+ "LinkedIoTDevices": "Linked IoT Devices",
183
+ "Power": "Power",
184
+ "Temperature": "Temperature",
185
+ "Humidity": "Humidity",
186
+ "Pressure": "Pressure",
187
+ "Proximity": "Proximity",
188
+ "Fluid": "Fluid",
189
+ "Light": "Light",
190
+ "Gas": "Gas",
191
+ "Chemical": "Chemical",
192
+ "Submeter": "Submeter",
193
+ "Frequency": "Frequency",
194
+ "DeleteDevice": "Delete Device",
195
+ "ConfirmDeleteDevice": "Are you sure you want to delete this device? This action cannot be reversed",
196
+ "SuccessDeleteDevice": "Successfully deleted device",
197
+ "URL Link": "URL Link",
198
+ "Model Name": "Model Name",
199
+ "Serial Number": "Serial Number",
200
+ "Manufacturer Site": "Manufacturer Site",
201
+ "Select Device": "Select Device",
202
+ "System Link": "System Link",
203
+ "EditIoTTag": "Edit IoT Tag",
170
204
  "Unsend": "Unsend",
171
205
  "Pipes": "Pipes",
172
206
  "SelectPipeType": "Select Pipe Type",
@@ -234,8 +268,11 @@ i18n
234
268
  "SuccessWindowDelete": "Succesfully deleted window",
235
269
  "EnterFloorMaterial": "Enter floor material",
236
270
  "EnterWallMaterial": "Enter wall material",
271
+ "PressEscCancelRelocation": "Press Esc key to cancel relocation.",
272
+ "MoveTagCancelled": "Move Tag Cancelled",
237
273
  "Window": "Window",
238
- "CannotBackDrawingMode": "Cannot go back while drawing mode is active."
274
+ "CannotBackDrawingMode": "Cannot go back while drawing mode is active.",
275
+ "PleaseOffDrawingMode": "Action cannot be done, please turn off drawing mode."
239
276
  }
240
277
  },
241
278
  ja: {
@@ -320,7 +357,7 @@ i18n
320
357
  "EditRoom": "ルーム編集",
321
358
  "Memo": "メモ",
322
359
  "WallHeight": "高さ",
323
- "AddPartition": "パーティション追加",
360
+ "AddPartition": "区画追加",
324
361
  "DeleteRoom": "ルーム削除",
325
362
  "DoneDrawing": "描画完了",
326
363
  "NoPartitionDisplay": "表示する区画がありません",
@@ -402,6 +439,34 @@ i18n
402
439
  "RotateMinimap": "画像回転",
403
440
  "Search...": "検索...",
404
441
  "UploadImage": "画像をアップロード",
442
+ "IoTTags": "IoTタグ",
443
+ "AddIoTTag": "IoTタグの追加",
444
+ "LinkedSystems": "連携方式",
445
+ "BEMAC": "BEMAC",
446
+ "HANASYS": "HANASYS",
447
+ "URLLink": "URLリンク",
448
+ "ModelName": "機器名",
449
+ "SerialNumber": "シリアルナンバー",
450
+ "ManufacturerSite": "メーカーURL",
451
+ "IoTDevices": "IoT情報",
452
+ "SelectDevice": "IoT選択",
453
+ "SystemLink": "システムリンク",
454
+ "LinkedIoTDevices": "設定済みIoT",
455
+ "EditIoTTag": "IoTタグ編集",
456
+ "Power": "電力",
457
+ "Temperature": "温度",
458
+ "Humidity": "湿度",
459
+ "Pressure": "圧力",
460
+ "Proximity": "近接",
461
+ "Fluid": "流体",
462
+ "Light": "光",
463
+ "Gas": "ガス",
464
+ "Chemical": "化学物質",
465
+ "Submeter": "サブメーター",
466
+ "Frequency": "周波数",
467
+ "DeleteDevice": "デバイス削除",
468
+ "ConfirmDeleteDevice": "この操作は元に戻せません。このデバイスを削除しますか?",
469
+ "SuccessDeleteDevice": "デバイスを削除しました",
405
470
  "Unsend": "取り消し",
406
471
  "Pipes": "矢印マーカー",
407
472
  "SelectPipeType": "矢印マーカー種別選択",
@@ -469,8 +534,11 @@ i18n
469
534
  "SuccessWindowDelete": "建具の削除が完了しました",
470
535
  "EnterFloorMaterial": "仕上げ(床)を入力",
471
536
  "EnterWallMaterial": "仕上げ(壁)を入力",
537
+ "MoveTagCancelled": "タグの移動がキャンセルされました",
538
+ "PressEscCancelRelocation": "再配置をキャンセルするには、Esc キーを押します。",
472
539
  "Window": "建具",
473
- "CannotBackDrawingMode": "描画モードがアクティブな間は戻ることができません。"
540
+ "CannotBackDrawingMode": "描画モードがアクティブな間は戻ることができません。",
541
+ "PleaseOffDrawingMode": "操作を行う前に、描画モードをオフにしてください。"
474
542
  }
475
543
  }
476
544
  },
@@ -25,13 +25,14 @@ import { renderRoomTreePane } from "./spacePartition/roomTreePane";
25
25
  import { renderRoomFormPane } from "./spacePartition/roomFormPane";
26
26
  import { renderBasepointCalibratePane } from "./basepointCalibratePane";
27
27
  import { renderGeneralSettingsMenu } from "./generalSettingsMenuPane";
28
+ import { renderTagIOTFormPane } from './tagIotFormPane';
28
29
  import { renderScreenSharePane } from "./screenSharePane";
29
30
  import { PipeList } from "./pipeListPane";
30
31
  import { PipeForm } from "./pipeFormPane";
31
32
  const pipeList = new PipeList();
32
33
  const pipeForm = new PipeForm();
33
34
  let iFrame, sidebarContainer;
34
- let menuBar, actionBar, objectListPane, addObjectPane, tagListPane, tagFormPane, addMediaScreenForm, libraryPane, tagMessagingPane, themePane, modelControlPane, actionSettingsPane, roomTreePane, roomFormPane, basepointCalibratePane, generalSettingsPane, spaceUserListPane, viewingRemoteSpace, usersPane, pipeListPane, pipeFormPane;
35
+ let menuBar, actionBar, objectListPane, addObjectPane, tagListPane, tagFormPane, addMediaScreenForm, libraryPane, tagMessagingPane, themePane, modelControlPane, actionSettingsPane, roomTreePane, roomFormPane, basepointCalibratePane, generalSettingsPane, tagIotFormPane, spaceUserListPane, viewingRemoteSpace, usersPane, pipeListPane, pipeFormPane;
35
36
  function getIframeElement(iframeId) {
36
37
  if (!iframeId || iframeId === '') {
37
38
  console.error("IframeId is empty or undefined");
@@ -102,6 +103,7 @@ function renderToolbarUI(payload) {
102
103
  actionSettingsPane = renderActionSettingsPane();
103
104
  basepointCalibratePane = renderBasepointCalibratePane();
104
105
  generalSettingsPane = renderGeneralSettingsMenu();
106
+ tagIotFormPane = renderTagIOTFormPane();
105
107
  usersPane = renderScreenSharePane();
106
108
  pipeListPane = pipeList.renderPane();
107
109
  pipeFormPane = pipeForm.renderPane();
@@ -123,6 +125,7 @@ function renderToolbarUI(payload) {
123
125
  sidebarContainer.appendChild(tagListPane);
124
126
  sidebarContainer.appendChild(addMediaScreenForm);
125
127
  sidebarContainer.appendChild(generalSettingsPane);
128
+ sidebarContainer.appendChild(tagIotFormPane);
126
129
  sidebarContainer.appendChild(usersPane);
127
130
  sidebarContainer.appendChild(pipeListPane);
128
131
  sidebarContainer.appendChild(pipeFormPane);
@@ -146,6 +149,7 @@ function renderToolbarUI(payload) {
146
149
  roomFormPane.style.display = 'none';
147
150
  actionSettingsPane.style.display = 'none';
148
151
  generalSettingsPane.style.display = 'none';
152
+ tagIotFormPane.style.display = 'none';
149
153
  spaceUserListPane.style.display = 'none';
150
154
  viewingRemoteSpace.style.display = 'none';
151
155
  usersPane.style.display = 'none';
@@ -5,6 +5,7 @@ export declare let isThemeEnabled: boolean;
5
5
  export declare let isRoomCreationEnabled: boolean;
6
6
  export declare let isBIMEnabled: boolean;
7
7
  export declare let isGeneralSettingsEnabled: boolean;
8
+ export declare let isIoTTagEnabled: boolean;
8
9
  export declare let isSpaceScreenSharingEnabled: boolean;
9
10
  export declare let isPipeEnabled: boolean;
10
11
  export declare function renderMenuBar(iFrame: HTMLIFrameElement): HTMLDivElement;
@@ -12,6 +12,7 @@ export let isThemeEnabled = true;
12
12
  export let isRoomCreationEnabled = true;
13
13
  export let isBIMEnabled = true;
14
14
  export let isGeneralSettingsEnabled = true;
15
+ export let isIoTTagEnabled = true;
15
16
  export let isSpaceScreenSharingEnabled = false;
16
17
  export let isPipeEnabled = true;
17
18
  export function renderMenuBar(iFrame) {
@@ -47,6 +48,10 @@ export function renderMenuBar(iFrame) {
47
48
  <span class="mdi mdi-monitor-screenshot" id="at-screenshot-btn" data-cy="at-screenshot-btn"></span>
48
49
  <div class="at_icon_tooltip" data-cy="at-tooltip-screenshot">${i18n.t('Screenshot')}</div>
49
50
  </div>
51
+ <div class="at_sidebar_button_icon" style="display:${isIoTTagEnabled ? 'block' : 'none'}">
52
+ <span class="mdi mdi-apache-kafka" id="at-tag-iot-btn" data-cy="at-tag-iot-btn" target-pane="at-tag-list-pane"></span>
53
+ <div class="at_icon_tooltip" data-cy="at-tooltip-tag-iot-list">${i18n.t('IoTTags')}</div>
54
+ </div>
50
55
  <div class="at_sidebar_button_icon" style="display:${isPipeEnabled ? 'block' : 'none'}">
51
56
  <span class="mdi mdi-arrow-decision" id="at-pipe-btn" data-cy="at-pipe-btn" target-pane="at-pipe-list-pane"></span>
52
57
  <div class="at_icon_tooltip" data-cy="at-tooltip-pipe">${i18n.t('Pipes')}</div>
@@ -79,6 +84,7 @@ export function renderMenuBar(iFrame) {
79
84
  * based on the configuration specified in the _mpConfig object.
80
85
  */
81
86
  function setMenuItemsStatus() {
87
+ var _a, _b, _c, _d;
82
88
  const toolbarConfig = _mpConfig.toolbarConfig;
83
89
  const menuItems = _mpConfig.toolbarConfig.menuItems;
84
90
  console.log("menuItems", menuItems);
@@ -113,6 +119,11 @@ function setMenuItemsStatus() {
113
119
  isGeneralSettingsEnabled = _mpConfig.toolbarConfig.menuItems.generalSetting;
114
120
  log.info("__@ isGeneralSettingsEnabled: ", isGeneralSettingsEnabled);
115
121
  }
122
+ // IOT TAGS
123
+ if (((_a = menuItems === null || menuItems === void 0 ? void 0 : menuItems.iot) === null || _a === void 0 ? void 0 : _a.visible) !== undefined) {
124
+ isIoTTagEnabled = (_d = (_c = (_b = _mpConfig === null || _mpConfig === void 0 ? void 0 : _mpConfig.toolbarConfig) === null || _b === void 0 ? void 0 : _b.menuItems) === null || _c === void 0 ? void 0 : _c.iot) === null || _d === void 0 ? void 0 : _d.visible;
125
+ log.info("__@ isTagIoTFormEnabled: ", isIoTTagEnabled);
126
+ }
116
127
  // SCREEN SHARING
117
128
  if (menuItems.spaceScreenSharing !== undefined) {
118
129
  isSpaceScreenSharingEnabled = _mpConfig.toolbarConfig.menuItems.spaceScreenSharing;
@@ -145,6 +156,7 @@ export function setActiveMenu(id) {
145
156
  case 'at-room-creation-btn':
146
157
  case 'at-settings-btn':
147
158
  case 'at-general-setting-btn':
159
+ case 'at-tag-iot-btn':
148
160
  case 'at-pipe-btn':
149
161
  case 'at-screen-share-btn':
150
162
  if (parent.classList.contains('at_sidebar_button_icon_active')) {
@@ -116,3 +116,5 @@ export declare function setPreviousPartitionData(payload: PartitionNode): void;
116
116
  * @param wallUuid - The unique identifier of the wall to edit
117
117
  */
118
118
  export declare function handlePartitionWallEditBtn(wallUuid: string): Promise<void>;
119
+ export declare function getTempCurrentRoomEditData(): Array<PartitionNode>;
120
+ export declare function setTempCurrentRoomEditData(roomEditData: Array<PartitionNode>): void;
@@ -43,12 +43,12 @@ let inputWallMaterial;
43
43
  let wallMaterial = '';
44
44
  let isEditWindow = false;
45
45
  let currentEditWindowIndex = null;
46
- let newlyAddedWindow = null;
46
+ let tempCurrentEditRoom = null;
47
47
  export function renderRoomFormPane() {
48
48
  log.info("__@ renderRoomFormPane: ", roomFormMode);
49
49
  const element = document.createElement('div');
50
50
  element.classList.add('at_container');
51
- element.classList.add('at_w-12');
51
+ element.classList.add('at_w-15');
52
52
  element.classList.add('at_h-full');
53
53
  element.setAttribute('id', 'at-room-form-pane');
54
54
  element.setAttribute('data-cy', 'at-room-form-pane');
@@ -114,14 +114,20 @@ export function renderRoomFormPane() {
114
114
  </div>
115
115
 
116
116
  <div class="at_edit_name" id="at-edit-wall-material" style="display: none;">
117
- <input class="at_edit_name_input" type="text" id="at-edit-wall-input" data-cy="at-edit-wall-material-input" placeholder="${i18n.t('EnterWallMaterial')}" disabled style="font-size: 0.75rem !important;">
117
+ <input class="at_edit_name_input at_text_xs" type="text" id="at-edit-wall-input" data-cy="at-edit-wall-material-input" placeholder="${i18n.t('EnterWallMaterial')}" disabled>
118
118
  <span class="mdi mdi-pencil" style="display: none; cursor: pointer;" id="at-wall-edit-material-btn"></span>
119
- <span class="mdi mdi-check" id="at-confirm-edit-wall-btn" style="display: none;"></span>
119
+ <!-- <span class="mdi mdi-check" id="at-confirm-edit-wall-btn" style="display: none;"></span> -->
120
+ <div class="at_save_button at_text_xs at_ghost" id="at-confirm-edit-wall-btn" data-cy="at-confirm-edit-wall-btn" style="display: none;">
121
+ ${i18n.t('Save')}
122
+ </div>
120
123
  </div>
121
124
 
122
125
  <div class="at_edit_name" id="at-edit-partition-name">
123
- <input class="at_edit_name_input" type="text" name="edit_partition_name" id="at-edit-partition-name-input" data-cy="at-edit-partition-name-input">
124
- <span class="mdi mdi-check" id="at-confirm-edit-partition-name"></span>
126
+ <input class="at_edit_name_input at_text_xs" type="text" name="edit_partition_name" id="at-edit-partition-name-input" data-cy="at-edit-partition-name-input">
127
+ <!-- <span class="mdi mdi-check" id="at-confirm-edit-partition-name"></span> -->
128
+ <div class="at_save_button at_text_xs at_ghost" id="at-confirm-edit-partition-name" data-cy="at-confirm-edit-partition-name">
129
+ ${i18n.t('Save')}
130
+ </div>
125
131
  </div>
126
132
 
127
133
  <!-- Partition Add Mode -->
@@ -149,13 +155,13 @@ export function renderRoomFormPane() {
149
155
  </div>
150
156
  <div class="at_partition_footer">
151
157
  <!-- Add Partition Button -->
152
- <div class="at_button at_draw_partition_btn ${i18n.language === 'ja' ? 'at_draw_partition_btn_jp_font_size' : ''}"
158
+ <div class="at_button at_draw_partition_btn"
153
159
  id="at-draw-partition-form-btn" data-cy="at-draw-partition-form-btn">
154
160
  ${i18n.t('AddPartition')}
155
161
  <span class="mdi mdi-draw"></span>
156
162
  </div>
157
163
 
158
- <div class="at_button at_add_window_door_btn at_draw_partition_btn_jp_font_size"
164
+ <div class="at_button at_add_window_door_btn"
159
165
  id="at-add-window-door-btn" data-cy="at-add-window-door-btn" style="display:none;">
160
166
  ${i18n.t('AddWindowDoor')}
161
167
  <span class="mdi mdi-window-closed-variant"></span>
@@ -274,14 +280,24 @@ export function toggleDrawWindowButton() {
274
280
  if (currentPartitionData) {
275
281
  payload = {
276
282
  uuid: currentPartitionData.uuid,
277
- space_uuid: currentPartitionData.space_uuid,
278
- name: currentPartitionData.name,
279
- parent_uuid: currentPartitionData.parent_uuid,
280
283
  polygon_json: currentPolygonData
281
284
  };
282
285
  }
283
286
  // Re-render polygon
284
287
  renderPolygon(payload);
288
+ const objectIndex = _3DXObjects.findIndex(obj => obj.object.object_id == currentObject.object.object_id);
289
+ if (objectIndex != null) {
290
+ log.info("objectIndex", objectIndex);
291
+ if (_3DXObjects[objectIndex].children) {
292
+ _3DXObjects[objectIndex].children.map((win) => __awaiter(this, void 0, void 0, function* () {
293
+ var _c;
294
+ log.info("WIND", win);
295
+ if (win.index == ((_c = currentWall.windows) === null || _c === void 0 ? void 0 : _c.length) - 1 && win.wallUUID == currentWall.uuid) {
296
+ yield disposeModel(win);
297
+ }
298
+ }));
299
+ }
300
+ }
285
301
  }
286
302
  }
287
303
  /**
@@ -296,6 +312,7 @@ export function displayPartitionFormMode() {
296
312
  if (roomFormMode === "EDIT" /* FORM_MODE.EDIT */) {
297
313
  setPartitionFormMode("EDIT" /* FORM_MODE.EDIT */);
298
314
  currentEditRoomData = getCurrentEditRoomData();
315
+ tempCurrentEditRoom = Object.assign({}, currentEditRoomData);
299
316
  populatePartitionForm(currentEditRoomData);
300
317
  }
301
318
  else {
@@ -751,7 +768,7 @@ function displayFaces(polygon) {
751
768
  const floorMaterialField = document.getElementById('at-edit-floor-material-input');
752
769
  floorMaterialField.disabled = false;
753
770
  floorMaterialEdit.style.display = "none";
754
- floorMaterialConfirm.style.display = "block";
771
+ floorMaterialConfirm.style.display = "inline-flex";
755
772
  }));
756
773
  addEventListenerById('at-confirm-edit-wall-btn', () => __awaiter(this, void 0, void 0, function* () {
757
774
  console.log('@caroline wall check', wallMaterial, currentWall.material, currentWall);
@@ -775,7 +792,7 @@ function displayFaces(polygon) {
775
792
  const wallMaterialInput = document.getElementById('at-edit-wall-input');
776
793
  wallMaterialInput.disabled = false;
777
794
  wallEditMaterial.style.display = "none";
778
- wallConfirmMaterial.style.display = "block";
795
+ wallConfirmMaterial.style.display = "inline-flex";
779
796
  });
780
797
  }
781
798
  function displayWall(wall) {
@@ -838,8 +855,9 @@ function displayWindows(window) {
838
855
  const element = document.createElement('div');
839
856
  element.classList.add('at_dropdown_item');
840
857
  // Extract the wall name from the format "_wall-{number}" using regex
841
- const match = window.name.match(/window-(\d+)$/);
858
+ const match = window.name.match(/Window (\d+)$/);
842
859
  let windowName = '';
860
+ log.info("match", match);
843
861
  if (match) {
844
862
  const wallNumber = parseInt(match[1]);
845
863
  windowName = `${i18n.t('Window')} ${wallNumber}`;
@@ -866,15 +884,18 @@ function displayWindows(window) {
866
884
  </div>
867
885
  <div class="at_subitem_right">
868
886
  <span class="mdi mdi-pencil" id="at-edit-window-btn-${window.index}" style="display: ${editDisplay};"></span>
869
- <span class="mdi mdi-check" id="at-confirm-edit-window-${window.index}" data-cy="at-confirm-edit-window-${window.index}" style="display: ${confirmDisplay};"></span>
887
+ <!-- <span class="mdi mdi-check" id="at-confirm-edit-window-${window.index}" data-cy="at-confirm-edit-window-${window.index}" style="display: ${confirmDisplay};"></span> -->
888
+ <div class="at_save_button at_text_xs at_ghost" id="at-confirm-edit-window-${window.index}" data-cy="at-confirm-edit-window-${window.index}" style="display: ${confirmDisplay}; margin-top: 2px !important;">
889
+ ${i18n.t('Save')}
890
+ </div>
870
891
  <span class="mdi mdi-delete-outline" id="at-delete-window-btn-${window.index}"></span>
871
892
  </div>
872
893
  </div>
873
894
  <div class="at_edit_name" id="at-edit-window-name-${window.index}" data-index="${window.index}" style="display: ${confirmDisplay};">
874
- <input class="at_edit_name_input" type="text" id="at-edit-window-name-input-${window.index}" data-cy="at-edit-window-name-input-${window.index}" value="${windowName}" placeholder="${i18n.t('EnterNameHere')}">
895
+ <input class="at_edit_name_input at_text_xs" type="text" id="at-edit-window-name-input-${window.index}" data-cy="at-edit-window-name-input-${window.index}" value="${windowName}" placeholder="${i18n.t('EnterNameHere')}">
875
896
  </div>
876
897
  <div class="at_edit_material" id="at-edit-window-material-${window.index}" data-index="${window.index}" style="display: ${confirmDisplay};">
877
- <input class="at_edit_material_input" type="text" id="at-edit-window-material-input-${window.index}" data-cy="at-edit-window-material-input-${window.index}" value="${(_a = window.material) !== null && _a !== void 0 ? _a : ''}" placeholder="${i18n.t('EnterMaterialHere')}">
898
+ <input class="at_edit_material_input at_text_xs" type="text" id="at-edit-window-material-input-${window.index}" data-cy="at-edit-window-material-input-${window.index}" value="${(_a = window.material) !== null && _a !== void 0 ? _a : ''}" placeholder="${i18n.t('EnterMaterialHere')}">
878
899
  </div>
879
900
  `;
880
901
  const nameElement = element.querySelector(`#at-window-name-${window.index}`);
@@ -907,6 +928,10 @@ function setupEditWindow(element, window) {
907
928
  return;
908
929
  // Show inputs when edit icon is clicked
909
930
  editBtn.addEventListener("click", () => {
931
+ if (isDrawing) {
932
+ notify.error(`${i18n.t('PleaseOffDrawingMode')}`);
933
+ return;
934
+ }
910
935
  log.info("window", window);
911
936
  editNameContainer.style.display = "flex";
912
937
  editMaterialContainer.style.display = "flex";
@@ -1118,9 +1143,12 @@ function displayFloor(floor, walls, floorModel) {
1118
1143
  </div>
1119
1144
 
1120
1145
  <div class="at_edit_name" id="at-edit-floor-material">
1121
- <input class="at_edit_name_input at_ml_1" type="text" id="at-edit-floor-material-input" data-cy="at-edit-floor-material-input" value="${floor.material ? floor.material : ''}" placeholder="${i18n.t('EnterFloorMaterial')}" style="font-size: 0.75rem !important;">
1146
+ <input class="at_edit_name_input at_ml_1 at_text_xs" type="text" id="at-edit-floor-material-input" data-cy="at-edit-floor-material-input" value="${floor.material ? floor.material : ''}" placeholder="${i18n.t('EnterFloorMaterial')}">
1122
1147
  <span class="mdi mdi-pencil at_mr-1" style="display: none; cursor: pointer;" id="at-floor-edit-material-btn"></span>
1123
- <span class="mdi mdi-check at_mr-1" id="at-confirm-edit-floor-name" style="display: none;"></span>
1148
+ <!-- <span class="mdi mdi-check at_mr-1" id="at-confirm-edit-floor-name" style="display: none;"></span> -->
1149
+ <div class="at_save_button at_text_xs at_ghost" id="at-confirm-edit-floor-name" data-cy="at-confirm-edit-floor-name" style="display: none;">
1150
+ ${i18n.t('Save')}
1151
+ </div>
1124
1152
  </div>
1125
1153
 
1126
1154
  <div class="at_dropdown_item_container" id="at-vertex-list-${floor.uuid}" data-cy="at-vertex-list-${floor.uuid}" style="display: flex;"></div>
@@ -1234,6 +1262,7 @@ export function clearPartitionForm() {
1234
1262
  drawingMode = null;
1235
1263
  currentEditWindowIndex = null;
1236
1264
  isEditWindow = false;
1265
+ tempCurrentEditRoom = null;
1237
1266
  }
1238
1267
  /**
1239
1268
  * Cancels the drawing action for a partition.
@@ -1495,6 +1524,7 @@ export function setCurrentPartitionData() {
1495
1524
  setMeshChildrenMaterialProperty(currentHighlightedFace.component, currentHighlightedFace.name, currentHighlightedFace.type, currentHighlightedFace.value);
1496
1525
  }
1497
1526
  updatePartitionDataArray(newPayload, currentPartitionDataArray);
1527
+ log.info("if currentPartitionDataArray", currentPartitionDataArray);
1498
1528
  if (drawingMode === 'partition') {
1499
1529
  displayFaces(currentPolygonData);
1500
1530
  }
@@ -1516,6 +1546,7 @@ export function setCurrentPartitionData() {
1516
1546
  currentPartitionDataArray = currentPartitionDataArray.filter(partition => partition.uuid != currentPartitionData.uuid);
1517
1547
  dispatchSpaceEvent(SPACE_EVENTS.PARTITION_DISPOSED, currentPartitionData);
1518
1548
  currentPartitionData = null;
1549
+ log.info("else currentPartitionDataArray", currentPartitionDataArray);
1519
1550
  }
1520
1551
  }
1521
1552
  });
@@ -1543,10 +1574,11 @@ function updatePartitionDataArray(payload, currentPartitionDataArray) {
1543
1574
  currentPartitionData = payload;
1544
1575
  }
1545
1576
  else if (drawingMode === 'window') {
1577
+ log.info("currentPartitionData", currentPartitionData);
1546
1578
  // Update current partition data
1547
1579
  currentPartitionData.polygon_json = JSON.stringify(payload.polygon_json);
1548
1580
  // Update current partition data array
1549
- const currentPartitionDataIndex = currentPartitionDataArray.findIndex(partitionData => partitionData.uuid = currentPartitionData.uuid);
1581
+ const currentPartitionDataIndex = currentPartitionDataArray.findIndex(partitionData => partitionData.uuid == currentPartitionData.uuid);
1550
1582
  currentPartitionDataArray[currentPartitionDataIndex] = currentPartitionData;
1551
1583
  }
1552
1584
  dispatchSpaceEvent(SPACE_EVENTS.PARTITION_EDITED, { data: currentPartitionData });
@@ -1564,10 +1596,10 @@ function onModeDetectFloorInput(event) {
1564
1596
  const floorConfirmMaterial = document.getElementById('at-confirm-edit-floor-name');
1565
1597
  if (floorMaterialValue) {
1566
1598
  floorEditMaterial.style.display = "none";
1567
- floorConfirmMaterial.style.display = "block";
1599
+ floorConfirmMaterial.style.display = "inline-flex";
1568
1600
  }
1569
1601
  else {
1570
- floorEditMaterial.style.display = "block";
1602
+ floorEditMaterial.style.display = "inline-flex";
1571
1603
  floorConfirmMaterial.style.display = "none";
1572
1604
  }
1573
1605
  }
@@ -1584,10 +1616,10 @@ function onModeDetectWallInput(event) {
1584
1616
  setWallMaterial(wallMaterialValue);
1585
1617
  if (wallMaterialValue) {
1586
1618
  wallEditMaterial.style.display = "none";
1587
- wallConfirmMaterial.style.display = "block";
1619
+ wallConfirmMaterial.style.display = "inline-flex";
1588
1620
  }
1589
1621
  else {
1590
- wallEditMaterial.style.display = "block";
1622
+ wallEditMaterial.style.display = "inline-flex";
1591
1623
  wallConfirmMaterial.style.display = "none";
1592
1624
  }
1593
1625
  }
@@ -1719,3 +1751,9 @@ export function handlePartitionWallEditBtn(wallUuid) {
1719
1751
  cancelDrawing();
1720
1752
  });
1721
1753
  }
1754
+ export function getTempCurrentRoomEditData() {
1755
+ return tempCurrentEditRoom;
1756
+ }
1757
+ export function setTempCurrentRoomEditData(roomEditData) {
1758
+ tempCurrentEditRoom = roomEditData;
1759
+ }
@@ -75,10 +75,28 @@ export declare function updateRoomVisibilityUI(parentId: string, isVisible: bool
75
75
  * @param name - The specific name/identifier of the child element to highlight
76
76
  */
77
77
  export declare function highlightSelectedPartitionChild(partitionId: string, name: string): void;
78
- export declare function toggeleExpandParitionWallChild(partitionId: string, name: string): void;
79
- export declare function highlightSelectedWallWindow(wallUuid: string, index: number | string): void;
80
- export declare function toggleHighlightedPartitionItem(): void;
78
+ /**
79
+ * Toggles the visibility of child elements within a partition wall by managing CSS classes.
80
+ * @param partitionId - The unique identifier of the partition containing the child elements
81
+ * @param name - The specific name/identifier of the child element whose container to toggle
82
+ * @param expand - Optional boolean to explicitly set expansion state (true = show, false = hide). If undefined, toggles current state
83
+ */
84
+ export declare function toggleExpandParitionWallChild(partitionId: string, name: string, expand?: boolean): void;
85
+ /**
86
+ * Highlights the selected window element by toggling CSS classes and ensures its parent partition is expanded.
87
+ * @param wallUuid - The unique identifier of the wall containing the window elements
88
+ * @param index - The index or identifier of the specific window element to highlight
89
+ */
90
+ export declare function highlightSelectedWindow(wallUuid: string, index: number | string): void;
91
+ /**
92
+ * Removes the highlight from all selected window items by removing the 'selected' CSS class.
93
+ */
81
94
  export declare function toggleHighlightedWindowItem(): void;
95
+ /**
96
+ * Calculates the midpoint (centroid) of multiple 3D coordinates by averaging their x, y, and z values.
97
+ * @param coords - An array of objects containing start Vector3 coordinates
98
+ * @returns A Vector3 representing the calculated midpoint of all input coordinates
99
+ */
82
100
  export declare function calculateMidPoint(coords: Array<{
83
101
  start: Vector3;
84
102
  }>): Vector3;