@smarterplan/ngx-smarterplan-core 1.4.9 → 1.4.11
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/esm2022/lib/matterport-extensions/security-camera/SecurityCamera.mjs +10 -4
- package/esm2022/lib/services/filter.service.mjs +19 -16
- package/esm2022/lib/services/matterport-import.service.mjs +190 -18
- package/esm2022/lib/services/matterport-navigation.service.mjs +85 -6
- package/esm2022/lib/services/matterport-tag.service.mjs +32 -17
- package/esm2022/lib/services/matterport.service.mjs +24 -12
- package/esm2022/lib/services/models/comment.service.mjs +6 -3
- package/esm2022/lib/services/models/equipment.service.mjs +51 -59
- package/esm2022/lib/services/models/ticket.service.mjs +33 -33
- package/esm2022/lib/services/navigator.service.mjs +4 -5
- package/esm2022/lib/services/viewer.service.mjs +22 -7
- package/esm2022/lib/tokens/matterport-sdk-key.token.mjs +8 -0
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/smarterplan-ngx-smarterplan-core.mjs +466 -166
- package/fesm2022/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/lib/services/matterport-import.service.d.ts +12 -1
- package/lib/services/matterport-navigation.service.d.ts +30 -0
- package/lib/services/matterport.service.d.ts +6 -1
- package/lib/services/models/ticket.service.d.ts +1 -1
- package/lib/services/viewer.service.d.ts +14 -2
- package/lib/tokens/matterport-sdk-key.token.d.ts +7 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -15,6 +15,7 @@ declare global {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
export declare class MatterportImportService {
|
|
18
|
+
private readonly sdkKey;
|
|
18
19
|
private navigationService;
|
|
19
20
|
private zoneService;
|
|
20
21
|
private viewerService;
|
|
@@ -36,11 +37,21 @@ export declare class MatterportImportService {
|
|
|
36
37
|
importingImages: Subject<boolean>;
|
|
37
38
|
sweepProcessedCount: Subject<number>;
|
|
38
39
|
totalSweepsCount: Subject<number>;
|
|
39
|
-
constructor(navigationService: NavigationService, zoneService: ZoneService, viewerService: ViewerService, layerService: LayerService, userService: BaseUserService, planService: PlanService);
|
|
40
|
+
constructor(sdkKey: string, navigationService: NavigationService, zoneService: ZoneService, viewerService: ViewerService, layerService: LayerService, userService: BaseUserService, planService: PlanService);
|
|
40
41
|
initSdkForModel(modelID: string): Promise<boolean>;
|
|
41
42
|
importData(spaceID: string, surface: number, reloading?: boolean, node?: Node, overrideExisting?: boolean): Promise<boolean>;
|
|
42
43
|
createZone(name: string, layerID: string, surface?: number, parentID?: string, sweeps?: string[], node?: Node, metadata?: string): Promise<Zone>;
|
|
43
44
|
import360images(overrideExisting?: boolean): Promise<boolean>;
|
|
45
|
+
captureEquirectangularWithRetry(options: any, renderOptions: any, { maxAttempts, initialBackoffMs, perAttemptTimeoutMs, sweepIdForReadyCheck, waitForSweepTimeoutMs }?: {
|
|
46
|
+
maxAttempts?: number;
|
|
47
|
+
initialBackoffMs?: number;
|
|
48
|
+
perAttemptTimeoutMs?: number;
|
|
49
|
+
sweepIdForReadyCheck?: any;
|
|
50
|
+
waitForSweepTimeoutMs?: number;
|
|
51
|
+
}): Promise<any>;
|
|
52
|
+
waitForSweepReady(targetId: string, timeoutMs?: number): Promise<void>;
|
|
53
|
+
sleep(ms: number): Promise<void>;
|
|
54
|
+
timeoutPromise(ms: number, message: string): Promise<never>;
|
|
44
55
|
getUploadedImageCount(modelID: any): Promise<any>;
|
|
45
56
|
moveToFloor(floorName: string, matterportFloorSequence?: number): Promise<void>;
|
|
46
57
|
importFloorData(defautZoneID: string, node: Node): Promise<Zone[]>;
|
|
@@ -20,17 +20,47 @@ export declare class MatterportNavigationService {
|
|
|
20
20
|
currentRooms: any[];
|
|
21
21
|
/** Sequence number of the floor currently visible in sdk.Floor.current (null = single-floor or unknown). */
|
|
22
22
|
currentFloorSequence: number | null;
|
|
23
|
+
private sidToUuid;
|
|
24
|
+
private uuidToSid;
|
|
23
25
|
constructor();
|
|
26
|
+
/**
|
|
27
|
+
* Builds the bidirectional sid ↔ uuid maps from the sweep collection.
|
|
28
|
+
* Must be called every time the sweep collection is updated.
|
|
29
|
+
*/
|
|
30
|
+
buildSweepIdMaps(collection: any): void;
|
|
31
|
+
/**
|
|
32
|
+
* Resolves any sweep identifier (sid or uuid) to the SDK runtime **sid**.
|
|
33
|
+
* This is what sdk.Sweep.moveTo() and sdk.Sweep.disable() expect.
|
|
34
|
+
* Falls back to the input if no mapping exists.
|
|
35
|
+
*/
|
|
36
|
+
resolveSweepSid(idOrUuid: string): string;
|
|
37
|
+
/**
|
|
38
|
+
* Resolves any sweep identifier (sid or uuid) to the persistent **uuid**.
|
|
39
|
+
* This is what the database stores (zone.sweepIDs, poi.matterportSweepID).
|
|
40
|
+
* Falls back to the input if no mapping exists.
|
|
41
|
+
*/
|
|
42
|
+
resolveSweepUuid(sidOrUuid: string): string;
|
|
24
43
|
action_toolbox_floorplan(sdk: any): Promise<void>;
|
|
25
44
|
action_toolbox_inside_view(sdk: any): void;
|
|
26
45
|
actionShowAllFloors(sdk: any): void;
|
|
27
46
|
action_toolbox_dollhouse(sdk: any): Promise<void>;
|
|
28
47
|
action_go_to_floor(sdk: any, floorName: string, matterportFloorSequence?: number): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Navigate to a sweep. The caller can pass either a sid or a uuid;
|
|
50
|
+
* this method resolves it to the SDK sid before calling Sweep.moveTo().
|
|
51
|
+
*/
|
|
29
52
|
action_go_to_sweep(sdk: any, sweep: string, rotation?: {
|
|
30
53
|
x: number;
|
|
31
54
|
y: number;
|
|
32
55
|
} | null): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Disable forbidden sweeps. Resolves each sweep ID to sid before calling SDK.
|
|
58
|
+
*/
|
|
33
59
|
removeForbiddenSweeps(sdk: any, forbiddenSweeps: string[]): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Returns the current sweep as a **uuid** (for database matching).
|
|
62
|
+
* The SDK's poseCamera.sweep is a sid; we translate it.
|
|
63
|
+
*/
|
|
34
64
|
getCurrentSweep(poseCamera: any): string | null;
|
|
35
65
|
setCameraMode(mode: string): void;
|
|
36
66
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatterportNavigationService, never>;
|
|
@@ -43,6 +43,7 @@ declare global {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
export declare class MatterportService {
|
|
46
|
+
private readonly sdkKey;
|
|
46
47
|
private router;
|
|
47
48
|
private activeRoute;
|
|
48
49
|
private visibilityService;
|
|
@@ -126,7 +127,7 @@ export declare class MatterportService {
|
|
|
126
127
|
pointerLeftClickHandler: (evt: MouseEvent) => void;
|
|
127
128
|
pointerRightClickHandler: (e: any) => void;
|
|
128
129
|
pointerMiddleClickHandler: (e: any) => void;
|
|
129
|
-
constructor(config: Config, router: Router, activeRoute: ActivatedRoute, visibilityService: BaseVisibilityService, ngZone: NgZone, measurementService: MatterportMeasurementService, navigationService: MatterportNavigationService, pointerService: MatterportPointerService, object3DService: MatterportObject3DService, matterportTagService: MatterportTagService);
|
|
130
|
+
constructor(config: Config, sdkKey: string, router: Router, activeRoute: ActivatedRoute, visibilityService: BaseVisibilityService, ngZone: NgZone, measurementService: MatterportMeasurementService, navigationService: MatterportNavigationService, pointerService: MatterportPointerService, object3DService: MatterportObject3DService, matterportTagService: MatterportTagService);
|
|
130
131
|
/**
|
|
131
132
|
* Initializes the Matterport SDK, sets up event listeners, and configures assets.
|
|
132
133
|
* @param tagService Service used to generate and inject HTML into tags.
|
|
@@ -134,6 +135,10 @@ export declare class MatterportService {
|
|
|
134
135
|
* @returns Promise resolving to true when initialization is complete.
|
|
135
136
|
*/
|
|
136
137
|
initSdk(tagService: BaseTagService, module?: SpModule): Promise<boolean>;
|
|
138
|
+
/**
|
|
139
|
+
* @deprecated Use navigationService.resolveSweepUuid() instead.
|
|
140
|
+
* Kept temporarily for backwards compatibility.
|
|
141
|
+
*/
|
|
137
142
|
getSweepUUIDForSid(sid: string): string | null;
|
|
138
143
|
setLightingOff(): void;
|
|
139
144
|
getDistanceForLastMeasurement(): void;
|
|
@@ -51,7 +51,7 @@ export declare class TicketsService extends BaseObjectService {
|
|
|
51
51
|
awsKinesisAnalytics: any;
|
|
52
52
|
isMuseumUser: boolean;
|
|
53
53
|
navSubscription: Subscription;
|
|
54
|
-
|
|
54
|
+
filterSubscription: Subscription;
|
|
55
55
|
floorsPerSpace: Zone[];
|
|
56
56
|
selectedFloor: Zone;
|
|
57
57
|
private destroy$;
|
|
@@ -5,6 +5,7 @@ import { DbObjectType, POI, PoiType, Comment, Equipment, Ticket, Feature, SpModu
|
|
|
5
5
|
import { PoiService } from './models/poi.service';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class ViewerService {
|
|
8
|
+
private readonly sdkKey;
|
|
8
9
|
private poiService;
|
|
9
10
|
private matterportService;
|
|
10
11
|
private viewerMode;
|
|
@@ -49,10 +50,21 @@ export declare class ViewerService {
|
|
|
49
50
|
};
|
|
50
51
|
};
|
|
51
52
|
private isObjectLoaded;
|
|
52
|
-
constructor(poiService: PoiService, matterportService: MatterportService);
|
|
53
|
+
constructor(sdkKey: string, poiService: PoiService, matterportService: MatterportService);
|
|
53
54
|
checkMode(indexMode: string): boolean;
|
|
54
55
|
setMode(indexMode: string): void;
|
|
55
|
-
setTourUrl(
|
|
56
|
+
setTourUrl(options: {
|
|
57
|
+
model3d: string;
|
|
58
|
+
showIconPlan?: boolean;
|
|
59
|
+
showIconDollhouse?: boolean;
|
|
60
|
+
showIconFloors?: boolean;
|
|
61
|
+
showQuickStart?: boolean;
|
|
62
|
+
showFullscreen?: boolean;
|
|
63
|
+
showGuidedTour?: boolean;
|
|
64
|
+
showHighlightReel?: boolean;
|
|
65
|
+
showDefurnish?: boolean;
|
|
66
|
+
showRoomMeasurements?: boolean;
|
|
67
|
+
}): void;
|
|
56
68
|
clearAll(): Promise<void>;
|
|
57
69
|
getMode(): string;
|
|
58
70
|
getViewerSelectedService(): MatterportService;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
/**
|
|
3
|
+
* Injection token holding the Matterport SDK application key.
|
|
4
|
+
* Each consuming app must provide its own value via its environment file
|
|
5
|
+
* (see app.module.ts of each app for the provider registration).
|
|
6
|
+
*/
|
|
7
|
+
export declare const MATTERPORT_SDK_KEY: InjectionToken<string>;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED