architwin 1.16.9 → 1.17.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.
@@ -12,13 +12,15 @@ import { batchAddEventListenerByClassName, handleDeletePartition, handlePartitio
12
12
  import i18n from "../i18n";
13
13
  import { getCurrentPolygonData, handlePartitionRowEditBtnClickEvent, handlePartitionWallEditBtn, setCurrentEditWindowIndex, setDrawConfig, setDrawingMode, setIsEditWindow, setPartitionFormMode } from "./roomFormPane";
14
14
  import { SPACE_EVENTS } from "../../../../types";
15
- import { _3DXObjects, dispatchSpaceEvent, enableVerticeControls, getChildrenOfModel, goToModel, goToPosition, renderPolygon, setSelectedObject } from "../../../../architwin";
15
+ import { _3DXObjects, dispatchSpaceEvent, enableVerticeControls, getChildrenOfModel, getIsPolygonVisible, goToModel, goToPosition, renderPolygon, setSelectedObject } from "../../../../architwin";
16
16
  import log from 'loglevel';
17
17
  import { getShortcutTooltipHTML } from "../static/common";
18
+ import { Notyf } from "notyf";
18
19
  let roomDataArray = [];
19
20
  let currentEditRoomData = null;
20
21
  let currentSelectedPartitionId = null;
21
22
  let currentFilteredDisplay = "All";
23
+ let notify = new Notyf({ position: { x: 'left', y: 'bottom' } });
22
24
  /**
23
25
  * Renders and returns the HTML element for the room tree pane.
24
26
  * @returns {HTMLElement} The HTML element representing the room tree pane.
@@ -341,39 +343,51 @@ function toggleSelectedPartition() {
341
343
  toggleDisplayPane(event.target.id);
342
344
  }));
343
345
  batchAddEventListenerByClassName('at_room_visible_btn', (event) => __awaiter(this, void 0, void 0, function* () {
344
- toggleRoomTreeClickDisability(true);
345
- log.info('Event', event);
346
- const target = event.target;
347
- // Prevent event from propagating up to parent elements
348
- event.stopPropagation();
349
- // Highlight selected item
350
- highlightSelectedItem(event);
351
- // Handle visibility logic
352
- handlePartitionVisibility(target.id);
346
+ const isPolygonVisible = getIsPolygonVisible();
347
+ if (isPolygonVisible) {
348
+ toggleRoomTreeClickDisability(true);
349
+ log.info('Event', event);
350
+ const target = event.target;
351
+ // Prevent event from propagating up to parent elements
352
+ event.stopPropagation();
353
+ // Highlight selected item
354
+ highlightSelectedItem(event);
355
+ // Handle visibility logic
356
+ handlePartitionVisibility(target.id);
357
+ }
358
+ else {
359
+ notify.error(`${i18n.t('PleaseOnPolygonVisibility')}`);
360
+ }
353
361
  }));
354
362
  batchAddEventListenerByClassName('at_child_visible_btn', (event) => __awaiter(this, void 0, void 0, function* () {
355
363
  var _a;
356
- toggleRoomTreeClickDisability(true);
357
- const target = event.currentTarget;
358
- const li = target.closest('li');
359
- if ((_a = li === null || li === void 0 ? void 0 : li.getAttribute('id')) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes('window')) {
360
- event.stopPropagation();
361
- handleWindowVisibility(target, true);
364
+ const isPolygonVisible = getIsPolygonVisible();
365
+ if (isPolygonVisible) {
366
+ toggleRoomTreeClickDisability(true);
367
+ const target = event.currentTarget;
368
+ const li = target.closest('li');
369
+ if ((_a = li === null || li === void 0 ? void 0 : li.getAttribute('id')) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes('window')) {
370
+ event.stopPropagation();
371
+ handleWindowVisibility(target, true);
372
+ }
373
+ else {
374
+ const wallId = target.getAttribute('polygon-item-id');
375
+ const windowItems = document.querySelectorAll(`li.at_window_row_item[wall-id="${wallId}"]`);
376
+ yield new Promise(resolve => setTimeout(resolve, 1));
377
+ yield new Promise(resolve => requestAnimationFrame(resolve));
378
+ const parentVisibleState = yield handlePolygonVisibility(target.id);
379
+ if (windowItems && windowItems.length > 0) {
380
+ windowItems.forEach((windowLi) => {
381
+ const visibilityBtn = windowLi.querySelector('.at_child_visible_btn');
382
+ if (visibilityBtn) {
383
+ handleWindowVisibility(visibilityBtn, false, parentVisibleState);
384
+ }
385
+ });
386
+ }
387
+ }
362
388
  }
363
389
  else {
364
- const wallId = target.getAttribute('polygon-item-id');
365
- const windowItems = document.querySelectorAll(`li.at_window_row_item[wall-id="${wallId}"]`);
366
- yield new Promise(resolve => setTimeout(resolve, 1));
367
- yield new Promise(resolve => requestAnimationFrame(resolve));
368
- const parentVisibleState = yield handlePolygonVisibility(target.id);
369
- if (windowItems && windowItems.length > 0) {
370
- windowItems.forEach((windowLi) => {
371
- const visibilityBtn = windowLi.querySelector('.at_child_visible_btn');
372
- if (visibilityBtn) {
373
- handleWindowVisibility(visibilityBtn, false, parentVisibleState);
374
- }
375
- });
376
- }
390
+ notify.error(`${i18n.t('PleaseOnPolygonVisibility')}`);
377
391
  }
378
392
  }));
379
393
  batchAddEventListenerByClassName('at_partition_wall_row_item', (event) => __awaiter(this, void 0, void 0, function* () {
@@ -1801,8 +1801,7 @@ function handleSetLibraryModelsView() {
1801
1801
  assets = yield getLibrary(true);
1802
1802
  }
1803
1803
  //const spaceObjects = _3DXObjects.map(obj => obj.object.object_data)
1804
- const limitedAssets = assets.slice(0, 10);
1805
- renderLibraryCards(limitedAssets);
1804
+ renderLibraryCards(assets);
1806
1805
  }));
1807
1806
  libraryModelsListViewBtn.addEventListener('click', () => __awaiter(this, void 0, void 0, function* () {
1808
1807
  libraryModelsListViewBtn.classList.add('at_ghost_active');
@@ -1818,8 +1817,7 @@ function handleSetLibraryModelsView() {
1818
1817
  assets = yield getLibrary(true);
1819
1818
  }
1820
1819
  //const spaceObjects = _3DXObjects.map(obj => obj.object.object_data)
1821
- const limitedAssets = assets.slice(0, 10);
1822
- renderLibraryList(limitedAssets);
1820
+ renderLibraryList(assets);
1823
1821
  }));
1824
1822
  }
1825
1823
  function handleCopyTagLink(link) {
@@ -2124,7 +2122,7 @@ function handlePartitionDisplay() {
2124
2122
  .filter(obj => obj.type === 'POLYGON')
2125
2123
  .forEach(partition => {
2126
2124
  getChildrenOfModel(partition.component)
2127
- .filter(item => item.name.includes("wall"))
2125
+ .filter(item => item.name.includes("wall") || item.name.includes("window"))
2128
2126
  .forEach(item => toggleWallVisibility(partition.component, item.name, visible));
2129
2127
  });
2130
2128
  };
package/lib/superviz.d.ts CHANGED
@@ -11,15 +11,15 @@ declare function createMeeting(spaceId?: string, hostName?: string, title?: stri
11
11
  guest: string;
12
12
  meeting_id: string;
13
13
  }>;
14
- declare function getMeeting(meetingId: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
15
- declare function getSpaceMeetings(spaceId: number): Promise<import("axios").AxiosResponse<any, any, {}>>;
14
+ declare function getMeeting(meetingId: string): Promise<import("axios").AxiosResponse<any, any>>;
15
+ declare function getSpaceMeetings(spaceId: number): Promise<import("axios").AxiosResponse<any, any>>;
16
16
  declare function startMeeting(meetingUrl: string, meetingPassword?: string, meetingConfig?: MeetingConfig): Promise<void>;
17
17
  declare function getMeetingParticipants(): IMpParticipant[];
18
18
  declare function stopMeeting(): Promise<void>;
19
19
  declare function isMeetingExists(meetingId: string): Promise<boolean>;
20
20
  declare function isMeetingActive(meetingId: string): Promise<boolean>;
21
- declare function updateMeetingTitle(meetingId: any, meetingTitle: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
22
- declare function updateMeetingStart(meetingId: any, meetingStart: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
23
- declare function updateMeetingSpace(meetingId: any, spaceId: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
24
- declare function updateMeetingStatus(meetingId: any, meetingStatus: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
21
+ declare function updateMeetingTitle(meetingId: any, meetingTitle: any): Promise<import("axios").AxiosResponse<any, any>>;
22
+ declare function updateMeetingStart(meetingId: any, meetingStart: any): Promise<import("axios").AxiosResponse<any, any>>;
23
+ declare function updateMeetingSpace(meetingId: any, spaceId: any): Promise<import("axios").AxiosResponse<any, any>>;
24
+ declare function updateMeetingStatus(meetingId: any, meetingStatus: any): Promise<import("axios").AxiosResponse<any, any>>;
25
25
  export { isMeetingInitialized, getMeetingParticipants, createMeeting, startMeeting, stopMeeting, generateMeetingURL, updateMeetingTitle, updateMeetingStart, updateMeetingStatus, updateMeetingSpace, getMeeting, getSpaceMeetings, isMeetingExists, isMeetingActive, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "architwin",
3
- "version": "1.16.9",
3
+ "version": "1.17.0",
4
4
  "description": "ArchiTwin Library for Matterport",
5
5
  "main": "./lib/architwin.js",
6
6
  "types": "./lib/architwin.d.ts",
package/static/map.css CHANGED
@@ -173,7 +173,7 @@ display: inline-block;
173
173
  /* bottom: calc(var(--position-bottom) + 48vh);
174
174
  right: 0; */
175
175
  top: calc(var(--position-top) + 0.5rem);
176
- right: calc(var(--position-right) + 0.5rem);
176
+ right: calc(var(--position-right) + 4.5rem);
177
177
  }
178
178
 
179
179
  .at_overlay_left_minimap.bottomLeft {
Binary file