@smarterplan/ngx-smarterplan-core 1.4.27 → 1.4.29

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 (122) hide show
  1. package/README.md +24 -24
  2. package/esm2022/lib/components/checkbox-slider/checkbox-slider.component.mjs +33 -0
  3. package/esm2022/lib/components/csv-export/csv-export.component.mjs +3 -3
  4. package/esm2022/lib/components/inventory-runs/inventory-files.component.mjs +168 -81
  5. package/esm2022/lib/components/inventory-runs/inventory-launch.component.mjs +417 -0
  6. package/esm2022/lib/components/inventory-runs/inventory-runs.component.mjs +14 -3
  7. package/esm2022/lib/components/loader/loader.component.mjs +3 -3
  8. package/esm2022/lib/components/menu-bar/avatar/avatar.component.mjs +1 -1
  9. package/esm2022/lib/components/menu-bar/menu-bar.component.mjs +3 -3
  10. package/esm2022/lib/components/menu-bar/navigation-bar/navigation-bar.component.mjs +3 -3
  11. package/esm2022/lib/components/modal-switch-visit/modal-switch-visit.component.mjs +3 -3
  12. package/esm2022/lib/components/search-bar/search-bar.component.mjs +3 -3
  13. package/esm2022/lib/components/splat-viewer/splat-viewer.component.mjs +1 -1
  14. package/esm2022/lib/components/support-modal/support-modal.component.mjs +3 -3
  15. package/esm2022/lib/config.mjs +1 -1
  16. package/esm2022/lib/helpers.service.mjs +1 -1
  17. package/esm2022/lib/matterport-extensions/nest-thermostat/CanvasImage.mjs +1 -1
  18. package/esm2022/lib/matterport-extensions/nest-thermostat/CanvasRenderer.mjs +1 -1
  19. package/esm2022/lib/matterport-extensions/nest-thermostat/NestThermostat.mjs +1 -1
  20. package/esm2022/lib/matterport-extensions/nest-thermostat/PlaneRenderer.mjs +1 -1
  21. package/esm2022/lib/matterport-extensions/scene-component/SceneComponent.mjs +1 -1
  22. package/esm2022/lib/matterport-extensions/security-camera/SecurityCamera.mjs +22 -22
  23. package/esm2022/lib/matterport-extensions/tv-player/TvPlayer.mjs +1 -1
  24. package/esm2022/lib/matterport-extensions/view-frustum-mesh/ViewFrustumMesh.mjs +22 -22
  25. package/esm2022/lib/mattertagData.mjs +1 -1
  26. package/esm2022/lib/ngx-smarterplan-core.module.mjs +14 -4
  27. package/esm2022/lib/ngx-smarterplan-core.service.mjs +1 -1
  28. package/esm2022/lib/pipes/duration-to-string.pipe.mjs +1 -1
  29. package/esm2022/lib/pipes/format-date-number-to-digits.pipe.mjs +1 -1
  30. package/esm2022/lib/pipes/hashtag-from-id.pipe.mjs +1 -1
  31. package/esm2022/lib/pipes/safe-url.pipe.mjs +1 -1
  32. package/esm2022/lib/pipes/time-date-to-local-string.pipe.mjs +1 -1
  33. package/esm2022/lib/pipes/username-from-id.pipe.mjs +1 -1
  34. package/esm2022/lib/services/amplify-cache.service.mjs +1 -1
  35. package/esm2022/lib/services/base-tab.service.mjs +1 -1
  36. package/esm2022/lib/services/baseVisibility.service.mjs +1 -1
  37. package/esm2022/lib/services/content.service.mjs +1 -1
  38. package/esm2022/lib/services/filter.service.mjs +10 -3
  39. package/esm2022/lib/services/intervention.service.mjs +1 -1
  40. package/esm2022/lib/services/locale.service.mjs +1 -1
  41. package/esm2022/lib/services/matterport-import.service.mjs +1 -1
  42. package/esm2022/lib/services/matterport-measurement.service.mjs +1 -1
  43. package/esm2022/lib/services/matterport-navigation.service.mjs +1 -1
  44. package/esm2022/lib/services/matterport-object3d.service.mjs +1 -1
  45. package/esm2022/lib/services/matterport-pointer.service.mjs +6 -6
  46. package/esm2022/lib/services/matterport-tag-copy.service.mjs +1 -1
  47. package/esm2022/lib/services/matterport-tag.service.mjs +5 -1
  48. package/esm2022/lib/services/matterport.service.mjs +30 -25
  49. package/esm2022/lib/services/models/affectation.service.mjs +1 -1
  50. package/esm2022/lib/services/models/base-object.service.mjs +1 -1
  51. package/esm2022/lib/services/models/capture.service.mjs +1 -1
  52. package/esm2022/lib/services/models/comment.service.mjs +1 -1
  53. package/esm2022/lib/services/models/domain.service.mjs +1 -1
  54. package/esm2022/lib/services/models/equipment.service.mjs +51 -23
  55. package/esm2022/lib/services/models/event.service.mjs +1 -1
  56. package/esm2022/lib/services/models/feature.service.mjs +15 -1
  57. package/esm2022/lib/services/models/hashtag.service.mjs +1 -1
  58. package/esm2022/lib/services/models/inventory-storage.mjs +21 -0
  59. package/esm2022/lib/services/models/inventory.service.mjs +52 -5
  60. package/esm2022/lib/services/models/layer.service.mjs +1 -1
  61. package/esm2022/lib/services/models/measurement.service.mjs +7 -1
  62. package/esm2022/lib/services/models/mission.service.mjs +1 -1
  63. package/esm2022/lib/services/models/navigation.service.mjs +1 -1
  64. package/esm2022/lib/services/models/node.service.mjs +1 -1
  65. package/esm2022/lib/services/models/object3D.service.mjs +1 -1
  66. package/esm2022/lib/services/models/operation.service.mjs +19 -5
  67. package/esm2022/lib/services/models/organisation.service.mjs +1 -1
  68. package/esm2022/lib/services/models/plan.service.mjs +1 -1
  69. package/esm2022/lib/services/models/poi.service.mjs +27 -27
  70. package/esm2022/lib/services/models/profile.service.mjs +1 -1
  71. package/esm2022/lib/services/models/property.service.mjs +1 -1
  72. package/esm2022/lib/services/models/space.service.mjs +1 -1
  73. package/esm2022/lib/services/models/template.service.mjs +1 -1
  74. package/esm2022/lib/services/models/ticket.service.mjs +6 -1
  75. package/esm2022/lib/services/models/visit.service.mjs +1 -1
  76. package/esm2022/lib/services/models/zone.service.mjs +1 -1
  77. package/esm2022/lib/services/navigator.service.mjs +1 -1
  78. package/esm2022/lib/services/obj-to-glb.mjs +1 -1
  79. package/esm2022/lib/services/retry-when-throttled.mjs +31 -0
  80. package/esm2022/lib/services/s3.service.mjs +1 -1
  81. package/esm2022/lib/services/search.service.mjs +1 -1
  82. package/esm2022/lib/services/support.service.mjs +1 -1
  83. package/esm2022/lib/services/sweep-locator.service.mjs +1 -1
  84. package/esm2022/lib/services/tag.service.mjs +16 -16
  85. package/esm2022/lib/services/threejs-import.service.mjs +1 -1
  86. package/esm2022/lib/services/threejs.service.mjs +1 -1
  87. package/esm2022/lib/services/user.service.mjs +1 -1
  88. package/esm2022/lib/services/utils/matterport-framing.util.mjs +1 -1
  89. package/esm2022/lib/services/utils/matterport-transform.util.mjs +1 -1
  90. package/esm2022/lib/services/validators.service.mjs +1 -1
  91. package/esm2022/lib/services/viewer.service.mjs +3 -3
  92. package/esm2022/lib/services/zone-drawer.service.mjs +1 -1
  93. package/esm2022/lib/services/zoneChange.service.mjs +1 -1
  94. package/esm2022/lib/tokens/matterport-sdk-key.token.mjs +1 -1
  95. package/esm2022/lib/types.service.mjs +1 -1
  96. package/esm2022/lib/validators/email.directive.mjs +1 -1
  97. package/esm2022/lib/validators/no-empty.directive.mjs +1 -1
  98. package/esm2022/lib/validators/number.directive.mjs +1 -1
  99. package/esm2022/lib/validators/text.directive.mjs +1 -1
  100. package/esm2022/public-api.mjs +3 -1
  101. package/fesm2022/smarterplan-ngx-smarterplan-core.mjs +965 -246
  102. package/fesm2022/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
  103. package/lib/components/checkbox-slider/checkbox-slider.component.d.ts +16 -0
  104. package/lib/components/inventory-runs/inventory-files.component.d.ts +37 -8
  105. package/lib/components/inventory-runs/inventory-launch.component.d.ts +122 -0
  106. package/lib/components/inventory-runs/inventory-runs.component.d.ts +7 -0
  107. package/lib/ngx-smarterplan-core.module.d.ts +9 -7
  108. package/lib/services/matterport-tag.service.d.ts +2 -0
  109. package/lib/services/models/equipment.service.d.ts +16 -1
  110. package/lib/services/models/feature.service.d.ts +5 -0
  111. package/lib/services/models/inventory-storage.d.ts +9 -0
  112. package/lib/services/models/inventory.service.d.ts +14 -2
  113. package/lib/services/models/measurement.service.d.ts +2 -0
  114. package/lib/services/models/operation.service.d.ts +10 -0
  115. package/lib/services/models/ticket.service.d.ts +2 -0
  116. package/lib/services/retry-when-throttled.d.ts +5 -0
  117. package/package.json +1 -1
  118. package/public-api.d.ts +2 -0
  119. package/src/assets/viewers/splat/convert.html +11 -11
  120. package/src/assets/viewers/splat/index.html +90 -90
  121. package/src/assets/viewers/splat/webp.wasm +0 -0
  122. package/src/assets/vs-app.json +67 -67
@@ -0,0 +1,16 @@
1
+ import { EventEmitter } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * A checkbox drawn as an on/off slider, with its label: [(checked)]. The app's own, from when only
5
+ * its Equipments had one; here for the screens the libraries share.
6
+ */
7
+ export declare class CheckboxSliderComponent {
8
+ /** A key to translate. */
9
+ label: string;
10
+ checked: boolean;
11
+ disabled: boolean;
12
+ checkedChange: EventEmitter<boolean>;
13
+ onChange(event: Event): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxSliderComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxSliderComponent, "lib-checkbox-slider", never, { "label": { "alias": "label"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "checkedChange": "checkedChange"; }, never, never, false, never>;
16
+ }
@@ -1,23 +1,52 @@
1
1
  import { EventEmitter } from "@angular/core";
2
2
  import { InventoryFiles } from "../../services/models/inventory.service";
3
3
  import * as i0 from "@angular/core";
4
+ /** A file of the visit's inventory folder that can be sent, replaced or deleted from here. */
5
+ export interface InventoryEditableFile {
6
+ /** Where the inventory's task looks for it, whatever the file sent was called. */
7
+ name: "model.obj" | "data.json";
8
+ field: "modelObj" | "dataJson";
9
+ accept: string;
10
+ extension: RegExp;
11
+ type: string;
12
+ /** The button when the visit does not have it, as a key to translate. */
13
+ send: string;
14
+ /** Why a file chosen was refused, as a key to translate. */
15
+ wrongFile: string;
16
+ }
17
+ export declare const INVENTORY_MESH_FILE: InventoryEditableFile;
18
+ export declare const INVENTORY_POSITIONS_FILE: InventoryEditableFile;
4
19
  /**
5
20
  * What a visit has of what its AI inventory needs (InventoryService.checkFiles), and where what is
6
- * missing comes from, for the screens to show before launching one. The mesh, which nothing else
7
- * puts in the bucket, can be sent from here: the .obj of the visit's MatterPak, as it is.
21
+ * missing comes from, for the screens to show before launching one. The mesh and the panoramas'
22
+ * positions can be sent, replaced or deleted from here; the panoramas come from the visit's import.
8
23
  */
9
24
  export declare class InventoryFilesComponent {
10
25
  files: InventoryFiles;
11
- /** Said when the visit gets a file from here: [(files)]. */
26
+ /** Said when a file of the visit is sent, replaced or deleted from here: [(files)]. */
12
27
  filesChange: EventEmitter<InventoryFiles>;
13
28
  /** The visit's Matterport model, the folder of its files. */
14
29
  model3D: string;
15
- /** How much of the .obj is sent, from 0 to 100, while it is. */
30
+ /** While an inventory runs or is launched: it reads these files, which must not change. */
31
+ disabled: boolean;
32
+ meshFile: InventoryEditableFile;
33
+ positionsFile: InventoryEditableFile;
34
+ /** The file being sent. */
35
+ sending: InventoryEditableFile;
36
+ /** How much of it is sent, from 0 to 100. */
16
37
  uploadPercent: number;
17
38
  uploadName: string;
18
- /** Why the .obj was not sent, as a key to translate. */
19
- uploadError: string;
20
- onModelObjSelected(event: Event): Promise<void>;
39
+ /** The file whose deletion is waiting to be confirmed. */
40
+ confirmingDelete: InventoryEditableFile;
41
+ deletingFile: InventoryEditableFile;
42
+ /** What went wrong, as a key to translate, and with which file. */
43
+ error: string;
44
+ errorFile: InventoryEditableFile;
45
+ /** Whether the files cannot be changed for now. */
46
+ get locked(): boolean;
47
+ private fail;
48
+ onFileSelected(target: InventoryEditableFile, event: Event): Promise<void>;
49
+ onDeleteConfirmed(target: InventoryEditableFile): Promise<void>;
21
50
  static ɵfac: i0.ɵɵFactoryDeclaration<InventoryFilesComponent, never>;
22
- static ɵcmp: i0.ɵɵComponentDeclaration<InventoryFilesComponent, "lib-inventory-files", never, { "files": { "alias": "files"; "required": false; }; "model3D": { "alias": "model3D"; "required": false; }; }, { "filesChange": "filesChange"; }, never, never, false, never>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<InventoryFilesComponent, "lib-inventory-files", never, { "files": { "alias": "files"; "required": false; }; "model3D": { "alias": "model3D"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "filesChange": "filesChange"; }, never, never, false, never>;
23
52
  }
@@ -0,0 +1,122 @@
1
+ import { EventEmitter, OnChanges, OnInit, SimpleChanges } from "@angular/core";
2
+ import { EquipmentService } from "../../services/models/equipment.service";
3
+ import { NavigationService } from "../../services/models/navigation.service";
4
+ import { InventoryFiles, InventoryModel, InventoryRun, InventoryService } from "../../services/models/inventory.service";
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * How many equipment of the previous inventory are deleted at a time. All at once, hundreds of them
8
+ * at three or more requests each, the API refused part of them and the launch stopped half way; a
9
+ * request it refuses for coming too fast is now sent again (EquipmentService.deleteEquipment).
10
+ */
11
+ export declare const INVENTORY_DELETE_AT_ONCE = 15;
12
+ /** A visit the AI inventory can look at: its node, its Matterport model (the folder of its files) and its name. */
13
+ export interface InventoryVisit {
14
+ nodeID: string;
15
+ model3D: string;
16
+ label: string;
17
+ }
18
+ /**
19
+ * Launches an AI inventory, of the visits given or of one panorama of the visit, saying first what
20
+ * it will do: what each visit has of what the inventory needs, and how many equipment the AI added
21
+ * before, when they are to be deleted. The location's Equipments and its 360° images both launch
22
+ * theirs from here, so that they offer the same.
23
+ */
24
+ export declare class InventoryLaunchComponent implements OnInit, OnChanges {
25
+ private inventoryService;
26
+ private equipmentService;
27
+ private navigationService;
28
+ spaceID: string;
29
+ visits: InventoryVisit[];
30
+ /** Only this panorama of the visit, as it is named: 110ee452_sweep.jpeg. */
31
+ panorama: string;
32
+ /** Whether an inventory of the location is running: no other is launched meanwhile. */
33
+ running: boolean;
34
+ cancelled: EventEmitter<void>;
35
+ /** Said once an inventory is launched, for its progress to be looked at. */
36
+ launched: EventEmitter<void>;
37
+ models: InventoryModel[];
38
+ model: InventoryModel;
39
+ cutoffScores: string[];
40
+ cutoffScore: string;
41
+ /** Whether the equipment the AI added to the location before is deleted first. */
42
+ deletePrevious: boolean;
43
+ /** How many of the location's equipment the AI added, which deletePrevious deletes. */
44
+ aiEquipmentCount: number;
45
+ /** While the previous inventory is deleted: how many of its equipment are done, of how many. */
46
+ deleting: {
47
+ done: number;
48
+ total: number;
49
+ };
50
+ /** How many equipment of the previous inventory could not be deleted, for the message. */
51
+ notDeleted: number;
52
+ /** Each visit's latest inventory when it is done and all its detections are still kept. */
53
+ reusable: Record<string, InventoryRun>;
54
+ /**
55
+ * The visits with detections kept that nothing is waiting for: their latest inventory is done.
56
+ * A stopped one needs them to resume.
57
+ */
58
+ discardable: InventoryVisit[];
59
+ confirmingDiscard: boolean;
60
+ discarding: boolean;
61
+ /** Whether the saved detections were just discarded, for the panel to say so. */
62
+ discarded: boolean;
63
+ /** The latest reading of the kept detections: an older one answering late is ignored. */
64
+ private keptCheck;
65
+ /** The latest count of the previous inventory, for the same reason. */
66
+ private countCheck;
67
+ /**
68
+ * Whether the launch places the latest inventories' detections again, with the cutoff chosen,
69
+ * instead of analysing the panoramas: minutes instead of hours.
70
+ */
71
+ reuseDetections: boolean;
72
+ /** What each visit has of what the inventory needs, by its node; null when the bucket could not be read. */
73
+ visitFiles: Record<string, InventoryFiles>;
74
+ checkingFiles: boolean;
75
+ launching: boolean;
76
+ /** What went wrong, or why nothing was launched, as a key to translate. */
77
+ message: string;
78
+ constructor(inventoryService: InventoryService, equipmentService: EquipmentService, navigationService: NavigationService);
79
+ ngOnInit(): Promise<void>;
80
+ /** The model and the cutoff score last launched with, from either screen; null when unknown. */
81
+ private lastSettings;
82
+ private keepSettings;
83
+ ngOnChanges(changes: SimpleChanges): void;
84
+ /** Whether the inventory's detections of all its panoramas are among those kept. */
85
+ private keptAll;
86
+ /** What the bucket has of the visits' detections, for their latest inventories that are done. */
87
+ private readKept;
88
+ private findReusable;
89
+ /**
90
+ * Every visit to analyse has a finished inventory of all its panoramas, with all its detections
91
+ * kept: placing them again takes minutes, and analyses nothing. They are placed again under one
92
+ * model, so all must come from the same.
93
+ */
94
+ get canReuse(): boolean;
95
+ /** The model of the detections placed again: the one the launch uses when it reuses them. */
96
+ get reusedModelName(): string;
97
+ onFilesChange(visit: InventoryVisit, files: InventoryFiles): void;
98
+ /** Deletes the detections kept for the visits whose inventory is done. The equipment stays. */
99
+ onConfirmDiscard(): Promise<void>;
100
+ onReuseChange(reuse: boolean): void;
101
+ private checkFiles;
102
+ /** The visits that will be analysed: those with nothing known to be missing. */
103
+ get launchableVisits(): InventoryVisit[];
104
+ get canLaunch(): boolean;
105
+ onDeletePreviousChange(deletePrevious: boolean): Promise<void>;
106
+ /** Counts what the launch would delete: it depends on the visits analysed. */
107
+ private countPrevious;
108
+ /**
109
+ * The equipment the AI added to the visits analysed, known by the panoramas their tags are at:
110
+ * a visit left out, for a missing file, keeps its own. One whose tag has no panorama cannot be
111
+ * told apart, and is deleted only when every visit is analysed again.
112
+ */
113
+ private aiEquipments;
114
+ /**
115
+ * Deletes the equipment a few at a time, going on past one that fails (its error logged), and
116
+ * says how many could not be deleted.
117
+ */
118
+ private deleteFewAtATime;
119
+ onLaunchClick(): Promise<void>;
120
+ static ɵfac: i0.ɵɵFactoryDeclaration<InventoryLaunchComponent, never>;
121
+ static ɵcmp: i0.ɵɵComponentDeclaration<InventoryLaunchComponent, "lib-inventory-launch", never, { "spaceID": { "alias": "spaceID"; "required": false; }; "visits": { "alias": "visits"; "required": false; }; "panorama": { "alias": "panorama"; "required": false; }; "running": { "alias": "running"; "required": false; }; }, { "cancelled": "cancelled"; "launched": "launched"; }, never, never, false, never>;
122
+ }
@@ -19,6 +19,8 @@ export declare class InventoryRunsComponent implements OnChanges, OnDestroy {
19
19
  /** Whether one of the inventories shown is running: said when it changes. */
20
20
  runningChange: EventEmitter<boolean>;
21
21
  runs: InventoryRun[];
22
+ /** Every inventory of the space by its id, for where one that places detections again took them. */
23
+ private byId;
22
24
  /** The inventory whose cancelling waits for its confirmation. */
23
25
  confirmingCancel: string;
24
26
  /** The inventory being cancelled or resumed, its buttons disabled meanwhile. */
@@ -36,6 +38,11 @@ export declare class InventoryRunsComponent implements OnChanges, OnDestroy {
36
38
  ngOnChanges(): void;
37
39
  ngOnDestroy(): void;
38
40
  refresh(): Promise<void>;
41
+ /**
42
+ * The finished inventory whose detections this one places again with its own cutoff, analysing
43
+ * no panorama; null when it analyses them, resuming a stopped one included.
44
+ */
45
+ reusedFrom(run: InventoryRun): InventoryRun;
39
46
  /**
40
47
  * About how many minutes the panoramas left will take, at the pace seen since the inventory
41
48
  * was first seen analysing them; null until a panorama has been done meanwhile.
@@ -18,15 +18,17 @@ import * as i14 from "./pipes/format-date-number-to-digits.pipe";
18
18
  import * as i15 from "./components/splat-viewer/splat-viewer.component";
19
19
  import * as i16 from "./components/inventory-runs/inventory-runs.component";
20
20
  import * as i17 from "./components/inventory-runs/inventory-files.component";
21
- import * as i18 from "@angular/forms";
22
- import * as i19 from "@angular/common";
23
- import * as i20 from "@angular/router";
24
- import * as i21 from "@ng-bootstrap/ng-bootstrap";
25
- import * as i22 from "@abhinavakhil/iconify-angular";
26
- import * as i23 from "@ngx-translate/core";
21
+ import * as i18 from "./components/inventory-runs/inventory-launch.component";
22
+ import * as i19 from "./components/checkbox-slider/checkbox-slider.component";
23
+ import * as i20 from "@angular/forms";
24
+ import * as i21 from "@angular/common";
25
+ import * as i22 from "@angular/router";
26
+ import * as i23 from "@ng-bootstrap/ng-bootstrap";
27
+ import * as i24 from "@abhinavakhil/iconify-angular";
28
+ import * as i25 from "@ngx-translate/core";
27
29
  export declare class NgxSmarterplanCoreModule {
28
30
  static forRoot(config: Config): ModuleWithProviders<NgxSmarterplanCoreModule>;
29
31
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxSmarterplanCoreModule, never>;
30
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgxSmarterplanCoreModule, [typeof i1.TimeDateToLocalStringPipe, typeof i2.SafeUrlPipe, typeof i3.HashtagFromIdPipe, typeof i4.DurationToStringPipe, typeof i5.CsvExportComponent, typeof i6.SearchBarComponent, typeof i7.UsernameFromIdPipe, typeof i8.ModalSwitchVisitComponent, typeof i9.MenuBarComponent, typeof i10.AvatarComponent, typeof i11.NavigationBarComponent, typeof i12.LoaderComponent, typeof i13.SupportModalComponent, typeof i14.FormatDateNumberToDigitsPipe, typeof i15.SplatViewerComponent, typeof i16.InventoryRunsComponent, typeof i17.InventoryFilesComponent], [typeof i18.FormsModule, typeof i18.ReactiveFormsModule, typeof i19.CommonModule, typeof i20.RouterModule, typeof i21.NgbModule, typeof i22.IconModule, typeof i23.TranslateModule], [typeof i5.CsvExportComponent, typeof i6.SearchBarComponent, typeof i1.TimeDateToLocalStringPipe, typeof i2.SafeUrlPipe, typeof i3.HashtagFromIdPipe, typeof i4.DurationToStringPipe, typeof i7.UsernameFromIdPipe, typeof i9.MenuBarComponent, typeof i12.LoaderComponent, typeof i13.SupportModalComponent, typeof i10.AvatarComponent, typeof i15.SplatViewerComponent, typeof i16.InventoryRunsComponent, typeof i17.InventoryFilesComponent]>;
32
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxSmarterplanCoreModule, [typeof i1.TimeDateToLocalStringPipe, typeof i2.SafeUrlPipe, typeof i3.HashtagFromIdPipe, typeof i4.DurationToStringPipe, typeof i5.CsvExportComponent, typeof i6.SearchBarComponent, typeof i7.UsernameFromIdPipe, typeof i8.ModalSwitchVisitComponent, typeof i9.MenuBarComponent, typeof i10.AvatarComponent, typeof i11.NavigationBarComponent, typeof i12.LoaderComponent, typeof i13.SupportModalComponent, typeof i14.FormatDateNumberToDigitsPipe, typeof i15.SplatViewerComponent, typeof i16.InventoryRunsComponent, typeof i17.InventoryFilesComponent, typeof i18.InventoryLaunchComponent, typeof i19.CheckboxSliderComponent], [typeof i20.FormsModule, typeof i20.ReactiveFormsModule, typeof i21.CommonModule, typeof i22.RouterModule, typeof i23.NgbModule, typeof i24.IconModule, typeof i25.TranslateModule], [typeof i5.CsvExportComponent, typeof i6.SearchBarComponent, typeof i1.TimeDateToLocalStringPipe, typeof i2.SafeUrlPipe, typeof i3.HashtagFromIdPipe, typeof i4.DurationToStringPipe, typeof i7.UsernameFromIdPipe, typeof i9.MenuBarComponent, typeof i12.LoaderComponent, typeof i13.SupportModalComponent, typeof i10.AvatarComponent, typeof i15.SplatViewerComponent, typeof i16.InventoryRunsComponent, typeof i17.InventoryFilesComponent, typeof i18.InventoryLaunchComponent, typeof i19.CheckboxSliderComponent]>;
31
33
  static ɵinj: i0.ɵɵInjectorDeclaration<NgxSmarterplanCoreModule>;
32
34
  }
@@ -58,6 +58,8 @@ export declare class MatterportTagService {
58
58
  getTagModule(sdk: any, tagId: string): any;
59
59
  /** Icon name last applied to a tag, if any. */
60
60
  getCachedTagIcon(tagId: string): string | undefined;
61
+ /** Whether a tag can be opened, as updateTagsVisibilityForContext() last left it: yes until then. */
62
+ isTagEnabled(tagId: string): boolean;
61
63
  /** Applies an icon to a tag through its own module and remembers it on success. */
62
64
  editTagIcon(sdk: any, tagId: string, iconName: string): Promise<void>;
63
65
  /**
@@ -33,6 +33,11 @@ export declare class EquipmentService extends BaseObjectService {
33
33
  zonesMap: Map<string, Equipment[]>;
34
34
  };
35
35
  equipmentsTags: BehaviorSubject<Equipment[]>;
36
+ /**
37
+ * The space's equipment the user sees, whatever equipmentDomainFilter hides: what a domain
38
+ * filter has to offer, and how many of each. Null until they are known.
39
+ */
40
+ equipmentsUnfiltered: BehaviorSubject<Equipment[]>;
36
41
  zoneIDFilter: string;
37
42
  currentZone: Zone;
38
43
  currentSpaceID: string;
@@ -80,7 +85,15 @@ export declare class EquipmentService extends BaseObjectService {
80
85
  getPrefixDoc(type: TypeNote): any;
81
86
  uploadDocForAllEquipments(equipments: Equipment[], documentFile: File, type: TypeNote): Promise<any[]>;
82
87
  uploadDoc(equipment: Equipment, documentFile: File, type: TypeNote): Promise<Note>;
83
- deleteEquipment(equip: Equipment): Promise<Equipment>;
88
+ /**
89
+ * Deletes an equipment with what hangs on it: every one of its POIs (its tags in the visits), its
90
+ * notes and their files, its operations. Those go first: when one of them fails, the equipment is
91
+ * still there to be deleted again, instead of tags left pointing at an equipment that is gone.
92
+ * A request the API refuses for coming too fast is sent again a little later. justLoaded: the
93
+ * equipment comes from a list loaded just before, whose operations can be trusted, so none there
94
+ * means no request for them.
95
+ */
96
+ deleteEquipment(equip: Equipment, justLoaded?: boolean): Promise<Equipment>;
84
97
  updateEquipmentLocation(equip: Equipment, tagData: MattertagData): Promise<POI>;
85
98
  removeTicketFromEquipment(ticket: Ticket, equip: Equipment): Promise<Operation>;
86
99
  initEquips(): Promise<void>;
@@ -96,6 +109,8 @@ export declare class EquipmentService extends BaseObjectService {
96
109
  navigateToEquipmentIn3D(equipment: Equipment, forceSwitchVisit?: boolean): Promise<void>;
97
110
  updateEquipsForZone(): Promise<void>;
98
111
  updateDueToDelete(deletedEquipment: Equipment): void;
112
+ /** Keeps equipmentsUnfiltered up to date with an equipment created, changed or deleted. */
113
+ private updateUnfiltered;
99
114
  updateDueToCreate(createdEquip: Equipment): void;
100
115
  updateDueToEquipUpdated(updatedEquip: Equipment): void;
101
116
  initSubscriptions(): void;
@@ -29,6 +29,11 @@ export declare class FeatureService extends BaseObjectService {
29
29
  zone: Feature[];
30
30
  };
31
31
  featureTags: BehaviorSubject<Feature[]>;
32
+ /**
33
+ * The space's info points and desks the user sees, whatever featureDomainFilter and
34
+ * deskDomainFilter hide, for a filter to count them. Null until they are known.
35
+ */
36
+ featuresUnfiltered: BehaviorSubject<Feature[]>;
32
37
  featureFiltered: Feature[];
33
38
  updateDone: Subject<boolean>;
34
39
  zoneIDFilter: string;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Deletes one file of a visit's AI inventory, and nothing outside it.
3
+ *
4
+ * The inventory's only S3 delete. It lives here, out of the library's public API, rather than as a
5
+ * generic helper beside the other S3 functions, so that no other code picks it up for something
6
+ * else: it refuses any key outside `visits/<model3D>/inventory/`, and logs every deletion with the
7
+ * reason its caller gives. Rejects when the key is refused or the file could not be deleted.
8
+ */
9
+ export declare function removeInventoryFile(model3D: string, key: string, reason: string): Promise<void>;
@@ -70,6 +70,16 @@ export declare class InventoryService {
70
70
  checkFiles(model3D: string): Promise<InventoryFiles>;
71
71
  /** Whether the visit has all its inventory needs. */
72
72
  isComplete(files: InventoryFiles): boolean;
73
+ /**
74
+ * How many panoramas' detections each inventory of the visit kept in the bucket, by inventory
75
+ * (machine-learning: inventory_job.py); null when the bucket could not be read.
76
+ */
77
+ keptDetections(model3D: string): Promise<Record<string, number>>;
78
+ /**
79
+ * Deletes all the detections kept for the visit, going on past a file that fails, and says how
80
+ * many could not be deleted. The equipment placed from them stays.
81
+ */
82
+ discardDetections(model3D: string): Promise<number>;
73
83
  /** The latest inventory of each visit, the latest first. */
74
84
  latestOfEachVisit(runs: InventoryRun[]): InventoryRun[];
75
85
  isToRun(run: InventoryRun): boolean;
@@ -104,9 +114,11 @@ export declare class InventoryService {
104
114
  /**
105
115
  * Launches an inventory of each of the visits, unless one is already running in the space:
106
116
  * of all their panoramas, or of the one of `sweep` (the first 8 characters of its sweep, as
107
- * the panoramas are named) when it is given.
117
+ * the panoramas are named) when it is given. A visit given an inventory in `resumeFrom` starts
118
+ * from that one's detections: with all its panoramas analysed, only the placing is done again,
119
+ * with this cutoff.
108
120
  */
109
- launch(spaceID: string, nodeIDs: string[], model: InventoryModel, cutoffScore: number, sweep?: string): Promise<"LAUNCHED" | "ALREADY_RUNNING">;
121
+ launch(spaceID: string, nodeIDs: string[], model: InventoryModel, cutoffScore: number, sweep?: string, resumeFrom?: Record<string, string>): Promise<"LAUNCHED" | "ALREADY_RUNNING">;
110
122
  static ɵfac: i0.ɵɵFactoryDeclaration<InventoryService, never>;
111
123
  static ɵprov: i0.ɵɵInjectableDeclaration<InventoryService>;
112
124
  }
@@ -22,6 +22,8 @@ export declare class MeasurementService {
22
22
  zone: Measurement[];
23
23
  };
24
24
  measurementsTags: BehaviorSubject<Comment[]>;
25
+ /** The space's measurements the user sees, whatever measurementFilter hides, for a filter to count them. Null until known. */
26
+ measurementsUnfiltered: BehaviorSubject<Measurement[]>;
25
27
  measurementsUpdated: Subject<{
26
28
  space: Measurement[];
27
29
  zone: Measurement[];
@@ -8,11 +8,21 @@ export declare class OperationService {
8
8
  getOperationsByTicketID(id: string): Promise<Operation[]>;
9
9
  getOperationsByEquipmentID(id: string): Promise<Operation[]>;
10
10
  getTicketsByEquipmentID(id: string): Promise<Ticket[]>;
11
+ /** Whether a loaded equipment's list query shows it has no operation, none linked since. */
12
+ private loadedWithoutOperations;
11
13
  /** Tickets of a loaded equipment, without a request when its list query shows it has no operation. */
12
14
  getTicketsForEquipment(equip: {
13
15
  id?: string;
14
16
  operations?: any;
15
17
  }): Promise<Ticket[]>;
18
+ /**
19
+ * Deletes a loaded equipment's operations, without a request when its list query shows it has
20
+ * none: for an equipment loaded just before, as one loaded long ago may have some since.
21
+ */
22
+ deleteOperationsForLoadedEquipment(equip: {
23
+ id?: string;
24
+ operations?: any;
25
+ }): Promise<Operation[]>;
16
26
  deleteOperationsForEquipment(equipID: string): Promise<Operation[]>;
17
27
  deleteOperationsForTicket(ticketID: string): Promise<void>;
18
28
  deleteOperation(operationID: string): Promise<Operation>;
@@ -32,6 +32,8 @@ export declare class TicketsService extends BaseObjectService {
32
32
  space: Ticket[];
33
33
  };
34
34
  ticketTags: BehaviorSubject<Ticket[]>;
35
+ /** The space's tickets the user sees, whatever ticketTypeFilter hides, for a filter to count them. Null until known. */
36
+ ticketsUnfiltered: BehaviorSubject<Ticket[]>;
35
37
  ticketsFiltered: Ticket[];
36
38
  ticketsUpdated: Subject<{
37
39
  zone: Ticket[];
@@ -0,0 +1,5 @@
1
+ export declare function isThrottled(error: any): boolean;
2
+ /** How long to wait before each new try, give or take half, so that requests do not come back together. */
3
+ export declare const THROTTLED_WAITS_MS: number[];
4
+ /** Sends the request again, a little later each time, while the API refuses it for coming too fast. */
5
+ export declare function retryWhenThrottled<T>(request: () => Promise<T>, waitsMs?: number[]): Promise<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smarterplan/ngx-smarterplan-core",
3
- "version": "1.4.27",
3
+ "version": "1.4.29",
4
4
  "dependencies": {
5
5
  "tslib": "^2.5.0"
6
6
  },
package/public-api.d.ts CHANGED
@@ -61,6 +61,8 @@ export * from './lib/components/loader/loader.component';
61
61
  export * from './lib/components/splat-viewer/splat-viewer.component';
62
62
  export * from './lib/components/inventory-runs/inventory-runs.component';
63
63
  export * from './lib/components/inventory-runs/inventory-files.component';
64
+ export * from './lib/components/inventory-runs/inventory-launch.component';
65
+ export * from './lib/components/checkbox-slider/checkbox-slider.component';
64
66
  export * from './lib/components/support-modal/support-modal.component';
65
67
  export * from './lib/components/menu-bar/avatar/avatar.component';
66
68
  export * from './lib/pipes/duration-to-string.pipe';
@@ -1,11 +1,11 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>SmarterPlan splat converter</title>
6
- </head>
7
- <body>
8
- <!-- Opened unseen by the app's 3D models form, which hands it a splat file to turn into .sog. -->
9
- <script type="module" src="convert-AJMRDWU6.js"></script>
10
- </body>
11
- </html>
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>SmarterPlan splat converter</title>
6
+ </head>
7
+ <body>
8
+ <!-- Opened unseen by the app's 3D models form, which hands it a splat file to turn into .sog. -->
9
+ <script type="module" src="convert-AJMRDWU6.js"></script>
10
+ </body>
11
+ </html>