architwin 1.0.78 → 1.0.80
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/lib/atwinui/components/toolbar/card.js +3 -2
- package/lib/atwinui/components/toolbar/i18n.d.ts +2 -0
- package/lib/atwinui/components/toolbar/i18n.js +96 -0
- package/lib/atwinui/components/toolbar/index.d.ts +3 -1
- package/lib/atwinui/components/toolbar/index.js +35 -3
- package/lib/atwinui/components/toolbar/libraryPane.js +10 -3
- package/lib/atwinui/components/toolbar/menuBar.js +4 -2
- package/lib/atwinui/components/toolbar/objectListPane.js +5 -4
- package/lib/atwinui/components/toolbar/tagFormPane.d.ts +1 -0
- package/lib/atwinui/components/toolbar/tagFormPane.js +26 -78
- package/lib/atwinui/components/toolbar/tagListPane.js +7 -6
- package/lib/atwinui/components/toolbar/tagMessagingPane.js +5 -4
- package/lib/atwinui/components/toolbar/themePane.js +4 -3
- package/lib/atwinui/events.js +11 -9
- package/lib/atwinui/index.js +1 -1
- package/lib/loaders/planeGeometry.js +1 -1
- package/lib/loaders/planeGeometry2.js +1 -1
- package/lib/types.d.ts +1 -0
- package/lib/utils.d.ts +1 -0
- package/lib/utils.js +5 -0
- package/package.json +4 -1
|
@@ -11,6 +11,7 @@ import { goToModel, setSelectedObject, get3DXObjects, getLibrary, getTargetPosit
|
|
|
11
11
|
import { SPACE_EVENTS } from "../../../types";
|
|
12
12
|
import { toggleDisplayPane } from "../../events";
|
|
13
13
|
import { Notyf } from 'notyf';
|
|
14
|
+
import i18n from './i18n';
|
|
14
15
|
let activeCard, activeLibraryCard;
|
|
15
16
|
let _basePath = '../../../../architwin/static';
|
|
16
17
|
export function renderObjectCard(payload) {
|
|
@@ -166,7 +167,7 @@ export function renderLibraryCard(payload) {
|
|
|
166
167
|
<img class="at_image at_library_image" src="${thumbnail}" alt="Property Image" id="at-library-card-image-${payload.id}" data-cy="at-library-card-image-${payload.id}" card-id="${payload.id}">
|
|
167
168
|
<div class="at_card-body" card-id="${payload.id}">
|
|
168
169
|
${payload.name ?
|
|
169
|
-
`<div class="
|
|
170
|
+
`<div class="at_library_card_title">
|
|
170
171
|
<h2 class="at_title_small" id="at-card-title-${payload.id}" data-cy="at-card-title-${payload.id}">${payload.name}</h2>
|
|
171
172
|
</div>` :
|
|
172
173
|
``}
|
|
@@ -226,7 +227,7 @@ export function setActiveLibraryCard(cardId) {
|
|
|
226
227
|
clearActiveLibraryCard();
|
|
227
228
|
toggleDisplayPane('at-cancel-library-btn');
|
|
228
229
|
renderObjectCard(payload);
|
|
229
|
-
notyf.success(
|
|
230
|
+
notyf.success(`${i18n.t('ModelAddedToSpace')}`);
|
|
230
231
|
}));
|
|
231
232
|
}
|
|
232
233
|
else {
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// i18n.ts
|
|
2
|
+
import i18n from 'i18next';
|
|
3
|
+
import Backend from 'i18next-http-backend';
|
|
4
|
+
import LanguageDetector from 'i18next-browser-languagedetector';
|
|
5
|
+
i18n
|
|
6
|
+
.use(Backend)
|
|
7
|
+
.use(LanguageDetector).init({
|
|
8
|
+
fallbackLng: 'en',
|
|
9
|
+
debug: true,
|
|
10
|
+
resources: {
|
|
11
|
+
en: {
|
|
12
|
+
translation: {
|
|
13
|
+
"AddMediaScreen": "Add Media Screen",
|
|
14
|
+
"EnterMediaURL": "Enter media URL",
|
|
15
|
+
"SelectModelType": "Select model type",
|
|
16
|
+
"NoFileType": "No file type",
|
|
17
|
+
"CORSWarning": "Make sure that your url is publicly accessible otherwise the application will throw a CORS error during render",
|
|
18
|
+
"Cancel": "Cancel",
|
|
19
|
+
"OpenLibrary": "Open Library",
|
|
20
|
+
"AddToSpace": "Add to Space",
|
|
21
|
+
"SelectAddition": "Please select what you want to add",
|
|
22
|
+
"Library": "Library",
|
|
23
|
+
"BrowseLibrary": "Browse Library",
|
|
24
|
+
"NoObjectsInLibrary": "No objects in Library",
|
|
25
|
+
"SpaceObjects": "Space Objects",
|
|
26
|
+
"NoObjectsInSpace": "No objects in space",
|
|
27
|
+
"Tags": "Tags",
|
|
28
|
+
"Category": "Category",
|
|
29
|
+
"Subcategory": "Subcategory",
|
|
30
|
+
"SuccessDeleteTag": "Successfully deleted tag",
|
|
31
|
+
"NoSelection": "No selection",
|
|
32
|
+
"TagName": "Tag Name",
|
|
33
|
+
"MoveTag": "Move Tag",
|
|
34
|
+
"Description": "Description",
|
|
35
|
+
"EmbedMedia": "Embed Media",
|
|
36
|
+
"SaveTag": "Save Tag",
|
|
37
|
+
"AddTag": "Add Tag",
|
|
38
|
+
"NoRecipient": "No recipient",
|
|
39
|
+
"You": "You",
|
|
40
|
+
"MessageSentSuccess": "Message successfully sent",
|
|
41
|
+
"ModelAddedToSpace": "Model successfully added to space",
|
|
42
|
+
"Theme": "Theme",
|
|
43
|
+
"Save": "Save",
|
|
44
|
+
"SuccessAddTagToSpace": "Successfully added tag to space",
|
|
45
|
+
"ScreenshotSaved": "Screenshot saved to downloads folder",
|
|
46
|
+
"SuccessCopyTagLink": "Successfully copied tag link to clipboard",
|
|
47
|
+
"NoMessages": "No messages"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
ja: {
|
|
51
|
+
translation: {
|
|
52
|
+
"AddMediaScreen": "メディアの追加",
|
|
53
|
+
"EnterMediaURL": "メディアURL",
|
|
54
|
+
"SelectModelType": "ファイル形式選択",
|
|
55
|
+
"NoFileType": "ファイル形式が異なります",
|
|
56
|
+
"CORSWarning": "レンダリング中にCORSエラーが発生しています。設定したURLを確認してください。",
|
|
57
|
+
"Cancel": "キャンセル",
|
|
58
|
+
"OpenLibrary": "ライブラリ",
|
|
59
|
+
"AddToSpace": "スペース追加",
|
|
60
|
+
"SelectAddition": "追加したいモデルを選択してください",
|
|
61
|
+
"Library": "ライブラリ",
|
|
62
|
+
"BrowseLibrary": "ライブラリ閲覧",
|
|
63
|
+
"NoObjectsInLibrary": "オブジェクトがありません",
|
|
64
|
+
"SpaceObjects": "オブジェクト",
|
|
65
|
+
"NoObjectsInSpace": "オブジェクトがありません",
|
|
66
|
+
"Tags": "タグ",
|
|
67
|
+
"Category": "タグ大分類",
|
|
68
|
+
"Subcategory": "タグ小分類",
|
|
69
|
+
"SuccessDeleteTag": "タグを削除しました",
|
|
70
|
+
"NoSelection": "未選択",
|
|
71
|
+
"TagName": "タグ名称",
|
|
72
|
+
"MoveTag": "タグ移動",
|
|
73
|
+
"Description": "説明",
|
|
74
|
+
"EmbedMedia": "埋め込みメディア",
|
|
75
|
+
"SaveTag": "タグ保存",
|
|
76
|
+
"AddTag": "タグ追加",
|
|
77
|
+
"NoRecipient": "未選択",
|
|
78
|
+
"You": "あなた",
|
|
79
|
+
"MessageSentSuccess": "メッセージが登録されました",
|
|
80
|
+
"ModelAddedToSpace": "スペースへの登録が完了しました",
|
|
81
|
+
"Theme": "テーマ",
|
|
82
|
+
"Save": "保存",
|
|
83
|
+
"SuccessAddTagToSpace": "タグを追加しました",
|
|
84
|
+
"ScreenshotSaved": "スクショをダウンロードフォルダに保存しました",
|
|
85
|
+
"SuccessCopyTagLink": "タグURLをクリップボードに保存しました",
|
|
86
|
+
"NoMessages": "メッセージがありません"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
detection: {
|
|
91
|
+
order: ['queryString', 'cookie'],
|
|
92
|
+
caches: ['cookie']
|
|
93
|
+
}
|
|
94
|
+
}, () => {
|
|
95
|
+
});
|
|
96
|
+
export default i18n;
|
|
@@ -8,6 +8,8 @@ import { renderLibraryCards } from "./libraryPane";
|
|
|
8
8
|
import { setActiveThemeCard } from "./themePane";
|
|
9
9
|
import { setActiveCard, setActiveLibraryCard, clearActiveCard, clearActiveLibraryCard } from "./card";
|
|
10
10
|
import { renderRecepientOptions, renderTagMessages, createTagMessage, setTagMessagingDetails } from "./tagMessagingPane";
|
|
11
|
+
import { clearTagFormDropdown } from "./tagFormPane";
|
|
12
|
+
import './i18n';
|
|
11
13
|
declare let actionBar: HTMLElement;
|
|
12
14
|
declare function renderToolbarUI(payload: IToolbarData): void;
|
|
13
|
-
export { actionBar, tagFormMode, selectedTag, renderToolbarUI, renderObjectCards, setActiveMenu, clearActiveMenu, setActiveActionBtn, renderLibraryCards, renderTags, getTagFormData, renderTagRow, addClickEventToTagRow, setTagCategoriesOption, setActiveThemeCard, setActiveCard, setActiveLibraryCard, clearActiveCard, clearActiveLibraryCard, removeObjectCard, renderRecepientOptions, renderTagMessages, createTagMessage, renderCategoryDropdownOptions, toggleDropdown, setTagLink, getTagLink, setTagMessagingDetails };
|
|
15
|
+
export { actionBar, tagFormMode, selectedTag, renderToolbarUI, renderObjectCards, setActiveMenu, clearActiveMenu, setActiveActionBtn, renderLibraryCards, renderTags, getTagFormData, renderTagRow, addClickEventToTagRow, setTagCategoriesOption, setActiveThemeCard, setActiveCard, setActiveLibraryCard, clearActiveCard, clearActiveLibraryCard, removeObjectCard, renderRecepientOptions, renderTagMessages, createTagMessage, renderCategoryDropdownOptions, toggleDropdown, setTagLink, getTagLink, setTagMessagingDetails, clearTagFormDropdown };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { _mpConfig } from "../../../architwin";
|
|
1
2
|
import { renderSidebarContainer } from "./sidebarContainer";
|
|
2
3
|
import { renderMenuBar, setActiveMenu, clearActiveMenu } from "./menuBar";
|
|
3
4
|
import { renderObjectListPane, renderObjectCards, removeObjectCard } from "./objectListPane";
|
|
@@ -11,8 +12,12 @@ import { renderTagMessagingPane } from "./tagMessagingPane";
|
|
|
11
12
|
import { renderThemePane, setActiveThemeCard } from "./themePane";
|
|
12
13
|
import { setActiveCard, setActiveLibraryCard, clearActiveCard, clearActiveLibraryCard } from "./card";
|
|
13
14
|
import { renderRecepientOptions, renderTagMessages, createTagMessage, setTagMessagingDetails } from "./tagMessagingPane";
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
import { clearTagFormDropdown } from "./tagFormPane";
|
|
16
|
+
import { getURLParams } from "../../../utils";
|
|
17
|
+
import './i18n';
|
|
18
|
+
import i18n from './i18n';
|
|
19
|
+
let iFrame, sidebarContainer;
|
|
20
|
+
let menuBar, actionBar, objectListPane, addObjectPane, tagListPane, tagFormPane, addMediaScreenForm, libraryPane, tagMessagingPane, themePane;
|
|
16
21
|
function getIframeElement(iframeId) {
|
|
17
22
|
if (!iframeId || iframeId === '') {
|
|
18
23
|
console.error("IframeId is empty or undefined");
|
|
@@ -25,7 +30,34 @@ function getIframeElement(iframeId) {
|
|
|
25
30
|
}
|
|
26
31
|
iFrame = target;
|
|
27
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Sets the preferred language for the ToolbarUI. Take note that the lang param value in the URL takes precedence over the value
|
|
35
|
+
* set in the toolbarConfig object lang value.
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
function setPreferredLanguage() {
|
|
39
|
+
const urlLangParam = getURLParams('lang');
|
|
40
|
+
if (urlLangParam && urlLangParam !== null && urlLangParam !== '') {
|
|
41
|
+
console.log("URL param lang ", urlLangParam);
|
|
42
|
+
if (urlLangParam === 'en' || urlLangParam === 'ja') {
|
|
43
|
+
i18n.changeLanguage(urlLangParam);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
console.error("URL param value for lang does not match any supported language");
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (_mpConfig && _mpConfig.toolbarConfig && _mpConfig.toolbarConfig.lang) {
|
|
50
|
+
console.log("_mpConfig lang", _mpConfig.toolbarConfig.lang);
|
|
51
|
+
if (_mpConfig.toolbarConfig.lang === 'en' || _mpConfig.toolbarConfig.lang === 'ja') {
|
|
52
|
+
i18n.changeLanguage(_mpConfig.toolbarConfig.lang);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
console.error("Value for toolbarConfig lang does not match any supported language");
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
28
59
|
function renderToolbarUI(payload) {
|
|
60
|
+
setPreferredLanguage();
|
|
29
61
|
getIframeElement('showcase-container');
|
|
30
62
|
sidebarContainer = renderSidebarContainer(iFrame);
|
|
31
63
|
iFrame.appendChild(sidebarContainer);
|
|
@@ -61,4 +93,4 @@ function renderToolbarUI(payload) {
|
|
|
61
93
|
tagMessagingPane.style.display = 'none';
|
|
62
94
|
themePane.style.display = 'none';
|
|
63
95
|
}
|
|
64
|
-
export { actionBar, tagFormMode, selectedTag, renderToolbarUI, renderObjectCards, setActiveMenu, clearActiveMenu, setActiveActionBtn, renderLibraryCards, renderTags, getTagFormData, renderTagRow, addClickEventToTagRow, setTagCategoriesOption, setActiveThemeCard, setActiveCard, setActiveLibraryCard, clearActiveCard, clearActiveLibraryCard, removeObjectCard, renderRecepientOptions, renderTagMessages, createTagMessage, renderCategoryDropdownOptions, toggleDropdown, setTagLink, getTagLink, setTagMessagingDetails };
|
|
96
|
+
export { actionBar, tagFormMode, selectedTag, renderToolbarUI, renderObjectCards, setActiveMenu, clearActiveMenu, setActiveActionBtn, renderLibraryCards, renderTags, getTagFormData, renderTagRow, addClickEventToTagRow, setTagCategoriesOption, setActiveThemeCard, setActiveCard, setActiveLibraryCard, clearActiveCard, clearActiveLibraryCard, removeObjectCard, renderRecepientOptions, renderTagMessages, createTagMessage, renderCategoryDropdownOptions, toggleDropdown, setTagLink, getTagLink, setTagMessagingDetails, clearTagFormDropdown };
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { batchAddEventListenerByClassName } from "../../events";
|
|
11
11
|
import { renderLibraryCard, setActiveLibraryCard, renderLibraryRow } from "./card";
|
|
12
|
+
import i18n from './i18n';
|
|
12
13
|
export let libraryCardContainer;
|
|
13
14
|
export function renderLibraryPane() {
|
|
14
15
|
const element = document.createElement('div');
|
|
@@ -21,12 +22,12 @@ export function renderLibraryPane() {
|
|
|
21
22
|
element.setAttribute('data-cy', 'at-library-pane');
|
|
22
23
|
element.innerHTML = `
|
|
23
24
|
<div class="at_panel_header">
|
|
24
|
-
<span
|
|
25
|
+
<span>${i18n.t('Library')}</span>
|
|
25
26
|
</div>
|
|
26
27
|
<div class="at_button_row at_justify_end">
|
|
27
28
|
<div class="at_button at_ghost at_ghost_active">
|
|
28
29
|
<span class="mdi mdi-view-gallery"></span>
|
|
29
|
-
|
|
30
|
+
${i18n.t('BrowseLibrary')}
|
|
30
31
|
</div>
|
|
31
32
|
<div class="at_button at_ghost at_ghost_active" id="at-library-models-card-view-btn" data-cy="at-library-models-card-view-btn">
|
|
32
33
|
<span class="mdi mdi-view-dashboard"></span>
|
|
@@ -63,6 +64,12 @@ export function renderLibraryCards(cardList) {
|
|
|
63
64
|
//@ts-ignore
|
|
64
65
|
yield setActiveLibraryCard(event.target.id);
|
|
65
66
|
}));
|
|
67
|
+
batchAddEventListenerByClassName('at_library_card_title', (event) => __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
//@ts-ignore
|
|
69
|
+
console.log('Event', event.target.id);
|
|
70
|
+
//@ts-ignore
|
|
71
|
+
yield setActiveLibraryCard(event.target.id);
|
|
72
|
+
}));
|
|
66
73
|
}
|
|
67
74
|
else {
|
|
68
75
|
libraryCardContainer.innerHTML = '<p>No objects in Library</p>';
|
|
@@ -86,6 +93,6 @@ export function renderLibraryList(cardList) {
|
|
|
86
93
|
}));
|
|
87
94
|
}
|
|
88
95
|
else {
|
|
89
|
-
libraryCardContainer.innerHTML = '
|
|
96
|
+
libraryCardContainer.innerHTML = `<p>${i18n.t('NoObjectsInLibrary')}</p>`;
|
|
90
97
|
}
|
|
91
98
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { _mpConfig } from "../../../architwin";
|
|
2
2
|
export let activeMenu;
|
|
3
3
|
export function renderMenuBar(iFrame) {
|
|
4
|
-
var _a;
|
|
5
4
|
if (!iFrame) {
|
|
6
5
|
console.error(`Could not find target iFrame`);
|
|
7
6
|
return;
|
|
@@ -10,7 +9,10 @@ export function renderMenuBar(iFrame) {
|
|
|
10
9
|
menuBarElement.classList.add('at_toolbar_container');
|
|
11
10
|
menuBarElement.setAttribute('id', 'at-menu-bar');
|
|
12
11
|
menuBarElement.setAttribute('data-cy', 'at-menu-bar');
|
|
13
|
-
|
|
12
|
+
let isMeetingEnabled = false;
|
|
13
|
+
if (_mpConfig.toolbarConfig && _mpConfig.toolbarConfig.menuItems && _mpConfig.toolbarConfig.menuItems.meeting) {
|
|
14
|
+
isMeetingEnabled = _mpConfig.toolbarConfig.menuItems.meeting;
|
|
15
|
+
}
|
|
14
16
|
console.log("__@ isMeetingEnabled: ", isMeetingEnabled);
|
|
15
17
|
menuBarElement.innerHTML = `
|
|
16
18
|
<div class="at_sidebar_button_icon">
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { renderObjectCard, renderObjectRow, setActiveCard } from "./card";
|
|
11
11
|
import { batchAddEventListenerByClassName, toggleActionBar, handleModelVisibility, handleDeleteModel } from "../../events";
|
|
12
|
+
import i18n from './i18n';
|
|
12
13
|
export function renderObjectListPane(cardList) {
|
|
13
14
|
const element = document.createElement('div');
|
|
14
15
|
element.classList.add('at_container');
|
|
@@ -20,12 +21,12 @@ export function renderObjectListPane(cardList) {
|
|
|
20
21
|
element.setAttribute('data-cy', 'at-object-list-pane');
|
|
21
22
|
element.innerHTML = `
|
|
22
23
|
<div class="at_panel_header">
|
|
23
|
-
<span
|
|
24
|
+
<span>${i18n.t('SpaceObjects')}</span>
|
|
24
25
|
</div>
|
|
25
26
|
<div class="at_button_row at_justify_end">
|
|
26
27
|
<div class="at_button at_ghost" id="at-browse-library-btn" data-cy="at-browse-library-btn" target-pane="at-library-pane">
|
|
27
28
|
<span class="mdi mdi-view-gallery"></span>
|
|
28
|
-
|
|
29
|
+
${i18n.t('BrowseLibrary')}
|
|
29
30
|
</div>
|
|
30
31
|
<div class="at_button at_ghost at_ghost_active" id="at-models-card-view-btn" data-cy="at-models-card-view-btn">
|
|
31
32
|
<span class="mdi mdi-view-dashboard"></span>
|
|
@@ -37,12 +38,12 @@ export function renderObjectListPane(cardList) {
|
|
|
37
38
|
<div class="at_scrollable_container at_h-min-60" id="at-object-cards" data-cy="at-object-cards">
|
|
38
39
|
|
|
39
40
|
</div>
|
|
40
|
-
<div class="at_button_row at_justify_end">
|
|
41
|
+
<!-- <div class="at_button_row at_justify_end">
|
|
41
42
|
<div class="at_button at_ghost" id="at-add-model-btn" data-cy="at-add-model-btn" target-pane="at-add-object-pane">
|
|
42
43
|
Add Model
|
|
43
44
|
<span class="mdi mdi-plus-circle-outline"></span>
|
|
44
45
|
</div>
|
|
45
|
-
</div>
|
|
46
|
+
</div> -->
|
|
46
47
|
`;
|
|
47
48
|
return element;
|
|
48
49
|
}
|
|
@@ -14,3 +14,4 @@ export declare function setTagCategoriesOption(): void;
|
|
|
14
14
|
export declare function toggleDropdown(elementId: string): void;
|
|
15
15
|
export declare function renderCategoryDropdownOptions(elementId: string, items: Array<ITagCategory>, toggleId?: string): void;
|
|
16
16
|
export declare function renderSubcategoryDropdownOptions(elementId: string, items: Array<ITagCategory>): void;
|
|
17
|
+
export declare function clearTagFormDropdown(): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { _tagCategories, _tags, getMpTags } from "../../../architwin";
|
|
2
2
|
import { convertToCssRgb, stringContains } from "../../../utils";
|
|
3
3
|
import { renderTags, setSelectedCategoryFilter, setSelectedSubcategoryFilter, filterTagList, getAllSubcategories } from './tagListPane';
|
|
4
|
+
import i18n from './i18n';
|
|
4
5
|
let mode = 'adding';
|
|
5
6
|
let tagNameInput, tagDescriptionInput, tagEmbedInput, tagCategoryDropdown, tagSubcategoryDropdown;
|
|
6
7
|
let selectedCategoryId = undefined;
|
|
@@ -19,20 +20,14 @@ export function renderTagFormPane() {
|
|
|
19
20
|
element.setAttribute('data-cy', 'at-tag-form-pane');
|
|
20
21
|
element.innerHTML = `
|
|
21
22
|
<div class="at_panel_header">
|
|
22
|
-
<span
|
|
23
|
+
<span>${i18n.t('Tags')}</span>
|
|
23
24
|
</div>
|
|
24
25
|
<div class="at_form_container at_h-min-65">
|
|
25
|
-
<!-- <div class="at_field at_flex_row" style="${_tagCategories ? '' : 'display: none;'}">
|
|
26
|
-
<label for="">Category</label>
|
|
27
|
-
<select class="at_transparent_dropdown at_w-full" name="" id="at-category-dropdown" data-cy="at-category-dropdown">
|
|
28
|
-
<option value="none" selected>No category</option>
|
|
29
|
-
</select>
|
|
30
|
-
</div> -->
|
|
31
26
|
<div class="at_field at_flex_column" style="${_tagCategories ? '' : 'display: none;'}">
|
|
32
|
-
<label for=""
|
|
27
|
+
<label for="">${i18n.t('Category')}</label>
|
|
33
28
|
<div class="at_dropdown" id="at-custom-category-dropdown" data-cy="at-custom-category-dropdown">
|
|
34
29
|
<div class="at_flex at_flex_row at_space_between">
|
|
35
|
-
<div class="at_dropdown_toggle" id="at-category-dropdown-toggle" data-cy="at-category-dropdown-toggle"
|
|
30
|
+
<div class="at_dropdown_toggle" id="at-category-dropdown-toggle" data-cy="at-category-dropdown-toggle">${i18n.t('NoSelection')}</div>
|
|
36
31
|
<span class="mdi mdi-triangle-down at_chevron" id="at-category-chevron" data-cy="at-category-chevron"></span>
|
|
37
32
|
</div>
|
|
38
33
|
<div style="position:absolute;">
|
|
@@ -42,17 +37,11 @@ export function renderTagFormPane() {
|
|
|
42
37
|
</div>
|
|
43
38
|
</div>
|
|
44
39
|
</div>
|
|
45
|
-
<!-- <div class="at_field at_flex_column" style="${_tagCategories ? '' : 'display: none;'}">
|
|
46
|
-
<label for="">Subcategory</label>
|
|
47
|
-
<select class="at_transparent_dropdown" name="" id="at-subcategory-dropdown" data-cy="at-subcategory-dropdown">
|
|
48
|
-
<option value="none" selected>No subcategory</option>
|
|
49
|
-
</select>
|
|
50
|
-
</div> -->
|
|
51
40
|
<div class="at_field at_flex_column" style="${_tagCategories ? '' : 'display: none;'}">
|
|
52
|
-
<label for=""
|
|
41
|
+
<label for="">${i18n.t('Subcategory')}</label>
|
|
53
42
|
<div class="at_dropdown" id="at-custom-subcategory-dropdown" data-cy="at-custom-subcategory-dropdown">
|
|
54
43
|
<div class="at_flex at_flex_row at_space_between">
|
|
55
|
-
<div class="at_dropdown_toggle" id="at-subcategory-dropdown-toggle" data-cy="at-subcategory-dropdown-toggle"
|
|
44
|
+
<div class="at_dropdown_toggle" id="at-subcategory-dropdown-toggle" data-cy="at-subcategory-dropdown-toggle">${i18n.t('NoSelection')}</div>
|
|
56
45
|
<span class="mdi mdi-triangle-down at_chevron" id="at-subcategory-chevron" data-cy="at-subcategory-chevron"></span>
|
|
57
46
|
</div>
|
|
58
47
|
<div style="position:absolute;">
|
|
@@ -63,29 +52,29 @@ export function renderTagFormPane() {
|
|
|
63
52
|
</div>
|
|
64
53
|
</div>
|
|
65
54
|
<div class="at-field at_flex_row">
|
|
66
|
-
<label for=""
|
|
55
|
+
<label for="">${i18n.t('TagName')}</label>
|
|
67
56
|
<input class="at_field_input at_w-full" type="text" name="tag_name" id="at-tag-name-input" data-cy="at-tag-name-input" placeholder="Ex: Wall Painting">
|
|
68
57
|
</div>
|
|
69
58
|
<div class="at_field at_flex_row at_items_center">
|
|
70
|
-
<label for=""
|
|
59
|
+
<label for="">${i18n.t('MoveTag')}</label>
|
|
71
60
|
<span class="mdi mdi-map-marker at_icon" id="at-move-tag-btn" data-cy="at-move-tag-btn"></span>
|
|
72
61
|
</div>
|
|
73
62
|
<div class="at-field at_flex_column">
|
|
74
|
-
<label for=""
|
|
63
|
+
<label for="">${i18n.t('Description')}</label>
|
|
75
64
|
<textarea name="" id="at-tag-description-input" data-cy="at-tag-description-input" class="at_textarea"></textarea>
|
|
76
65
|
</div>
|
|
77
66
|
<div class="at-field at_flex_column">
|
|
78
|
-
<label for=""
|
|
67
|
+
<label for="">${i18n.t('EmbedMedia')}</label>
|
|
79
68
|
<textarea name="" id="at-tag-embed-input" data-cy="at-tag-embed-input" class="at_textarea"></textarea>
|
|
80
69
|
</div>
|
|
81
70
|
</div>
|
|
82
71
|
<div class="at_button_row at_justify_between" >
|
|
83
72
|
<div class="at_button at_ghost" style="margin-top: auto;" id="at-cancel-tag-form-btn" data-cy="at-cancel-tag-form-btn" target-pane="at-tag-list-pane">
|
|
84
|
-
Cancel
|
|
73
|
+
${i18n.t('Cancel')}
|
|
85
74
|
<span class="mdi mdi-close-circle-outline"></span>
|
|
86
75
|
</div>
|
|
87
76
|
<div class="at_button at_ghost" id="at-save-tag-btn" data-cy="at-save-tag-btn">
|
|
88
|
-
|
|
77
|
+
${i18n.t('SaveTag')}
|
|
89
78
|
<span class="mdi mdi-plus-circle-outline"></span>
|
|
90
79
|
</div>
|
|
91
80
|
</div>
|
|
@@ -124,35 +113,6 @@ export function initFormData(tagId) {
|
|
|
124
113
|
const subcatOption = createOptionElement(selectectedSubcategory, 'subcategory');
|
|
125
114
|
selectOption(subcatOption, 'at-subcategory-dropdown-toggle', true);
|
|
126
115
|
}
|
|
127
|
-
// const tagCategoryOption = tagCategoryDropdown.querySelector(`option[value="${tagCategory.uuid}"]`) as HTMLOptionElement
|
|
128
|
-
// if (tagCategoryOption) {
|
|
129
|
-
// tagCategoryOption.selected = true;
|
|
130
|
-
// tagCategoryDropdown.dispatchEvent(new Event('change'));
|
|
131
|
-
// //make sure the subcategory dropdown is updated based on selected category dropdown
|
|
132
|
-
// handleCategoryDropdownChange
|
|
133
|
-
// }
|
|
134
|
-
// const tagSubcategoryOption = tagSubcategoryDropdown.querySelector(`option[value="${targetTag.category_uuid}"]`) as HTMLOptionElement
|
|
135
|
-
// console.log('tagSubCategoryId', tagSubcategoryOption, targetTag.category_uuid)
|
|
136
|
-
// if (tagSubcategoryOption) {
|
|
137
|
-
// tagSubcategoryOption.selected = true;
|
|
138
|
-
// tagSubcategoryDropdown.dispatchEvent(new Event('change'));
|
|
139
|
-
// handleSubCategoryDropdownChange
|
|
140
|
-
// }
|
|
141
|
-
// if (tagNameInput) {
|
|
142
|
-
// const tagName = tagNameInput.value
|
|
143
|
-
// const tagDescription = tagDescriptionInput.value
|
|
144
|
-
// const tagEmbed = tagEmbedInput.value
|
|
145
|
-
// const formData:{tagName:string,tagDescription:string,tagEmbed:string,tagCategoryId?:string,tagSubcategoryId?:string} = {
|
|
146
|
-
// tagName: tagName,
|
|
147
|
-
// tagDescription: tagDescription,
|
|
148
|
-
// tagEmbed: tagEmbed,
|
|
149
|
-
// }
|
|
150
|
-
// if(_tagCategories){
|
|
151
|
-
// formData.tagCategoryId = selectedCategoryId
|
|
152
|
-
// formData.tagSubcategoryId = selectedSubCategoryId
|
|
153
|
-
// }
|
|
154
|
-
// return formData
|
|
155
|
-
// }
|
|
156
116
|
return;
|
|
157
117
|
}
|
|
158
118
|
return;
|
|
@@ -267,31 +227,8 @@ function handleCategoryDropdownChange(event) {
|
|
|
267
227
|
}
|
|
268
228
|
export function setTagCategoriesOption() {
|
|
269
229
|
if (_tagCategories) {
|
|
270
|
-
// console.log("application will use tag categories", _tagCategories)
|
|
271
|
-
// const selectElementCategoryDropdown = document.getElementById('at-category-dropdown');
|
|
272
|
-
// clearDropdown(selectElementCategoryDropdown)
|
|
273
|
-
// const selectElementSubcategoryDropdown = document.getElementById('at-subcategory-dropdown');
|
|
274
|
-
// console.log('selectElementSubcategoryDropdown', selectElementSubcategoryDropdown)
|
|
275
|
-
// clearDropdown(selectElementSubcategoryDropdown)
|
|
276
|
-
// console.log('selectElementCategoryDropdown', selectElementCategoryDropdown)
|
|
277
|
-
// const defaultOption = document.createElement('option');
|
|
278
|
-
// defaultOption.value = 'none';
|
|
279
|
-
// defaultOption.textContent = 'No Category';
|
|
280
|
-
// selectElementCategoryDropdown.appendChild(defaultOption);
|
|
281
|
-
// _tagCategories.forEach((category, index) => {
|
|
282
|
-
// const option = document.createElement('option');
|
|
283
|
-
// option.value = category.uuid;
|
|
284
|
-
// option.textContent = category.name;
|
|
285
|
-
// // // Set the "selected" attribute for the first option if it's the default option
|
|
286
|
-
// // if (index === 0) {
|
|
287
|
-
// // option.selected = true;
|
|
288
|
-
// // }
|
|
289
|
-
// console.log("option", option)
|
|
290
|
-
// selectElementCategoryDropdown.appendChild(option);
|
|
291
|
-
// });
|
|
292
230
|
//Render options of new dropdown
|
|
293
231
|
renderCategoryDropdownOptions('at-category-options', _tagCategories);
|
|
294
|
-
//selectElementCategoryDropdown.addEventListener("change", handleCategoryDropdownChange)
|
|
295
232
|
}
|
|
296
233
|
else {
|
|
297
234
|
console.log("application will not use tag categories");
|
|
@@ -404,7 +341,7 @@ export function renderCategoryDropdownOptions(elementId, items, toggleId) {
|
|
|
404
341
|
noSelection.classList.add('at_option');
|
|
405
342
|
noSelection.setAttribute('category-uuid', '');
|
|
406
343
|
noSelection.innerHTML = `
|
|
407
|
-
<span class="mdi mdi-circle-slice-1"></span>
|
|
344
|
+
<span class="mdi mdi-circle-slice-1"></span> ${i18n.t('NoSelection')}
|
|
408
345
|
`;
|
|
409
346
|
element.appendChild(noSelection);
|
|
410
347
|
if (items.length <= 0) {
|
|
@@ -443,7 +380,7 @@ export function renderSubcategoryDropdownOptions(elementId, items) {
|
|
|
443
380
|
element.innerHTML = ``;
|
|
444
381
|
const selectedSubcategoryOption = document.getElementById(isFilterDropdown ? 'at-subcategory-filter-dropdown-toggle' : 'at-subcategory-dropdown-toggle');
|
|
445
382
|
if (selectedSubcategoryOption) {
|
|
446
|
-
selectedSubcategoryOption.textContent = '
|
|
383
|
+
selectedSubcategoryOption.textContent = `${i18n.t('NoSelection')}`;
|
|
447
384
|
selectedSubCategoryId = undefined;
|
|
448
385
|
}
|
|
449
386
|
//Add the no selection option
|
|
@@ -451,7 +388,7 @@ export function renderSubcategoryDropdownOptions(elementId, items) {
|
|
|
451
388
|
noSelection.classList.add('at_option');
|
|
452
389
|
noSelection.setAttribute('category-uuid', '');
|
|
453
390
|
noSelection.innerHTML = `
|
|
454
|
-
<span class="mdi mdi-circle-slice-1"></span>
|
|
391
|
+
<span class="mdi mdi-circle-slice-1"></span> ${i18n.t('NoSelection')}
|
|
455
392
|
`;
|
|
456
393
|
element.appendChild(noSelection);
|
|
457
394
|
if (items.length <= 0) {
|
|
@@ -479,3 +416,14 @@ export function renderSubcategoryDropdownOptions(elementId, items) {
|
|
|
479
416
|
element.appendChild(option);
|
|
480
417
|
});
|
|
481
418
|
}
|
|
419
|
+
export function clearTagFormDropdown() {
|
|
420
|
+
console.log("clearTagFormDropdown()");
|
|
421
|
+
const noSelection = document.createElement('div');
|
|
422
|
+
noSelection.classList.add('at_option');
|
|
423
|
+
noSelection.setAttribute('category-uuid', '');
|
|
424
|
+
noSelection.innerHTML = `
|
|
425
|
+
<span class="mdi mdi-circle-slice-1"></span> ${i18n.t('NoSelection')}
|
|
426
|
+
`;
|
|
427
|
+
selectOption(noSelection, 'at-category-dropdown-toggle', true);
|
|
428
|
+
selectOption(noSelection, 'at-subcategory-dropdown-toggle', true);
|
|
429
|
+
}
|
|
@@ -14,6 +14,7 @@ import { gotoTag, disposeTag, dispatchSpaceEvent, _tags } from "../../../architw
|
|
|
14
14
|
import { initFormData, toggleDropdown } from "./tagFormPane";
|
|
15
15
|
import { Notyf } from 'notyf';
|
|
16
16
|
import { _tagCategories } from "../../../architwin";
|
|
17
|
+
import i18n from './i18n';
|
|
17
18
|
let notify = new Notyf({ position: { x: 'left', y: 'bottom' } });
|
|
18
19
|
let _tagLink;
|
|
19
20
|
let isChevronEventAdded = false;
|
|
@@ -30,14 +31,14 @@ export function renderTagListPane() {
|
|
|
30
31
|
element.setAttribute('data-cy', 'at-tag-list-pane');
|
|
31
32
|
element.innerHTML = `
|
|
32
33
|
<div class="at_panel_header">
|
|
33
|
-
<span
|
|
34
|
+
<span>${i18n.t('Tags')}</span>
|
|
34
35
|
</div>
|
|
35
36
|
<div class="at_form_container at_h-min-65">
|
|
36
37
|
<div class="at_field at_flex_column" style="${_tagCategories ? '' : 'display: none;'}">
|
|
37
|
-
<label for=""
|
|
38
|
+
<label for="">${i18n.t('Category')}</label>
|
|
38
39
|
<div class="at_dropdown" id="at-custom-category-filter-dropdown" data-cy="at-custom-category-filter-dropdown">
|
|
39
40
|
<div class="at_flex at_flex_row at_space_between">
|
|
40
|
-
<div class="at_dropdown_toggle" id="at-category-filter-dropdown-toggle" data-cy="at-category-filter-dropdown-toggle"
|
|
41
|
+
<div class="at_dropdown_toggle" id="at-category-filter-dropdown-toggle" data-cy="at-category-filter-dropdown-toggle">${i18n.t('NoSelection')}</div>
|
|
41
42
|
<span class="mdi mdi-triangle-down at_chevron" id="at-category-filter-chevron" data-cy="at-category-filter-chevron"></span>
|
|
42
43
|
</div>
|
|
43
44
|
<div style="position:absolute;">
|
|
@@ -48,10 +49,10 @@ export function renderTagListPane() {
|
|
|
48
49
|
</div>
|
|
49
50
|
</div>
|
|
50
51
|
<div class="at_field at_flex_column" style="${_tagCategories ? '' : 'display: none;'}">
|
|
51
|
-
<label for=""
|
|
52
|
+
<label for="">${i18n.t('Subcategory')}</label>
|
|
52
53
|
<div class="at_dropdown" id="at-custom-subcategory-filter-dropdown" data-cy="at-custom-subcategory-filter-dropdown">
|
|
53
54
|
<div class="at_flex at_flex_row at_space_between">
|
|
54
|
-
<div class="at_dropdown_toggle" id="at-subcategory-filter-dropdown-toggle" data-cy="at-subcategory-filter-dropdown-toggle"
|
|
55
|
+
<div class="at_dropdown_toggle" id="at-subcategory-filter-dropdown-toggle" data-cy="at-subcategory-filter-dropdown-toggle">${i18n.t('NoSelection')}</div>
|
|
55
56
|
<span class="mdi mdi-triangle-down at_chevron" id="at-subcategory-filter-chevron" data-cy="at-subcategory-filter-chevron"></span>
|
|
56
57
|
</div>
|
|
57
58
|
<div style="position:absolute;">
|
|
@@ -68,7 +69,7 @@ export function renderTagListPane() {
|
|
|
68
69
|
</div>
|
|
69
70
|
<div class="at_button_row at_justify_end" style="">
|
|
70
71
|
<div class="at_button at_ghost" id="at-add-tag-btn" data-cy="at-add-tag-btn" target-pane="at-tag-form-pane">
|
|
71
|
-
|
|
72
|
+
${i18n.t('AddTag')}
|
|
72
73
|
<span class="mdi mdi-plus-circle-outline"></span>
|
|
73
74
|
</div>
|
|
74
75
|
</div>
|
|
@@ -6,6 +6,7 @@ import 'notyf/notyf.min.css';
|
|
|
6
6
|
import { parseISO } from 'date-fns';
|
|
7
7
|
import { formatWithOptions } from "date-fns/fp";
|
|
8
8
|
import { ja } from "date-fns/locale";
|
|
9
|
+
import i18n from './i18n';
|
|
9
10
|
let notyf = new Notyf({ position: { x: 'left', y: 'bottom' } });
|
|
10
11
|
export function renderTagMessagingPane() {
|
|
11
12
|
const element = document.createElement('div');
|
|
@@ -21,7 +22,7 @@ export function renderTagMessagingPane() {
|
|
|
21
22
|
<div class="at_button_row at_justify_between">
|
|
22
23
|
<div>
|
|
23
24
|
<div class="at_colored-indicator" id="at-tag-color-messaging" style="background-color:rgb(0,0,0)"></div>
|
|
24
|
-
<span id='at-tag-name-messaging'
|
|
25
|
+
<span id='at-tag-name-messaging'>${i18n.t('TagName')}</span>
|
|
25
26
|
</div>
|
|
26
27
|
<span class="mdi mdi-keyboard-return at_icon" id="at-cancel-tag-message-btn" data-cy="at-cancel-tag-message-btn" target-pane="at-tag-list-pane"></span>
|
|
27
28
|
</div>
|
|
@@ -31,7 +32,7 @@ export function renderTagMessagingPane() {
|
|
|
31
32
|
<label for="at-chat-media-file-input"><span class="mdi mdi-image-plus at_icon" id="at-upload-chat-media" data-cy="at-upload-chat-media"></span></label>
|
|
32
33
|
<input type="file" style="display:none" id="at-chat-media-file-input"/>
|
|
33
34
|
<select class="at_transparent_dropdown at_w-full" name="" id="at-recepient-dropdown" data-cy="at-recepient-dropdown">
|
|
34
|
-
<option value="none" selected
|
|
35
|
+
<option value="none" selected>${i18n.t('NoRecipient')}</option>
|
|
35
36
|
</select>
|
|
36
37
|
</div>
|
|
37
38
|
<div class="at_field at_flex_row">
|
|
@@ -87,7 +88,7 @@ export function renderTagMessages() {
|
|
|
87
88
|
}
|
|
88
89
|
else {
|
|
89
90
|
chatContainer.innerHTML = `
|
|
90
|
-
<span data-cy="at-no-messages-prompt" id="at-no-message"
|
|
91
|
+
<span data-cy="at-no-messages-prompt" id="at-no-message">${i18n.t('NoMessages')}</span>
|
|
91
92
|
`;
|
|
92
93
|
}
|
|
93
94
|
return;
|
|
@@ -244,7 +245,7 @@ export function createTagMessage() {
|
|
|
244
245
|
//Clear forms
|
|
245
246
|
clearSelectedMedia();
|
|
246
247
|
clearTagMessageInput();
|
|
247
|
-
notyf.success(
|
|
248
|
+
notyf.success(`${i18n.t('MessageSentSuccess')}`);
|
|
248
249
|
return message;
|
|
249
250
|
}
|
|
250
251
|
export function setTagMessagingDetails(tagId) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const themes = ['azusa', 'forest', 'aqua', 'night', 'light', 'retro'];
|
|
2
2
|
import { _mpConfig } from "../../../architwin";
|
|
3
|
+
import i18n from './i18n';
|
|
3
4
|
let activeThemeCard;
|
|
4
5
|
export function renderThemePane() {
|
|
5
6
|
const element = document.createElement('div');
|
|
@@ -12,7 +13,7 @@ export function renderThemePane() {
|
|
|
12
13
|
element.setAttribute('data-cy', 'at-theme-pane');
|
|
13
14
|
element.innerHTML = `
|
|
14
15
|
<div class="at_panel_header">
|
|
15
|
-
<span
|
|
16
|
+
<span>${i18n.t('Theme')}</span>
|
|
16
17
|
</div>
|
|
17
18
|
<div class="at_scrollable_container" >
|
|
18
19
|
<div class="at_flex_tiles" id="at-theme-cards" data-cy="at-theme-cards">
|
|
@@ -44,11 +45,11 @@ export function renderThemePane() {
|
|
|
44
45
|
</div>
|
|
45
46
|
<div class="at_button_row at_justify_between" >
|
|
46
47
|
<div class="at_button at_ghost" style="margin-top: auto;" id="at-cancel-theme-btn" data-cy="at-cancel-theme-btn" target-pane="at-object-list-pane">
|
|
47
|
-
Cancel
|
|
48
|
+
${i18n.t('Cancel')}
|
|
48
49
|
<span class="mdi mdi-close-circle-outline"></span>
|
|
49
50
|
</div>
|
|
50
51
|
<div class="at_button at_ghost" id="at-save-customization-btn">
|
|
51
|
-
Save
|
|
52
|
+
${i18n.t('Save')}
|
|
52
53
|
<span class="mdi mdi-content-save"></span>
|
|
53
54
|
</div>
|
|
54
55
|
</div>
|
package/lib/atwinui/events.js
CHANGED
|
@@ -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 { actionBar, renderObjectCards, renderLibraryCards, renderTags, renderTagRow, getTagFormData, addClickEventToTagRow, setActiveCard, setActiveMenu, setActiveActionBtn, removeObjectCard, setTagCategoriesOption, toggleDropdown, tagFormMode, selectedTag, renderRecepientOptions, renderTagMessages, createTagMessage, setTagLink, setTagMessagingDetails, renderCategoryDropdownOptions } from "./components/toolbar";
|
|
10
|
+
import { actionBar, renderObjectCards, renderLibraryCards, renderTags, renderTagRow, getTagFormData, addClickEventToTagRow, setActiveCard, setActiveMenu, setActiveActionBtn, removeObjectCard, setTagCategoriesOption, toggleDropdown, tagFormMode, selectedTag, renderRecepientOptions, renderTagMessages, createTagMessage, setTagLink, setTagMessagingDetails, renderCategoryDropdownOptions, clearTagFormDropdown } from "./components/toolbar";
|
|
11
11
|
import { getTargetPosition, addMediaScreen, _3DXObjects, selectedObject, setTransformControls, copyObject, revertTransform, clearSelectedObject, removeTransformControls, getLibrary, getMpTags, renderTag, captureSpaceScreenshot, moveTag, subscribeSpaceEvent, setModelVisibility, disposeModel, disposeTag, _tags, _tagCategories, dispatchSpaceEvent, editTagLabel, editTagDescription, setTagMessageRecepients, setTagMessages, setSelectedTagUuid, renderMeetingSidebar, setTagIcon, } from "../architwin";
|
|
12
12
|
import { Notyf } from 'notyf';
|
|
13
13
|
import 'notyf/notyf.min.css';
|
|
@@ -15,6 +15,7 @@ import { SPACE_EVENTS } from "../types";
|
|
|
15
15
|
import { initFormData } from "./components/toolbar/tagFormPane";
|
|
16
16
|
import { renderObjectList } from "./components/toolbar/objectListPane";
|
|
17
17
|
import { renderLibraryList } from "./components/toolbar/libraryPane";
|
|
18
|
+
import i18n from './components/toolbar/i18n';
|
|
18
19
|
let activeToolbarItem, activeActionItem, activePane, activeActionPane;
|
|
19
20
|
let notyf = new Notyf({ position: { x: 'left', y: 'bottom' }, duration: 4500 });
|
|
20
21
|
let currentTag = undefined;
|
|
@@ -88,7 +89,7 @@ function toggleDisplayPane(targetId) {
|
|
|
88
89
|
const tagRow = document.getElementById(`at-tag-row-${tagId}`);
|
|
89
90
|
console.log("tagRow", tagRow);
|
|
90
91
|
tagRow.remove();
|
|
91
|
-
notyf.success(
|
|
92
|
+
notyf.success(`${i18n.t('SuccessDeleteTag')}`);
|
|
92
93
|
currentTag = undefined;
|
|
93
94
|
}
|
|
94
95
|
else {
|
|
@@ -273,12 +274,13 @@ function handlePlaceTag() {
|
|
|
273
274
|
tagContainer.appendChild(row);
|
|
274
275
|
addClickEventToTagRow(iTag);
|
|
275
276
|
// toggleDisplayPane('at-cancel-tag-form-btn')
|
|
276
|
-
notyf.success(
|
|
277
|
+
notyf.success(`${i18n.t('SuccessAddTagToSpace')}`);
|
|
277
278
|
const tags = getMpTags();
|
|
278
279
|
_tags[tags.length - 1].category_uuid = payload.tagSubcategoryId;
|
|
279
280
|
currentTag = _tags[_tags.length - 1];
|
|
280
281
|
console.log('_tags', _tags);
|
|
281
282
|
console.log("Last Tag Pushed", currentTag);
|
|
283
|
+
clearTagFormDropdown();
|
|
282
284
|
}
|
|
283
285
|
}
|
|
284
286
|
else {
|
|
@@ -299,7 +301,7 @@ function handlePlaceTag() {
|
|
|
299
301
|
tagContainer.appendChild(row);
|
|
300
302
|
addClickEventToTagRow(iTag);
|
|
301
303
|
// toggleDisplayPane('at-cancel-tag-form-btn')
|
|
302
|
-
notyf.success(
|
|
304
|
+
notyf.success(`${i18n.t('SuccessAddTagToSpace')}`);
|
|
303
305
|
const tags = getMpTags();
|
|
304
306
|
currentTag = tags[tags.length - 1];
|
|
305
307
|
console.log("Last Tag Pushed", tags[tags.length - 1]);
|
|
@@ -327,7 +329,7 @@ function handlePlaceTag() {
|
|
|
327
329
|
tagContainer.appendChild(row);
|
|
328
330
|
addClickEventToTagRow(iTag);
|
|
329
331
|
// toggleDisplayPane('at-cancel-tag-form-btn')
|
|
330
|
-
notyf.success(
|
|
332
|
+
notyf.success(`${i18n.t('SuccessAddTagToSpace')}`);
|
|
331
333
|
const tags = getMpTags();
|
|
332
334
|
console.log("tags", tags);
|
|
333
335
|
console.log("_tags", _tags);
|
|
@@ -359,7 +361,7 @@ function handlePlaceTag() {
|
|
|
359
361
|
tagContainer.appendChild(row);
|
|
360
362
|
addClickEventToTagRow(iTag);
|
|
361
363
|
// toggleDisplayPane('at-cancel-tag-form-btn')
|
|
362
|
-
notyf.success(
|
|
364
|
+
notyf.success(`${i18n.t('SuccessAddTagToSpace')}`);
|
|
363
365
|
const tags = getMpTags();
|
|
364
366
|
console.log("tags", tags);
|
|
365
367
|
console.log("_tags", _tags);
|
|
@@ -395,7 +397,7 @@ function handleDisposeTag() {
|
|
|
395
397
|
const tagRow = document.getElementById(`at-tag-row-${tagId}`);
|
|
396
398
|
console.log("tagRow", tagRow);
|
|
397
399
|
tagRow.remove();
|
|
398
|
-
notyf.success(
|
|
400
|
+
notyf.success(`${i18n.t('SuccessDeleteTag')}`);
|
|
399
401
|
currentTag = undefined;
|
|
400
402
|
}
|
|
401
403
|
else {
|
|
@@ -506,7 +508,7 @@ function handleScreenshot() {
|
|
|
506
508
|
const screenshotBtn = document.getElementById('at-screenshot-btn');
|
|
507
509
|
screenshotBtn.addEventListener('click', () => __awaiter(this, void 0, void 0, function* () {
|
|
508
510
|
function onComplete() {
|
|
509
|
-
notyf.success(
|
|
511
|
+
notyf.success(`${i18n.t('ScreenshotSaved')}`);
|
|
510
512
|
}
|
|
511
513
|
yield captureSpaceScreenshot(onComplete);
|
|
512
514
|
}));
|
|
@@ -732,7 +734,7 @@ function handleCopyTagLink(link) {
|
|
|
732
734
|
console.log("handleCopyTagLink()", link);
|
|
733
735
|
setTagLink(link);
|
|
734
736
|
navigator.clipboard.writeText(link);
|
|
735
|
-
notyf.success(
|
|
737
|
+
notyf.success(`${i18n.t('SuccessCopyTagLink')}`);
|
|
736
738
|
}
|
|
737
739
|
export {
|
|
738
740
|
//state
|
package/lib/atwinui/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import { renderToolbarUI, setActiveMenu, setActiveActionBtn, setActiveThemeCard
|
|
|
19
19
|
// tagFormPane:HTMLElement,
|
|
20
20
|
// addMediaScreenForm:HTMLElement
|
|
21
21
|
const sidebarPaneBtnIds = [
|
|
22
|
-
'at-add-model-btn',
|
|
22
|
+
//'at-add-model-btn',
|
|
23
23
|
'at-add-tag-btn',
|
|
24
24
|
'at-cancel-add-object-btn',
|
|
25
25
|
'at-close-action-bar-btn',
|
|
@@ -601,7 +601,7 @@ export class Plane {
|
|
|
601
601
|
tex.format = THREE.RGBAFormat;
|
|
602
602
|
tex.needsUpdate = true; //This should be true in order to update the texture
|
|
603
603
|
});
|
|
604
|
-
const pauseBtnUrl = `${this.staticAssetPath}
|
|
604
|
+
const pauseBtnUrl = `${this.staticAssetPath}static/pauseicon.png`;
|
|
605
605
|
this.pauseBtnTexture = new THREE.TextureLoader()
|
|
606
606
|
.load(pauseBtnUrl, (tex = this.pauseBtnTexture) => {
|
|
607
607
|
tex.minFilter = THREE.LinearFilter;
|
|
@@ -463,7 +463,7 @@ class PlaneVideo {
|
|
|
463
463
|
tex.format = THREE.RGBAFormat;
|
|
464
464
|
tex.needsUpdate = true; //This should be true in order to update the texture
|
|
465
465
|
});
|
|
466
|
-
const pauseBtnUrl = `${_staticAssetPath}
|
|
466
|
+
const pauseBtnUrl = `${_staticAssetPath}static/pauseicon.png`;
|
|
467
467
|
this.pauseBtnTexture = new THREE.TextureLoader()
|
|
468
468
|
.load(pauseBtnUrl, (tex = this.pauseBtnTexture) => {
|
|
469
469
|
tex.minFilter = THREE.LinearFilter;
|
package/lib/types.d.ts
CHANGED
package/lib/utils.d.ts
CHANGED
|
@@ -25,3 +25,4 @@ export declare function arrayBufferToBase64(buffer: any): string;
|
|
|
25
25
|
export declare function isUrlValid(userInput: string): boolean;
|
|
26
26
|
export declare function dateTimeFormat(d: any): string;
|
|
27
27
|
export declare function stringContains(str: string, target: string, isCaseSensitive?: boolean): boolean;
|
|
28
|
+
export declare function getURLParams(param: string): string;
|
package/lib/utils.js
CHANGED
|
@@ -115,3 +115,8 @@ export function stringContains(str, target, isCaseSensitive = false) {
|
|
|
115
115
|
}
|
|
116
116
|
return str.toLowerCase().includes(target.toLowerCase());
|
|
117
117
|
}
|
|
118
|
+
export function getURLParams(param) {
|
|
119
|
+
const queryParams = new URLSearchParams(window.location.search);
|
|
120
|
+
const paramValue = queryParams.get(param);
|
|
121
|
+
return paramValue;
|
|
122
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "architwin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.80",
|
|
4
4
|
"description": "ArchiTwin Library for Matterport",
|
|
5
5
|
"main": "./lib/architwin.js",
|
|
6
6
|
"types": "./lib/architwin.d.ts",
|
|
@@ -33,6 +33,9 @@
|
|
|
33
33
|
"@zoom/videosdk": "^1.8.7",
|
|
34
34
|
"axios": "^1.4.0",
|
|
35
35
|
"date-fns": "^2.30.0",
|
|
36
|
+
"i18next": "^23.7.11",
|
|
37
|
+
"i18next-browser-languagedetector": "^7.2.0",
|
|
38
|
+
"i18next-http-backend": "^2.4.2",
|
|
36
39
|
"jsrsasign": "^10.8.6",
|
|
37
40
|
"jszip": "^3.10.1",
|
|
38
41
|
"jszip-utils": "^0.1.0",
|