architwin 1.12.4 → 1.13.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 (44) hide show
  1. package/CORE_FEATURES.md +35 -0
  2. package/ONBOARDING.md +115 -0
  3. package/lib/architwin.d.ts +98 -6
  4. package/lib/architwin.js +1 -1
  5. package/lib/atwinui/components/toolbar/collapse.d.ts +18 -0
  6. package/lib/atwinui/components/toolbar/collapse.js +62 -0
  7. package/lib/atwinui/components/toolbar/i18n.js +52 -2
  8. package/lib/atwinui/components/toolbar/index.js +11 -1
  9. package/lib/atwinui/components/toolbar/menuBar.d.ts +1 -0
  10. package/lib/atwinui/components/toolbar/menuBar.js +11 -0
  11. package/lib/atwinui/components/toolbar/pipeFormPane.d.ts +31 -0
  12. package/lib/atwinui/components/toolbar/pipeFormPane.js +545 -0
  13. package/lib/atwinui/components/toolbar/pipeListPane.d.ts +19 -0
  14. package/lib/atwinui/components/toolbar/pipeListPane.js +388 -0
  15. package/lib/atwinui/components/toolbar/spaceUserListPane.d.ts +3 -0
  16. package/lib/atwinui/components/toolbar/spaceUserListPane.js +95 -0
  17. package/lib/atwinui/components/toolbar/tagIotForm.d.ts +20 -0
  18. package/lib/atwinui/components/toolbar/tagIotForm.js +391 -0
  19. package/lib/atwinui/components/toolbar/tagIotFormPane.d.ts +62 -0
  20. package/lib/atwinui/components/toolbar/tagIotFormPane.js +606 -0
  21. package/lib/atwinui/components/toolbar/tagMessagingPane.d.ts +4 -0
  22. package/lib/atwinui/components/toolbar/tagMessagingPane.js +117 -10
  23. package/lib/atwinui/components/toolbar/usersPane.d.ts +14 -0
  24. package/lib/atwinui/components/toolbar/usersPane.js +273 -0
  25. package/lib/atwinui/components/toolbar/viewingRemoteSpace.d.ts +7 -0
  26. package/lib/atwinui/components/toolbar/viewingRemoteSpace.js +77 -0
  27. package/lib/atwinui/events.d.ts +4 -1
  28. package/lib/atwinui/events.js +106 -26
  29. package/lib/atwinui/helpers.d.ts +15 -0
  30. package/lib/atwinui/helpers.js +49 -0
  31. package/lib/atwinui/index.js +2 -0
  32. package/lib/loaders/curosrMarkerLoader.d.ts +25 -0
  33. package/lib/loaders/curosrMarkerLoader.js +86 -0
  34. package/lib/loaders/index.d.ts +2 -1
  35. package/lib/loaders/index.js +2 -1
  36. package/lib/loaders/pathLoader.d.ts +99 -0
  37. package/lib/loaders/pathLoader.js +451 -0
  38. package/lib/tag.d.ts +1 -1
  39. package/lib/tag.js +2 -0
  40. package/lib/types.d.ts +80 -1
  41. package/lib/types.js +35 -0
  42. package/package.json +1 -1
  43. package/static/atwinui.css +267 -0
  44. package/static/utility.css +81 -1
@@ -0,0 +1,18 @@
1
+ export declare class Collapse {
2
+ private payloadElement;
3
+ private isExpand?;
4
+ private buttons;
5
+ private contents;
6
+ constructor(payloadElement: HTMLElement, config?: {
7
+ expand?: boolean;
8
+ });
9
+ render(): HTMLElement;
10
+ init(): void;
11
+ private handleClick;
12
+ private toggleExpand;
13
+ private toggleButton;
14
+ removeElement(collapseId: string, type: string): void;
15
+ setElement(newElement: HTMLElement): void;
16
+ setExpand(expand: boolean): void;
17
+ destroy(): void;
18
+ }
@@ -0,0 +1,62 @@
1
+ import { COLLAPSE } from "../../../types";
2
+ export class Collapse {
3
+ constructor(payloadElement, config) {
4
+ this.payloadElement = payloadElement;
5
+ this.isExpand = config === null || config === void 0 ? void 0 : config.expand;
6
+ }
7
+ render() {
8
+ const container = document.createElement('div');
9
+ container.setAttribute('id', 'at-collapse');
10
+ container.setAttribute('data-cy', 'at-collapse');
11
+ container.innerHTML = `
12
+ <div class="at_collapsible_container">
13
+ <div class="at_collapsible_section"></div>
14
+ </div>
15
+ `;
16
+ const section = container.querySelector('.at_collapsible_section');
17
+ section.innerHTML = '';
18
+ section.appendChild(this.payloadElement);
19
+ return container;
20
+ }
21
+ init() {
22
+ this.buttons = document.querySelectorAll(`[id*="${COLLAPSE.TOGGLE_ID}"]`);
23
+ this.contents = document.querySelectorAll(`[id*="${COLLAPSE.CONTENT_ID}"]`);
24
+ this.buttons.forEach((button, index) => {
25
+ if (this.isExpand) {
26
+ this.toggleExpand(this.contents[index]);
27
+ }
28
+ button.addEventListener('click', this.handleClick(index));
29
+ });
30
+ }
31
+ handleClick(index) {
32
+ return (e) => {
33
+ const target = e.currentTarget;
34
+ this.toggleExpand(this.contents[index]);
35
+ this.toggleButton(target);
36
+ };
37
+ }
38
+ toggleExpand(content) {
39
+ content.classList.toggle(COLLAPSE.EXPAND);
40
+ }
41
+ toggleButton(button) {
42
+ button.classList.toggle(COLLAPSE.ACTIVE);
43
+ }
44
+ removeElement(collapseId, type) {
45
+ const targetElement = document.getElementById(`at-collapsible-${type}-${collapseId}`);
46
+ if (targetElement) {
47
+ targetElement.remove();
48
+ }
49
+ }
50
+ setElement(newElement) {
51
+ this.payloadElement = newElement;
52
+ }
53
+ setExpand(expand) {
54
+ this.isExpand = expand;
55
+ }
56
+ destroy() {
57
+ var _a;
58
+ (_a = this.buttons) === null || _a === void 0 ? void 0 : _a.forEach((button, index) => {
59
+ button.removeEventListener('click', this.handleClick(index));
60
+ });
61
+ }
62
+ }
@@ -166,7 +166,32 @@ i18n
166
166
  "PleaseWaitTagPlacement": "Please wait for the current tag to be placed before placing a new one",
167
167
  "RotateMinimap": "Rotate Minimap",
168
168
  "General Settings": "General Settings",
169
- "UploadImage": "Upload Image"
169
+ "UploadImage": "Upload Image",
170
+ "Pipes": "Pipes",
171
+ "SelectPipeType": "Select Pipe Type",
172
+ "AddPipeType": "Add Pipe Type",
173
+ "EditPipeType": "Edit Pipe Type",
174
+ "PipeTypeName": "Pipe Type Name",
175
+ "CategoryColor": "Category Color",
176
+ "NoPipesToDisplay": "No pipes to display",
177
+ "DrawPipe": "Draw Pipe",
178
+ "NoVertexToDisplay": "No vertex to display",
179
+ "NoPipesTypeToDisplay": "No pipe types to display",
180
+ "DrawingModeIsActive": "Drawing mode is active",
181
+ "SuccessfullyPipeSaved": "Pipe saved successfully",
182
+ "SaveTheCurrentPipeBeforeProceeding": "Save the current pipe before proceeding.",
183
+ "CategorySuccessfullySaved": "Category saved successfully",
184
+ "PipeSuccessfullyDeleted": "Pipe deleted successfully",
185
+ "CannotDrawNoColorSelected": "Cannot draw: No color selected.",
186
+ "DrawingModeIsNowActive": "Drawing mode is now active.",
187
+ "DrawingModeIsCurrentlyInactive": "Drawing mode is currently inactive.",
188
+ "DeletePipeCategory": "Delete pipe category",
189
+ "VertexDeletedSuccessfully": "Vertex deleted successfully",
190
+ "PipeCategoryDeletedSuccessfully": "Pipe category deleted successfully",
191
+ "ConfirmDeletePipeCategory": "Are you sure you want to delete this pipe category?",
192
+ "DeletePipe": "Delete pipe",
193
+ "ConfirmDeletePipe": "Are you sure you want to delete this pipe?",
194
+ "AllCategory": "All Category"
170
195
  }
171
196
  },
172
197
  ja: {
@@ -332,7 +357,32 @@ i18n
332
357
  "Due to restrictions, original minimap is unavailable in password protected spaces. Please select and setup a custom minimap instead.": "制限事項により、パスワードで保護されたスペースではオリジナルのミニマップはご利用いただけません。代わりにカスタムミニマップを選択して設定してください。",
333
358
  "RotateMinimap": "ミニマップの回転",
334
359
  "Search...": "検索...",
335
- "UploadImage": "画像をアップロード"
360
+ "UploadImage": "画像をアップロード",
361
+ "Pipes": "配管",
362
+ "SelectPipeType": "配管種別選択",
363
+ "AddPipeType": "配管種別を追加",
364
+ "EditPipeType": "配管種別を編集",
365
+ "PipeTypeName": "改版種別名",
366
+ "CategoryColor": "配管色",
367
+ "NoPipesToDisplay": "表示する快感がありません",
368
+ "DrawPipe": "配管を描画",
369
+ "NoVertexToDisplay": "表示する頂点がありません",
370
+ "NoPipesTypeToDisplay": "表示する配管種別がありません",
371
+ "DrawingModeIsActive": "描画モードが適応中",
372
+ "PipeSavedSuccessfully": "配管を保存しました",
373
+ "SaveTheCurrentPipeBeforeProceeding": "現在描画している配管を保存してから進めてください",
374
+ "CategorySuccessfullySaved": "カテゴリを正常に保存しました",
375
+ "PipeDeletedSuccessfully": "配管が正常に削除されました",
376
+ "CannotDrawNoColorSelected": "描画不可:色を選択していません",
377
+ "DrawingModeIsNowActive": "描画モードが現在有効です",
378
+ "DrawingModeIsCurrentlyInactive": "描画モードは現在無効です",
379
+ "DeletePipeCategory": "配管種別を削除",
380
+ "VertexDeletedSuccessfully": "頂点が正常に削除されました",
381
+ "PipeCategoryDeletedSuccessfully": "配管種別が正常に削除されました",
382
+ "ConfirmDeletePipeCategory": "この配管種別を削除してもよろしいですか?",
383
+ "DeletePipe": "配管を削除",
384
+ "ConfirmDeletePipe": "この快感を削除してもよろしいですか?",
385
+ "AllCategory": "「すべてのカテゴリ」"
336
386
  }
337
387
  }
338
388
  },
@@ -23,8 +23,12 @@ import { renderRoomTreePane } from "./spacePartition/roomTreePane";
23
23
  import { renderRoomFormPane } from "./spacePartition/roomFormPane";
24
24
  import { renderBasepointCalibratePane } from "./basepointCalibratePane";
25
25
  import { renderGeneralSettingsMenu } from "./generalSettingsMenuPane";
26
+ import { PipeList } from "./pipeListPane";
27
+ import { PipeForm } from "./pipeFormPane";
28
+ const pipeList = new PipeList();
29
+ const pipeForm = new PipeForm();
26
30
  let iFrame, sidebarContainer;
27
- let menuBar, actionBar, objectListPane, addObjectPane, tagListPane, tagFormPane, addMediaScreenForm, libraryPane, tagMessagingPane, themePane, modelControlPane, actionSettingsPane, roomTreePane, roomFormPane, basepointCalibratePane, generalSettingsPane;
31
+ let menuBar, actionBar, objectListPane, addObjectPane, tagListPane, tagFormPane, addMediaScreenForm, libraryPane, tagMessagingPane, themePane, modelControlPane, actionSettingsPane, roomTreePane, roomFormPane, basepointCalibratePane, generalSettingsPane, pipeListPane, pipeFormPane;
28
32
  function getIframeElement(iframeId) {
29
33
  if (!iframeId || iframeId === '') {
30
34
  console.error("IframeId is empty or undefined");
@@ -93,6 +97,8 @@ function renderToolbarUI(payload) {
93
97
  actionSettingsPane = renderActionSettingsPane();
94
98
  basepointCalibratePane = renderBasepointCalibratePane();
95
99
  generalSettingsPane = renderGeneralSettingsMenu();
100
+ pipeListPane = pipeList.renderPane();
101
+ pipeFormPane = pipeForm.renderPane();
96
102
  renderModal();
97
103
  sidebarContainer.appendChild(modelControlPane);
98
104
  sidebarContainer.appendChild(basepointCalibratePane);
@@ -109,6 +115,8 @@ function renderToolbarUI(payload) {
109
115
  sidebarContainer.appendChild(tagListPane);
110
116
  sidebarContainer.appendChild(addMediaScreenForm);
111
117
  sidebarContainer.appendChild(generalSettingsPane);
118
+ sidebarContainer.appendChild(pipeListPane);
119
+ sidebarContainer.appendChild(pipeFormPane);
112
120
  // Place your new pane
113
121
  //between these comments
114
122
  sidebarContainer.appendChild(menuBar);
@@ -129,6 +137,8 @@ function renderToolbarUI(payload) {
129
137
  roomFormPane.style.display = 'none';
130
138
  actionSettingsPane.style.display = 'none';
131
139
  generalSettingsPane.style.display = 'none';
140
+ pipeListPane.style.display = 'none';
141
+ pipeFormPane.style.display = 'none';
132
142
  const customTheme = window.localStorage.getItem('customizedTheme');
133
143
  if (customTheme && customTheme !== '') {
134
144
  console.log("customTheme: ", customTheme);
@@ -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 isPipeEnabled: boolean;
8
9
  export declare function renderMenuBar(iFrame: HTMLIFrameElement): HTMLDivElement;
9
10
  export declare function isAdminUser(): void;
10
11
  export declare function setActiveMenu(id: string): void;
@@ -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 isPipeEnabled = true;
15
16
  export function renderMenuBar(iFrame) {
16
17
  const bimImageIcon = getAssetUrl('bim.png');
17
18
  if (!iFrame) {
@@ -45,6 +46,10 @@ export function renderMenuBar(iFrame) {
45
46
  <span class="mdi mdi-monitor-screenshot" id="at-screenshot-btn" data-cy="at-screenshot-btn"></span>
46
47
  <div class="at_icon_tooltip" data-cy="at-tooltip-screenshot">${i18n.t('Screenshot')}</div>
47
48
  </div>
49
+ <div class="at_sidebar_button_icon" style="display:${isPipeEnabled ? 'block' : 'none'}">
50
+ <span class="mdi mdi-pipe" id="at-pipe-btn" data-cy="at-pipe-btn" target-pane="at-pipe-list-pane"></span>
51
+ <div class="at_icon_tooltip" data-cy="at-tooltip-pipe">${i18n.t('Pipes')}</div>
52
+ </div>
48
53
  <div class="at_sidebar_button_icon" style="display:${isThemeEnabled ? 'block' : 'none'}">
49
54
  <span class="mdi mdi-palette" id="at-theme-picker-btn" data-cy="at-theme-picker-btn" target-pane="at-theme-pane"></span>
50
55
  <div class="at_icon_tooltip" data-cy="at-tooltip-theme">${i18n.t('Theme')}</div>
@@ -103,6 +108,11 @@ function setMenuItemsStatus() {
103
108
  isGeneralSettingsEnabled = _mpConfig.toolbarConfig.menuItems.generalSetting;
104
109
  log.info("__@ isGeneralSettingsEnabled: ", isGeneralSettingsEnabled);
105
110
  }
111
+ // PIPE CONFIG
112
+ if (menuItems.pipe !== undefined) {
113
+ isPipeEnabled = _mpConfig.toolbarConfig.menuItems.pipe;
114
+ log.info("__@ isPipeEnabled: ", isPipeEnabled);
115
+ }
106
116
  }
107
117
  }
108
118
  export function isAdminUser() {
@@ -125,6 +135,7 @@ export function setActiveMenu(id) {
125
135
  case 'at-room-creation-btn':
126
136
  case 'at-settings-btn':
127
137
  case 'at-general-setting-btn':
138
+ case 'at-pipe-btn':
128
139
  if (parent.classList.contains('at_sidebar_button_icon_active')) {
129
140
  // remove
130
141
  log.info("removing active...");
@@ -0,0 +1,31 @@
1
+ import { IPipeCategory, IPipe } from "../../../types";
2
+ export declare class PipeForm {
3
+ private category;
4
+ private mode;
5
+ private collapse;
6
+ private readonly colorCategory;
7
+ constructor();
8
+ renderPane(): HTMLElement;
9
+ private createCollapseElement;
10
+ init(category?: IPipeCategory, pipes?: IPipe[]): Promise<void>;
11
+ private observeInput;
12
+ edit(): Promise<void>;
13
+ private setEditMode;
14
+ savePipe(): void;
15
+ private savePiPeEventHandler;
16
+ setPipeVertices(payload: any): Promise<void>;
17
+ save(): void;
18
+ cancel(): void;
19
+ delete(): void;
20
+ draw(): void;
21
+ undoEventHandler(): Promise<void>;
22
+ redoEventHandler(): void;
23
+ undo(): void;
24
+ redo(): void;
25
+ private setColorListeners;
26
+ private getDrawButton;
27
+ populateFormCollapse(categories: any, pipes: any): void;
28
+ resetInteractionState(): void;
29
+ setPipeTitle(text: string): void;
30
+ private renderPipePath;
31
+ }