architwin 1.15.2 → 1.15.4

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.
@@ -191,6 +191,8 @@ i18n
191
191
  "Chemical": "Chemical",
192
192
  "Submeter": "Submeter",
193
193
  "Frequency": "Frequency",
194
+ "Camera": "Camera",
195
+ "Others": "Others",
194
196
  "DeleteDevice": "Delete Device",
195
197
  "ConfirmDeleteDevice": "Are you sure you want to delete this device? This action cannot be reversed",
196
198
  "SuccessDeleteDevice": "Successfully deleted device",
@@ -272,7 +274,8 @@ i18n
272
274
  "MoveTagCancelled": "Move Tag Cancelled",
273
275
  "Window": "Window",
274
276
  "CannotBackDrawingMode": "Cannot go back while drawing mode is active.",
275
- "PleaseOffDrawingMode": "Action cannot be done, please turn off drawing mode."
277
+ "PleaseOffDrawingMode": "Action cannot be done, please turn off drawing mode.",
278
+ "IotCategoryRequired": "IoT Category is required"
276
279
  }
277
280
  },
278
281
  ja: {
@@ -464,6 +467,8 @@ i18n
464
467
  "Chemical": "化学物質",
465
468
  "Submeter": "サブメーター",
466
469
  "Frequency": "周波数",
470
+ "Camera": "カメラ",
471
+ "Others": "その他",
467
472
  "DeleteDevice": "デバイス削除",
468
473
  "ConfirmDeleteDevice": "この操作は元に戻せません。このデバイスを削除しますか?",
469
474
  "SuccessDeleteDevice": "デバイスを削除しました",
@@ -539,7 +544,8 @@ i18n
539
544
  "Window": "建具",
540
545
  "CannotBackDrawingMode": "描画モードがアクティブな間は戻ることができません。",
541
546
  "PleaseOffDrawingMode": "操作を行う前に、描画モードをオフにしてください。",
542
- "Successfully Deleted Tag": "タグを削除しました"
547
+ "Successfully Deleted Tag": "タグを削除しました",
548
+ "IotCategoryRequired": "IoTカテゴリは必須です"
543
549
  }
544
550
  }
545
551
  },
@@ -1,4 +1,5 @@
1
1
  import { FORM_MODE, PartitionNode, PolygonData, IObjectData } from "../../../../types";
2
+ export declare let isEditWindow: boolean;
2
3
  export declare function renderRoomFormPane(): HTMLDivElement;
3
4
  /**
4
5
  * Toggles the state of the partition drawing functionality.
@@ -41,7 +41,7 @@ let inputFloorMaterial;
41
41
  let floorMaterial = '';
42
42
  let inputWallMaterial;
43
43
  let wallMaterial = '';
44
- let isEditWindow = false;
44
+ export let isEditWindow = false;
45
45
  let currentEditWindowIndex = null;
46
46
  let tempCurrentEditRoom = null;
47
47
  export function renderRoomFormPane() {
@@ -241,12 +241,14 @@ export function toggleDrawWindowButton() {
241
241
  isDrawing = true;
242
242
  drawingMode = 'window';
243
243
  // clearSelectedObject()
244
- addDoorButton.classList.remove('at_add_window_door_btn');
245
- addDoorButton.classList.add('at_add_window_door_btn_active');
246
- addDoorButton.innerHTML = `
247
- ${i18n.t('DoneDrawing')}
248
- <span class="mdi mdi-check-bold"></span>
249
- `;
244
+ if (!isEditWindow) {
245
+ addDoorButton.classList.remove('at_add_window_door_btn');
246
+ addDoorButton.classList.add('at_add_window_door_btn_active');
247
+ addDoorButton.innerHTML = `
248
+ ${i18n.t('DoneDrawing')}
249
+ <span class="mdi mdi-check-bold"></span>
250
+ `;
251
+ }
250
252
  const objectIndex = _3DXObjects.findIndex(obj => obj.object.id == currentObject.object.id);
251
253
  log.info("objectIndex", objectIndex);
252
254
  clearFloorBaseHeight();
@@ -941,16 +943,28 @@ function setupEditWindow(element, window) {
941
943
  inputName.focus();
942
944
  isEditWindow = true;
943
945
  currentEditWindowIndex = window.index;
944
- // toggleDrawWindowButton()
946
+ drawingMode = 'window';
947
+ toggleDrawWindowButton();
948
+ log.info("currentObject ", currentObject);
949
+ setCurrentPolygon(currentObject);
950
+ const drawConfig = {
951
+ lineTypeComponentConfig: {
952
+ renderPolygonOnAdd: false,
953
+ drawingMode: drawingMode,
954
+ polygonData: currentObject.object.object_data.json_data,
955
+ targetUUID: currentWall.uuid,
956
+ targetIndex: currentEditWindowIndex
957
+ }
958
+ };
959
+ setDrawingConfig(drawConfig);
945
960
  // @ts-ignore
946
961
  const windowComponent = {
947
962
  inputs: {
948
963
  path: window.path
949
964
  }
950
965
  };
951
- log.info("currentObject ", currentObject);
952
- // setCurrentPolygon(currentObject)
953
- // enableVerticeControls(windowComponent)
966
+ enableVerticeControls(windowComponent);
967
+ isDrawing = true;
954
968
  });
955
969
  // // Confirm edit name and material
956
970
  confirmBtn.addEventListener("click", () => {
@@ -979,8 +993,11 @@ function setupEditWindow(element, window) {
979
993
  }
980
994
  }));
981
995
  }
982
- // toggleDrawWindowButton()
996
+ // cancelDraw()
997
+ toggleDrawWindowButton();
983
998
  saveWallChanges();
999
+ isDrawing = false;
1000
+ isEditWindow = false;
984
1001
  });
985
1002
  }
986
1003
  function saveWallChanges() {
@@ -1505,6 +1522,7 @@ export function setCurrentPartitionData() {
1505
1522
  if (drawingMode === 'partition') {
1506
1523
  displayFaceLists();
1507
1524
  currentObject = currentObjectData;
1525
+ log.info("JAMES currentObject", currentObject);
1508
1526
  }
1509
1527
  }, 50); // Check every 50ms
1510
1528
  });
@@ -1536,6 +1554,7 @@ export function setCurrentPartitionData() {
1536
1554
  }
1537
1555
  else if (drawingMode === 'window') {
1538
1556
  // Update current edit wall display
1557
+ currentObject.object.object_data.json_data = currentPolygonData;
1539
1558
  currentWall = currentPolygonData.walls.find(wall => wall.uuid == currentWall.uuid);
1540
1559
  log.info("current wall", currentWall, currentPolygonData);
1541
1560
  const faceVertexContainer = document.getElementById('at-face-vertex-container');
@@ -1558,7 +1577,7 @@ export function setCurrentPartitionData() {
1558
1577
  });
1559
1578
  }
1560
1579
  function updatePartitionDataArray(payload, currentPartitionDataArray) {
1561
- log.info("updatePartitionDataArray", payload, currentPartitionDataArray);
1580
+ log.info("updatePartitionDataArray", payload, currentPartitionDataArray, drawingMode);
1562
1581
  if (drawingMode === 'partition') {
1563
1582
  // Find the index of the partition with the same uuid
1564
1583
  const existingIndex = currentPartitionDataArray.findIndex((partition) => partition.uuid === payload.uuid);
@@ -23,7 +23,7 @@ export let selectedIotTag = undefined;
23
23
  let tagIotName, iotModelName, iotSerialNumber, iotMfrName, iotSystemLink;
24
24
  let selectedIoTCat;
25
25
  let linkedDevicesArray = [];
26
- let iotCategoryIconList = ['mdi-power', 'mdi-thermometer', 'mdi-water-percent', 'mdi-gauge', 'mdi-leak', 'mdi-water', 'mdi-lightbulb-on', 'mdi-gas-cylinder', 'mdi-flask', 'mdi-meter-electric', 'mdi-information-symbol', 'mdi-sine-wave'];
26
+ let iotCategoryIconList = ['mdi-power', 'mdi-thermometer', 'mdi-water-percent', 'mdi-gauge', 'mdi-leak', 'mdi-water', 'mdi-lightbulb-on', 'mdi-gas-cylinder', 'mdi-flask', 'mdi-meter-electric', 'mdi-information-symbol', 'mdi-sine-wave', 'mdi-camera', 'mdi-dots-horizontal'];
27
27
  let notify = new Notyf({ position: { x: 'left', y: 'bottom' } });
28
28
  export function renderTagIOTFormPane() {
29
29
  const element = document.createElement('div');
@@ -38,20 +38,20 @@ export function renderTagIOTFormPane() {
38
38
 
39
39
  <div class="at_form_container at_scrollable_container at_h-min-70">
40
40
  <label for="">${i18n.t('LinkedSystems')}</label>
41
- <div class="at_gap_2" style="display: inline-flex">
42
- <label class="at_flex at_align_center at_text_xs at_gap_1">
43
- <input type="radio" id="at-linked-radio-bemac" name="iot-link-system" checked value=${IOT_LINKED_SYSTEMS.BEMAC} selected />
44
- ${i18n.t("BEMAC")}
45
- </label>
46
- <label class="at_flex at_align_center at_text_xs at_gap_1">
47
- <input type="radio" id="at-linked-radio-hanasys" name="iot-link-system" value=${IOT_LINKED_SYSTEMS.HANASYS} />
48
- ${i18n.t("HANASYS")}
49
- </label>
50
- <label class="at_flex at_align_center at_text_xs at_gap_1">
51
- <input type="radio" id="at-linked-radio-link" name="iot-link-system" value=${IOT_LINKED_SYSTEMS.URL_LINK} />
52
- ${i18n.t("URLLink")}
53
- </label>
54
- </div>
41
+ <div class="at_linked_systems_options_contianer at_gap_2" style="display: inline-flex">
42
+ <label class="at_flex at_align_center at_text_xs at_gap_1">
43
+ <input type="radio" id="at-linked-radio-bemac" name="iot-link-system" checked value=${IOT_LINKED_SYSTEMS.BEMAC} selected />
44
+ ${i18n.t("BEMAC")}
45
+ </label>
46
+ <label class="at_flex at_align_center at_text_xs at_gap_1">
47
+ <input type="radio" id="at-linked-radio-hanasys" name="iot-link-system" value=${IOT_LINKED_SYSTEMS.HANASYS} />
48
+ ${i18n.t("HANASYS")}
49
+ </label>
50
+ <label class="at_flex at_align_center at_text_xs at_gap_1">
51
+ <input type="radio" id="at-linked-radio-link" name="iot-link-system" value=${IOT_LINKED_SYSTEMS.URL_LINK} />
52
+ ${i18n.t("URLLink")}
53
+ </label>
54
+ </div>
55
55
 
56
56
  <div class="at_field at_flex_column">
57
57
  <label for="">${i18n.t('Category')}</label>
@@ -544,7 +544,7 @@ export function getIotTagFormData() {
544
544
  serialNumber: iotSerialNumber.value,
545
545
  tagMf: iotMfrName.value,
546
546
  // tagCategoryId: selectedIoTCat.uuid,
547
- tagCategoryId: selectedIoTCat.name,
547
+ tagCategoryId: selectedIoTCat ? selectedIoTCat.name : undefined,
548
548
  systemLink: iotSystemLink.value,
549
549
  linkedDevices: linkedDevicesArray,
550
550
  iotSystem: selectedIoTSystem,
@@ -678,6 +678,7 @@ export function clearIotFields() {
678
678
  iotSystemLink.innerText = '';
679
679
  linkedDevicesArray = [];
680
680
  selectedIoTSystem = '';
681
+ selectedIoTCat = undefined;
681
682
  setSelectedIoTSystemRadio(IOT_LINKED_SYSTEMS.BEMAC);
682
683
  deviceContainer.innerHTML = '';
683
684
  iotTagFormMode = "ADD" /* FORM_MODE.ADD */;
@@ -349,7 +349,9 @@ export function renderTagRow(tag, tagIconUrl, tag_type = null) {
349
349
  </div>
350
350
  </td>
351
351
  <td id="at-tag-row-${tag.id}" data-cy="at-tag-row-${tag.id}" tag-id="${tag.id}">
352
- <span>${tag.label}</span>
352
+ <div class="at-iot-tag-row-name">
353
+ <span title="${tag.label.length > 12 ? tag.label : ''}">${tag.label}</span>
354
+ </div>
353
355
  </td>
354
356
  <td class="at_table_button_row">
355
357
  <span class="mdi mdi-pencil at_edit_tag_btn ${isTagReadOnly ? 'at_disabled' : ''}" id="at-edit-tag-${tag.id}" data-cy="at-edit-tag-${tag.id}" tag-id="${tag.id}" target-pane=${tag_type === TAG_TYPE.IOT ? "at-tag-iot-form-pane" : "at-tag-form-pane"}></span>
@@ -28,7 +28,7 @@ import { toggleDrawPartitionButton, displayPartitionFormMode, setPartitionFormMo
28
28
  import { actionSettingsSelectOption, getTempCoordinateSystem, getTempMeasurementUnit, getTempRotationUnit, setCoordinateSystem, setMeasurementUnit, setRotationUnit, initSettingsValues, setTempCoordinateSystem, setTempMeasurementUnit, setTempRotationUnit, toggleActionSettingsDropdown, toggleCalibrateBasepoint, setScaleFactor, getTempScaleFactor, setTempScaleFactor, setBasepoint, getTempBasepoint, setTempBasepoint, getBasepoint, toggleActionSettings, getBasepointObjectPayload, displayConvertedCoordinates, getCoordinateSystem, getScaleFactor, getMeasurementUnit, getRotationUnit, setBasepointObjectPayload } from "./components/toolbar/actionSettingsPane";
29
29
  import { getBasepointCalibrateBpCoordinateValues, getBasepointCalibrateMpCoordinateValues, initBsepointCalibratePane, toggleBasepointCalibratePane } from "./components/toolbar/basepointCalibratePane";
30
30
  import { toggleGeneralMapOptions, initGeneralSelectedMap, getSelectedMapOption } from './components/toolbar/generalSettingsMenuPane';
31
- import { searchTagList, setSearchTagTerm, searchClearfield, getSearchTagTerm, sortTags, updateSelectedTagSortOption, resetSelectedTagSortOption, filterIotTagList, setTagPaneActive, isTagPaneActive, setCurrentTagPaneMode, currentTagPaneMode } from './components/toolbar/tagListPane';
31
+ import { searchTagList, setSearchTagTerm, searchClearfield, getSearchTagTerm, sortTags, updateSelectedTagSortOption, resetSelectedTagSortOption, filterIotTagList, setTagPaneActive, isTagPaneActive, setCurrentTagPaneMode, currentTagPaneMode, selectedTagSortOption } from './components/toolbar/tagListPane';
32
32
  import { renderUserRows } from "./components/toolbar/spaceUserListPane";
33
33
  import { handleRemoteViewResponsiveChanges, renderRemoteSpaceViewing } from "./components/toolbar/viewingRemoteSpace";
34
34
  import { PipeList } from "./components/toolbar/pipeListPane";
@@ -343,19 +343,25 @@ function renderTagPaneContent() {
343
343
  log.info("1 content", tags);
344
344
  setTagPaneActive(true);
345
345
  setCurrentTagPaneMode(TAG_TYPE.MP);
346
- renderTags(filterTagList(tags));
346
+ resetSelectedTagSortOption();
347
+ const sortedTagsToDisplay = sortTags(tags, selectedTagSortOption);
348
+ renderTags(filterTagList(sortedTagsToDisplay));
347
349
  }
348
350
  else if (tags.length > 0 && isTagPaneActive) {
349
351
  log.info("2 content", tags);
350
352
  setTagPaneActive(true);
351
353
  setCurrentTagPaneMode(TAG_TYPE.MP);
352
- renderTags(tags, true);
354
+ resetSelectedTagSortOption();
355
+ const sortedTagsToDisplay = sortTags(tags, selectedTagSortOption);
356
+ renderTags(sortedTagsToDisplay, true);
353
357
  }
354
358
  else if (!isTagPaneActive) {
355
359
  log.info("3 content", tags);
356
360
  setTagPaneActive(false);
357
361
  setCurrentTagPaneMode(TAG_TYPE.IOT);
358
- renderTags(filterIotTagList(tags));
362
+ resetSelectedTagSortOption();
363
+ const sortedTagsToDisplay = sortTags(tags, selectedTagSortOption);
364
+ renderTags(filterIotTagList(sortedTagsToDisplay));
359
365
  dispatchSpaceEvent(SPACE_EVENTS.GET_IOT_TAG_ICON, { payload: 'hello from library' });
360
366
  }
361
367
  if ((_tagCategories === null || _tagCategories === void 0 ? void 0 : _tagCategories.length) > 0) {
@@ -3476,7 +3482,12 @@ function handlePlaceIotTag() {
3476
3482
  }
3477
3483
  }
3478
3484
  else {
3479
- notyf.error(`${i18n.t('RequiredFieldsEmpty')}`);
3485
+ if (!payload.tagCategoryId) {
3486
+ notyf.error(`${i18n.t('IotCategoryRequired')}`);
3487
+ }
3488
+ else {
3489
+ notyf.error(`${i18n.t('RequiredFieldsEmpty')}`);
3490
+ }
3480
3491
  isPlacingTag = false;
3481
3492
  }
3482
3493
  }
@@ -85,6 +85,7 @@ export class TubeLine {
85
85
  this.renderTubeLine();
86
86
  console.log("paths ", this.inputs.path);
87
87
  if (isToolbarFeatureEnabled('roomCreation') && this.inputs.path.length >= 3 && this.inputs.drawingMode == 'window') {
88
+ console.log("tubeline drawing mode ", this.inputs.drawingMode);
88
89
  const options = {
89
90
  drawingMode: this.inputs.drawingMode,
90
91
  targetIndex: this.inputs.targetIndex,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "architwin",
3
- "version": "1.15.2",
3
+ "version": "1.15.4",
4
4
  "description": "ArchiTwin Library for Matterport",
5
5
  "main": "./lib/architwin.js",
6
6
  "types": "./lib/architwin.d.ts",
@@ -2858,3 +2858,26 @@ span.at_room_name_text.toggle.selectable.selected {
2858
2858
  span.at_partition_name_text.toggle.selectable.selected {
2859
2859
  border: none !important;
2860
2860
  }
2861
+
2862
+
2863
+ .at-iot-tag-row-name {
2864
+ max-width: 100px;
2865
+ white-space: nowrap;
2866
+ overflow: hidden;
2867
+ text-overflow: ellipsis;
2868
+ }
2869
+
2870
+ .at-iot-tag-row-name span {
2871
+ display: block;
2872
+ white-space: nowrap;
2873
+ overflow: hidden;
2874
+ text-overflow: ellipsis;
2875
+ }
2876
+
2877
+ .at_linked_systems_options_contianer label {
2878
+ cursor: pointer;
2879
+ }
2880
+
2881
+ .at_linked_systems_options_contianer input {
2882
+ cursor: pointer;
2883
+ }