@smarterplan/ngx-smarterplan-core 1.4.16 → 1.4.18
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/README.md +24 -24
- package/esm2022/lib/components/csv-export/csv-export.component.mjs +3 -3
- package/esm2022/lib/components/loader/loader.component.mjs +3 -3
- package/esm2022/lib/components/menu-bar/avatar/avatar.component.mjs +1 -1
- package/esm2022/lib/components/menu-bar/menu-bar.component.mjs +3 -3
- package/esm2022/lib/components/menu-bar/navigation-bar/navigation-bar.component.mjs +3 -3
- package/esm2022/lib/components/modal-switch-visit/modal-switch-visit.component.mjs +3 -3
- package/esm2022/lib/components/search-bar/search-bar.component.mjs +3 -3
- package/esm2022/lib/components/support-modal/support-modal.component.mjs +3 -3
- package/esm2022/lib/config.mjs +1 -1
- package/esm2022/lib/helpers.service.mjs +1 -1
- package/esm2022/lib/matterport-extensions/nest-thermostat/CanvasImage.mjs +1 -1
- package/esm2022/lib/matterport-extensions/nest-thermostat/CanvasRenderer.mjs +1 -1
- package/esm2022/lib/matterport-extensions/nest-thermostat/NestThermostat.mjs +1 -1
- package/esm2022/lib/matterport-extensions/nest-thermostat/PlaneRenderer.mjs +1 -1
- package/esm2022/lib/matterport-extensions/scene-component/SceneComponent.mjs +1 -1
- package/esm2022/lib/matterport-extensions/security-camera/SecurityCamera.mjs +22 -22
- package/esm2022/lib/matterport-extensions/tv-player/TvPlayer.mjs +1 -1
- package/esm2022/lib/matterport-extensions/view-frustum-mesh/ViewFrustumMesh.mjs +22 -22
- package/esm2022/lib/mattertagData.mjs +10 -1
- package/esm2022/lib/ngx-smarterplan-core.module.mjs +1 -1
- package/esm2022/lib/ngx-smarterplan-core.service.mjs +1 -1
- package/esm2022/lib/pipes/duration-to-string.pipe.mjs +1 -1
- package/esm2022/lib/pipes/format-date-number-to-digits.pipe.mjs +1 -1
- package/esm2022/lib/pipes/hashtag-from-id.pipe.mjs +1 -1
- package/esm2022/lib/pipes/safe-url.pipe.mjs +1 -1
- package/esm2022/lib/pipes/time-date-to-local-string.pipe.mjs +1 -1
- package/esm2022/lib/pipes/username-from-id.pipe.mjs +1 -1
- package/esm2022/lib/services/amplify-cache.service.mjs +1 -1
- package/esm2022/lib/services/base-tab.service.mjs +1 -1
- package/esm2022/lib/services/baseVisibility.service.mjs +1 -1
- package/esm2022/lib/services/content.service.mjs +1 -1
- package/esm2022/lib/services/filter.service.mjs +11 -1
- package/esm2022/lib/services/intervention.service.mjs +1 -1
- package/esm2022/lib/services/locale.service.mjs +1 -1
- package/esm2022/lib/services/matterport-import.service.mjs +10 -3
- package/esm2022/lib/services/matterport-measurement.service.mjs +1 -1
- package/esm2022/lib/services/matterport-navigation.service.mjs +1 -1
- package/esm2022/lib/services/matterport-object3d.service.mjs +1 -1
- package/esm2022/lib/services/matterport-pointer.service.mjs +6 -6
- package/esm2022/lib/services/matterport-tag-copy.service.mjs +455 -9
- package/esm2022/lib/services/matterport-tag.service.mjs +99 -10
- package/esm2022/lib/services/matterport.service.mjs +95 -49
- package/esm2022/lib/services/models/affectation.service.mjs +1 -1
- package/esm2022/lib/services/models/base-object.service.mjs +31 -4
- package/esm2022/lib/services/models/capture.service.mjs +1 -1
- package/esm2022/lib/services/models/comment.service.mjs +1 -1
- package/esm2022/lib/services/models/domain.service.mjs +1 -1
- package/esm2022/lib/services/models/equipment.service.mjs +14 -13
- package/esm2022/lib/services/models/event.service.mjs +1 -1
- package/esm2022/lib/services/models/feature.service.mjs +8 -7
- package/esm2022/lib/services/models/hashtag.service.mjs +1 -1
- package/esm2022/lib/services/models/layer.service.mjs +1 -1
- package/esm2022/lib/services/models/measurement.service.mjs +1 -1
- package/esm2022/lib/services/models/mission.service.mjs +1 -1
- package/esm2022/lib/services/models/navigation.service.mjs +1 -1
- package/esm2022/lib/services/models/node.service.mjs +1 -1
- package/esm2022/lib/services/models/object3D.service.mjs +1 -1
- package/esm2022/lib/services/models/operation.service.mjs +1 -1
- package/esm2022/lib/services/models/organisation.service.mjs +1 -1
- package/esm2022/lib/services/models/plan.service.mjs +1 -1
- package/esm2022/lib/services/models/poi.service.mjs +62 -50
- package/esm2022/lib/services/models/profile.service.mjs +1 -1
- package/esm2022/lib/services/models/property.service.mjs +1 -1
- package/esm2022/lib/services/models/space.service.mjs +25 -2
- package/esm2022/lib/services/models/template.service.mjs +1 -1
- package/esm2022/lib/services/models/ticket.service.mjs +27 -8
- package/esm2022/lib/services/models/visit.service.mjs +1 -1
- package/esm2022/lib/services/models/zone.service.mjs +9 -5
- package/esm2022/lib/services/navigator.service.mjs +14 -1
- package/esm2022/lib/services/s3.service.mjs +1 -1
- package/esm2022/lib/services/search.service.mjs +1 -1
- package/esm2022/lib/services/support.service.mjs +1 -1
- package/esm2022/lib/services/tag.service.mjs +16 -16
- package/esm2022/lib/services/threejs-import.service.mjs +1 -1
- package/esm2022/lib/services/threejs.service.mjs +316 -35
- package/esm2022/lib/services/user.service.mjs +1 -1
- package/esm2022/lib/services/utils/matterport-transform.util.mjs +1 -1
- package/esm2022/lib/services/validators.service.mjs +1 -1
- package/esm2022/lib/services/viewer.service.mjs +147 -8
- package/esm2022/lib/services/zone-drawer.service.mjs +1 -1
- package/esm2022/lib/services/zoneChange.service.mjs +10 -1
- package/esm2022/lib/tokens/matterport-sdk-key.token.mjs +1 -1
- package/esm2022/lib/types.service.mjs +1 -1
- package/esm2022/lib/validators/email.directive.mjs +1 -1
- package/esm2022/lib/validators/no-empty.directive.mjs +1 -1
- package/esm2022/lib/validators/number.directive.mjs +1 -1
- package/esm2022/lib/validators/text.directive.mjs +1 -1
- package/esm2022/public-api.mjs +1 -1
- package/fesm2022/smarterplan-ngx-smarterplan-core.mjs +5150 -4022
- package/fesm2022/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/lib/mattertagData.d.ts +4 -0
- package/lib/services/matterport-tag-copy.service.d.ts +128 -2
- package/lib/services/matterport-tag.service.d.ts +24 -1
- package/lib/services/matterport.service.d.ts +12 -3
- package/lib/services/models/base-object.service.d.ts +11 -1
- package/lib/services/models/equipment.service.d.ts +2 -1
- package/lib/services/models/feature.service.d.ts +2 -1
- package/lib/services/models/poi.service.d.ts +1 -0
- package/lib/services/models/space.service.d.ts +7 -0
- package/lib/services/models/ticket.service.d.ts +4 -1
- package/lib/services/threejs.service.d.ts +103 -5
- package/lib/services/viewer.service.d.ts +39 -1
- package/lib/services/zoneChange.service.d.ts +9 -0
- package/lib/types.service.d.ts +8 -0
- package/package.json +1 -1
- package/src/assets/vs-app.json +67 -67
|
@@ -4,9 +4,11 @@ import { ThreeJsService } from './threejs.service';
|
|
|
4
4
|
import { BaseTagService } from './tag.service';
|
|
5
5
|
import { DbObjectType, POI, PoiType, Comment, Equipment, Ticket, Feature, SpModule } from '../types.service';
|
|
6
6
|
import { PoiService } from './models/poi.service';
|
|
7
|
+
import { Config } from '../config';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class ViewerService {
|
|
9
10
|
private readonly sdkKey;
|
|
11
|
+
private readonly config;
|
|
10
12
|
private poiService;
|
|
11
13
|
private matterportService;
|
|
12
14
|
private threeJsService;
|
|
@@ -25,6 +27,14 @@ export declare class ViewerService {
|
|
|
25
27
|
dataIsLoaded: Subject<boolean>;
|
|
26
28
|
isLoaded: boolean;
|
|
27
29
|
showingViewer: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* The space being viewed, whichever viewer is showing it.
|
|
32
|
+
*
|
|
33
|
+
* MatterportService carries its own copy, set while its SDK connects - which never happens in
|
|
34
|
+
* Three.js mode. Anything that reads only that one silently does nothing for a 3D model, and the
|
|
35
|
+
* lists that feed tags are exactly that.
|
|
36
|
+
*/
|
|
37
|
+
currentSpaceID: string | null;
|
|
28
38
|
sweepToMove: string | null;
|
|
29
39
|
rotationToMove: {
|
|
30
40
|
x: number;
|
|
@@ -52,7 +62,7 @@ export declare class ViewerService {
|
|
|
52
62
|
};
|
|
53
63
|
};
|
|
54
64
|
private isObjectLoaded;
|
|
55
|
-
constructor(sdkKey: string, poiService: PoiService, matterportService: MatterportService, threeJsService: ThreeJsService);
|
|
65
|
+
constructor(sdkKey: string, config: Config, poiService: PoiService, matterportService: MatterportService, threeJsService: ThreeJsService);
|
|
56
66
|
checkMode(indexMode: string): boolean;
|
|
57
67
|
setMode(indexMode: string): void;
|
|
58
68
|
setTourUrl(options: {
|
|
@@ -92,6 +102,16 @@ export declare class ViewerService {
|
|
|
92
102
|
* of the pipeline that already drives Matterport.
|
|
93
103
|
*/
|
|
94
104
|
private addThreeJsTagFromPOI;
|
|
105
|
+
/**
|
|
106
|
+
* The image to draw a tag with, mirroring what Matterport shows for the same POI.
|
|
107
|
+
*
|
|
108
|
+
* Matterport registers one texture per type (`icon-ticket`, `icon-equipment`...) from the same
|
|
109
|
+
* config entries used here, and overrides it with the POI's own icon when it has one. Reading the
|
|
110
|
+
* same two sources is what keeps a tag looking like itself across the two viewers.
|
|
111
|
+
*/
|
|
112
|
+
private resolveTagIconUrl;
|
|
113
|
+
/** The configured icon for a POI type, or null when that type has none. */
|
|
114
|
+
private defaultTagIconUrl;
|
|
95
115
|
/** Moves the Three.js camera to frame a tag, mirroring Matterport's goToTag. */
|
|
96
116
|
goToThreeJsTag(elementId: string): void;
|
|
97
117
|
/** Shows only tags of the given POI types; null clears the filter. */
|
|
@@ -124,6 +144,11 @@ export declare class ViewerService {
|
|
|
124
144
|
get threeJsModelLoadCancelled$(): Subject<void>;
|
|
125
145
|
/** Stops the Three.js model download in progress. */
|
|
126
146
|
cancelThreeJsModelLoad(): void;
|
|
147
|
+
/** Emits a tag's label while the pointer is over it in the Three.js scene. */
|
|
148
|
+
get threeJsTagHovered$(): Subject<{
|
|
149
|
+
label: string;
|
|
150
|
+
event: MouseEvent;
|
|
151
|
+
}>;
|
|
127
152
|
/** Emits the element id of a tag clicked in the Three.js scene. */
|
|
128
153
|
get threeJsTagClicked$(): Subject<import("./threejs.service").ThreeJsTagClick>;
|
|
129
154
|
/**
|
|
@@ -161,8 +186,21 @@ export declare class ViewerService {
|
|
|
161
186
|
* a tag created here show up in the right place there - and the other way round.
|
|
162
187
|
*/
|
|
163
188
|
private commitThreeJsTagPlacement;
|
|
189
|
+
/**
|
|
190
|
+
* Creates the POI for an element just placed in the Three.js scene.
|
|
191
|
+
*
|
|
192
|
+
* The Matterport path reaches the same result through its tag dictionary - the tag exists first
|
|
193
|
+
* and carries the coordinates. Three.js has no such object, so the placement captured at click
|
|
194
|
+
* time is the only record of where the user pointed, and it has to become a POI here or it is
|
|
195
|
+
* lost when the form closes.
|
|
196
|
+
*
|
|
197
|
+
* Returns null when there is no pending placement, which is the normal case in Matterport mode.
|
|
198
|
+
*/
|
|
199
|
+
createPoiForThreeJsPlacement(element: DbObjectType, poiType: PoiType): Promise<POI | null>;
|
|
164
200
|
/** Emits when a tag is dropped on the model in the Three.js scene. */
|
|
165
201
|
get threeJsTagPlaced$(): Subject<import("./threejs.service").ThreeJsTagPlacement>;
|
|
202
|
+
/** Emits when the calibration walkthrough is abandoned, including via Escape. */
|
|
203
|
+
get threeJsAlignmentCancelled$(): Subject<void>;
|
|
166
204
|
/** Leaves Three.js tag placement mode without placing anything. */
|
|
167
205
|
cancelThreeJsTagPlacement(): void;
|
|
168
206
|
editOnlyTagStyleForPoi(poi: POI, object: DbObjectType): void;
|
|
@@ -8,6 +8,15 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
export declare class ZoneChangeService {
|
|
9
9
|
zoneChange: Subject<Zone | null>;
|
|
10
10
|
zonesForUserChange: Subject<Zone[] | null>;
|
|
11
|
+
/**
|
|
12
|
+
* Emits the space opened by a viewer that has no zone navigation (Three.js), or null when it
|
|
13
|
+
* closes.
|
|
14
|
+
*
|
|
15
|
+
* Zones are defined by the sweeps they contain, so they only mean something in a Matterport tour.
|
|
16
|
+
* A 3D model has no sweeps: it shows the whole space at once, and the services that load data
|
|
17
|
+
* listen here instead of to `zoneChange` to know which space they are looking at.
|
|
18
|
+
*/
|
|
19
|
+
spaceWithoutZones: Subject<string | null>;
|
|
11
20
|
private currentZone;
|
|
12
21
|
private currentZones;
|
|
13
22
|
floorHasChanged: EventEmitter<Zone>;
|
package/lib/types.service.d.ts
CHANGED
|
@@ -570,6 +570,14 @@ export type Space = {
|
|
|
570
570
|
status?: SpaceStatus | null;
|
|
571
571
|
guestLink?: string | null;
|
|
572
572
|
signedImageUrl?: string | null;
|
|
573
|
+
/**
|
|
574
|
+
* The capture a visitor opens by default, of any viewer type.
|
|
575
|
+
*
|
|
576
|
+
* Kept on the space rather than as a flag on each capture: there is one field, so there can only
|
|
577
|
+
* be one answer, whichever screen set it. A flag per capture would let two of them claim the
|
|
578
|
+
* default and put the choice back where it started - undefined.
|
|
579
|
+
*/
|
|
580
|
+
defaultCaptureID?: string | null;
|
|
573
581
|
zones?: {
|
|
574
582
|
__typename?: 'ModelZoneConnection';
|
|
575
583
|
items?: Array<Zone | null> | null;
|
package/package.json
CHANGED
package/src/assets/vs-app.json
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "1.0",
|
|
3
|
-
"payload": {
|
|
4
|
-
"objects": [
|
|
5
|
-
{
|
|
6
|
-
"name": "slot_camera",
|
|
7
|
-
"position": {
|
|
8
|
-
"x": 2.8,
|
|
9
|
-
"y": 2.4,
|
|
10
|
-
"z": 10.71
|
|
11
|
-
},
|
|
12
|
-
"rotation": {
|
|
13
|
-
"x": 0,
|
|
14
|
-
"y": -22,
|
|
15
|
-
"z": 0
|
|
16
|
-
},
|
|
17
|
-
"scale": {
|
|
18
|
-
"x": 1,
|
|
19
|
-
"y": 1,
|
|
20
|
-
"z": 1
|
|
21
|
-
},
|
|
22
|
-
"components": [
|
|
23
|
-
{
|
|
24
|
-
"type": "mp.gltfLoader",
|
|
25
|
-
"inputs": {
|
|
26
|
-
"url": "https://static.matterport.com/showcase-sdk/examples/assets-1.0-2-g6b74572/assets/models/camera-1/scene.gltf",
|
|
27
|
-
"localScale": { "x": 0.0008, "y": 0.0008, "z": 0.0008 },
|
|
28
|
-
"localRotation": { "x": 0, "y": 90, "z": 0 }
|
|
29
|
-
},
|
|
30
|
-
"events": {
|
|
31
|
-
"INTERACTION.CLICK": false,
|
|
32
|
-
"INTERACTION.HOVER": false,
|
|
33
|
-
"INTERACTION.DRAG": false
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"type": "mp.securityCamera",
|
|
38
|
-
"inputs": {
|
|
39
|
-
"nearPlane": 0.1,
|
|
40
|
-
"farPlane": 10,
|
|
41
|
-
"horizontalFOV": 52,
|
|
42
|
-
"aspect": 1.7777777777777777,
|
|
43
|
-
"localPosition": {
|
|
44
|
-
"x": 0,
|
|
45
|
-
"y": 0.18,
|
|
46
|
-
"z": -0.3
|
|
47
|
-
},
|
|
48
|
-
"localRotation": {
|
|
49
|
-
"x": -15,
|
|
50
|
-
"y": 0,
|
|
51
|
-
"z": 0
|
|
52
|
-
},
|
|
53
|
-
"color": 65280,
|
|
54
|
-
"panPeriod": 5,
|
|
55
|
-
"panAngle": -45
|
|
56
|
-
},
|
|
57
|
-
"events": {
|
|
58
|
-
"INTERACTION.CLICK": false,
|
|
59
|
-
"INTERACTION.HOVER": false,
|
|
60
|
-
"INTERACTION.DRAG": false
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
]
|
|
64
|
-
}
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0",
|
|
3
|
+
"payload": {
|
|
4
|
+
"objects": [
|
|
5
|
+
{
|
|
6
|
+
"name": "slot_camera",
|
|
7
|
+
"position": {
|
|
8
|
+
"x": 2.8,
|
|
9
|
+
"y": 2.4,
|
|
10
|
+
"z": 10.71
|
|
11
|
+
},
|
|
12
|
+
"rotation": {
|
|
13
|
+
"x": 0,
|
|
14
|
+
"y": -22,
|
|
15
|
+
"z": 0
|
|
16
|
+
},
|
|
17
|
+
"scale": {
|
|
18
|
+
"x": 1,
|
|
19
|
+
"y": 1,
|
|
20
|
+
"z": 1
|
|
21
|
+
},
|
|
22
|
+
"components": [
|
|
23
|
+
{
|
|
24
|
+
"type": "mp.gltfLoader",
|
|
25
|
+
"inputs": {
|
|
26
|
+
"url": "https://static.matterport.com/showcase-sdk/examples/assets-1.0-2-g6b74572/assets/models/camera-1/scene.gltf",
|
|
27
|
+
"localScale": { "x": 0.0008, "y": 0.0008, "z": 0.0008 },
|
|
28
|
+
"localRotation": { "x": 0, "y": 90, "z": 0 }
|
|
29
|
+
},
|
|
30
|
+
"events": {
|
|
31
|
+
"INTERACTION.CLICK": false,
|
|
32
|
+
"INTERACTION.HOVER": false,
|
|
33
|
+
"INTERACTION.DRAG": false
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "mp.securityCamera",
|
|
38
|
+
"inputs": {
|
|
39
|
+
"nearPlane": 0.1,
|
|
40
|
+
"farPlane": 10,
|
|
41
|
+
"horizontalFOV": 52,
|
|
42
|
+
"aspect": 1.7777777777777777,
|
|
43
|
+
"localPosition": {
|
|
44
|
+
"x": 0,
|
|
45
|
+
"y": 0.18,
|
|
46
|
+
"z": -0.3
|
|
47
|
+
},
|
|
48
|
+
"localRotation": {
|
|
49
|
+
"x": -15,
|
|
50
|
+
"y": 0,
|
|
51
|
+
"z": 0
|
|
52
|
+
},
|
|
53
|
+
"color": 65280,
|
|
54
|
+
"panPeriod": 5,
|
|
55
|
+
"panAngle": -45
|
|
56
|
+
},
|
|
57
|
+
"events": {
|
|
58
|
+
"INTERACTION.CLICK": false,
|
|
59
|
+
"INTERACTION.HOVER": false,
|
|
60
|
+
"INTERACTION.DRAG": false
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
}
|