@smarterplan/ngx-smarterplan-core 1.2.45 → 1.2.47

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 (170) hide show
  1. package/README.md +24 -24
  2. package/esm2020/lib/components/csv-export/csv-export.component.mjs +59 -59
  3. package/esm2020/lib/components/loader/loader.component.mjs +23 -23
  4. package/esm2020/lib/components/menu-bar/avatar/avatar.component.mjs +80 -80
  5. package/esm2020/lib/components/menu-bar/menu-bar.component.mjs +99 -99
  6. package/esm2020/lib/components/menu-bar/navigation-bar/navigation-bar.component.mjs +384 -384
  7. package/esm2020/lib/components/menu-bar/range-date-picker/range-date-picker.component.mjs +147 -147
  8. package/esm2020/lib/components/modal-switch-visit/modal-switch-visit.component.mjs +40 -40
  9. package/esm2020/lib/components/search-bar/search-bar.component.mjs +63 -63
  10. package/esm2020/lib/components/support-modal/support-modal.component.mjs +66 -66
  11. package/esm2020/lib/config.mjs +4 -4
  12. package/esm2020/lib/helpers.service.mjs +470 -470
  13. package/esm2020/lib/matterport-extensions/hsl-loader/HlsLoader.mjs +69 -69
  14. package/esm2020/lib/matterport-extensions/nest-thermostat/CanvasImage.mjs +51 -51
  15. package/esm2020/lib/matterport-extensions/nest-thermostat/CanvasRenderer.mjs +61 -61
  16. package/esm2020/lib/matterport-extensions/nest-thermostat/NestThermostat.mjs +158 -158
  17. package/esm2020/lib/matterport-extensions/nest-thermostat/PlaneRenderer.mjs +85 -85
  18. package/esm2020/lib/matterport-extensions/scene-component/SceneComponent.mjs +128 -128
  19. package/esm2020/lib/matterport-extensions/security-camera/SecurityCamera.mjs +249 -249
  20. package/esm2020/lib/matterport-extensions/tv-player/TvPlayer.mjs +98 -98
  21. package/esm2020/lib/matterport-extensions/video-renderer/VideoRenderer.mjs +64 -64
  22. package/esm2020/lib/matterport-extensions/view-frustum-mesh/ViewFrustumMesh.mjs +221 -221
  23. package/esm2020/lib/mattertagData.mjs +165 -165
  24. package/esm2020/lib/ngx-smarterplan-core.module.mjs +122 -122
  25. package/esm2020/lib/ngx-smarterplan-core.service.mjs +14 -14
  26. package/esm2020/lib/pipes/duration-to-string.pipe.mjs +66 -66
  27. package/esm2020/lib/pipes/format-date-number-to-digits.pipe.mjs +30 -30
  28. package/esm2020/lib/pipes/hashtag-from-id.pipe.mjs +26 -26
  29. package/esm2020/lib/pipes/safe-url.pipe.mjs +20 -20
  30. package/esm2020/lib/pipes/time-date-to-local-string.pipe.mjs +104 -104
  31. package/esm2020/lib/pipes/username-from-id.pipe.mjs +29 -29
  32. package/esm2020/lib/services/amplify-cache.service.mjs +72 -72
  33. package/esm2020/lib/services/base-tab.service.mjs +24 -24
  34. package/esm2020/lib/services/baseVisibility.service.mjs +18 -18
  35. package/esm2020/lib/services/content.service.mjs +135 -135
  36. package/esm2020/lib/services/filter.service.mjs +599 -599
  37. package/esm2020/lib/services/intervention.service.mjs +236 -236
  38. package/esm2020/lib/services/locale.service.mjs +45 -45
  39. package/esm2020/lib/services/matterport-import.service.mjs +340 -340
  40. package/esm2020/lib/services/matterport.service.mjs +1587 -1587
  41. package/esm2020/lib/services/models/affectation.service.mjs +60 -60
  42. package/esm2020/lib/services/models/base-object.service.mjs +70 -70
  43. package/esm2020/lib/services/models/capture.service.mjs +34 -34
  44. package/esm2020/lib/services/models/comment.service.mjs +98 -98
  45. package/esm2020/lib/services/models/domain.service.mjs +78 -78
  46. package/esm2020/lib/services/models/equipment.service.mjs +683 -683
  47. package/esm2020/lib/services/models/event.service.mjs +128 -128
  48. package/esm2020/lib/services/models/feature.service.mjs +380 -380
  49. package/esm2020/lib/services/models/hashtag.service.mjs +38 -38
  50. package/esm2020/lib/services/models/layer.service.mjs +33 -33
  51. package/esm2020/lib/services/models/measurement.service.mjs +199 -199
  52. package/esm2020/lib/services/models/mission.service.mjs +206 -206
  53. package/esm2020/lib/services/models/navigation.service.mjs +92 -92
  54. package/esm2020/lib/services/models/node.service.mjs +31 -31
  55. package/esm2020/lib/services/models/object3D.service.mjs +364 -364
  56. package/esm2020/lib/services/models/operation.service.mjs +59 -59
  57. package/esm2020/lib/services/models/organisation.service.mjs +73 -73
  58. package/esm2020/lib/services/models/plan.service.mjs +799 -799
  59. package/esm2020/lib/services/models/poi.service.mjs +103 -103
  60. package/esm2020/lib/services/models/profile.service.mjs +58 -58
  61. package/esm2020/lib/services/models/property.service.mjs +44 -44
  62. package/esm2020/lib/services/models/space.service.mjs +204 -204
  63. package/esm2020/lib/services/models/template.service.mjs +41 -41
  64. package/esm2020/lib/services/models/ticket.service.mjs +526 -526
  65. package/esm2020/lib/services/models/visit.service.mjs +130 -130
  66. package/esm2020/lib/services/models/zone.service.mjs +225 -225
  67. package/esm2020/lib/services/navigator.service.mjs +212 -212
  68. package/esm2020/lib/services/s3.service.mjs +137 -137
  69. package/esm2020/lib/services/search.service.mjs +124 -124
  70. package/esm2020/lib/services/support.service.mjs +42 -42
  71. package/esm2020/lib/services/tag.service.mjs +111 -111
  72. package/esm2020/lib/services/user.service.mjs +501 -501
  73. package/esm2020/lib/services/validators.service.mjs +50 -50
  74. package/esm2020/lib/services/viewer.service.mjs +389 -389
  75. package/esm2020/lib/services/zone-drawer.service.mjs +76 -76
  76. package/esm2020/lib/services/zoneChange.service.mjs +30 -30
  77. package/esm2020/lib/types.service.mjs +311 -311
  78. package/esm2020/lib/validators/email.directive.mjs +7 -7
  79. package/esm2020/lib/validators/no-empty.directive.mjs +12 -12
  80. package/esm2020/lib/validators/number.directive.mjs +12 -12
  81. package/esm2020/lib/validators/text.directive.mjs +12 -12
  82. package/esm2020/public-api.mjs +72 -72
  83. package/esm2020/smarterplan-ngx-smarterplan-core.mjs +4 -4
  84. package/fesm2015/smarterplan-ngx-smarterplan-core.mjs +13014 -13014
  85. package/fesm2015/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
  86. package/fesm2020/smarterplan-ngx-smarterplan-core.mjs +12263 -12263
  87. package/fesm2020/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
  88. package/lib/components/csv-export/csv-export.component.d.ts +18 -18
  89. package/lib/components/loader/loader.component.d.ts +10 -10
  90. package/lib/components/menu-bar/avatar/avatar.component.d.ts +21 -21
  91. package/lib/components/menu-bar/menu-bar.component.d.ts +38 -38
  92. package/lib/components/menu-bar/navigation-bar/navigation-bar.component.d.ts +73 -73
  93. package/lib/components/menu-bar/range-date-picker/range-date-picker.component.d.ts +35 -35
  94. package/lib/components/modal-switch-visit/modal-switch-visit.component.d.ts +22 -22
  95. package/lib/components/search-bar/search-bar.component.d.ts +16 -16
  96. package/lib/components/support-modal/support-modal.component.d.ts +26 -26
  97. package/lib/config.d.ts +22 -22
  98. package/lib/helpers.service.d.ts +79 -79
  99. package/lib/matterport-extensions/hsl-loader/HlsLoader.d.ts +26 -26
  100. package/lib/matterport-extensions/nest-thermostat/CanvasImage.d.ts +31 -31
  101. package/lib/matterport-extensions/nest-thermostat/CanvasRenderer.d.ts +37 -37
  102. package/lib/matterport-extensions/nest-thermostat/NestThermostat.d.ts +42 -42
  103. package/lib/matterport-extensions/nest-thermostat/PlaneRenderer.d.ts +46 -46
  104. package/lib/matterport-extensions/scene-component/SceneComponent.d.ts +388 -388
  105. package/lib/matterport-extensions/security-camera/SecurityCamera.d.ts +47 -47
  106. package/lib/matterport-extensions/tv-player/TvPlayer.d.ts +26 -26
  107. package/lib/matterport-extensions/video-renderer/VideoRenderer.d.ts +26 -26
  108. package/lib/matterport-extensions/view-frustum-mesh/ViewFrustumMesh.d.ts +43 -43
  109. package/lib/mattertagData.d.ts +70 -70
  110. package/lib/ngx-smarterplan-core.module.d.ts +29 -29
  111. package/lib/ngx-smarterplan-core.service.d.ts +6 -6
  112. package/lib/pipes/duration-to-string.pipe.d.ts +12 -12
  113. package/lib/pipes/format-date-number-to-digits.pipe.d.ts +10 -10
  114. package/lib/pipes/hashtag-from-id.pipe.d.ts +10 -10
  115. package/lib/pipes/safe-url.pipe.d.ts +10 -10
  116. package/lib/pipes/time-date-to-local-string.pipe.d.ts +16 -16
  117. package/lib/pipes/username-from-id.pipe.d.ts +11 -11
  118. package/lib/services/amplify-cache.service.d.ts +37 -37
  119. package/lib/services/base-tab.service.d.ts +10 -10
  120. package/lib/services/baseVisibility.service.d.ts +9 -9
  121. package/lib/services/content.service.d.ts +28 -28
  122. package/lib/services/filter.service.d.ts +60 -60
  123. package/lib/services/intervention.service.d.ts +25 -25
  124. package/lib/services/locale.service.d.ts +23 -23
  125. package/lib/services/matterport-import.service.d.ts +53 -53
  126. package/lib/services/matterport.service.d.ts +336 -336
  127. package/lib/services/models/affectation.service.d.ts +14 -14
  128. package/lib/services/models/base-object.service.d.ts +20 -20
  129. package/lib/services/models/capture.service.d.ts +13 -13
  130. package/lib/services/models/comment.service.d.ts +26 -26
  131. package/lib/services/models/domain.service.d.ts +19 -19
  132. package/lib/services/models/equipment.service.d.ts +93 -93
  133. package/lib/services/models/event.service.d.ts +43 -43
  134. package/lib/services/models/feature.service.d.ts +75 -75
  135. package/lib/services/models/hashtag.service.d.ts +13 -13
  136. package/lib/services/models/layer.service.d.ts +11 -11
  137. package/lib/services/models/measurement.service.d.ts +51 -51
  138. package/lib/services/models/mission.service.d.ts +39 -39
  139. package/lib/services/models/navigation.service.d.ts +29 -29
  140. package/lib/services/models/node.service.d.ts +12 -12
  141. package/lib/services/models/object3D.service.d.ts +57 -57
  142. package/lib/services/models/operation.service.d.ts +15 -15
  143. package/lib/services/models/organisation.service.d.ts +19 -19
  144. package/lib/services/models/plan.service.d.ts +133 -133
  145. package/lib/services/models/poi.service.d.ts +25 -25
  146. package/lib/services/models/profile.service.d.ts +16 -16
  147. package/lib/services/models/property.service.d.ts +13 -13
  148. package/lib/services/models/space.service.d.ts +46 -46
  149. package/lib/services/models/template.service.d.ts +15 -15
  150. package/lib/services/models/ticket.service.d.ts +93 -93
  151. package/lib/services/models/visit.service.d.ts +24 -24
  152. package/lib/services/models/zone.service.d.ts +50 -50
  153. package/lib/services/navigator.service.d.ts +61 -61
  154. package/lib/services/s3.service.d.ts +14 -14
  155. package/lib/services/search.service.d.ts +20 -20
  156. package/lib/services/support.service.d.ts +17 -17
  157. package/lib/services/tag.service.d.ts +29 -29
  158. package/lib/services/user.service.d.ts +118 -118
  159. package/lib/services/validators.service.d.ts +18 -18
  160. package/lib/services/viewer.service.d.ts +110 -110
  161. package/lib/services/zone-drawer.service.d.ts +7 -7
  162. package/lib/services/zoneChange.service.d.ts +17 -17
  163. package/lib/types.service.d.ts +842 -842
  164. package/lib/validators/email.directive.d.ts +2 -2
  165. package/lib/validators/no-empty.directive.d.ts +2 -2
  166. package/lib/validators/number.directive.d.ts +2 -2
  167. package/lib/validators/text.directive.d.ts +2 -2
  168. package/package.json +2 -2
  169. package/public-api.d.ts +64 -64
  170. package/smarterplan-ngx-smarterplan-core.d.ts +5 -5
@@ -1,336 +1,336 @@
1
- import { NgZone } from '@angular/core';
2
- import { ActivatedRoute, Router } from '@angular/router';
3
- import { Subject } from 'rxjs';
4
- import { MattertagData } from '../mattertagData';
5
- import { DbObjectType, IObject3D, MattertagActionMode, POI, PoiType, SpModule } from '../types.service';
6
- import { BaseTagService } from './tag.service';
7
- import { BaseVisibilityService } from './baseVisibility.service';
8
- import { Config } from '../config';
9
- import { CameraMode } from '../types.service';
10
- import * as i0 from "@angular/core";
11
- /**
12
- * Custom Threejs Object 3D interface
13
- */
14
- interface ThreeJSObject3D {
15
- id: string;
16
- uuid?: string;
17
- position?: {
18
- x: number;
19
- y: number;
20
- z: number;
21
- };
22
- rotation?: {
23
- x: number;
24
- y: number;
25
- z: number;
26
- };
27
- scale?: {
28
- x: number;
29
- y: number;
30
- z: number;
31
- };
32
- }
33
- declare global {
34
- interface Window {
35
- MP_SDK: {
36
- connect: Function;
37
- };
38
- }
39
- }
40
- export declare class MatterportService {
41
- private router;
42
- private activeRoute;
43
- private visibilityService;
44
- private ngZone;
45
- private slots;
46
- private nodes;
47
- sdk: any;
48
- private container;
49
- private poseMatterport;
50
- poseCamera: {
51
- rotation: any;
52
- position: any;
53
- sweep: any;
54
- };
55
- lastCameraPosition: any;
56
- private azimuthalCrown;
57
- private pointerButton;
58
- private getCursorPositionButton;
59
- private cursorPositionButtonDisplayed;
60
- private intervalCursorPointerPosition;
61
- private textDisplayCursorPositionPanel;
62
- private oldPoseMatterportPosition;
63
- private isMeasureModeOn;
64
- private interactionMode;
65
- private mattertagIDs;
66
- private dictionnaryTags;
67
- private dictionnaryObjects3D;
68
- private dictionnarySceneObjects3D;
69
- threeJSScene: any;
70
- private lastMeasure;
71
- private distancesLastMeasure;
72
- private resolution;
73
- private visibility;
74
- tagsAttachments: Object;
75
- private lastScreenshotUri;
76
- sweeps: Array<string> | null;
77
- currentSweep: Subject<string>;
78
- currentCameraPose: Subject<any>;
79
- private floors?;
80
- private _currentSpaceID;
81
- private lastObject3D;
82
- private currentFloor;
83
- get currentSpaceID(): string;
84
- set currentSpaceID(value: string);
85
- timerPointer: any;
86
- forbiddenSweeps: string[];
87
- tagAction: Subject<{
88
- action: string;
89
- data: string;
90
- }>;
91
- mattertagToFollow: string | null;
92
- tagService: BaseTagService;
93
- config: Config;
94
- inTransitionMode: boolean;
95
- inTransitionSweep: boolean;
96
- private noLightForObjects;
97
- currentCameraMode: CameraMode;
98
- onCameraModeChanged: Subject<CameraMode>;
99
- onGoToTag: Subject<string>;
100
- tagMessengerOn: boolean;
101
- SPModule: SpModule;
102
- objectControl: any;
103
- private securityCameraAnimator;
104
- /**
105
- * Actions on left click when positioning mattertag in visit
106
- */
107
- pointerLeftClickHandler: () => void;
108
- pointerRightClickHandler: (e: any) => void;
109
- pointerMiddleClickHandler: (e: any) => void;
110
- constructor(config: Config, router: Router, activeRoute: ActivatedRoute, visibilityService: BaseVisibilityService, ngZone: NgZone);
111
- /**
112
- * Initializes Matterport and all listeners/data
113
- * @param tagService BaseTagService (to inject html)
114
- * @param module SpModule (Museum, Immo) to subscribe only to needed functionnnalities
115
- * @returns boolean
116
- */
117
- initSdk(tagService: BaseTagService, module?: SpModule): Promise<boolean>;
118
- setLightingOff(): void;
119
- pointToString(point: {
120
- x: number;
121
- y: number;
122
- z: number;
123
- }): string;
124
- /**
125
- * Callback after measurement is performed
126
- */
127
- getDistanceForLastMeasurement(): void;
128
- getLastDistances(): number[];
129
- /**
130
- * Takes screenshot and saves base64 in lastScreenshotUri
131
- * @returns Promise
132
- */
133
- takeScreenShot(): Promise<any>;
134
- getScreenShotUri(): any;
135
- getLastMeasurement(): Object;
136
- /**
137
- * Styling of pointer
138
- */
139
- updatePointerTrick(): void;
140
- /**
141
- * Realtime mattertag following the cursor
142
- * @param mattertag string
143
- */
144
- enable_following_tag(mattertag: string): void;
145
- /**
146
- * Get the distance betwween two 3D positions
147
- * Used in order to see how much the cursor has moved from the previous position
148
- * @param pos1
149
- * @param pos2
150
- */
151
- getDistPosition(pos1: any, pos2: any): number;
152
- /**
153
- * Creates the Mattertag that will follow the cursor
154
- * @param mattertagData MattertagData
155
- */
156
- addCursorMattertag(mattertagData: MattertagData): Promise<void>;
157
- /**
158
- * Adds Mattertag to viewer for an existing object with coordinates (in mattertagData.poi)
159
- * (position, injected html, set icon)
160
- * @param mattertagData
161
- * returns mattertagID
162
- */
163
- addMattertagToViewer(mattertagData: MattertagData): Promise<string | null>;
164
- /**
165
- * Actions when position of mattertag is validated by left click
166
- */
167
- onValidatedMattertag(): void;
168
- /**
169
- * Registers new icon (path to image) and set its for Mattertag
170
- * @param mattertagID string
171
- * @param iconPath string
172
- */
173
- addNewIconAndSetForTag(mattertagID: string, iconPath: string): Promise<void>;
174
- /**
175
- * Changes icon of Mattertag (the iconName should be registered = one of default ones)
176
- * @param mattertagID string
177
- * @param iconName string
178
- */
179
- setRegistredIconForTag(mattertagID: string, iconName: string): Promise<void>;
180
- /**
181
- * Sets default icon for a tag (registered in initSdk) OR uses tagIcon from POI (available from MattertagData)
182
- * @param mattertagID string
183
- * @param mattertagData MattertagData
184
- * @returns
185
- */
186
- setTagIconAndOpacity(mattertagID: string, mattertagData: MattertagData): Promise<void>;
187
- /**
188
- * Moves viewer to last tag created
189
- */
190
- goToLastTag(): void;
191
- /**
192
- * Moves viewer to Mattertag with ID provided
193
- * @param mattertagID string
194
- * @returns
195
- */
196
- goToTag(mattertagID: string): Promise<void>;
197
- /**
198
- * Updates content of Mattertag with mattertagID (billboard, injected html, tag icon)
199
- * @param mattertagID string
200
- * @param object Ticket, Equipment, Feature, etc
201
- * @param tagType PoiType
202
- */
203
- updateMatterTagContentForTagID(mattertagID: string, object?: DbObjectType, tagType?: PoiType): Promise<void>;
204
- /**
205
- * Updates injected html for Mattertag
206
- * @param mattertagID string
207
- * @param object Ticket, Equipment, Feature, etc
208
- * @param tagType PoiType
209
- */
210
- updateInjectedHtmlForTagID(mattertagID: string, object: any, tagType: PoiType): Promise<void>;
211
- /**
212
- * Deletes Mattertag from Viewer by its ID
213
- * @param mattertagID string
214
- */
215
- deleteMattertagFromId(mattertagID: string): void;
216
- /**
217
- * Deletes latest created mattertag
218
- */
219
- deleteLastMattertag(): void;
220
- /**
221
- * Legacy: used to be called action_add_mattertag_from_POI
222
- * Adds and configures Mattertag for an object (Ticket, Equipment, Feature, etc) that corresponds to POI (coordinates, tagIcon)
223
- * @param tagType PoiType
224
- * @param object Ticket, Equipment, Feature...
225
- * @param poi POI
226
- * @returns
227
- */
228
- createMattertagFromPOI(tagType: PoiType, object: DbObjectType, poi: POI): Promise<any>;
229
- /**
230
- * Inject custom HTML as Mattertag content
231
- * @param tagType PoiType
232
- * @param object Ticket, Equipment, Feature etc
233
- * @param tagID string
234
- */
235
- injectHtmlInTag(tagType: PoiType, object: DbObjectType, tagID: string): Promise<void>;
236
- action_delete_all_mattertags(): Promise<void>;
237
- /**
238
- * Deletes Mattertag from visit associated with object ID (ticketID, etc)
239
- * @param elementID string
240
- */
241
- deleteMattertagForObject(elementID: string): Promise<void>;
242
- /**
243
- * uuid from threejs
244
- * @param uuid
245
- */
246
- deleteObject3D(uuid: string): Promise<void>;
247
- getObject3DModelNodeFromDictionnary(uuid: string): any;
248
- /**
249
- * Creates MattertagData and start repositioning (creates temporary mattertag that follows the cursor)
250
- * @param poiType PoiType
251
- * @param element Ticket, Equipment, Feature, etc
252
- */
253
- addMattertagWhenRepositioning(poiType: PoiType, element: DbObjectType): Promise<void>;
254
- /**
255
- * Creates MattertagData and mattertag that follows the cursor when choosing position for a new object
256
- * @param poiType
257
- */
258
- addMattertagWhenAdding(poiType: PoiType): Promise<void>;
259
- /**
260
- * Cancels following of cursor (meaning deleting last Mattertag)
261
- */
262
- cancelFollowingCursor(): void;
263
- setLastObject3D(lastObject3D: ThreeJSObject3D): void;
264
- getLastObject3D(): ThreeJSObject3D;
265
- /**
266
- * Performs callback after mattertag position was validated (creation of object or repositioning)
267
- * @param mode MattertagActionMode
268
- */
269
- callbackAfterMattertagValidation(mode: MattertagActionMode): void;
270
- /**
271
- * Fully updates existing Mattertag content with data of object (Ticket, Equipment, Desk)
272
- * @param mattertagID string
273
- * @param object Ticket, Equipment, Feature, Desk
274
- * @param poiType PoiType
275
- * @param poi POI
276
- */
277
- setObjectAndPoiInTag(mattertagID: string, object: DbObjectType, poiType: PoiType, poi?: POI | null): Promise<void>;
278
- updateMatterTagPosInSdkViewer(mattertagID: string, object: DbObjectType, poiType: PoiType, poi?: POI | null): Promise<void>;
279
- /**
280
- * Gets matterTagID and its sweep for an object ID (ticket ID, etc)
281
- * @param elementID string
282
- * @returns {tag: string | null, sweep: string | null}
283
- */
284
- getTagFromElementId(elementID: string): {
285
- tag: string | null;
286
- sweep: string | null;
287
- };
288
- /**
289
- * Gets latest tag created in the visit (when following the cursor to position)
290
- * @returns string mattertagID
291
- */
292
- getLastTag(): string | null;
293
- /**
294
- * Gets MattertagData for Mattertag (replaces getTagDataFromId)
295
- * @param mattertagID
296
- * @returns MattertagData
297
- */
298
- getMatterTagDataForMattertag(mattertagID: string): MattertagData | null;
299
- action_toolbox_floorplan(): Promise<void>;
300
- action_toolbox_inside_view(): void;
301
- actionShowAllFloors(): void;
302
- action_toolbox_dollhouse(): Promise<void>;
303
- action_toolbox_mesure(): void;
304
- action_toolbox_cancel_mesure(): void;
305
- action_go_to_floor(floorName: string, matterportFloorSequence?: number): Promise<void>;
306
- action_go_to_sweep(sweep: string, rotation?: {
307
- x: number;
308
- y: number;
309
- }): Promise<void>;
310
- getCurrentSweep(): string | null;
311
- getCurrentCameraPosition(): {
312
- rotation: any;
313
- position: any;
314
- sweep: any;
315
- } | null;
316
- setInteractionMode(interactionMode: number): void;
317
- getInteractionMode(): number;
318
- /**
319
- * Clear all variables, deletes all tags (when viewer is remover or model changed=reload needed)
320
- */
321
- clearAll(): Promise<void>;
322
- removeForbiddenSweeps(forbiddenSweeps: string[]): Promise<void>;
323
- init3DObjectViewer(): Promise<void>;
324
- add3DObject(obj: IObject3D, mode?: 'translate' | 'rotate'): Promise<any>;
325
- toggleObjectVisibility(objectId: any): void;
326
- isObjectVisible(objectId: any): boolean;
327
- pointCameraTo3DObject(objectId: any): Promise<void>;
328
- getSceneNodeFromObject3DId(uuid: string): any;
329
- displayAzimutalCrown(): Promise<void>;
330
- attachGizmoControlTo3DObject(modelNode: any, sceneObject: any, mode: 'translate' | 'rotate' | 'scale', visible: boolean, isNewObject: boolean): Promise<any>;
331
- removeGizmoFromLastObject(): void;
332
- toggleViewFrustum(): void;
333
- static ɵfac: i0.ɵɵFactoryDeclaration<MatterportService, never>;
334
- static ɵprov: i0.ɵɵInjectableDeclaration<MatterportService>;
335
- }
336
- export {};
1
+ import { NgZone } from '@angular/core';
2
+ import { ActivatedRoute, Router } from '@angular/router';
3
+ import { Subject } from 'rxjs';
4
+ import { MattertagData } from '../mattertagData';
5
+ import { DbObjectType, IObject3D, MattertagActionMode, POI, PoiType, SpModule } from '../types.service';
6
+ import { BaseTagService } from './tag.service';
7
+ import { BaseVisibilityService } from './baseVisibility.service';
8
+ import { Config } from '../config';
9
+ import { CameraMode } from '../types.service';
10
+ import * as i0 from "@angular/core";
11
+ /**
12
+ * Custom Threejs Object 3D interface
13
+ */
14
+ interface ThreeJSObject3D {
15
+ id: string;
16
+ uuid?: string;
17
+ position?: {
18
+ x: number;
19
+ y: number;
20
+ z: number;
21
+ };
22
+ rotation?: {
23
+ x: number;
24
+ y: number;
25
+ z: number;
26
+ };
27
+ scale?: {
28
+ x: number;
29
+ y: number;
30
+ z: number;
31
+ };
32
+ }
33
+ declare global {
34
+ interface Window {
35
+ MP_SDK: {
36
+ connect: Function;
37
+ };
38
+ }
39
+ }
40
+ export declare class MatterportService {
41
+ private router;
42
+ private activeRoute;
43
+ private visibilityService;
44
+ private ngZone;
45
+ private slots;
46
+ private nodes;
47
+ sdk: any;
48
+ private container;
49
+ private poseMatterport;
50
+ poseCamera: {
51
+ rotation: any;
52
+ position: any;
53
+ sweep: any;
54
+ };
55
+ lastCameraPosition: any;
56
+ private azimuthalCrown;
57
+ private pointerButton;
58
+ private getCursorPositionButton;
59
+ private cursorPositionButtonDisplayed;
60
+ private intervalCursorPointerPosition;
61
+ private textDisplayCursorPositionPanel;
62
+ private oldPoseMatterportPosition;
63
+ private isMeasureModeOn;
64
+ private interactionMode;
65
+ private mattertagIDs;
66
+ private dictionnaryTags;
67
+ private dictionnaryObjects3D;
68
+ private dictionnarySceneObjects3D;
69
+ threeJSScene: any;
70
+ private lastMeasure;
71
+ private distancesLastMeasure;
72
+ private resolution;
73
+ private visibility;
74
+ tagsAttachments: Object;
75
+ private lastScreenshotUri;
76
+ sweeps: Array<string> | null;
77
+ currentSweep: Subject<string>;
78
+ currentCameraPose: Subject<any>;
79
+ private floors?;
80
+ private _currentSpaceID;
81
+ private lastObject3D;
82
+ private currentFloor;
83
+ get currentSpaceID(): string;
84
+ set currentSpaceID(value: string);
85
+ timerPointer: any;
86
+ forbiddenSweeps: string[];
87
+ tagAction: Subject<{
88
+ action: string;
89
+ data: string;
90
+ }>;
91
+ mattertagToFollow: string | null;
92
+ tagService: BaseTagService;
93
+ config: Config;
94
+ inTransitionMode: boolean;
95
+ inTransitionSweep: boolean;
96
+ private noLightForObjects;
97
+ currentCameraMode: CameraMode;
98
+ onCameraModeChanged: Subject<CameraMode>;
99
+ onGoToTag: Subject<string>;
100
+ tagMessengerOn: boolean;
101
+ SPModule: SpModule;
102
+ objectControl: any;
103
+ private securityCameraAnimator;
104
+ /**
105
+ * Actions on left click when positioning mattertag in visit
106
+ */
107
+ pointerLeftClickHandler: () => void;
108
+ pointerRightClickHandler: (e: any) => void;
109
+ pointerMiddleClickHandler: (e: any) => void;
110
+ constructor(config: Config, router: Router, activeRoute: ActivatedRoute, visibilityService: BaseVisibilityService, ngZone: NgZone);
111
+ /**
112
+ * Initializes Matterport and all listeners/data
113
+ * @param tagService BaseTagService (to inject html)
114
+ * @param module SpModule (Museum, Immo) to subscribe only to needed functionnnalities
115
+ * @returns boolean
116
+ */
117
+ initSdk(tagService: BaseTagService, module?: SpModule): Promise<boolean>;
118
+ setLightingOff(): void;
119
+ pointToString(point: {
120
+ x: number;
121
+ y: number;
122
+ z: number;
123
+ }): string;
124
+ /**
125
+ * Callback after measurement is performed
126
+ */
127
+ getDistanceForLastMeasurement(): void;
128
+ getLastDistances(): number[];
129
+ /**
130
+ * Takes screenshot and saves base64 in lastScreenshotUri
131
+ * @returns Promise
132
+ */
133
+ takeScreenShot(): Promise<any>;
134
+ getScreenShotUri(): any;
135
+ getLastMeasurement(): Object;
136
+ /**
137
+ * Styling of pointer
138
+ */
139
+ updatePointerTrick(): void;
140
+ /**
141
+ * Realtime mattertag following the cursor
142
+ * @param mattertag string
143
+ */
144
+ enable_following_tag(mattertag: string): void;
145
+ /**
146
+ * Get the distance betwween two 3D positions
147
+ * Used in order to see how much the cursor has moved from the previous position
148
+ * @param pos1
149
+ * @param pos2
150
+ */
151
+ getDistPosition(pos1: any, pos2: any): number;
152
+ /**
153
+ * Creates the Mattertag that will follow the cursor
154
+ * @param mattertagData MattertagData
155
+ */
156
+ addCursorMattertag(mattertagData: MattertagData): Promise<void>;
157
+ /**
158
+ * Adds Mattertag to viewer for an existing object with coordinates (in mattertagData.poi)
159
+ * (position, injected html, set icon)
160
+ * @param mattertagData
161
+ * returns mattertagID
162
+ */
163
+ addMattertagToViewer(mattertagData: MattertagData): Promise<string | null>;
164
+ /**
165
+ * Actions when position of mattertag is validated by left click
166
+ */
167
+ onValidatedMattertag(): void;
168
+ /**
169
+ * Registers new icon (path to image) and set its for Mattertag
170
+ * @param mattertagID string
171
+ * @param iconPath string
172
+ */
173
+ addNewIconAndSetForTag(mattertagID: string, iconPath: string): Promise<void>;
174
+ /**
175
+ * Changes icon of Mattertag (the iconName should be registered = one of default ones)
176
+ * @param mattertagID string
177
+ * @param iconName string
178
+ */
179
+ setRegistredIconForTag(mattertagID: string, iconName: string): Promise<void>;
180
+ /**
181
+ * Sets default icon for a tag (registered in initSdk) OR uses tagIcon from POI (available from MattertagData)
182
+ * @param mattertagID string
183
+ * @param mattertagData MattertagData
184
+ * @returns
185
+ */
186
+ setTagIconAndOpacity(mattertagID: string, mattertagData: MattertagData): Promise<void>;
187
+ /**
188
+ * Moves viewer to last tag created
189
+ */
190
+ goToLastTag(): void;
191
+ /**
192
+ * Moves viewer to Mattertag with ID provided
193
+ * @param mattertagID string
194
+ * @returns
195
+ */
196
+ goToTag(mattertagID: string): Promise<void>;
197
+ /**
198
+ * Updates content of Mattertag with mattertagID (billboard, injected html, tag icon)
199
+ * @param mattertagID string
200
+ * @param object Ticket, Equipment, Feature, etc
201
+ * @param tagType PoiType
202
+ */
203
+ updateMatterTagContentForTagID(mattertagID: string, object?: DbObjectType, tagType?: PoiType): Promise<void>;
204
+ /**
205
+ * Updates injected html for Mattertag
206
+ * @param mattertagID string
207
+ * @param object Ticket, Equipment, Feature, etc
208
+ * @param tagType PoiType
209
+ */
210
+ updateInjectedHtmlForTagID(mattertagID: string, object: any, tagType: PoiType): Promise<void>;
211
+ /**
212
+ * Deletes Mattertag from Viewer by its ID
213
+ * @param mattertagID string
214
+ */
215
+ deleteMattertagFromId(mattertagID: string): void;
216
+ /**
217
+ * Deletes latest created mattertag
218
+ */
219
+ deleteLastMattertag(): void;
220
+ /**
221
+ * Legacy: used to be called action_add_mattertag_from_POI
222
+ * Adds and configures Mattertag for an object (Ticket, Equipment, Feature, etc) that corresponds to POI (coordinates, tagIcon)
223
+ * @param tagType PoiType
224
+ * @param object Ticket, Equipment, Feature...
225
+ * @param poi POI
226
+ * @returns
227
+ */
228
+ createMattertagFromPOI(tagType: PoiType, object: DbObjectType, poi: POI): Promise<any>;
229
+ /**
230
+ * Inject custom HTML as Mattertag content
231
+ * @param tagType PoiType
232
+ * @param object Ticket, Equipment, Feature etc
233
+ * @param tagID string
234
+ */
235
+ injectHtmlInTag(tagType: PoiType, object: DbObjectType, tagID: string): Promise<void>;
236
+ action_delete_all_mattertags(): Promise<void>;
237
+ /**
238
+ * Deletes Mattertag from visit associated with object ID (ticketID, etc)
239
+ * @param elementID string
240
+ */
241
+ deleteMattertagForObject(elementID: string): Promise<void>;
242
+ /**
243
+ * uuid from threejs
244
+ * @param uuid
245
+ */
246
+ deleteObject3D(uuid: string): Promise<void>;
247
+ getObject3DModelNodeFromDictionnary(uuid: string): any;
248
+ /**
249
+ * Creates MattertagData and start repositioning (creates temporary mattertag that follows the cursor)
250
+ * @param poiType PoiType
251
+ * @param element Ticket, Equipment, Feature, etc
252
+ */
253
+ addMattertagWhenRepositioning(poiType: PoiType, element: DbObjectType): Promise<void>;
254
+ /**
255
+ * Creates MattertagData and mattertag that follows the cursor when choosing position for a new object
256
+ * @param poiType
257
+ */
258
+ addMattertagWhenAdding(poiType: PoiType): Promise<void>;
259
+ /**
260
+ * Cancels following of cursor (meaning deleting last Mattertag)
261
+ */
262
+ cancelFollowingCursor(): void;
263
+ setLastObject3D(lastObject3D: ThreeJSObject3D): void;
264
+ getLastObject3D(): ThreeJSObject3D;
265
+ /**
266
+ * Performs callback after mattertag position was validated (creation of object or repositioning)
267
+ * @param mode MattertagActionMode
268
+ */
269
+ callbackAfterMattertagValidation(mode: MattertagActionMode): void;
270
+ /**
271
+ * Fully updates existing Mattertag content with data of object (Ticket, Equipment, Desk)
272
+ * @param mattertagID string
273
+ * @param object Ticket, Equipment, Feature, Desk
274
+ * @param poiType PoiType
275
+ * @param poi POI
276
+ */
277
+ setObjectAndPoiInTag(mattertagID: string, object: DbObjectType, poiType: PoiType, poi?: POI | null): Promise<void>;
278
+ updateMatterTagPosInSdkViewer(mattertagID: string, object: DbObjectType, poiType: PoiType, poi?: POI | null): Promise<void>;
279
+ /**
280
+ * Gets matterTagID and its sweep for an object ID (ticket ID, etc)
281
+ * @param elementID string
282
+ * @returns {tag: string | null, sweep: string | null}
283
+ */
284
+ getTagFromElementId(elementID: string): {
285
+ tag: string | null;
286
+ sweep: string | null;
287
+ };
288
+ /**
289
+ * Gets latest tag created in the visit (when following the cursor to position)
290
+ * @returns string mattertagID
291
+ */
292
+ getLastTag(): string | null;
293
+ /**
294
+ * Gets MattertagData for Mattertag (replaces getTagDataFromId)
295
+ * @param mattertagID
296
+ * @returns MattertagData
297
+ */
298
+ getMatterTagDataForMattertag(mattertagID: string): MattertagData | null;
299
+ action_toolbox_floorplan(): Promise<void>;
300
+ action_toolbox_inside_view(): void;
301
+ actionShowAllFloors(): void;
302
+ action_toolbox_dollhouse(): Promise<void>;
303
+ action_toolbox_mesure(): void;
304
+ action_toolbox_cancel_mesure(): void;
305
+ action_go_to_floor(floorName: string, matterportFloorSequence?: number): Promise<void>;
306
+ action_go_to_sweep(sweep: string, rotation?: {
307
+ x: number;
308
+ y: number;
309
+ }): Promise<void>;
310
+ getCurrentSweep(): string | null;
311
+ getCurrentCameraPosition(): {
312
+ rotation: any;
313
+ position: any;
314
+ sweep: any;
315
+ } | null;
316
+ setInteractionMode(interactionMode: number): void;
317
+ getInteractionMode(): number;
318
+ /**
319
+ * Clear all variables, deletes all tags (when viewer is remover or model changed=reload needed)
320
+ */
321
+ clearAll(): Promise<void>;
322
+ removeForbiddenSweeps(forbiddenSweeps: string[]): Promise<void>;
323
+ init3DObjectViewer(): Promise<void>;
324
+ add3DObject(obj: IObject3D, mode?: 'translate' | 'rotate'): Promise<any>;
325
+ toggleObjectVisibility(objectId: any): void;
326
+ isObjectVisible(objectId: any): boolean;
327
+ pointCameraTo3DObject(objectId: any): Promise<void>;
328
+ getSceneNodeFromObject3DId(uuid: string): any;
329
+ displayAzimutalCrown(): Promise<void>;
330
+ attachGizmoControlTo3DObject(modelNode: any, sceneObject: any, mode: 'translate' | 'rotate' | 'scale', visible: boolean, isNewObject: boolean): Promise<any>;
331
+ removeGizmoFromLastObject(): void;
332
+ toggleViewFrustum(): void;
333
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatterportService, never>;
334
+ static ɵprov: i0.ɵɵInjectableDeclaration<MatterportService>;
335
+ }
336
+ export {};