@smarterplan/ngx-smarterplan-core 0.3.18 → 0.4.2

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.
Files changed (29) hide show
  1. package/README.md +24 -24
  2. package/esm2020/lib/components/csv-export/csv-export.component.mjs +3 -3
  3. package/esm2020/lib/components/menu-bar/avatar/avatar.component.mjs +1 -1
  4. package/esm2020/lib/components/menu-bar/navigation-bar/navigation-bar.component.mjs +3 -3
  5. package/esm2020/lib/components/menu-bar/range-date-picker/range-date-picker.component.mjs +3 -3
  6. package/esm2020/lib/components/modal-switch-visit/modal-switch-visit.component.mjs +3 -3
  7. package/esm2020/lib/components/search-bar/search-bar.component.mjs +3 -3
  8. package/esm2020/lib/mattertagData.mjs +43 -45
  9. package/esm2020/lib/ngx-smarterplan-core.service.mjs +1 -1
  10. package/esm2020/lib/pipes/duration-to-string.pipe.mjs +1 -1
  11. package/esm2020/lib/pipes/hashtag-from-id.pipe.mjs +1 -1
  12. package/esm2020/lib/pipes/safe-url.pipe.mjs +1 -1
  13. package/esm2020/lib/pipes/time-date-to-local-string.pipe.mjs +1 -1
  14. package/esm2020/lib/services/matterport.service.mjs +38 -77
  15. package/esm2020/lib/services/user.service.mjs +11 -2
  16. package/esm2020/lib/services/viewer.service.mjs +21 -102
  17. package/esm2020/lib/types.service.mjs +16 -1
  18. package/esm2020/public-api.mjs +2 -1
  19. package/fesm2015/smarterplan-ngx-smarterplan-core.mjs +136 -252
  20. package/fesm2015/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
  21. package/fesm2020/smarterplan-ngx-smarterplan-core.mjs +134 -232
  22. package/fesm2020/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
  23. package/lib/mattertagData.d.ts +3 -10
  24. package/lib/services/matterport.service.d.ts +4 -10
  25. package/lib/services/user.service.d.ts +1 -0
  26. package/lib/services/viewer.service.d.ts +13 -25
  27. package/lib/types.service.d.ts +31 -3
  28. package/package.json +1 -1
  29. package/public-api.d.ts +1 -0
@@ -1,9 +1,6 @@
1
- import { Comment, Equipment, Feature, POI, PoiType, Ticket } from "./types.service";
1
+ import { DbObjectType, POI, PoiType } from "./types.service";
2
2
  export declare class MattertagData {
3
- private ticket;
4
- private equipment;
5
- private comment;
6
- private feature;
3
+ private object;
7
4
  private type;
8
5
  elementID: string;
9
6
  private position;
@@ -15,11 +12,7 @@ export declare class MattertagData {
15
12
  private poi;
16
13
  constructor(type: PoiType);
17
14
  setType(type: PoiType): void;
18
- setTicket(ticket: Ticket): void;
19
- setEquipment(equip: Equipment): void;
20
- setComment(comment: Comment): void;
21
- setFeature(feature: Feature): void;
22
- setDesk(feature: Feature): void;
15
+ setObject(object: DbObjectType, tagType: PoiType): void;
23
16
  setElementID(ticketID: any): void;
24
17
  setPosition(position: any): void;
25
18
  setNormal(normal: any): void;
@@ -1,7 +1,7 @@
1
1
  import { Router } from '@angular/router';
2
2
  import { Subject } from 'rxjs';
3
3
  import { MattertagData } from '../mattertagData';
4
- import { Comment, DbObjectType, Equipment, Feature, POI, PoiType, Ticket } from '../types.service';
4
+ import { DbObjectType, POI, PoiType } from '../types.service';
5
5
  import { BaseTagService } from './tag.service';
6
6
  import { BaseVisibilityService } from './baseVisibility.service';
7
7
  import { Config } from '../config';
@@ -94,16 +94,12 @@ export declare class MatterportService {
94
94
  action_toolbox_dollhouse(): Promise<void>;
95
95
  action_toolbox_mesure(): void;
96
96
  action_toolbox_cancel_mesure(): void;
97
- action_add_mattertag_from_POI(tagType: PoiType, object: Ticket | Equipment | Comment | Feature, poi: POI): Promise<any>;
97
+ action_add_mattertag_from_POI(tagType: PoiType, object: DbObjectType, poi: POI): Promise<any>;
98
98
  injectHtmlInTag(tagType: PoiType, object: DbObjectType, tagID: string): Promise<void>;
99
99
  action_delete_all_mattertags(): Promise<void>;
100
100
  action_delete_element(element: DbObjectType): Promise<void>;
101
- action_add_ticket(): Promise<void>;
102
101
  action_position_element(poiType: PoiType, element: DbObjectType): Promise<void>;
103
- action_add_equip(): Promise<void>;
104
- action_add_measurement(): Promise<void>;
105
- action_add_feature(): Promise<void>;
106
- action_add_desk(): Promise<void>;
102
+ addElementAsMattertag(poiType: PoiType): Promise<void>;
107
103
  action_completed(): boolean;
108
104
  action_canceled(): void;
109
105
  action_open_menu(menu: string): void;
@@ -119,9 +115,7 @@ export declare class MatterportService {
119
115
  sweep: any;
120
116
  } | null;
121
117
  setInteractionMode(interactionMode: number): void;
122
- setTicketAndPoiInTag(mattertagID: string, ticket: Ticket, poi?: POI | null): void;
123
- setEquipmentAndPoiInTag(mattertagID: string, equip: Equipment, poi?: POI | null): void;
124
- setFeatureAndPoiInTag(mattertagID: string, feature: Feature, poi?: POI | null): void;
118
+ setObjectAndPoiInTag(mattertagID: string, object: DbObjectType, poiType: PoiType, poi?: POI | null): void;
125
119
  getInteractionMode(): number;
126
120
  getTagFromElementId(elementID: string): {
127
121
  tag: string | null;
@@ -95,6 +95,7 @@ export declare class BaseUserService {
95
95
  currentOrderedOrgList(): Organisation[];
96
96
  userHasAccessToAllZonesInSpace(spaceID: string): boolean;
97
97
  logoutCurrentAndSignOutAuth(): Promise<void>;
98
+ logoutCurrentWihtoutAuth(): Promise<void>;
98
99
  checkAccessToken(jwtToken: string): Promise<boolean>;
99
100
  clearUserToken(id: any): Promise<void>;
100
101
  updateCurrentUser(profile: Profile): void;
@@ -1,7 +1,7 @@
1
1
  import { Subject } from "rxjs";
2
2
  import { MatterportService } from "./matterport.service";
3
3
  import { BaseTagService } from "./tag.service";
4
- import { DbObjectType, POI, Comment, Equipment, Ticket, Feature } from "../types.service";
4
+ import { DbObjectType, POI, PoiType, Comment, Equipment, Ticket, Feature } from "../types.service";
5
5
  import { PoiService } from "./models/poi.service";
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class ViewerService {
@@ -62,35 +62,23 @@ export declare class ViewerService {
62
62
  y: number;
63
63
  }): void;
64
64
  action_move_to_tag(elementId: string): Promise<boolean>;
65
- action_load_all_tickets_from_database(tickets: Ticket[]): Promise<any>;
66
- action_load_all_equipments_from_database(equipments: Equipment[]): Promise<void>;
67
- action_load_all_measurements_from_database(comments: Comment[]): Promise<void>;
68
- action_load_all_features_from_database(features: Feature[]): Promise<void>;
69
- actionAddObjectFromPOI(object: Ticket | Equipment | Comment | Feature, poi: POI): Promise<any>;
70
- action_delete_element(element: DbObjectType): Promise<void>;
71
- /**
72
- * Enable ticket placement menu to add a new ticket
73
- */
74
- action_add_ticket(): Promise<void>;
75
65
  /**
76
- *
66
+ * Adds Mattertags to Viewer
67
+ * @param objects List of objects (tickets, equipments) etc to be added as Mattertags
77
68
  */
78
- action_position_ticket(ticket: DbObjectType): Promise<void>;
79
- /**
80
- * Position a feature with Matterport
81
- * @param feature The feature that will be positioned
82
- */
83
- action_position_feature(feature: DbObjectType): Promise<void>;
69
+ addObjectTagsToViewer(objects: DbObjectType[]): Promise<void>;
70
+ actionAddObjectFromPOI(object: DbObjectType, poi: POI): Promise<any>;
71
+ action_delete_element(element: DbObjectType): Promise<void>;
84
72
  /**
85
- * Enable equipement placement menu to add a new equipment
86
- */
87
- action_add_equip(): Promise<void>;
73
+ * Enable tag placement menu to add a new element depending on its type (TICKET, DATA, EQUIPMENT etc)
74
+ */
75
+ actionAddNewElementToViewer(poiType: PoiType): Promise<void>;
88
76
  /**
89
- *
77
+ * Launches the repositioning of an existing Mattertag related to parameter object
78
+ * @param element object (TICKET, EQUIPMENT, FEATURE, etc)
79
+ * @param poiType type of object
90
80
  */
91
- action_position_equip(equipment: DbObjectType): Promise<void>;
92
- action_add_feature(): void;
93
- action_add_desk(): void;
81
+ actionRepositionElementInViewer(element: DbObjectType, poiType: PoiType): Promise<void>;
94
82
  /**
95
83
  * Enable ticket placement menu to add a new ticket
96
84
  */
@@ -5,7 +5,8 @@ export declare enum PoiType {
5
5
  MEASURE = "MEASURE",
6
6
  DATA = "DATA",
7
7
  PEOPLE = "PEOPLE",
8
- DESK = "DESK"
8
+ DESK = "DESK",
9
+ ROOM = "ROOM"
9
10
  }
10
11
  export declare enum TicketPriority {
11
12
  MINIMUM = "MINIMUM",
@@ -199,7 +200,19 @@ export declare enum CommentType {
199
200
  AUDIO = "AUDIO",
200
201
  URL = "URL",
201
202
  YOUTUBE = "YOUTUBE",
202
- URL_SHOP = "URL_SHOP"
203
+ URL_SHOP = "URL_SHOP",
204
+ SCRIPT_EMBED = "SCRIPT_EMBED"
205
+ }
206
+ export declare enum StatusEquipment {
207
+ TO_SETUP = "TO_SETUP",
208
+ BROKEN = "BROKEN",
209
+ UNINSTALLED = "UNINSTALLED",
210
+ INCIDENT = "INCIDENT",
211
+ IN_OPERATION = "IN_OPERATION",
212
+ WAITING_FOR_REPAIR = "WAITING_FOR_REPAIR",
213
+ DELETED = "DELETED",
214
+ OUT_OF_ORDER = "OUT_OF_ORDER",
215
+ TO_BE_REPLACED = "TO_BE_REPLACED"
203
216
  }
204
217
  /** Interface for Update (only id is required) */
205
218
  export interface IUpdate {
@@ -221,6 +234,8 @@ export declare type DbObjectType = {
221
234
  } | null;
222
235
  space?: Space | null;
223
236
  domainID?: string | null;
237
+ name?: string | null;
238
+ title?: string | null;
224
239
  } & AWSType;
225
240
  export declare type Ticket = {
226
241
  spaceID: string;
@@ -233,6 +248,8 @@ export declare type Ticket = {
233
248
  parentID?: string | null;
234
249
  level?: LevelStatus | null;
235
250
  friendlyLabel?: string | null;
251
+ domain: Domain | null;
252
+ domainID: string | null;
236
253
  events?: {
237
254
  __typename?: "ModelEventConnection";
238
255
  items?: Array<Event> | null;
@@ -292,7 +309,16 @@ export declare type Equipment = {
292
309
  spaceID: string;
293
310
  archivedForMissionID?: string[] | null;
294
311
  annotation?: string | null;
312
+ status?: StatusEquipment | null;
313
+ family?: Array<string | null> | null;
314
+ manufacturer?: string | null;
315
+ sku?: string | null;
316
+ installDate?: number | null;
317
+ warrantyEndDate?: number | null;
295
318
  } & DbObjectType;
319
+ export declare type EquipmentSelected = {
320
+ selected?: boolean;
321
+ } & Equipment;
296
322
  export declare type EquipmentDocument = {
297
323
  filename: string;
298
324
  url: string;
@@ -347,7 +373,8 @@ export declare enum ViewerInteractions {
347
373
  POSITIONING = 2,
348
374
  ADDING_EQUIPMENT = 3,
349
375
  ADDING_MEASURE = 4,
350
- ADDING_FEATURE = 5
376
+ ADDING_FEATURE = 5,
377
+ ADDING_ROOM = 6
351
378
  }
352
379
  export declare type Mission = {
353
380
  userID: string;
@@ -400,6 +427,7 @@ export declare type MediaContent = {
400
427
  export declare type Comment = {
401
428
  title: string;
402
429
  ticket?: Ticket | null;
430
+ ownerID?: string | null;
403
431
  owner?: Mission | null;
404
432
  annexe?: string | null;
405
433
  ticketID?: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smarterplan/ngx-smarterplan-core",
3
- "version": "0.3.18",
3
+ "version": "0.4.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.2.0",
6
6
  "@angular/core": "^13.2.0",
package/public-api.d.ts CHANGED
@@ -17,6 +17,7 @@ export * from './lib/services/filter.service';
17
17
  export * from './lib/services/search.service';
18
18
  export * from './lib/services/zone-drawer.service';
19
19
  export * from './lib/services/matterport-import.service';
20
+ export * from './lib/mattertagData';
20
21
  export * from './lib/services/models/profile.service';
21
22
  export * from './lib/services/models/zone.service';
22
23
  export * from './lib/services/models/mission.service';