architwin 1.17.2 → 1.17.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/lib/architwin.d.ts +12 -1
- package/lib/architwin.js +1 -1
- package/lib/atwinui/components/toolbar/card.js +1 -1
- package/lib/atwinui/components/toolbar/tagIotFormPane.js +22 -13
- package/lib/atwinui/events.d.ts +3 -1
- package/lib/atwinui/events.js +45 -5
- package/lib/types.d.ts +1 -1
- package/lib/types.js +1 -1
- package/package.json +1 -1
|
@@ -70,7 +70,7 @@ export function renderObjectCard(payload, objectComponent) {
|
|
|
70
70
|
</div>
|
|
71
71
|
<div>
|
|
72
72
|
<div class="at_button_icon" style="display:inline-block">
|
|
73
|
-
<span class="mdi ${isObjectVisible ? 'mdi-eye
|
|
73
|
+
<span class="mdi ${isObjectVisible ? 'mdi-eye' : 'mdi-eye-off'} at_model_visibility_btn" id="at-visibility-model-${payload.id}-btn" data-cy="at-visibility-model-${payload.id}-btn" card-id="${payload.id}"></span>
|
|
74
74
|
</div>
|
|
75
75
|
<div class="at_button_icon" style="display:inline-block">
|
|
76
76
|
<span class="mdi mdi-delete-outline at_model_delete_btn" id="at-delete-model-${payload.id}-btn" data-cy="at-delete-model-${payload.id}-btn" card-id="${payload.id}"></span>
|
|
@@ -106,22 +106,20 @@ export function renderTagIOTFormPane() {
|
|
|
106
106
|
</div>
|
|
107
107
|
</div>
|
|
108
108
|
</div>
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
<div>
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
<div class="at_body at_linked_device_container" id="at-device-item-container">
|
|
109
|
+
<div class="at_iot_list_container at_h-min-40" id="at-iot-device-list-container" data-cy="at-iot-device-list-container">
|
|
110
|
+
<div class="at_section at_iot_item_container at_scrollable_container" id="at-linked-device-container" data-cy="at-linked-device-container">
|
|
111
|
+
<div class="at_title" style="padding-left: 20px !important;">
|
|
112
|
+
<div> </div>
|
|
113
|
+
<label for="">${i18n.t('LinkedIoTDevices')}</label>
|
|
114
|
+
<div> </div>
|
|
115
|
+
</div>
|
|
116
|
+
<div>
|
|
117
|
+
<div class="at_body at_linked_device_container" id="at-device-item-container">
|
|
118
|
+
</div>
|
|
120
119
|
</div>
|
|
121
120
|
</div>
|
|
122
121
|
</div>
|
|
123
122
|
</div>
|
|
124
|
-
|
|
125
123
|
</div>
|
|
126
124
|
</div>
|
|
127
125
|
|
|
@@ -237,6 +235,17 @@ export function setSelectedIoTSystem(payload) {
|
|
|
237
235
|
if (selectedToggle) {
|
|
238
236
|
selectedToggle.textContent = payload ? i18n.t(payload) : i18n.t('NoSelection');
|
|
239
237
|
}
|
|
238
|
+
const linkedDeviceContainer = document.getElementById('at-iot-device-main-container');
|
|
239
|
+
const systemLinkContainer = document.getElementById('at-iot-system-link-container');
|
|
240
|
+
if (payload === IOT_LINKED_SYSTEMS.URL_LINK) {
|
|
241
|
+
log.info('payload == IOT_LINKED_SYSTEMS.URL_LINK', payload, IOT_LINKED_SYSTEMS.URL_LINK);
|
|
242
|
+
linkedDeviceContainer.style.display = 'none';
|
|
243
|
+
systemLinkContainer.style.display = 'block';
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
linkedDeviceContainer.style.display = 'block';
|
|
247
|
+
systemLinkContainer.style.display = 'none';
|
|
248
|
+
}
|
|
240
249
|
}
|
|
241
250
|
/**
|
|
242
251
|
* Clears dropdowns for both Category and Devices
|
|
@@ -522,7 +531,7 @@ export function getIotTagFormData() {
|
|
|
522
531
|
tagMf: iotMfrName.value,
|
|
523
532
|
// tagCategoryId: selectedIoTCat.uuid,
|
|
524
533
|
tagCategoryId: selectedIoTCat ? selectedIoTCat.name : undefined,
|
|
525
|
-
systemLink:
|
|
534
|
+
systemLink: iotSystemLink.value,
|
|
526
535
|
linkedDevices: linkedDevicesArray,
|
|
527
536
|
iotSystem: selectedIoTSystem,
|
|
528
537
|
tag_type: TAG_TYPE.IOT
|
package/lib/atwinui/events.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MpSdk } from "../../bundle/sdk";
|
|
1
2
|
import { Notyf } from 'notyf';
|
|
2
3
|
import 'notyf/notyf.min.css';
|
|
3
4
|
declare let activeToolbarItem: HTMLElement, activeActionItem: HTMLElement, cancelModelPlacementPrompt: HTMLDivElement;
|
|
@@ -48,4 +49,5 @@ declare function handleShowCustomMinimap(): void;
|
|
|
48
49
|
declare function handleDisplayElements(id: string): void;
|
|
49
50
|
declare function handleWindowVisibility(visibilityBtn: HTMLElement, updateStateDB: boolean, fromParentVisibilityState?: boolean): Promise<void>;
|
|
50
51
|
declare function clearActivePane(): void;
|
|
51
|
-
|
|
52
|
+
declare function handleVisiblePartitions(mpSdk: MpSdk): void;
|
|
53
|
+
export { activeToolbarItem, activeActionItem, cancelModelPlacementPrompt, isCustomMapControlsVisible, pipeColor, batchAddEventListenerById, batchAddEventListenerByClassName, batchAddEventListenerByClassNames, batchAddEventListenerByDataAttribute, setActiveToolbarItem, toggleDisplayPane, toggleActionBar, setupIndividualEventListeners, setupSpaceEventSubscriptions, handleModelVisibility, handleDeleteModel, handleShowMinimap, handleScrollToView, handleRenderMeetingUI, handleShowCustomMinimap, renderTagPaneContent, handlePartitionVisibility, handlePolygonVisibility, handleDeletePartition, handleToggleVisibilityTags, handleDisplayElements, handleWindowVisibility, clearActivePane, handleVisiblePartitions };
|
package/lib/atwinui/events.js
CHANGED
|
@@ -1330,13 +1330,13 @@ function handleModelVisibility(objId) {
|
|
|
1330
1330
|
//@ts-ignore
|
|
1331
1331
|
if (target.component.mesh.visible) {
|
|
1332
1332
|
setModelVisibility(targetId, false);
|
|
1333
|
-
setVisibilityBtn.classList.
|
|
1334
|
-
setVisibilityBtn.classList.
|
|
1333
|
+
setVisibilityBtn.classList.add('mdi-eye-off');
|
|
1334
|
+
setVisibilityBtn.classList.remove('mdi-eye');
|
|
1335
1335
|
}
|
|
1336
1336
|
else {
|
|
1337
1337
|
setModelVisibility(targetId, true);
|
|
1338
|
-
setVisibilityBtn.classList.
|
|
1339
|
-
setVisibilityBtn.classList.
|
|
1338
|
+
setVisibilityBtn.classList.add('mdi-eye');
|
|
1339
|
+
setVisibilityBtn.classList.remove('mdi-eye-off');
|
|
1340
1340
|
}
|
|
1341
1341
|
yield goToModel(targetId);
|
|
1342
1342
|
}
|
|
@@ -1913,11 +1913,13 @@ function handlePartitionVisibility(targetId) {
|
|
|
1913
1913
|
};
|
|
1914
1914
|
const processPartitionVisibility = (targetObject) => {
|
|
1915
1915
|
if (targetObject) {
|
|
1916
|
+
log.info("targetObject", targetObject);
|
|
1916
1917
|
const { component, object } = targetObject;
|
|
1917
1918
|
// Update main partition visibility
|
|
1918
1919
|
// @ts-ignore
|
|
1919
1920
|
if (component.mesh.visible !== isVisible) {
|
|
1920
1921
|
setModelVisibility(object.id, isVisible);
|
|
1922
|
+
targetObject.object.object_data.json_data.options.is_visible = isVisible;
|
|
1921
1923
|
}
|
|
1922
1924
|
// Update model children visibility
|
|
1923
1925
|
getChildrenOfModel(component)
|
|
@@ -4044,10 +4046,48 @@ function handlePreviewModalResize() {
|
|
|
4044
4046
|
}
|
|
4045
4047
|
});
|
|
4046
4048
|
}
|
|
4049
|
+
function handleVisiblePartitions(mpSdk) {
|
|
4050
|
+
log.info('handleVisiblePartitions()');
|
|
4051
|
+
let lastFloorSequence = null;
|
|
4052
|
+
mpSdk.Floor.current.subscribe((currentFloor) => __awaiter(this, void 0, void 0, function* () {
|
|
4053
|
+
if ((currentFloor === null || currentFloor === void 0 ? void 0 : currentFloor.sequence) == null || currentFloor.sequence === -1 || currentFloor.sequence === lastFloorSequence) {
|
|
4054
|
+
return;
|
|
4055
|
+
}
|
|
4056
|
+
lastFloorSequence = currentFloor.sequence;
|
|
4057
|
+
log.info('handleVisiblePartitions', currentFloor);
|
|
4058
|
+
const polygons = get3DXObjects().filter(obj => obj.type === 'POLYGON');
|
|
4059
|
+
log.info("room partitions", polygons);
|
|
4060
|
+
if (!polygons.length)
|
|
4061
|
+
return;
|
|
4062
|
+
const updateChildrenVisibility = (component) => {
|
|
4063
|
+
getChildrenOfModel(component).filter(child => child.name && !child.deleted && child.visible !== true).forEach(child => {
|
|
4064
|
+
if (child.name.includes('wall')) {
|
|
4065
|
+
toggleWallVisibility(component, child.name);
|
|
4066
|
+
}
|
|
4067
|
+
else {
|
|
4068
|
+
toggleFloorVisibility(component, child.name);
|
|
4069
|
+
}
|
|
4070
|
+
});
|
|
4071
|
+
};
|
|
4072
|
+
const setPolygonsVisibility = (visible, polygon) => {
|
|
4073
|
+
setModelVisibility(polygon.object.id, visible);
|
|
4074
|
+
updateChildrenVisibility(polygon.component);
|
|
4075
|
+
};
|
|
4076
|
+
polygons.forEach(polygon => {
|
|
4077
|
+
log.info("JAMES polygon", polygon);
|
|
4078
|
+
const polygonFloorId = polygon.object.object_data.json_data.floor_sequence.sequence;
|
|
4079
|
+
log.info("JAMES polygonFloorId", polygonFloorId);
|
|
4080
|
+
log.info("JAMES currentFloor.sequence", currentFloor.sequence);
|
|
4081
|
+
const isCurrentFloor = polygonFloorId === currentFloor.sequence;
|
|
4082
|
+
log.info('partition matches current floor:', isCurrentFloor);
|
|
4083
|
+
setPolygonsVisibility(isCurrentFloor, polygon);
|
|
4084
|
+
});
|
|
4085
|
+
}));
|
|
4086
|
+
}
|
|
4047
4087
|
export {
|
|
4048
4088
|
//state
|
|
4049
4089
|
activeToolbarItem, activeActionItem, cancelModelPlacementPrompt, isCustomMapControlsVisible, pipeColor,
|
|
4050
4090
|
//methods
|
|
4051
4091
|
batchAddEventListenerById, batchAddEventListenerByClassName, batchAddEventListenerByClassNames, batchAddEventListenerByDataAttribute, setActiveToolbarItem, toggleDisplayPane, toggleActionBar, setupIndividualEventListeners, setupSpaceEventSubscriptions, handleModelVisibility, handleDeleteModel, handleShowMinimap, handleScrollToView, handleRenderMeetingUI, handleShowCustomMinimap, renderTagPaneContent,
|
|
4052
4092
|
// partition
|
|
4053
|
-
handlePartitionVisibility, handlePolygonVisibility, handleDeletePartition, handleToggleVisibilityTags, handleDisplayElements, handleWindowVisibility, clearActivePane };
|
|
4093
|
+
handlePartitionVisibility, handlePolygonVisibility, handleDeletePartition, handleToggleVisibilityTags, handleDisplayElements, handleWindowVisibility, clearActivePane, handleVisiblePartitions };
|
package/lib/types.d.ts
CHANGED
|
@@ -1454,7 +1454,7 @@ export declare enum MAP_OPTIONS {
|
|
|
1454
1454
|
export declare enum IOT_LINKED_SYSTEMS {
|
|
1455
1455
|
BEMAC = "BEMAC",
|
|
1456
1456
|
HANASYS = "HANASYS",
|
|
1457
|
-
URL_LINK = "
|
|
1457
|
+
URL_LINK = "URL Link",
|
|
1458
1458
|
I_MTEC = "i-MTEC"
|
|
1459
1459
|
}
|
|
1460
1460
|
export interface ITagIOTCategory {
|
package/lib/types.js
CHANGED
|
@@ -198,7 +198,7 @@ export var IOT_LINKED_SYSTEMS;
|
|
|
198
198
|
(function (IOT_LINKED_SYSTEMS) {
|
|
199
199
|
IOT_LINKED_SYSTEMS["BEMAC"] = "BEMAC";
|
|
200
200
|
IOT_LINKED_SYSTEMS["HANASYS"] = "HANASYS";
|
|
201
|
-
IOT_LINKED_SYSTEMS["URL_LINK"] = "
|
|
201
|
+
IOT_LINKED_SYSTEMS["URL_LINK"] = "URL Link";
|
|
202
202
|
IOT_LINKED_SYSTEMS["I_MTEC"] = "i-MTEC";
|
|
203
203
|
})(IOT_LINKED_SYSTEMS || (IOT_LINKED_SYSTEMS = {}));
|
|
204
204
|
export var TAG_TYPE;
|