@smarterplan/ngx-smarterplan-core 1.4.30 → 1.4.31
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/services/filter.service.mjs +16 -1
- package/esm2022/lib/services/matterport-tag-copy.service.mjs +1 -1
- package/esm2022/lib/services/models/equipment.service.mjs +46 -3
- package/esm2022/lib/services/models/feature.service.mjs +47 -5
- package/esm2022/lib/services/models/measurement.service.mjs +3 -1
- package/esm2022/lib/services/models/object3D.service.mjs +23 -6
- package/esm2022/lib/services/models/poi.service.mjs +41 -4
- package/esm2022/lib/services/models/ticket.service.mjs +43 -3
- package/esm2022/lib/services/user.service.mjs +18 -1
- package/esm2022/lib/services/utils/matterport-transform.util.mjs +1 -1
- package/esm2022/lib/services/utils/object3d-model.util.mjs +1 -1
- package/esm2022/lib/tokens/object3d-model-upload.token.mjs +1 -1
- package/esm2022/public-api.mjs +1 -1
- package/fesm2022/smarterplan-ngx-smarterplan-core.mjs +226 -14
- package/fesm2022/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/lib/services/filter.service.d.ts +9 -0
- package/lib/services/models/equipment.service.d.ts +4 -0
- package/lib/services/models/feature.service.d.ts +4 -0
- package/lib/services/models/object3D.service.d.ts +5 -1
- package/lib/services/models/poi.service.d.ts +23 -0
- package/lib/services/models/ticket.service.d.ts +4 -0
- package/lib/services/user.service.d.ts +7 -0
- package/package.json +1 -1
|
@@ -31,6 +31,15 @@ export declare class FilterService {
|
|
|
31
31
|
filterMeasurementsForDateRange(measurements: Measurement[], dateRange: Date[]): Measurement[];
|
|
32
32
|
filterObjectsForZone(objects: any[], // TODO: remove any here..
|
|
33
33
|
zoneID?: string, zone?: Zone): Promise<any[]>;
|
|
34
|
+
/** Whether an object belongs to the zone, by the same rule as filterObjectsForZone; true without a zone. */
|
|
35
|
+
isInZone(object: any, zoneID?: string, zone?: Zone): Promise<boolean>;
|
|
36
|
+
/**
|
|
37
|
+
* A zone's list once one object's POI has changed: the objects of the space that were in it, in
|
|
38
|
+
* the space's order, with that object in it or not as `inZone` says.
|
|
39
|
+
*/
|
|
40
|
+
zoneListAfterMove<T extends {
|
|
41
|
+
id?: string;
|
|
42
|
+
}>(space: T[], zone: T[] | null, objectID: string, inZone: boolean): T[];
|
|
34
43
|
filterEquipmentsByDomainList(equipments: Equipment[], domainIDList: string[]): Equipment[];
|
|
35
44
|
filterEquipmentsForTerm(equips: Equipment[], term: string): Equipment[];
|
|
36
45
|
filterTicketsForTerm(tickets: Ticket[], term: string): Ticket[];
|
|
@@ -55,7 +55,11 @@ export declare class EquipmentService extends BaseObjectService {
|
|
|
55
55
|
awsKinesisAnalytics: any;
|
|
56
56
|
isMuseumUser: boolean;
|
|
57
57
|
private destroy$;
|
|
58
|
+
/** Counts the calls to initEquips, so that only the latest one publishes its lists. */
|
|
59
|
+
private initEquipsRun;
|
|
58
60
|
constructor(apiInjected: any, awsKinesisAnalyticsInjected: any, poiService: PoiService, navigationService: NavigationService, visitService: VisitService, operationService: OperationService, ticketsService: TicketsService, navigatorService: NavigatorService, filterService: FilterService, userService: BaseUserService, viewerService: ViewerService, modalService: NgbModal, zoneChangeService: ZoneChangeService);
|
|
61
|
+
/** Moves a loaded equipment into or out of the current zone's list, as its last written POI says. */
|
|
62
|
+
private sortAgainIntoZone;
|
|
59
63
|
readEquipment(id: string): Promise<Equipment>;
|
|
60
64
|
createEquipment(equip: Equipment, imageFile: File, documentFile: File): Promise<Equipment | void>;
|
|
61
65
|
getSignedUrlsForEquipment(equip: Equipment): Promise<Equipment>;
|
|
@@ -46,7 +46,11 @@ export declare class FeatureService extends BaseObjectService {
|
|
|
46
46
|
currentHashtags: Hashtag[];
|
|
47
47
|
createObservable: Subject<Feature>;
|
|
48
48
|
deleteObservable: Subject<Feature>;
|
|
49
|
+
/** Counts the calls to initFeatures, so that only the latest one publishes its lists. */
|
|
50
|
+
private initFeaturesRun;
|
|
49
51
|
constructor(apiInjected: any, navigatorService: NavigatorService, filterService: FilterService, poiService: PoiService, commentService: CommentService, userService: BaseUserService, navigationService: NavigationService, visitService: VisitService, hashtagService: HashtagService, zoneChangeService: ZoneChangeService);
|
|
52
|
+
/** Moves a loaded info point or desk into or out of the current zone's list, as its last written POI says. */
|
|
53
|
+
private sortAgainIntoZone;
|
|
50
54
|
createFeature(feature: Feature): Promise<Feature>;
|
|
51
55
|
deleteFeature(feature: Feature): Promise<Feature>;
|
|
52
56
|
updateFeature(feature: any): Promise<Feature>;
|
|
@@ -4,12 +4,14 @@ import { BaseUserService } from "../user.service";
|
|
|
4
4
|
import { NavigatorService } from "../navigator.service";
|
|
5
5
|
import { FilterService } from "../filter.service";
|
|
6
6
|
import { ZoneChangeService } from "../zoneChange.service";
|
|
7
|
+
import { PoiService } from "./poi.service";
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class Object3DService {
|
|
9
10
|
private userService;
|
|
10
11
|
private navigatorService;
|
|
11
12
|
private zoneChangeService;
|
|
12
13
|
private filterService;
|
|
14
|
+
private poiService;
|
|
13
15
|
API: any;
|
|
14
16
|
objects3DUpdated: Subject<{
|
|
15
17
|
space: Object3D[];
|
|
@@ -33,8 +35,10 @@ export declare class Object3DService {
|
|
|
33
35
|
isMuseumUser: boolean;
|
|
34
36
|
isUpdating: boolean;
|
|
35
37
|
private destroy$;
|
|
38
|
+
/** Counts the calls to initObjects3D, so that only the latest one publishes its lists. */
|
|
39
|
+
private initObjects3DRun;
|
|
36
40
|
private selectedObject3D;
|
|
37
|
-
constructor(apiInjected: any, userService: BaseUserService, navigatorService: NavigatorService, zoneChangeService: ZoneChangeService, filterService: FilterService);
|
|
41
|
+
constructor(apiInjected: any, userService: BaseUserService, navigatorService: NavigatorService, zoneChangeService: ZoneChangeService, filterService: FilterService, poiService: PoiService);
|
|
38
42
|
getObjects3DBySpace(spaceID: string): Promise<Array<Object3D>>;
|
|
39
43
|
initObjects3D(): Promise<void>;
|
|
40
44
|
getSelectedObject3D(): any;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
1
2
|
import { POI, PoiType, Zone } from '../../types.service';
|
|
2
3
|
import { ZoneChangeService } from '../zoneChange.service';
|
|
3
4
|
import { BaseUserService } from '../user.service';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
6
|
+
/** A POI this service has just written, as the API returned it. */
|
|
7
|
+
export interface PoiWrite {
|
|
8
|
+
poi: POI;
|
|
9
|
+
deleted: boolean;
|
|
10
|
+
}
|
|
5
11
|
export declare class PoiService {
|
|
6
12
|
private userService;
|
|
7
13
|
private zoneChangeService;
|
|
@@ -13,6 +19,13 @@ export declare class PoiService {
|
|
|
13
19
|
private destroy$;
|
|
14
20
|
/** Elements whose POI was written in this session: a copy loaded earlier with the element is outdated. */
|
|
15
21
|
private changedElementIDs;
|
|
22
|
+
/**
|
|
23
|
+
* Every POI this service has just created, updated or deleted. The lists sorted by zone read the
|
|
24
|
+
* zone off the POI, so they have to be sorted again when it moves.
|
|
25
|
+
*/
|
|
26
|
+
readonly poiWritten: Subject<PoiWrite>;
|
|
27
|
+
/** The last POI written for each element in this session, by element ID. */
|
|
28
|
+
private lastWrites;
|
|
16
29
|
constructor(apiInjected: any, awsKinesisAnalyticsInjected: any, userService: BaseUserService, zoneChangeService: ZoneChangeService);
|
|
17
30
|
getPoiByElementId(elementId: string): Promise<POI | null>;
|
|
18
31
|
/**
|
|
@@ -29,6 +42,16 @@ export declare class PoiService {
|
|
|
29
42
|
poiIsVirtual(poi: POI): boolean;
|
|
30
43
|
updatePoi(poi: {}): Promise<POI>;
|
|
31
44
|
deletePoi(poiID: string): Promise<POI>;
|
|
45
|
+
private written;
|
|
46
|
+
/**
|
|
47
|
+
* Puts in the objects the POI this session last wrote for them, where it is more recent than the
|
|
48
|
+
* one they were loaded with. The lists are read from indexes that may not show a write made a
|
|
49
|
+
* moment ago, and a zone read off the old POI would be the wrong one.
|
|
50
|
+
*/
|
|
51
|
+
withLatestPois<T extends {
|
|
52
|
+
id?: string;
|
|
53
|
+
pois?: any;
|
|
54
|
+
}>(objects: T[]): T[];
|
|
32
55
|
getPoisByMatterportSweepByType(sweep: string, type: PoiType): Promise<POI[]>;
|
|
33
56
|
/**
|
|
34
57
|
* Optimized version: fetches POIs for MANY sweeps in as few GraphQL calls as possible,
|
|
@@ -60,7 +60,11 @@ export declare class TicketsService extends BaseObjectService {
|
|
|
60
60
|
floorsPerSpace: Zone[];
|
|
61
61
|
selectedFloor: Zone;
|
|
62
62
|
private destroy$;
|
|
63
|
+
/** Counts the calls to initTickets, so that only the latest one publishes its lists. */
|
|
64
|
+
private initTicketsRun;
|
|
63
65
|
constructor(awsKinesisAnalyticsInjected: any, apiInjected: any, operationService: OperationService, eventService: EventService, affectationService: AffectationService, poiService: PoiService, userService: BaseUserService, navigatorService: NavigatorService, filterService: FilterService, interventionService: InterventionService, navigationService: NavigationService, visitService: VisitService, viewerService: ViewerService, zoneChangeService: ZoneChangeService, modalService: NgbModal);
|
|
66
|
+
/** Moves a loaded ticket into or out of the current zone's list, as its last written POI says. */
|
|
67
|
+
private sortAgainIntoZone;
|
|
64
68
|
initTickets(): Promise<void>;
|
|
65
69
|
adaptTicket(ticket: Ticket): Promise<Ticket>;
|
|
66
70
|
getPriorityColor(ticket: Ticket): string;
|
|
@@ -94,6 +94,13 @@ export declare class BaseUserService {
|
|
|
94
94
|
hardDeleteUser(userID: string): Promise<Profile>;
|
|
95
95
|
getManagerMissions(): Mission[];
|
|
96
96
|
getAvalableLevelsForCurrentUser(): LevelStatus[];
|
|
97
|
+
/**
|
|
98
|
+
* The access levels the user sees in every one of the spaces, by the rule the lists are
|
|
99
|
+
* filtered with: those of their highest mission in a space, and all of them where they have no
|
|
100
|
+
* mission, as nothing is filtered there. A form offering a level beyond these would make an
|
|
101
|
+
* object its own author cannot see.
|
|
102
|
+
*/
|
|
103
|
+
getAvailableLevelsForSpaces(spaceIDs: string[]): LevelStatus[];
|
|
97
104
|
getAvailableRolesForCurrentUser(): RoleStatus[];
|
|
98
105
|
/** Test if the user have the role given in parameter : "roleStatus" */
|
|
99
106
|
isRole(roleStatus: RoleStatus): boolean;
|