architwin 1.6.2 → 1.6.3
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/actionBar.js +8 -8
- package/lib/atwinui/components/toolbar/card.js +10 -4
- package/lib/atwinui/components/toolbar/libraryPane.js +2 -2
- package/lib/atwinui/components/toolbar/menuBar.js +6 -6
- package/lib/atwinui/components/toolbar/modal.js +3 -3
- package/lib/atwinui/components/toolbar/modelControlsPane.js +2 -2
- package/lib/atwinui/components/toolbar/objectListPane.js +3 -1
- package/lib/atwinui/components/toolbar/static/addModelCard.js +1 -1
- package/lib/atwinui/components/toolbar/tagListPane.js +1 -1
- package/lib/atwinui/components/toolbar/themePane.js +1 -1
- package/lib/atwinui/events.js +12 -3
- package/package.json +1 -1
|
@@ -9,35 +9,35 @@ export function renderActionBar() {
|
|
|
9
9
|
element.innerHTML = `
|
|
10
10
|
<div class="at_sidebar_action_button_icon" style="border-bottom: dotted white 1px;">
|
|
11
11
|
<span class="mdi mdi-chevron-double-right" id="at-close-action-bar-btn" data-cy="at-close-action-bar-btn" target-pane="at-object-list-pane"></span>
|
|
12
|
-
<div class="at_icon_tooltip">${i18n.t('Close')}</div>
|
|
12
|
+
<div class="at_icon_tooltip" data-cy="at-tooltip-close">${i18n.t('Close')}</div>
|
|
13
13
|
</div>
|
|
14
14
|
<div class="at_sidebar_action_button_icon">
|
|
15
15
|
<span class="mdi mdi-axis-arrow " id="at-translate-action-btn" data-cy="at-translate-action-bar-btn"></span>
|
|
16
|
-
<div class="at_icon_tooltip">${i18n.t('Translate')}</div>
|
|
16
|
+
<div class="at_icon_tooltip" data-cy="at-tooltip-translate">${i18n.t('Translate')}</div>
|
|
17
17
|
</div>
|
|
18
18
|
<div class="at_sidebar_action_button_icon">
|
|
19
19
|
<span class="mdi mdi-rotate-orbit" id="at-rotate-action-btn" data-cy="at-rotate-action-bar-btn"></span>
|
|
20
|
-
<div class="at_icon_tooltip">${i18n.t('Rotate')}</div>
|
|
20
|
+
<div class="at_icon_tooltip" data-cy="at-tooltip-rotate">${i18n.t('Rotate')}</div>
|
|
21
21
|
</div>
|
|
22
22
|
<div class="at_sidebar_action_button_icon">
|
|
23
23
|
<span class="mdi mdi-arrow-expand-all" id="at-scale-action-btn" data-cy="at-scale-action-bar-btn"></span>
|
|
24
|
-
<div class="at_icon_tooltip">${i18n.t('Scale')}</div>
|
|
24
|
+
<div class="at_icon_tooltip" data-cy="at-tooltip-scale">${i18n.t('Scale')}</div>
|
|
25
25
|
</div>
|
|
26
26
|
<div class="at_sidebar_action_button_icon">
|
|
27
27
|
<span class="mdi mdi-content-copy" id="at-copy-action-btn" data-cy="at-copy-action-bar-btn"></span>
|
|
28
|
-
<div class="at_icon_tooltip">${i18n.t('Copy')}</div>
|
|
28
|
+
<div class="at_icon_tooltip" data-cy="at-tooltip-copy">${i18n.t('Copy')}</div>
|
|
29
29
|
</div>
|
|
30
30
|
<div class="at_sidebar_action_button_icon">
|
|
31
31
|
<span class="mdi mdi-undo-variant" id="at-undo-action-btn" data-cy="at-undo-action-bar-btn"></span>
|
|
32
|
-
<div class="at_icon_tooltip">${i18n.t('Undo')}</div>
|
|
32
|
+
<div class="at_icon_tooltip" data-cy="at-tooltip-undo">${i18n.t('Undo')}</div>
|
|
33
33
|
</div>
|
|
34
34
|
<div class="at_sidebar_action_button_icon">
|
|
35
35
|
<span class="mdi mdi-redo-variant" id="at-redo-action-btn" data-cy="at-redo-action-bar-btn"></span>
|
|
36
|
-
<div class="at_icon_tooltip">${i18n.t('Redo')}</div>
|
|
36
|
+
<div class="at_icon_tooltip" data-cy="at-tooltip-redo">${i18n.t('Redo')}</div>
|
|
37
37
|
</div>
|
|
38
38
|
<div class="at_sidebar_action_button_icon">
|
|
39
39
|
<span class="mdi mdi-cancel" id="at-cancel-action-btn" data-cy="at-cancel-action-bar-btn"></span>
|
|
40
|
-
<div class="at_icon_tooltip">${i18n.t('Cancel')}</div>
|
|
40
|
+
<div class="at_icon_tooltip" data-cy="at-tooltip-cancel">${i18n.t('Cancel')}</div>
|
|
41
41
|
</div>
|
|
42
42
|
`;
|
|
43
43
|
return element;
|
|
@@ -25,6 +25,7 @@ export function renderObjectCard(payload, objectComponent) {
|
|
|
25
25
|
element.classList.add('at_card');
|
|
26
26
|
element.classList.add('at_mx-w-16');
|
|
27
27
|
element.setAttribute('id', `at-card-${payload.id}`);
|
|
28
|
+
element.setAttribute('data-cy', `at-card-${payload.id}`);
|
|
28
29
|
let object_data = {};
|
|
29
30
|
object_data = payload.object_data;
|
|
30
31
|
if (object_data.upload_file != null) {
|
|
@@ -39,10 +40,13 @@ export function renderObjectCard(payload, objectComponent) {
|
|
|
39
40
|
}
|
|
40
41
|
thumbnail = `${_basePath}/defaulthumbnail.png`;
|
|
41
42
|
}
|
|
42
|
-
let isObjectVisible =
|
|
43
|
-
|
|
43
|
+
let isObjectVisible = true;
|
|
44
|
+
console.log("objectComponent: ", objectComponent);
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
if (objectComponent && objectComponent.mesh) {
|
|
44
47
|
// @ts-ignore
|
|
45
48
|
isObjectVisible = objectComponent.mesh.visible;
|
|
49
|
+
console.log("isObjectVisible: ", isObjectVisible);
|
|
46
50
|
}
|
|
47
51
|
element.innerHTML = `
|
|
48
52
|
<img class="at_image at_object_image" src="${thumbnail}" alt="Property Image" id="at-card-image-${payload.id}" data-cy="at-card-image-${payload.id}" card-id="${payload.id}">
|
|
@@ -84,10 +88,12 @@ export function renderObjectRow(payload, objectComponent) {
|
|
|
84
88
|
element.setAttribute('id', `at-card-${payload.id}`);
|
|
85
89
|
let object_data = {};
|
|
86
90
|
object_data = payload.object_data;
|
|
87
|
-
let isObjectVisible =
|
|
88
|
-
|
|
91
|
+
let isObjectVisible = true;
|
|
92
|
+
// @ts-ignore
|
|
93
|
+
if (objectComponent && objectComponent.mesh) {
|
|
89
94
|
// @ts-ignore
|
|
90
95
|
isObjectVisible = objectComponent.mesh.visible;
|
|
96
|
+
console.log("isObjectVisible: ", isObjectVisible);
|
|
91
97
|
}
|
|
92
98
|
element.innerHTML = `
|
|
93
99
|
<div class="at_card-body" id="at-card-row-body-${payload.id}" card-id="${payload.id}">
|
|
@@ -37,14 +37,14 @@ export function renderLibraryPane() {
|
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
39
39
|
<div class="at_scrollable_container" >
|
|
40
|
-
<div class="at_flex_tiles" id="at-library-cards"></div>
|
|
40
|
+
<div class="at_flex_tiles" id="at-library-cards" data-cy="at-library-cards"></div>
|
|
41
41
|
</div>
|
|
42
42
|
<div class="at_flex at_justify_between">
|
|
43
43
|
<small id="at-cancel-model-placement-prompt" style="display:none">${i18n.t('PressEsc')}</small>
|
|
44
44
|
</div>
|
|
45
45
|
<div class="at_button_row at_justify_end">
|
|
46
46
|
<div class="at_button at_ghost" style="margin-top: auto;" id="at-cancel-library-btn" data-cy="at-cancel-library-btn" target-pane="at-object-list-pane">
|
|
47
|
-
Cancel
|
|
47
|
+
${i18n.t('Cancel')}
|
|
48
48
|
<span class="mdi mdi-close-circle-outline"></span>
|
|
49
49
|
</div>
|
|
50
50
|
</div>
|
|
@@ -25,27 +25,27 @@ export function renderMenuBar(iFrame) {
|
|
|
25
25
|
menuBarElement.innerHTML = `
|
|
26
26
|
<div class="at_sidebar_button_icon">
|
|
27
27
|
<span class="mdi mdi-bullseye" id="at-expand-btn" data-cy="at-expand-btn" target-pane="at-tag-list-pane"></span>
|
|
28
|
-
<div class="at_icon_tooltip">${i18n.t('Tag')}</div>
|
|
28
|
+
<div class="at_icon_tooltip" data-cy="at-tooltip-tag">${i18n.t('Tag')}</div>
|
|
29
29
|
</div>
|
|
30
30
|
<div class="at_sidebar_button_icon" style="display:${isObjectListEnabled ? 'block' : 'none'}">
|
|
31
31
|
<span class="mdi mdi-cube-outline" id="at-object-list-btn" data-cy="at-object-list-btn" target-pane="at-object-list-pane"></span>
|
|
32
|
-
<div class="at_icon_tooltip">${i18n.t('Object')}</div>
|
|
32
|
+
<div class="at_icon_tooltip" data-cy="at-tooltip-object">${i18n.t('Object')}</div>
|
|
33
33
|
</div>
|
|
34
34
|
<div class="at_sidebar_button_icon">
|
|
35
35
|
<span class="mdi mdi-map" id="at-minimap-btn" data-cy="at-minimap-btn" target-pane="at-map"></span>
|
|
36
|
-
<div class="at_icon_tooltip">${i18n.t('Minimap')}</div>
|
|
36
|
+
<div class="at_icon_tooltip" data-cy="at-tooltip-minimap">${i18n.t('Minimap')}</div>
|
|
37
37
|
</div>
|
|
38
38
|
<div class="at_sidebar_button_icon" style="display:${isMeetingEnabled ? 'block' : 'none'}">
|
|
39
39
|
<span class="mdi mdi-message-video" id="at-videocall-btn" data-cy="at-videocall-btn" target-pane="at-video-call-pane"></span>
|
|
40
|
-
div class="at_icon_tooltip">${i18n.t('Meeting')}</div>
|
|
40
|
+
div class="at_icon_tooltip" data-cy="at-tooltip-meeting">${i18n.t('Meeting')}</div>
|
|
41
41
|
</div>
|
|
42
42
|
<div class="at_sidebar_button_icon">
|
|
43
43
|
<span class="mdi mdi-monitor-screenshot" id="at-screenshot-btn" data-cy="at-screenshot-btn"></span>
|
|
44
|
-
<div class="at_icon_tooltip">${i18n.t('Screenshot')}</div>
|
|
44
|
+
<div class="at_icon_tooltip" data-cy="at-tooltip-screenshot">${i18n.t('Screenshot')}</div>
|
|
45
45
|
</div>
|
|
46
46
|
<div class="at_sidebar_button_icon">
|
|
47
47
|
<span class="mdi mdi-palette" id="at-theme-picker-btn" data-cy="at-theme-picker-btn" target-pane="at-theme-pane"></span>
|
|
48
|
-
<div class="at_icon_tooltip">${i18n.t('Theme')}</div>
|
|
48
|
+
<div class="at_icon_tooltip" data-cy="at-tooltip-theme">${i18n.t('Theme')}</div>
|
|
49
49
|
</div>
|
|
50
50
|
`;
|
|
51
51
|
return menuBarElement;
|
|
@@ -18,12 +18,12 @@ export function renderModal() {
|
|
|
18
18
|
<div class="at_modal-close-button at_close-icon">×</div>
|
|
19
19
|
</div>
|
|
20
20
|
<div class="at_modal-content">
|
|
21
|
-
<h2 class="at_modal-content-heading" id="at-modal-content-heading"></h2>
|
|
22
|
-
<p class="at_modal-content-subheading" id="at-modal-content-subheading">
|
|
21
|
+
<h2 class="at_modal-content-heading" id="at-modal-content-heading" data-cy="at-modal-content-heading"></h2>
|
|
22
|
+
<p class="at_modal-content-subheading" id="at-modal-content-subheading" data-cy="at-modal-content-subheading">
|
|
23
23
|
|
|
24
24
|
</p>
|
|
25
25
|
<div>
|
|
26
|
-
<button class="at_close-button at_modal-accept-button"></button>
|
|
26
|
+
<button class="at_close-button at_modal-accept-button" data-cy="at-modal-close-button"></button>
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
|
@@ -22,7 +22,7 @@ export function renderModelControlPane(type = 'Translate') {
|
|
|
22
22
|
<div class="at_form_container">
|
|
23
23
|
<div class="at_flex at_space_between">
|
|
24
24
|
<span class="at_bolder at_text_base" id="at-transform-type-title">${i18n.t(type)}</span>
|
|
25
|
-
<span class="mdi mdi-close at_text_base" style="cursor:pointer" id="at-close-model-controls"></span>
|
|
25
|
+
<span class="mdi mdi-close at_text_base" style="cursor:pointer" id="at-close-model-controls" data-cy="at-close-model-controls"></span>
|
|
26
26
|
</div>
|
|
27
27
|
<div class="at_number_field">
|
|
28
28
|
<span class="at_bolder">X</span>
|
|
@@ -39,7 +39,7 @@ export function renderModelControlPane(type = 'Translate') {
|
|
|
39
39
|
<input type="number" id="at-input-z" class="at_rounded_input"/>
|
|
40
40
|
<span class="at_bolder at_model_unit">m</span>
|
|
41
41
|
</div>
|
|
42
|
-
<button class="at_button at_primary_azusa" id="at-confirm-transform">${i18n.t('Confirm')}</button>
|
|
42
|
+
<button class="at_button at_primary_azusa" id="at-confirm-transform" data-cy="at-confirm-transform">${i18n.t('Confirm')}</button>
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
45
45
|
`;
|
|
@@ -46,7 +46,7 @@ export function renderObjectListPane(cardList) {
|
|
|
46
46
|
<span class="mdi mdi-plus-circle-outline"></span>
|
|
47
47
|
</div>
|
|
48
48
|
</div>
|
|
49
|
-
<div class="at_flex at_justify_center at_price">
|
|
49
|
+
<div class="at_flex at_justify_center at_price" id="at-bundle-version" data-cy="at-bundle-version">
|
|
50
50
|
<small style="font-size: 0.65em; color: white; opacity: 50%;">${getBundleVersion()}</small>
|
|
51
51
|
</div>
|
|
52
52
|
`;
|
|
@@ -109,6 +109,7 @@ export function renderObjectCards(cardList, objectComponents) {
|
|
|
109
109
|
//@ts-ignore
|
|
110
110
|
handleDeleteModel(event.target.id);
|
|
111
111
|
toggleModal(false);
|
|
112
|
+
toggleActionBar('hide');
|
|
112
113
|
}));
|
|
113
114
|
}
|
|
114
115
|
}));
|
|
@@ -211,6 +212,7 @@ export function renderObjectList(cardList, objectComponents) {
|
|
|
211
212
|
//@ts-ignore
|
|
212
213
|
handleDeleteModel(event.target.id);
|
|
213
214
|
toggleModal(false);
|
|
215
|
+
toggleActionBar('hide');
|
|
214
216
|
}));
|
|
215
217
|
}
|
|
216
218
|
}));
|
|
@@ -13,7 +13,7 @@ export function renderAddModelCards(payload) {
|
|
|
13
13
|
`).join('')}
|
|
14
14
|
</div>
|
|
15
15
|
<div style="padding: 8px;">
|
|
16
|
-
<div class="at_button at_accent_azusa at_w-full" id="${payload.id}" target-pane="${payload.targetPane}">
|
|
16
|
+
<div class="at_button at_accent_azusa at_w-full" id="${payload.id}" data-cy="${payload.id}" target-pane="${payload.targetPane}">
|
|
17
17
|
<span class="mdi mdi-plus-circle-outline"></span>
|
|
18
18
|
${payload.btnLabel}
|
|
19
19
|
</div>
|
|
@@ -75,7 +75,7 @@ export function renderTagListPane() {
|
|
|
75
75
|
<span class="mdi mdi-plus-circle-outline"></span>
|
|
76
76
|
</div>
|
|
77
77
|
</div>
|
|
78
|
-
<div class="at_flex at_justify_center at_price">
|
|
78
|
+
<div class="at_flex at_justify_center at_price" id="at-bundle-version" data-cy="at-bundle-version">
|
|
79
79
|
<small style="font-size: 0.65em; color: white; opacity: 50%;">${getBundleVersion()}</small>
|
|
80
80
|
</div>
|
|
81
81
|
`;
|
|
@@ -54,7 +54,7 @@ export function renderThemePane() {
|
|
|
54
54
|
<span class="mdi mdi-content-save"></span>
|
|
55
55
|
</div>
|
|
56
56
|
</div>
|
|
57
|
-
<div class="at_flex at_justify_center at_price">
|
|
57
|
+
<div class="at_flex at_justify_center at_price" id="at-bundle-version" data-cy="at-bundle-version">
|
|
58
58
|
<small style="font-size: 0.65em; color: white; opacity: 50%;">${getBundleVersion()}</small>
|
|
59
59
|
</div>
|
|
60
60
|
`;
|
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, removeObjectCard, setTagCategoriesOption, toggleDropdown, tagFormMode, selectedTag, renderRecepientOptions, renderTagMessages, createTagMessage, setTagLink, setTagMessagingDetails, renderCategoryDropdownOptions, clearTagFormDropdown, clearActiveActionBtn, clearActiveCard, toggleActionBarButtons, selectedCategoryFilterId, selectedSubCategoryFilterId, filterTagList } from "./components/toolbar";
|
|
10
|
+
import { actionBar, renderObjectCards, renderLibraryCards, renderTags, renderTagRow, getTagFormData, addClickEventToTagRow, setActiveCard, setActiveMenu, removeObjectCard, setTagCategoriesOption, toggleDropdown, tagFormMode, selectedTag, renderRecepientOptions, renderTagMessages, createTagMessage, setTagLink, setTagMessagingDetails, renderCategoryDropdownOptions, clearTagFormDropdown, clearActiveActionBtn, clearActiveCard, toggleActionBarButtons, selectedCategoryFilterId, selectedSubCategoryFilterId, filterTagList, toggleModal, setModalAction } 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, setObjectTransformation, getSelectedObject, _atwin, isCdnMapDataAvailable, captureScreenshotAndCameraDetails, _mpConfig, cancelModelPlacement, actionHistory, get3DXObjects, transformHistory } from "../architwin";
|
|
12
12
|
import { Notyf } from 'notyf';
|
|
13
13
|
import 'notyf/notyf.min.css';
|
|
@@ -293,8 +293,17 @@ function handleCopyObject() {
|
|
|
293
293
|
}
|
|
294
294
|
if (cardDeleteButton) {
|
|
295
295
|
cardDeleteButton.addEventListener('click', (event) => {
|
|
296
|
-
|
|
297
|
-
|
|
296
|
+
toggleModal();
|
|
297
|
+
setModalAction({
|
|
298
|
+
title: `${i18n.t('DeleteObject')}`,
|
|
299
|
+
description: `${i18n.t('ConfirmDeleteObject')}`,
|
|
300
|
+
buttonLabel: `${i18n.t('YesDelete')}`
|
|
301
|
+
}, () => __awaiter(this, void 0, void 0, function* () {
|
|
302
|
+
//@ts-expect-error
|
|
303
|
+
handleDeleteModel(event.target.id);
|
|
304
|
+
toggleModal(false);
|
|
305
|
+
toggleActionBar('hide');
|
|
306
|
+
}));
|
|
298
307
|
});
|
|
299
308
|
}
|
|
300
309
|
clearActiveActionBtn();
|