architwin 1.5.6 → 1.5.8
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/i18n.js +4 -2
- package/lib/atwinui/components/toolbar/objectListPane.js +5 -0
- package/lib/atwinui/components/toolbar/tagFormPane.js +11 -3
- package/lib/atwinui/components/toolbar/tagListPane.js +4 -0
- package/lib/atwinui/components/toolbar/themePane.js +4 -0
- package/lib/minimap.js +18 -3
- package/lib/types.d.ts +2 -0
- package/package.json +1 -1
- package/static/atwinui.css +4 -0
|
@@ -61,7 +61,8 @@ i18n
|
|
|
61
61
|
"MinimapUnavailable": "Minimap temporarily disabled. Matterport CDN is unavailable. Please try again later",
|
|
62
62
|
"PressEsc": "Press the Esc key or cancel button to cancel placement",
|
|
63
63
|
"DeleteObject": "Delete Object",
|
|
64
|
-
"ConfirmDeleteObject": "Are you sure you want to delete this object? This action cannot be reversed"
|
|
64
|
+
"ConfirmDeleteObject": "Are you sure you want to delete this object? This action cannot be reversed",
|
|
65
|
+
"FloorMapNotAvailable": "The floor image for this floor is currently unavailable"
|
|
65
66
|
}
|
|
66
67
|
},
|
|
67
68
|
ja: {
|
|
@@ -117,7 +118,8 @@ i18n
|
|
|
117
118
|
"MinimapUnavailable": "ミニマップは一時的に無効になっています。 Matterport CDN は利用できません。 後でもう一度試してください",
|
|
118
119
|
"PressEsc": "キャンセルするにはESCキーもしくはキャンセルボタンを押してください",
|
|
119
120
|
"DeleteObject": "オブジェクト削除",
|
|
120
|
-
"ConfirmDeleteObject": "本当に削除してもよろしいですか?(この操作は取り消せません)"
|
|
121
|
+
"ConfirmDeleteObject": "本当に削除してもよろしいですか?(この操作は取り消せません)",
|
|
122
|
+
"FloorMapNotAvailable": "このフロアのフロア画像は現在利用できません"
|
|
121
123
|
}
|
|
122
124
|
}
|
|
123
125
|
},
|
|
@@ -7,11 +7,13 @@ 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 { _mpConfig } from "../../../architwin";
|
|
10
11
|
import { renderObjectCard, renderObjectRow, setActiveCard } from "./card";
|
|
11
12
|
import { batchAddEventListenerByClassName, toggleActionBar, handleModelVisibility, handleDeleteModel } from "../../events";
|
|
12
13
|
import i18n from './i18n';
|
|
13
14
|
import { setModalAction, toggleModal } from "./modal";
|
|
14
15
|
export function renderObjectListPane(cardList) {
|
|
16
|
+
var _a;
|
|
15
17
|
const element = document.createElement('div');
|
|
16
18
|
element.classList.add('at_container');
|
|
17
19
|
element.classList.add('at_w-12');
|
|
@@ -45,6 +47,9 @@ export function renderObjectListPane(cardList) {
|
|
|
45
47
|
<span class="mdi mdi-plus-circle-outline"></span>
|
|
46
48
|
</div>
|
|
47
49
|
</div>
|
|
50
|
+
<div class="at_flex at_justify_center at_price">
|
|
51
|
+
<small style="font-size: 0.65em; color: white; opacity: 50%;">${(_a = _mpConfig.bundleVersion) !== null && _a !== void 0 ? _a : ""}</small>
|
|
52
|
+
</div>
|
|
48
53
|
`;
|
|
49
54
|
return element;
|
|
50
55
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _tagCategories, _tags, getMpTags } from "../../../architwin";
|
|
2
2
|
import { convertToCssRgb, stringContains } from "../../../utils";
|
|
3
|
-
import { renderTags, setSelectedCategoryFilter, setSelectedSubcategoryFilter, filterTagList, getAllSubcategories } from './tagListPane';
|
|
3
|
+
import { renderTags, setSelectedCategoryFilter, setSelectedSubcategoryFilter, filterTagList, getAllSubcategories, selectedCategoryFilterId } from './tagListPane';
|
|
4
4
|
import i18n from './i18n';
|
|
5
5
|
let mode = 'adding';
|
|
6
6
|
let tagNameInput, tagDescriptionInput, tagEmbedInput, tagCategoryDropdown, tagSubcategoryDropdown;
|
|
@@ -329,8 +329,16 @@ function selectOption(option, elementId, skipToggle = false) {
|
|
|
329
329
|
if (isFilterDropdown) {
|
|
330
330
|
setSelectedSubcategoryFilter(undefined); //reset selected subcategory
|
|
331
331
|
}
|
|
332
|
-
|
|
333
|
-
|
|
332
|
+
//Populate subcategory dropdown
|
|
333
|
+
const targetCategory = _tagCategories.find(cat => cat.uuid === selectedCategoryFilterId);
|
|
334
|
+
if (targetCategory && targetCategory.subcategories && targetCategory.subcategories.length > 0) {
|
|
335
|
+
console.log("Subcategories found", targetCategory.subcategories);
|
|
336
|
+
renderSubcategoryDropdownOptions(isFilterDropdown ? 'at-subcategory-filter-options' : 'at-subcategory-options', targetCategory.subcategories);
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
const elementId = isFilterDropdown ? 'at-subcategory-filter-options' : 'at-subcategory-options';
|
|
340
|
+
clearInnerHTML(elementId);
|
|
341
|
+
}
|
|
334
342
|
const tags = getMpTags();
|
|
335
343
|
const filteredTags = filterTagList(tags);
|
|
336
344
|
renderTags(filteredTags ? filteredTags : tags);
|
|
@@ -24,6 +24,7 @@ let allSubcategories = [];
|
|
|
24
24
|
export let selectedCategoryFilterId = undefined;
|
|
25
25
|
export let selectedSubCategoryFilterId = undefined;
|
|
26
26
|
export function renderTagListPane() {
|
|
27
|
+
var _a;
|
|
27
28
|
const element = document.createElement('div');
|
|
28
29
|
element.classList.add('at_container');
|
|
29
30
|
element.classList.add('at_w-12');
|
|
@@ -75,6 +76,9 @@ export function renderTagListPane() {
|
|
|
75
76
|
<span class="mdi mdi-plus-circle-outline"></span>
|
|
76
77
|
</div>
|
|
77
78
|
</div>
|
|
79
|
+
<div class="at_flex at_justify_center at_price">
|
|
80
|
+
<small style="font-size: 0.65em; color: white; opacity: 50%;">${(_a = _mpConfig.bundleVersion) !== null && _a !== void 0 ? _a : ""}</small>
|
|
81
|
+
</div>
|
|
78
82
|
`;
|
|
79
83
|
return element;
|
|
80
84
|
}
|
|
@@ -3,6 +3,7 @@ import { _mpConfig } from "../../../architwin";
|
|
|
3
3
|
import i18n from './i18n';
|
|
4
4
|
let activeThemeCard;
|
|
5
5
|
export function renderThemePane() {
|
|
6
|
+
var _a;
|
|
6
7
|
const element = document.createElement('div');
|
|
7
8
|
element.classList.add('at_container');
|
|
8
9
|
element.classList.add('at_w-12');
|
|
@@ -53,6 +54,9 @@ export function renderThemePane() {
|
|
|
53
54
|
<span class="mdi mdi-content-save"></span>
|
|
54
55
|
</div>
|
|
55
56
|
</div>
|
|
57
|
+
<div class="at_flex at_justify_center at_price">
|
|
58
|
+
<small style="font-size: 0.65em; color: white; opacity: 50%;">${(_a = _mpConfig.bundleVersion) !== null && _a !== void 0 ? _a : ""}</small>
|
|
59
|
+
</div>
|
|
56
60
|
`;
|
|
57
61
|
return element;
|
|
58
62
|
}
|
package/lib/minimap.js
CHANGED
|
@@ -101,6 +101,12 @@ function setMap(mpSdk, appKey, mapId, openOnLoad) {
|
|
|
101
101
|
showDirection();
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
+
else {
|
|
105
|
+
const mapConfig = getMapConfig();
|
|
106
|
+
if (mapConfig && mapConfig.showDirection) {
|
|
107
|
+
showDirection();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
104
110
|
const sweepBtn = document.getElementById('p' + activeSweep);
|
|
105
111
|
if (sweepBtn) {
|
|
106
112
|
sweepBtn.classList.add('active');
|
|
@@ -431,8 +437,14 @@ function setImg(minimap, floorSequence, isStandAlone = false) {
|
|
|
431
437
|
const map = document.createElement('img');
|
|
432
438
|
_mapImg = _miniMapData.urlTemplate.replace('{{filename}}', 'render/vr_colorplan_00' + floorSequence + '.png');
|
|
433
439
|
console.log("_mapImg ", _mapImg);
|
|
434
|
-
if (!_mapImg)
|
|
440
|
+
if (!_mapImg) {
|
|
441
|
+
notyf.error(`${i18n.t("FloorMapNotAvailable")}`);
|
|
435
442
|
return;
|
|
443
|
+
}
|
|
444
|
+
if (_mapImgEl && _mpConfig.mapConfig && _mpConfig.mapConfig.showCurrentFloorOnly) {
|
|
445
|
+
_mapImgEl.src = _mapImg;
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
436
448
|
map.src = _mapImg;
|
|
437
449
|
if (isStandAlone) {
|
|
438
450
|
map.style.position = 'relative';
|
|
@@ -441,8 +453,11 @@ function setImg(minimap, floorSequence, isStandAlone = false) {
|
|
|
441
453
|
map.style.position = 'absolute';
|
|
442
454
|
map.style.zIndex = '10';
|
|
443
455
|
}
|
|
444
|
-
_mapImgEl
|
|
445
|
-
|
|
456
|
+
if (!_mapImgEl) {
|
|
457
|
+
_mapImgEl = map;
|
|
458
|
+
}
|
|
459
|
+
const isCurrentFloorOnlyEnabled = _mpConfig.mapConfig && _mpConfig.mapConfig.showCurrentFloorOnly ? true : false;
|
|
460
|
+
_mapContainer.appendChild(isCurrentFloorOnlyEnabled ? _mapImgEl : map);
|
|
446
461
|
});
|
|
447
462
|
}
|
|
448
463
|
function showDirection() {
|
package/lib/types.d.ts
CHANGED
|
@@ -77,6 +77,7 @@ export interface IMPConfig {
|
|
|
77
77
|
iframeId: string;
|
|
78
78
|
appKey?: string;
|
|
79
79
|
bundlePath?: string;
|
|
80
|
+
bundleVersion?: string;
|
|
80
81
|
mapId?: string;
|
|
81
82
|
meetingApiKey?: string;
|
|
82
83
|
showOriginalTags?: boolean;
|
|
@@ -169,6 +170,7 @@ export interface IMapConfig {
|
|
|
169
170
|
};
|
|
170
171
|
zIndex?: number;
|
|
171
172
|
isShow?: boolean;
|
|
173
|
+
showCurrentFloorOnly?: boolean;
|
|
172
174
|
}
|
|
173
175
|
export interface ISweep {
|
|
174
176
|
alignmentType: MpSdk.Sweep.Alignment;
|
package/package.json
CHANGED