architwin 1.17.0 → 1.17.2

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.
@@ -30,14 +30,14 @@ import { toggleDrawPartitionButton, displayPartitionFormMode, setPartitionFormMo
30
30
  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";
31
31
  import { getBasepointCalibrateBpCoordinateValues, getBasepointCalibrateMpCoordinateValues, initBsepointCalibratePane, toggleBasepointCalibratePane } from "./components/toolbar/basepointCalibratePane";
32
32
  import { toggleGeneralMapOptions, initGeneralSelectedMap, getSelectedMapOption } from './components/toolbar/generalSettingsMenuPane';
33
- import { searchTagList, setSearchTagTerm, searchClearfield, getSearchTagTerm, sortTags, updateSelectedTagSortOption, resetSelectedTagSortOption, filterIotTagList, setTagPaneActive, isTagPaneActive, setCurrentTagPaneMode, currentTagPaneMode, selectedTagSortOption, tagVisibility, updateShowAllButton, saveTagVisibilityToStorage, initializeTagVisibility } from './components/toolbar/tagListPane';
33
+ import { searchTagList, setSearchTagTerm, searchClearfield, getSearchTagTerm, sortTags, updateSelectedTagSortOption, resetSelectedTagSortOption, filterIotTagList, setTagPaneActive, isTagPaneActive, setCurrentTagPaneMode, currentTagPaneMode, selectedTagSortOption, tagVisibility, updateShowAllButton, saveTagVisibilityToStorage, initializeTagVisibility, setIotCategoryFilterOptions } from './components/toolbar/tagListPane';
34
34
  import { renderUserRows } from "./components/toolbar/spaceUserListPane";
35
35
  import { handleRemoteViewResponsiveChanges, renderRemoteSpaceViewing } from "./components/toolbar/viewingRemoteSpace";
36
36
  import { PipeList } from "./components/toolbar/pipeListPane";
37
37
  import { PipeForm } from "./components/toolbar/pipeFormPane";
38
38
  // import { EditPipeForm, initPipeFormPane, pipeFormData, setPipeFormMode } from "./components/toolbar/pipeFormPane";
39
39
  // import { initPipeData } from "./components/toolbar/addPipePane";
40
- import { toggleIoTCategoryOptions, toggleIoTDevicesOptions, setSelectedIoTSystemRadio, clearIoTDropdowns, initIoTFormData, setIotCategoryOptions, getIotTagFormData, iotTagFormMode, selectedIotTag, clearIotFields, getIotCategoryOption } from './components/toolbar/tagIotFormPane';
40
+ import { toggleIoTCategoryOptions, toggleIoTDevicesOptions, clearIoTDropdowns, initIoTFormData, setIotCategoryOptions, getIotTagFormData, iotTagFormMode, selectedIotTag, clearIotFields, getIotCategoryOption, initIoTLinkedSystemOptions, toggleIoTLinkedSystemOptions } from './components/toolbar/tagIotFormPane';
41
41
  import { getTheseTagMessages, timedoutComment, unsendComment } from "./components/toolbar/tagMessagingPane";
42
42
  import { handleScreenShareResponsiveChanges, handleScreenShareAcceptRequest, handleScreenShareBackUserListPane, handleScreenShareEndSessionEvent, handleScreenShareUsersUpdated, renderScreenShareLeaveConfirmationModal } from "./components/toolbar/screenSharePane";
43
43
  const pipeList = new PipeList();
@@ -225,20 +225,11 @@ function toggleDisplayPane(targetId) {
225
225
  }
226
226
  if (paneId === 'at-tag-list-pane') {
227
227
  renderTagPaneContent();
228
- setIotCategoryOptions();
229
- // clearTagFilterDropdown()
228
+ setIotCategoryFilterOptions();
230
229
  const tags = getMpTags();
231
- // if(selectedCategoryFilterId || selectedSubCategoryFilterId){
232
- // const filteredTags = filterTagList(tags)
233
- // const sortedTags = sortTags(filteredTags, {by: 'label', order: 'asc'})
234
- // renderTags(sortedTags)
235
- // }else if (tags.length > 0) {
236
- // const sortedTags = sortTags(tags, {by: 'label', order: 'asc'})
237
- // renderTags(sortedTags,true)
238
- // }
239
230
  //Render the category dropdown elements if tagCategories is populated
240
231
  if (_tagCategories && _tagCategories.length > 0) {
241
- log.info("Has categories");
232
+ log.info("_tagCategories");
242
233
  renderCategoryDropdownOptions('at-category-filter-options', _tagCategories, 'at-category-filter-dropdown-toggle');
243
234
  }
244
235
  // for search
@@ -521,9 +512,8 @@ function setupIndividualEventListeners() {
521
512
  handleCloseCustomMinimap();
522
513
  handleCustomMapControls();
523
514
  handleCloseActiveMinimap();
524
- handleIoTCategoryDropdown();
515
+ handleIoTOptions();
525
516
  handleIoTDeviceDropdown();
526
- handleSelectedIoTLinkedSystem();
527
517
  handlePlaceIotTag();
528
518
  handleIotFormClose();
529
519
  handleIotFormSave();
@@ -3453,11 +3443,16 @@ function handleCloseActiveMinimap() {
3453
3443
  });
3454
3444
  }
3455
3445
  }
3456
- function handleIoTCategoryDropdown() {
3446
+ function handleIoTOptions() {
3457
3447
  const iotCateogryDropdown = document.getElementById('at-iot-cat-filter-dropdown');
3448
+ const iotLinkedSystemDropdown = document.getElementById('at-iot-linked-system-dropdown');
3458
3449
  if (iotCateogryDropdown) {
3459
3450
  toggleIoTCategoryOptions();
3460
3451
  }
3452
+ if (iotLinkedSystemDropdown) {
3453
+ initIoTLinkedSystemOptions();
3454
+ toggleIoTLinkedSystemOptions();
3455
+ }
3461
3456
  }
3462
3457
  function handleIoTDeviceDropdown() {
3463
3458
  const iotDeviceDropdown = document.getElementById('at-iot-cat-filter-dropdown');
@@ -3465,16 +3460,6 @@ function handleIoTDeviceDropdown() {
3465
3460
  toggleIoTDevicesOptions();
3466
3461
  }
3467
3462
  }
3468
- function handleSelectedIoTLinkedSystem() {
3469
- document.querySelectorAll('input[name="iot-link-system"]').forEach(input => {
3470
- input.addEventListener('change', (event) => {
3471
- const target = event.target;
3472
- if (target.value) {
3473
- setSelectedIoTSystemRadio(target.value);
3474
- }
3475
- });
3476
- });
3477
- }
3478
3463
  function handlePlaceIotTag() {
3479
3464
  log.info('handlePlaceIotTag()');
3480
3465
  const moveIotTag = document.getElementById('at-iot-move-btn');
@@ -3648,6 +3633,8 @@ function handleDisplayElements(id) {
3648
3633
  // hide dropdown sub/categories
3649
3634
  handleHideElement('at-custom-category-filter-dropdown-container');
3650
3635
  handleHideElement('at-custom-subcategory-filter-dropdown-container');
3636
+ handleHideElement('at-custom-category-filter-dropdown-container');
3637
+ handleDisplayElement('at-custom-iot-category-filter-dropdown-container');
3651
3638
  break;
3652
3639
  case 'at-expand-btn':
3653
3640
  // changep ane height
@@ -3662,6 +3649,8 @@ function handleDisplayElements(id) {
3662
3649
  `;
3663
3650
  handleDisplayElement('at-custom-category-filter-dropdown-container');
3664
3651
  handleDisplayElement('at-custom-subcategory-filter-dropdown-container');
3652
+ handleDisplayElement('at-custom-category-filter-dropdown-container');
3653
+ handleHideElement('at-custom-iot-category-filter-dropdown-container');
3665
3654
  break;
3666
3655
  default:
3667
3656
  break;
@@ -3705,13 +3694,17 @@ function handleIotFormSave() {
3705
3694
  if (iotSave) {
3706
3695
  iotSave.addEventListener('click', (event) => __awaiter(this, void 0, void 0, function* () {
3707
3696
  var _a, _b;
3708
- log.info('@caroline saving iot');
3697
+ log.info('Saving iot');
3709
3698
  let iotTagFormPayload = getIotTagFormData();
3710
3699
  const selectedCat = getIotCategoryOption();
3711
3700
  log.info('@caroline iotTagFormPayload: ', iotTagFormPayload, iotTagFormMode);
3712
3701
  iotSave.classList.add('at_disabled');
3713
3702
  if (iotTagFormPayload && iotTagFormMode == "ADD" /* FORM_MODE.ADD */) {
3714
3703
  log.info('@caroline saving IOT, Add Mode');
3704
+ if (!currentTag) {
3705
+ notyf.error(`${i18n.t('NoTagSave')}`);
3706
+ iotSave.classList.remove('at_disabled');
3707
+ }
3715
3708
  currentTag.json_data.label = iotTagFormPayload.name;
3716
3709
  log.info('@caroline current Tag: ', currentTag);
3717
3710
  if (!currentTag.iot_tag) {
@@ -3925,9 +3918,10 @@ function handleWindowVisibility(visibilityBtn, updateStateDB, fromParentVisibili
3925
3918
  }
3926
3919
  else {
3927
3920
  const polygonJson = JSON.parse(thisPartition.polygon_json);
3928
- const wall = polygonJson.walls.find(item => item.uuid === wallId) || null;
3921
+ const wall = polygonJson.walls.find(w => w.uuid === wallId) || null;
3929
3922
  const windows = (wall === null || wall === void 0 ? void 0 : wall.windows) || null;
3930
- windows === null || windows === void 0 ? void 0 : windows.forEach(w => w.options.is_visible = isVisible);
3923
+ const targetWindow = windows === null || windows === void 0 ? void 0 : windows.find(w => w.index.toString() === windowIndex);
3924
+ targetWindow.options.is_visible = isVisible;
3931
3925
  const payload = {
3932
3926
  uuid: thisPartition.uuid,
3933
3927
  space_uuid: thisPartition.space_uuid,
@@ -14,6 +14,7 @@ import { SPACE_EVENTS } from '../types';
14
14
  import { dispatchSpaceEvent } from '../architwin';
15
15
  import log from 'loglevel';
16
16
  import { toggleBasepointCalibratePane } from './components/toolbar/basepointCalibratePane';
17
+ import { setSelectedIoTCategoryFilter } from './components/toolbar/tagListPane';
17
18
  // let menuBar:HTMLElement,
18
19
  // actionBar:HTMLElement,
19
20
  // objectListPane:HTMLElement,
@@ -76,6 +77,7 @@ function initToolbarUI(payload) {
76
77
  //@ts-expect-error
77
78
  if (event.target.id === 'at-tag-iot-btn') {
78
79
  handleDisplayElements('at-tag-iot-btn');
80
+ setSelectedIoTCategoryFilter({ uuid: '', name: 'NoSelection' });
79
81
  }
80
82
  //@ts-ignore
81
83
  yield toggleDisplayPane(event.target.id);
package/lib/types.d.ts CHANGED
@@ -61,6 +61,15 @@ export interface ITagCategory {
61
61
  };
62
62
  subcategories: Array<ITagCategory>;
63
63
  }
64
+ export interface IotCategoryType {
65
+ name: string;
66
+ uuid: string;
67
+ json_data?: {
68
+ icon: string;
69
+ iconURL: string;
70
+ iconBase64: string;
71
+ };
72
+ }
64
73
  export interface ITagColor {
65
74
  name: COLOR;
66
75
  rgb: {
@@ -769,6 +778,7 @@ export declare enum SPACE_EVENTS {
769
778
  SPACE_METADATA_RETRIEVED = "SPACE_METADATA_RETRIEVED",
770
779
  GET_IOT_CATEGORIES = "GET_IOT_CATEGORIES",
771
780
  GET_IOT_DEVICES = "GET_IOT_DEVICES",
781
+ GET_IOT_LINKED_SYSTEM_OPTIONS = "GET_IOT_LINKED_SYSTEM_OPTIONS",
772
782
  IOT_TAG_SAVED = "IOT_TAG_SAVED",
773
783
  TAG_SANDBOX_REGISTERED = "TAG_SANDBOX_REGISTERED",
774
784
  GET_IOT_TAG_ICON = "GET_IOT_TAG_ICON",
@@ -1444,7 +1454,8 @@ export declare enum MAP_OPTIONS {
1444
1454
  export declare enum IOT_LINKED_SYSTEMS {
1445
1455
  BEMAC = "BEMAC",
1446
1456
  HANASYS = "HANASYS",
1447
- URL_LINK = "URLLink"
1457
+ URL_LINK = "URLLink",
1458
+ I_MTEC = "i-MTEC"
1448
1459
  }
1449
1460
  export interface ITagIOTCategory {
1450
1461
  name: string;
package/lib/types.js CHANGED
@@ -112,6 +112,7 @@ export var SPACE_EVENTS;
112
112
  SPACE_EVENTS["SPACE_METADATA_RETRIEVED"] = "SPACE_METADATA_RETRIEVED";
113
113
  SPACE_EVENTS["GET_IOT_CATEGORIES"] = "GET_IOT_CATEGORIES";
114
114
  SPACE_EVENTS["GET_IOT_DEVICES"] = "GET_IOT_DEVICES";
115
+ SPACE_EVENTS["GET_IOT_LINKED_SYSTEM_OPTIONS"] = "GET_IOT_LINKED_SYSTEM_OPTIONS";
115
116
  SPACE_EVENTS["IOT_TAG_SAVED"] = "IOT_TAG_SAVED";
116
117
  SPACE_EVENTS["TAG_SANDBOX_REGISTERED"] = "TAG_SANDBOX_REGISTERED";
117
118
  SPACE_EVENTS["GET_IOT_TAG_ICON"] = "GET_IOT_TAG_ICON";
@@ -198,6 +199,7 @@ export var IOT_LINKED_SYSTEMS;
198
199
  IOT_LINKED_SYSTEMS["BEMAC"] = "BEMAC";
199
200
  IOT_LINKED_SYSTEMS["HANASYS"] = "HANASYS";
200
201
  IOT_LINKED_SYSTEMS["URL_LINK"] = "URLLink";
202
+ IOT_LINKED_SYSTEMS["I_MTEC"] = "i-MTEC";
201
203
  })(IOT_LINKED_SYSTEMS || (IOT_LINKED_SYSTEMS = {}));
202
204
  export var TAG_TYPE;
203
205
  (function (TAG_TYPE) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "architwin",
3
- "version": "1.17.0",
3
+ "version": "1.17.2",
4
4
  "description": "ArchiTwin Library for Matterport",
5
5
  "main": "./lib/architwin.js",
6
6
  "types": "./lib/architwin.d.ts",
@@ -2734,6 +2734,33 @@ li.at_partition_wall_row_item {
2734
2734
  box-sizing: border-box;
2735
2735
  }
2736
2736
 
2737
+ .at_listbox {
2738
+ width: 230px;
2739
+ background-color: var(--bg-secondary);
2740
+ }
2741
+
2742
+ .at_listbox_options {
2743
+ list-style: none;
2744
+ margin: 0;
2745
+ padding: 0;
2746
+ max-height: 160px;
2747
+ overflow-y: auto;
2748
+ }
2749
+
2750
+ .at_listbox_option {
2751
+ padding: 8px 12px;
2752
+ cursor: pointer;
2753
+ }
2754
+
2755
+ .at_listbox_option:hover {
2756
+ background-color: var(--bg-accent);
2757
+ }
2758
+
2759
+ .at_listbox_option.is-selected {
2760
+ background-color: var(--bg-accent);
2761
+ font-weight: 600;
2762
+ }
2763
+
2737
2764
  /* FLEXIBLE MODAL CLASSES */
2738
2765
 
2739
2766
  .at_flexible_modal-overlay {
@@ -2953,4 +2980,11 @@ span.at_partition_name_text.toggle.selectable.selected {
2953
2980
 
2954
2981
  .at_linked_systems_options_contianer input {
2955
2982
  cursor: pointer;
2983
+ }
2984
+
2985
+ .at_name span {
2986
+ flex: 1;
2987
+ min-width: 0;
2988
+ white-space: normal !important;
2989
+ word-break: break-all !important;
2956
2990
  }