architwin 1.16.9 → 1.17.1
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/actionPartitionHistory.d.ts +17 -0
- package/lib/actionPartitionHistory.js +62 -0
- package/lib/actionPathHistory.js +4 -0
- package/lib/architwin.d.ts +3 -1
- package/lib/architwin.js +1 -8733
- package/lib/atwinui/components/toolbar/spacePartition/roomTreePane.js +43 -29
- package/lib/atwinui/components/toolbar/tagIotFormPane.d.ts +3 -1
- package/lib/atwinui/components/toolbar/tagIotFormPane.js +84 -66
- package/lib/atwinui/components/toolbar/tagListPane.d.ts +5 -1
- package/lib/atwinui/components/toolbar/tagListPane.js +142 -4
- package/lib/atwinui/events.js +26 -34
- package/lib/atwinui/index.js +2 -0
- package/lib/superviz.d.ts +6 -6
- package/lib/types.d.ts +12 -1
- package/lib/types.js +2 -0
- package/package.json +1 -1
- package/static/atwinui.css +27 -0
- package/static/map.css +1 -1
- package/.yarn/install-state.gz +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare class ActionPartitionHistory {
|
|
2
|
+
private history;
|
|
3
|
+
private index;
|
|
4
|
+
private current;
|
|
5
|
+
addToHistory(partition: any): void;
|
|
6
|
+
undo(): any;
|
|
7
|
+
redo(): any;
|
|
8
|
+
getCurrent(): any;
|
|
9
|
+
setCurrent(partition: any): any;
|
|
10
|
+
getAllHistory(): {
|
|
11
|
+
history: any[];
|
|
12
|
+
index: number;
|
|
13
|
+
};
|
|
14
|
+
clearHistory(): void;
|
|
15
|
+
canUndo(): boolean;
|
|
16
|
+
canRedo(): boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import log from "loglevel";
|
|
2
|
+
export class ActionPartitionHistory {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.history = []; // all recorded partition states
|
|
5
|
+
this.index = -1; // current pointer
|
|
6
|
+
this.current = null; // fallback for "original" state
|
|
7
|
+
}
|
|
8
|
+
addToHistory(partition) {
|
|
9
|
+
const newPartition = structuredClone(partition);
|
|
10
|
+
if (this.index < this.history.length - 1) {
|
|
11
|
+
this.history = this.history.slice(0, this.index + 1);
|
|
12
|
+
}
|
|
13
|
+
if (this.history.length === 0 ||
|
|
14
|
+
JSON.stringify(this.history[this.history.length - 1]) !== JSON.stringify(newPartition)) {
|
|
15
|
+
this.history.push(newPartition);
|
|
16
|
+
this.index = this.history.length - 1;
|
|
17
|
+
log.info("newPartition", newPartition, this.current, this.history.length);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
undo() {
|
|
21
|
+
if (!this.canUndo())
|
|
22
|
+
return null;
|
|
23
|
+
this.index--;
|
|
24
|
+
if (this.index < 0)
|
|
25
|
+
return this.current ? this.current : null;
|
|
26
|
+
return this.getCurrent();
|
|
27
|
+
}
|
|
28
|
+
redo() {
|
|
29
|
+
if (!this.canRedo())
|
|
30
|
+
return null;
|
|
31
|
+
this.index++;
|
|
32
|
+
return this.getCurrent();
|
|
33
|
+
}
|
|
34
|
+
getCurrent() {
|
|
35
|
+
if (this.index >= 0 && this.index < this.history.length) {
|
|
36
|
+
return structuredClone(this.history[this.index]);
|
|
37
|
+
}
|
|
38
|
+
return this.current ? this.current : null;
|
|
39
|
+
}
|
|
40
|
+
setCurrent(partition) {
|
|
41
|
+
this.current = structuredClone(partition); // or _.cloneDeep(partition)
|
|
42
|
+
return this.current;
|
|
43
|
+
}
|
|
44
|
+
getAllHistory() {
|
|
45
|
+
return {
|
|
46
|
+
history: this.history.map(p => structuredClone(p)),
|
|
47
|
+
index: this.index,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
clearHistory() {
|
|
51
|
+
this.history = [];
|
|
52
|
+
this.index = -1;
|
|
53
|
+
this.current = null;
|
|
54
|
+
console.log("History cleared.");
|
|
55
|
+
}
|
|
56
|
+
canUndo() {
|
|
57
|
+
return this.index >= 0;
|
|
58
|
+
}
|
|
59
|
+
canRedo() {
|
|
60
|
+
return this.index < this.history.length - 1;
|
|
61
|
+
}
|
|
62
|
+
}
|
package/lib/actionPathHistory.js
CHANGED
|
@@ -11,6 +11,10 @@ export class ActionPathHistory {
|
|
|
11
11
|
if (this.index < this.history.length - 1) {
|
|
12
12
|
this.history = this.history.slice(0, this.index + 1);
|
|
13
13
|
}
|
|
14
|
+
// clear history if its a complete undo or new history
|
|
15
|
+
if (this.index == -1) {
|
|
16
|
+
this.clearHistory();
|
|
17
|
+
}
|
|
14
18
|
// Avoid pushing duplicates
|
|
15
19
|
if (this.history.length === 0 ||
|
|
16
20
|
JSON.stringify(this.history[this.history.length - 1]) !== JSON.stringify(newPath)) {
|
package/lib/architwin.d.ts
CHANGED
|
@@ -70,6 +70,7 @@ declare let _partitionNodes: PartitionNode[];
|
|
|
70
70
|
declare let _currentSpace: any;
|
|
71
71
|
declare let _tagIotCategoryTypes: ITagIOTCategory[];
|
|
72
72
|
declare let _tagIotDevices: DeviceInfo[];
|
|
73
|
+
declare let _iotLinkedSyatemOptions: string[];
|
|
73
74
|
declare let _spaceUsers: ScreenShareUser[];
|
|
74
75
|
declare let _screenSharingHostUser: ScreenShareUser;
|
|
75
76
|
declare let _screenSharingParticipantUsers: ScreenShareUser[];
|
|
@@ -775,6 +776,7 @@ declare function setCurrentSpace(space: ICurrentSpace): any;
|
|
|
775
776
|
declare function setIotCategoryTypes(payload: Array<ITagIOTCategory>): ITagIOTCategory[];
|
|
776
777
|
declare function setIotDeviceTypes(payload: Array<DeviceInfo>): DeviceInfo[];
|
|
777
778
|
declare function setIoTDeviceTagIcons(payload: any): void;
|
|
779
|
+
declare function setIoTLinkedSystemOptions(payload: Array<string>): void;
|
|
778
780
|
declare function getIoTDeviceTagIcons(): {
|
|
779
781
|
alert: string;
|
|
780
782
|
normal: string;
|
|
@@ -962,4 +964,4 @@ declare function redoPipePath(): void;
|
|
|
962
964
|
* @returns void
|
|
963
965
|
* */
|
|
964
966
|
declare function setPointerEnabled(value: boolean): void;
|
|
965
|
-
export { _atwin, _config, _mpConfig, tags, sweeps, selectedObject, previousObjTransform, currentObjTransform, actionHistory, state, _tags, _tagCategories, _tagMessageRecepients, _space, _spaceId, _api, _pointerCoord, _3DXObjects, _meetingParticipants, _generatedObjectIds, _tagIotCategoryTypes, _tagIotDevices, tagColors, domMousePosition, isFitScreenOccupied, isCdnMapDataAvailable, minimap, _modelDetails, _onMouseClickInstance, transformHistory, _partitionNodes, _currentSpace, _spaceUsers, _screenSharingHostUser, _screenSharingParticipantUsers, initAtwinApi, getAtwinSdk, connectSpace, disconnectSpace, clearActionHistory, getSweeps, getCurrentSweep, getCurrentSweepPosition, moveToSweep, getNearbySweeps, getAllSweeps, getCurrentCameraPose, getCurrentCameraZoom, getCameraPosition, getCurrentFloor, moveInDirection, cameraLookAt, cameraPan, cameraRotate, cameraSetRotation, getViewMode, setViewMode, captureSpaceScreenshot, captureScreenshotAndCameraDetails, captureCurrentView, cameraZoomBy, cameraZoomReset, cameraZoomTo, getNearbyObjects, setTransformMode, setSelectedObject, clearSelectedObject, revertTransform, setTransformControls, removeTransformControls, setRenderDistance, addObject, getObject, addObjectToSpace, renderModel, addMediaScreen, attachMediaScreenContent, updateObject, updateShowcaseObject, deleteObject, deleteShowcaseObject, copyObject, replaceObject, getTargetPosition, setObjectTransformation, setPointerCoordinates, addTextMarkupScreen, setTextMarkupScreenContent, goTo3dx, goToModel, hasTimeElapsed, getSelectedObject, renderAvatar, setSpaceAvatar, get3DXObjects, set3DXObjects, clear3DXObjects, setLibrary, getLibrary, disposeModel, disposeAllModels, renderInSpaceMediaScreen, goToPosition, goToParticipant, getNearestSweepFromObject, cancelModelPlacement, renderViewpointMarker, toggleViewpointVisibility, convertDegRotationToEuler, isToolbarFeatureEnabled, goToMPOrigin, pauseVideo, playVideo, setVideoPlayback, setAnimationState, showMinimap, hideMinimap, getMapConfig, addTag, getTags, gotoTag, renderTag, disposeTag, disposeTags, toggleVisibilityTag, getMpTags, getTagDataCollection, getMpTag, showTags, attachTagMedia, detachTagMedia, moveTag, editTagLabel, editTagDescription, editTagStem, editTagIcon, editTagColor, attachSandbox, registerSandbox, saveTag, rotateCameraToObject, setModelVisibility, tagStateSubscriber, setTagIcon, setTagCategories, setUserAssignedCategories, getUserAssignedCategories, setTagMessageRecepients, getTagMessageRecepients, setTagMessages, getTagMessages, setSelectedTagUuid, getSelectedTagUuid, setCurrentSpace, toggleFitToScreen, getFloors, getLabels, renderMeetingSidebar, createMeetingTemplate, joinMeetingTemplate, meet, dispatchSpaceEvent, subscribeSpaceEvent, unsubscribeSpaceEvent, registerCustomSpaceEvent, clearSpaceEventQueue, initSocketIo, socketEmit, getParticipants, followParticipant, unFollowParticipant, enableHUD, disableHUD, getMediaScreenHUDs, canSetHud, saveMediaScreenHud, removeMediaScreenHud, enableFitScreen, disableFitScreen, initToolbarUI, themeManager, convertToEuler, disableSweeps, enableSweeps, enableSweep, disableSweep, tubeLineType, pathLineType, _sceneObject, _tubes, drawPath, toggleSpaceNavigation, startDraw, exitDraw, cancelDraw, setPolygonPath, setPolygonDrawingMode, setPathLine, setPathLineOptions, getCurrentTubeLine, renderPolygon, toggleWallVisibility, toggleMeshChildrenVisibility, toggleFloorVisibility, getChildrenOfModel, toggleVerticeRingVisibility, setPolygonFloorOffset, getPolygonFloorOffset, setFloorBaseHeight, clearFloorBaseHeight, enableVerticeControls, deleteEdge, disposePathLine, getFloorBaseHeight, setMeshChildrenMaterialProperty, undoDrawAction, redoDrawAction, setWallBaseHeight, getWallBaseHeight, clearWallBaseHeight, getVertexPath, setSpacePartitionNodes, setCurrentPolygon, getSpaceId, getCurrentPolygon, getPathBetweenSweeps, moveAlongPath, _atwinConnections, convertZupToYup, convertYupToZup, getRelativePosition, getOriginalWorldPosition, setSpaceMetadata, getSpaceMetadata, getAssetUrl, setIotCategoryTypes, setIotDeviceTypes, setIoTDeviceTagIcons, getIoTDeviceTagIcons, setScreenSharingHostUser, setScreenSharingParticipantUsers, renderCursorMarkerPointer, updatePointerTexture, toggleElementVisibility, renderPath, setDrawingConfig, getDrawingConfig, resetDrawingConfig, _pipeCategories, _selectedPipeCategory, setPipeCategories, setSelectedPipeCategory, getSelectedPipeCategory, _pipes, _selectedPipe, setPipes, setSelectedPipe, getSelectedPipe, deleteVertex, setPipeIsDrawingMode, getPipeIsDrawingMode, setPointerEnabled, removeScreenShareSessionData, setVertexPath, _pathConfig, undoPipePath, redoPipePath, pathHistory, clearTagVisibilityStorage, partitionHistory, _renderTagPaneContent, clearActivePane, renderPreviewModal, togglePreviewModal, closePreviewModal, setPreviewModalAction, activePreviewModal, _thisVertexPath, getIsPolygonVisible };
|
|
967
|
+
export { _atwin, _config, _mpConfig, tags, sweeps, selectedObject, previousObjTransform, currentObjTransform, actionHistory, state, _tags, _tagCategories, _tagMessageRecepients, _space, _spaceId, _api, _pointerCoord, _3DXObjects, _meetingParticipants, _generatedObjectIds, _tagIotCategoryTypes, _tagIotDevices, _iotLinkedSyatemOptions, tagColors, domMousePosition, isFitScreenOccupied, isCdnMapDataAvailable, minimap, _modelDetails, _onMouseClickInstance, transformHistory, _partitionNodes, _currentSpace, _spaceUsers, _screenSharingHostUser, _screenSharingParticipantUsers, initAtwinApi, getAtwinSdk, connectSpace, disconnectSpace, clearActionHistory, getSweeps, getCurrentSweep, getCurrentSweepPosition, moveToSweep, getNearbySweeps, getAllSweeps, getCurrentCameraPose, getCurrentCameraZoom, getCameraPosition, getCurrentFloor, moveInDirection, cameraLookAt, cameraPan, cameraRotate, cameraSetRotation, getViewMode, setViewMode, captureSpaceScreenshot, captureScreenshotAndCameraDetails, captureCurrentView, cameraZoomBy, cameraZoomReset, cameraZoomTo, getNearbyObjects, setTransformMode, setSelectedObject, clearSelectedObject, revertTransform, setTransformControls, removeTransformControls, setRenderDistance, addObject, getObject, addObjectToSpace, renderModel, addMediaScreen, attachMediaScreenContent, updateObject, updateShowcaseObject, deleteObject, deleteShowcaseObject, copyObject, replaceObject, getTargetPosition, setObjectTransformation, setPointerCoordinates, addTextMarkupScreen, setTextMarkupScreenContent, goTo3dx, goToModel, hasTimeElapsed, getSelectedObject, renderAvatar, setSpaceAvatar, get3DXObjects, set3DXObjects, clear3DXObjects, setLibrary, getLibrary, disposeModel, disposeAllModels, renderInSpaceMediaScreen, goToPosition, goToParticipant, getNearestSweepFromObject, cancelModelPlacement, renderViewpointMarker, toggleViewpointVisibility, convertDegRotationToEuler, isToolbarFeatureEnabled, goToMPOrigin, pauseVideo, playVideo, setVideoPlayback, setAnimationState, showMinimap, hideMinimap, getMapConfig, addTag, getTags, gotoTag, renderTag, disposeTag, disposeTags, toggleVisibilityTag, getMpTags, getTagDataCollection, getMpTag, showTags, attachTagMedia, detachTagMedia, moveTag, editTagLabel, editTagDescription, editTagStem, editTagIcon, editTagColor, attachSandbox, registerSandbox, saveTag, rotateCameraToObject, setModelVisibility, tagStateSubscriber, setTagIcon, setTagCategories, setUserAssignedCategories, getUserAssignedCategories, setTagMessageRecepients, getTagMessageRecepients, setTagMessages, getTagMessages, setSelectedTagUuid, getSelectedTagUuid, setCurrentSpace, toggleFitToScreen, getFloors, getLabels, renderMeetingSidebar, createMeetingTemplate, joinMeetingTemplate, meet, dispatchSpaceEvent, subscribeSpaceEvent, unsubscribeSpaceEvent, registerCustomSpaceEvent, clearSpaceEventQueue, initSocketIo, socketEmit, getParticipants, followParticipant, unFollowParticipant, enableHUD, disableHUD, getMediaScreenHUDs, canSetHud, saveMediaScreenHud, removeMediaScreenHud, enableFitScreen, disableFitScreen, initToolbarUI, themeManager, convertToEuler, disableSweeps, enableSweeps, enableSweep, disableSweep, tubeLineType, pathLineType, _sceneObject, _tubes, drawPath, toggleSpaceNavigation, startDraw, exitDraw, cancelDraw, setPolygonPath, setPolygonDrawingMode, setPathLine, setPathLineOptions, getCurrentTubeLine, renderPolygon, toggleWallVisibility, toggleMeshChildrenVisibility, toggleFloorVisibility, getChildrenOfModel, toggleVerticeRingVisibility, setPolygonFloorOffset, getPolygonFloorOffset, setFloorBaseHeight, clearFloorBaseHeight, enableVerticeControls, deleteEdge, disposePathLine, getFloorBaseHeight, setMeshChildrenMaterialProperty, undoDrawAction, redoDrawAction, setWallBaseHeight, getWallBaseHeight, clearWallBaseHeight, getVertexPath, setSpacePartitionNodes, setCurrentPolygon, getSpaceId, getCurrentPolygon, getPathBetweenSweeps, moveAlongPath, _atwinConnections, convertZupToYup, convertYupToZup, getRelativePosition, getOriginalWorldPosition, setSpaceMetadata, getSpaceMetadata, getAssetUrl, setIotCategoryTypes, setIotDeviceTypes, setIoTDeviceTagIcons, getIoTDeviceTagIcons, setIoTLinkedSystemOptions, setScreenSharingHostUser, setScreenSharingParticipantUsers, renderCursorMarkerPointer, updatePointerTexture, toggleElementVisibility, renderPath, setDrawingConfig, getDrawingConfig, resetDrawingConfig, _pipeCategories, _selectedPipeCategory, setPipeCategories, setSelectedPipeCategory, getSelectedPipeCategory, _pipes, _selectedPipe, setPipes, setSelectedPipe, getSelectedPipe, deleteVertex, setPipeIsDrawingMode, getPipeIsDrawingMode, setPointerEnabled, removeScreenShareSessionData, setVertexPath, _pathConfig, undoPipePath, redoPipePath, pathHistory, clearTagVisibilityStorage, partitionHistory, _renderTagPaneContent, clearActivePane, renderPreviewModal, togglePreviewModal, closePreviewModal, setPreviewModalAction, activePreviewModal, _thisVertexPath, getIsPolygonVisible };
|