architwin 1.8.2 → 1.8.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.
- package/README.md +21 -0
- package/lib/architwin.d.ts +61 -2
- package/lib/architwin.js +6563 -1
- package/lib/atwinui/components/toolbar/i18n.js +47 -2
- package/lib/atwinui/components/toolbar/index.js +9 -1
- package/lib/atwinui/components/toolbar/menuBar.d.ts +3 -0
- package/lib/atwinui/components/toolbar/menuBar.js +32 -16
- package/lib/atwinui/components/toolbar/objectListPane.js +1 -1
- package/lib/atwinui/components/toolbar/roomCreation/roomFormPane.d.ts +12 -0
- package/lib/atwinui/components/toolbar/roomCreation/roomFormPane.js +586 -0
- package/lib/atwinui/components/toolbar/roomCreation/roomLayerListPane.d.ts +33 -0
- package/lib/atwinui/components/toolbar/roomCreation/roomLayerListPane.js +448 -0
- package/lib/atwinui/components/toolbar/tagListPane.js +1 -2
- package/lib/atwinui/components/toolbar/themePane.js +1 -1
- package/lib/atwinui/events.d.ts +3 -1
- package/lib/atwinui/events.js +245 -5
- package/lib/atwinui/index.js +3 -1
- package/lib/convert.d.ts +1 -14
- package/lib/convert.js +6 -63
- package/lib/loaders/index.d.ts +2 -1
- package/lib/loaders/index.js +2 -1
- package/lib/loaders/polydrawerLoader.d.ts +148 -0
- package/lib/loaders/polydrawerLoader.js +771 -0
- package/lib/types.d.ts +88 -1
- package/lib/types.js +16 -0
- package/lib/utils.d.ts +2 -0
- package/lib/utils.js +16 -0
- package/lib/vertexPlacer.d.ts +18 -0
- package/lib/vertexPlacer.js +69 -0
- package/lib/zoom.d.ts +6 -1
- package/lib/zoom.js +10 -1
- package/package.json +4 -2
- package/static/atwinui.css +431 -2
- package/static/utility.css +39 -1
- package/lib/atwinui/components/toolbar/menu-bar.d.ts +0 -4
- package/lib/atwinui/components/toolbar/menu-bar.js +0 -35
- package/lib/atwinui/components/toolbar/sidebar-container.d.ts +0 -5
- package/lib/atwinui/components/toolbar/sidebar-container.js +0 -27
|
@@ -81,7 +81,30 @@ i18n
|
|
|
81
81
|
"UpperLeft": "Upper left",
|
|
82
82
|
"UpperRight": "Upper right",
|
|
83
83
|
"BottomLeft": "Bottom left",
|
|
84
|
-
"BottomRight": "Bottom right"
|
|
84
|
+
"BottomRight": "Bottom right",
|
|
85
|
+
"AddRoom": "Add Room",
|
|
86
|
+
"EditRoom": "Edit Room",
|
|
87
|
+
"Memo": "Memo",
|
|
88
|
+
"WallHeight": "Wall Height",
|
|
89
|
+
"DrawPartition": "Draw Partition",
|
|
90
|
+
"DeleteRoom": "Delete Room",
|
|
91
|
+
"CompleteDrawing": "Complete Drawing",
|
|
92
|
+
"NoPartitionDisplay": "No partition to display",
|
|
93
|
+
"Partition": "Partition",
|
|
94
|
+
"Partitions": "Partitions",
|
|
95
|
+
"FloorsAndWalls": "Floors and Walls",
|
|
96
|
+
"Floor": "Floor",
|
|
97
|
+
"Wall": "Wall",
|
|
98
|
+
"ClickEditName": "Click to edit name",
|
|
99
|
+
"RoomCreation": "Room Creation",
|
|
100
|
+
"RoomTree": "Room Tree",
|
|
101
|
+
"Report": "Report",
|
|
102
|
+
"ALL": "ALL",
|
|
103
|
+
"FloorLevel": "Floor Level",
|
|
104
|
+
"Line": "Line",
|
|
105
|
+
"Name": "Name",
|
|
106
|
+
"NoRoomSave": "No Room Saved",
|
|
107
|
+
"NothingToReport": "Nothing to report. Please create a partition."
|
|
85
108
|
}
|
|
86
109
|
},
|
|
87
110
|
ja: {
|
|
@@ -157,7 +180,29 @@ i18n
|
|
|
157
180
|
"UpperLeft": "左上",
|
|
158
181
|
"UpperRight": "右上",
|
|
159
182
|
"BottomLeft": "左下",
|
|
160
|
-
"BottomRight": "右下"
|
|
183
|
+
"BottomRight": "右下",
|
|
184
|
+
"RoomCreation": "ルーム作成",
|
|
185
|
+
"RoomTree": "ルーム構成",
|
|
186
|
+
"Report": "レポート作成",
|
|
187
|
+
"ALL": "全選択",
|
|
188
|
+
"AddRoom": "ルーム追加",
|
|
189
|
+
"EditRoom": "ルーム編集",
|
|
190
|
+
"Memo": "メモ",
|
|
191
|
+
"WallHeight": "高さ",
|
|
192
|
+
"DrawPartition": "区画描画",
|
|
193
|
+
"DeleteRoom": "ルーム削除",
|
|
194
|
+
"CompleteDrawing": "描画完了",
|
|
195
|
+
"NoPartitionDisplay": "表示する区画がありません",
|
|
196
|
+
"Partition": "区画",
|
|
197
|
+
"Partitions": "区画",
|
|
198
|
+
"FloorsAndWalls": "床と壁",
|
|
199
|
+
"Floor": "床",
|
|
200
|
+
"Wall": "壁",
|
|
201
|
+
"ClickEditName": "クリック",
|
|
202
|
+
"FloorLevel": "床の基本高",
|
|
203
|
+
"Line": "線",
|
|
204
|
+
"Name": "名前",
|
|
205
|
+
"NothingToReport": "Nothing to report. Please create a partition."
|
|
161
206
|
}
|
|
162
207
|
}
|
|
163
208
|
},
|
|
@@ -18,8 +18,10 @@ import { renderModelControlPane, toggleModelControl } from "./modelControlsPane"
|
|
|
18
18
|
import { getURLParams } from "../../../utils";
|
|
19
19
|
import './i18n';
|
|
20
20
|
import i18n from './i18n';
|
|
21
|
+
import { renderRoomLayerListPane } from "./roomCreation/roomLayerListPane";
|
|
22
|
+
import { renderRoomFormPane } from "./roomCreation/roomFormPane";
|
|
21
23
|
let iFrame, sidebarContainer;
|
|
22
|
-
let menuBar, actionBar, objectListPane, addObjectPane, tagListPane, tagFormPane, addMediaScreenForm, libraryPane, tagMessagingPane, themePane, modelControlPane;
|
|
24
|
+
let menuBar, actionBar, objectListPane, addObjectPane, tagListPane, tagFormPane, addMediaScreenForm, libraryPane, tagMessagingPane, themePane, modelControlPane, roomLayerListPane, roomFormPane;
|
|
23
25
|
function getIframeElement(iframeId) {
|
|
24
26
|
if (!iframeId || iframeId === '') {
|
|
25
27
|
console.error("IframeId is empty or undefined");
|
|
@@ -83,9 +85,13 @@ function renderToolbarUI(payload) {
|
|
|
83
85
|
tagMessagingPane = renderTagMessagingPane();
|
|
84
86
|
themePane = renderThemePane();
|
|
85
87
|
modelControlPane = renderModelControlPane();
|
|
88
|
+
roomLayerListPane = renderRoomLayerListPane();
|
|
89
|
+
roomFormPane = renderRoomFormPane();
|
|
86
90
|
renderModal();
|
|
87
91
|
sidebarContainer.appendChild(modelControlPane);
|
|
88
92
|
sidebarContainer.appendChild(actionBar);
|
|
93
|
+
sidebarContainer.appendChild(roomLayerListPane);
|
|
94
|
+
sidebarContainer.appendChild(roomFormPane);
|
|
89
95
|
sidebarContainer.appendChild(themePane);
|
|
90
96
|
sidebarContainer.appendChild(tagMessagingPane);
|
|
91
97
|
sidebarContainer.appendChild(libraryPane);
|
|
@@ -109,6 +115,8 @@ function renderToolbarUI(payload) {
|
|
|
109
115
|
libraryPane.style.display = 'none';
|
|
110
116
|
tagMessagingPane.style.display = 'none';
|
|
111
117
|
themePane.style.display = 'none';
|
|
118
|
+
roomLayerListPane.style.display = 'none';
|
|
119
|
+
roomFormPane.style.display = 'none';
|
|
112
120
|
const customTheme = window.localStorage.getItem('customizedTheme');
|
|
113
121
|
if (customTheme && customTheme !== '') {
|
|
114
122
|
console.log("customTheme: ", customTheme);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export declare let activeMenu: HTMLElement;
|
|
2
2
|
export declare let isObjectListEnabled: boolean;
|
|
3
|
+
export declare let isMeetingEnabled: boolean;
|
|
4
|
+
export declare let isThemeEnabled: boolean;
|
|
5
|
+
export declare let isRoomCreationEnabled: boolean;
|
|
3
6
|
export declare function renderMenuBar(iFrame: HTMLIFrameElement): HTMLDivElement;
|
|
4
7
|
export declare function setActiveMenu(id: string): void;
|
|
5
8
|
export declare function clearActiveMenu(id: string): void;
|
|
@@ -4,8 +4,9 @@ import i18n from "./i18n";
|
|
|
4
4
|
import { toggleActionBar } from "../../events";
|
|
5
5
|
export let activeMenu;
|
|
6
6
|
export let isObjectListEnabled = true;
|
|
7
|
-
let isMeetingEnabled = false;
|
|
8
|
-
let isThemeEnabled = true;
|
|
7
|
+
export let isMeetingEnabled = false;
|
|
8
|
+
export let isThemeEnabled = true;
|
|
9
|
+
export let isRoomCreationEnabled = true;
|
|
9
10
|
export function renderMenuBar(iFrame) {
|
|
10
11
|
if (!iFrame) {
|
|
11
12
|
log.error(`Could not find target iFrame`);
|
|
@@ -32,7 +33,7 @@ export function renderMenuBar(iFrame) {
|
|
|
32
33
|
</div>
|
|
33
34
|
<div class="at_sidebar_button_icon" style="display:${isMeetingEnabled ? 'block' : 'none'}">
|
|
34
35
|
<span class="mdi mdi-message-video" id="at-videocall-btn" data-cy="at-videocall-btn" target-pane="at-video-call-pane"></span>
|
|
35
|
-
div class="at_icon_tooltip" data-cy="at-tooltip-meeting">${i18n.t('Meeting')}</div>
|
|
36
|
+
<div class="at_icon_tooltip" data-cy="at-tooltip-meeting">${i18n.t('Meeting')}</div>
|
|
36
37
|
</div>
|
|
37
38
|
<div class="at_sidebar_button_icon">
|
|
38
39
|
<span class="mdi mdi-monitor-screenshot" id="at-screenshot-btn" data-cy="at-screenshot-btn"></span>
|
|
@@ -42,6 +43,10 @@ export function renderMenuBar(iFrame) {
|
|
|
42
43
|
<span class="mdi mdi-palette" id="at-theme-picker-btn" data-cy="at-theme-picker-btn" target-pane="at-theme-pane"></span>
|
|
43
44
|
<div class="at_icon_tooltip" data-cy="at-tooltip-theme">${i18n.t('Theme')}</div>
|
|
44
45
|
</div>
|
|
46
|
+
<div class="at_sidebar_button_icon" style="display:${isRoomCreationEnabled ? 'block' : 'none'}">
|
|
47
|
+
<span class="mdi mdi-ruler-square-compass" id="at-room-creation-btn" data-cy="at-room-creation-btn" target-pane="at-room-tree-pane"></span>
|
|
48
|
+
<div class="at_icon_tooltip" data-cy="at-tooltip-theme">${i18n.t('RoomCreation')}</div>
|
|
49
|
+
</div>
|
|
45
50
|
`;
|
|
46
51
|
return menuBarElement;
|
|
47
52
|
}
|
|
@@ -50,19 +55,29 @@ export function renderMenuBar(iFrame) {
|
|
|
50
55
|
* based on the configuration specified in the _mpConfig object.
|
|
51
56
|
*/
|
|
52
57
|
function setMenuItemsStatus() {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
const toolbarConfig = _mpConfig.toolbarConfig;
|
|
59
|
+
const menuItems = _mpConfig.toolbarConfig.menuItems;
|
|
60
|
+
if (toolbarConfig && menuItems) {
|
|
61
|
+
// MEETING
|
|
62
|
+
if (menuItems.meeting !== undefined) {
|
|
63
|
+
isMeetingEnabled = _mpConfig.toolbarConfig.menuItems.meeting;
|
|
64
|
+
log.info("__@ isMeetingEnabled: ", isMeetingEnabled);
|
|
65
|
+
}
|
|
66
|
+
// OBJECT
|
|
67
|
+
if (menuItems.models !== undefined) {
|
|
68
|
+
isObjectListEnabled = _mpConfig.toolbarConfig.menuItems.models;
|
|
69
|
+
log.info("__@ isObjectListEnabled: ", isObjectListEnabled);
|
|
70
|
+
}
|
|
71
|
+
// THEME
|
|
72
|
+
if (menuItems.theme !== undefined) {
|
|
73
|
+
isThemeEnabled = _mpConfig.toolbarConfig.menuItems.theme;
|
|
74
|
+
log.info("__@ isThemeEnabled: ", isThemeEnabled);
|
|
75
|
+
}
|
|
76
|
+
// ROOM CREATION
|
|
77
|
+
if (menuItems.roomCreation !== undefined) {
|
|
78
|
+
isRoomCreationEnabled = _mpConfig.toolbarConfig.menuItems.roomCreation;
|
|
79
|
+
log.info("__@ isRoomCreationEnabled: ", isRoomCreationEnabled);
|
|
80
|
+
}
|
|
66
81
|
}
|
|
67
82
|
}
|
|
68
83
|
export function setActiveMenu(id) {
|
|
@@ -80,6 +95,7 @@ export function setActiveMenu(id) {
|
|
|
80
95
|
case 'at-object-list-btn':
|
|
81
96
|
case 'at-minimap-btn':
|
|
82
97
|
case 'at-theme-picker-btn':
|
|
98
|
+
case 'at-room-creation-btn':
|
|
83
99
|
if (parent.classList.contains('at_sidebar_button_icon_active')) {
|
|
84
100
|
// remove
|
|
85
101
|
log.info("removing active...");
|
|
@@ -47,7 +47,7 @@ export function renderObjectListPane(cardList) {
|
|
|
47
47
|
</div>
|
|
48
48
|
</div>
|
|
49
49
|
<div class="at_flex at_justify_center at_price" id="at-bundle-version" data-cy="at-bundle-version">
|
|
50
|
-
<small
|
|
50
|
+
<small class="at_text_xxs at_text_white at_opacity_5">${getBundleVersion()}</small>
|
|
51
51
|
</div>
|
|
52
52
|
`;
|
|
53
53
|
return element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FORM_MODE, RoomNode, PolygonData } from "../../../../types";
|
|
2
|
+
export declare function renderRoomFormPane(): HTMLDivElement;
|
|
3
|
+
export declare function toggleDrawPartionButton(): void;
|
|
4
|
+
export declare function renderRoomFormMode(): void;
|
|
5
|
+
export declare function clearRoomForm(): void;
|
|
6
|
+
export declare function getRoomFormData(): RoomNode;
|
|
7
|
+
export declare function getPartitionFormData(): Array<RoomNode>;
|
|
8
|
+
export declare function setPartitionSavingMode(mode: boolean): void;
|
|
9
|
+
export declare function getPartitionSavingMode(): boolean;
|
|
10
|
+
export declare function setRoomFormMode(formType: FORM_MODE): void;
|
|
11
|
+
export declare function getRoomFormMode(): FORM_MODE;
|
|
12
|
+
export declare function setPolygonData(payload: PolygonData): void;
|