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
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { batchAddEventListenerByClassName, batchAddEventListenerById, setActiveToolbarItem, toggleDisplayPane, toggleActionBar, setupIndividualEventListeners, setupSpaceEventSubscriptions, handleShowMinimap, handleRenderMeetingUI } from './events';
10
+ import { batchAddEventListenerByClassName, batchAddEventListenerById, setActiveToolbarItem, toggleDisplayPane, toggleActionBar, setupIndividualEventListeners, setupSpaceEventSubscriptions, handleShowMinimap, handleRenderMeetingUI, handleDisplayElements } from './events';
11
11
  import '../../static/atwinui.css';
12
12
  import { renderToolbarUI, setActiveMenu, setActiveActionBtn, setActiveThemeCard, toggleModelControl, toggleModal, setModalAction, toggleActionBarButtons } from './components/toolbar';
13
13
  import { SPACE_EVENTS } from '../types';
@@ -69,6 +69,14 @@ function initToolbarUI(payload) {
69
69
  if (event.target.id !== 'at-settings-btn') {
70
70
  toggleBasepointCalibratePane(false);
71
71
  }
72
+ //@ts-expect-error
73
+ if (event.target.id === 'at-expand-btn') {
74
+ handleDisplayElements('at-expand-btn');
75
+ }
76
+ //@ts-expect-error
77
+ if (event.target.id === 'at-tag-iot-btn') {
78
+ handleDisplayElements('at-tag-iot-btn');
79
+ }
72
80
  //@ts-ignore
73
81
  yield toggleDisplayPane(event.target.id);
74
82
  log.info("setActiveMenu, batchAddEventListenerByClassName");
package/lib/color.js CHANGED
@@ -21,6 +21,10 @@ export const colors = [
21
21
  name: "YELLOW_GREEN" /* TAG_COLOR.YELLOW_GREEN */,
22
22
  rgb: { r: 0.68, g: 1, b: 0.18 },
23
23
  },
24
+ {
25
+ name: "YELLO_ORANGE" /* TAG_COLOR.YELLOW_ORANGE */,
26
+ rgb: useHexToRgb("ffae42"),
27
+ },
24
28
  {
25
29
  name: "GREEN" /* TAG_COLOR.GREEN */,
26
30
  rgb: { r: 0, g: 0.5, b: 0 },
@@ -29,6 +33,10 @@ export const colors = [
29
33
  name: "LIGHT_BLUE" /* TAG_COLOR.LIGHT_BLUE */,
30
34
  rgb: { r: 0.65, g: 0.9, b: 1 },
31
35
  },
36
+ {
37
+ name: "SOFT_ROYAL_BLUE" /* TAG_COLOR.SOFT_ROYAL_BLUE */,
38
+ rgb: { r: 0.3, g: 0.5, b: 1.0 },
39
+ },
32
40
  {
33
41
  name: "BLUE" /* TAG_COLOR.BLUE */,
34
42
  rgb: { r: 0, g: 0, b: 1 },
@@ -104,10 +112,13 @@ export const colors = [
104
112
  ];
105
113
  export function getTagColorImageSrc(target) {
106
114
  let basePath = '../architwin/static';
107
- if ('bundlePath' in _mpConfig) {
115
+ if ('bundlePath' in _mpConfig && !window.location.href.includes('localhost')) {
108
116
  console.log("Custom bundlePath detected. Using alternate asset link");
109
117
  basePath = 'https://cdn.jsdelivr.net/npm/architwin@latest/static';
110
118
  }
119
+ else {
120
+ basePath = "../../node_modules/architwin/static";
121
+ }
111
122
  if (target && typeof target !== 'string') {
112
123
  const res = colors.find(colors => JSON.stringify(colors.rgb) === JSON.stringify(target));
113
124
  if (res) {
@@ -1159,6 +1159,8 @@ export class BufferGeometry {
1159
1159
  const outlineMesh = new THREE.LineSegments(outlineGeometry, outlineMaterial);
1160
1160
  outlineMesh.name = windowMesh.name;
1161
1161
  windowMesh.add(outlineMesh);
1162
+ windowMesh.visible = windows[i].options ? windows[i].options.is_visible : true;
1163
+ outlineMesh.visible = windows[i].options ? windows[i].options.is_visible : true;
1162
1164
  // Add window center label if material is defined
1163
1165
  if (windows[i].material || windows[i].name) {
1164
1166
  try {
@@ -1209,6 +1211,7 @@ export class BufferGeometry {
1209
1211
  const labelOffset = 0.01;
1210
1212
  windowCenterLabel.position.copy(center3D).addScaledVector(normal.clone().negate(), labelOffset);
1211
1213
  windowCenterLabel.name = windowMesh.name;
1214
+ windowCenterLabel.visible = windows[i].options ? windows[i].options.is_visible : true;
1212
1215
  windowCenterLabel.lookAt(windowCenterLabel.position.clone().add(normal.clone().negate()));
1213
1216
  //windowCenterLabel.name = windows[i].uuid ? `${windows[i].uuid}_windowLabel` : `windowLabel-${i}`;
1214
1217
  this.groupedMesh.add(windowCenterLabel);
package/lib/types.d.ts CHANGED
@@ -29,6 +29,19 @@ export interface ITag {
29
29
  category_uuid?: string;
30
30
  uuid?: string;
31
31
  media_url?: string;
32
+ tag_type?: TAG_TYPE;
33
+ sandboxId?: string;
34
+ iot_tag?: IoTTagDetails;
35
+ created_on?: string;
36
+ }
37
+ export interface IoTTagDetails {
38
+ linked_system?: string;
39
+ serial_number?: string;
40
+ manufacturer_site?: string;
41
+ system_link?: string;
42
+ iot_category?: string;
43
+ linked_devices?: DeviceInfo[];
44
+ model_name?: string;
32
45
  created_on?: string;
33
46
  }
34
47
  export interface ITagCategory {
@@ -752,6 +765,12 @@ export declare enum SPACE_EVENTS {
752
765
  CUSTOM_SWEEP_OFFSETY_UPDATED = "CUSTOM_SWEEP_OFFSETY_UPDATED",
753
766
  CUSTOM_MAP_SETTINGS_UPDATED = "CUSTOM_MAP_SETTINGS_UPDATED",
754
767
  SPACE_METADATA_RETRIEVED = "SPACE_METADATA_RETRIEVED",
768
+ GET_IOT_CATEGORIES = "GET_IOT_CATEGORIES",
769
+ GET_IOT_DEVICES = "GET_IOT_DEVICES",
770
+ IOT_TAG_SAVED = "IOT_TAG_SAVED",
771
+ TAG_SANDBOX_REGISTERED = "TAG_SANDBOX_REGISTERED",
772
+ GET_IOT_TAG_ICON = "GET_IOT_TAG_ICON",
773
+ GET_IOT_CAT_ICON = "GET_IOT_CAT_ICON",
755
774
  SCREEN_VIEWING_LEFT = "SCREEN_VIEWING_LEFT",
756
775
  POINTER_INTERSECTION_DATA = "POINTER_INTERSECTION_DATA",
757
776
  POINTER_CLICK = "POINTER_CLICK",
@@ -793,6 +812,7 @@ export declare const enum TAG_COLOR {
793
812
  YELLOW_GREEN = "YELLOW_GREEN",
794
813
  GREEN = "GREEN",
795
814
  LIGHT_BLUE = "LIGHT_BLUE",
815
+ SOFT_ROYAL_BLUE = "SOFT_ROYAL_BLUE",
796
816
  BLUE = "BLUE",
797
817
  DARK_BLUE = "DARK_BLUE",
798
818
  PURPLE = "PURPLE",
@@ -810,7 +830,8 @@ export declare const enum TAG_COLOR {
810
830
  LIGHT_ORANGE = "LIGHT_ORANGE",
811
831
  RED_ORANGE = "RED_ORANGE",
812
832
  LIGHT_GREY = "LIGHT_GREY",
813
- GREY = "GREY"
833
+ GREY = "GREY",
834
+ YELLOW_ORANGE = "YELLO_ORANGE"
814
835
  }
815
836
  export declare enum MEETING_SIDEBAR {
816
837
  PREMEETING = "PREMEETING",
@@ -944,6 +965,10 @@ export interface IToolbarConfig {
944
965
  roomCreation?: boolean;
945
966
  bim?: boolean;
946
967
  generalSetting?: boolean;
968
+ iot?: {
969
+ visible?: boolean;
970
+ showIoTTags?: boolean;
971
+ };
947
972
  spaceScreenSharing?: boolean;
948
973
  };
949
974
  themeConfig?: IThemeConfig;
@@ -1289,6 +1314,16 @@ export interface SpaceMetadata {
1289
1314
  custom_floor_data?: CustomMapFloorData[] | null;
1290
1315
  };
1291
1316
  };
1317
+ iot_tag?: {
1318
+ linked_system: string;
1319
+ serial_number: string;
1320
+ manufacturer_site: string;
1321
+ system_link?: string;
1322
+ iot_category: string;
1323
+ model_name: string;
1324
+ linked_devices: [] | null;
1325
+ tag_type: TAG_TYPE.IOT;
1326
+ };
1292
1327
  }
1293
1328
  export interface CustomMapFloorData {
1294
1329
  floor_sequence: number;
@@ -1357,6 +1392,16 @@ export interface SpaceMetadata {
1357
1392
  custom_floor_data?: CustomMapFloorData[] | null;
1358
1393
  };
1359
1394
  };
1395
+ iot_tag?: {
1396
+ linked_system: string;
1397
+ serial_number: string;
1398
+ manufacturer_site: string;
1399
+ system_link?: string;
1400
+ iot_category: string;
1401
+ model_name: string;
1402
+ linked_devices: [] | null;
1403
+ tag_type: TAG_TYPE.IOT;
1404
+ };
1360
1405
  }
1361
1406
  export interface PathConfig {
1362
1407
  lineType: string;
@@ -1394,6 +1439,35 @@ export declare enum MAP_OPTIONS {
1394
1439
  DEFAULT_MAP = "Default Minimap",
1395
1440
  CUSTOM_MAP = "Custom Minimap"
1396
1441
  }
1442
+ export declare enum IOT_LINKED_SYSTEMS {
1443
+ BEMAC = "BEMAC",
1444
+ HANASYS = "HANASYS",
1445
+ URL_LINK = "URLLink"
1446
+ }
1447
+ export interface ITagIOTCategory {
1448
+ name: string;
1449
+ uuid: string;
1450
+ json_data?: {
1451
+ icon: string;
1452
+ iconURL: string;
1453
+ iconBase64: string;
1454
+ };
1455
+ }
1456
+ export declare enum TAG_TYPE {
1457
+ MP = "MP",
1458
+ IOT = "IoT"
1459
+ }
1460
+ export interface DeviceInfo {
1461
+ id?: string;
1462
+ ship_id?: string;
1463
+ iot_system?: string;
1464
+ name: string;
1465
+ type?: string;
1466
+ status?: 'online' | 'offline' | 'stale';
1467
+ quality?: number;
1468
+ last_update?: string;
1469
+ data?: Record<string, any>;
1470
+ }
1397
1471
  export declare enum ONLINE_STATUS {
1398
1472
  ONLINE = "ONLINE",
1399
1473
  OFFLINE = "OFFLINE",
package/lib/types.js CHANGED
@@ -109,6 +109,12 @@ export var SPACE_EVENTS;
109
109
  SPACE_EVENTS["CUSTOM_SWEEP_OFFSETY_UPDATED"] = "CUSTOM_SWEEP_OFFSETY_UPDATED";
110
110
  SPACE_EVENTS["CUSTOM_MAP_SETTINGS_UPDATED"] = "CUSTOM_MAP_SETTINGS_UPDATED";
111
111
  SPACE_EVENTS["SPACE_METADATA_RETRIEVED"] = "SPACE_METADATA_RETRIEVED";
112
+ SPACE_EVENTS["GET_IOT_CATEGORIES"] = "GET_IOT_CATEGORIES";
113
+ SPACE_EVENTS["GET_IOT_DEVICES"] = "GET_IOT_DEVICES";
114
+ SPACE_EVENTS["IOT_TAG_SAVED"] = "IOT_TAG_SAVED";
115
+ SPACE_EVENTS["TAG_SANDBOX_REGISTERED"] = "TAG_SANDBOX_REGISTERED";
116
+ SPACE_EVENTS["GET_IOT_TAG_ICON"] = "GET_IOT_TAG_ICON";
117
+ SPACE_EVENTS["GET_IOT_CAT_ICON"] = "GET_IOT_CAT_ICON";
112
118
  SPACE_EVENTS["SCREEN_VIEWING_LEFT"] = "SCREEN_VIEWING_LEFT";
113
119
  SPACE_EVENTS["POINTER_INTERSECTION_DATA"] = "POINTER_INTERSECTION_DATA";
114
120
  SPACE_EVENTS["POINTER_CLICK"] = "POINTER_CLICK";
@@ -186,6 +192,17 @@ export var MAP_OPTIONS;
186
192
  MAP_OPTIONS["DEFAULT_MAP"] = "Default Minimap";
187
193
  MAP_OPTIONS["CUSTOM_MAP"] = "Custom Minimap";
188
194
  })(MAP_OPTIONS || (MAP_OPTIONS = {}));
195
+ export var IOT_LINKED_SYSTEMS;
196
+ (function (IOT_LINKED_SYSTEMS) {
197
+ IOT_LINKED_SYSTEMS["BEMAC"] = "BEMAC";
198
+ IOT_LINKED_SYSTEMS["HANASYS"] = "HANASYS";
199
+ IOT_LINKED_SYSTEMS["URL_LINK"] = "URLLink";
200
+ })(IOT_LINKED_SYSTEMS || (IOT_LINKED_SYSTEMS = {}));
201
+ export var TAG_TYPE;
202
+ (function (TAG_TYPE) {
203
+ TAG_TYPE["MP"] = "MP";
204
+ TAG_TYPE["IOT"] = "IoT";
205
+ })(TAG_TYPE || (TAG_TYPE = {}));
189
206
  export var ONLINE_STATUS;
190
207
  (function (ONLINE_STATUS) {
191
208
  ONLINE_STATUS["ONLINE"] = "ONLINE";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "architwin",
3
- "version": "1.14.15",
3
+ "version": "1.15.0",
4
4
  "description": "ArchiTwin Library for Matterport",
5
5
  "main": "./lib/architwin.js",
6
6
  "types": "./lib/architwin.d.ts",
@@ -413,6 +413,19 @@
413
413
  text-align: center;
414
414
  }
415
415
 
416
+ /* Smaller version for inline use */
417
+ .at_button--small {
418
+ font-size: 0.8em;
419
+ padding: 2px 0.6em;
420
+ line-height: 1.2em;
421
+ max-height: 1.8em;
422
+ display: inline-flex;
423
+ align-items: center;
424
+ justify-content: center;
425
+ border-radius: 4px;
426
+
427
+ }
428
+
416
429
  .at_button_icon {
417
430
  padding: 2px 8px;
418
431
  cursor: pointer;
@@ -470,7 +483,23 @@
470
483
  position: absolute;
471
484
  z-index: 99;
472
485
  top: 10px;
473
- right: 55px;
486
+ right: 75px;
487
+ }
488
+
489
+ .at_button_search{
490
+ cursor: pointer;
491
+ position: absolute;
492
+ z-index: 99;
493
+ top: 10px;
494
+ right: 12px;
495
+ }
496
+
497
+ .at_search_icon{
498
+ cursor: pointer;
499
+ position: absolute;
500
+ z-index: 98;
501
+ top: 10px;
502
+ right: 12px;
474
503
  }
475
504
 
476
505
  .at_justify_start {
@@ -740,8 +769,8 @@
740
769
  margin-top: 1px;
741
770
  margin-left: 4px;
742
771
  height: 2.45rem;
743
- width: 9rem;
744
- /* width: 11.75rem */
772
+ /* width: 9rem; */
773
+ width: 13rem
745
774
  }
746
775
 
747
776
  .at_field_search_input:focus {
@@ -1335,7 +1364,7 @@
1335
1364
  background-color: black;
1336
1365
  border: solid white 2px;
1337
1366
  font-size: smaller;
1338
- padding: 6px 0.8em 4px;
1367
+ padding: 4px 0.8em 4px;
1339
1368
  border-radius: 8px;
1340
1369
  min-height: 31.3px;
1341
1370
  align-items: center;
@@ -2163,7 +2192,6 @@ dialog#at-screen-share-request-modal::backdrop {
2163
2192
  background-color: var(--bg-accent) !important;
2164
2193
  }
2165
2194
 
2166
-
2167
2195
  /* Generic Elements */
2168
2196
 
2169
2197
  .at_section {
@@ -2420,7 +2448,40 @@ dialog#at-screen-share-request-modal::backdrop {
2420
2448
  }
2421
2449
 
2422
2450
  .at_partition_floor_row_item {
2423
- cursor: pointer;
2451
+ cursor: pointer;
2452
+ }
2453
+
2454
+ .at_section_title {
2455
+ display: var(--container-display);
2456
+ background-color: hsla(0,0%,19%,1);
2457
+ border-radius: 4px;
2458
+ align-items: center;
2459
+ justify-content: space-between;
2460
+ margin-bottom: 10px;
2461
+ font-size: 16px;
2462
+ font-weight: normal;
2463
+ font-family: Arial, sans-serif;
2464
+ padding-left: 2px;
2465
+ padding-right: 18px;
2466
+ }
2467
+
2468
+
2469
+ /* IOT */
2470
+
2471
+ .at_iot_item_container {
2472
+ display: var(--container-display);
2473
+ flex-direction: column;
2474
+ gap: 4px;
2475
+ margin-bottom: 0.5rem;
2476
+ }
2477
+
2478
+ .at_iot_list_container {
2479
+ display: var(--container-display);
2480
+ border-radius: var(--border-radius);
2481
+ background-color: black;
2482
+ flex-direction: column;
2483
+ padding: 8px 6px 8px 6px;
2484
+ min-height: 22rem;
2424
2485
  }
2425
2486
 
2426
2487
  .at_partition_child_expand_icon {
@@ -2442,4 +2503,24 @@ li.at_partition_wall_row_item {
2442
2503
 
2443
2504
  .at_wall_window_row_item.selected {
2444
2505
  padding-left: 5px;
2445
- }
2506
+ }
2507
+
2508
+ .at_save_button {
2509
+ display: inline-flex;
2510
+ align-items: center;
2511
+ justify-content: center;
2512
+ cursor: pointer;
2513
+ height: 20px; /* match input height */
2514
+ padding: 0 6px; /* enough for 保存 */
2515
+ font-size: 10px;
2516
+ line-height: 1; /* prevent vertical text overflow */
2517
+ white-space: nowrap; /* keep 保存 on one line */
2518
+ color: white;
2519
+ border: 1px solid white;
2520
+ border-radius: 4px;
2521
+ background: none;
2522
+ font-family: Arial, sans-serif;
2523
+ transition: all 0.2s ease;
2524
+ margin-left: 4px;
2525
+ box-sizing: border-box;
2526
+ }
Binary file