architwin 1.0.98 → 1.1.2
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/architwin.js +1 -1
- package/lib/atwinui/components/toolbar/index.d.ts +2 -2
- package/lib/atwinui/components/toolbar/index.js +2 -2
- package/lib/atwinui/components/toolbar/menuBar.js +11 -10
- package/lib/atwinui/components/toolbar/tagFormPane.d.ts +1 -0
- package/lib/atwinui/components/toolbar/tagFormPane.js +44 -12
- package/lib/atwinui/components/toolbar/tagListPane.js +8 -8
- package/lib/atwinui/events.js +88 -78
- package/lib/atwinui/index.js +14 -13
- package/lib/loaders/planeGeometry2.js +89 -88
- package/lib/minimap.js +36 -35
- package/lib/tag.js +57 -56
- package/lib/types.d.ts +3 -0
- package/package.json +2 -1
|
@@ -12,7 +12,7 @@ import { renderTagMessagingPane } from "./tagMessagingPane";
|
|
|
12
12
|
import { renderThemePane, setActiveThemeCard } from "./themePane";
|
|
13
13
|
import { setActiveCard, setActiveLibraryCard, clearActiveCard, clearActiveLibraryCard } from "./card";
|
|
14
14
|
import { renderRecepientOptions, renderTagMessages, createTagMessage, setTagMessagingDetails } from "./tagMessagingPane";
|
|
15
|
-
import { clearTagFormDropdown } from "./tagFormPane";
|
|
15
|
+
import { clearTagFormDropdown, clearTagFilterDropdown } from "./tagFormPane";
|
|
16
16
|
import { renderModal, toggleModal } from "./modal";
|
|
17
17
|
import { renderModelControlPane, toggleModelControl } from "./modelControlsPane";
|
|
18
18
|
import { getURLParams } from "../../../utils";
|
|
@@ -99,4 +99,4 @@ function renderToolbarUI(payload) {
|
|
|
99
99
|
tagMessagingPane.style.display = 'none';
|
|
100
100
|
themePane.style.display = 'none';
|
|
101
101
|
}
|
|
102
|
-
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, getObjectListStatus, toggleModal, toggleModelControl };
|
|
102
|
+
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, clearTagFilterDropdown, getObjectListStatus, toggleModal, toggleModelControl };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { _mpConfig } from "../../../architwin";
|
|
2
|
+
import log from 'loglevel';
|
|
2
3
|
export let activeMenu;
|
|
3
4
|
export let isObjectListEnabled = true;
|
|
4
5
|
export function renderMenuBar(iFrame) {
|
|
5
6
|
if (!iFrame) {
|
|
6
|
-
|
|
7
|
+
log.error(`Could not find target iFrame`);
|
|
7
8
|
return;
|
|
8
9
|
}
|
|
9
10
|
const menuBarElement = document.createElement('div');
|
|
@@ -14,10 +15,10 @@ export function renderMenuBar(iFrame) {
|
|
|
14
15
|
if (_mpConfig.toolbarConfig && _mpConfig.toolbarConfig.menuItems && _mpConfig.toolbarConfig.menuItems.meeting) {
|
|
15
16
|
isMeetingEnabled = _mpConfig.toolbarConfig.menuItems.meeting;
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
+
log.info("__@ isMeetingEnabled: ", isMeetingEnabled);
|
|
18
19
|
if (_mpConfig.toolbarConfig && _mpConfig.toolbarConfig.menuItems && _mpConfig.toolbarConfig.menuItems.models !== undefined) {
|
|
19
20
|
isObjectListEnabled = _mpConfig.toolbarConfig.menuItems.models;
|
|
20
|
-
|
|
21
|
+
log.info("__@ isObjectListEnabled: ", isObjectListEnabled);
|
|
21
22
|
}
|
|
22
23
|
menuBarElement.innerHTML = `
|
|
23
24
|
<div class="at_sidebar_button_icon">
|
|
@@ -42,10 +43,10 @@ export function renderMenuBar(iFrame) {
|
|
|
42
43
|
return menuBarElement;
|
|
43
44
|
}
|
|
44
45
|
export function setActiveMenu(id) {
|
|
45
|
-
|
|
46
|
+
log.info("setActiveMenu id: ", id);
|
|
46
47
|
const target = document.getElementById(id);
|
|
47
48
|
if (!target) {
|
|
48
|
-
|
|
49
|
+
log.error("Target card does not exist in DOM");
|
|
49
50
|
return;
|
|
50
51
|
}
|
|
51
52
|
const parent = target.parentElement;
|
|
@@ -58,12 +59,12 @@ export function setActiveMenu(id) {
|
|
|
58
59
|
case 'at-theme-picker-btn':
|
|
59
60
|
if (parent.classList.contains('at_sidebar_button_icon_active')) {
|
|
60
61
|
// remove
|
|
61
|
-
|
|
62
|
+
log.info("removing active...");
|
|
62
63
|
parent.classList.remove('at_sidebar_button_icon_active');
|
|
63
64
|
}
|
|
64
65
|
else {
|
|
65
66
|
// activate
|
|
66
|
-
|
|
67
|
+
log.info("setting active...");
|
|
67
68
|
parent.classList.add('at_sidebar_button_icon_active');
|
|
68
69
|
}
|
|
69
70
|
break;
|
|
@@ -85,15 +86,15 @@ export function setActiveMenu(id) {
|
|
|
85
86
|
}
|
|
86
87
|
export function clearActiveMenu(id) {
|
|
87
88
|
var _a, _b;
|
|
88
|
-
|
|
89
|
+
log.info("clearActiveMenu: ", id);
|
|
89
90
|
if (id != 'at-minimap-btn' && activeMenu) {
|
|
90
91
|
// get child id
|
|
91
92
|
const activeChildId = (_b = (_a = activeMenu.querySelector('.mdi')) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : undefined;
|
|
92
|
-
|
|
93
|
+
log.info("activeChildId: ", activeChildId);
|
|
93
94
|
// check if active menu and target menu id are the same
|
|
94
95
|
// if true do not set inactive otherwise, remove
|
|
95
96
|
if (id != activeChildId) {
|
|
96
|
-
|
|
97
|
+
log.info("clearActiveMenu removing active...");
|
|
97
98
|
activeMenu.classList.remove('at_sidebar_button_icon_active');
|
|
98
99
|
activeMenu = undefined;
|
|
99
100
|
}
|
|
@@ -15,3 +15,4 @@ 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
17
|
export declare function clearTagFormDropdown(): void;
|
|
18
|
+
export declare function clearTagFilterDropdown(): void;
|
|
@@ -25,8 +25,8 @@ export function renderTagFormPane() {
|
|
|
25
25
|
<div class="at_form_container at_h-min-65">
|
|
26
26
|
<div class="at_field at_flex_column" style="${_tagCategories ? '' : 'display: none;'}">
|
|
27
27
|
<label for="">${i18n.t('Category')}</label>
|
|
28
|
-
<div
|
|
29
|
-
<div class="at_flex at_flex_row at_space_between">
|
|
28
|
+
<div id="at-custom-category-dropdown" data-cy="at-custom-category-dropdown">
|
|
29
|
+
<div id="at-category-dropdown" class="at_dropdown at_flex at_flex_row at_space_between">
|
|
30
30
|
<div class="at_dropdown_toggle" id="at-category-dropdown-toggle" data-cy="at-category-dropdown-toggle">${i18n.t('NoSelection')}</div>
|
|
31
31
|
<span class="mdi mdi-triangle-down at_chevron" id="at-category-chevron" data-cy="at-category-chevron"></span>
|
|
32
32
|
</div>
|
|
@@ -39,10 +39,10 @@ export function renderTagFormPane() {
|
|
|
39
39
|
</div>
|
|
40
40
|
<div class="at_field at_flex_column" style="${_tagCategories ? '' : 'display: none;'}">
|
|
41
41
|
<label for="">${i18n.t('Subcategory')}</label>
|
|
42
|
-
<div
|
|
43
|
-
<div class="at_flex at_flex_row at_space_between">
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
<div id="at-custom-subcategory-dropdown" data-cy="at-custom-subcategory-dropdown">
|
|
43
|
+
<div id="at-subcategory-dropdown" class=" at_dropdown at_flex at_flex_row at_space_between">
|
|
44
|
+
<div class="at_dropdown_toggle" id="at-subcategory-dropdown-toggle" data-cy="at-subcategory-dropdown-toggle">${i18n.t('NoSelection')}</div>
|
|
45
|
+
<span class="mdi mdi-triangle-down at_chevron" id="at-subcategory-chevron" data-cy="at-subcategory-chevron"></span>
|
|
46
46
|
</div>
|
|
47
47
|
<div style="position:absolute;">
|
|
48
48
|
<div class="at_dropdown_options" id="at-subcategory-options" data-cy="at-subcategory-options">
|
|
@@ -127,8 +127,8 @@ export function initFormData(tagId) {
|
|
|
127
127
|
tagDescriptionInput.value = '';
|
|
128
128
|
tagEmbedInput.value = '';
|
|
129
129
|
}
|
|
130
|
-
const categoryChevron = document.getElementById('at-category-
|
|
131
|
-
const subcategoryChevron = document.getElementById('at-subcategory-
|
|
130
|
+
const categoryChevron = document.getElementById('at-category-dropdown');
|
|
131
|
+
const subcategoryChevron = document.getElementById('at-subcategory-dropdown');
|
|
132
132
|
if (categoryChevron) {
|
|
133
133
|
if (isChevronEventAdded == false) {
|
|
134
134
|
categoryChevron.addEventListener('click', () => {
|
|
@@ -155,8 +155,8 @@ function setInputElements() {
|
|
|
155
155
|
tagNameInput = document.getElementById('at-tag-name-input');
|
|
156
156
|
tagDescriptionInput = document.getElementById('at-tag-description-input');
|
|
157
157
|
tagEmbedInput = document.getElementById('at-tag-embed-input');
|
|
158
|
-
tagCategoryDropdown = document.getElementById('at-category-dropdown');
|
|
159
|
-
tagSubcategoryDropdown = document.getElementById('at-subcategory-dropdown');
|
|
158
|
+
// tagCategoryDropdown = document.getElementById('at-category-dropdown') as HTMLSelectElement;
|
|
159
|
+
// tagSubcategoryDropdown = document.getElementById('at-subcategory-dropdown') as HTMLSelectElement;
|
|
160
160
|
}
|
|
161
161
|
export function getTagFormData() {
|
|
162
162
|
if (!tagNameInput) {
|
|
@@ -447,6 +447,38 @@ export function clearTagFormDropdown() {
|
|
|
447
447
|
noSelection.innerHTML = `
|
|
448
448
|
<span class="mdi mdi-circle-slice-1"></span> ${i18n.t('NoSelection')}
|
|
449
449
|
`;
|
|
450
|
-
|
|
451
|
-
|
|
450
|
+
let catSkipToggle = true;
|
|
451
|
+
let subcatSkipToggle = true;
|
|
452
|
+
let cat = document.getElementById('at-category-options');
|
|
453
|
+
if (cat.classList.contains('open')) {
|
|
454
|
+
catSkipToggle = false;
|
|
455
|
+
}
|
|
456
|
+
selectOption(noSelection, 'at-category-dropdown-toggle', catSkipToggle);
|
|
457
|
+
let subcat = document.getElementById('at-subcategory-options');
|
|
458
|
+
if (subcat.classList.contains('open')) {
|
|
459
|
+
subcatSkipToggle = false;
|
|
460
|
+
}
|
|
461
|
+
selectOption(noSelection, 'at-subcategory-dropdown-toggle', subcatSkipToggle);
|
|
462
|
+
}
|
|
463
|
+
//use this if need to clear Tag List Filter Dropdown
|
|
464
|
+
export function clearTagFilterDropdown() {
|
|
465
|
+
console.log("clearTagFilterDropdown()");
|
|
466
|
+
const noSelection = document.createElement('div');
|
|
467
|
+
noSelection.classList.add('at_option');
|
|
468
|
+
noSelection.setAttribute('category-uuid', '');
|
|
469
|
+
noSelection.innerHTML = `
|
|
470
|
+
<span class="mdi mdi-circle-slice-1"></span> ${i18n.t('NoSelection')}
|
|
471
|
+
`;
|
|
472
|
+
let catSkipToggle = true;
|
|
473
|
+
let subcatSkipToggle = true;
|
|
474
|
+
let catFilter = document.getElementById('at-category-filter-options');
|
|
475
|
+
if (catFilter.classList.contains('open')) {
|
|
476
|
+
catSkipToggle = false;
|
|
477
|
+
}
|
|
478
|
+
selectOption(noSelection, 'at-category-filter-dropdown-toggle', catSkipToggle);
|
|
479
|
+
let subcatFilter = document.getElementById('at-subcategory-filter-options');
|
|
480
|
+
if (subcatFilter.classList.contains('open')) {
|
|
481
|
+
subcatSkipToggle = false;
|
|
482
|
+
}
|
|
483
|
+
selectOption(noSelection, 'at-subcategory-filter-dropdown-toggle', subcatSkipToggle);
|
|
452
484
|
}
|
|
@@ -37,8 +37,8 @@ export function renderTagListPane() {
|
|
|
37
37
|
<div class="at_form_container at_h-min-65 at_tag_list_pane">
|
|
38
38
|
<div class="at_field at_flex_column" style="${_tagCategories ? '' : 'display: none;'}">
|
|
39
39
|
<label for="">${i18n.t('Category')}</label>
|
|
40
|
-
<div
|
|
41
|
-
<div class="at_flex at_flex_row at_space_between">
|
|
40
|
+
<div id="at-custom-category-filter-dropdown" data-cy="at-custom-category-filter-dropdown">
|
|
41
|
+
<div id="at-category-filter-dropdown" class="at_dropdown at_flex at_flex_row at_space_between">
|
|
42
42
|
<div class="at_dropdown_toggle" id="at-category-filter-dropdown-toggle" data-cy="at-category-filter-dropdown-toggle">${i18n.t('NoSelection')}</div>
|
|
43
43
|
<span class="mdi mdi-triangle-down at_chevron" id="at-category-filter-chevron" data-cy="at-category-filter-chevron"></span>
|
|
44
44
|
</div>
|
|
@@ -51,10 +51,10 @@ export function renderTagListPane() {
|
|
|
51
51
|
</div>
|
|
52
52
|
<div class="at_field at_flex_column" style="${_tagCategories ? '' : 'display: none;'}">
|
|
53
53
|
<label for="">${i18n.t('Subcategory')}</label>
|
|
54
|
-
<div
|
|
55
|
-
<div class="at_flex at_flex_row at_space_between">
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
<div id="at-custom-subcategory-filter-dropdown" data-cy="at-custom-subcategory-filter-dropdown">
|
|
55
|
+
<div id="at-subcategory-filter-dropdown" class="at_dropdown at_flex at_flex_row at_space_between">
|
|
56
|
+
<div class="at_dropdown_toggle" id="at-subcategory-filter-dropdown-toggle" data-cy="at-subcategory-filter-dropdown-toggle">${i18n.t('NoSelection')}</div>
|
|
57
|
+
<span class="mdi mdi-triangle-down at_chevron" id="at-subcategory-filter-chevron" data-cy="at-subcategory-filter-chevron"></span>
|
|
58
58
|
</div>
|
|
59
59
|
<div style="position:absolute;">
|
|
60
60
|
<div class="at_dropdown_options" id="at-subcategory-filter-options" data-cy="at-subcategory-filter-options">
|
|
@@ -332,8 +332,8 @@ export function setSelectedSubcategoryFilter(subcategoryId) {
|
|
|
332
332
|
selectedSubCategoryFilterId = subcategoryId;
|
|
333
333
|
}
|
|
334
334
|
function initDropdownEventListeners() {
|
|
335
|
-
const categoryChevron = document.getElementById('at-category-filter-
|
|
336
|
-
const subcategoryChevron = document.getElementById('at-subcategory-filter-
|
|
335
|
+
const categoryChevron = document.getElementById('at-category-filter-dropdown');
|
|
336
|
+
const subcategoryChevron = document.getElementById('at-subcategory-filter-dropdown');
|
|
337
337
|
if (categoryChevron) {
|
|
338
338
|
if (isChevronEventAdded == false) {
|
|
339
339
|
categoryChevron.addEventListener('click', () => {
|