@smarterplan/ngx-smarterplan-core 1.4.29 → 1.4.30
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/README.md +24 -24
- package/esm2022/lib/components/checkbox-slider/checkbox-slider.component.mjs +3 -3
- package/esm2022/lib/components/csv-export/csv-export.component.mjs +3 -3
- package/esm2022/lib/components/inventory-runs/inventory-files.component.mjs +89 -89
- package/esm2022/lib/components/inventory-runs/inventory-launch.component.mjs +3 -3
- package/esm2022/lib/components/inventory-runs/inventory-runs.component.mjs +3 -3
- package/esm2022/lib/components/loader/loader.component.mjs +3 -3
- package/esm2022/lib/components/menu-bar/avatar/avatar.component.mjs +1 -1
- package/esm2022/lib/components/menu-bar/menu-bar.component.mjs +3 -3
- package/esm2022/lib/components/menu-bar/navigation-bar/navigation-bar.component.mjs +3 -3
- package/esm2022/lib/components/modal-switch-visit/modal-switch-visit.component.mjs +3 -3
- package/esm2022/lib/components/search-bar/search-bar.component.mjs +3 -3
- package/esm2022/lib/components/splat-viewer/splat-viewer.component.mjs +1 -1
- package/esm2022/lib/components/support-modal/support-modal.component.mjs +3 -3
- package/esm2022/lib/config.mjs +1 -1
- package/esm2022/lib/helpers.service.mjs +1 -1
- package/esm2022/lib/matterport-extensions/nest-thermostat/CanvasImage.mjs +1 -1
- package/esm2022/lib/matterport-extensions/nest-thermostat/CanvasRenderer.mjs +1 -1
- package/esm2022/lib/matterport-extensions/nest-thermostat/NestThermostat.mjs +1 -1
- package/esm2022/lib/matterport-extensions/nest-thermostat/PlaneRenderer.mjs +1 -1
- package/esm2022/lib/matterport-extensions/scene-component/SceneComponent.mjs +1 -1
- package/esm2022/lib/matterport-extensions/security-camera/SecurityCamera.mjs +22 -22
- package/esm2022/lib/matterport-extensions/tv-player/TvPlayer.mjs +1 -1
- package/esm2022/lib/matterport-extensions/view-frustum-mesh/ViewFrustumMesh.mjs +22 -22
- package/esm2022/lib/mattertagData.mjs +1 -1
- package/esm2022/lib/ngx-smarterplan-core.module.mjs +1 -1
- package/esm2022/lib/ngx-smarterplan-core.service.mjs +1 -1
- package/esm2022/lib/pipes/duration-to-string.pipe.mjs +1 -1
- package/esm2022/lib/pipes/format-date-number-to-digits.pipe.mjs +1 -1
- package/esm2022/lib/pipes/hashtag-from-id.pipe.mjs +1 -1
- package/esm2022/lib/pipes/safe-url.pipe.mjs +1 -1
- package/esm2022/lib/pipes/time-date-to-local-string.pipe.mjs +1 -1
- package/esm2022/lib/pipes/username-from-id.pipe.mjs +1 -1
- package/esm2022/lib/services/amplify-cache.service.mjs +1 -1
- package/esm2022/lib/services/base-tab.service.mjs +1 -1
- package/esm2022/lib/services/baseVisibility.service.mjs +1 -1
- package/esm2022/lib/services/content.service.mjs +1 -1
- package/esm2022/lib/services/filter.service.mjs +1 -1
- package/esm2022/lib/services/intervention.service.mjs +1 -1
- package/esm2022/lib/services/locale.service.mjs +1 -1
- package/esm2022/lib/services/matterport-import.service.mjs +1 -1
- package/esm2022/lib/services/matterport-measurement.service.mjs +1 -1
- package/esm2022/lib/services/matterport-navigation.service.mjs +1 -1
- package/esm2022/lib/services/matterport-object3d.service.mjs +1 -1
- package/esm2022/lib/services/matterport-pointer.service.mjs +6 -6
- package/esm2022/lib/services/matterport-tag-copy.service.mjs +930 -138
- package/esm2022/lib/services/matterport-tag.service.mjs +1 -1
- package/esm2022/lib/services/matterport.service.mjs +17 -17
- package/esm2022/lib/services/models/affectation.service.mjs +1 -1
- package/esm2022/lib/services/models/base-object.service.mjs +1 -1
- package/esm2022/lib/services/models/capture.service.mjs +1 -1
- package/esm2022/lib/services/models/comment.service.mjs +1 -1
- package/esm2022/lib/services/models/domain.service.mjs +1 -1
- package/esm2022/lib/services/models/equipment.service.mjs +1 -1
- package/esm2022/lib/services/models/event.service.mjs +1 -1
- package/esm2022/lib/services/models/feature.service.mjs +1 -1
- package/esm2022/lib/services/models/hashtag.service.mjs +1 -1
- package/esm2022/lib/services/models/inventory-storage.mjs +1 -1
- package/esm2022/lib/services/models/inventory.service.mjs +3 -3
- package/esm2022/lib/services/models/layer.service.mjs +1 -1
- package/esm2022/lib/services/models/measurement.service.mjs +1 -1
- package/esm2022/lib/services/models/mission.service.mjs +1 -1
- package/esm2022/lib/services/models/navigation.service.mjs +1 -1
- package/esm2022/lib/services/models/node.service.mjs +1 -1
- package/esm2022/lib/services/models/object3D.service.mjs +1 -1
- package/esm2022/lib/services/models/operation.service.mjs +1 -1
- package/esm2022/lib/services/models/organisation.service.mjs +1 -1
- package/esm2022/lib/services/models/plan.service.mjs +1 -1
- package/esm2022/lib/services/models/poi.service.mjs +27 -27
- package/esm2022/lib/services/models/profile.service.mjs +1 -1
- package/esm2022/lib/services/models/property.service.mjs +1 -1
- package/esm2022/lib/services/models/space.service.mjs +1 -1
- package/esm2022/lib/services/models/template.service.mjs +1 -1
- package/esm2022/lib/services/models/ticket.service.mjs +1 -1
- package/esm2022/lib/services/models/visit.service.mjs +1 -1
- package/esm2022/lib/services/models/zone.service.mjs +1 -1
- package/esm2022/lib/services/navigator.service.mjs +1 -1
- package/esm2022/lib/services/obj-to-glb.mjs +1 -1
- package/esm2022/lib/services/retry-when-throttled.mjs +1 -1
- package/esm2022/lib/services/s3.service.mjs +22 -5
- package/esm2022/lib/services/search.service.mjs +1 -1
- package/esm2022/lib/services/support.service.mjs +1 -1
- package/esm2022/lib/services/sweep-locator.service.mjs +1 -1
- package/esm2022/lib/services/tag.service.mjs +16 -16
- package/esm2022/lib/services/threejs-import.service.mjs +1 -1
- package/esm2022/lib/services/threejs.service.mjs +1 -1
- package/esm2022/lib/services/user.service.mjs +1 -1
- package/esm2022/lib/services/utils/matterport-framing.util.mjs +1 -1
- package/esm2022/lib/services/utils/matterport-transform.util.mjs +26 -1
- package/esm2022/lib/services/utils/object3d-model.util.mjs +155 -0
- package/esm2022/lib/services/utils/tag-archive.util.mjs +89 -0
- package/esm2022/lib/services/validators.service.mjs +1 -1
- package/esm2022/lib/services/viewer.service.mjs +1 -1
- package/esm2022/lib/services/zone-drawer.service.mjs +1 -1
- package/esm2022/lib/services/zoneChange.service.mjs +1 -1
- package/esm2022/lib/tokens/matterport-sdk-key.token.mjs +1 -1
- package/esm2022/lib/tokens/object3d-model-upload.token.mjs +14 -0
- package/esm2022/lib/types.service.mjs +1 -1
- package/esm2022/lib/validators/email.directive.mjs +1 -1
- package/esm2022/lib/validators/no-empty.directive.mjs +1 -1
- package/esm2022/lib/validators/number.directive.mjs +1 -1
- package/esm2022/lib/validators/text.directive.mjs +1 -1
- package/esm2022/public-api.mjs +4 -1
- package/fesm2022/smarterplan-ngx-smarterplan-core.mjs +1440 -354
- package/fesm2022/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/lib/services/matterport-tag-copy.service.d.ts +233 -13
- package/lib/services/s3.service.d.ts +15 -0
- package/lib/services/utils/matterport-transform.util.d.ts +14 -0
- package/lib/services/utils/object3d-model.util.d.ts +58 -0
- package/lib/services/utils/tag-archive.util.d.ts +97 -0
- package/lib/tokens/object3d-model-upload.token.d.ts +10 -0
- package/package.json +2 -1
- package/public-api.d.ts +3 -0
- package/src/assets/viewers/splat/convert.html +11 -11
- package/src/assets/viewers/splat/index.html +90 -90
- package/src/assets/viewers/splat/webp.wasm +0 -0
- package/src/assets/vs-app.json +67 -67
|
@@ -10,7 +10,7 @@ import * as i1 from '@angular/router';
|
|
|
10
10
|
import { RouterModule } from '@angular/router';
|
|
11
11
|
import { Subject, BehaviorSubject, takeUntil, Observable } from 'rxjs';
|
|
12
12
|
import * as THREE from 'three';
|
|
13
|
-
import { Matrix4, Vector3, Color, Object3D, Euler, PerspectiveCamera, CylinderBufferGeometry, BoxGeometry, MeshBasicMaterial, NormalBlending, BackSide, Mesh, EdgesGeometry, AdditiveBlending, ShaderMaterial, AnimationMixer, VectorKeyframeTrack, InterpolateSmooth, AnimationClip, LoopOnce, Group, PlaneBufferGeometry, CanvasTexture, Texture, LinearFilter, Box3, MathUtils } from 'three';
|
|
13
|
+
import { Matrix4, Vector3, Color, Object3D, Euler, PerspectiveCamera, CylinderBufferGeometry, BoxGeometry, MeshBasicMaterial, NormalBlending, BackSide, Mesh, EdgesGeometry, AdditiveBlending, ShaderMaterial, AnimationMixer, VectorKeyframeTrack, InterpolateSmooth, AnimationClip, LoopOnce, Group, PlaneBufferGeometry, CanvasTexture, Texture, LinearFilter, Box3, MathUtils, Quaternion } from 'three';
|
|
14
14
|
import * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';
|
|
15
15
|
import { Storage, Auth, API, graphqlOperation, Cache } from 'aws-amplify';
|
|
16
16
|
import { DateTime } from 'luxon';
|
|
@@ -47,6 +47,7 @@ import { Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
|
47
47
|
import checkIcon from '@iconify/icons-mdi/check';
|
|
48
48
|
import * as CryptoJS from 'crypto-js';
|
|
49
49
|
import { v4 } from 'uuid';
|
|
50
|
+
import { strToU8, zipSync, unzipSync, strFromU8 } from 'fflate';
|
|
50
51
|
|
|
51
52
|
class NgxSmarterplanCoreService {
|
|
52
53
|
constructor() { }
|
|
@@ -775,30 +776,30 @@ class SecurityCamera extends SceneComponent {
|
|
|
775
776
|
}
|
|
776
777
|
}
|
|
777
778
|
function vertexShader$1() {
|
|
778
|
-
return `
|
|
779
|
-
uniform mat4 lightMatrix;
|
|
780
|
-
|
|
781
|
-
varying vec4 vLightCoords;
|
|
782
|
-
|
|
783
|
-
void main() {
|
|
784
|
-
// create a UV region [0,1] x [0,1] to represent what the lightMatrix "sees"
|
|
785
|
-
vLightCoords = lightMatrix * modelMatrix * vec4(position, 1.0);
|
|
786
|
-
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
787
|
-
}
|
|
779
|
+
return `
|
|
780
|
+
uniform mat4 lightMatrix;
|
|
781
|
+
|
|
782
|
+
varying vec4 vLightCoords;
|
|
783
|
+
|
|
784
|
+
void main() {
|
|
785
|
+
// create a UV region [0,1] x [0,1] to represent what the lightMatrix "sees"
|
|
786
|
+
vLightCoords = lightMatrix * modelMatrix * vec4(position, 1.0);
|
|
787
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
788
|
+
}
|
|
788
789
|
`;
|
|
789
790
|
}
|
|
790
791
|
function fragmentShader$1() {
|
|
791
|
-
return `
|
|
792
|
-
uniform vec3 color;
|
|
793
|
-
|
|
794
|
-
varying vec4 vLightCoords;
|
|
795
|
-
|
|
796
|
-
void main() {
|
|
797
|
-
vec2 lightUV = vLightCoords.xy / vLightCoords.w;
|
|
798
|
-
float inView = float(max(lightUV.x, lightUV.y) <= 1.0 && min(lightUV.x, lightUV.y) >= 0.0 && vLightCoords.z > 0.0);
|
|
799
|
-
|
|
800
|
-
gl_FragColor = vec4(color, min(inView, 0.2));
|
|
801
|
-
}
|
|
792
|
+
return `
|
|
793
|
+
uniform vec3 color;
|
|
794
|
+
|
|
795
|
+
varying vec4 vLightCoords;
|
|
796
|
+
|
|
797
|
+
void main() {
|
|
798
|
+
vec2 lightUV = vLightCoords.xy / vLightCoords.w;
|
|
799
|
+
float inView = float(max(lightUV.x, lightUV.y) <= 1.0 && min(lightUV.x, lightUV.y) >= 0.0 && vLightCoords.z > 0.0);
|
|
800
|
+
|
|
801
|
+
gl_FragColor = vec4(color, min(inView, 0.2));
|
|
802
|
+
}
|
|
802
803
|
`;
|
|
803
804
|
}
|
|
804
805
|
function updateHighlightUniforms$1(projector, uniforms) {
|
|
@@ -991,30 +992,30 @@ class ViewFrustumMesh extends SceneComponent {
|
|
|
991
992
|
}
|
|
992
993
|
}
|
|
993
994
|
function vertexShader() {
|
|
994
|
-
return `
|
|
995
|
-
uniform mat4 lightMatrix;
|
|
996
|
-
|
|
997
|
-
varying vec4 vLightCoords;
|
|
998
|
-
|
|
999
|
-
void main() {
|
|
1000
|
-
// create a UV region [0,1] x [0,1] to represent what the lightMatrix "sees"
|
|
1001
|
-
vLightCoords = lightMatrix * modelMatrix * vec4(position, 1.0);
|
|
1002
|
-
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
1003
|
-
}
|
|
995
|
+
return `
|
|
996
|
+
uniform mat4 lightMatrix;
|
|
997
|
+
|
|
998
|
+
varying vec4 vLightCoords;
|
|
999
|
+
|
|
1000
|
+
void main() {
|
|
1001
|
+
// create a UV region [0,1] x [0,1] to represent what the lightMatrix "sees"
|
|
1002
|
+
vLightCoords = lightMatrix * modelMatrix * vec4(position, 1.0);
|
|
1003
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
1004
|
+
}
|
|
1004
1005
|
`;
|
|
1005
1006
|
}
|
|
1006
1007
|
function fragmentShader() {
|
|
1007
|
-
return `
|
|
1008
|
-
uniform vec3 color;
|
|
1009
|
-
|
|
1010
|
-
varying vec4 vLightCoords;
|
|
1011
|
-
|
|
1012
|
-
void main() {
|
|
1013
|
-
vec2 lightUV = vLightCoords.xy / vLightCoords.w;
|
|
1014
|
-
float inView = float(max(lightUV.x, lightUV.y) <= 1.0 && min(lightUV.x, lightUV.y) >= 0.0 && vLightCoords.z > 0.0);
|
|
1015
|
-
|
|
1016
|
-
gl_FragColor = vec4(color, min(inView, 0.2));
|
|
1017
|
-
}
|
|
1008
|
+
return `
|
|
1009
|
+
uniform vec3 color;
|
|
1010
|
+
|
|
1011
|
+
varying vec4 vLightCoords;
|
|
1012
|
+
|
|
1013
|
+
void main() {
|
|
1014
|
+
vec2 lightUV = vLightCoords.xy / vLightCoords.w;
|
|
1015
|
+
float inView = float(max(lightUV.x, lightUV.y) <= 1.0 && min(lightUV.x, lightUV.y) >= 0.0 && vLightCoords.z > 0.0);
|
|
1016
|
+
|
|
1017
|
+
gl_FragColor = vec4(color, min(inView, 0.2));
|
|
1018
|
+
}
|
|
1018
1019
|
`;
|
|
1019
1020
|
}
|
|
1020
1021
|
function updateHighlightUniforms(projector, uniforms) {
|
|
@@ -1248,17 +1249,34 @@ const copyFileInS3 = async (sourceKey, destKey) => {
|
|
|
1248
1249
|
* IMPORTANT: like copyFileInS3, this must NOT swallow errors.
|
|
1249
1250
|
*/
|
|
1250
1251
|
const copyFileInS3ViaDownload = async (sourceKey, destKey) => {
|
|
1251
|
-
const downloaded = await
|
|
1252
|
+
const downloaded = await downloadS3Object(sourceKey);
|
|
1253
|
+
return uploadS3Object(destKey, downloaded.body, downloaded.contentType);
|
|
1254
|
+
};
|
|
1255
|
+
/**
|
|
1256
|
+
* Downloads an S3 object (public level) as a Blob, with its content type.
|
|
1257
|
+
* Used by the tag export, which packs the files into an archive so they can be re-uploaded
|
|
1258
|
+
* on another environment (another bucket).
|
|
1259
|
+
* IMPORTANT: does NOT swallow errors — callers need NoSuchKey to tell a missing file apart.
|
|
1260
|
+
*/
|
|
1261
|
+
const downloadS3Object = async (key) => {
|
|
1262
|
+
const downloaded = await Storage.get(key, {
|
|
1252
1263
|
download: true,
|
|
1253
1264
|
level: "public",
|
|
1254
1265
|
});
|
|
1255
1266
|
const body = downloaded?.Body;
|
|
1256
1267
|
if (!body) {
|
|
1257
|
-
throw new Error(`Empty download for "${
|
|
1268
|
+
throw new Error(`Empty download for "${key}"`);
|
|
1258
1269
|
}
|
|
1259
|
-
|
|
1270
|
+
return { body, contentType: downloaded.ContentType || null };
|
|
1271
|
+
};
|
|
1272
|
+
/**
|
|
1273
|
+
* Uploads raw content (Blob or bytes) under an exact S3 key (public level) and returns that key.
|
|
1274
|
+
* IMPORTANT: does NOT swallow errors.
|
|
1275
|
+
*/
|
|
1276
|
+
const uploadS3Object = async (key, body, contentType = null) => {
|
|
1277
|
+
const result = await Storage.put(key, body, {
|
|
1260
1278
|
level: "public",
|
|
1261
|
-
contentType:
|
|
1279
|
+
contentType: contentType || undefined,
|
|
1262
1280
|
});
|
|
1263
1281
|
return result.key;
|
|
1264
1282
|
};
|
|
@@ -2242,32 +2260,32 @@ class PoiService {
|
|
|
2242
2260
|
if (!sweeps || sweeps.length === 0) {
|
|
2243
2261
|
return [];
|
|
2244
2262
|
}
|
|
2245
|
-
const queryStatement = `
|
|
2246
|
-
query ListPOISLight($filter: ModelPOIFilterInput, $limit: Int, $nextToken: String) {
|
|
2247
|
-
listPOIS(filter: $filter, limit: $limit, nextToken: $nextToken) {
|
|
2248
|
-
items {
|
|
2249
|
-
id
|
|
2250
|
-
coordinate
|
|
2251
|
-
specific
|
|
2252
|
-
private
|
|
2253
|
-
global
|
|
2254
|
-
type
|
|
2255
|
-
elementID
|
|
2256
|
-
level
|
|
2257
|
-
role
|
|
2258
|
-
category
|
|
2259
|
-
domainID
|
|
2260
|
-
metadata
|
|
2261
|
-
tagIcon
|
|
2262
|
-
tagDescription
|
|
2263
|
-
tagImageID
|
|
2264
|
-
matterportSweepID
|
|
2265
|
-
createdAt
|
|
2266
|
-
updatedAt
|
|
2267
|
-
}
|
|
2268
|
-
nextToken
|
|
2269
|
-
}
|
|
2270
|
-
}
|
|
2263
|
+
const queryStatement = `
|
|
2264
|
+
query ListPOISLight($filter: ModelPOIFilterInput, $limit: Int, $nextToken: String) {
|
|
2265
|
+
listPOIS(filter: $filter, limit: $limit, nextToken: $nextToken) {
|
|
2266
|
+
items {
|
|
2267
|
+
id
|
|
2268
|
+
coordinate
|
|
2269
|
+
specific
|
|
2270
|
+
private
|
|
2271
|
+
global
|
|
2272
|
+
type
|
|
2273
|
+
elementID
|
|
2274
|
+
level
|
|
2275
|
+
role
|
|
2276
|
+
category
|
|
2277
|
+
domainID
|
|
2278
|
+
metadata
|
|
2279
|
+
tagIcon
|
|
2280
|
+
tagDescription
|
|
2281
|
+
tagImageID
|
|
2282
|
+
matterportSweepID
|
|
2283
|
+
createdAt
|
|
2284
|
+
updatedAt
|
|
2285
|
+
}
|
|
2286
|
+
nextToken
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2271
2289
|
`;
|
|
2272
2290
|
const CHUNK_SIZE = 50; // safe margin for an "or" filter expression's practical size
|
|
2273
2291
|
const chunks = [];
|
|
@@ -3135,11 +3153,11 @@ class MatterportPointerService {
|
|
|
3135
3153
|
}
|
|
3136
3154
|
updateCursorDisplay(poseMatterport) {
|
|
3137
3155
|
if (this.textDisplayCursorPositionPanel && poseMatterport) {
|
|
3138
|
-
this.textDisplayCursorPositionPanel.innerHTML = `position:
|
|
3139
|
-
${pointToString(poseMatterport.position)}\n
|
|
3140
|
-
normal:
|
|
3141
|
-
${pointToString(poseMatterport.normal)}\n
|
|
3142
|
-
floorId:
|
|
3156
|
+
this.textDisplayCursorPositionPanel.innerHTML = `position:
|
|
3157
|
+
${pointToString(poseMatterport.position)}\n
|
|
3158
|
+
normal:
|
|
3159
|
+
${pointToString(poseMatterport.normal)}\n
|
|
3160
|
+
floorId:
|
|
3143
3161
|
${poseMatterport.floorId}`;
|
|
3144
3162
|
if (this.getCursorPositionButton) {
|
|
3145
3163
|
this.getCursorPositionButton.style.display = 'none';
|
|
@@ -5855,22 +5873,22 @@ class MatterportService {
|
|
|
5855
5873
|
);
|
|
5856
5874
|
}*/
|
|
5857
5875
|
addCustomCss() {
|
|
5858
|
-
const css = `
|
|
5859
|
-
.footer-ui,
|
|
5860
|
-
.showcase-footer,
|
|
5861
|
-
.mp-nova-btn-group,
|
|
5862
|
-
.footer-divider,
|
|
5863
|
-
.logo-link,
|
|
5864
|
-
.footer-logo,
|
|
5865
|
-
.bottom-ui,
|
|
5866
|
-
img.logo-image,
|
|
5867
|
-
img[class^="logo-image"],
|
|
5868
|
-
img[class*=" logo-image"],
|
|
5869
|
-
[data-testid="showcase-footer"] {
|
|
5870
|
-
opacity: 0 !important;
|
|
5871
|
-
visibility: hidden !important;
|
|
5872
|
-
pointer-events: none !important;
|
|
5873
|
-
}
|
|
5876
|
+
const css = `
|
|
5877
|
+
.footer-ui,
|
|
5878
|
+
.showcase-footer,
|
|
5879
|
+
.mp-nova-btn-group,
|
|
5880
|
+
.footer-divider,
|
|
5881
|
+
.logo-link,
|
|
5882
|
+
.footer-logo,
|
|
5883
|
+
.bottom-ui,
|
|
5884
|
+
img.logo-image,
|
|
5885
|
+
img[class^="logo-image"],
|
|
5886
|
+
img[class*=" logo-image"],
|
|
5887
|
+
[data-testid="showcase-footer"] {
|
|
5888
|
+
opacity: 0 !important;
|
|
5889
|
+
visibility: hidden !important;
|
|
5890
|
+
pointer-events: none !important;
|
|
5891
|
+
}
|
|
5874
5892
|
`;
|
|
5875
5893
|
// 1st method: Via Scene SDK
|
|
5876
5894
|
if (this.sdk?.Scene?.addStyle) {
|
|
@@ -11603,11 +11621,11 @@ class ModalSwitchVisitComponent {
|
|
|
11603
11621
|
});
|
|
11604
11622
|
}
|
|
11605
11623
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ModalSwitchVisitComponent, deps: [{ token: i1$2.NgbActiveModal }, { token: i1.Router }, { token: ViewerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11606
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ModalSwitchVisitComponent, selector: "lib-modal-switch-visit", inputs: { content: "content", model3D: "model3D", spaceID: "spaceID", dataToMove: "dataToMove" }, ngImport: i0, template: "<div class=\"modal-container\">\n <p>{{content}}</p>\n <button class=\"btn btn-outline-primary rounded-pill\" (click)=\"switchVisit()\">{{'Yes, switch visit' | translate }}</button>\n <button class=\"btn btn-outline-primary rounded-pill\"(click)=\"activeModal.close()\">{{'No, stay here' | translate }}</button>\n</div>\n", styles: [".modal-container{margin:10px}button{margin-right:8px}\n"], dependencies: [{ kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
11624
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ModalSwitchVisitComponent, selector: "lib-modal-switch-visit", inputs: { content: "content", model3D: "model3D", spaceID: "spaceID", dataToMove: "dataToMove" }, ngImport: i0, template: "<div class=\"modal-container\">\r\n <p>{{content}}</p>\r\n <button class=\"btn btn-outline-primary rounded-pill\" (click)=\"switchVisit()\">{{'Yes, switch visit' | translate }}</button>\r\n <button class=\"btn btn-outline-primary rounded-pill\"(click)=\"activeModal.close()\">{{'No, stay here' | translate }}</button>\r\n</div>\r\n", styles: [".modal-container{margin:10px}button{margin-right:8px}\n"], dependencies: [{ kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
11607
11625
|
}
|
|
11608
11626
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ModalSwitchVisitComponent, decorators: [{
|
|
11609
11627
|
type: Component,
|
|
11610
|
-
args: [{ selector: 'lib-modal-switch-visit', template: "<div class=\"modal-container\">\n <p>{{content}}</p>\n <button class=\"btn btn-outline-primary rounded-pill\" (click)=\"switchVisit()\">{{'Yes, switch visit' | translate }}</button>\n <button class=\"btn btn-outline-primary rounded-pill\"(click)=\"activeModal.close()\">{{'No, stay here' | translate }}</button>\n</div>\n", styles: [".modal-container{margin:10px}button{margin-right:8px}\n"] }]
|
|
11628
|
+
args: [{ selector: 'lib-modal-switch-visit', template: "<div class=\"modal-container\">\r\n <p>{{content}}</p>\r\n <button class=\"btn btn-outline-primary rounded-pill\" (click)=\"switchVisit()\">{{'Yes, switch visit' | translate }}</button>\r\n <button class=\"btn btn-outline-primary rounded-pill\"(click)=\"activeModal.close()\">{{'No, stay here' | translate }}</button>\r\n</div>\r\n", styles: [".modal-container{margin:10px}button{margin-right:8px}\n"] }]
|
|
11611
11629
|
}], ctorParameters: () => [{ type: i1$2.NgbActiveModal }, { type: i1.Router }, { type: ViewerService }], propDecorators: { content: [{
|
|
11612
11630
|
type: Input
|
|
11613
11631
|
}], model3D: [{
|
|
@@ -12228,11 +12246,11 @@ class CsvExportComponent {
|
|
|
12228
12246
|
link.remove();
|
|
12229
12247
|
}
|
|
12230
12248
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CsvExportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12231
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CsvExportComponent, selector: "lib-csv-export", inputs: { headers: "headers", rowsInput: "rowsInput", getRows: "getRows", title: "title", buttonLabel: "buttonLabel" }, ngImport: i0, template: "<span [style.cursor]=\"'pointer'\" (click)=\"onClickDownload()\" class=\"download-csv d-flex\">\n <span class=\"iconify\" [icIcon]=\"fileDownloadIcon\"></span>\n {{ buttonLabel | translate}}\n</span>\n", styles: [".download-csv{color:var(--smarterplan-primary)}\n"], dependencies: [{ kind: "directive", type: i1$3.IconDirective, selector: "ic-icon,[icIcon]", inputs: ["icIcon", "icon", "color", "inline", "box", "size", "width", "height", "align", "hFlip", "vFlip", "flip", "rotate"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
12249
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CsvExportComponent, selector: "lib-csv-export", inputs: { headers: "headers", rowsInput: "rowsInput", getRows: "getRows", title: "title", buttonLabel: "buttonLabel" }, ngImport: i0, template: "<span [style.cursor]=\"'pointer'\" (click)=\"onClickDownload()\" class=\"download-csv d-flex\">\r\n <span class=\"iconify\" [icIcon]=\"fileDownloadIcon\"></span>\r\n {{ buttonLabel | translate}}\r\n</span>\r\n", styles: [".download-csv{color:var(--smarterplan-primary)}\n"], dependencies: [{ kind: "directive", type: i1$3.IconDirective, selector: "ic-icon,[icIcon]", inputs: ["icIcon", "icon", "color", "inline", "box", "size", "width", "height", "align", "hFlip", "vFlip", "flip", "rotate"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
12232
12250
|
}
|
|
12233
12251
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CsvExportComponent, decorators: [{
|
|
12234
12252
|
type: Component,
|
|
12235
|
-
args: [{ selector: 'lib-csv-export', template: "<span [style.cursor]=\"'pointer'\" (click)=\"onClickDownload()\" class=\"download-csv d-flex\">\n <span class=\"iconify\" [icIcon]=\"fileDownloadIcon\"></span>\n {{ buttonLabel | translate}}\n</span>\n", styles: [".download-csv{color:var(--smarterplan-primary)}\n"] }]
|
|
12253
|
+
args: [{ selector: 'lib-csv-export', template: "<span [style.cursor]=\"'pointer'\" (click)=\"onClickDownload()\" class=\"download-csv d-flex\">\r\n <span class=\"iconify\" [icIcon]=\"fileDownloadIcon\"></span>\r\n {{ buttonLabel | translate}}\r\n</span>\r\n", styles: [".download-csv{color:var(--smarterplan-primary)}\n"] }]
|
|
12236
12254
|
}], propDecorators: { headers: [{
|
|
12237
12255
|
type: Input
|
|
12238
12256
|
}], rowsInput: [{
|
|
@@ -16538,11 +16556,11 @@ class SearchBarComponent {
|
|
|
16538
16556
|
this.searchEvent.emit(results);
|
|
16539
16557
|
}
|
|
16540
16558
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchBarComponent, deps: [{ token: SearchService }], target: i0.ɵɵFactoryTarget.Component });
|
|
16541
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchBarComponent, selector: "lib-search-bar", inputs: { searchable: "searchable", objectType: "objectType" }, outputs: { searchEvent: "searchEvent" }, ngImport: i0, template: "<div class=\"col-md-8 searchbar\">\n <div class=\"row depend\">\n <div class=\"col-md-5\">\n <input id=\"searchbar\" type=\"text\" class=\"form-control\" placeholder=\"keyword\" />\n </div>\n <div class=\"col-md-5\">\n <button class=\"btn btn-outline-primary rounded-pill\" (click)=\"onSubmit()\">{{ 'Search' |\n translate}}</button>\n </div>\n </div>\n</div>", styles: [".searchbar{margin-bottom:10px}\n"], dependencies: [{ kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
16559
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchBarComponent, selector: "lib-search-bar", inputs: { searchable: "searchable", objectType: "objectType" }, outputs: { searchEvent: "searchEvent" }, ngImport: i0, template: "<div class=\"col-md-8 searchbar\">\r\n <div class=\"row depend\">\r\n <div class=\"col-md-5\">\r\n <input id=\"searchbar\" type=\"text\" class=\"form-control\" placeholder=\"keyword\" />\r\n </div>\r\n <div class=\"col-md-5\">\r\n <button class=\"btn btn-outline-primary rounded-pill\" (click)=\"onSubmit()\">{{ 'Search' |\r\n translate}}</button>\r\n </div>\r\n </div>\r\n</div>", styles: [".searchbar{margin-bottom:10px}\n"], dependencies: [{ kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
16542
16560
|
}
|
|
16543
16561
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchBarComponent, decorators: [{
|
|
16544
16562
|
type: Component,
|
|
16545
|
-
args: [{ selector: 'lib-search-bar', template: "<div class=\"col-md-8 searchbar\">\n <div class=\"row depend\">\n <div class=\"col-md-5\">\n <input id=\"searchbar\" type=\"text\" class=\"form-control\" placeholder=\"keyword\" />\n </div>\n <div class=\"col-md-5\">\n <button class=\"btn btn-outline-primary rounded-pill\" (click)=\"onSubmit()\">{{ 'Search' |\n translate}}</button>\n </div>\n </div>\n</div>", styles: [".searchbar{margin-bottom:10px}\n"] }]
|
|
16563
|
+
args: [{ selector: 'lib-search-bar', template: "<div class=\"col-md-8 searchbar\">\r\n <div class=\"row depend\">\r\n <div class=\"col-md-5\">\r\n <input id=\"searchbar\" type=\"text\" class=\"form-control\" placeholder=\"keyword\" />\r\n </div>\r\n <div class=\"col-md-5\">\r\n <button class=\"btn btn-outline-primary rounded-pill\" (click)=\"onSubmit()\">{{ 'Search' |\r\n translate}}</button>\r\n </div>\r\n </div>\r\n</div>", styles: [".searchbar{margin-bottom:10px}\n"] }]
|
|
16546
16564
|
}], ctorParameters: () => [{ type: SearchService }], propDecorators: { searchable: [{
|
|
16547
16565
|
type: Input
|
|
16548
16566
|
}], objectType: [{
|
|
@@ -16990,11 +17008,11 @@ class LoaderComponent {
|
|
|
16990
17008
|
document.documentElement.style.setProperty('--color', this.color);
|
|
16991
17009
|
}
|
|
16992
17010
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16993
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: LoaderComponent, selector: "lib-loader", inputs: { useLogo: "useLogo", color: "color" }, ngImport: i0, template: "<div class=\"sk-fading-circle\">\n <img *ngIf=\"useLogo\" src=\"../../../../assets/icons/smarterplan.svg\">\n <div class=\"sk-circle1 sk-circle\"></div>\n <div class=\"sk-circle2 sk-circle\"></div>\n <div class=\"sk-circle3 sk-circle\"></div>\n <div class=\"sk-circle4 sk-circle\"></div>\n <div class=\"sk-circle5 sk-circle\"></div>\n <div class=\"sk-circle6 sk-circle\"></div>\n <div class=\"sk-circle7 sk-circle\"></div>\n <div class=\"sk-circle8 sk-circle\"></div>\n <div class=\"sk-circle9 sk-circle\"></div>\n <div class=\"sk-circle10 sk-circle\"></div>\n <div class=\"sk-circle11 sk-circle\"></div>\n <div class=\"sk-circle12 sk-circle\"></div>\n</div>\n", styles: [".sk-fading-circle{width:88px;height:88px;position:relative}.sk-fading-circle img{width:2rem;position:absolute;left:calc(50% - 16px);top:calc(50% - 16px)}.sk-fading-circle .sk-circle{width:100%;height:100%;position:absolute;left:0;top:0}.sk-fading-circle .sk-circle:before{content:\"\";display:block;margin:0 auto;width:15%;height:15%;background-color:var(--color);border-radius:100%;-webkit-animation:sk-circleFadeDelay 1.2s infinite ease-in-out both;animation:sk-circleFadeDelay 1.2s infinite ease-in-out both}.sk-fading-circle .sk-circle2{-webkit-transform:rotate(30deg);-ms-transform:rotate(30deg);transform:rotate(30deg)}.sk-fading-circle .sk-circle3{-webkit-transform:rotate(60deg);-ms-transform:rotate(60deg);transform:rotate(60deg)}.sk-fading-circle .sk-circle4{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.sk-fading-circle .sk-circle5{-webkit-transform:rotate(120deg);-ms-transform:rotate(120deg);transform:rotate(120deg)}.sk-fading-circle .sk-circle6{-webkit-transform:rotate(150deg);-ms-transform:rotate(150deg);transform:rotate(150deg)}.sk-fading-circle .sk-circle7{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.sk-fading-circle .sk-circle8{-webkit-transform:rotate(210deg);-ms-transform:rotate(210deg);transform:rotate(210deg)}.sk-fading-circle .sk-circle9{-webkit-transform:rotate(240deg);-ms-transform:rotate(240deg);transform:rotate(240deg)}.sk-fading-circle .sk-circle10{-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.sk-fading-circle .sk-circle11{-webkit-transform:rotate(300deg);-ms-transform:rotate(300deg);transform:rotate(300deg)}.sk-fading-circle .sk-circle12{-webkit-transform:rotate(330deg);-ms-transform:rotate(330deg);transform:rotate(330deg)}.sk-fading-circle .sk-circle2:before{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.sk-fading-circle .sk-circle3:before{-webkit-animation-delay:-1s;animation-delay:-1s}.sk-fading-circle .sk-circle4:before{-webkit-animation-delay:-.9s;animation-delay:-.9s}.sk-fading-circle .sk-circle5:before{-webkit-animation-delay:-.8s;animation-delay:-.8s}.sk-fading-circle .sk-circle6:before{-webkit-animation-delay:-.7s;animation-delay:-.7s}.sk-fading-circle .sk-circle7:before{-webkit-animation-delay:-.6s;animation-delay:-.6s}.sk-fading-circle .sk-circle8:before{-webkit-animation-delay:-.5s;animation-delay:-.5s}.sk-fading-circle .sk-circle9:before{-webkit-animation-delay:-.4s;animation-delay:-.4s}.sk-fading-circle .sk-circle10:before{-webkit-animation-delay:-.3s;animation-delay:-.3s}.sk-fading-circle .sk-circle11:before{-webkit-animation-delay:-.2s;animation-delay:-.2s}.sk-fading-circle .sk-circle12:before{-webkit-animation-delay:-.1s;animation-delay:-.1s}@-webkit-keyframes sk-circleFadeDelay{0%,39%,to{opacity:0}40%{opacity:1}}@keyframes sk-circleFadeDelay{0%,39%,to{opacity:0}40%{opacity:1}}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
17011
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: LoaderComponent, selector: "lib-loader", inputs: { useLogo: "useLogo", color: "color" }, ngImport: i0, template: "<div class=\"sk-fading-circle\">\r\n <img *ngIf=\"useLogo\" src=\"../../../../assets/icons/smarterplan.svg\">\r\n <div class=\"sk-circle1 sk-circle\"></div>\r\n <div class=\"sk-circle2 sk-circle\"></div>\r\n <div class=\"sk-circle3 sk-circle\"></div>\r\n <div class=\"sk-circle4 sk-circle\"></div>\r\n <div class=\"sk-circle5 sk-circle\"></div>\r\n <div class=\"sk-circle6 sk-circle\"></div>\r\n <div class=\"sk-circle7 sk-circle\"></div>\r\n <div class=\"sk-circle8 sk-circle\"></div>\r\n <div class=\"sk-circle9 sk-circle\"></div>\r\n <div class=\"sk-circle10 sk-circle\"></div>\r\n <div class=\"sk-circle11 sk-circle\"></div>\r\n <div class=\"sk-circle12 sk-circle\"></div>\r\n</div>\r\n", styles: [".sk-fading-circle{width:88px;height:88px;position:relative}.sk-fading-circle img{width:2rem;position:absolute;left:calc(50% - 16px);top:calc(50% - 16px)}.sk-fading-circle .sk-circle{width:100%;height:100%;position:absolute;left:0;top:0}.sk-fading-circle .sk-circle:before{content:\"\";display:block;margin:0 auto;width:15%;height:15%;background-color:var(--color);border-radius:100%;-webkit-animation:sk-circleFadeDelay 1.2s infinite ease-in-out both;animation:sk-circleFadeDelay 1.2s infinite ease-in-out both}.sk-fading-circle .sk-circle2{-webkit-transform:rotate(30deg);-ms-transform:rotate(30deg);transform:rotate(30deg)}.sk-fading-circle .sk-circle3{-webkit-transform:rotate(60deg);-ms-transform:rotate(60deg);transform:rotate(60deg)}.sk-fading-circle .sk-circle4{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.sk-fading-circle .sk-circle5{-webkit-transform:rotate(120deg);-ms-transform:rotate(120deg);transform:rotate(120deg)}.sk-fading-circle .sk-circle6{-webkit-transform:rotate(150deg);-ms-transform:rotate(150deg);transform:rotate(150deg)}.sk-fading-circle .sk-circle7{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.sk-fading-circle .sk-circle8{-webkit-transform:rotate(210deg);-ms-transform:rotate(210deg);transform:rotate(210deg)}.sk-fading-circle .sk-circle9{-webkit-transform:rotate(240deg);-ms-transform:rotate(240deg);transform:rotate(240deg)}.sk-fading-circle .sk-circle10{-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.sk-fading-circle .sk-circle11{-webkit-transform:rotate(300deg);-ms-transform:rotate(300deg);transform:rotate(300deg)}.sk-fading-circle .sk-circle12{-webkit-transform:rotate(330deg);-ms-transform:rotate(330deg);transform:rotate(330deg)}.sk-fading-circle .sk-circle2:before{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.sk-fading-circle .sk-circle3:before{-webkit-animation-delay:-1s;animation-delay:-1s}.sk-fading-circle .sk-circle4:before{-webkit-animation-delay:-.9s;animation-delay:-.9s}.sk-fading-circle .sk-circle5:before{-webkit-animation-delay:-.8s;animation-delay:-.8s}.sk-fading-circle .sk-circle6:before{-webkit-animation-delay:-.7s;animation-delay:-.7s}.sk-fading-circle .sk-circle7:before{-webkit-animation-delay:-.6s;animation-delay:-.6s}.sk-fading-circle .sk-circle8:before{-webkit-animation-delay:-.5s;animation-delay:-.5s}.sk-fading-circle .sk-circle9:before{-webkit-animation-delay:-.4s;animation-delay:-.4s}.sk-fading-circle .sk-circle10:before{-webkit-animation-delay:-.3s;animation-delay:-.3s}.sk-fading-circle .sk-circle11:before{-webkit-animation-delay:-.2s;animation-delay:-.2s}.sk-fading-circle .sk-circle12:before{-webkit-animation-delay:-.1s;animation-delay:-.1s}@-webkit-keyframes sk-circleFadeDelay{0%,39%,to{opacity:0}40%{opacity:1}}@keyframes sk-circleFadeDelay{0%,39%,to{opacity:0}40%{opacity:1}}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
16994
17012
|
}
|
|
16995
17013
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LoaderComponent, decorators: [{
|
|
16996
17014
|
type: Component,
|
|
16997
|
-
args: [{ selector: 'lib-loader', template: "<div class=\"sk-fading-circle\">\n <img *ngIf=\"useLogo\" src=\"../../../../assets/icons/smarterplan.svg\">\n <div class=\"sk-circle1 sk-circle\"></div>\n <div class=\"sk-circle2 sk-circle\"></div>\n <div class=\"sk-circle3 sk-circle\"></div>\n <div class=\"sk-circle4 sk-circle\"></div>\n <div class=\"sk-circle5 sk-circle\"></div>\n <div class=\"sk-circle6 sk-circle\"></div>\n <div class=\"sk-circle7 sk-circle\"></div>\n <div class=\"sk-circle8 sk-circle\"></div>\n <div class=\"sk-circle9 sk-circle\"></div>\n <div class=\"sk-circle10 sk-circle\"></div>\n <div class=\"sk-circle11 sk-circle\"></div>\n <div class=\"sk-circle12 sk-circle\"></div>\n</div>\n", styles: [".sk-fading-circle{width:88px;height:88px;position:relative}.sk-fading-circle img{width:2rem;position:absolute;left:calc(50% - 16px);top:calc(50% - 16px)}.sk-fading-circle .sk-circle{width:100%;height:100%;position:absolute;left:0;top:0}.sk-fading-circle .sk-circle:before{content:\"\";display:block;margin:0 auto;width:15%;height:15%;background-color:var(--color);border-radius:100%;-webkit-animation:sk-circleFadeDelay 1.2s infinite ease-in-out both;animation:sk-circleFadeDelay 1.2s infinite ease-in-out both}.sk-fading-circle .sk-circle2{-webkit-transform:rotate(30deg);-ms-transform:rotate(30deg);transform:rotate(30deg)}.sk-fading-circle .sk-circle3{-webkit-transform:rotate(60deg);-ms-transform:rotate(60deg);transform:rotate(60deg)}.sk-fading-circle .sk-circle4{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.sk-fading-circle .sk-circle5{-webkit-transform:rotate(120deg);-ms-transform:rotate(120deg);transform:rotate(120deg)}.sk-fading-circle .sk-circle6{-webkit-transform:rotate(150deg);-ms-transform:rotate(150deg);transform:rotate(150deg)}.sk-fading-circle .sk-circle7{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.sk-fading-circle .sk-circle8{-webkit-transform:rotate(210deg);-ms-transform:rotate(210deg);transform:rotate(210deg)}.sk-fading-circle .sk-circle9{-webkit-transform:rotate(240deg);-ms-transform:rotate(240deg);transform:rotate(240deg)}.sk-fading-circle .sk-circle10{-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.sk-fading-circle .sk-circle11{-webkit-transform:rotate(300deg);-ms-transform:rotate(300deg);transform:rotate(300deg)}.sk-fading-circle .sk-circle12{-webkit-transform:rotate(330deg);-ms-transform:rotate(330deg);transform:rotate(330deg)}.sk-fading-circle .sk-circle2:before{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.sk-fading-circle .sk-circle3:before{-webkit-animation-delay:-1s;animation-delay:-1s}.sk-fading-circle .sk-circle4:before{-webkit-animation-delay:-.9s;animation-delay:-.9s}.sk-fading-circle .sk-circle5:before{-webkit-animation-delay:-.8s;animation-delay:-.8s}.sk-fading-circle .sk-circle6:before{-webkit-animation-delay:-.7s;animation-delay:-.7s}.sk-fading-circle .sk-circle7:before{-webkit-animation-delay:-.6s;animation-delay:-.6s}.sk-fading-circle .sk-circle8:before{-webkit-animation-delay:-.5s;animation-delay:-.5s}.sk-fading-circle .sk-circle9:before{-webkit-animation-delay:-.4s;animation-delay:-.4s}.sk-fading-circle .sk-circle10:before{-webkit-animation-delay:-.3s;animation-delay:-.3s}.sk-fading-circle .sk-circle11:before{-webkit-animation-delay:-.2s;animation-delay:-.2s}.sk-fading-circle .sk-circle12:before{-webkit-animation-delay:-.1s;animation-delay:-.1s}@-webkit-keyframes sk-circleFadeDelay{0%,39%,to{opacity:0}40%{opacity:1}}@keyframes sk-circleFadeDelay{0%,39%,to{opacity:0}40%{opacity:1}}\n"] }]
|
|
17015
|
+
args: [{ selector: 'lib-loader', template: "<div class=\"sk-fading-circle\">\r\n <img *ngIf=\"useLogo\" src=\"../../../../assets/icons/smarterplan.svg\">\r\n <div class=\"sk-circle1 sk-circle\"></div>\r\n <div class=\"sk-circle2 sk-circle\"></div>\r\n <div class=\"sk-circle3 sk-circle\"></div>\r\n <div class=\"sk-circle4 sk-circle\"></div>\r\n <div class=\"sk-circle5 sk-circle\"></div>\r\n <div class=\"sk-circle6 sk-circle\"></div>\r\n <div class=\"sk-circle7 sk-circle\"></div>\r\n <div class=\"sk-circle8 sk-circle\"></div>\r\n <div class=\"sk-circle9 sk-circle\"></div>\r\n <div class=\"sk-circle10 sk-circle\"></div>\r\n <div class=\"sk-circle11 sk-circle\"></div>\r\n <div class=\"sk-circle12 sk-circle\"></div>\r\n</div>\r\n", styles: [".sk-fading-circle{width:88px;height:88px;position:relative}.sk-fading-circle img{width:2rem;position:absolute;left:calc(50% - 16px);top:calc(50% - 16px)}.sk-fading-circle .sk-circle{width:100%;height:100%;position:absolute;left:0;top:0}.sk-fading-circle .sk-circle:before{content:\"\";display:block;margin:0 auto;width:15%;height:15%;background-color:var(--color);border-radius:100%;-webkit-animation:sk-circleFadeDelay 1.2s infinite ease-in-out both;animation:sk-circleFadeDelay 1.2s infinite ease-in-out both}.sk-fading-circle .sk-circle2{-webkit-transform:rotate(30deg);-ms-transform:rotate(30deg);transform:rotate(30deg)}.sk-fading-circle .sk-circle3{-webkit-transform:rotate(60deg);-ms-transform:rotate(60deg);transform:rotate(60deg)}.sk-fading-circle .sk-circle4{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.sk-fading-circle .sk-circle5{-webkit-transform:rotate(120deg);-ms-transform:rotate(120deg);transform:rotate(120deg)}.sk-fading-circle .sk-circle6{-webkit-transform:rotate(150deg);-ms-transform:rotate(150deg);transform:rotate(150deg)}.sk-fading-circle .sk-circle7{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.sk-fading-circle .sk-circle8{-webkit-transform:rotate(210deg);-ms-transform:rotate(210deg);transform:rotate(210deg)}.sk-fading-circle .sk-circle9{-webkit-transform:rotate(240deg);-ms-transform:rotate(240deg);transform:rotate(240deg)}.sk-fading-circle .sk-circle10{-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.sk-fading-circle .sk-circle11{-webkit-transform:rotate(300deg);-ms-transform:rotate(300deg);transform:rotate(300deg)}.sk-fading-circle .sk-circle12{-webkit-transform:rotate(330deg);-ms-transform:rotate(330deg);transform:rotate(330deg)}.sk-fading-circle .sk-circle2:before{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.sk-fading-circle .sk-circle3:before{-webkit-animation-delay:-1s;animation-delay:-1s}.sk-fading-circle .sk-circle4:before{-webkit-animation-delay:-.9s;animation-delay:-.9s}.sk-fading-circle .sk-circle5:before{-webkit-animation-delay:-.8s;animation-delay:-.8s}.sk-fading-circle .sk-circle6:before{-webkit-animation-delay:-.7s;animation-delay:-.7s}.sk-fading-circle .sk-circle7:before{-webkit-animation-delay:-.6s;animation-delay:-.6s}.sk-fading-circle .sk-circle8:before{-webkit-animation-delay:-.5s;animation-delay:-.5s}.sk-fading-circle .sk-circle9:before{-webkit-animation-delay:-.4s;animation-delay:-.4s}.sk-fading-circle .sk-circle10:before{-webkit-animation-delay:-.3s;animation-delay:-.3s}.sk-fading-circle .sk-circle11:before{-webkit-animation-delay:-.2s;animation-delay:-.2s}.sk-fading-circle .sk-circle12:before{-webkit-animation-delay:-.1s;animation-delay:-.1s}@-webkit-keyframes sk-circleFadeDelay{0%,39%,to{opacity:0}40%{opacity:1}}@keyframes sk-circleFadeDelay{0%,39%,to{opacity:0}40%{opacity:1}}\n"] }]
|
|
16998
17016
|
}], ctorParameters: () => [], propDecorators: { useLogo: [{
|
|
16999
17017
|
type: Input
|
|
17000
17018
|
}], color: [{
|
|
@@ -17052,11 +17070,11 @@ class SupportModalComponent {
|
|
|
17052
17070
|
}
|
|
17053
17071
|
}
|
|
17054
17072
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SupportModalComponent, deps: [{ token: SupportService }, { token: i1$2.NgbActiveModal }, { token: i3.UntypedFormBuilder }, { token: BaseUserService }, { token: ValidatorsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
17055
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SupportModalComponent, selector: "app-support-modal", ngImport: i0, template: "<div class=\"modal-header\">\n <h5 class=\"modal-title\" translate=\"Help\"></h5>\n</div>\n<div class=\"modal-body\">\n <div class=\"support-loader-container\">\n <lib-loader *ngIf=\"loading\"></lib-loader>\n </div>\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"supportForm\" style=\"margin-top:1rem;\" *ngIf=\"!loading && status==='new'\">\n <div>\n <label>{{'Title' | translate}} *</label>\n <div>\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" data-testid=\"new-support-title\"\n [ngClass]=\"{'is-invalid' : validatorsService.isControlError(supportForm.controls['title'])}\"\n maxlength=\"255\">\n </div>\n <div class=\"invalid-feedback\">\n <span data-testid=\"new-support-title-invalid\" [translate]=\"validatorsService.getError(supportForm.controls['title'])\"\n *ngIf=\" validatorsService.isControlError(supportForm.controls['title'])\"></span>\n </div>\n </div>\n <div *ngIf=\"!currentUser\">\n <label>{{'Email' | translate}} *</label>\n <div>\n <input type=\"email\" class=\"form-control\" formControlName=\"email\" data-testid=\"new-support-email\"\n [ngClass]=\"{'is-invalid' : validatorsService.isControlError(supportForm.controls['email'])}\"\n maxlength=\"255\">\n </div>\n <div class=\"invalid-feedback\">\n <span data-testid=\"new-support-email-invalid\" [translate]=\"validatorsService.getError(supportForm.controls['email'])\"\n *ngIf=\" validatorsService.isControlError(supportForm.controls['email'])\"></span>\n </div>\n </div>\n <div>\n <label>{{'Description' | translate}} *</label>\n <div>\n <textarea formControlName=\"description\" class=\"form-control\"\n data-testid=\"new-support-description\"\n [ngClass]=\"{'is-invalid' : validatorsService.isControlError(supportForm.controls['description'])}\"></textarea>\n </div>\n <div class=\"invalid-feedback\" >\n <span data-testid=\"new-support-description-invalid\" [translate]=\" validatorsService.getError(supportForm.controls['description'])\"\n *ngIf=\"validatorsService.isControlError(supportForm.controls['description'])\"></span>\n </div>\n </div>\n </form>\n\n <div *ngIf=\"status ==='send'\" translate=\"Your request has been registered\" data-testid=\"new-support-send-info\">\n </div>\n <div *ngIf=\"status ==='error'\" translate=\"An error has occurred, please renew your request\"\n data-testid=\"new-support-error-info\">\n\n </div>\n</div>\n<div class=\"modal-footer\">\n <button type=\"button\" class=\"btn rounded-pill btn-museum\" data-dismiss=\"modal\" translate=\"Close\" (click)=\"onClose()\"\n data-testid=\"new-support-close-btn\"></button>\n <button *ngIf=\"!loading && status==='new'\" type=\"button\" class=\"btn rounded-pill btn-museum\" translate=\"Submit\"\n (click)=\"onSubmit()\" [disabled]=\"!supportForm.valid\" data-testid=\"new-support-submit-btn\"></button>\n</div>", styles: [".support-loader-container{width:88px;margin:auto}.invalid-feedback{height:16px}\n"], dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: LoaderComponent, selector: "lib-loader", inputs: ["useLogo", "color"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
17073
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SupportModalComponent, selector: "app-support-modal", ngImport: i0, template: "<div class=\"modal-header\">\r\n <h5 class=\"modal-title\" translate=\"Help\"></h5>\r\n</div>\r\n<div class=\"modal-body\">\r\n <div class=\"support-loader-container\">\r\n <lib-loader *ngIf=\"loading\"></lib-loader>\r\n </div>\r\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"supportForm\" style=\"margin-top:1rem;\" *ngIf=\"!loading && status==='new'\">\r\n <div>\r\n <label>{{'Title' | translate}} *</label>\r\n <div>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" data-testid=\"new-support-title\"\r\n [ngClass]=\"{'is-invalid' : validatorsService.isControlError(supportForm.controls['title'])}\"\r\n maxlength=\"255\">\r\n </div>\r\n <div class=\"invalid-feedback\">\r\n <span data-testid=\"new-support-title-invalid\" [translate]=\"validatorsService.getError(supportForm.controls['title'])\"\r\n *ngIf=\" validatorsService.isControlError(supportForm.controls['title'])\"></span>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!currentUser\">\r\n <label>{{'Email' | translate}} *</label>\r\n <div>\r\n <input type=\"email\" class=\"form-control\" formControlName=\"email\" data-testid=\"new-support-email\"\r\n [ngClass]=\"{'is-invalid' : validatorsService.isControlError(supportForm.controls['email'])}\"\r\n maxlength=\"255\">\r\n </div>\r\n <div class=\"invalid-feedback\">\r\n <span data-testid=\"new-support-email-invalid\" [translate]=\"validatorsService.getError(supportForm.controls['email'])\"\r\n *ngIf=\" validatorsService.isControlError(supportForm.controls['email'])\"></span>\r\n </div>\r\n </div>\r\n <div>\r\n <label>{{'Description' | translate}} *</label>\r\n <div>\r\n <textarea formControlName=\"description\" class=\"form-control\"\r\n data-testid=\"new-support-description\"\r\n [ngClass]=\"{'is-invalid' : validatorsService.isControlError(supportForm.controls['description'])}\"></textarea>\r\n </div>\r\n <div class=\"invalid-feedback\" >\r\n <span data-testid=\"new-support-description-invalid\" [translate]=\" validatorsService.getError(supportForm.controls['description'])\"\r\n *ngIf=\"validatorsService.isControlError(supportForm.controls['description'])\"></span>\r\n </div>\r\n </div>\r\n </form>\r\n\r\n <div *ngIf=\"status ==='send'\" translate=\"Your request has been registered\" data-testid=\"new-support-send-info\">\r\n </div>\r\n <div *ngIf=\"status ==='error'\" translate=\"An error has occurred, please renew your request\"\r\n data-testid=\"new-support-error-info\">\r\n\r\n </div>\r\n</div>\r\n<div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn rounded-pill btn-museum\" data-dismiss=\"modal\" translate=\"Close\" (click)=\"onClose()\"\r\n data-testid=\"new-support-close-btn\"></button>\r\n <button *ngIf=\"!loading && status==='new'\" type=\"button\" class=\"btn rounded-pill btn-museum\" translate=\"Submit\"\r\n (click)=\"onSubmit()\" [disabled]=\"!supportForm.valid\" data-testid=\"new-support-submit-btn\"></button>\r\n</div>", styles: [".support-loader-container{width:88px;margin:auto}.invalid-feedback{height:16px}\n"], dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: LoaderComponent, selector: "lib-loader", inputs: ["useLogo", "color"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
17056
17074
|
}
|
|
17057
17075
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SupportModalComponent, decorators: [{
|
|
17058
17076
|
type: Component,
|
|
17059
|
-
args: [{ selector: 'app-support-modal', template: "<div class=\"modal-header\">\n <h5 class=\"modal-title\" translate=\"Help\"></h5>\n</div>\n<div class=\"modal-body\">\n <div class=\"support-loader-container\">\n <lib-loader *ngIf=\"loading\"></lib-loader>\n </div>\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"supportForm\" style=\"margin-top:1rem;\" *ngIf=\"!loading && status==='new'\">\n <div>\n <label>{{'Title' | translate}} *</label>\n <div>\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" data-testid=\"new-support-title\"\n [ngClass]=\"{'is-invalid' : validatorsService.isControlError(supportForm.controls['title'])}\"\n maxlength=\"255\">\n </div>\n <div class=\"invalid-feedback\">\n <span data-testid=\"new-support-title-invalid\" [translate]=\"validatorsService.getError(supportForm.controls['title'])\"\n *ngIf=\" validatorsService.isControlError(supportForm.controls['title'])\"></span>\n </div>\n </div>\n <div *ngIf=\"!currentUser\">\n <label>{{'Email' | translate}} *</label>\n <div>\n <input type=\"email\" class=\"form-control\" formControlName=\"email\" data-testid=\"new-support-email\"\n [ngClass]=\"{'is-invalid' : validatorsService.isControlError(supportForm.controls['email'])}\"\n maxlength=\"255\">\n </div>\n <div class=\"invalid-feedback\">\n <span data-testid=\"new-support-email-invalid\" [translate]=\"validatorsService.getError(supportForm.controls['email'])\"\n *ngIf=\" validatorsService.isControlError(supportForm.controls['email'])\"></span>\n </div>\n </div>\n <div>\n <label>{{'Description' | translate}} *</label>\n <div>\n <textarea formControlName=\"description\" class=\"form-control\"\n data-testid=\"new-support-description\"\n [ngClass]=\"{'is-invalid' : validatorsService.isControlError(supportForm.controls['description'])}\"></textarea>\n </div>\n <div class=\"invalid-feedback\" >\n <span data-testid=\"new-support-description-invalid\" [translate]=\" validatorsService.getError(supportForm.controls['description'])\"\n *ngIf=\"validatorsService.isControlError(supportForm.controls['description'])\"></span>\n </div>\n </div>\n </form>\n\n <div *ngIf=\"status ==='send'\" translate=\"Your request has been registered\" data-testid=\"new-support-send-info\">\n </div>\n <div *ngIf=\"status ==='error'\" translate=\"An error has occurred, please renew your request\"\n data-testid=\"new-support-error-info\">\n\n </div>\n</div>\n<div class=\"modal-footer\">\n <button type=\"button\" class=\"btn rounded-pill btn-museum\" data-dismiss=\"modal\" translate=\"Close\" (click)=\"onClose()\"\n data-testid=\"new-support-close-btn\"></button>\n <button *ngIf=\"!loading && status==='new'\" type=\"button\" class=\"btn rounded-pill btn-museum\" translate=\"Submit\"\n (click)=\"onSubmit()\" [disabled]=\"!supportForm.valid\" data-testid=\"new-support-submit-btn\"></button>\n</div>", styles: [".support-loader-container{width:88px;margin:auto}.invalid-feedback{height:16px}\n"] }]
|
|
17077
|
+
args: [{ selector: 'app-support-modal', template: "<div class=\"modal-header\">\r\n <h5 class=\"modal-title\" translate=\"Help\"></h5>\r\n</div>\r\n<div class=\"modal-body\">\r\n <div class=\"support-loader-container\">\r\n <lib-loader *ngIf=\"loading\"></lib-loader>\r\n </div>\r\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"supportForm\" style=\"margin-top:1rem;\" *ngIf=\"!loading && status==='new'\">\r\n <div>\r\n <label>{{'Title' | translate}} *</label>\r\n <div>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" data-testid=\"new-support-title\"\r\n [ngClass]=\"{'is-invalid' : validatorsService.isControlError(supportForm.controls['title'])}\"\r\n maxlength=\"255\">\r\n </div>\r\n <div class=\"invalid-feedback\">\r\n <span data-testid=\"new-support-title-invalid\" [translate]=\"validatorsService.getError(supportForm.controls['title'])\"\r\n *ngIf=\" validatorsService.isControlError(supportForm.controls['title'])\"></span>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!currentUser\">\r\n <label>{{'Email' | translate}} *</label>\r\n <div>\r\n <input type=\"email\" class=\"form-control\" formControlName=\"email\" data-testid=\"new-support-email\"\r\n [ngClass]=\"{'is-invalid' : validatorsService.isControlError(supportForm.controls['email'])}\"\r\n maxlength=\"255\">\r\n </div>\r\n <div class=\"invalid-feedback\">\r\n <span data-testid=\"new-support-email-invalid\" [translate]=\"validatorsService.getError(supportForm.controls['email'])\"\r\n *ngIf=\" validatorsService.isControlError(supportForm.controls['email'])\"></span>\r\n </div>\r\n </div>\r\n <div>\r\n <label>{{'Description' | translate}} *</label>\r\n <div>\r\n <textarea formControlName=\"description\" class=\"form-control\"\r\n data-testid=\"new-support-description\"\r\n [ngClass]=\"{'is-invalid' : validatorsService.isControlError(supportForm.controls['description'])}\"></textarea>\r\n </div>\r\n <div class=\"invalid-feedback\" >\r\n <span data-testid=\"new-support-description-invalid\" [translate]=\" validatorsService.getError(supportForm.controls['description'])\"\r\n *ngIf=\"validatorsService.isControlError(supportForm.controls['description'])\"></span>\r\n </div>\r\n </div>\r\n </form>\r\n\r\n <div *ngIf=\"status ==='send'\" translate=\"Your request has been registered\" data-testid=\"new-support-send-info\">\r\n </div>\r\n <div *ngIf=\"status ==='error'\" translate=\"An error has occurred, please renew your request\"\r\n data-testid=\"new-support-error-info\">\r\n\r\n </div>\r\n</div>\r\n<div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn rounded-pill btn-museum\" data-dismiss=\"modal\" translate=\"Close\" (click)=\"onClose()\"\r\n data-testid=\"new-support-close-btn\"></button>\r\n <button *ngIf=\"!loading && status==='new'\" type=\"button\" class=\"btn rounded-pill btn-museum\" translate=\"Submit\"\r\n (click)=\"onSubmit()\" [disabled]=\"!supportForm.valid\" data-testid=\"new-support-submit-btn\"></button>\r\n</div>", styles: [".support-loader-container{width:88px;margin:auto}.invalid-feedback{height:16px}\n"] }]
|
|
17060
17078
|
}], ctorParameters: () => [{ type: SupportService }, { type: i1$2.NgbActiveModal }, { type: i3.UntypedFormBuilder }, { type: BaseUserService }, { type: ValidatorsService }] });
|
|
17061
17079
|
|
|
17062
17080
|
class LocaleService {
|
|
@@ -18517,11 +18535,11 @@ class NavigationBarComponent {
|
|
|
18517
18535
|
this.baseVisibilityService.isChangePositionVisible.next(false);
|
|
18518
18536
|
}
|
|
18519
18537
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NavigationBarComponent, deps: [{ token: 'currentAwsKinesisAnalyticsService' }, { token: i1.Router }, { token: SpaceService }, { token: BaseUserService }, { token: ZoneService }, { token: VisitService }, { token: ViewerService }, { token: NavigatorService }, { token: ZoneChangeService }, { token: BaseVisibilityService }], target: i0.ɵɵFactoryTarget.Component });
|
|
18520
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NavigationBarComponent, selector: "lib-navigation-bar", viewQueries: [{ propertyName: "navbarSelectMenu", first: true, predicate: ["navbarSelectMenu"], descendants: true }], ngImport: i0, template: "<nav class=\"navbar navbar-expand-md navbar-dark navbar-inverse second-nav\">\n <div class=\"d-flex w-100\">\n <div #navbarSelectMenu class=\"w-100\" id=\"nav-item-container-blue\">\n <div class=\"d-flex flex-column flex-md-row p-1 mt-2\">\n <select class=\"form-control flex-fill flex-lg-fill-unset location select-menu\"\n [(ngModel)]=\"selectedLocation\" (ngModelChange)=\"onLocationClick()\">\n <option [ngValue]=\"null\" selected>{{ 'Location' | translate }}</option>\n <option *ngFor=\"let loc of locations; index as index\" [ngValue]=\"loc\"> {{ loc.name }}</option>\n </select>\n <select class=\"form-control flex-fill flex-lg-fill-unset select-menu\" (change)=\"onVisitClick($event)\"\n *ngIf=\"visitsPerSpace && visitsPerSpace.length > 1\">\n <option value=\"default\" selected disabled hidden>{{'Visit' | translate}}</option>\n <option *ngFor=\"let visit of visitsPerSpace; index as index\" value=\"{{index}}\">{{ visit.name}}\n </option>\n </select>\n <select class=\"form-control flex-fill flex-lg-fill-unset floor select-menu\" [(ngModel)]=\"selectedFloor\"\n (ngModelChange)=\"onFloorClick()\">\n <option [ngValue]=\"null\" selected>{{'Floor' | translate}}</option>\n <option *ngFor=\"let floor of floorsPerSpace\" [ngValue]=\"floor\">{{ floor.name}}</option>\n </select>\n <select class=\"form-control flex-fill flex-lg-fill-unset select-menu zone\" [(ngModel)]=\"selectedZone\"\n (ngModelChange)=\"onZoneClick()\">\n <option [ngValue]=\"null\" selected>{{'Zone' | translate}}</option>\n <option *ngFor=\"let zone of zonesPerFloor\" [ngValue]=\"zone\"><span\n *ngIf=\"zone.code_ref\">{{zone.code_ref}}_</span>{{zone.name}}</option>\n </select>\n <select class=\"form-control flex-fill flex-lg-fill-unset select-menu\" [(ngModel)]=\"selectedChildZone\"\n *ngIf=\"childrenZones && childrenZones.length>0\" (ngModelChange)=\"onChildZoneClick()\">\n <option [ngValue]=\"null\" selected disabled>{{'Zone' | translate}}</option>\n <option *ngFor=\"let zone of childrenZones\" [ngValue]=\"zone\">{{ zone.name}}</option>\n </select>\n <button (click)=\"goTo()\"\n class=\"btn btn-outline-primary rounded-pill mx-2 w-md-fit-content h-md-fit-content align-self-md-center btn-3d d-none d-lg-block\"\n [disabled]=\"!selectedLocation || !selectedModel3d || !canGo()\">\n <i class=\"icon-go-to-3d d-inline-block\"></i> {{'3D visit' | translate}}\n </button>\n </div>\n <div class=\"row align-items-center justify-content-center ml-0 p-1\" *ngIf=\"showLocation()\">\n <p class=\"fw-bold lh-base align-middle text-center\">\n {{ showLocation() }}\n </p>\n </div>\n <div class=\"row align-items-center justify-content-center ml-0 p-1 d-block d-lg-none\">\n <button (click)=\"goTo()\"\n class=\"btn btn-outline-primary rounded-pill w-25 mx-2 w-md-fit-content h-md-fit-content align-self-md-center btn-3d\"\n [disabled]=\"!selectedLocation || !selectedModel3d || !canGo()\">\n <i class=\"icon-go-to-3d d-inline-block\"></i> {{'3D visit' | translate}}\n </button>\n </div>\n </div>\n </div>\n</nav>", styles: [":host{position:sticky;top:0;height:123px}.navbar{z-index:200;padding:.4rem 1rem}.navbar.second-nav{z-index:199;background-color:var(--smarterplan-primary)}input,select{margin-right:15px}.select{background:transparent;border:none;color:#fff;margin:6px 20px 0}@media (min-width: 992px){.flex-lg-fill-unset{flex:unset!important}}.form-control{width:100%;min-width:80px;max-width:18%}.location{width:auto;max-width:35%}.floor,.zone{width:auto;max-width:30%}button{color:#fff;padding:5px 10px;font-size:1.1em}.navbar-toggler{margin-right:1em}.select-menu{max-width:inherit}.btn-3d .icon-go-to-3d{width:30px;height:30px;background:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"utf-8\"?>%0A<!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->%0A<svg version=\"1.1\" id=\"Calque_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"%0A%09 viewBox=\"0 0 60 60\" style=\"enable-background:new 0 0 60 60;\" xml:space=\"preserve\">%0A<style type=\"text/css\">%0A%09.st0{fill:%23565656;}%0A<\\/style>%0A<g>%0A%09<path class=\"st0\" d=\"M43.9,32.1V17.7c0-0.4-0.2-0.7-0.5-0.9l-12.8-8c-0.2-0.1-0.4-0.2-0.6-0.2c-0.2,0-0.4,0.1-0.6,0.2l-12.8,8%0A%09%09c-0.3,0.2-0.5,0.5-0.5,0.9v14.4c0,0.4,0.2,0.7,0.5,0.9l12.8,8c0.3,0.2,0.8,0.2,1.1,0l12.8-8C43.7,32.8,43.9,32.5,43.9,32.1z%0A%09%09 M28.9,38.2l-10.7-6.7v-12l10.7,6.7V38.2z M30,24.4l-10.8-6.8L30,10.9l10.8,6.8L30,24.4z M41.8,31.5l-10.7,6.7v-12l10.7-6.7V31.5z\"%0A%09%09/>%0A%09<path class=\"st0\" d=\"M56.1,29.3l-10.3-6.8v2l1.4,1v0l0.8,0.5l0,0l7,4.8c0.3,0.2,0.4,0.5,0.4,0.8c0,0.3-0.2,0.6-0.4,0.8l-6.8,4.7%0A%09%09l0,0l-0.9,0.7v0l-2.9,2v0l-13.8,9.6c-0.3,0.2-0.8,0.2-1.1,0l-14.2-9.8l-2.6-1.8v0L5,32.4c-0.3-0.2-0.4-0.5-0.4-0.8%0A%09%09c0-0.3,0.2-0.6,0.4-0.8l0,0l7.3-5l0,0l0.5-0.3v0l1.4-1v-2L3.9,29.3c-0.8,0.5-1.2,1.4-1.2,2.4c0,0.9,0.5,1.8,1.2,2.4l8.8,6.1v0%0A%09%09l4.5,3.1l11.2,7.7c1,0.7,2.3,0.7,3.3,0l13.7-9.5l1.9-1.3v0l8.8-6.1c0.8-0.5,1.2-1.4,1.2-2.4S56.9,29.8,56.1,29.3z\"/>%0A</g>%0A</svg>%0A');border:none;vertical-align:middle;fill:var(--smarterplan-primary)}.btn-3d:hover:enabled .icon-go-to-3d{background:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"utf-8\"?>%0A<!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->%0A<svg version=\"1.1\" id=\"Calque_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"%0A%09 viewBox=\"0 0 60 60\" style=\"enable-background:new 0 0 60 60;\" xml:space=\"preserve\">%0A<style type=\"text/css\">%0A%09.st0{fill:%23FFFFFF;}%0A<\\/style>%0A<g>%0A%09<path class=\"st0\" d=\"M43.9,32.1V17.7c0-0.4-0.2-0.7-0.5-0.9l-12.8-8c-0.2-0.1-0.4-0.2-0.6-0.2c-0.2,0-0.4,0.1-0.6,0.2l-12.8,8%0A%09%09c-0.3,0.2-0.5,0.5-0.5,0.9v14.4c0,0.4,0.2,0.7,0.5,0.9l12.8,8c0.3,0.2,0.8,0.2,1.1,0l12.8-8C43.7,32.8,43.9,32.5,43.9,32.1z%0A%09%09 M28.9,38.2l-10.7-6.7v-12l10.7,6.7V38.2z M30,24.4l-10.8-6.8L30,10.9l10.8,6.8L30,24.4z M41.8,31.5l-10.7,6.7v-12l10.7-6.7V31.5z\"%0A%09%09/>%0A%09<path class=\"st0\" d=\"M56.1,29.3l-10.3-6.8v2l1.4,1v0l0.8,0.5l0,0l7,4.8c0.3,0.2,0.4,0.5,0.4,0.8c0,0.3-0.2,0.6-0.4,0.8l-6.8,4.7%0A%09%09l0,0l-0.9,0.7v0l-2.9,2v0l-13.8,9.6c-0.3,0.2-0.8,0.2-1.1,0l-14.2-9.8l-2.6-1.8v0L5,32.4c-0.3-0.2-0.4-0.5-0.4-0.8%0A%09%09c0-0.3,0.2-0.6,0.4-0.8l0,0l7.3-5l0,0l0.5-0.3v0l1.4-1v-2L3.9,29.3c-0.8,0.5-1.2,1.4-1.2,2.4c0,0.9,0.5,1.8,1.2,2.4l8.8,6.1v0%0A%09%09l4.5,3.1l11.2,7.7c1,0.7,2.3,0.7,3.3,0l13.7-9.5l1.9-1.3v0l8.8-6.1c0.8-0.5,1.2-1.4,1.2-2.4S56.9,29.8,56.1,29.3z\"/>%0A</g>%0A</svg>%0A')}.btn-3d[disabled]:hover .icon-go-to-3d{fill:var(--smarterplan-primary)}.outer_circle{background-color:#ebebeb;border-radius:50%;width:32px;height:32px;padding:1px}@media (max-width: 767px){.navbar{padding:.2rem .5rem}.form-control,.location,.floor,.zone{max-width:100%;margin-bottom:15px}input,select{margin-right:0;margin-bottom:15px}}\n"], dependencies: [{ kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
18538
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NavigationBarComponent, selector: "lib-navigation-bar", viewQueries: [{ propertyName: "navbarSelectMenu", first: true, predicate: ["navbarSelectMenu"], descendants: true }], ngImport: i0, template: "<nav class=\"navbar navbar-expand-md navbar-dark navbar-inverse second-nav\">\r\n <div class=\"d-flex w-100\">\r\n <div #navbarSelectMenu class=\"w-100\" id=\"nav-item-container-blue\">\r\n <div class=\"d-flex flex-column flex-md-row p-1 mt-2\">\r\n <select class=\"form-control flex-fill flex-lg-fill-unset location select-menu\"\r\n [(ngModel)]=\"selectedLocation\" (ngModelChange)=\"onLocationClick()\">\r\n <option [ngValue]=\"null\" selected>{{ 'Location' | translate }}</option>\r\n <option *ngFor=\"let loc of locations; index as index\" [ngValue]=\"loc\"> {{ loc.name }}</option>\r\n </select>\r\n <select class=\"form-control flex-fill flex-lg-fill-unset select-menu\" (change)=\"onVisitClick($event)\"\r\n *ngIf=\"visitsPerSpace && visitsPerSpace.length > 1\">\r\n <option value=\"default\" selected disabled hidden>{{'Visit' | translate}}</option>\r\n <option *ngFor=\"let visit of visitsPerSpace; index as index\" value=\"{{index}}\">{{ visit.name}}\r\n </option>\r\n </select>\r\n <select class=\"form-control flex-fill flex-lg-fill-unset floor select-menu\" [(ngModel)]=\"selectedFloor\"\r\n (ngModelChange)=\"onFloorClick()\">\r\n <option [ngValue]=\"null\" selected>{{'Floor' | translate}}</option>\r\n <option *ngFor=\"let floor of floorsPerSpace\" [ngValue]=\"floor\">{{ floor.name}}</option>\r\n </select>\r\n <select class=\"form-control flex-fill flex-lg-fill-unset select-menu zone\" [(ngModel)]=\"selectedZone\"\r\n (ngModelChange)=\"onZoneClick()\">\r\n <option [ngValue]=\"null\" selected>{{'Zone' | translate}}</option>\r\n <option *ngFor=\"let zone of zonesPerFloor\" [ngValue]=\"zone\"><span\r\n *ngIf=\"zone.code_ref\">{{zone.code_ref}}_</span>{{zone.name}}</option>\r\n </select>\r\n <select class=\"form-control flex-fill flex-lg-fill-unset select-menu\" [(ngModel)]=\"selectedChildZone\"\r\n *ngIf=\"childrenZones && childrenZones.length>0\" (ngModelChange)=\"onChildZoneClick()\">\r\n <option [ngValue]=\"null\" selected disabled>{{'Zone' | translate}}</option>\r\n <option *ngFor=\"let zone of childrenZones\" [ngValue]=\"zone\">{{ zone.name}}</option>\r\n </select>\r\n <button (click)=\"goTo()\"\r\n class=\"btn btn-outline-primary rounded-pill mx-2 w-md-fit-content h-md-fit-content align-self-md-center btn-3d d-none d-lg-block\"\r\n [disabled]=\"!selectedLocation || !selectedModel3d || !canGo()\">\r\n <i class=\"icon-go-to-3d d-inline-block\"></i> {{'3D visit' | translate}}\r\n </button>\r\n </div>\r\n <div class=\"row align-items-center justify-content-center ml-0 p-1\" *ngIf=\"showLocation()\">\r\n <p class=\"fw-bold lh-base align-middle text-center\">\r\n {{ showLocation() }}\r\n </p>\r\n </div>\r\n <div class=\"row align-items-center justify-content-center ml-0 p-1 d-block d-lg-none\">\r\n <button (click)=\"goTo()\"\r\n class=\"btn btn-outline-primary rounded-pill w-25 mx-2 w-md-fit-content h-md-fit-content align-self-md-center btn-3d\"\r\n [disabled]=\"!selectedLocation || !selectedModel3d || !canGo()\">\r\n <i class=\"icon-go-to-3d d-inline-block\"></i> {{'3D visit' | translate}}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n</nav>", styles: [":host{position:sticky;top:0;height:123px}.navbar{z-index:200;padding:.4rem 1rem}.navbar.second-nav{z-index:199;background-color:var(--smarterplan-primary)}input,select{margin-right:15px}.select{background:transparent;border:none;color:#fff;margin:6px 20px 0}@media (min-width: 992px){.flex-lg-fill-unset{flex:unset!important}}.form-control{width:100%;min-width:80px;max-width:18%}.location{width:auto;max-width:35%}.floor,.zone{width:auto;max-width:30%}button{color:#fff;padding:5px 10px;font-size:1.1em}.navbar-toggler{margin-right:1em}.select-menu{max-width:inherit}.btn-3d .icon-go-to-3d{width:30px;height:30px;background:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"utf-8\"?>%0D%0A<!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->%0D%0A<svg version=\"1.1\" id=\"Calque_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"%0D%0A%09 viewBox=\"0 0 60 60\" style=\"enable-background:new 0 0 60 60;\" xml:space=\"preserve\">%0D%0A<style type=\"text/css\">%0D%0A%09.st0{fill:%23565656;}%0D%0A<\\/style>%0D%0A<g>%0D%0A%09<path class=\"st0\" d=\"M43.9,32.1V17.7c0-0.4-0.2-0.7-0.5-0.9l-12.8-8c-0.2-0.1-0.4-0.2-0.6-0.2c-0.2,0-0.4,0.1-0.6,0.2l-12.8,8%0D%0A%09%09c-0.3,0.2-0.5,0.5-0.5,0.9v14.4c0,0.4,0.2,0.7,0.5,0.9l12.8,8c0.3,0.2,0.8,0.2,1.1,0l12.8-8C43.7,32.8,43.9,32.5,43.9,32.1z%0D%0A%09%09 M28.9,38.2l-10.7-6.7v-12l10.7,6.7V38.2z M30,24.4l-10.8-6.8L30,10.9l10.8,6.8L30,24.4z M41.8,31.5l-10.7,6.7v-12l10.7-6.7V31.5z\"%0D%0A%09%09/>%0D%0A%09<path class=\"st0\" d=\"M56.1,29.3l-10.3-6.8v2l1.4,1v0l0.8,0.5l0,0l7,4.8c0.3,0.2,0.4,0.5,0.4,0.8c0,0.3-0.2,0.6-0.4,0.8l-6.8,4.7%0D%0A%09%09l0,0l-0.9,0.7v0l-2.9,2v0l-13.8,9.6c-0.3,0.2-0.8,0.2-1.1,0l-14.2-9.8l-2.6-1.8v0L5,32.4c-0.3-0.2-0.4-0.5-0.4-0.8%0D%0A%09%09c0-0.3,0.2-0.6,0.4-0.8l0,0l7.3-5l0,0l0.5-0.3v0l1.4-1v-2L3.9,29.3c-0.8,0.5-1.2,1.4-1.2,2.4c0,0.9,0.5,1.8,1.2,2.4l8.8,6.1v0%0D%0A%09%09l4.5,3.1l11.2,7.7c1,0.7,2.3,0.7,3.3,0l13.7-9.5l1.9-1.3v0l8.8-6.1c0.8-0.5,1.2-1.4,1.2-2.4S56.9,29.8,56.1,29.3z\"/>%0D%0A</g>%0D%0A</svg>%0D%0A');border:none;vertical-align:middle;fill:var(--smarterplan-primary)}.btn-3d:hover:enabled .icon-go-to-3d{background:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"utf-8\"?>%0D%0A<!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->%0D%0A<svg version=\"1.1\" id=\"Calque_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"%0D%0A%09 viewBox=\"0 0 60 60\" style=\"enable-background:new 0 0 60 60;\" xml:space=\"preserve\">%0D%0A<style type=\"text/css\">%0D%0A%09.st0{fill:%23FFFFFF;}%0D%0A<\\/style>%0D%0A<g>%0D%0A%09<path class=\"st0\" d=\"M43.9,32.1V17.7c0-0.4-0.2-0.7-0.5-0.9l-12.8-8c-0.2-0.1-0.4-0.2-0.6-0.2c-0.2,0-0.4,0.1-0.6,0.2l-12.8,8%0D%0A%09%09c-0.3,0.2-0.5,0.5-0.5,0.9v14.4c0,0.4,0.2,0.7,0.5,0.9l12.8,8c0.3,0.2,0.8,0.2,1.1,0l12.8-8C43.7,32.8,43.9,32.5,43.9,32.1z%0D%0A%09%09 M28.9,38.2l-10.7-6.7v-12l10.7,6.7V38.2z M30,24.4l-10.8-6.8L30,10.9l10.8,6.8L30,24.4z M41.8,31.5l-10.7,6.7v-12l10.7-6.7V31.5z\"%0D%0A%09%09/>%0D%0A%09<path class=\"st0\" d=\"M56.1,29.3l-10.3-6.8v2l1.4,1v0l0.8,0.5l0,0l7,4.8c0.3,0.2,0.4,0.5,0.4,0.8c0,0.3-0.2,0.6-0.4,0.8l-6.8,4.7%0D%0A%09%09l0,0l-0.9,0.7v0l-2.9,2v0l-13.8,9.6c-0.3,0.2-0.8,0.2-1.1,0l-14.2-9.8l-2.6-1.8v0L5,32.4c-0.3-0.2-0.4-0.5-0.4-0.8%0D%0A%09%09c0-0.3,0.2-0.6,0.4-0.8l0,0l7.3-5l0,0l0.5-0.3v0l1.4-1v-2L3.9,29.3c-0.8,0.5-1.2,1.4-1.2,2.4c0,0.9,0.5,1.8,1.2,2.4l8.8,6.1v0%0D%0A%09%09l4.5,3.1l11.2,7.7c1,0.7,2.3,0.7,3.3,0l13.7-9.5l1.9-1.3v0l8.8-6.1c0.8-0.5,1.2-1.4,1.2-2.4S56.9,29.8,56.1,29.3z\"/>%0D%0A</g>%0D%0A</svg>%0D%0A')}.btn-3d[disabled]:hover .icon-go-to-3d{fill:var(--smarterplan-primary)}.outer_circle{background-color:#ebebeb;border-radius:50%;width:32px;height:32px;padding:1px}@media (max-width: 767px){.navbar{padding:.2rem .5rem}.form-control,.location,.floor,.zone{max-width:100%;margin-bottom:15px}input,select{margin-right:0;margin-bottom:15px}}\n"], dependencies: [{ kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
18521
18539
|
}
|
|
18522
18540
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NavigationBarComponent, decorators: [{
|
|
18523
18541
|
type: Component,
|
|
18524
|
-
args: [{ selector: 'lib-navigation-bar', template: "<nav class=\"navbar navbar-expand-md navbar-dark navbar-inverse second-nav\">\n <div class=\"d-flex w-100\">\n <div #navbarSelectMenu class=\"w-100\" id=\"nav-item-container-blue\">\n <div class=\"d-flex flex-column flex-md-row p-1 mt-2\">\n <select class=\"form-control flex-fill flex-lg-fill-unset location select-menu\"\n [(ngModel)]=\"selectedLocation\" (ngModelChange)=\"onLocationClick()\">\n <option [ngValue]=\"null\" selected>{{ 'Location' | translate }}</option>\n <option *ngFor=\"let loc of locations; index as index\" [ngValue]=\"loc\"> {{ loc.name }}</option>\n </select>\n <select class=\"form-control flex-fill flex-lg-fill-unset select-menu\" (change)=\"onVisitClick($event)\"\n *ngIf=\"visitsPerSpace && visitsPerSpace.length > 1\">\n <option value=\"default\" selected disabled hidden>{{'Visit' | translate}}</option>\n <option *ngFor=\"let visit of visitsPerSpace; index as index\" value=\"{{index}}\">{{ visit.name}}\n </option>\n </select>\n <select class=\"form-control flex-fill flex-lg-fill-unset floor select-menu\" [(ngModel)]=\"selectedFloor\"\n (ngModelChange)=\"onFloorClick()\">\n <option [ngValue]=\"null\" selected>{{'Floor' | translate}}</option>\n <option *ngFor=\"let floor of floorsPerSpace\" [ngValue]=\"floor\">{{ floor.name}}</option>\n </select>\n <select class=\"form-control flex-fill flex-lg-fill-unset select-menu zone\" [(ngModel)]=\"selectedZone\"\n (ngModelChange)=\"onZoneClick()\">\n <option [ngValue]=\"null\" selected>{{'Zone' | translate}}</option>\n <option *ngFor=\"let zone of zonesPerFloor\" [ngValue]=\"zone\"><span\n *ngIf=\"zone.code_ref\">{{zone.code_ref}}_</span>{{zone.name}}</option>\n </select>\n <select class=\"form-control flex-fill flex-lg-fill-unset select-menu\" [(ngModel)]=\"selectedChildZone\"\n *ngIf=\"childrenZones && childrenZones.length>0\" (ngModelChange)=\"onChildZoneClick()\">\n <option [ngValue]=\"null\" selected disabled>{{'Zone' | translate}}</option>\n <option *ngFor=\"let zone of childrenZones\" [ngValue]=\"zone\">{{ zone.name}}</option>\n </select>\n <button (click)=\"goTo()\"\n class=\"btn btn-outline-primary rounded-pill mx-2 w-md-fit-content h-md-fit-content align-self-md-center btn-3d d-none d-lg-block\"\n [disabled]=\"!selectedLocation || !selectedModel3d || !canGo()\">\n <i class=\"icon-go-to-3d d-inline-block\"></i> {{'3D visit' | translate}}\n </button>\n </div>\n <div class=\"row align-items-center justify-content-center ml-0 p-1\" *ngIf=\"showLocation()\">\n <p class=\"fw-bold lh-base align-middle text-center\">\n {{ showLocation() }}\n </p>\n </div>\n <div class=\"row align-items-center justify-content-center ml-0 p-1 d-block d-lg-none\">\n <button (click)=\"goTo()\"\n class=\"btn btn-outline-primary rounded-pill w-25 mx-2 w-md-fit-content h-md-fit-content align-self-md-center btn-3d\"\n [disabled]=\"!selectedLocation || !selectedModel3d || !canGo()\">\n <i class=\"icon-go-to-3d d-inline-block\"></i> {{'3D visit' | translate}}\n </button>\n </div>\n </div>\n </div>\n</nav>", styles: [":host{position:sticky;top:0;height:123px}.navbar{z-index:200;padding:.4rem 1rem}.navbar.second-nav{z-index:199;background-color:var(--smarterplan-primary)}input,select{margin-right:15px}.select{background:transparent;border:none;color:#fff;margin:6px 20px 0}@media (min-width: 992px){.flex-lg-fill-unset{flex:unset!important}}.form-control{width:100%;min-width:80px;max-width:18%}.location{width:auto;max-width:35%}.floor,.zone{width:auto;max-width:30%}button{color:#fff;padding:5px 10px;font-size:1.1em}.navbar-toggler{margin-right:1em}.select-menu{max-width:inherit}.btn-3d .icon-go-to-3d{width:30px;height:30px;background:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"utf-8\"?>%0A<!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->%0A<svg version=\"1.1\" id=\"Calque_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"%0A%09 viewBox=\"0 0 60 60\" style=\"enable-background:new 0 0 60 60;\" xml:space=\"preserve\">%0A<style type=\"text/css\">%0A%09.st0{fill:%23565656;}%0A<\\/style>%0A<g>%0A%09<path class=\"st0\" d=\"M43.9,32.1V17.7c0-0.4-0.2-0.7-0.5-0.9l-12.8-8c-0.2-0.1-0.4-0.2-0.6-0.2c-0.2,0-0.4,0.1-0.6,0.2l-12.8,8%0A%09%09c-0.3,0.2-0.5,0.5-0.5,0.9v14.4c0,0.4,0.2,0.7,0.5,0.9l12.8,8c0.3,0.2,0.8,0.2,1.1,0l12.8-8C43.7,32.8,43.9,32.5,43.9,32.1z%0A%09%09 M28.9,38.2l-10.7-6.7v-12l10.7,6.7V38.2z M30,24.4l-10.8-6.8L30,10.9l10.8,6.8L30,24.4z M41.8,31.5l-10.7,6.7v-12l10.7-6.7V31.5z\"%0A%09%09/>%0A%09<path class=\"st0\" d=\"M56.1,29.3l-10.3-6.8v2l1.4,1v0l0.8,0.5l0,0l7,4.8c0.3,0.2,0.4,0.5,0.4,0.8c0,0.3-0.2,0.6-0.4,0.8l-6.8,4.7%0A%09%09l0,0l-0.9,0.7v0l-2.9,2v0l-13.8,9.6c-0.3,0.2-0.8,0.2-1.1,0l-14.2-9.8l-2.6-1.8v0L5,32.4c-0.3-0.2-0.4-0.5-0.4-0.8%0A%09%09c0-0.3,0.2-0.6,0.4-0.8l0,0l7.3-5l0,0l0.5-0.3v0l1.4-1v-2L3.9,29.3c-0.8,0.5-1.2,1.4-1.2,2.4c0,0.9,0.5,1.8,1.2,2.4l8.8,6.1v0%0A%09%09l4.5,3.1l11.2,7.7c1,0.7,2.3,0.7,3.3,0l13.7-9.5l1.9-1.3v0l8.8-6.1c0.8-0.5,1.2-1.4,1.2-2.4S56.9,29.8,56.1,29.3z\"/>%0A</g>%0A</svg>%0A');border:none;vertical-align:middle;fill:var(--smarterplan-primary)}.btn-3d:hover:enabled .icon-go-to-3d{background:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"utf-8\"?>%0A<!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->%0A<svg version=\"1.1\" id=\"Calque_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"%0A%09 viewBox=\"0 0 60 60\" style=\"enable-background:new 0 0 60 60;\" xml:space=\"preserve\">%0A<style type=\"text/css\">%0A%09.st0{fill:%23FFFFFF;}%0A<\\/style>%0A<g>%0A%09<path class=\"st0\" d=\"M43.9,32.1V17.7c0-0.4-0.2-0.7-0.5-0.9l-12.8-8c-0.2-0.1-0.4-0.2-0.6-0.2c-0.2,0-0.4,0.1-0.6,0.2l-12.8,8%0A%09%09c-0.3,0.2-0.5,0.5-0.5,0.9v14.4c0,0.4,0.2,0.7,0.5,0.9l12.8,8c0.3,0.2,0.8,0.2,1.1,0l12.8-8C43.7,32.8,43.9,32.5,43.9,32.1z%0A%09%09 M28.9,38.2l-10.7-6.7v-12l10.7,6.7V38.2z M30,24.4l-10.8-6.8L30,10.9l10.8,6.8L30,24.4z M41.8,31.5l-10.7,6.7v-12l10.7-6.7V31.5z\"%0A%09%09/>%0A%09<path class=\"st0\" d=\"M56.1,29.3l-10.3-6.8v2l1.4,1v0l0.8,0.5l0,0l7,4.8c0.3,0.2,0.4,0.5,0.4,0.8c0,0.3-0.2,0.6-0.4,0.8l-6.8,4.7%0A%09%09l0,0l-0.9,0.7v0l-2.9,2v0l-13.8,9.6c-0.3,0.2-0.8,0.2-1.1,0l-14.2-9.8l-2.6-1.8v0L5,32.4c-0.3-0.2-0.4-0.5-0.4-0.8%0A%09%09c0-0.3,0.2-0.6,0.4-0.8l0,0l7.3-5l0,0l0.5-0.3v0l1.4-1v-2L3.9,29.3c-0.8,0.5-1.2,1.4-1.2,2.4c0,0.9,0.5,1.8,1.2,2.4l8.8,6.1v0%0A%09%09l4.5,3.1l11.2,7.7c1,0.7,2.3,0.7,3.3,0l13.7-9.5l1.9-1.3v0l8.8-6.1c0.8-0.5,1.2-1.4,1.2-2.4S56.9,29.8,56.1,29.3z\"/>%0A</g>%0A</svg>%0A')}.btn-3d[disabled]:hover .icon-go-to-3d{fill:var(--smarterplan-primary)}.outer_circle{background-color:#ebebeb;border-radius:50%;width:32px;height:32px;padding:1px}@media (max-width: 767px){.navbar{padding:.2rem .5rem}.form-control,.location,.floor,.zone{max-width:100%;margin-bottom:15px}input,select{margin-right:0;margin-bottom:15px}}\n"] }]
|
|
18542
|
+
args: [{ selector: 'lib-navigation-bar', template: "<nav class=\"navbar navbar-expand-md navbar-dark navbar-inverse second-nav\">\r\n <div class=\"d-flex w-100\">\r\n <div #navbarSelectMenu class=\"w-100\" id=\"nav-item-container-blue\">\r\n <div class=\"d-flex flex-column flex-md-row p-1 mt-2\">\r\n <select class=\"form-control flex-fill flex-lg-fill-unset location select-menu\"\r\n [(ngModel)]=\"selectedLocation\" (ngModelChange)=\"onLocationClick()\">\r\n <option [ngValue]=\"null\" selected>{{ 'Location' | translate }}</option>\r\n <option *ngFor=\"let loc of locations; index as index\" [ngValue]=\"loc\"> {{ loc.name }}</option>\r\n </select>\r\n <select class=\"form-control flex-fill flex-lg-fill-unset select-menu\" (change)=\"onVisitClick($event)\"\r\n *ngIf=\"visitsPerSpace && visitsPerSpace.length > 1\">\r\n <option value=\"default\" selected disabled hidden>{{'Visit' | translate}}</option>\r\n <option *ngFor=\"let visit of visitsPerSpace; index as index\" value=\"{{index}}\">{{ visit.name}}\r\n </option>\r\n </select>\r\n <select class=\"form-control flex-fill flex-lg-fill-unset floor select-menu\" [(ngModel)]=\"selectedFloor\"\r\n (ngModelChange)=\"onFloorClick()\">\r\n <option [ngValue]=\"null\" selected>{{'Floor' | translate}}</option>\r\n <option *ngFor=\"let floor of floorsPerSpace\" [ngValue]=\"floor\">{{ floor.name}}</option>\r\n </select>\r\n <select class=\"form-control flex-fill flex-lg-fill-unset select-menu zone\" [(ngModel)]=\"selectedZone\"\r\n (ngModelChange)=\"onZoneClick()\">\r\n <option [ngValue]=\"null\" selected>{{'Zone' | translate}}</option>\r\n <option *ngFor=\"let zone of zonesPerFloor\" [ngValue]=\"zone\"><span\r\n *ngIf=\"zone.code_ref\">{{zone.code_ref}}_</span>{{zone.name}}</option>\r\n </select>\r\n <select class=\"form-control flex-fill flex-lg-fill-unset select-menu\" [(ngModel)]=\"selectedChildZone\"\r\n *ngIf=\"childrenZones && childrenZones.length>0\" (ngModelChange)=\"onChildZoneClick()\">\r\n <option [ngValue]=\"null\" selected disabled>{{'Zone' | translate}}</option>\r\n <option *ngFor=\"let zone of childrenZones\" [ngValue]=\"zone\">{{ zone.name}}</option>\r\n </select>\r\n <button (click)=\"goTo()\"\r\n class=\"btn btn-outline-primary rounded-pill mx-2 w-md-fit-content h-md-fit-content align-self-md-center btn-3d d-none d-lg-block\"\r\n [disabled]=\"!selectedLocation || !selectedModel3d || !canGo()\">\r\n <i class=\"icon-go-to-3d d-inline-block\"></i> {{'3D visit' | translate}}\r\n </button>\r\n </div>\r\n <div class=\"row align-items-center justify-content-center ml-0 p-1\" *ngIf=\"showLocation()\">\r\n <p class=\"fw-bold lh-base align-middle text-center\">\r\n {{ showLocation() }}\r\n </p>\r\n </div>\r\n <div class=\"row align-items-center justify-content-center ml-0 p-1 d-block d-lg-none\">\r\n <button (click)=\"goTo()\"\r\n class=\"btn btn-outline-primary rounded-pill w-25 mx-2 w-md-fit-content h-md-fit-content align-self-md-center btn-3d\"\r\n [disabled]=\"!selectedLocation || !selectedModel3d || !canGo()\">\r\n <i class=\"icon-go-to-3d d-inline-block\"></i> {{'3D visit' | translate}}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n</nav>", styles: [":host{position:sticky;top:0;height:123px}.navbar{z-index:200;padding:.4rem 1rem}.navbar.second-nav{z-index:199;background-color:var(--smarterplan-primary)}input,select{margin-right:15px}.select{background:transparent;border:none;color:#fff;margin:6px 20px 0}@media (min-width: 992px){.flex-lg-fill-unset{flex:unset!important}}.form-control{width:100%;min-width:80px;max-width:18%}.location{width:auto;max-width:35%}.floor,.zone{width:auto;max-width:30%}button{color:#fff;padding:5px 10px;font-size:1.1em}.navbar-toggler{margin-right:1em}.select-menu{max-width:inherit}.btn-3d .icon-go-to-3d{width:30px;height:30px;background:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"utf-8\"?>%0D%0A<!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->%0D%0A<svg version=\"1.1\" id=\"Calque_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"%0D%0A%09 viewBox=\"0 0 60 60\" style=\"enable-background:new 0 0 60 60;\" xml:space=\"preserve\">%0D%0A<style type=\"text/css\">%0D%0A%09.st0{fill:%23565656;}%0D%0A<\\/style>%0D%0A<g>%0D%0A%09<path class=\"st0\" d=\"M43.9,32.1V17.7c0-0.4-0.2-0.7-0.5-0.9l-12.8-8c-0.2-0.1-0.4-0.2-0.6-0.2c-0.2,0-0.4,0.1-0.6,0.2l-12.8,8%0D%0A%09%09c-0.3,0.2-0.5,0.5-0.5,0.9v14.4c0,0.4,0.2,0.7,0.5,0.9l12.8,8c0.3,0.2,0.8,0.2,1.1,0l12.8-8C43.7,32.8,43.9,32.5,43.9,32.1z%0D%0A%09%09 M28.9,38.2l-10.7-6.7v-12l10.7,6.7V38.2z M30,24.4l-10.8-6.8L30,10.9l10.8,6.8L30,24.4z M41.8,31.5l-10.7,6.7v-12l10.7-6.7V31.5z\"%0D%0A%09%09/>%0D%0A%09<path class=\"st0\" d=\"M56.1,29.3l-10.3-6.8v2l1.4,1v0l0.8,0.5l0,0l7,4.8c0.3,0.2,0.4,0.5,0.4,0.8c0,0.3-0.2,0.6-0.4,0.8l-6.8,4.7%0D%0A%09%09l0,0l-0.9,0.7v0l-2.9,2v0l-13.8,9.6c-0.3,0.2-0.8,0.2-1.1,0l-14.2-9.8l-2.6-1.8v0L5,32.4c-0.3-0.2-0.4-0.5-0.4-0.8%0D%0A%09%09c0-0.3,0.2-0.6,0.4-0.8l0,0l7.3-5l0,0l0.5-0.3v0l1.4-1v-2L3.9,29.3c-0.8,0.5-1.2,1.4-1.2,2.4c0,0.9,0.5,1.8,1.2,2.4l8.8,6.1v0%0D%0A%09%09l4.5,3.1l11.2,7.7c1,0.7,2.3,0.7,3.3,0l13.7-9.5l1.9-1.3v0l8.8-6.1c0.8-0.5,1.2-1.4,1.2-2.4S56.9,29.8,56.1,29.3z\"/>%0D%0A</g>%0D%0A</svg>%0D%0A');border:none;vertical-align:middle;fill:var(--smarterplan-primary)}.btn-3d:hover:enabled .icon-go-to-3d{background:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"utf-8\"?>%0D%0A<!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->%0D%0A<svg version=\"1.1\" id=\"Calque_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"%0D%0A%09 viewBox=\"0 0 60 60\" style=\"enable-background:new 0 0 60 60;\" xml:space=\"preserve\">%0D%0A<style type=\"text/css\">%0D%0A%09.st0{fill:%23FFFFFF;}%0D%0A<\\/style>%0D%0A<g>%0D%0A%09<path class=\"st0\" d=\"M43.9,32.1V17.7c0-0.4-0.2-0.7-0.5-0.9l-12.8-8c-0.2-0.1-0.4-0.2-0.6-0.2c-0.2,0-0.4,0.1-0.6,0.2l-12.8,8%0D%0A%09%09c-0.3,0.2-0.5,0.5-0.5,0.9v14.4c0,0.4,0.2,0.7,0.5,0.9l12.8,8c0.3,0.2,0.8,0.2,1.1,0l12.8-8C43.7,32.8,43.9,32.5,43.9,32.1z%0D%0A%09%09 M28.9,38.2l-10.7-6.7v-12l10.7,6.7V38.2z M30,24.4l-10.8-6.8L30,10.9l10.8,6.8L30,24.4z M41.8,31.5l-10.7,6.7v-12l10.7-6.7V31.5z\"%0D%0A%09%09/>%0D%0A%09<path class=\"st0\" d=\"M56.1,29.3l-10.3-6.8v2l1.4,1v0l0.8,0.5l0,0l7,4.8c0.3,0.2,0.4,0.5,0.4,0.8c0,0.3-0.2,0.6-0.4,0.8l-6.8,4.7%0D%0A%09%09l0,0l-0.9,0.7v0l-2.9,2v0l-13.8,9.6c-0.3,0.2-0.8,0.2-1.1,0l-14.2-9.8l-2.6-1.8v0L5,32.4c-0.3-0.2-0.4-0.5-0.4-0.8%0D%0A%09%09c0-0.3,0.2-0.6,0.4-0.8l0,0l7.3-5l0,0l0.5-0.3v0l1.4-1v-2L3.9,29.3c-0.8,0.5-1.2,1.4-1.2,2.4c0,0.9,0.5,1.8,1.2,2.4l8.8,6.1v0%0D%0A%09%09l4.5,3.1l11.2,7.7c1,0.7,2.3,0.7,3.3,0l13.7-9.5l1.9-1.3v0l8.8-6.1c0.8-0.5,1.2-1.4,1.2-2.4S56.9,29.8,56.1,29.3z\"/>%0D%0A</g>%0D%0A</svg>%0D%0A')}.btn-3d[disabled]:hover .icon-go-to-3d{fill:var(--smarterplan-primary)}.outer_circle{background-color:#ebebeb;border-radius:50%;width:32px;height:32px;padding:1px}@media (max-width: 767px){.navbar{padding:.2rem .5rem}.form-control,.location,.floor,.zone{max-width:100%;margin-bottom:15px}input,select{margin-right:0;margin-bottom:15px}}\n"] }]
|
|
18525
18543
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
18526
18544
|
type: Inject,
|
|
18527
18545
|
args: ['currentAwsKinesisAnalyticsService']
|
|
@@ -18791,11 +18809,11 @@ class MenuBarComponent {
|
|
|
18791
18809
|
}
|
|
18792
18810
|
}
|
|
18793
18811
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuBarComponent, deps: [{ token: i1.Router }, { token: LocaleService }, { token: BaseUserService }, { token: NavigatorService }, { token: SupportService }, { token: BaseVisibilityService }, { token: i1$2.NgbCalendar }, { token: i1$2.NgbDateParserFormatter }, { token: FilterService }, { token: AmplifyCacheService }], target: i0.ɵɵFactoryTarget.Component });
|
|
18794
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MenuBarComponent, selector: "lib-menu-bar", inputs: { cacheName: "cacheName" }, ngImport: i0, template: "<div id=\"menu-bar\">\n <div *ngIf=\"!isVisitor\">\n <nav class=\"navbar navbar-expand-md navbar-light p-0\">\n <div class=\"container-fluid\" *ngIf=\"isVisible\">\n <div class=\"navbar-brand order-md-0\" [routerLink]=\"['/dashboard']\">\n <img alt=\"SmarterPlan\" src=\"../assets/images/logos/logo-immo.png\">\n </div>\n <div class=\"ms-auto nav-item dropdown profile_pic-container order-md-2\">\n <div class=\"profile_pic dropdown-toggle\" data-testid=\"dropdown-menu-button\" data-bs-toggle=\"dropdown\">\n <lib-avatar></lib-avatar>\n </div>\n <div class=\"dropdown-menu dropdown-menu-right\">\n <p *ngIf=\"user && mission\" class=\"p-2\">\n <span class=\"username\">{{ user.displayName }}</span><br />\n <span class=\"user-role\">{{ mission.role }}</span><br />\n <span class=\"org\">{{ mission.organisation ? mission.organisation.name : \"No organisation\" |\n translate}}</span>\n </p>\n <div class=\"dropdown-divider\"></div>\n <!-- <a class=\"dropdown-item\" routerLink=\"/debug\" *ngIf=\"isManager\">Debug</a> -->\n <a class=\"dropdown-item\" (click)=\"localeService.modal()\">{{'Language' | translate}}</a>\n <a class=\"dropdown-item\" routerLink=\"/dashboard\">{{'Data management' | translate}}</a>\n <a class=\"dropdown-item\" data-testid=\"user-management-btn\" routerLink=\"/admin\" *ngIf=\"isManager\">\n {{'Users management' | translate}}</a>\n <a class=\"dropdown-item\" routerLink=\"/profile\">\n {{'Profile' | translate}}</a>\n <div class=\"dropdown-divider\"></div>\n <button class=\"dropdown-item\" (click)=\"openSupportForm()\">{{\"Help\" | translate}}</button>\n <button data-testid=\"logout-auth-btn\" class=\"dropdown-item\" (click)=\"signOut()\">{{\"Logout\" |\n translate}}</button>\n </div>\n </div>\n <button class=\"navbar-toggler order-md-1\" (click)=\"navbarCollapse.toggle()\" type=\"button\"\n [attr.aria-expanded]=\"!isCollapsed\" aria-controls=\"navbar-collapse\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"navbar-collapse order-md-1\" #navbarCollapse=\"ngbCollapse\" [(ngbCollapse)]=\"isCollapsed\"\n [animation]=\"false\">\n <form\n class=\"form-inline m-0 mt-2 form-container d-flex justify-content-start align-items-start align-items-md-center flex-column flex-md-row flex-nowrap filters-menu-block\">\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-0\">\n <input class=\"form-control search-button m-1\" placeholder=\"keyword\" id=\"mainSearchBar\" type=\"text\">\n <button class=\"btn btn-outline-primary rounded-pill m-1 w-fit-content h-fit-content align-self-md-center\"\n (click)=\"onSubmit()\">{{'Search' |\n translate}}</button>\n </div>\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-0\">\n <div class=\"input-group date-selector m-1\">\n <input #dpFromDate class=\"form-control\" placeholder=\"dd/MM/yyyy\" name=\"dpFromDate\"\n [value]=\"fromDate | formatDateNumberToDigits\"\n (input)=\"fromDate = validateInput(fromDate, dpFromDate.value)\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary calendar\" (click)=\"datepicker.toggle()\"\n type=\"button\"></button>\n </div>\n </div>\n <input name=\"datepicker\" class=\"form-control visually-hidden\" ngbDatepicker #datepicker=\"ngbDatepicker\"\n [autoClose]=\"'outside'\" (dateSelect)=\"onDateSelection($event)\" [displayMonths]=\"2\" [dayTemplate]=\"t\"\n outsideDays=\"hidden\" [startDate]=\"fromDate || calendar.getToday()\" [container]=\"'body'\" tabindex=\"-1\">\n <ng-template #t let-date let-focused=\"focused\">\n <span class=\"custom-day\" [class.focused]=\"focused\" [class.range]=\"isRange(date)\"\n [class.faded]=\"isHovered(date) || isInside(date)\" (mouseenter)=\"hoveredDate = date\"\n (mouseleave)=\"hoveredDate = null\">\n {{ date.day }}\n </span>\n </ng-template>\n <span class=\"ms-1 p-2\">{{'to' | translate}}</span>\n <div class=\"input-group date-selector m-1\">\n <input #dpToDate class=\"form-control\" placeholder=\"dd/MM/yyyy\" name=\"dpToDate\"\n [value]=\"toDate | formatDateNumberToDigits\" (input)=\"toDate = validateInput(toDate, dpToDate.value)\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary calendar\" (click)=\"datepicker.toggle()\"\n type=\"button\"></button>\n </div>\n </div>\n </div>\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-1 justify-content-evenly\">\n <button\n class=\"btn btn-primary rounded-pill ms-1 w-25 w-md-fit-content h-md-fit-content align-self-md-center\"\n type=\"button\" (click)=\"onApply()\" *ngIf=\"!isDateFilterApplied || dateChanged\">\n {{'Apply' | translate}}\n </button>\n <span\n class=\"appliedText ms-1 py-2 align-self-md-center pb-md-0 mx-2 w-md-fit-content h-md-fit-content align-self-md-center\"\n *ngIf=\"isDateFilterApplied && !dateChanged\">\n <span class=\"iconify\" [icIcon]=\"checkIcon\" width=\"15\" height=\"15\"></span>\n {{\"Applied\" | translate}}\n </span>\n <button\n class=\"btn btn-outline-primary rounded-pill w-25 mx-2 w-md-fit-content h-md-fit-content align-self-md-center\"\n type=\"button\" (click)=\"onClearDates()\">{{'Clear'\n |\n translate}}</button>\n <div\n class=\"change-position-button align-self-end pb-2 align-self-md-center mx-2 pb-md-0 flex-nowrap w-25 w-md-fit-content h-md-fit-content\">\n <input type=\"checkbox\" class=\"btn-check\" id=\"btn-check-outlined\" autocomplete=\"off\">\n <label class=\"link-primary cursor-pointer text-decoration-underline\" (click)=\"onChangePositionClick()\"\n for=\"btn-check-outlined\">{{\n (isChangePositionVisible ? \"Close\" : \"Move to\") | translate }}</label>\n </div>\n </div>\n </form>\n </div>\n </div>\n </nav>\n <lib-navigation-bar *ngIf=\"isVisible && isChangePositionVisible\"></lib-navigation-bar>\n </div>\n <div *ngIf=\"isVisitor && isVisible\">\n <div class=\"visitor-div\">\n <div class=\"logo-container\" data-testid=\"dropdown-menu-button\">\n <img class=\"img-logo\" alt=\"SmarterPlanLogo\" src=\"../assets/images/logos/logo-reserve.png\">\n </div>\n <div class=\"avatar-container-menu\">\n <div class=\"profile_pic dropdown-toggle cursor-pointer\" data-bs-toggle=\"dropdown\">\n <lib-avatar></lib-avatar>\n </div>\n <div class=\"dropdown-menu dropdown-menu-right\">\n <button class=\"dropdown-item\" (click)=\"localeService.modal()\">{{'Language' | translate}}</button>\n <button class=\"dropdown-item\" (click)=\"openSupportForm()\">{{\"Help\" | translate}}</button>\n <button data-testid=\"logout-auth-btn\" class=\"dropdown-item\" (click)=\"signOut()\">{{\"Logout\" |\n translate}}</button>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: ["#menu-bar{position:sticky;top:0;z-index:200}.navbar{z-index:200}.navbar-brand{padding-top:5px;padding-bottom:5px;cursor:pointer}.navbar-brand img{height:70px}.profile_pic{border-radius:50%;height:45px;width:45px;margin:8px;border:.2px solid rgb(150,150,150)}.navbar-nav .profile-pic-container .dropdown-menu{position:absolute}.navbar.second-nav{z-index:199;background-color:var(--smarterplan-primary)}.profile_pic.dropdown-toggle:after{display:none}.navbar-light{border-bottom:1px solid var(--smarterplan-primary);background-color:#fff}.navbar form{width:100%;margin:0;padding:0}input,select{margin-right:15px}.select{background:transparent;border:none;color:#fff;margin:6px 20px 0;width:auto}button{padding:5px 10px}button:disabled,button[disabled]{color:#c04f4f}.navbar-toggler{margin-right:1em}.icon{height:40px;width:40px;color:var(--smarterplan-primary)}.search-button-container{width:auto;align-items:stretch;justify-items:start}.search-button-container .search-button{width:auto;border-radius:1rem!important}.visitor-div{background-color:var(--smarterplan-primary);height:60px;display:flex;justify-content:space-between}.profile_pic-container{margin-right:1em}.logo-container,.img-logo{height:100%}.change-position-button{margin-left:2rem}.change-position-button label,.change-position-button .btn-check:checked,.change-position-button .btn-check:focus,.change-position-button .btn-outline-primary,.change-position-button .btn{box-shadow:none!important;outline:0}.change-position-button label{border-radius:16px}.change-position-button .btn-check:checked+.btn{background-color:var(--smarterplan-primary);color:#fff!important}.filters-menu-block{width:auto}@media (min-width: 1200px){.navbar-brand img{height:100px}.profile_pic{height:60px;width:60px;margin:15px}}@media (min-width: 992px) and (max-width: 1199.98px){.navbar-brand img{height:80px}.profile_pic{height:50px;width:50px;margin:12px}}@media (min-width: 768px) and (max-width: 991.98px){.navbar-brand img{height:60px}.profile_pic{height:40px;width:40px;margin:10px}}@media (max-width: 767.98px){.navbar-brand img{height:50px}.profile_pic{height:30px;width:30px;margin:8px}.search-button-container,.filters-menu-block{width:100%}}.form-container{margin:.5rem 0}.navbar-collapse.show{display:flex;padding-bottom:.5rem}.hidden{width:0;margin:0;border:none;padding:0}.custom-day{text-align:center;padding:.185rem .25rem;display:inline-block;height:2rem;width:2rem}.custom-day.focused{background-color:#e6e6e6}.custom-day.range,.custom-day:hover{background-color:var(--smarterplan-primary-lighter);color:#fff}.custom-day.faded{background-color:var(--smarterplan-primary-transparent)}.calendar{height:100%}.appliedText,.appliedText span{color:var(--smarterplan-primary)}@media (max-width: 767px){.form-inline{flex-direction:column}}.hidden{opacity:0}.date-selector{flex-wrap:nowrap}.date-selector input{min-width:80px;margin:0}@media (min-width: 768px){.w-md-fit-content{width:fit-content!important}.h-md-content{height:fit-content!important}}\n"], dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$2.NgbCollapse, selector: "[ngbCollapse]", inputs: ["animation", "ngbCollapse", "horizontal"], outputs: ["ngbCollapseChange", "shown", "hidden"], exportAs: ["ngbCollapse"] }, { kind: "directive", type: i1$2.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["autoClose", "contentTemplate", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "popperOptions", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { kind: "directive", type: i1$3.IconDirective, selector: "ic-icon,[icIcon]", inputs: ["icIcon", "icon", "color", "inline", "box", "size", "width", "height", "align", "hFlip", "vFlip", "flip", "rotate"] }, { kind: "component", type: AvatarComponent, selector: "lib-avatar", inputs: ["size", "userID"] }, { kind: "component", type: NavigationBarComponent, selector: "lib-navigation-bar" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: FormatDateNumberToDigitsPipe, name: "formatDateNumberToDigits" }] });
|
|
18812
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MenuBarComponent, selector: "lib-menu-bar", inputs: { cacheName: "cacheName" }, ngImport: i0, template: "<div id=\"menu-bar\">\r\n <div *ngIf=\"!isVisitor\">\r\n <nav class=\"navbar navbar-expand-md navbar-light p-0\">\r\n <div class=\"container-fluid\" *ngIf=\"isVisible\">\r\n <div class=\"navbar-brand order-md-0\" [routerLink]=\"['/dashboard']\">\r\n <img alt=\"SmarterPlan\" src=\"../assets/images/logos/logo-immo.png\">\r\n </div>\r\n <div class=\"ms-auto nav-item dropdown profile_pic-container order-md-2\">\r\n <div class=\"profile_pic dropdown-toggle\" data-testid=\"dropdown-menu-button\" data-bs-toggle=\"dropdown\">\r\n <lib-avatar></lib-avatar>\r\n </div>\r\n <div class=\"dropdown-menu dropdown-menu-right\">\r\n <p *ngIf=\"user && mission\" class=\"p-2\">\r\n <span class=\"username\">{{ user.displayName }}</span><br />\r\n <span class=\"user-role\">{{ mission.role }}</span><br />\r\n <span class=\"org\">{{ mission.organisation ? mission.organisation.name : \"No organisation\" |\r\n translate}}</span>\r\n </p>\r\n <div class=\"dropdown-divider\"></div>\r\n <!-- <a class=\"dropdown-item\" routerLink=\"/debug\" *ngIf=\"isManager\">Debug</a> -->\r\n <a class=\"dropdown-item\" (click)=\"localeService.modal()\">{{'Language' | translate}}</a>\r\n <a class=\"dropdown-item\" routerLink=\"/dashboard\">{{'Data management' | translate}}</a>\r\n <a class=\"dropdown-item\" data-testid=\"user-management-btn\" routerLink=\"/admin\" *ngIf=\"isManager\">\r\n {{'Users management' | translate}}</a>\r\n <a class=\"dropdown-item\" routerLink=\"/profile\">\r\n {{'Profile' | translate}}</a>\r\n <div class=\"dropdown-divider\"></div>\r\n <button class=\"dropdown-item\" (click)=\"openSupportForm()\">{{\"Help\" | translate}}</button>\r\n <button data-testid=\"logout-auth-btn\" class=\"dropdown-item\" (click)=\"signOut()\">{{\"Logout\" |\r\n translate}}</button>\r\n </div>\r\n </div>\r\n <button class=\"navbar-toggler order-md-1\" (click)=\"navbarCollapse.toggle()\" type=\"button\"\r\n [attr.aria-expanded]=\"!isCollapsed\" aria-controls=\"navbar-collapse\">\r\n <span class=\"navbar-toggler-icon\"></span>\r\n </button>\r\n <div class=\"navbar-collapse order-md-1\" #navbarCollapse=\"ngbCollapse\" [(ngbCollapse)]=\"isCollapsed\"\r\n [animation]=\"false\">\r\n <form\r\n class=\"form-inline m-0 mt-2 form-container d-flex justify-content-start align-items-start align-items-md-center flex-column flex-md-row flex-nowrap filters-menu-block\">\r\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-0\">\r\n <input class=\"form-control search-button m-1\" placeholder=\"keyword\" id=\"mainSearchBar\" type=\"text\">\r\n <button class=\"btn btn-outline-primary rounded-pill m-1 w-fit-content h-fit-content align-self-md-center\"\r\n (click)=\"onSubmit()\">{{'Search' |\r\n translate}}</button>\r\n </div>\r\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-0\">\r\n <div class=\"input-group date-selector m-1\">\r\n <input #dpFromDate class=\"form-control\" placeholder=\"dd/MM/yyyy\" name=\"dpFromDate\"\r\n [value]=\"fromDate | formatDateNumberToDigits\"\r\n (input)=\"fromDate = validateInput(fromDate, dpFromDate.value)\">\r\n <div class=\"input-group-append\">\r\n <button class=\"btn btn-outline-secondary calendar\" (click)=\"datepicker.toggle()\"\r\n type=\"button\"></button>\r\n </div>\r\n </div>\r\n <input name=\"datepicker\" class=\"form-control visually-hidden\" ngbDatepicker #datepicker=\"ngbDatepicker\"\r\n [autoClose]=\"'outside'\" (dateSelect)=\"onDateSelection($event)\" [displayMonths]=\"2\" [dayTemplate]=\"t\"\r\n outsideDays=\"hidden\" [startDate]=\"fromDate || calendar.getToday()\" [container]=\"'body'\" tabindex=\"-1\">\r\n <ng-template #t let-date let-focused=\"focused\">\r\n <span class=\"custom-day\" [class.focused]=\"focused\" [class.range]=\"isRange(date)\"\r\n [class.faded]=\"isHovered(date) || isInside(date)\" (mouseenter)=\"hoveredDate = date\"\r\n (mouseleave)=\"hoveredDate = null\">\r\n {{ date.day }}\r\n </span>\r\n </ng-template>\r\n <span class=\"ms-1 p-2\">{{'to' | translate}}</span>\r\n <div class=\"input-group date-selector m-1\">\r\n <input #dpToDate class=\"form-control\" placeholder=\"dd/MM/yyyy\" name=\"dpToDate\"\r\n [value]=\"toDate | formatDateNumberToDigits\" (input)=\"toDate = validateInput(toDate, dpToDate.value)\">\r\n <div class=\"input-group-append\">\r\n <button class=\"btn btn-outline-secondary calendar\" (click)=\"datepicker.toggle()\"\r\n type=\"button\"></button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-1 justify-content-evenly\">\r\n <button\r\n class=\"btn btn-primary rounded-pill ms-1 w-25 w-md-fit-content h-md-fit-content align-self-md-center\"\r\n type=\"button\" (click)=\"onApply()\" *ngIf=\"!isDateFilterApplied || dateChanged\">\r\n {{'Apply' | translate}}\r\n </button>\r\n <span\r\n class=\"appliedText ms-1 py-2 align-self-md-center pb-md-0 mx-2 w-md-fit-content h-md-fit-content align-self-md-center\"\r\n *ngIf=\"isDateFilterApplied && !dateChanged\">\r\n <span class=\"iconify\" [icIcon]=\"checkIcon\" width=\"15\" height=\"15\"></span>\r\n {{\"Applied\" | translate}}\r\n </span>\r\n <button\r\n class=\"btn btn-outline-primary rounded-pill w-25 mx-2 w-md-fit-content h-md-fit-content align-self-md-center\"\r\n type=\"button\" (click)=\"onClearDates()\">{{'Clear'\r\n |\r\n translate}}</button>\r\n <div\r\n class=\"change-position-button align-self-end pb-2 align-self-md-center mx-2 pb-md-0 flex-nowrap w-25 w-md-fit-content h-md-fit-content\">\r\n <input type=\"checkbox\" class=\"btn-check\" id=\"btn-check-outlined\" autocomplete=\"off\">\r\n <label class=\"link-primary cursor-pointer text-decoration-underline\" (click)=\"onChangePositionClick()\"\r\n for=\"btn-check-outlined\">{{\r\n (isChangePositionVisible ? \"Close\" : \"Move to\") | translate }}</label>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </nav>\r\n <lib-navigation-bar *ngIf=\"isVisible && isChangePositionVisible\"></lib-navigation-bar>\r\n </div>\r\n <div *ngIf=\"isVisitor && isVisible\">\r\n <div class=\"visitor-div\">\r\n <div class=\"logo-container\" data-testid=\"dropdown-menu-button\">\r\n <img class=\"img-logo\" alt=\"SmarterPlanLogo\" src=\"../assets/images/logos/logo-reserve.png\">\r\n </div>\r\n <div class=\"avatar-container-menu\">\r\n <div class=\"profile_pic dropdown-toggle cursor-pointer\" data-bs-toggle=\"dropdown\">\r\n <lib-avatar></lib-avatar>\r\n </div>\r\n <div class=\"dropdown-menu dropdown-menu-right\">\r\n <button class=\"dropdown-item\" (click)=\"localeService.modal()\">{{'Language' | translate}}</button>\r\n <button class=\"dropdown-item\" (click)=\"openSupportForm()\">{{\"Help\" | translate}}</button>\r\n <button data-testid=\"logout-auth-btn\" class=\"dropdown-item\" (click)=\"signOut()\">{{\"Logout\" |\r\n translate}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: ["#menu-bar{position:sticky;top:0;z-index:200}.navbar{z-index:200}.navbar-brand{padding-top:5px;padding-bottom:5px;cursor:pointer}.navbar-brand img{height:70px}.profile_pic{border-radius:50%;height:45px;width:45px;margin:8px;border:.2px solid rgb(150,150,150)}.navbar-nav .profile-pic-container .dropdown-menu{position:absolute}.navbar.second-nav{z-index:199;background-color:var(--smarterplan-primary)}.profile_pic.dropdown-toggle:after{display:none}.navbar-light{border-bottom:1px solid var(--smarterplan-primary);background-color:#fff}.navbar form{width:100%;margin:0;padding:0}input,select{margin-right:15px}.select{background:transparent;border:none;color:#fff;margin:6px 20px 0;width:auto}button{padding:5px 10px}button:disabled,button[disabled]{color:#c04f4f}.navbar-toggler{margin-right:1em}.icon{height:40px;width:40px;color:var(--smarterplan-primary)}.search-button-container{width:auto;align-items:stretch;justify-items:start}.search-button-container .search-button{width:auto;border-radius:1rem!important}.visitor-div{background-color:var(--smarterplan-primary);height:60px;display:flex;justify-content:space-between}.profile_pic-container{margin-right:1em}.logo-container,.img-logo{height:100%}.change-position-button{margin-left:2rem}.change-position-button label,.change-position-button .btn-check:checked,.change-position-button .btn-check:focus,.change-position-button .btn-outline-primary,.change-position-button .btn{box-shadow:none!important;outline:0}.change-position-button label{border-radius:16px}.change-position-button .btn-check:checked+.btn{background-color:var(--smarterplan-primary);color:#fff!important}.filters-menu-block{width:auto}@media (min-width: 1200px){.navbar-brand img{height:100px}.profile_pic{height:60px;width:60px;margin:15px}}@media (min-width: 992px) and (max-width: 1199.98px){.navbar-brand img{height:80px}.profile_pic{height:50px;width:50px;margin:12px}}@media (min-width: 768px) and (max-width: 991.98px){.navbar-brand img{height:60px}.profile_pic{height:40px;width:40px;margin:10px}}@media (max-width: 767.98px){.navbar-brand img{height:50px}.profile_pic{height:30px;width:30px;margin:8px}.search-button-container,.filters-menu-block{width:100%}}.form-container{margin:.5rem 0}.navbar-collapse.show{display:flex;padding-bottom:.5rem}.hidden{width:0;margin:0;border:none;padding:0}.custom-day{text-align:center;padding:.185rem .25rem;display:inline-block;height:2rem;width:2rem}.custom-day.focused{background-color:#e6e6e6}.custom-day.range,.custom-day:hover{background-color:var(--smarterplan-primary-lighter);color:#fff}.custom-day.faded{background-color:var(--smarterplan-primary-transparent)}.calendar{height:100%}.appliedText,.appliedText span{color:var(--smarterplan-primary)}@media (max-width: 767px){.form-inline{flex-direction:column}}.hidden{opacity:0}.date-selector{flex-wrap:nowrap}.date-selector input{min-width:80px;margin:0}@media (min-width: 768px){.w-md-fit-content{width:fit-content!important}.h-md-content{height:fit-content!important}}\n"], dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$2.NgbCollapse, selector: "[ngbCollapse]", inputs: ["animation", "ngbCollapse", "horizontal"], outputs: ["ngbCollapseChange", "shown", "hidden"], exportAs: ["ngbCollapse"] }, { kind: "directive", type: i1$2.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["autoClose", "contentTemplate", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "popperOptions", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { kind: "directive", type: i1$3.IconDirective, selector: "ic-icon,[icIcon]", inputs: ["icIcon", "icon", "color", "inline", "box", "size", "width", "height", "align", "hFlip", "vFlip", "flip", "rotate"] }, { kind: "component", type: AvatarComponent, selector: "lib-avatar", inputs: ["size", "userID"] }, { kind: "component", type: NavigationBarComponent, selector: "lib-navigation-bar" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: FormatDateNumberToDigitsPipe, name: "formatDateNumberToDigits" }] });
|
|
18795
18813
|
}
|
|
18796
18814
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuBarComponent, decorators: [{
|
|
18797
18815
|
type: Component,
|
|
18798
|
-
args: [{ selector: 'lib-menu-bar', template: "<div id=\"menu-bar\">\n <div *ngIf=\"!isVisitor\">\n <nav class=\"navbar navbar-expand-md navbar-light p-0\">\n <div class=\"container-fluid\" *ngIf=\"isVisible\">\n <div class=\"navbar-brand order-md-0\" [routerLink]=\"['/dashboard']\">\n <img alt=\"SmarterPlan\" src=\"../assets/images/logos/logo-immo.png\">\n </div>\n <div class=\"ms-auto nav-item dropdown profile_pic-container order-md-2\">\n <div class=\"profile_pic dropdown-toggle\" data-testid=\"dropdown-menu-button\" data-bs-toggle=\"dropdown\">\n <lib-avatar></lib-avatar>\n </div>\n <div class=\"dropdown-menu dropdown-menu-right\">\n <p *ngIf=\"user && mission\" class=\"p-2\">\n <span class=\"username\">{{ user.displayName }}</span><br />\n <span class=\"user-role\">{{ mission.role }}</span><br />\n <span class=\"org\">{{ mission.organisation ? mission.organisation.name : \"No organisation\" |\n translate}}</span>\n </p>\n <div class=\"dropdown-divider\"></div>\n <!-- <a class=\"dropdown-item\" routerLink=\"/debug\" *ngIf=\"isManager\">Debug</a> -->\n <a class=\"dropdown-item\" (click)=\"localeService.modal()\">{{'Language' | translate}}</a>\n <a class=\"dropdown-item\" routerLink=\"/dashboard\">{{'Data management' | translate}}</a>\n <a class=\"dropdown-item\" data-testid=\"user-management-btn\" routerLink=\"/admin\" *ngIf=\"isManager\">\n {{'Users management' | translate}}</a>\n <a class=\"dropdown-item\" routerLink=\"/profile\">\n {{'Profile' | translate}}</a>\n <div class=\"dropdown-divider\"></div>\n <button class=\"dropdown-item\" (click)=\"openSupportForm()\">{{\"Help\" | translate}}</button>\n <button data-testid=\"logout-auth-btn\" class=\"dropdown-item\" (click)=\"signOut()\">{{\"Logout\" |\n translate}}</button>\n </div>\n </div>\n <button class=\"navbar-toggler order-md-1\" (click)=\"navbarCollapse.toggle()\" type=\"button\"\n [attr.aria-expanded]=\"!isCollapsed\" aria-controls=\"navbar-collapse\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"navbar-collapse order-md-1\" #navbarCollapse=\"ngbCollapse\" [(ngbCollapse)]=\"isCollapsed\"\n [animation]=\"false\">\n <form\n class=\"form-inline m-0 mt-2 form-container d-flex justify-content-start align-items-start align-items-md-center flex-column flex-md-row flex-nowrap filters-menu-block\">\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-0\">\n <input class=\"form-control search-button m-1\" placeholder=\"keyword\" id=\"mainSearchBar\" type=\"text\">\n <button class=\"btn btn-outline-primary rounded-pill m-1 w-fit-content h-fit-content align-self-md-center\"\n (click)=\"onSubmit()\">{{'Search' |\n translate}}</button>\n </div>\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-0\">\n <div class=\"input-group date-selector m-1\">\n <input #dpFromDate class=\"form-control\" placeholder=\"dd/MM/yyyy\" name=\"dpFromDate\"\n [value]=\"fromDate | formatDateNumberToDigits\"\n (input)=\"fromDate = validateInput(fromDate, dpFromDate.value)\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary calendar\" (click)=\"datepicker.toggle()\"\n type=\"button\"></button>\n </div>\n </div>\n <input name=\"datepicker\" class=\"form-control visually-hidden\" ngbDatepicker #datepicker=\"ngbDatepicker\"\n [autoClose]=\"'outside'\" (dateSelect)=\"onDateSelection($event)\" [displayMonths]=\"2\" [dayTemplate]=\"t\"\n outsideDays=\"hidden\" [startDate]=\"fromDate || calendar.getToday()\" [container]=\"'body'\" tabindex=\"-1\">\n <ng-template #t let-date let-focused=\"focused\">\n <span class=\"custom-day\" [class.focused]=\"focused\" [class.range]=\"isRange(date)\"\n [class.faded]=\"isHovered(date) || isInside(date)\" (mouseenter)=\"hoveredDate = date\"\n (mouseleave)=\"hoveredDate = null\">\n {{ date.day }}\n </span>\n </ng-template>\n <span class=\"ms-1 p-2\">{{'to' | translate}}</span>\n <div class=\"input-group date-selector m-1\">\n <input #dpToDate class=\"form-control\" placeholder=\"dd/MM/yyyy\" name=\"dpToDate\"\n [value]=\"toDate | formatDateNumberToDigits\" (input)=\"toDate = validateInput(toDate, dpToDate.value)\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary calendar\" (click)=\"datepicker.toggle()\"\n type=\"button\"></button>\n </div>\n </div>\n </div>\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-1 justify-content-evenly\">\n <button\n class=\"btn btn-primary rounded-pill ms-1 w-25 w-md-fit-content h-md-fit-content align-self-md-center\"\n type=\"button\" (click)=\"onApply()\" *ngIf=\"!isDateFilterApplied || dateChanged\">\n {{'Apply' | translate}}\n </button>\n <span\n class=\"appliedText ms-1 py-2 align-self-md-center pb-md-0 mx-2 w-md-fit-content h-md-fit-content align-self-md-center\"\n *ngIf=\"isDateFilterApplied && !dateChanged\">\n <span class=\"iconify\" [icIcon]=\"checkIcon\" width=\"15\" height=\"15\"></span>\n {{\"Applied\" | translate}}\n </span>\n <button\n class=\"btn btn-outline-primary rounded-pill w-25 mx-2 w-md-fit-content h-md-fit-content align-self-md-center\"\n type=\"button\" (click)=\"onClearDates()\">{{'Clear'\n |\n translate}}</button>\n <div\n class=\"change-position-button align-self-end pb-2 align-self-md-center mx-2 pb-md-0 flex-nowrap w-25 w-md-fit-content h-md-fit-content\">\n <input type=\"checkbox\" class=\"btn-check\" id=\"btn-check-outlined\" autocomplete=\"off\">\n <label class=\"link-primary cursor-pointer text-decoration-underline\" (click)=\"onChangePositionClick()\"\n for=\"btn-check-outlined\">{{\n (isChangePositionVisible ? \"Close\" : \"Move to\") | translate }}</label>\n </div>\n </div>\n </form>\n </div>\n </div>\n </nav>\n <lib-navigation-bar *ngIf=\"isVisible && isChangePositionVisible\"></lib-navigation-bar>\n </div>\n <div *ngIf=\"isVisitor && isVisible\">\n <div class=\"visitor-div\">\n <div class=\"logo-container\" data-testid=\"dropdown-menu-button\">\n <img class=\"img-logo\" alt=\"SmarterPlanLogo\" src=\"../assets/images/logos/logo-reserve.png\">\n </div>\n <div class=\"avatar-container-menu\">\n <div class=\"profile_pic dropdown-toggle cursor-pointer\" data-bs-toggle=\"dropdown\">\n <lib-avatar></lib-avatar>\n </div>\n <div class=\"dropdown-menu dropdown-menu-right\">\n <button class=\"dropdown-item\" (click)=\"localeService.modal()\">{{'Language' | translate}}</button>\n <button class=\"dropdown-item\" (click)=\"openSupportForm()\">{{\"Help\" | translate}}</button>\n <button data-testid=\"logout-auth-btn\" class=\"dropdown-item\" (click)=\"signOut()\">{{\"Logout\" |\n translate}}</button>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: ["#menu-bar{position:sticky;top:0;z-index:200}.navbar{z-index:200}.navbar-brand{padding-top:5px;padding-bottom:5px;cursor:pointer}.navbar-brand img{height:70px}.profile_pic{border-radius:50%;height:45px;width:45px;margin:8px;border:.2px solid rgb(150,150,150)}.navbar-nav .profile-pic-container .dropdown-menu{position:absolute}.navbar.second-nav{z-index:199;background-color:var(--smarterplan-primary)}.profile_pic.dropdown-toggle:after{display:none}.navbar-light{border-bottom:1px solid var(--smarterplan-primary);background-color:#fff}.navbar form{width:100%;margin:0;padding:0}input,select{margin-right:15px}.select{background:transparent;border:none;color:#fff;margin:6px 20px 0;width:auto}button{padding:5px 10px}button:disabled,button[disabled]{color:#c04f4f}.navbar-toggler{margin-right:1em}.icon{height:40px;width:40px;color:var(--smarterplan-primary)}.search-button-container{width:auto;align-items:stretch;justify-items:start}.search-button-container .search-button{width:auto;border-radius:1rem!important}.visitor-div{background-color:var(--smarterplan-primary);height:60px;display:flex;justify-content:space-between}.profile_pic-container{margin-right:1em}.logo-container,.img-logo{height:100%}.change-position-button{margin-left:2rem}.change-position-button label,.change-position-button .btn-check:checked,.change-position-button .btn-check:focus,.change-position-button .btn-outline-primary,.change-position-button .btn{box-shadow:none!important;outline:0}.change-position-button label{border-radius:16px}.change-position-button .btn-check:checked+.btn{background-color:var(--smarterplan-primary);color:#fff!important}.filters-menu-block{width:auto}@media (min-width: 1200px){.navbar-brand img{height:100px}.profile_pic{height:60px;width:60px;margin:15px}}@media (min-width: 992px) and (max-width: 1199.98px){.navbar-brand img{height:80px}.profile_pic{height:50px;width:50px;margin:12px}}@media (min-width: 768px) and (max-width: 991.98px){.navbar-brand img{height:60px}.profile_pic{height:40px;width:40px;margin:10px}}@media (max-width: 767.98px){.navbar-brand img{height:50px}.profile_pic{height:30px;width:30px;margin:8px}.search-button-container,.filters-menu-block{width:100%}}.form-container{margin:.5rem 0}.navbar-collapse.show{display:flex;padding-bottom:.5rem}.hidden{width:0;margin:0;border:none;padding:0}.custom-day{text-align:center;padding:.185rem .25rem;display:inline-block;height:2rem;width:2rem}.custom-day.focused{background-color:#e6e6e6}.custom-day.range,.custom-day:hover{background-color:var(--smarterplan-primary-lighter);color:#fff}.custom-day.faded{background-color:var(--smarterplan-primary-transparent)}.calendar{height:100%}.appliedText,.appliedText span{color:var(--smarterplan-primary)}@media (max-width: 767px){.form-inline{flex-direction:column}}.hidden{opacity:0}.date-selector{flex-wrap:nowrap}.date-selector input{min-width:80px;margin:0}@media (min-width: 768px){.w-md-fit-content{width:fit-content!important}.h-md-content{height:fit-content!important}}\n"] }]
|
|
18816
|
+
args: [{ selector: 'lib-menu-bar', template: "<div id=\"menu-bar\">\r\n <div *ngIf=\"!isVisitor\">\r\n <nav class=\"navbar navbar-expand-md navbar-light p-0\">\r\n <div class=\"container-fluid\" *ngIf=\"isVisible\">\r\n <div class=\"navbar-brand order-md-0\" [routerLink]=\"['/dashboard']\">\r\n <img alt=\"SmarterPlan\" src=\"../assets/images/logos/logo-immo.png\">\r\n </div>\r\n <div class=\"ms-auto nav-item dropdown profile_pic-container order-md-2\">\r\n <div class=\"profile_pic dropdown-toggle\" data-testid=\"dropdown-menu-button\" data-bs-toggle=\"dropdown\">\r\n <lib-avatar></lib-avatar>\r\n </div>\r\n <div class=\"dropdown-menu dropdown-menu-right\">\r\n <p *ngIf=\"user && mission\" class=\"p-2\">\r\n <span class=\"username\">{{ user.displayName }}</span><br />\r\n <span class=\"user-role\">{{ mission.role }}</span><br />\r\n <span class=\"org\">{{ mission.organisation ? mission.organisation.name : \"No organisation\" |\r\n translate}}</span>\r\n </p>\r\n <div class=\"dropdown-divider\"></div>\r\n <!-- <a class=\"dropdown-item\" routerLink=\"/debug\" *ngIf=\"isManager\">Debug</a> -->\r\n <a class=\"dropdown-item\" (click)=\"localeService.modal()\">{{'Language' | translate}}</a>\r\n <a class=\"dropdown-item\" routerLink=\"/dashboard\">{{'Data management' | translate}}</a>\r\n <a class=\"dropdown-item\" data-testid=\"user-management-btn\" routerLink=\"/admin\" *ngIf=\"isManager\">\r\n {{'Users management' | translate}}</a>\r\n <a class=\"dropdown-item\" routerLink=\"/profile\">\r\n {{'Profile' | translate}}</a>\r\n <div class=\"dropdown-divider\"></div>\r\n <button class=\"dropdown-item\" (click)=\"openSupportForm()\">{{\"Help\" | translate}}</button>\r\n <button data-testid=\"logout-auth-btn\" class=\"dropdown-item\" (click)=\"signOut()\">{{\"Logout\" |\r\n translate}}</button>\r\n </div>\r\n </div>\r\n <button class=\"navbar-toggler order-md-1\" (click)=\"navbarCollapse.toggle()\" type=\"button\"\r\n [attr.aria-expanded]=\"!isCollapsed\" aria-controls=\"navbar-collapse\">\r\n <span class=\"navbar-toggler-icon\"></span>\r\n </button>\r\n <div class=\"navbar-collapse order-md-1\" #navbarCollapse=\"ngbCollapse\" [(ngbCollapse)]=\"isCollapsed\"\r\n [animation]=\"false\">\r\n <form\r\n class=\"form-inline m-0 mt-2 form-container d-flex justify-content-start align-items-start align-items-md-center flex-column flex-md-row flex-nowrap filters-menu-block\">\r\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-0\">\r\n <input class=\"form-control search-button m-1\" placeholder=\"keyword\" id=\"mainSearchBar\" type=\"text\">\r\n <button class=\"btn btn-outline-primary rounded-pill m-1 w-fit-content h-fit-content align-self-md-center\"\r\n (click)=\"onSubmit()\">{{'Search' |\r\n translate}}</button>\r\n </div>\r\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-0\">\r\n <div class=\"input-group date-selector m-1\">\r\n <input #dpFromDate class=\"form-control\" placeholder=\"dd/MM/yyyy\" name=\"dpFromDate\"\r\n [value]=\"fromDate | formatDateNumberToDigits\"\r\n (input)=\"fromDate = validateInput(fromDate, dpFromDate.value)\">\r\n <div class=\"input-group-append\">\r\n <button class=\"btn btn-outline-secondary calendar\" (click)=\"datepicker.toggle()\"\r\n type=\"button\"></button>\r\n </div>\r\n </div>\r\n <input name=\"datepicker\" class=\"form-control visually-hidden\" ngbDatepicker #datepicker=\"ngbDatepicker\"\r\n [autoClose]=\"'outside'\" (dateSelect)=\"onDateSelection($event)\" [displayMonths]=\"2\" [dayTemplate]=\"t\"\r\n outsideDays=\"hidden\" [startDate]=\"fromDate || calendar.getToday()\" [container]=\"'body'\" tabindex=\"-1\">\r\n <ng-template #t let-date let-focused=\"focused\">\r\n <span class=\"custom-day\" [class.focused]=\"focused\" [class.range]=\"isRange(date)\"\r\n [class.faded]=\"isHovered(date) || isInside(date)\" (mouseenter)=\"hoveredDate = date\"\r\n (mouseleave)=\"hoveredDate = null\">\r\n {{ date.day }}\r\n </span>\r\n </ng-template>\r\n <span class=\"ms-1 p-2\">{{'to' | translate}}</span>\r\n <div class=\"input-group date-selector m-1\">\r\n <input #dpToDate class=\"form-control\" placeholder=\"dd/MM/yyyy\" name=\"dpToDate\"\r\n [value]=\"toDate | formatDateNumberToDigits\" (input)=\"toDate = validateInput(toDate, dpToDate.value)\">\r\n <div class=\"input-group-append\">\r\n <button class=\"btn btn-outline-secondary calendar\" (click)=\"datepicker.toggle()\"\r\n type=\"button\"></button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-1 justify-content-evenly\">\r\n <button\r\n class=\"btn btn-primary rounded-pill ms-1 w-25 w-md-fit-content h-md-fit-content align-self-md-center\"\r\n type=\"button\" (click)=\"onApply()\" *ngIf=\"!isDateFilterApplied || dateChanged\">\r\n {{'Apply' | translate}}\r\n </button>\r\n <span\r\n class=\"appliedText ms-1 py-2 align-self-md-center pb-md-0 mx-2 w-md-fit-content h-md-fit-content align-self-md-center\"\r\n *ngIf=\"isDateFilterApplied && !dateChanged\">\r\n <span class=\"iconify\" [icIcon]=\"checkIcon\" width=\"15\" height=\"15\"></span>\r\n {{\"Applied\" | translate}}\r\n </span>\r\n <button\r\n class=\"btn btn-outline-primary rounded-pill w-25 mx-2 w-md-fit-content h-md-fit-content align-self-md-center\"\r\n type=\"button\" (click)=\"onClearDates()\">{{'Clear'\r\n |\r\n translate}}</button>\r\n <div\r\n class=\"change-position-button align-self-end pb-2 align-self-md-center mx-2 pb-md-0 flex-nowrap w-25 w-md-fit-content h-md-fit-content\">\r\n <input type=\"checkbox\" class=\"btn-check\" id=\"btn-check-outlined\" autocomplete=\"off\">\r\n <label class=\"link-primary cursor-pointer text-decoration-underline\" (click)=\"onChangePositionClick()\"\r\n for=\"btn-check-outlined\">{{\r\n (isChangePositionVisible ? \"Close\" : \"Move to\") | translate }}</label>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </nav>\r\n <lib-navigation-bar *ngIf=\"isVisible && isChangePositionVisible\"></lib-navigation-bar>\r\n </div>\r\n <div *ngIf=\"isVisitor && isVisible\">\r\n <div class=\"visitor-div\">\r\n <div class=\"logo-container\" data-testid=\"dropdown-menu-button\">\r\n <img class=\"img-logo\" alt=\"SmarterPlanLogo\" src=\"../assets/images/logos/logo-reserve.png\">\r\n </div>\r\n <div class=\"avatar-container-menu\">\r\n <div class=\"profile_pic dropdown-toggle cursor-pointer\" data-bs-toggle=\"dropdown\">\r\n <lib-avatar></lib-avatar>\r\n </div>\r\n <div class=\"dropdown-menu dropdown-menu-right\">\r\n <button class=\"dropdown-item\" (click)=\"localeService.modal()\">{{'Language' | translate}}</button>\r\n <button class=\"dropdown-item\" (click)=\"openSupportForm()\">{{\"Help\" | translate}}</button>\r\n <button data-testid=\"logout-auth-btn\" class=\"dropdown-item\" (click)=\"signOut()\">{{\"Logout\" |\r\n translate}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: ["#menu-bar{position:sticky;top:0;z-index:200}.navbar{z-index:200}.navbar-brand{padding-top:5px;padding-bottom:5px;cursor:pointer}.navbar-brand img{height:70px}.profile_pic{border-radius:50%;height:45px;width:45px;margin:8px;border:.2px solid rgb(150,150,150)}.navbar-nav .profile-pic-container .dropdown-menu{position:absolute}.navbar.second-nav{z-index:199;background-color:var(--smarterplan-primary)}.profile_pic.dropdown-toggle:after{display:none}.navbar-light{border-bottom:1px solid var(--smarterplan-primary);background-color:#fff}.navbar form{width:100%;margin:0;padding:0}input,select{margin-right:15px}.select{background:transparent;border:none;color:#fff;margin:6px 20px 0;width:auto}button{padding:5px 10px}button:disabled,button[disabled]{color:#c04f4f}.navbar-toggler{margin-right:1em}.icon{height:40px;width:40px;color:var(--smarterplan-primary)}.search-button-container{width:auto;align-items:stretch;justify-items:start}.search-button-container .search-button{width:auto;border-radius:1rem!important}.visitor-div{background-color:var(--smarterplan-primary);height:60px;display:flex;justify-content:space-between}.profile_pic-container{margin-right:1em}.logo-container,.img-logo{height:100%}.change-position-button{margin-left:2rem}.change-position-button label,.change-position-button .btn-check:checked,.change-position-button .btn-check:focus,.change-position-button .btn-outline-primary,.change-position-button .btn{box-shadow:none!important;outline:0}.change-position-button label{border-radius:16px}.change-position-button .btn-check:checked+.btn{background-color:var(--smarterplan-primary);color:#fff!important}.filters-menu-block{width:auto}@media (min-width: 1200px){.navbar-brand img{height:100px}.profile_pic{height:60px;width:60px;margin:15px}}@media (min-width: 992px) and (max-width: 1199.98px){.navbar-brand img{height:80px}.profile_pic{height:50px;width:50px;margin:12px}}@media (min-width: 768px) and (max-width: 991.98px){.navbar-brand img{height:60px}.profile_pic{height:40px;width:40px;margin:10px}}@media (max-width: 767.98px){.navbar-brand img{height:50px}.profile_pic{height:30px;width:30px;margin:8px}.search-button-container,.filters-menu-block{width:100%}}.form-container{margin:.5rem 0}.navbar-collapse.show{display:flex;padding-bottom:.5rem}.hidden{width:0;margin:0;border:none;padding:0}.custom-day{text-align:center;padding:.185rem .25rem;display:inline-block;height:2rem;width:2rem}.custom-day.focused{background-color:#e6e6e6}.custom-day.range,.custom-day:hover{background-color:var(--smarterplan-primary-lighter);color:#fff}.custom-day.faded{background-color:var(--smarterplan-primary-transparent)}.calendar{height:100%}.appliedText,.appliedText span{color:var(--smarterplan-primary)}@media (max-width: 767px){.form-inline{flex-direction:column}}.hidden{opacity:0}.date-selector{flex-wrap:nowrap}.date-selector input{min-width:80px;margin:0}@media (min-width: 768px){.w-md-fit-content{width:fit-content!important}.h-md-content{height:fit-content!important}}\n"] }]
|
|
18799
18817
|
}], ctorParameters: () => [{ type: i1.Router }, { type: LocaleService }, { type: BaseUserService }, { type: NavigatorService }, { type: SupportService }, { type: BaseVisibilityService }, { type: i1$2.NgbCalendar }, { type: i1$2.NgbDateParserFormatter }, { type: FilterService }, { type: AmplifyCacheService }], propDecorators: { cacheName: [{
|
|
18800
18818
|
type: Input
|
|
18801
18819
|
}] } });
|
|
@@ -19223,8 +19241,8 @@ class InventoryService {
|
|
|
19223
19241
|
}
|
|
19224
19242
|
/** The space's inventories, the latest first. */
|
|
19225
19243
|
async getRuns(spaceID) {
|
|
19226
|
-
const query = (fields) => `query InventoriesBySpace($spaceID: ID!, $limit: Int) {
|
|
19227
|
-
inventoriesBySpace(spaceID: $spaceID, limit: $limit) { items { ${fields} } }
|
|
19244
|
+
const query = (fields) => `query InventoriesBySpace($spaceID: ID!, $limit: Int) {
|
|
19245
|
+
inventoriesBySpace(spaceID: $spaceID, limit: $limit) { items { ${fields} } }
|
|
19228
19246
|
}`;
|
|
19229
19247
|
let response;
|
|
19230
19248
|
try {
|
|
@@ -19605,11 +19623,11 @@ class InventoryRunsComponent {
|
|
|
19605
19623
|
}
|
|
19606
19624
|
}
|
|
19607
19625
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InventoryRunsComponent, deps: [{ token: InventoryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
19608
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: InventoryRunsComponent, selector: "lib-inventory-runs", inputs: { spaceID: "spaceID", nodeIDs: "nodeIDs", labels: "labels" }, outputs: { runningChange: "runningChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"inventory-runs\" *ngIf=\"runs.length\">\n <h5>{{'Last inventory' | translate}}</h5>\n <div class=\"inventory-run\" *ngFor=\"let run of runs\">\n <div class=\"inventory-run-header\">\n <span class=\"no-lowercase\">{{ labels?.[run.nodeID] ?? run.nodeID }}</span>\n <span class=\"inventory-run-date\">{{ run.createdAt | date:'short' }}</span>\n </div>\n <!-- One that places a finished inventory's detections again: no panorama is analysed. -->\n <div class=\"inventory-run-reused\" *ngIf=\"reusedFrom(run) as source\">\n {{ 'Detections of {{date}} placed again with another cutoff: no panorama is analysed.' | translate: { date: (source.createdAt | date:'short') } }}\n <span class=\"inventory-run-detail\">\n {{ 'Cutoff {{before}} \u2192 {{now}}' | translate: { before: source.cutoffScore, now: run.cutoffScore } }}<ng-container\n *ngIf=\"source.objectsFound != null\">. {{ 'Equipment before' | translate }}: {{ source.objectsFound }}</ng-container>\n </span>\n </div>\n <ng-container [ngSwitch]=\"inventoryService.state(run)\">\n <div *ngSwitchCase=\"'waiting'\">\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\n {{ (reusedFrom(run) ? 'Starting the task on AWS\u2026' : 'Waiting for the analysis to start\u2026') | translate }}\n </div>\n <div *ngSwitchCase=\"'running'\">\n <ng-container [ngSwitch]=\"run.step\">\n <div *ngSwitchCase=\"'DOWNLOADING'\">\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\n {{ (reusedFrom(run) ? 'Taking the saved detections and the panoramas\u2026' : 'Downloading the files of the visit\u2026') | translate }}\n </div>\n <div *ngSwitchCase=\"'PLACING'\">\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\n {{'Placing the objects in 3D\u2026' | translate}}\n </div>\n <div *ngSwitchCase=\"'SAVING'\">\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\n {{'Saving the equipment\u2026' | translate}}\n </div>\n <!-- Nothing to analyse: the objects above the new cutoff are counted at once. -->\n <div *ngSwitchDefault>\n <ng-container *ngIf=\"reusedFrom(run); else analysing\">\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\n <span *ngIf=\"run.objectsFound != null\">\n {{ 'Objects above the cutoff of {{cutoff}}' | translate: { cutoff: run.cutoffScore } }}: {{ run.objectsFound }}\n </span>\n </ng-container>\n </div>\n <ng-template #analysing>\n <ng-container *ngTemplateOutlet=\"panoramas; context: { $implicit: run }\"></ng-container>\n <span class=\"inventory-run-detail\" *ngIf=\"minutesLeft(run) as minutes\">\n {{'About' | translate}} {{ minutes }} {{'min left' | translate}}\n </span>\n <!-- Counted by the image that detects down to a floor; null from older ones. -->\n <span class=\"inventory-run-detail\" *ngIf=\"run.objectsFound != null\">\n {{ 'Objects above the cutoff of {{cutoff}} so far' | translate: { cutoff: run.cutoffScore } }}: {{ run.objectsFound }}\n </span>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"inventoryService.canCancel(run)\">\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill mt-2\"\n *ngIf=\"confirmingCancel !== run.id\" (click)=\"confirmingCancel = run.id\">\n {{'Cancel the inventory' | translate}}</button>\n <div class=\"inventory-run-confirm\" *ngIf=\"confirmingCancel === run.id\">\n <span>{{'It stops after the panorama it is on. Those analysed are kept, to resume from there.' | translate}}</span>\n <div class=\"mt-1\">\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill me-2\"\n [disabled]=\"busy === run.id\" (click)=\"onConfirmCancel(run)\">\n {{'Yes, cancel' | translate}}</button>\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill\"\n [disabled]=\"busy === run.id\" (click)=\"confirmingCancel = null\">\n {{'No, go on' | translate}}</button>\n </div>\n </div>\n </ng-container>\n </div>\n <div *ngSwitchCase=\"'cancelling'\" class=\"text-warning\">\n <ng-container *ngTemplateOutlet=\"panoramas; context: { $implicit: run }\"></ng-container>\n {{'Cancelling: it stops after the panorama it is on\u2026' | translate}}\n </div>\n <div *ngSwitchCase=\"'cancelled'\">\n <span class=\"text-warning\">{{'Cancelled' | translate}}.</span>\n <span class=\"inventory-run-detail\" *ngIf=\"run.imagesTotal\">\n {{'Panoramas analysed' | translate}}: {{ run.imagesDone ?? 0 }} / {{ run.imagesTotal }}\n </span>\n </div>\n <div *ngSwitchCase=\"'done'\" class=\"text-success\">\n <!-- How many, when the task says so: the image before inventory_job.py does not. -->\n <ng-container *ngIf=\"run.objectsFound != null; else doneOnly\">\n {{'Done' | translate}}: {{ run.objectsFound }} {{'equipment added' | translate}}.\n </ng-container>\n <ng-template #doneOnly>{{'Done' | translate}}.</ng-template>\n <span class=\"inventory-run-detail\">{{'Reload the page to see them in the list.' | translate}}</span>\n </div>\n <div *ngSwitchCase=\"'failed'\" class=\"text-danger\">\n {{ inventoryService.failure(run) | translate }}\n <span class=\"inventory-run-detail\" *ngIf=\"run.errorMessage\">{{ run.errorMessage }}</span>\n </div>\n <div *ngSwitchCase=\"'stale'\" class=\"text-warning\">\n {{'No news since' | translate}} {{ run.updatedAt | date:'short' }}:\n {{'the analysis has probably stopped.' | translate}}\n </div>\n </ng-container>\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill mt-2\"\n *ngIf=\"inventoryService.canResume(run)\" [disabled]=\"busy === run.id\" (click)=\"onResume(run)\">\n {{'Resume from where it stopped' | translate}} ({{ run.imagesDone }} / {{ run.imagesTotal }})</button>\n </div>\n <div class=\"text-danger\" *ngIf=\"message\">{{ message | translate }}</div>\n</div>\n\n<!-- Something is being done, of which there is nothing to count. -->\n<ng-template #busyBar>\n <div class=\"progress mb-1\" role=\"progressbar\" aria-label=\"\u2026\">\n <div class=\"progress-bar progress-bar-striped progress-bar-animated\" style=\"width: 100%\"></div>\n </div>\n</ng-template>\n\n<ng-template #panoramas let-run>\n <div class=\"progress\" role=\"progressbar\" [attr.aria-valuenow]=\"inventoryService.percent(run)\"\n aria-valuemin=\"0\" aria-valuemax=\"100\">\n <div class=\"progress-bar\" [style.width.%]=\"inventoryService.percent(run)\"></div>\n </div>\n <div class=\"inventory-run-detail\">\n {{'Panoramas analysed' | translate}}: {{ run.imagesDone ?? 0 }} / {{ run.imagesTotal }}\n ({{ inventoryService.percent(run) }}%)\n </div>\n</ng-template>\n", styles: [".inventory-runs{margin-top:1em}.inventory-runs h5{color:var(--smarterplan-primary)}.inventory-runs .inventory-run{background-color:#fff;border-radius:.25rem;padding:.5rem;margin-bottom:.5rem}.inventory-runs .inventory-run .inventory-run-header{display:flex;justify-content:space-between;gap:.5rem;margin-bottom:.25rem}.inventory-runs .inventory-run .inventory-run-date,.inventory-runs .inventory-run .inventory-run-detail{font-size:.8rem;color:#6c757d}.inventory-runs .inventory-run .inventory-run-detail{display:block}.inventory-runs .inventory-run .inventory-run-reused{font-size:.85rem;margin-bottom:.25rem}.inventory-runs .inventory-run .progress-bar{background-color:var(--smarterplan-primary)}.inventory-runs .inventory-run .inventory-run-confirm{margin-top:.5rem;font-size:.85rem}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
19626
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: InventoryRunsComponent, selector: "lib-inventory-runs", inputs: { spaceID: "spaceID", nodeIDs: "nodeIDs", labels: "labels" }, outputs: { runningChange: "runningChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"inventory-runs\" *ngIf=\"runs.length\">\r\n <h5>{{'Last inventory' | translate}}</h5>\r\n <div class=\"inventory-run\" *ngFor=\"let run of runs\">\r\n <div class=\"inventory-run-header\">\r\n <span class=\"no-lowercase\">{{ labels?.[run.nodeID] ?? run.nodeID }}</span>\r\n <span class=\"inventory-run-date\">{{ run.createdAt | date:'short' }}</span>\r\n </div>\r\n <!-- One that places a finished inventory's detections again: no panorama is analysed. -->\r\n <div class=\"inventory-run-reused\" *ngIf=\"reusedFrom(run) as source\">\r\n {{ 'Detections of {{date}} placed again with another cutoff: no panorama is analysed.' | translate: { date: (source.createdAt | date:'short') } }}\r\n <span class=\"inventory-run-detail\">\r\n {{ 'Cutoff {{before}} \u2192 {{now}}' | translate: { before: source.cutoffScore, now: run.cutoffScore } }}<ng-container\r\n *ngIf=\"source.objectsFound != null\">. {{ 'Equipment before' | translate }}: {{ source.objectsFound }}</ng-container>\r\n </span>\r\n </div>\r\n <ng-container [ngSwitch]=\"inventoryService.state(run)\">\r\n <div *ngSwitchCase=\"'waiting'\">\r\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\r\n {{ (reusedFrom(run) ? 'Starting the task on AWS\u2026' : 'Waiting for the analysis to start\u2026') | translate }}\r\n </div>\r\n <div *ngSwitchCase=\"'running'\">\r\n <ng-container [ngSwitch]=\"run.step\">\r\n <div *ngSwitchCase=\"'DOWNLOADING'\">\r\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\r\n {{ (reusedFrom(run) ? 'Taking the saved detections and the panoramas\u2026' : 'Downloading the files of the visit\u2026') | translate }}\r\n </div>\r\n <div *ngSwitchCase=\"'PLACING'\">\r\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\r\n {{'Placing the objects in 3D\u2026' | translate}}\r\n </div>\r\n <div *ngSwitchCase=\"'SAVING'\">\r\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\r\n {{'Saving the equipment\u2026' | translate}}\r\n </div>\r\n <!-- Nothing to analyse: the objects above the new cutoff are counted at once. -->\r\n <div *ngSwitchDefault>\r\n <ng-container *ngIf=\"reusedFrom(run); else analysing\">\r\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\r\n <span *ngIf=\"run.objectsFound != null\">\r\n {{ 'Objects above the cutoff of {{cutoff}}' | translate: { cutoff: run.cutoffScore } }}: {{ run.objectsFound }}\r\n </span>\r\n </ng-container>\r\n </div>\r\n <ng-template #analysing>\r\n <ng-container *ngTemplateOutlet=\"panoramas; context: { $implicit: run }\"></ng-container>\r\n <span class=\"inventory-run-detail\" *ngIf=\"minutesLeft(run) as minutes\">\r\n {{'About' | translate}} {{ minutes }} {{'min left' | translate}}\r\n </span>\r\n <!-- Counted by the image that detects down to a floor; null from older ones. -->\r\n <span class=\"inventory-run-detail\" *ngIf=\"run.objectsFound != null\">\r\n {{ 'Objects above the cutoff of {{cutoff}} so far' | translate: { cutoff: run.cutoffScore } }}: {{ run.objectsFound }}\r\n </span>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngIf=\"inventoryService.canCancel(run)\">\r\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill mt-2\"\r\n *ngIf=\"confirmingCancel !== run.id\" (click)=\"confirmingCancel = run.id\">\r\n {{'Cancel the inventory' | translate}}</button>\r\n <div class=\"inventory-run-confirm\" *ngIf=\"confirmingCancel === run.id\">\r\n <span>{{'It stops after the panorama it is on. Those analysed are kept, to resume from there.' | translate}}</span>\r\n <div class=\"mt-1\">\r\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill me-2\"\r\n [disabled]=\"busy === run.id\" (click)=\"onConfirmCancel(run)\">\r\n {{'Yes, cancel' | translate}}</button>\r\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill\"\r\n [disabled]=\"busy === run.id\" (click)=\"confirmingCancel = null\">\r\n {{'No, go on' | translate}}</button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div *ngSwitchCase=\"'cancelling'\" class=\"text-warning\">\r\n <ng-container *ngTemplateOutlet=\"panoramas; context: { $implicit: run }\"></ng-container>\r\n {{'Cancelling: it stops after the panorama it is on\u2026' | translate}}\r\n </div>\r\n <div *ngSwitchCase=\"'cancelled'\">\r\n <span class=\"text-warning\">{{'Cancelled' | translate}}.</span>\r\n <span class=\"inventory-run-detail\" *ngIf=\"run.imagesTotal\">\r\n {{'Panoramas analysed' | translate}}: {{ run.imagesDone ?? 0 }} / {{ run.imagesTotal }}\r\n </span>\r\n </div>\r\n <div *ngSwitchCase=\"'done'\" class=\"text-success\">\r\n <!-- How many, when the task says so: the image before inventory_job.py does not. -->\r\n <ng-container *ngIf=\"run.objectsFound != null; else doneOnly\">\r\n {{'Done' | translate}}: {{ run.objectsFound }} {{'equipment added' | translate}}.\r\n </ng-container>\r\n <ng-template #doneOnly>{{'Done' | translate}}.</ng-template>\r\n <span class=\"inventory-run-detail\">{{'Reload the page to see them in the list.' | translate}}</span>\r\n </div>\r\n <div *ngSwitchCase=\"'failed'\" class=\"text-danger\">\r\n {{ inventoryService.failure(run) | translate }}\r\n <span class=\"inventory-run-detail\" *ngIf=\"run.errorMessage\">{{ run.errorMessage }}</span>\r\n </div>\r\n <div *ngSwitchCase=\"'stale'\" class=\"text-warning\">\r\n {{'No news since' | translate}} {{ run.updatedAt | date:'short' }}:\r\n {{'the analysis has probably stopped.' | translate}}\r\n </div>\r\n </ng-container>\r\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill mt-2\"\r\n *ngIf=\"inventoryService.canResume(run)\" [disabled]=\"busy === run.id\" (click)=\"onResume(run)\">\r\n {{'Resume from where it stopped' | translate}} ({{ run.imagesDone }} / {{ run.imagesTotal }})</button>\r\n </div>\r\n <div class=\"text-danger\" *ngIf=\"message\">{{ message | translate }}</div>\r\n</div>\r\n\r\n<!-- Something is being done, of which there is nothing to count. -->\r\n<ng-template #busyBar>\r\n <div class=\"progress mb-1\" role=\"progressbar\" aria-label=\"\u2026\">\r\n <div class=\"progress-bar progress-bar-striped progress-bar-animated\" style=\"width: 100%\"></div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #panoramas let-run>\r\n <div class=\"progress\" role=\"progressbar\" [attr.aria-valuenow]=\"inventoryService.percent(run)\"\r\n aria-valuemin=\"0\" aria-valuemax=\"100\">\r\n <div class=\"progress-bar\" [style.width.%]=\"inventoryService.percent(run)\"></div>\r\n </div>\r\n <div class=\"inventory-run-detail\">\r\n {{'Panoramas analysed' | translate}}: {{ run.imagesDone ?? 0 }} / {{ run.imagesTotal }}\r\n ({{ inventoryService.percent(run) }}%)\r\n </div>\r\n</ng-template>\r\n", styles: [".inventory-runs{margin-top:1em}.inventory-runs h5{color:var(--smarterplan-primary)}.inventory-runs .inventory-run{background-color:#fff;border-radius:.25rem;padding:.5rem;margin-bottom:.5rem}.inventory-runs .inventory-run .inventory-run-header{display:flex;justify-content:space-between;gap:.5rem;margin-bottom:.25rem}.inventory-runs .inventory-run .inventory-run-date,.inventory-runs .inventory-run .inventory-run-detail{font-size:.8rem;color:#6c757d}.inventory-runs .inventory-run .inventory-run-detail{display:block}.inventory-runs .inventory-run .inventory-run-reused{font-size:.85rem;margin-bottom:.25rem}.inventory-runs .inventory-run .progress-bar{background-color:var(--smarterplan-primary)}.inventory-runs .inventory-run .inventory-run-confirm{margin-top:.5rem;font-size:.85rem}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
19609
19627
|
}
|
|
19610
19628
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InventoryRunsComponent, decorators: [{
|
|
19611
19629
|
type: Component,
|
|
19612
|
-
args: [{ selector: "lib-inventory-runs", template: "<div class=\"inventory-runs\" *ngIf=\"runs.length\">\n <h5>{{'Last inventory' | translate}}</h5>\n <div class=\"inventory-run\" *ngFor=\"let run of runs\">\n <div class=\"inventory-run-header\">\n <span class=\"no-lowercase\">{{ labels?.[run.nodeID] ?? run.nodeID }}</span>\n <span class=\"inventory-run-date\">{{ run.createdAt | date:'short' }}</span>\n </div>\n <!-- One that places a finished inventory's detections again: no panorama is analysed. -->\n <div class=\"inventory-run-reused\" *ngIf=\"reusedFrom(run) as source\">\n {{ 'Detections of {{date}} placed again with another cutoff: no panorama is analysed.' | translate: { date: (source.createdAt | date:'short') } }}\n <span class=\"inventory-run-detail\">\n {{ 'Cutoff {{before}} \u2192 {{now}}' | translate: { before: source.cutoffScore, now: run.cutoffScore } }}<ng-container\n *ngIf=\"source.objectsFound != null\">. {{ 'Equipment before' | translate }}: {{ source.objectsFound }}</ng-container>\n </span>\n </div>\n <ng-container [ngSwitch]=\"inventoryService.state(run)\">\n <div *ngSwitchCase=\"'waiting'\">\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\n {{ (reusedFrom(run) ? 'Starting the task on AWS\u2026' : 'Waiting for the analysis to start\u2026') | translate }}\n </div>\n <div *ngSwitchCase=\"'running'\">\n <ng-container [ngSwitch]=\"run.step\">\n <div *ngSwitchCase=\"'DOWNLOADING'\">\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\n {{ (reusedFrom(run) ? 'Taking the saved detections and the panoramas\u2026' : 'Downloading the files of the visit\u2026') | translate }}\n </div>\n <div *ngSwitchCase=\"'PLACING'\">\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\n {{'Placing the objects in 3D\u2026' | translate}}\n </div>\n <div *ngSwitchCase=\"'SAVING'\">\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\n {{'Saving the equipment\u2026' | translate}}\n </div>\n <!-- Nothing to analyse: the objects above the new cutoff are counted at once. -->\n <div *ngSwitchDefault>\n <ng-container *ngIf=\"reusedFrom(run); else analysing\">\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\n <span *ngIf=\"run.objectsFound != null\">\n {{ 'Objects above the cutoff of {{cutoff}}' | translate: { cutoff: run.cutoffScore } }}: {{ run.objectsFound }}\n </span>\n </ng-container>\n </div>\n <ng-template #analysing>\n <ng-container *ngTemplateOutlet=\"panoramas; context: { $implicit: run }\"></ng-container>\n <span class=\"inventory-run-detail\" *ngIf=\"minutesLeft(run) as minutes\">\n {{'About' | translate}} {{ minutes }} {{'min left' | translate}}\n </span>\n <!-- Counted by the image that detects down to a floor; null from older ones. -->\n <span class=\"inventory-run-detail\" *ngIf=\"run.objectsFound != null\">\n {{ 'Objects above the cutoff of {{cutoff}} so far' | translate: { cutoff: run.cutoffScore } }}: {{ run.objectsFound }}\n </span>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"inventoryService.canCancel(run)\">\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill mt-2\"\n *ngIf=\"confirmingCancel !== run.id\" (click)=\"confirmingCancel = run.id\">\n {{'Cancel the inventory' | translate}}</button>\n <div class=\"inventory-run-confirm\" *ngIf=\"confirmingCancel === run.id\">\n <span>{{'It stops after the panorama it is on. Those analysed are kept, to resume from there.' | translate}}</span>\n <div class=\"mt-1\">\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill me-2\"\n [disabled]=\"busy === run.id\" (click)=\"onConfirmCancel(run)\">\n {{'Yes, cancel' | translate}}</button>\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill\"\n [disabled]=\"busy === run.id\" (click)=\"confirmingCancel = null\">\n {{'No, go on' | translate}}</button>\n </div>\n </div>\n </ng-container>\n </div>\n <div *ngSwitchCase=\"'cancelling'\" class=\"text-warning\">\n <ng-container *ngTemplateOutlet=\"panoramas; context: { $implicit: run }\"></ng-container>\n {{'Cancelling: it stops after the panorama it is on\u2026' | translate}}\n </div>\n <div *ngSwitchCase=\"'cancelled'\">\n <span class=\"text-warning\">{{'Cancelled' | translate}}.</span>\n <span class=\"inventory-run-detail\" *ngIf=\"run.imagesTotal\">\n {{'Panoramas analysed' | translate}}: {{ run.imagesDone ?? 0 }} / {{ run.imagesTotal }}\n </span>\n </div>\n <div *ngSwitchCase=\"'done'\" class=\"text-success\">\n <!-- How many, when the task says so: the image before inventory_job.py does not. -->\n <ng-container *ngIf=\"run.objectsFound != null; else doneOnly\">\n {{'Done' | translate}}: {{ run.objectsFound }} {{'equipment added' | translate}}.\n </ng-container>\n <ng-template #doneOnly>{{'Done' | translate}}.</ng-template>\n <span class=\"inventory-run-detail\">{{'Reload the page to see them in the list.' | translate}}</span>\n </div>\n <div *ngSwitchCase=\"'failed'\" class=\"text-danger\">\n {{ inventoryService.failure(run) | translate }}\n <span class=\"inventory-run-detail\" *ngIf=\"run.errorMessage\">{{ run.errorMessage }}</span>\n </div>\n <div *ngSwitchCase=\"'stale'\" class=\"text-warning\">\n {{'No news since' | translate}} {{ run.updatedAt | date:'short' }}:\n {{'the analysis has probably stopped.' | translate}}\n </div>\n </ng-container>\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill mt-2\"\n *ngIf=\"inventoryService.canResume(run)\" [disabled]=\"busy === run.id\" (click)=\"onResume(run)\">\n {{'Resume from where it stopped' | translate}} ({{ run.imagesDone }} / {{ run.imagesTotal }})</button>\n </div>\n <div class=\"text-danger\" *ngIf=\"message\">{{ message | translate }}</div>\n</div>\n\n<!-- Something is being done, of which there is nothing to count. -->\n<ng-template #busyBar>\n <div class=\"progress mb-1\" role=\"progressbar\" aria-label=\"\u2026\">\n <div class=\"progress-bar progress-bar-striped progress-bar-animated\" style=\"width: 100%\"></div>\n </div>\n</ng-template>\n\n<ng-template #panoramas let-run>\n <div class=\"progress\" role=\"progressbar\" [attr.aria-valuenow]=\"inventoryService.percent(run)\"\n aria-valuemin=\"0\" aria-valuemax=\"100\">\n <div class=\"progress-bar\" [style.width.%]=\"inventoryService.percent(run)\"></div>\n </div>\n <div class=\"inventory-run-detail\">\n {{'Panoramas analysed' | translate}}: {{ run.imagesDone ?? 0 }} / {{ run.imagesTotal }}\n ({{ inventoryService.percent(run) }}%)\n </div>\n</ng-template>\n", styles: [".inventory-runs{margin-top:1em}.inventory-runs h5{color:var(--smarterplan-primary)}.inventory-runs .inventory-run{background-color:#fff;border-radius:.25rem;padding:.5rem;margin-bottom:.5rem}.inventory-runs .inventory-run .inventory-run-header{display:flex;justify-content:space-between;gap:.5rem;margin-bottom:.25rem}.inventory-runs .inventory-run .inventory-run-date,.inventory-runs .inventory-run .inventory-run-detail{font-size:.8rem;color:#6c757d}.inventory-runs .inventory-run .inventory-run-detail{display:block}.inventory-runs .inventory-run .inventory-run-reused{font-size:.85rem;margin-bottom:.25rem}.inventory-runs .inventory-run .progress-bar{background-color:var(--smarterplan-primary)}.inventory-runs .inventory-run .inventory-run-confirm{margin-top:.5rem;font-size:.85rem}\n"] }]
|
|
19630
|
+
args: [{ selector: "lib-inventory-runs", template: "<div class=\"inventory-runs\" *ngIf=\"runs.length\">\r\n <h5>{{'Last inventory' | translate}}</h5>\r\n <div class=\"inventory-run\" *ngFor=\"let run of runs\">\r\n <div class=\"inventory-run-header\">\r\n <span class=\"no-lowercase\">{{ labels?.[run.nodeID] ?? run.nodeID }}</span>\r\n <span class=\"inventory-run-date\">{{ run.createdAt | date:'short' }}</span>\r\n </div>\r\n <!-- One that places a finished inventory's detections again: no panorama is analysed. -->\r\n <div class=\"inventory-run-reused\" *ngIf=\"reusedFrom(run) as source\">\r\n {{ 'Detections of {{date}} placed again with another cutoff: no panorama is analysed.' | translate: { date: (source.createdAt | date:'short') } }}\r\n <span class=\"inventory-run-detail\">\r\n {{ 'Cutoff {{before}} \u2192 {{now}}' | translate: { before: source.cutoffScore, now: run.cutoffScore } }}<ng-container\r\n *ngIf=\"source.objectsFound != null\">. {{ 'Equipment before' | translate }}: {{ source.objectsFound }}</ng-container>\r\n </span>\r\n </div>\r\n <ng-container [ngSwitch]=\"inventoryService.state(run)\">\r\n <div *ngSwitchCase=\"'waiting'\">\r\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\r\n {{ (reusedFrom(run) ? 'Starting the task on AWS\u2026' : 'Waiting for the analysis to start\u2026') | translate }}\r\n </div>\r\n <div *ngSwitchCase=\"'running'\">\r\n <ng-container [ngSwitch]=\"run.step\">\r\n <div *ngSwitchCase=\"'DOWNLOADING'\">\r\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\r\n {{ (reusedFrom(run) ? 'Taking the saved detections and the panoramas\u2026' : 'Downloading the files of the visit\u2026') | translate }}\r\n </div>\r\n <div *ngSwitchCase=\"'PLACING'\">\r\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\r\n {{'Placing the objects in 3D\u2026' | translate}}\r\n </div>\r\n <div *ngSwitchCase=\"'SAVING'\">\r\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\r\n {{'Saving the equipment\u2026' | translate}}\r\n </div>\r\n <!-- Nothing to analyse: the objects above the new cutoff are counted at once. -->\r\n <div *ngSwitchDefault>\r\n <ng-container *ngIf=\"reusedFrom(run); else analysing\">\r\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\r\n <span *ngIf=\"run.objectsFound != null\">\r\n {{ 'Objects above the cutoff of {{cutoff}}' | translate: { cutoff: run.cutoffScore } }}: {{ run.objectsFound }}\r\n </span>\r\n </ng-container>\r\n </div>\r\n <ng-template #analysing>\r\n <ng-container *ngTemplateOutlet=\"panoramas; context: { $implicit: run }\"></ng-container>\r\n <span class=\"inventory-run-detail\" *ngIf=\"minutesLeft(run) as minutes\">\r\n {{'About' | translate}} {{ minutes }} {{'min left' | translate}}\r\n </span>\r\n <!-- Counted by the image that detects down to a floor; null from older ones. -->\r\n <span class=\"inventory-run-detail\" *ngIf=\"run.objectsFound != null\">\r\n {{ 'Objects above the cutoff of {{cutoff}} so far' | translate: { cutoff: run.cutoffScore } }}: {{ run.objectsFound }}\r\n </span>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngIf=\"inventoryService.canCancel(run)\">\r\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill mt-2\"\r\n *ngIf=\"confirmingCancel !== run.id\" (click)=\"confirmingCancel = run.id\">\r\n {{'Cancel the inventory' | translate}}</button>\r\n <div class=\"inventory-run-confirm\" *ngIf=\"confirmingCancel === run.id\">\r\n <span>{{'It stops after the panorama it is on. Those analysed are kept, to resume from there.' | translate}}</span>\r\n <div class=\"mt-1\">\r\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill me-2\"\r\n [disabled]=\"busy === run.id\" (click)=\"onConfirmCancel(run)\">\r\n {{'Yes, cancel' | translate}}</button>\r\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill\"\r\n [disabled]=\"busy === run.id\" (click)=\"confirmingCancel = null\">\r\n {{'No, go on' | translate}}</button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div *ngSwitchCase=\"'cancelling'\" class=\"text-warning\">\r\n <ng-container *ngTemplateOutlet=\"panoramas; context: { $implicit: run }\"></ng-container>\r\n {{'Cancelling: it stops after the panorama it is on\u2026' | translate}}\r\n </div>\r\n <div *ngSwitchCase=\"'cancelled'\">\r\n <span class=\"text-warning\">{{'Cancelled' | translate}}.</span>\r\n <span class=\"inventory-run-detail\" *ngIf=\"run.imagesTotal\">\r\n {{'Panoramas analysed' | translate}}: {{ run.imagesDone ?? 0 }} / {{ run.imagesTotal }}\r\n </span>\r\n </div>\r\n <div *ngSwitchCase=\"'done'\" class=\"text-success\">\r\n <!-- How many, when the task says so: the image before inventory_job.py does not. -->\r\n <ng-container *ngIf=\"run.objectsFound != null; else doneOnly\">\r\n {{'Done' | translate}}: {{ run.objectsFound }} {{'equipment added' | translate}}.\r\n </ng-container>\r\n <ng-template #doneOnly>{{'Done' | translate}}.</ng-template>\r\n <span class=\"inventory-run-detail\">{{'Reload the page to see them in the list.' | translate}}</span>\r\n </div>\r\n <div *ngSwitchCase=\"'failed'\" class=\"text-danger\">\r\n {{ inventoryService.failure(run) | translate }}\r\n <span class=\"inventory-run-detail\" *ngIf=\"run.errorMessage\">{{ run.errorMessage }}</span>\r\n </div>\r\n <div *ngSwitchCase=\"'stale'\" class=\"text-warning\">\r\n {{'No news since' | translate}} {{ run.updatedAt | date:'short' }}:\r\n {{'the analysis has probably stopped.' | translate}}\r\n </div>\r\n </ng-container>\r\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill mt-2\"\r\n *ngIf=\"inventoryService.canResume(run)\" [disabled]=\"busy === run.id\" (click)=\"onResume(run)\">\r\n {{'Resume from where it stopped' | translate}} ({{ run.imagesDone }} / {{ run.imagesTotal }})</button>\r\n </div>\r\n <div class=\"text-danger\" *ngIf=\"message\">{{ message | translate }}</div>\r\n</div>\r\n\r\n<!-- Something is being done, of which there is nothing to count. -->\r\n<ng-template #busyBar>\r\n <div class=\"progress mb-1\" role=\"progressbar\" aria-label=\"\u2026\">\r\n <div class=\"progress-bar progress-bar-striped progress-bar-animated\" style=\"width: 100%\"></div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #panoramas let-run>\r\n <div class=\"progress\" role=\"progressbar\" [attr.aria-valuenow]=\"inventoryService.percent(run)\"\r\n aria-valuemin=\"0\" aria-valuemax=\"100\">\r\n <div class=\"progress-bar\" [style.width.%]=\"inventoryService.percent(run)\"></div>\r\n </div>\r\n <div class=\"inventory-run-detail\">\r\n {{'Panoramas analysed' | translate}}: {{ run.imagesDone ?? 0 }} / {{ run.imagesTotal }}\r\n ({{ inventoryService.percent(run) }}%)\r\n </div>\r\n</ng-template>\r\n", styles: [".inventory-runs{margin-top:1em}.inventory-runs h5{color:var(--smarterplan-primary)}.inventory-runs .inventory-run{background-color:#fff;border-radius:.25rem;padding:.5rem;margin-bottom:.5rem}.inventory-runs .inventory-run .inventory-run-header{display:flex;justify-content:space-between;gap:.5rem;margin-bottom:.25rem}.inventory-runs .inventory-run .inventory-run-date,.inventory-runs .inventory-run .inventory-run-detail{font-size:.8rem;color:#6c757d}.inventory-runs .inventory-run .inventory-run-detail{display:block}.inventory-runs .inventory-run .inventory-run-reused{font-size:.85rem;margin-bottom:.25rem}.inventory-runs .inventory-run .progress-bar{background-color:var(--smarterplan-primary)}.inventory-runs .inventory-run .inventory-run-confirm{margin-top:.5rem;font-size:.85rem}\n"] }]
|
|
19613
19631
|
}], ctorParameters: () => [{ type: InventoryService }], propDecorators: { spaceID: [{
|
|
19614
19632
|
type: Input
|
|
19615
19633
|
}], nodeIDs: [{
|
|
@@ -19723,98 +19741,98 @@ class InventoryFilesComponent {
|
|
|
19723
19741
|
}
|
|
19724
19742
|
}
|
|
19725
19743
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InventoryFilesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19726
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: InventoryFilesComponent, selector: "lib-inventory-files", inputs: { files: "files", model3D: "model3D", disabled: "disabled" }, outputs: { filesChange: "filesChange" }, ngImport: i0, template: `
|
|
19727
|
-
<ul class="inventory-files" *ngIf="files; else unknown">
|
|
19728
|
-
<li [class.missing]="!files.panoramas">
|
|
19729
|
-
{{ files.panoramas ? "✓" : "✗" }} {{ "Panoramas" | translate }}: {{ files.panoramas }}
|
|
19730
|
-
<span class="hint" *ngIf="!files.panoramas">{{ "Import the 360° images of the visit first." | translate }}</span>
|
|
19731
|
-
</li>
|
|
19732
|
-
<li [class.missing]="!files.dataJson">
|
|
19733
|
-
{{ files.dataJson ? "✓" : "✗" }} {{ "Panorama positions" | translate }} (data.json)
|
|
19734
|
-
<span class="hint" *ngIf="!files.dataJson">{{ "Import all the images of the visit again (Virtual Visits): the import writes it." | translate }}</span>
|
|
19735
|
-
<ng-container *ngTemplateOutlet="actions; context: { $implicit: positionsFile }"></ng-container>
|
|
19736
|
-
</li>
|
|
19737
|
-
<li [class.missing]="!files.modelObj">
|
|
19738
|
-
{{ files.modelObj ? "✓" : "✗" }} {{ "3D mesh" | translate }} (model.obj)
|
|
19739
|
-
<span class="hint" *ngIf="!files.modelObj">{{ "The .obj of the visit's MatterPak, from Matterport. Its textures are not needed." | translate }}</span>
|
|
19740
|
-
<ng-container *ngTemplateOutlet="actions; context: { $implicit: meshFile }"></ng-container>
|
|
19741
|
-
</li>
|
|
19742
|
-
</ul>
|
|
19743
|
-
<ng-template #actions let-file>
|
|
19744
|
-
<span class="file-actions" *ngIf="sending !== file && confirmingDelete !== file">
|
|
19745
|
-
<label class="btn btn-sm btn-outline-primary rounded-pill upload" [class.disabled]="locked">
|
|
19746
|
-
<input type="file" [accept]="file.accept" [disabled]="locked" (change)="onFileSelected(file, $event)">
|
|
19747
|
-
{{ (files[file.field] ? "Replace" : file.send) | translate }}
|
|
19748
|
-
</label>
|
|
19749
|
-
<button type="button" class="btn btn-sm btn-outline-danger rounded-pill delete" *ngIf="files[file.field]"
|
|
19750
|
-
[disabled]="locked" (click)="confirmingDelete = file">{{ "Delete" | translate }}</button>
|
|
19751
|
-
</span>
|
|
19752
|
-
<span class="file-actions" *ngIf="confirmingDelete === file">
|
|
19753
|
-
<span>{{ "Delete this file?" | translate }}</span>
|
|
19754
|
-
<button type="button" class="btn btn-sm btn-danger rounded-pill confirm" [disabled]="locked"
|
|
19755
|
-
(click)="onDeleteConfirmed(file)">{{ "Yes, delete" | translate }}</button>
|
|
19756
|
-
<button type="button" class="btn btn-sm btn-outline-secondary rounded-pill" [disabled]="deletingFile === file"
|
|
19757
|
-
(click)="confirmingDelete = null">{{ "No" | translate }}</button>
|
|
19758
|
-
</span>
|
|
19759
|
-
<span *ngIf="sending === file" class="sending">
|
|
19760
|
-
<span class="progress" role="progressbar" [attr.aria-valuenow]="uploadPercent" aria-valuemin="0" aria-valuemax="100">
|
|
19761
|
-
<span class="progress-bar" [style.width.%]="uploadPercent"></span>
|
|
19762
|
-
</span>
|
|
19763
|
-
{{ "Sending" | translate }} {{ uploadName }}: {{ uploadPercent }}%
|
|
19764
|
-
</span>
|
|
19765
|
-
<span class="error" *ngIf="errorFile === file">{{ error | translate }}</span>
|
|
19766
|
-
</ng-template>
|
|
19767
|
-
<ng-template #unknown>
|
|
19768
|
-
<p class="hint">{{ "The files of the visit could not be checked." | translate }}</p>
|
|
19769
|
-
</ng-template>
|
|
19744
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: InventoryFilesComponent, selector: "lib-inventory-files", inputs: { files: "files", model3D: "model3D", disabled: "disabled" }, outputs: { filesChange: "filesChange" }, ngImport: i0, template: `
|
|
19745
|
+
<ul class="inventory-files" *ngIf="files; else unknown">
|
|
19746
|
+
<li [class.missing]="!files.panoramas">
|
|
19747
|
+
{{ files.panoramas ? "✓" : "✗" }} {{ "Panoramas" | translate }}: {{ files.panoramas }}
|
|
19748
|
+
<span class="hint" *ngIf="!files.panoramas">{{ "Import the 360° images of the visit first." | translate }}</span>
|
|
19749
|
+
</li>
|
|
19750
|
+
<li [class.missing]="!files.dataJson">
|
|
19751
|
+
{{ files.dataJson ? "✓" : "✗" }} {{ "Panorama positions" | translate }} (data.json)
|
|
19752
|
+
<span class="hint" *ngIf="!files.dataJson">{{ "Import all the images of the visit again (Virtual Visits): the import writes it." | translate }}</span>
|
|
19753
|
+
<ng-container *ngTemplateOutlet="actions; context: { $implicit: positionsFile }"></ng-container>
|
|
19754
|
+
</li>
|
|
19755
|
+
<li [class.missing]="!files.modelObj">
|
|
19756
|
+
{{ files.modelObj ? "✓" : "✗" }} {{ "3D mesh" | translate }} (model.obj)
|
|
19757
|
+
<span class="hint" *ngIf="!files.modelObj">{{ "The .obj of the visit's MatterPak, from Matterport. Its textures are not needed." | translate }}</span>
|
|
19758
|
+
<ng-container *ngTemplateOutlet="actions; context: { $implicit: meshFile }"></ng-container>
|
|
19759
|
+
</li>
|
|
19760
|
+
</ul>
|
|
19761
|
+
<ng-template #actions let-file>
|
|
19762
|
+
<span class="file-actions" *ngIf="sending !== file && confirmingDelete !== file">
|
|
19763
|
+
<label class="btn btn-sm btn-outline-primary rounded-pill upload" [class.disabled]="locked">
|
|
19764
|
+
<input type="file" [accept]="file.accept" [disabled]="locked" (change)="onFileSelected(file, $event)">
|
|
19765
|
+
{{ (files[file.field] ? "Replace" : file.send) | translate }}
|
|
19766
|
+
</label>
|
|
19767
|
+
<button type="button" class="btn btn-sm btn-outline-danger rounded-pill delete" *ngIf="files[file.field]"
|
|
19768
|
+
[disabled]="locked" (click)="confirmingDelete = file">{{ "Delete" | translate }}</button>
|
|
19769
|
+
</span>
|
|
19770
|
+
<span class="file-actions" *ngIf="confirmingDelete === file">
|
|
19771
|
+
<span>{{ "Delete this file?" | translate }}</span>
|
|
19772
|
+
<button type="button" class="btn btn-sm btn-danger rounded-pill confirm" [disabled]="locked"
|
|
19773
|
+
(click)="onDeleteConfirmed(file)">{{ "Yes, delete" | translate }}</button>
|
|
19774
|
+
<button type="button" class="btn btn-sm btn-outline-secondary rounded-pill" [disabled]="deletingFile === file"
|
|
19775
|
+
(click)="confirmingDelete = null">{{ "No" | translate }}</button>
|
|
19776
|
+
</span>
|
|
19777
|
+
<span *ngIf="sending === file" class="sending">
|
|
19778
|
+
<span class="progress" role="progressbar" [attr.aria-valuenow]="uploadPercent" aria-valuemin="0" aria-valuemax="100">
|
|
19779
|
+
<span class="progress-bar" [style.width.%]="uploadPercent"></span>
|
|
19780
|
+
</span>
|
|
19781
|
+
{{ "Sending" | translate }} {{ uploadName }}: {{ uploadPercent }}%
|
|
19782
|
+
</span>
|
|
19783
|
+
<span class="error" *ngIf="errorFile === file">{{ error | translate }}</span>
|
|
19784
|
+
</ng-template>
|
|
19785
|
+
<ng-template #unknown>
|
|
19786
|
+
<p class="hint">{{ "The files of the visit could not be checked." | translate }}</p>
|
|
19787
|
+
</ng-template>
|
|
19770
19788
|
`, isInline: true, styles: [".inventory-files{list-style:none;padding-left:0;margin-bottom:.5rem}.missing{color:var(--bs-danger, #dc3545)}.hint{display:block;font-size:.8rem;color:#6c757d;margin-left:1.2rem}.file-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;margin:.25rem 0 0 1.2rem;font-size:.8rem}.upload{margin-bottom:0}.upload input{display:none}.sending{display:block;margin:.25rem 0 0 1.2rem;font-size:.8rem;color:#6c757d}.progress{display:flex;height:6px;margin-bottom:.25rem}.progress-bar{transition:none;background-color:var(--smarterplan-primary)}.error{display:block;margin-left:1.2rem;font-size:.8rem;color:var(--bs-danger, #dc3545)}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
19771
19789
|
}
|
|
19772
19790
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InventoryFilesComponent, decorators: [{
|
|
19773
19791
|
type: Component,
|
|
19774
|
-
args: [{ selector: "lib-inventory-files", template: `
|
|
19775
|
-
<ul class="inventory-files" *ngIf="files; else unknown">
|
|
19776
|
-
<li [class.missing]="!files.panoramas">
|
|
19777
|
-
{{ files.panoramas ? "✓" : "✗" }} {{ "Panoramas" | translate }}: {{ files.panoramas }}
|
|
19778
|
-
<span class="hint" *ngIf="!files.panoramas">{{ "Import the 360° images of the visit first." | translate }}</span>
|
|
19779
|
-
</li>
|
|
19780
|
-
<li [class.missing]="!files.dataJson">
|
|
19781
|
-
{{ files.dataJson ? "✓" : "✗" }} {{ "Panorama positions" | translate }} (data.json)
|
|
19782
|
-
<span class="hint" *ngIf="!files.dataJson">{{ "Import all the images of the visit again (Virtual Visits): the import writes it." | translate }}</span>
|
|
19783
|
-
<ng-container *ngTemplateOutlet="actions; context: { $implicit: positionsFile }"></ng-container>
|
|
19784
|
-
</li>
|
|
19785
|
-
<li [class.missing]="!files.modelObj">
|
|
19786
|
-
{{ files.modelObj ? "✓" : "✗" }} {{ "3D mesh" | translate }} (model.obj)
|
|
19787
|
-
<span class="hint" *ngIf="!files.modelObj">{{ "The .obj of the visit's MatterPak, from Matterport. Its textures are not needed." | translate }}</span>
|
|
19788
|
-
<ng-container *ngTemplateOutlet="actions; context: { $implicit: meshFile }"></ng-container>
|
|
19789
|
-
</li>
|
|
19790
|
-
</ul>
|
|
19791
|
-
<ng-template #actions let-file>
|
|
19792
|
-
<span class="file-actions" *ngIf="sending !== file && confirmingDelete !== file">
|
|
19793
|
-
<label class="btn btn-sm btn-outline-primary rounded-pill upload" [class.disabled]="locked">
|
|
19794
|
-
<input type="file" [accept]="file.accept" [disabled]="locked" (change)="onFileSelected(file, $event)">
|
|
19795
|
-
{{ (files[file.field] ? "Replace" : file.send) | translate }}
|
|
19796
|
-
</label>
|
|
19797
|
-
<button type="button" class="btn btn-sm btn-outline-danger rounded-pill delete" *ngIf="files[file.field]"
|
|
19798
|
-
[disabled]="locked" (click)="confirmingDelete = file">{{ "Delete" | translate }}</button>
|
|
19799
|
-
</span>
|
|
19800
|
-
<span class="file-actions" *ngIf="confirmingDelete === file">
|
|
19801
|
-
<span>{{ "Delete this file?" | translate }}</span>
|
|
19802
|
-
<button type="button" class="btn btn-sm btn-danger rounded-pill confirm" [disabled]="locked"
|
|
19803
|
-
(click)="onDeleteConfirmed(file)">{{ "Yes, delete" | translate }}</button>
|
|
19804
|
-
<button type="button" class="btn btn-sm btn-outline-secondary rounded-pill" [disabled]="deletingFile === file"
|
|
19805
|
-
(click)="confirmingDelete = null">{{ "No" | translate }}</button>
|
|
19806
|
-
</span>
|
|
19807
|
-
<span *ngIf="sending === file" class="sending">
|
|
19808
|
-
<span class="progress" role="progressbar" [attr.aria-valuenow]="uploadPercent" aria-valuemin="0" aria-valuemax="100">
|
|
19809
|
-
<span class="progress-bar" [style.width.%]="uploadPercent"></span>
|
|
19810
|
-
</span>
|
|
19811
|
-
{{ "Sending" | translate }} {{ uploadName }}: {{ uploadPercent }}%
|
|
19812
|
-
</span>
|
|
19813
|
-
<span class="error" *ngIf="errorFile === file">{{ error | translate }}</span>
|
|
19814
|
-
</ng-template>
|
|
19815
|
-
<ng-template #unknown>
|
|
19816
|
-
<p class="hint">{{ "The files of the visit could not be checked." | translate }}</p>
|
|
19817
|
-
</ng-template>
|
|
19792
|
+
args: [{ selector: "lib-inventory-files", template: `
|
|
19793
|
+
<ul class="inventory-files" *ngIf="files; else unknown">
|
|
19794
|
+
<li [class.missing]="!files.panoramas">
|
|
19795
|
+
{{ files.panoramas ? "✓" : "✗" }} {{ "Panoramas" | translate }}: {{ files.panoramas }}
|
|
19796
|
+
<span class="hint" *ngIf="!files.panoramas">{{ "Import the 360° images of the visit first." | translate }}</span>
|
|
19797
|
+
</li>
|
|
19798
|
+
<li [class.missing]="!files.dataJson">
|
|
19799
|
+
{{ files.dataJson ? "✓" : "✗" }} {{ "Panorama positions" | translate }} (data.json)
|
|
19800
|
+
<span class="hint" *ngIf="!files.dataJson">{{ "Import all the images of the visit again (Virtual Visits): the import writes it." | translate }}</span>
|
|
19801
|
+
<ng-container *ngTemplateOutlet="actions; context: { $implicit: positionsFile }"></ng-container>
|
|
19802
|
+
</li>
|
|
19803
|
+
<li [class.missing]="!files.modelObj">
|
|
19804
|
+
{{ files.modelObj ? "✓" : "✗" }} {{ "3D mesh" | translate }} (model.obj)
|
|
19805
|
+
<span class="hint" *ngIf="!files.modelObj">{{ "The .obj of the visit's MatterPak, from Matterport. Its textures are not needed." | translate }}</span>
|
|
19806
|
+
<ng-container *ngTemplateOutlet="actions; context: { $implicit: meshFile }"></ng-container>
|
|
19807
|
+
</li>
|
|
19808
|
+
</ul>
|
|
19809
|
+
<ng-template #actions let-file>
|
|
19810
|
+
<span class="file-actions" *ngIf="sending !== file && confirmingDelete !== file">
|
|
19811
|
+
<label class="btn btn-sm btn-outline-primary rounded-pill upload" [class.disabled]="locked">
|
|
19812
|
+
<input type="file" [accept]="file.accept" [disabled]="locked" (change)="onFileSelected(file, $event)">
|
|
19813
|
+
{{ (files[file.field] ? "Replace" : file.send) | translate }}
|
|
19814
|
+
</label>
|
|
19815
|
+
<button type="button" class="btn btn-sm btn-outline-danger rounded-pill delete" *ngIf="files[file.field]"
|
|
19816
|
+
[disabled]="locked" (click)="confirmingDelete = file">{{ "Delete" | translate }}</button>
|
|
19817
|
+
</span>
|
|
19818
|
+
<span class="file-actions" *ngIf="confirmingDelete === file">
|
|
19819
|
+
<span>{{ "Delete this file?" | translate }}</span>
|
|
19820
|
+
<button type="button" class="btn btn-sm btn-danger rounded-pill confirm" [disabled]="locked"
|
|
19821
|
+
(click)="onDeleteConfirmed(file)">{{ "Yes, delete" | translate }}</button>
|
|
19822
|
+
<button type="button" class="btn btn-sm btn-outline-secondary rounded-pill" [disabled]="deletingFile === file"
|
|
19823
|
+
(click)="confirmingDelete = null">{{ "No" | translate }}</button>
|
|
19824
|
+
</span>
|
|
19825
|
+
<span *ngIf="sending === file" class="sending">
|
|
19826
|
+
<span class="progress" role="progressbar" [attr.aria-valuenow]="uploadPercent" aria-valuemin="0" aria-valuemax="100">
|
|
19827
|
+
<span class="progress-bar" [style.width.%]="uploadPercent"></span>
|
|
19828
|
+
</span>
|
|
19829
|
+
{{ "Sending" | translate }} {{ uploadName }}: {{ uploadPercent }}%
|
|
19830
|
+
</span>
|
|
19831
|
+
<span class="error" *ngIf="errorFile === file">{{ error | translate }}</span>
|
|
19832
|
+
</ng-template>
|
|
19833
|
+
<ng-template #unknown>
|
|
19834
|
+
<p class="hint">{{ "The files of the visit could not be checked." | translate }}</p>
|
|
19835
|
+
</ng-template>
|
|
19818
19836
|
`, styles: [".inventory-files{list-style:none;padding-left:0;margin-bottom:.5rem}.missing{color:var(--bs-danger, #dc3545)}.hint{display:block;font-size:.8rem;color:#6c757d;margin-left:1.2rem}.file-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;margin:.25rem 0 0 1.2rem;font-size:.8rem}.upload{margin-bottom:0}.upload input{display:none}.sending{display:block;margin:.25rem 0 0 1.2rem;font-size:.8rem;color:#6c757d}.progress{display:flex;height:6px;margin-bottom:.25rem}.progress-bar{transition:none;background-color:var(--smarterplan-primary)}.error{display:block;margin-left:1.2rem;font-size:.8rem;color:var(--bs-danger, #dc3545)}\n"] }]
|
|
19819
19837
|
}], propDecorators: { files: [{
|
|
19820
19838
|
type: Input
|
|
@@ -19841,11 +19859,11 @@ class CheckboxSliderComponent {
|
|
|
19841
19859
|
this.checkedChange.emit(this.checked);
|
|
19842
19860
|
}
|
|
19843
19861
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CheckboxSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19844
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CheckboxSliderComponent, selector: "lib-checkbox-slider", inputs: { label: "label", checked: "checked", disabled: "disabled" }, outputs: { checkedChange: "checkedChange" }, ngImport: i0, template: "<label class=\"checkbox-slider\" [class.disabled]=\"disabled\">\n <span class=\"switch\">\n <input type=\"checkbox\" [checked]=\"checked\" [disabled]=\"disabled\" (change)=\"onChange($event)\">\n <span class=\"slider\"></span>\n </span>\n <span class=\"label\">{{ label | translate }}</span>\n</label>\n", styles: [":host{display:block}.checkbox-slider{display:flex;align-items:center;gap:1rem;margin:0;cursor:pointer}.checkbox-slider.disabled{cursor:default;opacity:.5}.switch{position:relative;display:inline-block;flex:none;width:60px;height:34px;border-radius:34px}.switch input{position:absolute;opacity:0;width:0;height:0}.switch input:checked+.slider{background-color:var(--smarterplan-primary);box-shadow:2px 2px 10px 0 var(--smarterplan-primary)}.switch input:checked+.slider:before{background:#fff;transform:translate(26px)}.switch input:focus-visible+.slider{outline:2px solid var(--smarterplan-primary);outline-offset:2px}.switch .slider{position:absolute;inset:0;border:1px solid var(--smarterplan-primary);border-radius:34px;transition:.3s}.switch .slider:before{position:absolute;content:\"\";height:26px;width:26px;left:4px;bottom:3px;background-color:var(--smarterplan-primary);box-shadow:2px 2px 10px 0 var(--smarterplan-primary);border-radius:50%;transition:.3s}\n"], dependencies: [{ kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
19862
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CheckboxSliderComponent, selector: "lib-checkbox-slider", inputs: { label: "label", checked: "checked", disabled: "disabled" }, outputs: { checkedChange: "checkedChange" }, ngImport: i0, template: "<label class=\"checkbox-slider\" [class.disabled]=\"disabled\">\r\n <span class=\"switch\">\r\n <input type=\"checkbox\" [checked]=\"checked\" [disabled]=\"disabled\" (change)=\"onChange($event)\">\r\n <span class=\"slider\"></span>\r\n </span>\r\n <span class=\"label\">{{ label | translate }}</span>\r\n</label>\r\n", styles: [":host{display:block}.checkbox-slider{display:flex;align-items:center;gap:1rem;margin:0;cursor:pointer}.checkbox-slider.disabled{cursor:default;opacity:.5}.switch{position:relative;display:inline-block;flex:none;width:60px;height:34px;border-radius:34px}.switch input{position:absolute;opacity:0;width:0;height:0}.switch input:checked+.slider{background-color:var(--smarterplan-primary);box-shadow:2px 2px 10px 0 var(--smarterplan-primary)}.switch input:checked+.slider:before{background:#fff;transform:translate(26px)}.switch input:focus-visible+.slider{outline:2px solid var(--smarterplan-primary);outline-offset:2px}.switch .slider{position:absolute;inset:0;border:1px solid var(--smarterplan-primary);border-radius:34px;transition:.3s}.switch .slider:before{position:absolute;content:\"\";height:26px;width:26px;left:4px;bottom:3px;background-color:var(--smarterplan-primary);box-shadow:2px 2px 10px 0 var(--smarterplan-primary);border-radius:50%;transition:.3s}\n"], dependencies: [{ kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
19845
19863
|
}
|
|
19846
19864
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CheckboxSliderComponent, decorators: [{
|
|
19847
19865
|
type: Component,
|
|
19848
|
-
args: [{ selector: "lib-checkbox-slider", template: "<label class=\"checkbox-slider\" [class.disabled]=\"disabled\">\n <span class=\"switch\">\n <input type=\"checkbox\" [checked]=\"checked\" [disabled]=\"disabled\" (change)=\"onChange($event)\">\n <span class=\"slider\"></span>\n </span>\n <span class=\"label\">{{ label | translate }}</span>\n</label>\n", styles: [":host{display:block}.checkbox-slider{display:flex;align-items:center;gap:1rem;margin:0;cursor:pointer}.checkbox-slider.disabled{cursor:default;opacity:.5}.switch{position:relative;display:inline-block;flex:none;width:60px;height:34px;border-radius:34px}.switch input{position:absolute;opacity:0;width:0;height:0}.switch input:checked+.slider{background-color:var(--smarterplan-primary);box-shadow:2px 2px 10px 0 var(--smarterplan-primary)}.switch input:checked+.slider:before{background:#fff;transform:translate(26px)}.switch input:focus-visible+.slider{outline:2px solid var(--smarterplan-primary);outline-offset:2px}.switch .slider{position:absolute;inset:0;border:1px solid var(--smarterplan-primary);border-radius:34px;transition:.3s}.switch .slider:before{position:absolute;content:\"\";height:26px;width:26px;left:4px;bottom:3px;background-color:var(--smarterplan-primary);box-shadow:2px 2px 10px 0 var(--smarterplan-primary);border-radius:50%;transition:.3s}\n"] }]
|
|
19866
|
+
args: [{ selector: "lib-checkbox-slider", template: "<label class=\"checkbox-slider\" [class.disabled]=\"disabled\">\r\n <span class=\"switch\">\r\n <input type=\"checkbox\" [checked]=\"checked\" [disabled]=\"disabled\" (change)=\"onChange($event)\">\r\n <span class=\"slider\"></span>\r\n </span>\r\n <span class=\"label\">{{ label | translate }}</span>\r\n</label>\r\n", styles: [":host{display:block}.checkbox-slider{display:flex;align-items:center;gap:1rem;margin:0;cursor:pointer}.checkbox-slider.disabled{cursor:default;opacity:.5}.switch{position:relative;display:inline-block;flex:none;width:60px;height:34px;border-radius:34px}.switch input{position:absolute;opacity:0;width:0;height:0}.switch input:checked+.slider{background-color:var(--smarterplan-primary);box-shadow:2px 2px 10px 0 var(--smarterplan-primary)}.switch input:checked+.slider:before{background:#fff;transform:translate(26px)}.switch input:focus-visible+.slider{outline:2px solid var(--smarterplan-primary);outline-offset:2px}.switch .slider{position:absolute;inset:0;border:1px solid var(--smarterplan-primary);border-radius:34px;transition:.3s}.switch .slider:before{position:absolute;content:\"\";height:26px;width:26px;left:4px;bottom:3px;background-color:var(--smarterplan-primary);box-shadow:2px 2px 10px 0 var(--smarterplan-primary);border-radius:50%;transition:.3s}\n"] }]
|
|
19849
19867
|
}], propDecorators: { label: [{
|
|
19850
19868
|
type: Input
|
|
19851
19869
|
}], checked: [{
|
|
@@ -20242,11 +20260,11 @@ class InventoryLaunchComponent {
|
|
|
20242
20260
|
}
|
|
20243
20261
|
}
|
|
20244
20262
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InventoryLaunchComponent, deps: [{ token: InventoryService }, { token: EquipmentService }, { token: NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
20245
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: InventoryLaunchComponent, selector: "lib-inventory-launch", inputs: { spaceID: "spaceID", visits: "visits", panorama: "panorama", running: "running" }, outputs: { cancelled: "cancelled", launched: "launched" }, usesOnChanges: true, ngImport: i0, template: "<!-- What the inventory will do, before it is done: it adds equipment to the location. -->\n<p *ngIf=\"panorama\">{{ 'The AI will look for equipment in this panorama and add what it finds to the location.' | translate }}</p>\n<p *ngIf=\"!panorama\">{{ 'The AI will look for equipment in the visits of this location and add what it finds to it.' | translate }}</p>\n\n<ul class=\"inventory-launch-summary\" *ngIf=\"panorama\">\n <li>{{ 'Visit' | translate }}: <strong class=\"no-lowercase\">{{ visits?.[0]?.label }}</strong></li>\n <li>{{ 'Panorama' | translate }}: <strong class=\"no-lowercase\">{{ panorama }}</strong></li>\n</ul>\n<ul class=\"inventory-launch-summary\" *ngIf=\"!panorama && visits?.length > 0\">\n <li>{{ 'Visits to analyse' | translate }}:\n <strong>{{ checkingFiles ? '\u2026' : launchableVisits.length + ' / ' + visits.length }}</strong></li>\n</ul>\n<p class=\"text-danger\" *ngIf=\"visits?.length === 0\">\n {{ 'This location has no Matterport visit for the AI to analyse.' | translate }}</p>\n\n<lib-loader *ngIf=\"checkingFiles\"></lib-loader>\n<ng-container *ngIf=\"!checkingFiles\">\n <div *ngFor=\"let visit of visits\">\n <strong class=\"no-lowercase\" *ngIf=\"!panorama\">{{ visit.label }}</strong>\n <lib-inventory-files [files]=\"visitFiles[visit.nodeID]\" (filesChange)=\"onFilesChange(visit, $event)\"\n [model3D]=\"visit.model3D\" [disabled]=\"running || launching || discarding\"></lib-inventory-files>\n </div>\n</ng-container>\n\n<div class=\"inventory-launch-delete\">\n <lib-checkbox-slider label=\"Delete previous inventory ?\" [checked]=\"deletePrevious\"\n [disabled]=\"launching || reuseDetections\" (checkedChange)=\"onDeletePreviousChange($event)\"></lib-checkbox-slider>\n <span class=\"inventory-launch-hint\" *ngIf=\"deletePrevious\">\n {{ 'Equipment the AI added to these visits, deleted first' | translate }}: <strong>{{ aiEquipmentCount ?? '\u2026' }}</strong>\n </span>\n <span class=\"inventory-launch-hint\" *ngIf=\"reuseDetections\">\n {{ 'Needed to reuse the detections, or every object would be there twice.' | translate }}\n </span>\n <span class=\"inventory-launch-hint\" *ngIf=\"deleting\">\n {{ 'Deleting the previous inventory' | translate }}: {{ deleting.done }} / {{ deleting.total }}\n </span>\n</div>\n\n<!-- The last inventories' detections placed again with another cutoff: no panorama analysed again. -->\n<div class=\"inventory-launch-delete\" *ngIf=\"canReuse\">\n <lib-checkbox-slider label=\"Reuse the detections of the last inventory\" [checked]=\"reuseDetections\"\n [disabled]=\"launching\" (checkedChange)=\"onReuseChange($event)\"></lib-checkbox-slider>\n <span class=\"inventory-launch-hint\" *ngIf=\"reuseDetections\">\n {{ 'Only the placing is done again, with the cutoff chosen: a few minutes.' | translate }}\n </span>\n</div>\n\n<!-- Once the cutoff is chosen, the detections kept to change it can go. -->\n<div class=\"inventory-launch-delete\" *ngIf=\"discardable.length > 0 || discarded\">\n <ng-container *ngIf=\"discardable.length > 0 && !confirmingDiscard\">\n <button type=\"button\" class=\"btn btn-sm btn-outline-danger rounded-pill inventory-launch-discard\"\n [disabled]=\"running || launching\" (click)=\"confirmingDiscard = true\">\n {{ 'Discard the saved detections' | translate }}</button>\n <span class=\"inventory-launch-hint\">\n {{ 'Once the cutoff is chosen, this frees the space they take. The equipment stays.' | translate }}\n </span>\n </ng-container>\n <ng-container *ngIf=\"discardable.length > 0 && confirmingDiscard\">\n <span class=\"inventory-launch-hint\">\n {{ 'The equipment stays. To change the cutoff later, the panoramas will have to be analysed again.' | translate }}\n </span>\n <div class=\"inventory-launch-confirm\">\n <button type=\"button\" class=\"btn btn-sm btn-danger rounded-pill\" [disabled]=\"running || launching || discarding\"\n (click)=\"onConfirmDiscard()\">{{ (discarding ? 'Discarding\u2026' : 'Yes, discard') | translate }}</button>\n <button type=\"button\" class=\"btn btn-sm btn-outline-secondary rounded-pill\" [disabled]=\"discarding\"\n (click)=\"confirmingDiscard = false\">{{ 'No, keep them' | translate }}</button>\n </div>\n </ng-container>\n <span class=\"inventory-launch-hint\" *ngIf=\"discarded\">{{ 'The saved detections were discarded.' | translate }}</span>\n</div>\n\n<div class=\"inventory-launch-settings\">\n <select class=\"no-lowercase form-select\" [(ngModel)]=\"model\" *ngIf=\"!reuseDetections\">\n <option [ngValue]=\"undefined\">{{ 'Select model' | translate }}</option>\n <option *ngFor=\"let option of models\" [ngValue]=\"option\">{{ option.name | translate }}</option>\n </select>\n <!-- Reusing, the detections keep the model that made them. -->\n <select class=\"no-lowercase form-select inventory-launch-reused-model\" *ngIf=\"reuseDetections\" disabled\n [title]=\"'The detections keep the model that made them.' | translate\">\n <option>{{ reusedModelName | translate }}</option>\n </select>\n <select class=\"form-select\" [(ngModel)]=\"cutoffScore\" [title]=\"'Cutoff score' | translate\">\n <option *ngFor=\"let score of cutoffScores\" [ngValue]=\"score\">{{ 'Cutoff score' | translate }} {{ score }}</option>\n </select>\n</div>\n\n<div class=\"inventory-launch-buttons\">\n <!-- Closes the panel only: \"Cancel the inventory\", below, is what stops one. -->\n <button type=\"button\" class=\"btn btn-outline-secondary rounded-pill inventory-launch-close\" [disabled]=\"launching\"\n (click)=\"cancelled.emit()\">{{ 'Close' | translate }}</button>\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill inventory-launch-go\" [disabled]=\"!canLaunch\"\n [title]=\"running ? ('An inventory is already running for this location.' | translate) : ''\"\n (click)=\"onLaunchClick()\">{{ (reuseDetections && canReuse ? 'Update' : 'Launch inventory') | translate }}</button>\n</div>\n\n<div class=\"text-danger mt-2\" *ngIf=\"message\">{{ message | translate: { count: notDeleted } }}</div>\n", styles: [":host{display:block}.inventory-launch-summary{padding-left:1.2rem;margin-bottom:.5rem}.inventory-launch-delete{margin:.75rem 0}.inventory-launch-hint{display:block;margin-top:.25rem;font-size:.8rem;color:#6c757d}.inventory-launch-confirm{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.25rem}.inventory-launch-settings{display:flex;flex-wrap:wrap;gap:.5rem}.inventory-launch-settings select{flex:1 1 10rem}.inventory-launch-buttons{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.75rem}\n"], dependencies: [{ kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LoaderComponent, selector: "lib-loader", inputs: ["useLogo", "color"] }, { kind: "component", type: InventoryFilesComponent, selector: "lib-inventory-files", inputs: ["files", "model3D", "disabled"], outputs: ["filesChange"] }, { kind: "component", type: CheckboxSliderComponent, selector: "lib-checkbox-slider", inputs: ["label", "checked", "disabled"], outputs: ["checkedChange"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
20263
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: InventoryLaunchComponent, selector: "lib-inventory-launch", inputs: { spaceID: "spaceID", visits: "visits", panorama: "panorama", running: "running" }, outputs: { cancelled: "cancelled", launched: "launched" }, usesOnChanges: true, ngImport: i0, template: "<!-- What the inventory will do, before it is done: it adds equipment to the location. -->\r\n<p *ngIf=\"panorama\">{{ 'The AI will look for equipment in this panorama and add what it finds to the location.' | translate }}</p>\r\n<p *ngIf=\"!panorama\">{{ 'The AI will look for equipment in the visits of this location and add what it finds to it.' | translate }}</p>\r\n\r\n<ul class=\"inventory-launch-summary\" *ngIf=\"panorama\">\r\n <li>{{ 'Visit' | translate }}: <strong class=\"no-lowercase\">{{ visits?.[0]?.label }}</strong></li>\r\n <li>{{ 'Panorama' | translate }}: <strong class=\"no-lowercase\">{{ panorama }}</strong></li>\r\n</ul>\r\n<ul class=\"inventory-launch-summary\" *ngIf=\"!panorama && visits?.length > 0\">\r\n <li>{{ 'Visits to analyse' | translate }}:\r\n <strong>{{ checkingFiles ? '\u2026' : launchableVisits.length + ' / ' + visits.length }}</strong></li>\r\n</ul>\r\n<p class=\"text-danger\" *ngIf=\"visits?.length === 0\">\r\n {{ 'This location has no Matterport visit for the AI to analyse.' | translate }}</p>\r\n\r\n<lib-loader *ngIf=\"checkingFiles\"></lib-loader>\r\n<ng-container *ngIf=\"!checkingFiles\">\r\n <div *ngFor=\"let visit of visits\">\r\n <strong class=\"no-lowercase\" *ngIf=\"!panorama\">{{ visit.label }}</strong>\r\n <lib-inventory-files [files]=\"visitFiles[visit.nodeID]\" (filesChange)=\"onFilesChange(visit, $event)\"\r\n [model3D]=\"visit.model3D\" [disabled]=\"running || launching || discarding\"></lib-inventory-files>\r\n </div>\r\n</ng-container>\r\n\r\n<div class=\"inventory-launch-delete\">\r\n <lib-checkbox-slider label=\"Delete previous inventory ?\" [checked]=\"deletePrevious\"\r\n [disabled]=\"launching || reuseDetections\" (checkedChange)=\"onDeletePreviousChange($event)\"></lib-checkbox-slider>\r\n <span class=\"inventory-launch-hint\" *ngIf=\"deletePrevious\">\r\n {{ 'Equipment the AI added to these visits, deleted first' | translate }}: <strong>{{ aiEquipmentCount ?? '\u2026' }}</strong>\r\n </span>\r\n <span class=\"inventory-launch-hint\" *ngIf=\"reuseDetections\">\r\n {{ 'Needed to reuse the detections, or every object would be there twice.' | translate }}\r\n </span>\r\n <span class=\"inventory-launch-hint\" *ngIf=\"deleting\">\r\n {{ 'Deleting the previous inventory' | translate }}: {{ deleting.done }} / {{ deleting.total }}\r\n </span>\r\n</div>\r\n\r\n<!-- The last inventories' detections placed again with another cutoff: no panorama analysed again. -->\r\n<div class=\"inventory-launch-delete\" *ngIf=\"canReuse\">\r\n <lib-checkbox-slider label=\"Reuse the detections of the last inventory\" [checked]=\"reuseDetections\"\r\n [disabled]=\"launching\" (checkedChange)=\"onReuseChange($event)\"></lib-checkbox-slider>\r\n <span class=\"inventory-launch-hint\" *ngIf=\"reuseDetections\">\r\n {{ 'Only the placing is done again, with the cutoff chosen: a few minutes.' | translate }}\r\n </span>\r\n</div>\r\n\r\n<!-- Once the cutoff is chosen, the detections kept to change it can go. -->\r\n<div class=\"inventory-launch-delete\" *ngIf=\"discardable.length > 0 || discarded\">\r\n <ng-container *ngIf=\"discardable.length > 0 && !confirmingDiscard\">\r\n <button type=\"button\" class=\"btn btn-sm btn-outline-danger rounded-pill inventory-launch-discard\"\r\n [disabled]=\"running || launching\" (click)=\"confirmingDiscard = true\">\r\n {{ 'Discard the saved detections' | translate }}</button>\r\n <span class=\"inventory-launch-hint\">\r\n {{ 'Once the cutoff is chosen, this frees the space they take. The equipment stays.' | translate }}\r\n </span>\r\n </ng-container>\r\n <ng-container *ngIf=\"discardable.length > 0 && confirmingDiscard\">\r\n <span class=\"inventory-launch-hint\">\r\n {{ 'The equipment stays. To change the cutoff later, the panoramas will have to be analysed again.' | translate }}\r\n </span>\r\n <div class=\"inventory-launch-confirm\">\r\n <button type=\"button\" class=\"btn btn-sm btn-danger rounded-pill\" [disabled]=\"running || launching || discarding\"\r\n (click)=\"onConfirmDiscard()\">{{ (discarding ? 'Discarding\u2026' : 'Yes, discard') | translate }}</button>\r\n <button type=\"button\" class=\"btn btn-sm btn-outline-secondary rounded-pill\" [disabled]=\"discarding\"\r\n (click)=\"confirmingDiscard = false\">{{ 'No, keep them' | translate }}</button>\r\n </div>\r\n </ng-container>\r\n <span class=\"inventory-launch-hint\" *ngIf=\"discarded\">{{ 'The saved detections were discarded.' | translate }}</span>\r\n</div>\r\n\r\n<div class=\"inventory-launch-settings\">\r\n <select class=\"no-lowercase form-select\" [(ngModel)]=\"model\" *ngIf=\"!reuseDetections\">\r\n <option [ngValue]=\"undefined\">{{ 'Select model' | translate }}</option>\r\n <option *ngFor=\"let option of models\" [ngValue]=\"option\">{{ option.name | translate }}</option>\r\n </select>\r\n <!-- Reusing, the detections keep the model that made them. -->\r\n <select class=\"no-lowercase form-select inventory-launch-reused-model\" *ngIf=\"reuseDetections\" disabled\r\n [title]=\"'The detections keep the model that made them.' | translate\">\r\n <option>{{ reusedModelName | translate }}</option>\r\n </select>\r\n <select class=\"form-select\" [(ngModel)]=\"cutoffScore\" [title]=\"'Cutoff score' | translate\">\r\n <option *ngFor=\"let score of cutoffScores\" [ngValue]=\"score\">{{ 'Cutoff score' | translate }} {{ score }}</option>\r\n </select>\r\n</div>\r\n\r\n<div class=\"inventory-launch-buttons\">\r\n <!-- Closes the panel only: \"Cancel the inventory\", below, is what stops one. -->\r\n <button type=\"button\" class=\"btn btn-outline-secondary rounded-pill inventory-launch-close\" [disabled]=\"launching\"\r\n (click)=\"cancelled.emit()\">{{ 'Close' | translate }}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill inventory-launch-go\" [disabled]=\"!canLaunch\"\r\n [title]=\"running ? ('An inventory is already running for this location.' | translate) : ''\"\r\n (click)=\"onLaunchClick()\">{{ (reuseDetections && canReuse ? 'Update' : 'Launch inventory') | translate }}</button>\r\n</div>\r\n\r\n<div class=\"text-danger mt-2\" *ngIf=\"message\">{{ message | translate: { count: notDeleted } }}</div>\r\n", styles: [":host{display:block}.inventory-launch-summary{padding-left:1.2rem;margin-bottom:.5rem}.inventory-launch-delete{margin:.75rem 0}.inventory-launch-hint{display:block;margin-top:.25rem;font-size:.8rem;color:#6c757d}.inventory-launch-confirm{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.25rem}.inventory-launch-settings{display:flex;flex-wrap:wrap;gap:.5rem}.inventory-launch-settings select{flex:1 1 10rem}.inventory-launch-buttons{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.75rem}\n"], dependencies: [{ kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LoaderComponent, selector: "lib-loader", inputs: ["useLogo", "color"] }, { kind: "component", type: InventoryFilesComponent, selector: "lib-inventory-files", inputs: ["files", "model3D", "disabled"], outputs: ["filesChange"] }, { kind: "component", type: CheckboxSliderComponent, selector: "lib-checkbox-slider", inputs: ["label", "checked", "disabled"], outputs: ["checkedChange"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
20246
20264
|
}
|
|
20247
20265
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InventoryLaunchComponent, decorators: [{
|
|
20248
20266
|
type: Component,
|
|
20249
|
-
args: [{ selector: "lib-inventory-launch", template: "<!-- What the inventory will do, before it is done: it adds equipment to the location. -->\n<p *ngIf=\"panorama\">{{ 'The AI will look for equipment in this panorama and add what it finds to the location.' | translate }}</p>\n<p *ngIf=\"!panorama\">{{ 'The AI will look for equipment in the visits of this location and add what it finds to it.' | translate }}</p>\n\n<ul class=\"inventory-launch-summary\" *ngIf=\"panorama\">\n <li>{{ 'Visit' | translate }}: <strong class=\"no-lowercase\">{{ visits?.[0]?.label }}</strong></li>\n <li>{{ 'Panorama' | translate }}: <strong class=\"no-lowercase\">{{ panorama }}</strong></li>\n</ul>\n<ul class=\"inventory-launch-summary\" *ngIf=\"!panorama && visits?.length > 0\">\n <li>{{ 'Visits to analyse' | translate }}:\n <strong>{{ checkingFiles ? '\u2026' : launchableVisits.length + ' / ' + visits.length }}</strong></li>\n</ul>\n<p class=\"text-danger\" *ngIf=\"visits?.length === 0\">\n {{ 'This location has no Matterport visit for the AI to analyse.' | translate }}</p>\n\n<lib-loader *ngIf=\"checkingFiles\"></lib-loader>\n<ng-container *ngIf=\"!checkingFiles\">\n <div *ngFor=\"let visit of visits\">\n <strong class=\"no-lowercase\" *ngIf=\"!panorama\">{{ visit.label }}</strong>\n <lib-inventory-files [files]=\"visitFiles[visit.nodeID]\" (filesChange)=\"onFilesChange(visit, $event)\"\n [model3D]=\"visit.model3D\" [disabled]=\"running || launching || discarding\"></lib-inventory-files>\n </div>\n</ng-container>\n\n<div class=\"inventory-launch-delete\">\n <lib-checkbox-slider label=\"Delete previous inventory ?\" [checked]=\"deletePrevious\"\n [disabled]=\"launching || reuseDetections\" (checkedChange)=\"onDeletePreviousChange($event)\"></lib-checkbox-slider>\n <span class=\"inventory-launch-hint\" *ngIf=\"deletePrevious\">\n {{ 'Equipment the AI added to these visits, deleted first' | translate }}: <strong>{{ aiEquipmentCount ?? '\u2026' }}</strong>\n </span>\n <span class=\"inventory-launch-hint\" *ngIf=\"reuseDetections\">\n {{ 'Needed to reuse the detections, or every object would be there twice.' | translate }}\n </span>\n <span class=\"inventory-launch-hint\" *ngIf=\"deleting\">\n {{ 'Deleting the previous inventory' | translate }}: {{ deleting.done }} / {{ deleting.total }}\n </span>\n</div>\n\n<!-- The last inventories' detections placed again with another cutoff: no panorama analysed again. -->\n<div class=\"inventory-launch-delete\" *ngIf=\"canReuse\">\n <lib-checkbox-slider label=\"Reuse the detections of the last inventory\" [checked]=\"reuseDetections\"\n [disabled]=\"launching\" (checkedChange)=\"onReuseChange($event)\"></lib-checkbox-slider>\n <span class=\"inventory-launch-hint\" *ngIf=\"reuseDetections\">\n {{ 'Only the placing is done again, with the cutoff chosen: a few minutes.' | translate }}\n </span>\n</div>\n\n<!-- Once the cutoff is chosen, the detections kept to change it can go. -->\n<div class=\"inventory-launch-delete\" *ngIf=\"discardable.length > 0 || discarded\">\n <ng-container *ngIf=\"discardable.length > 0 && !confirmingDiscard\">\n <button type=\"button\" class=\"btn btn-sm btn-outline-danger rounded-pill inventory-launch-discard\"\n [disabled]=\"running || launching\" (click)=\"confirmingDiscard = true\">\n {{ 'Discard the saved detections' | translate }}</button>\n <span class=\"inventory-launch-hint\">\n {{ 'Once the cutoff is chosen, this frees the space they take. The equipment stays.' | translate }}\n </span>\n </ng-container>\n <ng-container *ngIf=\"discardable.length > 0 && confirmingDiscard\">\n <span class=\"inventory-launch-hint\">\n {{ 'The equipment stays. To change the cutoff later, the panoramas will have to be analysed again.' | translate }}\n </span>\n <div class=\"inventory-launch-confirm\">\n <button type=\"button\" class=\"btn btn-sm btn-danger rounded-pill\" [disabled]=\"running || launching || discarding\"\n (click)=\"onConfirmDiscard()\">{{ (discarding ? 'Discarding\u2026' : 'Yes, discard') | translate }}</button>\n <button type=\"button\" class=\"btn btn-sm btn-outline-secondary rounded-pill\" [disabled]=\"discarding\"\n (click)=\"confirmingDiscard = false\">{{ 'No, keep them' | translate }}</button>\n </div>\n </ng-container>\n <span class=\"inventory-launch-hint\" *ngIf=\"discarded\">{{ 'The saved detections were discarded.' | translate }}</span>\n</div>\n\n<div class=\"inventory-launch-settings\">\n <select class=\"no-lowercase form-select\" [(ngModel)]=\"model\" *ngIf=\"!reuseDetections\">\n <option [ngValue]=\"undefined\">{{ 'Select model' | translate }}</option>\n <option *ngFor=\"let option of models\" [ngValue]=\"option\">{{ option.name | translate }}</option>\n </select>\n <!-- Reusing, the detections keep the model that made them. -->\n <select class=\"no-lowercase form-select inventory-launch-reused-model\" *ngIf=\"reuseDetections\" disabled\n [title]=\"'The detections keep the model that made them.' | translate\">\n <option>{{ reusedModelName | translate }}</option>\n </select>\n <select class=\"form-select\" [(ngModel)]=\"cutoffScore\" [title]=\"'Cutoff score' | translate\">\n <option *ngFor=\"let score of cutoffScores\" [ngValue]=\"score\">{{ 'Cutoff score' | translate }} {{ score }}</option>\n </select>\n</div>\n\n<div class=\"inventory-launch-buttons\">\n <!-- Closes the panel only: \"Cancel the inventory\", below, is what stops one. -->\n <button type=\"button\" class=\"btn btn-outline-secondary rounded-pill inventory-launch-close\" [disabled]=\"launching\"\n (click)=\"cancelled.emit()\">{{ 'Close' | translate }}</button>\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill inventory-launch-go\" [disabled]=\"!canLaunch\"\n [title]=\"running ? ('An inventory is already running for this location.' | translate) : ''\"\n (click)=\"onLaunchClick()\">{{ (reuseDetections && canReuse ? 'Update' : 'Launch inventory') | translate }}</button>\n</div>\n\n<div class=\"text-danger mt-2\" *ngIf=\"message\">{{ message | translate: { count: notDeleted } }}</div>\n", styles: [":host{display:block}.inventory-launch-summary{padding-left:1.2rem;margin-bottom:.5rem}.inventory-launch-delete{margin:.75rem 0}.inventory-launch-hint{display:block;margin-top:.25rem;font-size:.8rem;color:#6c757d}.inventory-launch-confirm{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.25rem}.inventory-launch-settings{display:flex;flex-wrap:wrap;gap:.5rem}.inventory-launch-settings select{flex:1 1 10rem}.inventory-launch-buttons{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.75rem}\n"] }]
|
|
20267
|
+
args: [{ selector: "lib-inventory-launch", template: "<!-- What the inventory will do, before it is done: it adds equipment to the location. -->\r\n<p *ngIf=\"panorama\">{{ 'The AI will look for equipment in this panorama and add what it finds to the location.' | translate }}</p>\r\n<p *ngIf=\"!panorama\">{{ 'The AI will look for equipment in the visits of this location and add what it finds to it.' | translate }}</p>\r\n\r\n<ul class=\"inventory-launch-summary\" *ngIf=\"panorama\">\r\n <li>{{ 'Visit' | translate }}: <strong class=\"no-lowercase\">{{ visits?.[0]?.label }}</strong></li>\r\n <li>{{ 'Panorama' | translate }}: <strong class=\"no-lowercase\">{{ panorama }}</strong></li>\r\n</ul>\r\n<ul class=\"inventory-launch-summary\" *ngIf=\"!panorama && visits?.length > 0\">\r\n <li>{{ 'Visits to analyse' | translate }}:\r\n <strong>{{ checkingFiles ? '\u2026' : launchableVisits.length + ' / ' + visits.length }}</strong></li>\r\n</ul>\r\n<p class=\"text-danger\" *ngIf=\"visits?.length === 0\">\r\n {{ 'This location has no Matterport visit for the AI to analyse.' | translate }}</p>\r\n\r\n<lib-loader *ngIf=\"checkingFiles\"></lib-loader>\r\n<ng-container *ngIf=\"!checkingFiles\">\r\n <div *ngFor=\"let visit of visits\">\r\n <strong class=\"no-lowercase\" *ngIf=\"!panorama\">{{ visit.label }}</strong>\r\n <lib-inventory-files [files]=\"visitFiles[visit.nodeID]\" (filesChange)=\"onFilesChange(visit, $event)\"\r\n [model3D]=\"visit.model3D\" [disabled]=\"running || launching || discarding\"></lib-inventory-files>\r\n </div>\r\n</ng-container>\r\n\r\n<div class=\"inventory-launch-delete\">\r\n <lib-checkbox-slider label=\"Delete previous inventory ?\" [checked]=\"deletePrevious\"\r\n [disabled]=\"launching || reuseDetections\" (checkedChange)=\"onDeletePreviousChange($event)\"></lib-checkbox-slider>\r\n <span class=\"inventory-launch-hint\" *ngIf=\"deletePrevious\">\r\n {{ 'Equipment the AI added to these visits, deleted first' | translate }}: <strong>{{ aiEquipmentCount ?? '\u2026' }}</strong>\r\n </span>\r\n <span class=\"inventory-launch-hint\" *ngIf=\"reuseDetections\">\r\n {{ 'Needed to reuse the detections, or every object would be there twice.' | translate }}\r\n </span>\r\n <span class=\"inventory-launch-hint\" *ngIf=\"deleting\">\r\n {{ 'Deleting the previous inventory' | translate }}: {{ deleting.done }} / {{ deleting.total }}\r\n </span>\r\n</div>\r\n\r\n<!-- The last inventories' detections placed again with another cutoff: no panorama analysed again. -->\r\n<div class=\"inventory-launch-delete\" *ngIf=\"canReuse\">\r\n <lib-checkbox-slider label=\"Reuse the detections of the last inventory\" [checked]=\"reuseDetections\"\r\n [disabled]=\"launching\" (checkedChange)=\"onReuseChange($event)\"></lib-checkbox-slider>\r\n <span class=\"inventory-launch-hint\" *ngIf=\"reuseDetections\">\r\n {{ 'Only the placing is done again, with the cutoff chosen: a few minutes.' | translate }}\r\n </span>\r\n</div>\r\n\r\n<!-- Once the cutoff is chosen, the detections kept to change it can go. -->\r\n<div class=\"inventory-launch-delete\" *ngIf=\"discardable.length > 0 || discarded\">\r\n <ng-container *ngIf=\"discardable.length > 0 && !confirmingDiscard\">\r\n <button type=\"button\" class=\"btn btn-sm btn-outline-danger rounded-pill inventory-launch-discard\"\r\n [disabled]=\"running || launching\" (click)=\"confirmingDiscard = true\">\r\n {{ 'Discard the saved detections' | translate }}</button>\r\n <span class=\"inventory-launch-hint\">\r\n {{ 'Once the cutoff is chosen, this frees the space they take. The equipment stays.' | translate }}\r\n </span>\r\n </ng-container>\r\n <ng-container *ngIf=\"discardable.length > 0 && confirmingDiscard\">\r\n <span class=\"inventory-launch-hint\">\r\n {{ 'The equipment stays. To change the cutoff later, the panoramas will have to be analysed again.' | translate }}\r\n </span>\r\n <div class=\"inventory-launch-confirm\">\r\n <button type=\"button\" class=\"btn btn-sm btn-danger rounded-pill\" [disabled]=\"running || launching || discarding\"\r\n (click)=\"onConfirmDiscard()\">{{ (discarding ? 'Discarding\u2026' : 'Yes, discard') | translate }}</button>\r\n <button type=\"button\" class=\"btn btn-sm btn-outline-secondary rounded-pill\" [disabled]=\"discarding\"\r\n (click)=\"confirmingDiscard = false\">{{ 'No, keep them' | translate }}</button>\r\n </div>\r\n </ng-container>\r\n <span class=\"inventory-launch-hint\" *ngIf=\"discarded\">{{ 'The saved detections were discarded.' | translate }}</span>\r\n</div>\r\n\r\n<div class=\"inventory-launch-settings\">\r\n <select class=\"no-lowercase form-select\" [(ngModel)]=\"model\" *ngIf=\"!reuseDetections\">\r\n <option [ngValue]=\"undefined\">{{ 'Select model' | translate }}</option>\r\n <option *ngFor=\"let option of models\" [ngValue]=\"option\">{{ option.name | translate }}</option>\r\n </select>\r\n <!-- Reusing, the detections keep the model that made them. -->\r\n <select class=\"no-lowercase form-select inventory-launch-reused-model\" *ngIf=\"reuseDetections\" disabled\r\n [title]=\"'The detections keep the model that made them.' | translate\">\r\n <option>{{ reusedModelName | translate }}</option>\r\n </select>\r\n <select class=\"form-select\" [(ngModel)]=\"cutoffScore\" [title]=\"'Cutoff score' | translate\">\r\n <option *ngFor=\"let score of cutoffScores\" [ngValue]=\"score\">{{ 'Cutoff score' | translate }} {{ score }}</option>\r\n </select>\r\n</div>\r\n\r\n<div class=\"inventory-launch-buttons\">\r\n <!-- Closes the panel only: \"Cancel the inventory\", below, is what stops one. -->\r\n <button type=\"button\" class=\"btn btn-outline-secondary rounded-pill inventory-launch-close\" [disabled]=\"launching\"\r\n (click)=\"cancelled.emit()\">{{ 'Close' | translate }}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill inventory-launch-go\" [disabled]=\"!canLaunch\"\r\n [title]=\"running ? ('An inventory is already running for this location.' | translate) : ''\"\r\n (click)=\"onLaunchClick()\">{{ (reuseDetections && canReuse ? 'Update' : 'Launch inventory') | translate }}</button>\r\n</div>\r\n\r\n<div class=\"text-danger mt-2\" *ngIf=\"message\">{{ message | translate: { count: notDeleted } }}</div>\r\n", styles: [":host{display:block}.inventory-launch-summary{padding-left:1.2rem;margin-bottom:.5rem}.inventory-launch-delete{margin:.75rem 0}.inventory-launch-hint{display:block;margin-top:.25rem;font-size:.8rem;color:#6c757d}.inventory-launch-confirm{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.25rem}.inventory-launch-settings{display:flex;flex-wrap:wrap;gap:.5rem}.inventory-launch-settings select{flex:1 1 10rem}.inventory-launch-buttons{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.75rem}\n"] }]
|
|
20250
20268
|
}], ctorParameters: () => [{ type: InventoryService }, { type: EquipmentService }, { type: NavigationService }], propDecorators: { spaceID: [{
|
|
20251
20269
|
type: Input
|
|
20252
20270
|
}], visits: [{
|
|
@@ -20434,27 +20452,27 @@ class BaseTagService {
|
|
|
20434
20452
|
throw new Error('updatePoiMetadata is not implemented in the base class.');
|
|
20435
20453
|
}*/
|
|
20436
20454
|
async prepareEquipmentHtml(equip) {
|
|
20437
|
-
throw new Error(`prepareEquipmentHtml is not implemented in the base class.
|
|
20455
|
+
throw new Error(`prepareEquipmentHtml is not implemented in the base class.
|
|
20438
20456
|
Please override this method in your extended class.`);
|
|
20439
20457
|
}
|
|
20440
20458
|
async prepareTicketHtml(ticket) {
|
|
20441
|
-
throw new Error(`prepareTicketHtml is not implemented in the base class.
|
|
20459
|
+
throw new Error(`prepareTicketHtml is not implemented in the base class.
|
|
20442
20460
|
Please override this method in your extended class.`);
|
|
20443
20461
|
}
|
|
20444
20462
|
async prepareFeatureHtml(feature) {
|
|
20445
|
-
throw new Error(`prepareFeatureHtml is not implemented in the base class.
|
|
20463
|
+
throw new Error(`prepareFeatureHtml is not implemented in the base class.
|
|
20446
20464
|
Please override this method in your extended class.`);
|
|
20447
20465
|
}
|
|
20448
20466
|
async prepareMeasurementHtml(measure) {
|
|
20449
|
-
throw new Error(`prepareMeasurementHtml is not implemented in the base class.
|
|
20467
|
+
throw new Error(`prepareMeasurementHtml is not implemented in the base class.
|
|
20450
20468
|
Please override this method in your extended class.`);
|
|
20451
20469
|
}
|
|
20452
20470
|
async prepareDeskHtml(feature) {
|
|
20453
|
-
throw new Error(`prepareDeskHtml is not implemented in the base class.
|
|
20471
|
+
throw new Error(`prepareDeskHtml is not implemented in the base class.
|
|
20454
20472
|
Please override this method in your extended class.`);
|
|
20455
20473
|
}
|
|
20456
20474
|
async prepareIndicatorHtml(feature) {
|
|
20457
|
-
throw new Error(`prepareDeskHtml is not implemented in the base class.
|
|
20475
|
+
throw new Error(`prepareDeskHtml is not implemented in the base class.
|
|
20458
20476
|
Please override this method in your extended class.`);
|
|
20459
20477
|
}
|
|
20460
20478
|
async getSignedTagIconSource(tagIconSrc) {
|
|
@@ -20463,15 +20481,15 @@ class BaseTagService {
|
|
|
20463
20481
|
getIconTagImageForFeature(feature, poi) {
|
|
20464
20482
|
// const tagIcon = JSON.parse(poi.tagIcon);
|
|
20465
20483
|
// return tagIcon.src;
|
|
20466
|
-
throw new Error(`getIconTagImageForFeature is not implemented in the base class.
|
|
20484
|
+
throw new Error(`getIconTagImageForFeature is not implemented in the base class.
|
|
20467
20485
|
Please override this method in your extended class.`);
|
|
20468
20486
|
}
|
|
20469
20487
|
getScriptForTag(object, tagType) {
|
|
20470
|
-
throw new Error(`getScriptForTag is not implemented in the base class.
|
|
20488
|
+
throw new Error(`getScriptForTag is not implemented in the base class.
|
|
20471
20489
|
Please override this method in your extended class.`);
|
|
20472
20490
|
}
|
|
20473
20491
|
getAnnexeForCommentTypeInFeature(feature, commentType) {
|
|
20474
|
-
throw new Error(`getAnnexeForCommentTypeInFeature is not implemented in the base class.
|
|
20492
|
+
throw new Error(`getAnnexeForCommentTypeInFeature is not implemented in the base class.
|
|
20475
20493
|
Please override this method in your extended class.`);
|
|
20476
20494
|
}
|
|
20477
20495
|
getBillboardMediaToEmbed(object) {
|
|
@@ -20480,27 +20498,27 @@ class BaseTagService {
|
|
|
20480
20498
|
return { comment: null, tagDescription: '' };
|
|
20481
20499
|
}
|
|
20482
20500
|
onActionDetailClick(url) {
|
|
20483
|
-
throw new Error(`onActionDetailClick is not implemented in the base class.
|
|
20501
|
+
throw new Error(`onActionDetailClick is not implemented in the base class.
|
|
20484
20502
|
Please override this method in your extended class.`);
|
|
20485
20503
|
}
|
|
20486
20504
|
onActionAudioClick(audioCommentID) {
|
|
20487
|
-
throw new Error(`onActionDetailClick is not implemented in the base class.
|
|
20505
|
+
throw new Error(`onActionDetailClick is not implemented in the base class.
|
|
20488
20506
|
Please override this method in your extended class.`);
|
|
20489
20507
|
}
|
|
20490
20508
|
onActionVideoClick(url) {
|
|
20491
|
-
throw new Error(`onActionVideoClick is not implemented in the base class.
|
|
20509
|
+
throw new Error(`onActionVideoClick is not implemented in the base class.
|
|
20492
20510
|
Please override this method in your extended class.`);
|
|
20493
20511
|
}
|
|
20494
20512
|
onActionImageClick(imageCommentID) {
|
|
20495
|
-
throw new Error(`onActionImageClick is not implemented in the base class.
|
|
20513
|
+
throw new Error(`onActionImageClick is not implemented in the base class.
|
|
20496
20514
|
Please override this method in your extended class.`);
|
|
20497
20515
|
}
|
|
20498
20516
|
onActionDocClick(url) {
|
|
20499
|
-
throw new Error(`onActionDocClick is not implemented in the base class.
|
|
20517
|
+
throw new Error(`onActionDocClick is not implemented in the base class.
|
|
20500
20518
|
Please override this method in your extended class.`);
|
|
20501
20519
|
}
|
|
20502
20520
|
onActionYoutubeClick(url) {
|
|
20503
|
-
throw new Error(`onActionYoutubeClick is not implemented in the base class.
|
|
20521
|
+
throw new Error(`onActionYoutubeClick is not implemented in the base class.
|
|
20504
20522
|
Please override this method in your extended class.`);
|
|
20505
20523
|
}
|
|
20506
20524
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseTagService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -21887,6 +21905,285 @@ function applyRigidTransformToDirection(v, t) {
|
|
|
21887
21905
|
z: v.x * sin + v.z * cos
|
|
21888
21906
|
};
|
|
21889
21907
|
}
|
|
21908
|
+
/**
|
|
21909
|
+
* Applies the rotation part of the transform to an object's orientation: the Euler angles
|
|
21910
|
+
* (radians, three.js "XYZ" order, the one Object3D.rotation is stored and loaded in).
|
|
21911
|
+
*
|
|
21912
|
+
* A 3D object placed in the scene keeps its full orientation, so adding the angle to the Y
|
|
21913
|
+
* component only — as applyRigidTransformToYRotationDeg() does for a tag's heading — would be
|
|
21914
|
+
* wrong as soon as the object is tilted on X or Z. The rotation is composed instead: the
|
|
21915
|
+
* object's own rotation first, then the turn around the vertical axis of the whole model.
|
|
21916
|
+
*
|
|
21917
|
+
* The turn is the one applyRigidTransformToPoint() applies to positions, written for (x, z) as
|
|
21918
|
+
* x' = x cos(a) - z sin(a), z' = x sin(a) + z cos(a): in three.js terms a rotation of -a
|
|
21919
|
+
* around +Y. So an object keeps pointing at the same thing in both models.
|
|
21920
|
+
*/
|
|
21921
|
+
function applyRigidTransformToEulerXYZ(rotation, t) {
|
|
21922
|
+
if (!t.rotationYRad) {
|
|
21923
|
+
// no turn: the stored angles are kept exactly (a round trip through a quaternion
|
|
21924
|
+
// could give an equivalent but differently written set of angles)
|
|
21925
|
+
return { x: rotation.x, y: rotation.y, z: rotation.z };
|
|
21926
|
+
}
|
|
21927
|
+
const objectRotation = new Quaternion().setFromEuler(new Euler(rotation.x, rotation.y, rotation.z, 'XYZ'));
|
|
21928
|
+
const modelTurn = new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), -t.rotationYRad);
|
|
21929
|
+
const turned = new Euler().setFromQuaternion(objectRotation.premultiply(modelTurn), 'XYZ');
|
|
21930
|
+
return { x: turned.x, y: turned.y, z: turned.z };
|
|
21931
|
+
}
|
|
21932
|
+
|
|
21933
|
+
// tag-archive.util.ts
|
|
21934
|
+
//
|
|
21935
|
+
// File format of the tag export / import (see MatterportTagCopyService.exportTagsToArchive()
|
|
21936
|
+
// and importTagsFromArchive()). An archive moves every tag of a location — and everything a
|
|
21937
|
+
// tag points at — from one environment (dev, demo, staging, production) to another, where
|
|
21938
|
+
// database ids and the S3 bucket are different.
|
|
21939
|
+
//
|
|
21940
|
+
// It is a ZIP file:
|
|
21941
|
+
// manifest.json format, version, origin of the export, the data and the file index
|
|
21942
|
+
// files/<n>_<name> one entry per S3 file referenced by the data (photos, attachments,
|
|
21943
|
+
// 3D models, tag icons...), stored as is (no recompression of media)
|
|
21944
|
+
//
|
|
21945
|
+
// The data keeps the records exactly as the source environment returned them: ids included,
|
|
21946
|
+
// since they are what links the records together (POI.elementID, Comment.featureID,
|
|
21947
|
+
// POI.tagImageID...). They are never written as is in the target: the import creates new
|
|
21948
|
+
// records and remaps every reference, like the copy between two locations does.
|
|
21949
|
+
const TAG_ARCHIVE_FORMAT = 'smarterplan-tags';
|
|
21950
|
+
/** Bumped on any change of the manifest that an older import could misread. */
|
|
21951
|
+
const TAG_ARCHIVE_VERSION = 1;
|
|
21952
|
+
const TAG_ARCHIVE_MANIFEST = 'manifest.json';
|
|
21953
|
+
const TAG_ARCHIVE_FILES_FOLDER = 'files/';
|
|
21954
|
+
/** Why an archive cannot be read. `code` is the end of a `matterportCopy.*` translation key. */
|
|
21955
|
+
class TagArchiveError extends Error {
|
|
21956
|
+
code;
|
|
21957
|
+
params;
|
|
21958
|
+
constructor(code, params = {}) {
|
|
21959
|
+
super(`Invalid tag archive: ${code}`);
|
|
21960
|
+
this.code = code;
|
|
21961
|
+
this.params = params;
|
|
21962
|
+
this.name = 'TagArchiveError';
|
|
21963
|
+
}
|
|
21964
|
+
}
|
|
21965
|
+
/** Archive path of the n-th exported file. The original name is kept for readability only. */
|
|
21966
|
+
function tagArchiveFilePath(index, s3Key) {
|
|
21967
|
+
const name = (s3Key.substring(s3Key.lastIndexOf('/') + 1) || 'file').replace(/[^a-zA-Z0-9.\-_]/g, '_');
|
|
21968
|
+
return `${TAG_ARCHIVE_FILES_FOLDER}${index}_${name}`;
|
|
21969
|
+
}
|
|
21970
|
+
/**
|
|
21971
|
+
* Packs a manifest and its files into a ZIP. Media files are stored without compression:
|
|
21972
|
+
* images, videos and models are already compressed, recompressing them only costs time.
|
|
21973
|
+
*/
|
|
21974
|
+
function buildTagArchive(manifest, files) {
|
|
21975
|
+
const entries = {
|
|
21976
|
+
[TAG_ARCHIVE_MANIFEST]: [strToU8(JSON.stringify(manifest)), { level: 6 }]
|
|
21977
|
+
};
|
|
21978
|
+
for (const [path, bytes] of Object.entries(files)) {
|
|
21979
|
+
entries[path] = [bytes, { level: 0 }];
|
|
21980
|
+
}
|
|
21981
|
+
return zipSync(entries);
|
|
21982
|
+
}
|
|
21983
|
+
/**
|
|
21984
|
+
* Reads a ZIP produced by buildTagArchive(). Checks the format and the version, not the
|
|
21985
|
+
* module: see MatterportTagCopyService.readTagArchive().
|
|
21986
|
+
*/
|
|
21987
|
+
function readTagArchive(bytes) {
|
|
21988
|
+
let entries;
|
|
21989
|
+
try {
|
|
21990
|
+
entries = unzipSync(bytes);
|
|
21991
|
+
}
|
|
21992
|
+
catch {
|
|
21993
|
+
throw new TagArchiveError('errorArchiveNotZip');
|
|
21994
|
+
}
|
|
21995
|
+
const manifestBytes = entries[TAG_ARCHIVE_MANIFEST];
|
|
21996
|
+
if (!manifestBytes) {
|
|
21997
|
+
throw new TagArchiveError('errorArchiveNoManifest');
|
|
21998
|
+
}
|
|
21999
|
+
let manifest;
|
|
22000
|
+
try {
|
|
22001
|
+
manifest = JSON.parse(strFromU8(manifestBytes));
|
|
22002
|
+
}
|
|
22003
|
+
catch {
|
|
22004
|
+
throw new TagArchiveError('errorArchiveNoManifest');
|
|
22005
|
+
}
|
|
22006
|
+
if (manifest?.format !== TAG_ARCHIVE_FORMAT || !manifest.data || !manifest.origin) {
|
|
22007
|
+
throw new TagArchiveError('errorArchiveNoManifest');
|
|
22008
|
+
}
|
|
22009
|
+
if (manifest.version > TAG_ARCHIVE_VERSION) {
|
|
22010
|
+
throw new TagArchiveError('errorArchiveVersion', { version: manifest.version });
|
|
22011
|
+
}
|
|
22012
|
+
const files = {};
|
|
22013
|
+
for (const [path, content] of Object.entries(entries)) {
|
|
22014
|
+
if (path.startsWith(TAG_ARCHIVE_FILES_FOLDER)) {
|
|
22015
|
+
files[path] = content;
|
|
22016
|
+
}
|
|
22017
|
+
}
|
|
22018
|
+
return { manifest, files };
|
|
22019
|
+
}
|
|
22020
|
+
|
|
22021
|
+
// object3d-model.util.ts
|
|
22022
|
+
//
|
|
22023
|
+
// Where the model file of an Object3D lives, and the checks a model file uploaded by a user
|
|
22024
|
+
// must pass before it is stored.
|
|
22025
|
+
//
|
|
22026
|
+
// Object3D.path means one of three things:
|
|
22027
|
+
// - s3Bucket === true -> key of a file uploaded to our S3 bucket (public level);
|
|
22028
|
+
// - an absolute http(s) url -> a model hosted elsewhere;
|
|
22029
|
+
// - otherwise "3DObjects/objects/<file>" -> a model of the library shipped with the application
|
|
22030
|
+
// (assets/3Dobjects/objects/<file>).
|
|
22031
|
+
//
|
|
22032
|
+
// Uploaded models are restricted to binary glTF (.glb): the viewer reads an S3 file through a
|
|
22033
|
+
// signed url, next to which no companion file (textures, .bin, .mtl) could be resolved. A .glb
|
|
22034
|
+
// carries everything in a single file.
|
|
22035
|
+
/** Folder of the library models, as stored in Object3D.path. */
|
|
22036
|
+
const OBJECT3D_LIBRARY_FOLDER = '3DObjects/objects/';
|
|
22037
|
+
/** Folder the application serves the library models from (see MatterportObject3DService). */
|
|
22038
|
+
const OBJECT3D_LIBRARY_ASSET_FOLDER = 'assets/3Dobjects/objects/';
|
|
22039
|
+
/** Largest model file a user may upload. */
|
|
22040
|
+
const OBJECT3D_UPLOAD_MAX_BYTES = 50 * 1024 * 1024;
|
|
22041
|
+
/** S3 folder of the uploaded models; one sub-folder per space. */
|
|
22042
|
+
const OBJECT3D_S3_FOLDER = 'objects3D/';
|
|
22043
|
+
/** Model formats the 3D loaders handle (an S3 model copied between locations keeps its own). */
|
|
22044
|
+
const OBJECT3D_MODEL_EXTENSIONS = ['glb', 'gltf', 'obj', 'fbx', 'dae'];
|
|
22045
|
+
/** Content type the uploaded models are stored with. */
|
|
22046
|
+
const GLB_CONTENT_TYPE = 'model/gltf-binary';
|
|
22047
|
+
const GLB_MAGIC = 0x46546c67; // "glTF", little endian
|
|
22048
|
+
const GLB_CHUNK_JSON = 0x4e4f534a; // "JSON"
|
|
22049
|
+
const GLB_HEADER_BYTES = 12;
|
|
22050
|
+
const GLB_CHUNK_HEADER_BYTES = 8;
|
|
22051
|
+
/**
|
|
22052
|
+
* Checks that a file is a self-contained binary glTF 2.0 model, small enough to be uploaded:
|
|
22053
|
+
* - name ending in .glb, size between 1 byte and OBJECT3D_UPLOAD_MAX_BYTES;
|
|
22054
|
+
* - glb header: magic "glTF", version 2, declared length equal to the file size;
|
|
22055
|
+
* - first chunk of type JSON, holding a parseable glTF document of version 2.x;
|
|
22056
|
+
* - no buffer nor image pointing at another file or url (only embedded data): such a
|
|
22057
|
+
* reference cannot be resolved next to a signed S3 url, and would make the viewer fetch
|
|
22058
|
+
* an arbitrary address.
|
|
22059
|
+
* The content is only read, never executed. Returns the error, or null when the file is valid.
|
|
22060
|
+
*/
|
|
22061
|
+
async function validateGlbFile(file) {
|
|
22062
|
+
const name = (file.name || '').toLowerCase();
|
|
22063
|
+
if (!name.endsWith('.glb')) {
|
|
22064
|
+
return 'Only .glb files can be uploaded.';
|
|
22065
|
+
}
|
|
22066
|
+
if (!file.size) {
|
|
22067
|
+
return 'The file is empty.';
|
|
22068
|
+
}
|
|
22069
|
+
if (file.size > OBJECT3D_UPLOAD_MAX_BYTES) {
|
|
22070
|
+
return 'The file is too large (50 MB maximum).';
|
|
22071
|
+
}
|
|
22072
|
+
if (file.size < GLB_HEADER_BYTES + GLB_CHUNK_HEADER_BYTES) {
|
|
22073
|
+
return 'This file is not a valid .glb model.';
|
|
22074
|
+
}
|
|
22075
|
+
const header = new DataView(await file.slice(0, GLB_HEADER_BYTES + GLB_CHUNK_HEADER_BYTES).arrayBuffer());
|
|
22076
|
+
const magic = header.getUint32(0, true);
|
|
22077
|
+
const version = header.getUint32(4, true);
|
|
22078
|
+
const declaredLength = header.getUint32(8, true);
|
|
22079
|
+
const jsonLength = header.getUint32(12, true);
|
|
22080
|
+
const jsonType = header.getUint32(16, true);
|
|
22081
|
+
const jsonStart = GLB_HEADER_BYTES + GLB_CHUNK_HEADER_BYTES;
|
|
22082
|
+
if (magic !== GLB_MAGIC || version !== 2 || declaredLength !== file.size
|
|
22083
|
+
|| jsonType !== GLB_CHUNK_JSON || jsonLength === 0 || jsonStart + jsonLength > file.size) {
|
|
22084
|
+
return 'This file is not a valid .glb model.';
|
|
22085
|
+
}
|
|
22086
|
+
let gltf;
|
|
22087
|
+
try {
|
|
22088
|
+
const jsonText = new TextDecoder('utf-8', { fatal: true })
|
|
22089
|
+
.decode(await file.slice(jsonStart, jsonStart + jsonLength).arrayBuffer());
|
|
22090
|
+
gltf = JSON.parse(jsonText);
|
|
22091
|
+
}
|
|
22092
|
+
catch {
|
|
22093
|
+
return 'This file is not a valid .glb model.';
|
|
22094
|
+
}
|
|
22095
|
+
if (!gltf || typeof gltf !== 'object' || !/^2\./.test(String(gltf.asset?.version ?? ''))) {
|
|
22096
|
+
return 'This file is not a valid .glb model.';
|
|
22097
|
+
}
|
|
22098
|
+
const references = [...asArray(gltf.buffers), ...asArray(gltf.images)]
|
|
22099
|
+
.map((item) => item?.uri)
|
|
22100
|
+
.filter((uri) => uri !== undefined && uri !== null);
|
|
22101
|
+
if (references.some((uri) => typeof uri !== 'string' || !uri.startsWith('data:'))) {
|
|
22102
|
+
return 'This model refers to external files: export it as a single .glb file with embedded textures.';
|
|
22103
|
+
}
|
|
22104
|
+
return null;
|
|
22105
|
+
}
|
|
22106
|
+
function asArray(value) {
|
|
22107
|
+
return Array.isArray(value) ? value : [];
|
|
22108
|
+
}
|
|
22109
|
+
/**
|
|
22110
|
+
* S3 key of an uploaded model: under the space's folder, with a file name reduced to safe
|
|
22111
|
+
* characters, followed by the upload time (UTC, to the millisecond) and a short random suffix.
|
|
22112
|
+
* S3 overwrites an existing key without warning, and a model may be used by several objects
|
|
22113
|
+
* (duplicates, copies, imports): two uploads of the same file name must never share a key.
|
|
22114
|
+
* The user's file name never decides the folder.
|
|
22115
|
+
*/
|
|
22116
|
+
function buildObject3DModelKey(spaceId, fileName, now = new Date()) {
|
|
22117
|
+
const base = (fileName || 'model.glb').split(/[\\/]/).pop() || 'model.glb';
|
|
22118
|
+
const withoutExtension = base.replace(/\.[^.]*$/, '');
|
|
22119
|
+
// a copied model keeps its format (the loader is chosen by the extension); anything else is a .glb
|
|
22120
|
+
const extension = OBJECT3D_MODEL_EXTENSIONS.find(ext => base.toLowerCase().endsWith(`.${ext}`)) ?? 'glb';
|
|
22121
|
+
const safeName = withoutExtension
|
|
22122
|
+
.normalize('NFD').replace(/[̀-ͯ]/g, '')
|
|
22123
|
+
.replace(/[^a-zA-Z0-9\-_]+/g, '_')
|
|
22124
|
+
.replace(/^_+|_+$/g, '')
|
|
22125
|
+
.substring(0, 80) || 'model';
|
|
22126
|
+
const safeSpace = (spaceId || 'space').replace(/[^a-zA-Z0-9\-_]/g, '');
|
|
22127
|
+
// 20261126T104512345Z: sortable, and free of the characters S3 keys handle badly (":" ".")
|
|
22128
|
+
const timestamp = now.toISOString().replace(/[-:.]/g, '');
|
|
22129
|
+
const random = Math.random().toString(36).slice(2, 6).padEnd(4, '0');
|
|
22130
|
+
return `${OBJECT3D_S3_FOLDER}${safeSpace}/${safeName}_${timestamp}_${random}.${extension}`;
|
|
22131
|
+
}
|
|
22132
|
+
/** File name and extension of a path or url ("a/b/chair.GLB?v=2" gives chair / glb). */
|
|
22133
|
+
function splitModelFile(path) {
|
|
22134
|
+
const file = path.split(/[?#]/)[0].split('/').pop() || '';
|
|
22135
|
+
const dotIndex = file.lastIndexOf('.');
|
|
22136
|
+
if (dotIndex <= 0 || dotIndex === file.length - 1) {
|
|
22137
|
+
return null;
|
|
22138
|
+
}
|
|
22139
|
+
return { object: file.slice(0, dotIndex), format: file.slice(dotIndex + 1).toLowerCase() };
|
|
22140
|
+
}
|
|
22141
|
+
/** File name of a library model ("3DObjects/objects/chair.glb" gives "chair.glb"), null otherwise. */
|
|
22142
|
+
function getObject3DLibraryFile(path) {
|
|
22143
|
+
if (!path || /^https?:\/\//i.test(path)) {
|
|
22144
|
+
return null;
|
|
22145
|
+
}
|
|
22146
|
+
const markerIndex = path.indexOf(OBJECT3D_LIBRARY_FOLDER);
|
|
22147
|
+
if (markerIndex === -1) {
|
|
22148
|
+
return null;
|
|
22149
|
+
}
|
|
22150
|
+
return path.slice(markerIndex + OBJECT3D_LIBRARY_FOLDER.length) || null;
|
|
22151
|
+
}
|
|
22152
|
+
/**
|
|
22153
|
+
* Where to load the model of an Object3D from (see the header of this file). A model uploaded
|
|
22154
|
+
* to S3 gets a signed url, valid for a limited time: resolve it when loading, never store it.
|
|
22155
|
+
* Null when the path is unusable.
|
|
22156
|
+
*/
|
|
22157
|
+
async function resolveObject3DModelSource(object3D) {
|
|
22158
|
+
const path = object3D?.path;
|
|
22159
|
+
if (!path) {
|
|
22160
|
+
return null;
|
|
22161
|
+
}
|
|
22162
|
+
if (object3D.s3Bucket) {
|
|
22163
|
+
const parsed = splitModelFile(path);
|
|
22164
|
+
const url = parsed ? await getSignedFile(path) : null;
|
|
22165
|
+
return parsed && url ? { ...parsed, url } : null;
|
|
22166
|
+
}
|
|
22167
|
+
if (/^https?:\/\/\S+$/i.test(path)) {
|
|
22168
|
+
const parsed = splitModelFile(path);
|
|
22169
|
+
return parsed ? { ...parsed, url: path } : null;
|
|
22170
|
+
}
|
|
22171
|
+
const libraryFile = getObject3DLibraryFile(path);
|
|
22172
|
+
return libraryFile ? splitModelFile(libraryFile) : null;
|
|
22173
|
+
}
|
|
22174
|
+
|
|
22175
|
+
/**
|
|
22176
|
+
* Whether this application may write 3D model files to S3: a model uploaded by the operator,
|
|
22177
|
+
* a library model restored from a tag archive, a model copied with a 3D object.
|
|
22178
|
+
*
|
|
22179
|
+
* True by default. An application not ready for it yet provides false (see the app.module.ts
|
|
22180
|
+
* of smarterplan-museum): tag copies and imports then never create a model file — a 3D object
|
|
22181
|
+
* whose model would need one is reported in the log instead.
|
|
22182
|
+
*/
|
|
22183
|
+
const OBJECT3D_MODEL_UPLOAD_ENABLED = new InjectionToken('OBJECT3D_MODEL_UPLOAD_ENABLED', {
|
|
22184
|
+
providedIn: 'root',
|
|
22185
|
+
factory: () => true
|
|
22186
|
+
});
|
|
21890
22187
|
|
|
21891
22188
|
/* eslint-disable class-methods-use-this */
|
|
21892
22189
|
class Object3DService {
|
|
@@ -22348,6 +22645,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
22348
22645
|
args: ['currentAPIService']
|
|
22349
22646
|
}] }] });
|
|
22350
22647
|
|
|
22648
|
+
/** Rotation 0, no translation: leaves every position and orientation unchanged. */
|
|
22649
|
+
const IDENTITY_TRANSFORM = {
|
|
22650
|
+
rotationYRad: 0,
|
|
22651
|
+
refSource: { x: 0, y: 0, z: 0 },
|
|
22652
|
+
refTarget: { x: 0, y: 0, z: 0 }
|
|
22653
|
+
};
|
|
22351
22654
|
/** Safely extracts a readable message from an unknown catch value, including Amplify's
|
|
22352
22655
|
* GraphQL error shape ({ data, errors: [{ errorType, message }] }). */
|
|
22353
22656
|
function toErrorMessage(err) {
|
|
@@ -22389,6 +22692,16 @@ class MissingS3FileError extends Error {
|
|
|
22389
22692
|
this.name = 'MissingS3FileError';
|
|
22390
22693
|
}
|
|
22391
22694
|
}
|
|
22695
|
+
/** Thrown when a 3D object would need a model file written to S3 while this application does
|
|
22696
|
+
* not allow it (see OBJECT3D_MODEL_UPLOAD_ENABLED): the object is skipped and reported. */
|
|
22697
|
+
class Object3DModelUploadDisabledError extends Error {
|
|
22698
|
+
objectName;
|
|
22699
|
+
constructor(objectName) {
|
|
22700
|
+
super(`3D model upload disabled in this application, object "${objectName}" skipped`);
|
|
22701
|
+
this.objectName = objectName;
|
|
22702
|
+
this.name = 'Object3DModelUploadDisabledError';
|
|
22703
|
+
}
|
|
22704
|
+
}
|
|
22392
22705
|
class MatterportTagCopyService {
|
|
22393
22706
|
navigationService;
|
|
22394
22707
|
userService;
|
|
@@ -22405,6 +22718,7 @@ class MatterportTagCopyService {
|
|
|
22405
22718
|
domainService;
|
|
22406
22719
|
translate;
|
|
22407
22720
|
zoneService;
|
|
22721
|
+
modelUploadEnabled;
|
|
22408
22722
|
// Emits progress updates during copyTagsFromVisit(); null when idle
|
|
22409
22723
|
copyProgress$ = new BehaviorSubject(null);
|
|
22410
22724
|
// Emits the accumulated log lines during copyTagsFromVisit(); [] when idle
|
|
@@ -22464,7 +22778,26 @@ class MatterportTagCopyService {
|
|
|
22464
22778
|
targetDomainIdsByTypeAndName = new Map();
|
|
22465
22779
|
/** Target space id of the run in progress — used to re-home copied tag icons. */
|
|
22466
22780
|
targetSpaceId = null;
|
|
22467
|
-
|
|
22781
|
+
// Import of an archive (importTagsFromArchive()). The archive comes from ANOTHER
|
|
22782
|
+
// environment, whose ids designate nothing here: its users, missions and categories are
|
|
22783
|
+
// re-pointed to simple local values instead of being matched like a copy does.
|
|
22784
|
+
/** archive being imported; null for a copy between two locations */
|
|
22785
|
+
archive = null;
|
|
22786
|
+
/** an imported comment is credited to the operator running the import (their mission
|
|
22787
|
+
* on the target space): the original author's mission belongs to another environment */
|
|
22788
|
+
importOwnerMissionId = null;
|
|
22789
|
+
/** organisation in which the categories missing from the target are created on import */
|
|
22790
|
+
importDomainOrganisationId = null;
|
|
22791
|
+
/** same Matterport model on both sides: a source sweep id is kept when the target has it */
|
|
22792
|
+
keepSweepIds = false;
|
|
22793
|
+
/** library model file -> whether this application ships it (import only) */
|
|
22794
|
+
libraryModelAvailability = new Map();
|
|
22795
|
+
/** model reference (see object3DModelKeyOf()) -> .glb chosen by the operator to replace it */
|
|
22796
|
+
replacementModels = new Map();
|
|
22797
|
+
/** model reference -> S3 key its replacement was uploaded to: a model shared by several
|
|
22798
|
+
* objects is uploaded once */
|
|
22799
|
+
uploadedReplacementKeys = new Map();
|
|
22800
|
+
constructor(navigationService, userService, poiService, ticketService, equipmentService, object3DService, featureService, measurementService, commentService, hashtagService, missionService, operationService, domainService, translate, zoneService, modelUploadEnabled) {
|
|
22468
22801
|
this.navigationService = navigationService;
|
|
22469
22802
|
this.userService = userService;
|
|
22470
22803
|
this.poiService = poiService;
|
|
@@ -22480,20 +22813,68 @@ class MatterportTagCopyService {
|
|
|
22480
22813
|
this.domainService = domainService;
|
|
22481
22814
|
this.translate = translate;
|
|
22482
22815
|
this.zoneService = zoneService;
|
|
22816
|
+
this.modelUploadEnabled = modelUploadEnabled;
|
|
22483
22817
|
this.spModule = userService.getSpModule();
|
|
22484
22818
|
}
|
|
22819
|
+
/** Whether this application may write 3D model files (see OBJECT3D_MODEL_UPLOAD_ENABLED). */
|
|
22820
|
+
get object3DModelUploadEnabled() {
|
|
22821
|
+
return this.modelUploadEnabled !== false;
|
|
22822
|
+
}
|
|
22485
22823
|
//
|
|
22486
22824
|
// ---------- Public API ----------
|
|
22487
22825
|
//
|
|
22488
22826
|
async copyTagsFromVisit(sourceSpaceId, targetSpaceId, landmarkSourceA, landmarkTargetA, landmarkSourceB, landmarkTargetB) {
|
|
22827
|
+
console.log(`Copying Tags from source ${sourceSpaceId} to target ${targetSpaceId}`);
|
|
22828
|
+
const transform = computeRigidTransform(landmarkSourceA, landmarkTargetA, landmarkSourceB, landmarkTargetB);
|
|
22829
|
+
console.log('Rigid transform computed:', {
|
|
22830
|
+
rotationYDeg: transform.rotationYRad * (180 / Math.PI),
|
|
22831
|
+
refSource: transform.refSource,
|
|
22832
|
+
refTarget: transform.refTarget
|
|
22833
|
+
});
|
|
22834
|
+
return this.runCopy(targetSpaceId, transform, () => this.collectLiveSnapshot(sourceSpaceId));
|
|
22835
|
+
}
|
|
22836
|
+
/**
|
|
22837
|
+
* Imports into a location the tags of an archive produced by exportTagsToArchive(),
|
|
22838
|
+
* possibly on another environment (dev, demo, staging, production).
|
|
22839
|
+
*
|
|
22840
|
+
* Runs the very same phases as copyTagsFromVisit(), the source being the archive instead
|
|
22841
|
+
* of a location: same deduplication (re-importing the same archive creates nothing twice),
|
|
22842
|
+
* same healing, same keyword handling. What differs is how references are re-pointed,
|
|
22843
|
+
* since the archive's ids designate nothing on this environment:
|
|
22844
|
+
* - files are re-uploaded from the archive instead of being copied inside the bucket;
|
|
22845
|
+
* - comments are credited to the operator running the import (see importOwnerMissionId);
|
|
22846
|
+
* - categories are matched by name, and created in the operator's organisation when the
|
|
22847
|
+
* target has none of that name (see resolveImportedDomainID()).
|
|
22848
|
+
*/
|
|
22849
|
+
async importTagsFromArchive(archive, targetSpaceId, calibration, replacementModels = {}) {
|
|
22850
|
+
const origin = archive.manifest.origin;
|
|
22851
|
+
console.log(`Importing Tags exported from ${origin.environment} (space ${origin.spaceId}) to target ${targetSpaceId}`);
|
|
22852
|
+
const transform = calibration.mode === 'LANDMARKS'
|
|
22853
|
+
? computeRigidTransform(calibration.landmarkSourceA, calibration.landmarkTargetA, calibration.landmarkSourceB, calibration.landmarkTargetB)
|
|
22854
|
+
: IDENTITY_TRANSFORM;
|
|
22855
|
+
return this.runCopy(targetSpaceId, transform, async () => {
|
|
22856
|
+
// First log line of an import: where its content comes from, so the downloaded log
|
|
22857
|
+
// keeps the trace of it.
|
|
22858
|
+
this.appendInfoLog(this.translate.instant('matterportCopy.importOrigin', this.describeOrigin(origin)));
|
|
22859
|
+
// set here, after runCopy() reset the run state
|
|
22860
|
+
this.replacementModels = new Map(Object.entries(replacementModels || {}));
|
|
22861
|
+
return this.snapshotFromArchive(archive);
|
|
22862
|
+
}, archive, calibration.mode === 'SAME_MODEL');
|
|
22863
|
+
}
|
|
22864
|
+
/**
|
|
22865
|
+
* Body shared by a copy and an import: reads the source through `collect`, then creates
|
|
22866
|
+
* the records in the target space.
|
|
22867
|
+
*/
|
|
22868
|
+
async runCopy(targetSpaceId, transform, collect, archive = null, keepSweepIds = false) {
|
|
22489
22869
|
let errorCount = 0;
|
|
22490
22870
|
let healedCount = 0;
|
|
22491
22871
|
// items skipped because an equivalent already exists in the target (earlier run)
|
|
22492
22872
|
let alreadyPresentCount = 0;
|
|
22493
22873
|
this.resetLog();
|
|
22494
22874
|
this.resetRunState(targetSpaceId);
|
|
22875
|
+
this.archive = archive;
|
|
22876
|
+
this.keepSweepIds = keepSweepIds;
|
|
22495
22877
|
try {
|
|
22496
|
-
console.log(`Copying Tags from source ${sourceSpaceId} to target ${targetSpaceId}`);
|
|
22497
22878
|
this.setStepProgress('collecting', 'collecting', 0);
|
|
22498
22879
|
this.copyProgress$.next({
|
|
22499
22880
|
phase: 'collecting',
|
|
@@ -22503,67 +22884,36 @@ class MatterportTagCopyService {
|
|
|
22503
22884
|
});
|
|
22504
22885
|
const targetMission = this.userService.currentMission(targetSpaceId);
|
|
22505
22886
|
const targetMissionId = targetMission ? targetMission.id : null;
|
|
22506
|
-
const
|
|
22507
|
-
console.log('Rigid transform computed:', {
|
|
22508
|
-
rotationYDeg: transform.rotationYRad * (180 / Math.PI),
|
|
22509
|
-
refSource: transform.refSource,
|
|
22510
|
-
refTarget: transform.refTarget
|
|
22511
|
-
});
|
|
22512
|
-
const sourceSweepIds = await this.navigationService.getAllowedSweepsIDsForUserInSpace(sourceSpaceId);
|
|
22887
|
+
const snapshot = await collect();
|
|
22513
22888
|
const targetSweepIds = await this.navigationService.getAllowedSweepsIDsForUserInSpace(targetSpaceId);
|
|
22514
|
-
|
|
22515
|
-
const
|
|
22516
|
-
|
|
22517
|
-
this.buildNavigationPositionMap(targetSpaceId, targetSweepIds)
|
|
22518
|
-
]);
|
|
22889
|
+
const sourceNavPositions = snapshot.sweepPositions;
|
|
22890
|
+
const targetNavPositions = await this.buildNavigationPositionMap(targetSpaceId, targetSweepIds);
|
|
22891
|
+
this.setStepProgress('collecting', 'collecting', 70);
|
|
22519
22892
|
const elementIds = this.elementIds;
|
|
22520
|
-
|
|
22521
|
-
|
|
22893
|
+
const sourceTickets = snapshot.tickets;
|
|
22894
|
+
const sourceEquipments = snapshot.equipments;
|
|
22895
|
+
const sourceObjects3D = snapshot.objects3D;
|
|
22896
|
+
const sourceFeatures = snapshot.features;
|
|
22897
|
+
const sourceMeasurements = snapshot.measurements;
|
|
22522
22898
|
let targetTickets = [];
|
|
22523
22899
|
let targetEquipments = [];
|
|
22524
|
-
let sourceMeasurements = [];
|
|
22525
22900
|
let targetMeasurements = [];
|
|
22526
22901
|
if (this.spModule == SpModule.IMMO) {
|
|
22527
|
-
sourceTickets = await this.ticketService.getTicketsBySpace(sourceSpaceId);
|
|
22528
|
-
sourceEquipments = await this.equipmentService.getEquipmentsForSpace(sourceSpaceId);
|
|
22529
22902
|
targetTickets = await this.ticketService.getTicketsBySpace(targetSpaceId);
|
|
22530
22903
|
targetEquipments = await this.equipmentService.getEquipmentsForSpace(targetSpaceId);
|
|
22904
|
+
targetMeasurements = (await this.measurementService.getMeasurementsForSpaceForUser(targetSpaceId));
|
|
22531
22905
|
}
|
|
22532
|
-
this.setStepProgress('collecting', 'collecting', 55);
|
|
22533
|
-
const sourceObjects3D = await this.object3DService.getObjects3DBySpace(sourceSpaceId);
|
|
22534
22906
|
const targetObjects3D = await this.object3DService.getObjects3DBySpace(targetSpaceId);
|
|
22535
|
-
//
|
|
22536
|
-
//
|
|
22537
|
-
//
|
|
22538
|
-
// The source list keeps the historical "skip what the operator archived" rule, so
|
|
22539
|
-
// the set of copied features does not change — but the check is now null-safe:
|
|
22540
|
-
// FeatureService.isArchived() dereferences currentMission(spaceID).id and threw a
|
|
22541
|
-
// TypeError when the operator had no mission on the source space (the common case
|
|
22542
|
-
// for an archived v1 space), aborting the whole copy.
|
|
22543
|
-
// The target list is NOT filtered: it only feeds duplicate detection, and an
|
|
22544
|
-
// archived feature is still a feature that exists there.
|
|
22545
|
-
const sourceFeatures = (await this.featureService.getAllFeaturesBySpaceRaw(sourceSpaceId))
|
|
22546
|
-
.filter(feature => !this.isArchivedForOperator(feature, sourceSpaceId));
|
|
22907
|
+
// The target list is NOT filtered (unlike the source, see collectLiveSnapshot()): it
|
|
22908
|
+
// only feeds duplicate detection, and an archived feature is still a feature that
|
|
22909
|
+
// exists there.
|
|
22547
22910
|
const targetFeatures = await this.featureService.getAllFeaturesBySpaceRaw(targetSpaceId);
|
|
22548
|
-
this.setStepProgress('collecting', 'collecting',
|
|
22549
|
-
// Keywords
|
|
22550
|
-
//
|
|
22551
|
-
await this.
|
|
22552
|
-
// Missions: index both spaces now (read-only), so copied comments can credit
|
|
22553
|
-
// their real author instead of whoever is running the copy.
|
|
22554
|
-
await this.loadMissionIndex(sourceSpaceId, targetSpaceId);
|
|
22555
|
-
// Domains: index every domain either operator's mission can see (read-only), so
|
|
22556
|
-
// a category survives a copy across two DIFFERENT organisations whenever it
|
|
22557
|
-
// genuinely would be selectable in the target space's own dropdown — see
|
|
22558
|
-
// loadDomainIndex() for why this is keyed to Mission, not to the Space itself.
|
|
22559
|
-
await this.loadDomainIndex(sourceSpaceId, targetSpaceId);
|
|
22560
|
-
if (this.spModule == SpModule.IMMO) {
|
|
22561
|
-
sourceMeasurements = (await this.measurementService.getMeasurementsForSpaceForUser(sourceSpaceId))
|
|
22562
|
-
.filter(m => (m.numberPoints ?? 0) > 0);
|
|
22563
|
-
targetMeasurements = (await this.measurementService.getMeasurementsForSpaceForUser(targetSpaceId));
|
|
22564
|
-
}
|
|
22911
|
+
this.setStepProgress('collecting', 'collecting', 80);
|
|
22912
|
+
// Keywords, comment authors and categories: index what the source references and
|
|
22913
|
+
// what the target already has (read-only — nothing is created at this stage).
|
|
22914
|
+
await this.loadReferenceIndexes(snapshot, targetSpaceId, targetMissionId);
|
|
22565
22915
|
this.setStepProgress('collecting', 'collecting', 90);
|
|
22566
|
-
const sourcePoisAll =
|
|
22916
|
+
const sourcePoisAll = snapshot.pois;
|
|
22567
22917
|
const targetPoisAll = await this.poiService.getPoisByMatterportSweeps(targetSweepIds);
|
|
22568
22918
|
// A POI is "owned" by an element (ticket, equipment, 3D object, feature, measurement)
|
|
22569
22919
|
// when its elementID points at one. Those POIs are created by their element's phase,
|
|
@@ -22639,7 +22989,8 @@ class MatterportTagCopyService {
|
|
|
22639
22989
|
level: rawSource.level,
|
|
22640
22990
|
metadata: rawSource.metadata || null,
|
|
22641
22991
|
read: rawSource.read || null,
|
|
22642
|
-
|
|
22992
|
+
// A project of another environment designates nothing here.
|
|
22993
|
+
projectID: this.archive ? null : (rawSource.projectID || null),
|
|
22643
22994
|
problemCode: rawSource.problemCode || null,
|
|
22644
22995
|
// Missions are per-space: a source mission id designates nobody in
|
|
22645
22996
|
// the target space. Carrying the list over would look like real data
|
|
@@ -22650,7 +23001,7 @@ class MatterportTagCopyService {
|
|
|
22650
23001
|
parentID: null,
|
|
22651
23002
|
// Reused unchanged in the same organisation, matched by name
|
|
22652
23003
|
// across two — see resolveDomainID().
|
|
22653
|
-
domainID: this.resolveDomainID(rawSource.domainID),
|
|
23004
|
+
domainID: await this.resolveDomainID(rawSource.domainID),
|
|
22654
23005
|
ownerMissionID: targetMissionId
|
|
22655
23006
|
};
|
|
22656
23007
|
const createdObj = await this.ticketService.createTicket(ticketInput);
|
|
@@ -22661,14 +23012,7 @@ class MatterportTagCopyService {
|
|
|
22661
23012
|
// They were never copied at all: a duplicated ticket arrived stripped
|
|
22662
23013
|
// of every piece of evidence attached to it.
|
|
22663
23014
|
if (createdObj) {
|
|
22664
|
-
|
|
22665
|
-
try {
|
|
22666
|
-
sourceComments = await this.commentService.getAllCommentsForTicket(sourceObj.id);
|
|
22667
|
-
}
|
|
22668
|
-
catch (commentsFetchError) {
|
|
22669
|
-
console.warn(`Falling back to the embedded comment list for ticket "${rawSource.title}":`, commentsFetchError);
|
|
22670
|
-
sourceComments = (sourceObj.comments?.items || []).filter(c => !!c);
|
|
22671
|
-
}
|
|
23015
|
+
const sourceComments = await snapshot.getTicketComments(sourceObj);
|
|
22672
23016
|
for (const sourceComment of this.orderCommentsForCopy(sourceComments)) {
|
|
22673
23017
|
try {
|
|
22674
23018
|
const created = await this.copyCommentForTicket(sourceComment, createdObj.id, targetSpaceId);
|
|
@@ -22781,7 +23125,7 @@ class MatterportTagCopyService {
|
|
|
22781
23125
|
spaceID: targetSpaceId,
|
|
22782
23126
|
// Reused unchanged in the same organisation, matched by name
|
|
22783
23127
|
// across two — see resolveDomainID().
|
|
22784
|
-
domainID: this.resolveDomainID(rawSource.domainID),
|
|
23128
|
+
domainID: await this.resolveDomainID(rawSource.domainID),
|
|
22785
23129
|
photo: copiedPhotoKey,
|
|
22786
23130
|
// `subequipmentsIDs` is deliberately absent: it is remapped to the
|
|
22787
23131
|
// copied equipments in the second pass, once they all exist.
|
|
@@ -22895,7 +23239,7 @@ class MatterportTagCopyService {
|
|
|
22895
23239
|
continue;
|
|
22896
23240
|
}
|
|
22897
23241
|
try {
|
|
22898
|
-
const sourceOps = await
|
|
23242
|
+
const sourceOps = await snapshot.getTicketOperations(sourceTicket.id);
|
|
22899
23243
|
if (sourceOps.length === 0) {
|
|
22900
23244
|
continue;
|
|
22901
23245
|
}
|
|
@@ -22942,8 +23286,31 @@ class MatterportTagCopyService {
|
|
|
22942
23286
|
// Copying unconditionally meant every library object failed with NoSuchKey and
|
|
22943
23287
|
// the whole 3D object was skipped, model AND POI.
|
|
22944
23288
|
let copiedPath = rawSource.path;
|
|
22945
|
-
|
|
22946
|
-
|
|
23289
|
+
let s3Bucket = !!rawSource.s3Bucket;
|
|
23290
|
+
const replacementModel = this.replacementModelOf(rawSource);
|
|
23291
|
+
if (!this.object3DModelUploadEnabled) {
|
|
23292
|
+
// This application writes no model file: the model is referenced as is.
|
|
23293
|
+
copiedPath = await this.modelPathWithoutUpload(rawSource);
|
|
23294
|
+
}
|
|
23295
|
+
else if (replacementModel) {
|
|
23296
|
+
// Import: a model missing from both the archive and this application,
|
|
23297
|
+
// replaced by a .glb the operator chose (see getMissingObject3DModels()).
|
|
23298
|
+
copiedPath = await this.uploadReplacementModel(replacementModel, targetSpaceId);
|
|
23299
|
+
s3Bucket = true;
|
|
23300
|
+
}
|
|
23301
|
+
else if (rawSource.path && rawSource.s3Bucket) {
|
|
23302
|
+
// Stored like an uploaded model: target space folder, timestamped name,
|
|
23303
|
+
// so the copy never overwrites a model another object may use.
|
|
23304
|
+
copiedPath = await this.copyS3KeyIfPresent(rawSource.path, `3D object "${rawSource.name}"`, null, sourceKey => buildObject3DModelKey(targetSpaceId, sourceKey));
|
|
23305
|
+
}
|
|
23306
|
+
else if (this.archive) {
|
|
23307
|
+
// Import: a library model the target application does not ship is
|
|
23308
|
+
// uploaded to S3 from the archive, so the object keeps its model.
|
|
23309
|
+
const uploadedKey = await this.restoreMissingLibraryModel(rawSource, targetSpaceId);
|
|
23310
|
+
if (uploadedKey) {
|
|
23311
|
+
copiedPath = uploadedKey;
|
|
23312
|
+
s3Bucket = true;
|
|
23313
|
+
}
|
|
22947
23314
|
}
|
|
22948
23315
|
/**
|
|
22949
23316
|
* Strict parser to ensure [float, float, float] format for GraphQL.
|
|
@@ -22986,12 +23353,15 @@ class MatterportTagCopyService {
|
|
|
22986
23353
|
// Tells the viewer how to interpret `path`. Dropping it turned an
|
|
22987
23354
|
// S3-hosted model into a library reference on the copy, which the
|
|
22988
23355
|
// viewer then tried to resolve against assets/ and failed to load.
|
|
22989
|
-
s3Bucket
|
|
23356
|
+
s3Bucket,
|
|
22990
23357
|
name: rawSource.name,
|
|
22991
23358
|
description: rawSource.description || "",
|
|
22992
23359
|
spaceID: targetSpaceId,
|
|
22993
|
-
|
|
22994
|
-
|
|
23360
|
+
// Where the object stands in the scene lives on the object itself (its
|
|
23361
|
+
// POI has no coordinate): it is moved with the landmarks like any tag.
|
|
23362
|
+
// Copying it unchanged left the object at the SOURCE model's coordinates,
|
|
23363
|
+
// out of place — often out of sight — in the target visit.
|
|
23364
|
+
...this.getAdjustedObject3DPlacement(toFloatArray(rawSource.position, [0, 0, 0]), toFloatArray(rawSource.rotation, [0, 0, 0]), transform)
|
|
22995
23365
|
};
|
|
22996
23366
|
if ('viewFrustum' in rawSource) {
|
|
22997
23367
|
object3DInput.viewFrustum = !!rawSource.viewFrustum;
|
|
@@ -23031,9 +23401,14 @@ class MatterportTagCopyService {
|
|
|
23031
23401
|
this.setStepProgress('objects3d', 'objects3d', 100);
|
|
23032
23402
|
break;
|
|
23033
23403
|
}
|
|
23034
|
-
console.error(`Error copying object3D "${sourceObj?.name}":`, itemError);
|
|
23035
23404
|
errorCount++;
|
|
23036
|
-
|
|
23405
|
+
if (itemError instanceof Object3DModelUploadDisabledError) {
|
|
23406
|
+
this.logItemError('errorObject3dUploadDisabled', { name: itemError.objectName });
|
|
23407
|
+
}
|
|
23408
|
+
else {
|
|
23409
|
+
console.error(`Error copying object3D "${sourceObj?.name}":`, itemError);
|
|
23410
|
+
this.logCopyItemError(itemError, 'errorObject3d', sourceObj?.name || sourceObj?.id);
|
|
23411
|
+
}
|
|
23037
23412
|
}
|
|
23038
23413
|
processedOverall++;
|
|
23039
23414
|
emitProgress('objects3d', i + 1, sourceObjects3D.length);
|
|
@@ -23079,7 +23454,7 @@ class MatterportTagCopyService {
|
|
|
23079
23454
|
description: rawSource.description || null,
|
|
23080
23455
|
// Reused unchanged in the same organisation, matched by name
|
|
23081
23456
|
// across two — see resolveDomainID().
|
|
23082
|
-
domainID: this.resolveDomainID(rawSource.domainID),
|
|
23457
|
+
domainID: await this.resolveDomainID(rawSource.domainID),
|
|
23083
23458
|
spaceID: targetSpaceId,
|
|
23084
23459
|
ownerMissionID: targetMissionId
|
|
23085
23460
|
};
|
|
@@ -23091,17 +23466,8 @@ class MatterportTagCopyService {
|
|
|
23091
23466
|
this.markHashtagsUsed(resolvedHashtags);
|
|
23092
23467
|
}
|
|
23093
23468
|
if (createdObj) {
|
|
23094
|
-
// Read
|
|
23095
|
-
|
|
23096
|
-
// nextToken was never followed, so rich POIs lost attachments silently.
|
|
23097
|
-
let sourceComments = [];
|
|
23098
|
-
try {
|
|
23099
|
-
sourceComments = await this.commentService.getAllCommentsForFeature(sourceObj.id);
|
|
23100
|
-
}
|
|
23101
|
-
catch (commentsFetchError) {
|
|
23102
|
-
console.warn(`Falling back to the embedded comment list for feature "${rawSource.title}":`, commentsFetchError);
|
|
23103
|
-
sourceComments = (sourceObj.comments?.items || []).filter(c => !!c);
|
|
23104
|
-
}
|
|
23469
|
+
// Read through its own paginated query, see collectLiveSnapshot().
|
|
23470
|
+
const sourceComments = await snapshot.getFeatureComments(sourceObj);
|
|
23105
23471
|
for (const sourceComment of this.orderCommentsForCopy(sourceComments)) {
|
|
23106
23472
|
try {
|
|
23107
23473
|
const created = await this.copyCommentForFeature(sourceComment, createdObj.id, targetSpaceId);
|
|
@@ -23227,8 +23593,10 @@ class MatterportTagCopyService {
|
|
|
23227
23593
|
alreadyPresentCount++;
|
|
23228
23594
|
}
|
|
23229
23595
|
if (!existsInTarget) {
|
|
23596
|
+
// An element that was not copied is kept as is by a copy (same
|
|
23597
|
+
// environment), but means nothing once imported on another one.
|
|
23230
23598
|
const elementID = sourcePoi.elementID
|
|
23231
|
-
? (elementIds[sourcePoi.elementID] || sourcePoi.elementID)
|
|
23599
|
+
? (elementIds[sourcePoi.elementID] || (this.archive ? null : sourcePoi.elementID))
|
|
23232
23600
|
: sourcePoi.elementID;
|
|
23233
23601
|
await this.createCopiedPoi(sourcePoi, elementID, sourceNavPositions, targetNavPositions, transform);
|
|
23234
23602
|
}
|
|
@@ -23290,6 +23658,663 @@ class MatterportTagCopyService {
|
|
|
23290
23658
|
const defaultName = `matterport-copy-log-${new Date().toISOString().replace(/[:.]/g, '-')}.txt`;
|
|
23291
23659
|
downloadBlob(new Blob([text], { type: 'text/plain;charset=utf-8' }), filename || defaultName);
|
|
23292
23660
|
}
|
|
23661
|
+
/**
|
|
23662
|
+
* Exports every tag of a location — and everything the tags point at: tickets, equipments
|
|
23663
|
+
* with their notes and links, 3D objects, POIs with their media, measurements, keywords,
|
|
23664
|
+
* categories — into a ZIP archive downloaded by the browser, together with the S3 files
|
|
23665
|
+
* they reference. The archive can then be imported in any location of any environment
|
|
23666
|
+
* (see importTagsFromArchive()): it records where it comes from (see TagArchiveOrigin).
|
|
23667
|
+
*
|
|
23668
|
+
* The location is read exactly as a copy reads its source (collectLiveSnapshot()), so an
|
|
23669
|
+
* export carries what a copy would. A file that cannot be downloaded is reported in the
|
|
23670
|
+
* log and left out; the import then treats it like a copy treats a missing file.
|
|
23671
|
+
*
|
|
23672
|
+
* Progress and log go through copyProgress$ / copyLog$ (phases 'collecting', 'files').
|
|
23673
|
+
*/
|
|
23674
|
+
async exportTagsToArchive(spaceId, spaceName, visits = []) {
|
|
23675
|
+
let errorCount = 0;
|
|
23676
|
+
this.resetLog();
|
|
23677
|
+
this.resetRunState(null);
|
|
23678
|
+
const emitProgress = (phase, processed, total) => {
|
|
23679
|
+
this.copyProgress$.next({
|
|
23680
|
+
phase,
|
|
23681
|
+
processedInPhase: processed, totalInPhase: total,
|
|
23682
|
+
processedOverall: processed, totalOverall: total,
|
|
23683
|
+
percent: total > 0 ? Math.round((processed / total) * 100) : 100,
|
|
23684
|
+
errorCount, healedCount: 0
|
|
23685
|
+
});
|
|
23686
|
+
};
|
|
23687
|
+
try {
|
|
23688
|
+
console.log(`Exporting Tags of space ${spaceId}`);
|
|
23689
|
+
emitProgress('collecting', 0, 0);
|
|
23690
|
+
this.setStepProgress('collecting', 'collecting', 0);
|
|
23691
|
+
const snapshot = await this.collectLiveSnapshot(spaceId);
|
|
23692
|
+
// What a copy reads item by item is read up front here: it all goes in the archive.
|
|
23693
|
+
const ticketComments = {};
|
|
23694
|
+
const featureComments = {};
|
|
23695
|
+
const operations = [];
|
|
23696
|
+
await this.forEachInBatches(snapshot.tickets, async (ticket) => {
|
|
23697
|
+
ticketComments[ticket.id] = await snapshot.getTicketComments(ticket);
|
|
23698
|
+
try {
|
|
23699
|
+
const ticketOps = await snapshot.getTicketOperations(ticket.id);
|
|
23700
|
+
ticketOps
|
|
23701
|
+
.filter(op => !!op?.equipmentID)
|
|
23702
|
+
.forEach(op => operations.push({ ticketID: ticket.id, equipmentID: op.equipmentID }));
|
|
23703
|
+
}
|
|
23704
|
+
catch (opError) {
|
|
23705
|
+
console.error(`Error reading the ticket-equipment links of "${ticket?.title}":`, opError);
|
|
23706
|
+
errorCount++;
|
|
23707
|
+
this.logCopyItemError(opError, 'errorOperation', ticket?.title || ticket?.id);
|
|
23708
|
+
}
|
|
23709
|
+
});
|
|
23710
|
+
await this.forEachInBatches(snapshot.features, async (feature) => {
|
|
23711
|
+
featureComments[feature.id] = await snapshot.getFeatureComments(feature);
|
|
23712
|
+
});
|
|
23713
|
+
this.setStepProgress('collecting', 'collecting', 85);
|
|
23714
|
+
const allComments = [...Object.values(ticketComments), ...Object.values(featureComments)].flat();
|
|
23715
|
+
const domains = await this.collectExportDomains(spaceId, [
|
|
23716
|
+
...snapshot.tickets, ...snapshot.equipments, ...snapshot.features, ...this.allSnapshotPois(snapshot)
|
|
23717
|
+
]);
|
|
23718
|
+
this.setStepProgress('collecting', 'collecting', 100);
|
|
23719
|
+
// FILES — downloaded from S3, so that they can be re-uploaded on another environment.
|
|
23720
|
+
const fileKeys = this.collectArchiveFileKeys(snapshot, allComments);
|
|
23721
|
+
// Library models (.glb) used by the 3D objects: the application of the other
|
|
23722
|
+
// environment may not ship them (a model added by hand to the assets of this one).
|
|
23723
|
+
const libraryFiles = this.collectLibraryModelFiles(snapshot);
|
|
23724
|
+
const files = {};
|
|
23725
|
+
const fileIndex = {};
|
|
23726
|
+
let processedFiles = 0;
|
|
23727
|
+
emitProgress('files', 0, fileKeys.length);
|
|
23728
|
+
await this.forEachInBatches(fileKeys, async (key, index) => {
|
|
23729
|
+
try {
|
|
23730
|
+
const downloaded = await downloadS3Object(key);
|
|
23731
|
+
const bytes = new Uint8Array(await downloaded.body.arrayBuffer());
|
|
23732
|
+
const path = tagArchiveFilePath(index + 1, key);
|
|
23733
|
+
files[path] = bytes;
|
|
23734
|
+
fileIndex[key] = { path, contentType: downloaded.contentType, size: bytes.length };
|
|
23735
|
+
}
|
|
23736
|
+
catch (fileError) {
|
|
23737
|
+
console.warn(`[MatterportTagCopyService] Could not export the file "${key}":`, fileError);
|
|
23738
|
+
errorCount++;
|
|
23739
|
+
fileIndex[key] = { path: null, missing: true };
|
|
23740
|
+
this.logItemError(this.isMissingS3File(fileError) ? 'exportFileMissing' : 'exportFileError', { file: key, error: toErrorMessage(fileError) });
|
|
23741
|
+
}
|
|
23742
|
+
finally {
|
|
23743
|
+
processedFiles++;
|
|
23744
|
+
emitProgress('files', processedFiles, fileKeys.length);
|
|
23745
|
+
this.setStepProgress('files', 'files', fileKeys.length > 0 ? Math.round((processedFiles / fileKeys.length) * 100) : 100);
|
|
23746
|
+
}
|
|
23747
|
+
});
|
|
23748
|
+
for (const [index, libraryFile] of libraryFiles.entries()) {
|
|
23749
|
+
const archiveKey = OBJECT3D_LIBRARY_ASSET_FOLDER + libraryFile;
|
|
23750
|
+
try {
|
|
23751
|
+
const bytes = await this.fetchLibraryModel(libraryFile);
|
|
23752
|
+
if (!bytes) {
|
|
23753
|
+
throw new Error('not served by the application');
|
|
23754
|
+
}
|
|
23755
|
+
const path = tagArchiveFilePath(fileKeys.length + index + 1, libraryFile);
|
|
23756
|
+
files[path] = bytes;
|
|
23757
|
+
fileIndex[archiveKey] = { path, contentType: GLB_CONTENT_TYPE, size: bytes.length };
|
|
23758
|
+
}
|
|
23759
|
+
catch (fileError) {
|
|
23760
|
+
console.warn(`[MatterportTagCopyService] Could not export the library model "${libraryFile}":`, fileError);
|
|
23761
|
+
errorCount++;
|
|
23762
|
+
fileIndex[archiveKey] = { path: null, missing: true };
|
|
23763
|
+
this.logItemError('exportFileError', { file: archiveKey, error: toErrorMessage(fileError) });
|
|
23764
|
+
}
|
|
23765
|
+
}
|
|
23766
|
+
const origin = this.buildExportOrigin(spaceId, spaceName);
|
|
23767
|
+
const manifest = {
|
|
23768
|
+
format: TAG_ARCHIVE_FORMAT,
|
|
23769
|
+
version: TAG_ARCHIVE_VERSION,
|
|
23770
|
+
origin,
|
|
23771
|
+
visits: (visits || []).filter(visit => !!visit?.model3d),
|
|
23772
|
+
counts: {
|
|
23773
|
+
tickets: snapshot.tickets.length,
|
|
23774
|
+
equipments: snapshot.equipments.length,
|
|
23775
|
+
objects3D: snapshot.objects3D.length,
|
|
23776
|
+
features: snapshot.features.length,
|
|
23777
|
+
measurements: snapshot.measurements.length,
|
|
23778
|
+
pois: snapshot.pois.length,
|
|
23779
|
+
files: Object.keys(files).length
|
|
23780
|
+
},
|
|
23781
|
+
data: {
|
|
23782
|
+
tickets: snapshot.tickets,
|
|
23783
|
+
ticketComments,
|
|
23784
|
+
operations,
|
|
23785
|
+
equipments: snapshot.equipments,
|
|
23786
|
+
objects3D: snapshot.objects3D,
|
|
23787
|
+
features: snapshot.features,
|
|
23788
|
+
featureComments,
|
|
23789
|
+
measurements: snapshot.measurements,
|
|
23790
|
+
pois: snapshot.pois,
|
|
23791
|
+
sweepPositions: Object.fromEntries(snapshot.sweepPositions),
|
|
23792
|
+
hashtags: Object.fromEntries(snapshot.hashtagNames),
|
|
23793
|
+
domains
|
|
23794
|
+
},
|
|
23795
|
+
files: fileIndex
|
|
23796
|
+
};
|
|
23797
|
+
const zip = buildTagArchive(manifest, files);
|
|
23798
|
+
const date = origin.exportedAt.substring(0, 10);
|
|
23799
|
+
downloadBlob(new Blob([zip], { type: 'application/zip' }), `tags_${this.toFileName(spaceName || spaceId)}_${date}.zip`);
|
|
23800
|
+
emitProgress('done', 1, 1);
|
|
23801
|
+
this.appendInfoLog(this.translate.instant('matterportCopy.exportOrigin', this.describeOrigin(origin)));
|
|
23802
|
+
this.setStepLog('done', errorCount > 0
|
|
23803
|
+
? this.translate.instant('matterportCopy.exportDoneWithErrors', { count: errorCount })
|
|
23804
|
+
: this.translate.instant('matterportCopy.exportDone'));
|
|
23805
|
+
return true;
|
|
23806
|
+
}
|
|
23807
|
+
catch (error) {
|
|
23808
|
+
console.error('Error exporting the tags:', error);
|
|
23809
|
+
this.appendErrorLog(this.translate.instant('matterportCopy.errorGeneral', { error: toErrorMessage(error) }));
|
|
23810
|
+
this.copyProgress$.next(null);
|
|
23811
|
+
return false;
|
|
23812
|
+
}
|
|
23813
|
+
}
|
|
23814
|
+
/**
|
|
23815
|
+
* Reads an archive chosen by the user (see exportTagsToArchive()). Throws a TagArchiveError
|
|
23816
|
+
* when it is not a tag archive, was made by a newer version, or by the application of
|
|
23817
|
+
* another module (MUSEUM vs IMMO): their models differ (Object3D, tickets...), the records
|
|
23818
|
+
* could not be created here.
|
|
23819
|
+
*/
|
|
23820
|
+
async readTagArchive(file) {
|
|
23821
|
+
const archive = readTagArchive(new Uint8Array(await file.arrayBuffer()));
|
|
23822
|
+
if (archive.manifest.origin.module !== this.spModule) {
|
|
23823
|
+
throw new TagArchiveError('errorArchiveModule', { module: archive.manifest.origin.module });
|
|
23824
|
+
}
|
|
23825
|
+
return archive;
|
|
23826
|
+
}
|
|
23827
|
+
/** Placeholders of the matterportCopy.importOrigin / exportOrigin translations. */
|
|
23828
|
+
describeOrigin(origin) {
|
|
23829
|
+
return {
|
|
23830
|
+
environment: origin.environment || '?',
|
|
23831
|
+
space: origin.spaceName || origin.spaceId,
|
|
23832
|
+
date: origin.exportedAt ? new Date(origin.exportedAt).toLocaleString() : '?',
|
|
23833
|
+
user: origin.exportedBy?.name || origin.exportedBy?.userID || '?'
|
|
23834
|
+
};
|
|
23835
|
+
}
|
|
23836
|
+
//
|
|
23837
|
+
// ---------- Source of the tags: live location or archive ----------
|
|
23838
|
+
//
|
|
23839
|
+
/**
|
|
23840
|
+
* Reads a location of the current environment as the source of a copy or an export.
|
|
23841
|
+
*
|
|
23842
|
+
* Features archived by the operator are skipped (historical rule) — null-safe:
|
|
23843
|
+
* FeatureService.isArchived() dereferences currentMission(spaceID).id and threw a
|
|
23844
|
+
* TypeError when the operator had no mission on the source space (the common case for an
|
|
23845
|
+
* archived v1 space), aborting the whole copy. Features are paginated: a space routinely
|
|
23846
|
+
* holds more than the 100 features a single AppSync page returns, and the tail was
|
|
23847
|
+
* silently dropped.
|
|
23848
|
+
*
|
|
23849
|
+
* The attachments of tickets and features are read on demand, through their own
|
|
23850
|
+
* paginated query: the `comments` connection embedded in TicketsBySpace / FeaturesBySpace
|
|
23851
|
+
* is capped at 100 items and its nextToken was never followed, so rich POIs lost
|
|
23852
|
+
* attachments silently. The embedded list is only the fallback when that query fails.
|
|
23853
|
+
*/
|
|
23854
|
+
async collectLiveSnapshot(spaceId) {
|
|
23855
|
+
const sweepIds = await this.navigationService.getAllowedSweepsIDsForUserInSpace(spaceId);
|
|
23856
|
+
const sweepPositions = await this.buildNavigationPositionMap(spaceId, sweepIds);
|
|
23857
|
+
this.setStepProgress('collecting', 'collecting', 20);
|
|
23858
|
+
let tickets = [];
|
|
23859
|
+
let equipments = [];
|
|
23860
|
+
let measurements = [];
|
|
23861
|
+
if (this.spModule == SpModule.IMMO) {
|
|
23862
|
+
tickets = await this.ticketService.getTicketsBySpace(spaceId);
|
|
23863
|
+
equipments = await this.equipmentService.getEquipmentsForSpace(spaceId);
|
|
23864
|
+
}
|
|
23865
|
+
this.setStepProgress('collecting', 'collecting', 35);
|
|
23866
|
+
const objects3D = await this.object3DService.getObjects3DBySpace(spaceId);
|
|
23867
|
+
const features = (await this.featureService.getAllFeaturesBySpaceRaw(spaceId))
|
|
23868
|
+
.filter(feature => !this.isArchivedForOperator(feature, spaceId));
|
|
23869
|
+
if (this.spModule == SpModule.IMMO) {
|
|
23870
|
+
measurements = (await this.measurementService.getMeasurementsForSpaceForUser(spaceId))
|
|
23871
|
+
.filter(m => (m.numberPoints ?? 0) > 0);
|
|
23872
|
+
}
|
|
23873
|
+
this.setStepProgress('collecting', 'collecting', 50);
|
|
23874
|
+
const pois = await this.poiService.getPoisByMatterportSweeps(sweepIds);
|
|
23875
|
+
const hashtagNames = await this.loadHashtagNames(spaceId);
|
|
23876
|
+
const missionUserIds = await this.loadMissionUserIds(spaceId);
|
|
23877
|
+
this.setStepProgress('collecting', 'collecting', 60);
|
|
23878
|
+
return {
|
|
23879
|
+
kind: 'live',
|
|
23880
|
+
spaceId,
|
|
23881
|
+
sweepPositions,
|
|
23882
|
+
tickets: (tickets || []).filter(t => !!t),
|
|
23883
|
+
equipments: (equipments || []).filter(e => !!e),
|
|
23884
|
+
objects3D: (objects3D || []).filter(o => !!o),
|
|
23885
|
+
features: (features || []).filter(f => !!f),
|
|
23886
|
+
measurements: (measurements || []).filter(m => !!m),
|
|
23887
|
+
pois: (pois || []).filter(p => !!p),
|
|
23888
|
+
hashtagNames,
|
|
23889
|
+
missionUserIds,
|
|
23890
|
+
domains: [],
|
|
23891
|
+
getTicketComments: async (ticket) => {
|
|
23892
|
+
try {
|
|
23893
|
+
return await this.commentService.getAllCommentsForTicket(ticket.id);
|
|
23894
|
+
}
|
|
23895
|
+
catch (commentsFetchError) {
|
|
23896
|
+
console.warn(`Falling back to the embedded comment list for ticket "${ticket?.title}":`, commentsFetchError);
|
|
23897
|
+
return (ticket.comments?.items || []).filter(c => !!c);
|
|
23898
|
+
}
|
|
23899
|
+
},
|
|
23900
|
+
getFeatureComments: async (feature) => {
|
|
23901
|
+
try {
|
|
23902
|
+
return await this.commentService.getAllCommentsForFeature(feature.id);
|
|
23903
|
+
}
|
|
23904
|
+
catch (commentsFetchError) {
|
|
23905
|
+
console.warn(`Falling back to the embedded comment list for feature "${feature?.title}":`, commentsFetchError);
|
|
23906
|
+
return (feature.comments?.items || []).filter(c => !!c);
|
|
23907
|
+
}
|
|
23908
|
+
},
|
|
23909
|
+
getTicketOperations: (ticketId) => this.operationService.getOperationsByTicketID(ticketId)
|
|
23910
|
+
};
|
|
23911
|
+
}
|
|
23912
|
+
/** Source of an import: the records of the archive, as the exporting environment read them. */
|
|
23913
|
+
snapshotFromArchive(archive) {
|
|
23914
|
+
const data = archive.manifest.data;
|
|
23915
|
+
const list = (items) => (items || []).filter(item => !!item);
|
|
23916
|
+
return {
|
|
23917
|
+
kind: 'archive',
|
|
23918
|
+
spaceId: archive.manifest.origin.spaceId,
|
|
23919
|
+
sweepPositions: new Map(Object.entries(data.sweepPositions || {})),
|
|
23920
|
+
tickets: list(data.tickets),
|
|
23921
|
+
equipments: list(data.equipments),
|
|
23922
|
+
objects3D: list(data.objects3D),
|
|
23923
|
+
features: list(data.features),
|
|
23924
|
+
measurements: list(data.measurements),
|
|
23925
|
+
pois: list(data.pois),
|
|
23926
|
+
hashtagNames: new Map(Object.entries(data.hashtags || {})),
|
|
23927
|
+
missionUserIds: new Map(),
|
|
23928
|
+
domains: list(data.domains),
|
|
23929
|
+
getTicketComments: async (ticket) => list(data.ticketComments?.[ticket.id]),
|
|
23930
|
+
getFeatureComments: async (feature) => list(data.featureComments?.[feature.id]),
|
|
23931
|
+
getTicketOperations: async (ticketId) => list(data.operations).filter(op => op.ticketID === ticketId)
|
|
23932
|
+
};
|
|
23933
|
+
}
|
|
23934
|
+
/**
|
|
23935
|
+
* READ-ONLY indexing of what the source references and the target already has: keywords,
|
|
23936
|
+
* comment authors and categories.
|
|
23937
|
+
* - copy: authors are matched by user (resolveCommentOwnerID()), categories by the
|
|
23938
|
+
* operator's missions on both spaces (loadDomainIndex());
|
|
23939
|
+
* - import: the archive's users belong to another environment, comments are credited to
|
|
23940
|
+
* the operator; categories are matched by name (loadImportedDomainIndex()).
|
|
23941
|
+
*/
|
|
23942
|
+
async loadReferenceIndexes(snapshot, targetSpaceId, targetMissionId) {
|
|
23943
|
+
this.sourceHashtagNames = snapshot.hashtagNames;
|
|
23944
|
+
await this.loadTargetHashtagIndex(targetSpaceId);
|
|
23945
|
+
if (snapshot.kind === 'archive') {
|
|
23946
|
+
this.importOwnerMissionId = targetMissionId;
|
|
23947
|
+
await this.loadImportedDomainIndex(snapshot.domains, targetSpaceId);
|
|
23948
|
+
return;
|
|
23949
|
+
}
|
|
23950
|
+
this.sourceMissionUserIds = snapshot.missionUserIds;
|
|
23951
|
+
await this.loadTargetMissionIndex(targetSpaceId);
|
|
23952
|
+
await this.loadDomainIndex(snapshot.spaceId, targetSpaceId);
|
|
23953
|
+
}
|
|
23954
|
+
/**
|
|
23955
|
+
* READ-ONLY indexing for an import: the archived categories by their (foreign) id, and the
|
|
23956
|
+
* categories the operator's mission on the target space can see, by (type, name).
|
|
23957
|
+
* Missing categories are created in the mission's organisation, on demand — see
|
|
23958
|
+
* resolveImportedDomainID(). When the target categories cannot be read, none is created:
|
|
23959
|
+
* doing it blindly could duplicate existing ones.
|
|
23960
|
+
*/
|
|
23961
|
+
async loadImportedDomainIndex(domains, targetSpaceId) {
|
|
23962
|
+
for (const domain of domains || []) {
|
|
23963
|
+
if (domain?.id) {
|
|
23964
|
+
this.domainsById.set(domain.id, domain);
|
|
23965
|
+
}
|
|
23966
|
+
}
|
|
23967
|
+
const targetMission = this.userService.currentMission(targetSpaceId);
|
|
23968
|
+
const orgIds = Array.from(new Set([targetMission?.organisationID, targetMission?.orderedOrganisationID]
|
|
23969
|
+
.filter((id) => !!id)));
|
|
23970
|
+
this.importDomainOrganisationId = targetMission?.organisationID ?? null;
|
|
23971
|
+
try {
|
|
23972
|
+
const domainLists = await Promise.all(orgIds.map(orgId => this.domainService.getAllGenericDomainsAndForOrganisation(orgId)));
|
|
23973
|
+
for (const domain of domainLists.flat()) {
|
|
23974
|
+
const key = domain?.name ? this.domainKey(domain.type, domain.name) : null;
|
|
23975
|
+
if (key && domain.id && !this.targetDomainIdsByTypeAndName.has(key)) {
|
|
23976
|
+
this.targetDomainIdsByTypeAndName.set(key, domain.id);
|
|
23977
|
+
}
|
|
23978
|
+
}
|
|
23979
|
+
}
|
|
23980
|
+
catch (error) {
|
|
23981
|
+
console.warn('[MatterportTagCopyService] Could not read the domains, imported categories will be dropped:', error);
|
|
23982
|
+
this.domainsById = new Map();
|
|
23983
|
+
this.importDomainOrganisationId = null;
|
|
23984
|
+
}
|
|
23985
|
+
}
|
|
23986
|
+
/**
|
|
23987
|
+
* Resolves an archived category for the target space: the category of the same type and
|
|
23988
|
+
* name the operator can see there, else a new one created in the organisation of their
|
|
23989
|
+
* mission on the target space (parents first, so the tree is kept). Dropped when it cannot
|
|
23990
|
+
* be created (no mission there, creation refused...).
|
|
23991
|
+
*/
|
|
23992
|
+
async resolveImportedDomainID(sourceDomainId, visiting = new Set()) {
|
|
23993
|
+
const domain = this.domainsById.get(sourceDomainId);
|
|
23994
|
+
if (!domain?.name) {
|
|
23995
|
+
return null;
|
|
23996
|
+
}
|
|
23997
|
+
const key = this.domainKey(domain.type, domain.name);
|
|
23998
|
+
const existingId = this.targetDomainIdsByTypeAndName.get(key);
|
|
23999
|
+
if (existingId) {
|
|
24000
|
+
return existingId;
|
|
24001
|
+
}
|
|
24002
|
+
if (!this.importDomainOrganisationId) {
|
|
24003
|
+
return null;
|
|
24004
|
+
}
|
|
24005
|
+
visiting.add(sourceDomainId);
|
|
24006
|
+
const parentID = domain.parentID && !visiting.has(domain.parentID)
|
|
24007
|
+
? await this.resolveImportedDomainID(domain.parentID, visiting)
|
|
24008
|
+
: null;
|
|
24009
|
+
try {
|
|
24010
|
+
const created = await this.domainService.createDomain({
|
|
24011
|
+
name: domain.name,
|
|
24012
|
+
slug: domain.slug ?? null,
|
|
24013
|
+
abbreviation: domain.abbreviation ?? null,
|
|
24014
|
+
description: domain.description ?? null,
|
|
24015
|
+
type: domain.type ?? null,
|
|
24016
|
+
parentID,
|
|
24017
|
+
organisationID: this.importDomainOrganisationId
|
|
24018
|
+
});
|
|
24019
|
+
if (!created?.id) {
|
|
24020
|
+
return null;
|
|
24021
|
+
}
|
|
24022
|
+
this.targetDomainIdsByTypeAndName.set(key, created.id);
|
|
24023
|
+
this.appendInfoLog(this.translate.instant('matterportCopy.domainCreated', { name: domain.name }));
|
|
24024
|
+
return created.id;
|
|
24025
|
+
}
|
|
24026
|
+
catch (error) {
|
|
24027
|
+
console.warn(`[MatterportTagCopyService] Could not create the category "${domain.name}":`, error);
|
|
24028
|
+
this.logItemError('errorDomainCreate', { name: domain.name, error: toErrorMessage(error) });
|
|
24029
|
+
// Remembered as "no equivalent", so the next item does not try again.
|
|
24030
|
+
this.domainsById.delete(sourceDomainId);
|
|
24031
|
+
return null;
|
|
24032
|
+
}
|
|
24033
|
+
}
|
|
24034
|
+
/**
|
|
24035
|
+
* Import counterpart of an S3 copy: uploads the archived bytes of `sourceKey` under
|
|
24036
|
+
* `destKey`. A file the export could not include is a MissingS3FileError, handled exactly
|
|
24037
|
+
* like an orphaned reference during a copy.
|
|
24038
|
+
*/
|
|
24039
|
+
async restoreArchivedFile(sourceKey, destKey, contextLabel) {
|
|
24040
|
+
const entry = this.archive?.manifest.files?.[sourceKey];
|
|
24041
|
+
const bytes = entry?.path ? this.archive?.files[entry.path] : undefined;
|
|
24042
|
+
if (!bytes) {
|
|
24043
|
+
throw new MissingS3FileError(sourceKey, contextLabel);
|
|
24044
|
+
}
|
|
24045
|
+
const contentType = entry?.contentType || null;
|
|
24046
|
+
return uploadS3Object(destKey, new Blob([bytes], contentType ? { type: contentType } : undefined), contentType);
|
|
24047
|
+
}
|
|
24048
|
+
/** Runs `task` over `items`, a few at a time (keeps the API and S3 from throttling). */
|
|
24049
|
+
async forEachInBatches(items, task, batchSize = 5) {
|
|
24050
|
+
for (let i = 0; i < items.length; i += batchSize) {
|
|
24051
|
+
await Promise.all(items.slice(i, i + batchSize).map((item, j) => task(item, i + j)));
|
|
24052
|
+
}
|
|
24053
|
+
}
|
|
24054
|
+
/** Every POI of a snapshot: those on the sweeps and those embedded in the elements. */
|
|
24055
|
+
allSnapshotPois(snapshot) {
|
|
24056
|
+
const embedded = [...snapshot.tickets, ...snapshot.equipments, ...snapshot.objects3D, ...snapshot.features]
|
|
24057
|
+
.flatMap((element) => element?.pois?.items || []);
|
|
24058
|
+
const measurementPois = snapshot.measurements.map(measurement => measurement?.poi);
|
|
24059
|
+
return [...snapshot.pois, ...embedded, ...measurementPois].filter(poi => !!poi);
|
|
24060
|
+
}
|
|
24061
|
+
/**
|
|
24062
|
+
* Raw S3 keys of every file the copy duplicates (see the copy phases): equipment photos and
|
|
24063
|
+
* notes, attachments and media, measurement screenshots, uploaded 3D models, tag icons.
|
|
24064
|
+
*/
|
|
24065
|
+
collectArchiveFileKeys(snapshot, comments) {
|
|
24066
|
+
const values = [];
|
|
24067
|
+
for (const equipment of snapshot.equipments) {
|
|
24068
|
+
values.push(equipment.photo);
|
|
24069
|
+
(equipment.notes?.items || []).forEach((note) => values.push(note?.attachment));
|
|
24070
|
+
}
|
|
24071
|
+
comments.forEach((comment) => values.push(comment?.annexe));
|
|
24072
|
+
snapshot.measurements.forEach((measurement) => values.push(measurement?.comment?.annexe));
|
|
24073
|
+
snapshot.objects3D
|
|
24074
|
+
.filter(object3D => object3D.s3Bucket)
|
|
24075
|
+
.forEach(object3D => values.push(object3D.path));
|
|
24076
|
+
for (const poi of this.allSnapshotPois(snapshot)) {
|
|
24077
|
+
try {
|
|
24078
|
+
values.push(poi.tagIcon ? JSON.parse(poi.tagIcon)?.src : null);
|
|
24079
|
+
}
|
|
24080
|
+
catch {
|
|
24081
|
+
// not JSON: duplicateTagIcon() leaves it untouched, there is no file to export
|
|
24082
|
+
}
|
|
24083
|
+
}
|
|
24084
|
+
const keys = new Set();
|
|
24085
|
+
values
|
|
24086
|
+
.filter((value) => typeof value === 'string' && !!value)
|
|
24087
|
+
.forEach(value => keys.add(this.extractS3KeyFromValue(value)));
|
|
24088
|
+
keys.delete('');
|
|
24089
|
+
return [...keys];
|
|
24090
|
+
}
|
|
24091
|
+
/**
|
|
24092
|
+
* Categories referenced by the exported records, with their ancestors: an import matches
|
|
24093
|
+
* them by name, and recreates the missing ones at the same place of the tree.
|
|
24094
|
+
*/
|
|
24095
|
+
async collectExportDomains(spaceId, records) {
|
|
24096
|
+
const referenced = new Set(records.map(record => record?.domainID).filter((id) => !!id));
|
|
24097
|
+
if (referenced.size === 0) {
|
|
24098
|
+
return [];
|
|
24099
|
+
}
|
|
24100
|
+
const mission = this.userService.currentMission(spaceId);
|
|
24101
|
+
const orgIds = Array.from(new Set([mission?.organisationID, mission?.orderedOrganisationID]
|
|
24102
|
+
.filter((id) => !!id)));
|
|
24103
|
+
const known = new Map();
|
|
24104
|
+
const lists = await Promise.all(orgIds.map(orgId => this.domainService.getAllGenericDomainsAndForOrganisation(orgId).catch(error => {
|
|
24105
|
+
console.warn('[MatterportTagCopyService] Could not read the domains to export:', error);
|
|
24106
|
+
return [];
|
|
24107
|
+
})));
|
|
24108
|
+
lists.flat().forEach(domain => domain?.id && known.set(domain.id, domain));
|
|
24109
|
+
const exported = new Map();
|
|
24110
|
+
const add = async (id) => {
|
|
24111
|
+
if (!id || exported.has(id)) {
|
|
24112
|
+
return;
|
|
24113
|
+
}
|
|
24114
|
+
let domain = known.get(id);
|
|
24115
|
+
if (!domain) {
|
|
24116
|
+
domain = await this.domainService.getDomain(id).catch(() => null);
|
|
24117
|
+
}
|
|
24118
|
+
if (!domain?.name) {
|
|
24119
|
+
return;
|
|
24120
|
+
}
|
|
24121
|
+
exported.set(id, {
|
|
24122
|
+
id: domain.id,
|
|
24123
|
+
name: domain.name,
|
|
24124
|
+
slug: domain.slug ?? null,
|
|
24125
|
+
abbreviation: domain.abbreviation ?? null,
|
|
24126
|
+
description: domain.description ?? null,
|
|
24127
|
+
type: domain.type ?? null,
|
|
24128
|
+
organisationID: domain.organisationID ?? null,
|
|
24129
|
+
parentID: domain.parentID ?? null
|
|
24130
|
+
});
|
|
24131
|
+
await add(domain.parentID);
|
|
24132
|
+
};
|
|
24133
|
+
for (const id of referenced) {
|
|
24134
|
+
await add(id);
|
|
24135
|
+
}
|
|
24136
|
+
return [...exported.values()];
|
|
24137
|
+
}
|
|
24138
|
+
/** Where an export comes from: environment (application origin), location, date, operator. */
|
|
24139
|
+
buildExportOrigin(spaceId, spaceName) {
|
|
24140
|
+
const user = this.userService.cu;
|
|
24141
|
+
const name = user ? `${user.firstName || ''} ${user.lastName || ''}`.trim() : '';
|
|
24142
|
+
return {
|
|
24143
|
+
environment: typeof window !== 'undefined' ? window.location.origin : '',
|
|
24144
|
+
module: this.spModule,
|
|
24145
|
+
spaceId,
|
|
24146
|
+
spaceName: spaceName || '',
|
|
24147
|
+
exportedAt: new Date().toISOString(),
|
|
24148
|
+
exportedBy: { userID: user?.userID ?? user?.id ?? null, name: name || null }
|
|
24149
|
+
};
|
|
24150
|
+
}
|
|
24151
|
+
/** File-name-safe version of a label. */
|
|
24152
|
+
toFileName(label) {
|
|
24153
|
+
return (label || 'space')
|
|
24154
|
+
.normalize('NFD').replace(/[̀-ͯ]/g, '')
|
|
24155
|
+
.replace(/[^a-zA-Z0-9\-_]+/g, '_')
|
|
24156
|
+
.replace(/^_+|_+$/g, '')
|
|
24157
|
+
.substring(0, 60) || 'space';
|
|
24158
|
+
}
|
|
24159
|
+
//
|
|
24160
|
+
// ---------- 3D models of the library ----------
|
|
24161
|
+
//
|
|
24162
|
+
/**
|
|
24163
|
+
* Reference of the model of a 3D object, as the archive indexes its files: the raw S3 key
|
|
24164
|
+
* of an uploaded model, `assets/3Dobjects/objects/<file>` for a library model, null for a
|
|
24165
|
+
* model hosted at an absolute url (nothing to carry over).
|
|
24166
|
+
*/
|
|
24167
|
+
object3DModelKeyOf(rawObject3D) {
|
|
24168
|
+
const path = rawObject3D?.path;
|
|
24169
|
+
if (!path) {
|
|
24170
|
+
return null;
|
|
24171
|
+
}
|
|
24172
|
+
if (rawObject3D.s3Bucket) {
|
|
24173
|
+
return this.extractS3KeyFromValue(path) || null;
|
|
24174
|
+
}
|
|
24175
|
+
const libraryFile = getObject3DLibraryFile(path);
|
|
24176
|
+
return libraryFile ? OBJECT3D_LIBRARY_ASSET_FOLDER + libraryFile : null;
|
|
24177
|
+
}
|
|
24178
|
+
/**
|
|
24179
|
+
* 3D models of an archive that an import could not give to their objects: neither in the
|
|
24180
|
+
* archive (missing on the source, or not exportable — a library model of another format
|
|
24181
|
+
* than .glb) nor shipped by this application. The operator can provide a .glb for each
|
|
24182
|
+
* before importing (see importTagsFromArchive(), `replacementModels`); otherwise the
|
|
24183
|
+
* object is created without a displayable model and the log says so.
|
|
24184
|
+
*/
|
|
24185
|
+
async getMissingObject3DModels(archive) {
|
|
24186
|
+
const missing = new Map();
|
|
24187
|
+
const servedChecks = new Map();
|
|
24188
|
+
for (const object3D of archive?.manifest?.data?.objects3D || []) {
|
|
24189
|
+
const key = this.object3DModelKeyOf(object3D);
|
|
24190
|
+
if (!key) {
|
|
24191
|
+
continue;
|
|
24192
|
+
}
|
|
24193
|
+
const entry = archive.manifest.files?.[key];
|
|
24194
|
+
if (entry?.path && archive.files[entry.path]) {
|
|
24195
|
+
continue; // carried by the archive
|
|
24196
|
+
}
|
|
24197
|
+
const libraryFile = object3D.s3Bucket ? null : getObject3DLibraryFile(object3D.path);
|
|
24198
|
+
if (libraryFile) {
|
|
24199
|
+
if (!servedChecks.has(libraryFile)) {
|
|
24200
|
+
servedChecks.set(libraryFile, this.isLibraryModelServed(libraryFile));
|
|
24201
|
+
}
|
|
24202
|
+
if (await servedChecks.get(libraryFile)) {
|
|
24203
|
+
continue; // shipped by this application
|
|
24204
|
+
}
|
|
24205
|
+
}
|
|
24206
|
+
const model = missing.get(key) ?? { key, fileName: key.split('/').pop() || key, objectNames: [] };
|
|
24207
|
+
model.objectNames.push(object3D.name || object3D.id);
|
|
24208
|
+
missing.set(key, model);
|
|
24209
|
+
}
|
|
24210
|
+
return [...missing.values()];
|
|
24211
|
+
}
|
|
24212
|
+
/**
|
|
24213
|
+
* Model path of a copied / imported 3D object when this application may not write model
|
|
24214
|
+
* files (see OBJECT3D_MODEL_UPLOAD_ENABLED):
|
|
24215
|
+
* - copy between two locations: the same path, an S3 model included — both objects then
|
|
24216
|
+
* share the file, which nothing deletes with an object;
|
|
24217
|
+
* - import: a library model is referenced as is (reported when this application does not
|
|
24218
|
+
* ship it); an S3 model of the other environment cannot be referenced at all, the object
|
|
24219
|
+
* is skipped (Object3DModelUploadDisabledError).
|
|
24220
|
+
*/
|
|
24221
|
+
async modelPathWithoutUpload(rawObject3D) {
|
|
24222
|
+
if (!this.archive) {
|
|
24223
|
+
return rawObject3D.path ?? null;
|
|
24224
|
+
}
|
|
24225
|
+
if (rawObject3D.s3Bucket) {
|
|
24226
|
+
throw new Object3DModelUploadDisabledError(rawObject3D.name || rawObject3D.id);
|
|
24227
|
+
}
|
|
24228
|
+
const file = getObject3DLibraryFile(rawObject3D.path);
|
|
24229
|
+
if (file && !(await this.isLibraryModelAvailable(file))) {
|
|
24230
|
+
this.logItemError('errorObject3dModelMissing', { name: rawObject3D.name || rawObject3D.id, file });
|
|
24231
|
+
}
|
|
24232
|
+
return rawObject3D.path ?? null;
|
|
24233
|
+
}
|
|
24234
|
+
/** Replacement model the operator chose for this object's model, if any. */
|
|
24235
|
+
replacementModelOf(rawObject3D) {
|
|
24236
|
+
const key = this.archive ? this.object3DModelKeyOf(rawObject3D) : null;
|
|
24237
|
+
const file = key ? this.replacementModels.get(key) : undefined;
|
|
24238
|
+
return key && file ? { key, file } : null;
|
|
24239
|
+
}
|
|
24240
|
+
/** Uploads a replacement model once, whatever the number of objects using it. */
|
|
24241
|
+
uploadReplacementModel(model, targetSpaceId) {
|
|
24242
|
+
if (!this.uploadedReplacementKeys.has(model.key)) {
|
|
24243
|
+
const fileName = model.file.name || model.key.split('/').pop() || 'model.glb';
|
|
24244
|
+
const upload = uploadS3Object(buildObject3DModelKey(targetSpaceId, fileName), model.file, GLB_CONTENT_TYPE)
|
|
24245
|
+
.then(key => {
|
|
24246
|
+
this.appendInfoLog(this.translate.instant('matterportCopy.object3dModelReplaced', { file: model.key.split('/').pop(), replacement: fileName }));
|
|
24247
|
+
return key;
|
|
24248
|
+
});
|
|
24249
|
+
// a failed upload is retried by the next object using the model
|
|
24250
|
+
upload.catch(() => this.uploadedReplacementKeys.delete(model.key));
|
|
24251
|
+
this.uploadedReplacementKeys.set(model.key, upload);
|
|
24252
|
+
}
|
|
24253
|
+
return this.uploadedReplacementKeys.get(model.key);
|
|
24254
|
+
}
|
|
24255
|
+
/** File names of the library .glb models the snapshot's 3D objects use (see object3d-model.util.ts). */
|
|
24256
|
+
collectLibraryModelFiles(snapshot) {
|
|
24257
|
+
const files = new Set();
|
|
24258
|
+
for (const object3D of snapshot.objects3D) {
|
|
24259
|
+
const file = object3D?.s3Bucket ? null : getObject3DLibraryFile(object3D?.path);
|
|
24260
|
+
if (file && file.toLowerCase().endsWith('.glb')) {
|
|
24261
|
+
files.add(file);
|
|
24262
|
+
}
|
|
24263
|
+
}
|
|
24264
|
+
return [...files];
|
|
24265
|
+
}
|
|
24266
|
+
/** Url this application serves a library model from. */
|
|
24267
|
+
libraryModelUrl(file) {
|
|
24268
|
+
const base = typeof document !== 'undefined' ? document.baseURI : '/';
|
|
24269
|
+
return new URL(OBJECT3D_LIBRARY_ASSET_FOLDER + file.split('/').map(encodeURIComponent).join('/'), base).toString();
|
|
24270
|
+
}
|
|
24271
|
+
/**
|
|
24272
|
+
* Bytes of a library model as this application serves it; null when it does not ship it.
|
|
24273
|
+
* A single-page host answers an unknown path with the index page (200, text/html): that is
|
|
24274
|
+
* a missing file too.
|
|
24275
|
+
*/
|
|
24276
|
+
async fetchLibraryModel(file) {
|
|
24277
|
+
const response = await fetch(this.libraryModelUrl(file));
|
|
24278
|
+
if (!response.ok || (response.headers.get('content-type') || '').includes('text/html')) {
|
|
24279
|
+
return null;
|
|
24280
|
+
}
|
|
24281
|
+
return new Uint8Array(await response.arrayBuffer());
|
|
24282
|
+
}
|
|
24283
|
+
/** Whether this application ships a library model (checked once per file and per run). */
|
|
24284
|
+
async isLibraryModelAvailable(file) {
|
|
24285
|
+
if (!this.libraryModelAvailability.has(file)) {
|
|
24286
|
+
this.libraryModelAvailability.set(file, this.isLibraryModelServed(file));
|
|
24287
|
+
}
|
|
24288
|
+
return this.libraryModelAvailability.get(file);
|
|
24289
|
+
}
|
|
24290
|
+
/** Asks this application whether it serves a library model (an index page is a no). */
|
|
24291
|
+
isLibraryModelServed(file) {
|
|
24292
|
+
return fetch(this.libraryModelUrl(file), { method: 'HEAD' })
|
|
24293
|
+
.then(response => response.ok && !(response.headers.get('content-type') || '').includes('text/html'))
|
|
24294
|
+
.catch(() => false);
|
|
24295
|
+
}
|
|
24296
|
+
/**
|
|
24297
|
+
* Import of a 3D object whose model comes from the application's library: when the target
|
|
24298
|
+
* application does not ship that model, the copy exported in the archive is uploaded to S3
|
|
24299
|
+
* and the object switched to it. Returns the S3 key, or null to keep the library path
|
|
24300
|
+
* (model available, or impossible to restore — reported in the log).
|
|
24301
|
+
*/
|
|
24302
|
+
async restoreMissingLibraryModel(rawObject3D, targetSpaceId) {
|
|
24303
|
+
const file = getObject3DLibraryFile(rawObject3D?.path);
|
|
24304
|
+
if (!file || await this.isLibraryModelAvailable(file)) {
|
|
24305
|
+
return null;
|
|
24306
|
+
}
|
|
24307
|
+
const entry = this.archive?.manifest.files?.[OBJECT3D_LIBRARY_ASSET_FOLDER + file];
|
|
24308
|
+
const bytes = entry?.path ? this.archive?.files[entry.path] : undefined;
|
|
24309
|
+
if (!bytes) {
|
|
24310
|
+
this.logItemError('errorObject3dModelMissing', { name: rawObject3D?.name || rawObject3D?.id, file });
|
|
24311
|
+
return null;
|
|
24312
|
+
}
|
|
24313
|
+
const key = buildObject3DModelKey(targetSpaceId, file);
|
|
24314
|
+
const uploaded = await uploadS3Object(key, new Blob([bytes], { type: GLB_CONTENT_TYPE }), GLB_CONTENT_TYPE);
|
|
24315
|
+
this.appendInfoLog(this.translate.instant('matterportCopy.object3dModelUploaded', { name: rawObject3D?.name || rawObject3D?.id, file }));
|
|
24316
|
+
return uploaded;
|
|
24317
|
+
}
|
|
23293
24318
|
//
|
|
23294
24319
|
// ---------- Progress / log helpers ----------
|
|
23295
24320
|
//
|
|
@@ -23318,6 +24343,12 @@ class MatterportTagCopyService {
|
|
|
23318
24343
|
this.log.push({ id: `healed-${this.logSeq}`, type: 'healed', text });
|
|
23319
24344
|
this.copyLog$.next([...this.log]);
|
|
23320
24345
|
}
|
|
24346
|
+
/** Appends a permanent, neutral log line (origin of an import, category created...). */
|
|
24347
|
+
appendInfoLog(text) {
|
|
24348
|
+
this.logSeq++;
|
|
24349
|
+
this.log.push({ id: `info-${this.logSeq}`, type: 'info', text });
|
|
24350
|
+
this.copyLog$.next([...this.log]);
|
|
24351
|
+
}
|
|
23321
24352
|
/** Resets the log for a new run. */
|
|
23322
24353
|
resetLog() {
|
|
23323
24354
|
this.log = [];
|
|
@@ -23341,6 +24372,13 @@ class MatterportTagCopyService {
|
|
|
23341
24372
|
this.targetVisibleDomainOrgIds = new Set();
|
|
23342
24373
|
this.targetDomainIdsByTypeAndName = new Map();
|
|
23343
24374
|
this.targetSpaceId = targetSpaceId;
|
|
24375
|
+
this.archive = null;
|
|
24376
|
+
this.importOwnerMissionId = null;
|
|
24377
|
+
this.importDomainOrganisationId = null;
|
|
24378
|
+
this.keepSweepIds = false;
|
|
24379
|
+
this.libraryModelAvailability = new Map();
|
|
24380
|
+
this.replacementModels = new Map();
|
|
24381
|
+
this.uploadedReplacementKeys = new Map();
|
|
23344
24382
|
}
|
|
23345
24383
|
/** Builds and sets a step's log line as "<translated label>: <percent>%", no step numbering. */
|
|
23346
24384
|
setStepProgress(stepId, translationKey, percent) {
|
|
@@ -23465,10 +24503,13 @@ class MatterportTagCopyService {
|
|
|
23465
24503
|
* - otherwise: matched by (type, name) against the domains visible to the TARGET
|
|
23466
24504
|
* operator (loadDomainIndex()); dropped when no equivalent exists there.
|
|
23467
24505
|
*/
|
|
23468
|
-
resolveDomainID(sourceDomainId) {
|
|
24506
|
+
async resolveDomainID(sourceDomainId) {
|
|
23469
24507
|
if (!sourceDomainId) {
|
|
23470
24508
|
return null;
|
|
23471
24509
|
}
|
|
24510
|
+
if (this.archive) {
|
|
24511
|
+
return this.resolveImportedDomainID(sourceDomainId);
|
|
24512
|
+
}
|
|
23472
24513
|
const domain = this.domainsById.get(sourceDomainId);
|
|
23473
24514
|
if (!domain) {
|
|
23474
24515
|
// Not visible to either operator's mission (lookup failed, or it belongs to
|
|
@@ -23485,35 +24526,46 @@ class MatterportTagCopyService {
|
|
|
23485
24526
|
return name.trim().toLowerCase();
|
|
23486
24527
|
}
|
|
23487
24528
|
/**
|
|
23488
|
-
* READ-ONLY
|
|
24529
|
+
* READ-ONLY: hashtag id -> name of a space's hashtags. Creates nothing.
|
|
23489
24530
|
*
|
|
23490
24531
|
* `Feature.hashtags` stores Hashtag *ids*, and a Hashtag is a per-space record, so the
|
|
23491
|
-
* ids have to be translated by name. The translation table is built
|
|
23492
|
-
* keywords are created later, one at a time, only
|
|
23493
|
-
* about to be written (see resolveHashtagIds()).
|
|
24532
|
+
* ids have to be translated by name. The translation table is built from this and
|
|
24533
|
+
* loadTargetHashtagIndex(); the missing keywords are created later, one at a time, only
|
|
24534
|
+
* when a POI that actually uses them is about to be written (see resolveHashtagIds()).
|
|
24535
|
+
* A failed read answers an empty map: the keywords are then dropped.
|
|
23494
24536
|
*/
|
|
23495
|
-
async
|
|
23496
|
-
|
|
23497
|
-
let targetHashtags = [];
|
|
24537
|
+
async loadHashtagNames(spaceId) {
|
|
24538
|
+
const names = new Map();
|
|
23498
24539
|
try {
|
|
23499
|
-
|
|
23500
|
-
|
|
23501
|
-
|
|
23502
|
-
|
|
24540
|
+
const hashtags = await this.hashtagService.listHashtagsForSpace(spaceId);
|
|
24541
|
+
for (const hashtag of hashtags || []) {
|
|
24542
|
+
if (hashtag?.id && hashtag.name) {
|
|
24543
|
+
names.set(hashtag.id, hashtag.name);
|
|
24544
|
+
}
|
|
24545
|
+
}
|
|
23503
24546
|
}
|
|
23504
24547
|
catch (error) {
|
|
23505
|
-
console.warn('[MatterportTagCopyService] Could not read the hashtags, keywords will be dropped:', error);
|
|
23506
|
-
return;
|
|
24548
|
+
console.warn('[MatterportTagCopyService] Could not read the source hashtags, keywords will be dropped:', error);
|
|
23507
24549
|
}
|
|
23508
|
-
|
|
23509
|
-
|
|
23510
|
-
|
|
24550
|
+
return names;
|
|
24551
|
+
}
|
|
24552
|
+
/**
|
|
24553
|
+
* READ-ONLY indexing of the target space's hashtags, by name. When they cannot be read,
|
|
24554
|
+
* the source keywords are dropped too: creating them blindly could duplicate keywords the
|
|
24555
|
+
* target already has.
|
|
24556
|
+
*/
|
|
24557
|
+
async loadTargetHashtagIndex(targetSpaceId) {
|
|
24558
|
+
try {
|
|
24559
|
+
const targetHashtags = await this.hashtagService.listHashtagsForSpace(targetSpaceId);
|
|
24560
|
+
for (const hashtag of targetHashtags || []) {
|
|
24561
|
+
if (hashtag?.id && hashtag.name) {
|
|
24562
|
+
this.targetHashtagIdsByName.set(this.hashtagKey(hashtag.name), hashtag.id);
|
|
24563
|
+
}
|
|
23511
24564
|
}
|
|
23512
24565
|
}
|
|
23513
|
-
|
|
23514
|
-
|
|
23515
|
-
|
|
23516
|
-
}
|
|
24566
|
+
catch (error) {
|
|
24567
|
+
console.warn('[MatterportTagCopyService] Could not read the hashtags, keywords will be dropped:', error);
|
|
24568
|
+
this.sourceHashtagNames = new Map();
|
|
23517
24569
|
}
|
|
23518
24570
|
}
|
|
23519
24571
|
/**
|
|
@@ -23569,36 +24621,42 @@ class MatterportTagCopyService {
|
|
|
23569
24621
|
return resolved.length > 0 ? resolved : null;
|
|
23570
24622
|
}
|
|
23571
24623
|
/**
|
|
23572
|
-
* READ-ONLY
|
|
24624
|
+
* READ-ONLY: mission id -> user id of a space's missions.
|
|
23573
24625
|
*
|
|
23574
24626
|
* A Mission is scoped to one space (it pairs a userID with a spaceID), so the id a
|
|
23575
24627
|
* source comment's `ownerID` points at never designates anyone in the target space.
|
|
23576
|
-
* This
|
|
23577
|
-
* which user a source Mission id belongs to, and which Mission (if
|
|
23578
|
-
* user already holds in the target space.
|
|
24628
|
+
* This and loadTargetMissionIndex() build the two lookup tables resolveCommentOwnerID()
|
|
24629
|
+
* needs to translate it: which user a source Mission id belongs to, and which Mission (if
|
|
24630
|
+
* any) that same user already holds in the target space.
|
|
24631
|
+
* A failed read answers an empty map: comment authorship is then dropped.
|
|
23579
24632
|
*/
|
|
23580
|
-
async
|
|
23581
|
-
|
|
23582
|
-
let targetMissions = [];
|
|
24633
|
+
async loadMissionUserIds(spaceId) {
|
|
24634
|
+
const userIds = new Map();
|
|
23583
24635
|
try {
|
|
23584
|
-
|
|
23585
|
-
|
|
23586
|
-
|
|
23587
|
-
|
|
24636
|
+
const missions = await this.missionService.getAllMissionsForSpace(spaceId);
|
|
24637
|
+
for (const mission of missions || []) {
|
|
24638
|
+
if (mission?.id && mission.userID) {
|
|
24639
|
+
userIds.set(mission.id, mission.userID);
|
|
24640
|
+
}
|
|
24641
|
+
}
|
|
23588
24642
|
}
|
|
23589
24643
|
catch (error) {
|
|
23590
|
-
console.warn('[MatterportTagCopyService] Could not read the missions, comment authorship will be dropped:', error);
|
|
23591
|
-
return;
|
|
24644
|
+
console.warn('[MatterportTagCopyService] Could not read the source missions, comment authorship will be dropped:', error);
|
|
23592
24645
|
}
|
|
23593
|
-
|
|
23594
|
-
|
|
23595
|
-
|
|
24646
|
+
return userIds;
|
|
24647
|
+
}
|
|
24648
|
+
/** READ-ONLY indexing of the target space's missions, by user. */
|
|
24649
|
+
async loadTargetMissionIndex(targetSpaceId) {
|
|
24650
|
+
try {
|
|
24651
|
+
const targetMissions = await this.missionService.getAllMissionsForSpace(targetSpaceId);
|
|
24652
|
+
for (const mission of targetMissions || []) {
|
|
24653
|
+
if (mission?.id && mission.userID && !this.targetMissionIdsByUserId.has(mission.userID)) {
|
|
24654
|
+
this.targetMissionIdsByUserId.set(mission.userID, mission.id);
|
|
24655
|
+
}
|
|
23596
24656
|
}
|
|
23597
24657
|
}
|
|
23598
|
-
|
|
23599
|
-
|
|
23600
|
-
this.targetMissionIdsByUserId.set(mission.userID, mission.id);
|
|
23601
|
-
}
|
|
24658
|
+
catch (error) {
|
|
24659
|
+
console.warn('[MatterportTagCopyService] Could not read the missions, comment authorship will be dropped:', error);
|
|
23602
24660
|
}
|
|
23603
24661
|
}
|
|
23604
24662
|
/**
|
|
@@ -23614,6 +24672,10 @@ class MatterportTagCopyService {
|
|
|
23614
24672
|
* is honest, a misattributed one is not.
|
|
23615
24673
|
*/
|
|
23616
24674
|
resolveCommentOwnerID(sourceOwnerID) {
|
|
24675
|
+
if (this.archive) {
|
|
24676
|
+
// Import: the author's mission belongs to another environment — see importOwnerMissionId.
|
|
24677
|
+
return this.importOwnerMissionId;
|
|
24678
|
+
}
|
|
23617
24679
|
if (!sourceOwnerID) {
|
|
23618
24680
|
return null;
|
|
23619
24681
|
}
|
|
@@ -23806,7 +24868,7 @@ class MatterportTagCopyService {
|
|
|
23806
24868
|
level: raw.level ?? null,
|
|
23807
24869
|
role: raw.role ?? null,
|
|
23808
24870
|
category: raw.category ?? null,
|
|
23809
|
-
domainID: this.resolveDomainID(raw.domainID),
|
|
24871
|
+
domainID: await this.resolveDomainID(raw.domainID),
|
|
23810
24872
|
// --- Matterport anchoring ---
|
|
23811
24873
|
metadata: this.getAdjustedPoiMetadata(sourcePoi.metadata, transform)
|
|
23812
24874
|
};
|
|
@@ -23897,7 +24959,7 @@ class MatterportTagCopyService {
|
|
|
23897
24959
|
* Returns both the patch to send and the list of healed field names, so the caller can
|
|
23898
24960
|
* both perform the update and describe it in the copy log.
|
|
23899
24961
|
*/
|
|
23900
|
-
buildHealPatch(sourceObj, existingTarget, fields, includeDomain) {
|
|
24962
|
+
async buildHealPatch(sourceObj, existingTarget, fields, includeDomain) {
|
|
23901
24963
|
const patch = {};
|
|
23902
24964
|
const healedFields = [];
|
|
23903
24965
|
const fillIfMissing = (key, sourceValue) => {
|
|
@@ -23913,7 +24975,7 @@ class MatterportTagCopyService {
|
|
|
23913
24975
|
fillIfMissing(field, sourceObj[field]);
|
|
23914
24976
|
}
|
|
23915
24977
|
if (includeDomain && (existingTarget.domainID === null || existingTarget.domainID === undefined)) {
|
|
23916
|
-
const resolvedDomainId = this.resolveDomainID(sourceObj.domainID);
|
|
24978
|
+
const resolvedDomainId = await this.resolveDomainID(sourceObj.domainID);
|
|
23917
24979
|
if (resolvedDomainId) {
|
|
23918
24980
|
patch.domainID = resolvedDomainId;
|
|
23919
24981
|
healedFields.push('domainID');
|
|
@@ -23933,7 +24995,7 @@ class MatterportTagCopyService {
|
|
|
23933
24995
|
* Returns the list of fields that were actually healed (empty if nothing was missing).
|
|
23934
24996
|
*/
|
|
23935
24997
|
async healEquipmentIdentity(sourceObj, existingTarget) {
|
|
23936
|
-
const { patch, healedFields } = this.buildHealPatch(sourceObj, existingTarget, ['status', 'annotation', 'family', 'sku', 'manufacturer', 'installDate', 'warrantyEndDate', 'metadata', 'isCreatedByAI'], true);
|
|
24998
|
+
const { patch, healedFields } = await this.buildHealPatch(sourceObj, existingTarget, ['status', 'annotation', 'family', 'sku', 'manufacturer', 'installDate', 'warrantyEndDate', 'metadata', 'isCreatedByAI'], true);
|
|
23937
24999
|
if (!existingTarget.photo && sourceObj.photo) {
|
|
23938
25000
|
patch.photo = await this.copyS3KeyIfPresent(sourceObj.photo, `equipment photo "${sourceObj.name}"`);
|
|
23939
25001
|
healedFields.push('photo');
|
|
@@ -23951,7 +25013,7 @@ class MatterportTagCopyService {
|
|
|
23951
25013
|
* are never part of the heal — by construction, they already agree with the source.
|
|
23952
25014
|
*/
|
|
23953
25015
|
async healTicketIdentity(sourceObj, existingTarget) {
|
|
23954
|
-
const { patch, healedFields } = this.buildHealPatch(sourceObj, existingTarget, ['friendlyLabel', 'status', 'type', 'priority', 'level', 'metadata', 'read', 'projectID', 'problemCode'], true);
|
|
25016
|
+
const { patch, healedFields } = await this.buildHealPatch(sourceObj, existingTarget, ['friendlyLabel', 'status', 'type', 'priority', 'level', 'metadata', 'read', 'projectID', 'problemCode'], true);
|
|
23955
25017
|
if (healedFields.length === 0) {
|
|
23956
25018
|
return healedFields;
|
|
23957
25019
|
}
|
|
@@ -23962,7 +25024,7 @@ class MatterportTagCopyService {
|
|
|
23962
25024
|
/** Same idea, for a pre-existing feature. Keywords, media and POIs are not healed here
|
|
23963
25025
|
* for the same reason notes/POIs are not healed on equipment — see healEquipmentIdentity(). */
|
|
23964
25026
|
async healFeatureIdentity(sourceObj, existingTarget) {
|
|
23965
|
-
const { patch, healedFields } = this.buildHealPatch(sourceObj, existingTarget, ['shortDescription', 'level', 'type', 'index', 'stripeProductID', 'stripePriceID', 'bookingPriceMetadata', 'locale'], true);
|
|
25027
|
+
const { patch, healedFields } = await this.buildHealPatch(sourceObj, existingTarget, ['shortDescription', 'level', 'type', 'index', 'stripeProductID', 'stripePriceID', 'bookingPriceMetadata', 'locale'], true);
|
|
23966
25028
|
if (healedFields.length === 0) {
|
|
23967
25029
|
return healedFields;
|
|
23968
25030
|
}
|
|
@@ -24020,6 +25082,19 @@ class MatterportTagCopyService {
|
|
|
24020
25082
|
yRotation: applyRigidTransformToYRotationDeg(parsed.yRotation, transform)
|
|
24021
25083
|
};
|
|
24022
25084
|
}
|
|
25085
|
+
/**
|
|
25086
|
+
* Moves a 3D object of the scene with the rigid transform: its position like a tag's, its
|
|
25087
|
+
* orientation turned by the same angle around the vertical axis (applyRigidTransformToEulerXYZ).
|
|
25088
|
+
* Its scale does not change: both models are in meters.
|
|
25089
|
+
*/
|
|
25090
|
+
getAdjustedObject3DPlacement(position, rotation, transform) {
|
|
25091
|
+
const moved = applyRigidTransformToPoint({ x: position[0], y: position[1], z: position[2] }, transform);
|
|
25092
|
+
const turned = applyRigidTransformToEulerXYZ({ x: rotation[0], y: rotation[1], z: rotation[2] }, transform);
|
|
25093
|
+
return {
|
|
25094
|
+
position: [moved.x, moved.y, moved.z],
|
|
25095
|
+
rotation: [turned.x, turned.y, turned.z]
|
|
25096
|
+
};
|
|
25097
|
+
}
|
|
24023
25098
|
/**
|
|
24024
25099
|
* Reads a stored coordinate (JSON string or object, whatever its spacing) as a position.
|
|
24025
25100
|
* Null for a virtual POI or an unreadable value.
|
|
@@ -24061,6 +25136,11 @@ class MatterportTagCopyService {
|
|
|
24061
25136
|
findClosestTargetSweepId(sourceSweepID, sourceNavPositions, targetNavPositions, transform) {
|
|
24062
25137
|
if (!sourceSweepID)
|
|
24063
25138
|
return null;
|
|
25139
|
+
// Same Matterport model on both sides: the sweep ids are the model's own, so the very
|
|
25140
|
+
// same sweep exists in the target visit.
|
|
25141
|
+
if (this.keepSweepIds && targetNavPositions.has(sourceSweepID)) {
|
|
25142
|
+
return sourceSweepID;
|
|
25143
|
+
}
|
|
24064
25144
|
const sourcePos = sourceNavPositions.get(sourceSweepID);
|
|
24065
25145
|
if (!sourcePos)
|
|
24066
25146
|
return null;
|
|
@@ -24114,12 +25194,15 @@ class MatterportTagCopyService {
|
|
|
24114
25194
|
* skip the whole item entirely, rather than creating a record with a broken file link.
|
|
24115
25195
|
* - Any other kind of failure (permissions, network, etc.) still throws a generic Error.
|
|
24116
25196
|
*/
|
|
24117
|
-
async copyS3KeyIfPresent(key, contextLabel, folderOverride = null) {
|
|
25197
|
+
async copyS3KeyIfPresent(key, contextLabel, folderOverride = null, buildDestKey = null) {
|
|
24118
25198
|
if (!key) {
|
|
24119
25199
|
return null;
|
|
24120
25200
|
}
|
|
24121
25201
|
const sourceKey = this.extractS3KeyFromValue(key);
|
|
24122
|
-
const destKey = this.buildCopiedAttachmentKey(sourceKey, folderOverride);
|
|
25202
|
+
const destKey = buildDestKey ? buildDestKey(sourceKey) : this.buildCopiedAttachmentKey(sourceKey, folderOverride);
|
|
25203
|
+
if (this.archive) {
|
|
25204
|
+
return this.restoreArchivedFile(sourceKey, destKey, contextLabel);
|
|
25205
|
+
}
|
|
24123
25206
|
// Log the source key to ensure it matches the real S3 object path
|
|
24124
25207
|
console.log(`[DEBUG] Attempting S3 copy from source: "${sourceKey}" to dest: "${destKey}"`);
|
|
24125
25208
|
try {
|
|
@@ -24657,13 +25740,16 @@ class MatterportTagCopyService {
|
|
|
24657
25740
|
this.setStepLog('done', this.translate.instant('matterportCopy.recalibrateSummary', result));
|
|
24658
25741
|
return result;
|
|
24659
25742
|
}
|
|
24660
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MatterportTagCopyService, deps: [{ token: NavigationService }, { token: BaseUserService }, { token: PoiService }, { token: TicketsService }, { token: EquipmentService }, { token: Object3DService }, { token: FeatureService }, { token: MeasurementService }, { token: CommentService }, { token: HashtagService }, { token: MissionService }, { token: OperationService }, { token: DomainService }, { token: i1$1.TranslateService }, { token: ZoneService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
25743
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MatterportTagCopyService, deps: [{ token: NavigationService }, { token: BaseUserService }, { token: PoiService }, { token: TicketsService }, { token: EquipmentService }, { token: Object3DService }, { token: FeatureService }, { token: MeasurementService }, { token: CommentService }, { token: HashtagService }, { token: MissionService }, { token: OperationService }, { token: DomainService }, { token: i1$1.TranslateService }, { token: ZoneService }, { token: OBJECT3D_MODEL_UPLOAD_ENABLED }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
24661
25744
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MatterportTagCopyService, providedIn: 'root' });
|
|
24662
25745
|
}
|
|
24663
25746
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MatterportTagCopyService, decorators: [{
|
|
24664
25747
|
type: Injectable,
|
|
24665
25748
|
args: [{ providedIn: 'root' }]
|
|
24666
|
-
}], ctorParameters: () => [{ type: NavigationService }, { type: BaseUserService }, { type: PoiService }, { type: TicketsService }, { type: EquipmentService }, { type: Object3DService }, { type: FeatureService }, { type: MeasurementService }, { type: CommentService }, { type: HashtagService }, { type: MissionService }, { type: OperationService }, { type: DomainService }, { type: i1$1.TranslateService }, { type: ZoneService }
|
|
25749
|
+
}], ctorParameters: () => [{ type: NavigationService }, { type: BaseUserService }, { type: PoiService }, { type: TicketsService }, { type: EquipmentService }, { type: Object3DService }, { type: FeatureService }, { type: MeasurementService }, { type: CommentService }, { type: HashtagService }, { type: MissionService }, { type: OperationService }, { type: DomainService }, { type: i1$1.TranslateService }, { type: ZoneService }, { type: undefined, decorators: [{
|
|
25750
|
+
type: Inject,
|
|
25751
|
+
args: [OBJECT3D_MODEL_UPLOAD_ENABLED]
|
|
25752
|
+
}] }] });
|
|
24667
25753
|
|
|
24668
25754
|
/* eslint-disable class-methods-use-this */
|
|
24669
25755
|
class OrganisationService {
|
|
@@ -24797,5 +25883,5 @@ function floatValidator() {
|
|
|
24797
25883
|
* Generated bundle index. Do not edit.
|
|
24798
25884
|
*/
|
|
24799
25885
|
|
|
24800
|
-
export { AffectationService, AvatarComponent, BaseLateralTabService, BaseTagService, BaseUserService, BaseVisibilityService, CameraMode, CaptureService, CaptureViewer, CheckboxSliderComponent, CommentService, CommentType, Config, ContentService, CsvExportComponent, DomainService, DomainType, DurationToStringPipe, EmailStatus, EquipmentService, EventService, EventStatus, EventType, FeatureService, FeatureType, FilterService, GAUSSIAN_SPLAT_PLY_SUFFIX, HashtagFromIdPipe, HashtagService, INVENTORY_CUTOFF_SCORES, INVENTORY_DEFAULT_CUTOFF, INVENTORY_DELETE_AT_ONCE, INVENTORY_MESH_FILE, INVENTORY_POSITIONS_FILE, INVENTORY_STALE_AFTER_MS, InterventionService, InventoryFilesComponent, InventoryLaunchComponent, InventoryRunsComponent, InventoryService, InventoryStatus, LayerService, LevelStatus, LoaderComponent, Locale, LocaleService, MATTERPORT_SDK_KEY, MatterportImportService, MatterportService, MatterportTagCopyService, MatterportViewType, MattertagActionMode, MattertagData, MeasurementService, MenuBarComponent, MissionService, NavigationService, NavigatorService, NgxSmarterplanCoreModule, NgxSmarterplanCoreService, NodeService, Object3DService, OperationService, OrganisationService, PLAN_ICONS, PaymentStatus, PlanService, PoiService, PoiType, ProfileEntity, ProfileService, ProfileStatus, PropertyService, PropertyType, RoleStatus, SafeUrlPipe, SearchBarComponent, SearchObjectType, SearchService, SpModule, SpaceService, SpaceStatus, SplatViewerComponent, StatusEquipment, SupportModalComponent, SupportService, SweepLocatorService, THREEJS_MODEL_UP_OPTIONS, TagAction, TemplateService, ThreeJsImportService, ThreeJsService, TicketPriority, TicketStatus, TicketType, TicketsService, TimeDateToLocalStringPipe, TypeNote, UsernameFromIdPipe, VIEWER_BACKGROUND, ValidatorsService, ViewerInteractions, ViewerService, VisitService, ZoneChangeService, ZoneService, applyRigidTransformToDirection, applyRigidTransformToPoint, applyRigidTransformToYRotationDeg, arraysContainSameElements, checkElementById, computeRigidTransform, convertObjToGlb, convertTimestampToLocalZone, copyFileInS3, copyFileInS3ViaDownload, dateHasExpired, dateTimeToLocalString, deleteFromS3, distance, downloadBlob, downloadEquipmentDocument, downloadFile, downloadFileAsObject, durationToString, emailValidator, enumToArray, filterUniqueArrayByID, floatValidator, getBufferForFileFromS3, getCoefficientsForImage, getCurrentLang, getDistanceBetweenTwoPoints, getHighestLevelForMissions, getHighestRoleForMissions, getLevelsBelow, getLocaleLong, getLocaleShort, getMetaForImage, getRolesBelowForManager, getSignedFile, getSignedImageUrlForEquipment, getSignedImageUrlForProfile, getSignedImageUrlForSpace, getSpaceIDFromUrl, getThreeJsPoiOrigin, getVisitUrl, hasObjModel, iconData, iconToDataUrl, isEmptyObject, isGaussianSplatFile, isGaussianSplatPly, isStreamedSplatFile, listFilesInFolder, mean, noEmptyValidator, numberToDateString, openDocument, openModalForVisitSwitch, parseThreeJsPlacement, poiTypeToString, pointToString, readObj, removeAllFilesFromFolderS3, removeNullKeysFromObject, showScanPointsOnPlanInDiv, shuffleArray, solveThreeJsAlignment, sortAlphabeticallyOnName, stringLocaleToEnum, stringToLowercaseNoSpaces, styleButton, svgToDataUrl, textValidator, translateDatePeriod, uploadBase64Image, uploadBase64ImageWithRetry, uploadFileToS3, uploadFileToS3WithProgress, uploadJsonToS3, validEmail, wait, waitUntil };
|
|
25886
|
+
export { AffectationService, AvatarComponent, BaseLateralTabService, BaseTagService, BaseUserService, BaseVisibilityService, CameraMode, CaptureService, CaptureViewer, CheckboxSliderComponent, CommentService, CommentType, Config, ContentService, CsvExportComponent, DomainService, DomainType, DurationToStringPipe, EmailStatus, EquipmentService, EventService, EventStatus, EventType, FeatureService, FeatureType, FilterService, GAUSSIAN_SPLAT_PLY_SUFFIX, GLB_CONTENT_TYPE, HashtagFromIdPipe, HashtagService, INVENTORY_CUTOFF_SCORES, INVENTORY_DEFAULT_CUTOFF, INVENTORY_DELETE_AT_ONCE, INVENTORY_MESH_FILE, INVENTORY_POSITIONS_FILE, INVENTORY_STALE_AFTER_MS, InterventionService, InventoryFilesComponent, InventoryLaunchComponent, InventoryRunsComponent, InventoryService, InventoryStatus, LayerService, LevelStatus, LoaderComponent, Locale, LocaleService, MATTERPORT_SDK_KEY, MatterportImportService, MatterportService, MatterportTagCopyService, MatterportViewType, MattertagActionMode, MattertagData, MeasurementService, MenuBarComponent, MissionService, NavigationService, NavigatorService, NgxSmarterplanCoreModule, NgxSmarterplanCoreService, NodeService, OBJECT3D_LIBRARY_ASSET_FOLDER, OBJECT3D_LIBRARY_FOLDER, OBJECT3D_MODEL_EXTENSIONS, OBJECT3D_MODEL_UPLOAD_ENABLED, OBJECT3D_S3_FOLDER, OBJECT3D_UPLOAD_MAX_BYTES, Object3DService, OperationService, OrganisationService, PLAN_ICONS, PaymentStatus, PlanService, PoiService, PoiType, ProfileEntity, ProfileService, ProfileStatus, PropertyService, PropertyType, RoleStatus, SafeUrlPipe, SearchBarComponent, SearchObjectType, SearchService, SpModule, SpaceService, SpaceStatus, SplatViewerComponent, StatusEquipment, SupportModalComponent, SupportService, SweepLocatorService, TAG_ARCHIVE_FILES_FOLDER, TAG_ARCHIVE_FORMAT, TAG_ARCHIVE_MANIFEST, TAG_ARCHIVE_VERSION, THREEJS_MODEL_UP_OPTIONS, TagAction, TagArchiveError, TemplateService, ThreeJsImportService, ThreeJsService, TicketPriority, TicketStatus, TicketType, TicketsService, TimeDateToLocalStringPipe, TypeNote, UsernameFromIdPipe, VIEWER_BACKGROUND, ValidatorsService, ViewerInteractions, ViewerService, VisitService, ZoneChangeService, ZoneService, applyRigidTransformToDirection, applyRigidTransformToEulerXYZ, applyRigidTransformToPoint, applyRigidTransformToYRotationDeg, arraysContainSameElements, buildObject3DModelKey, buildTagArchive, checkElementById, computeRigidTransform, convertObjToGlb, convertTimestampToLocalZone, copyFileInS3, copyFileInS3ViaDownload, dateHasExpired, dateTimeToLocalString, deleteFromS3, distance, downloadBlob, downloadEquipmentDocument, downloadFile, downloadFileAsObject, downloadS3Object, durationToString, emailValidator, enumToArray, filterUniqueArrayByID, floatValidator, getBufferForFileFromS3, getCoefficientsForImage, getCurrentLang, getDistanceBetweenTwoPoints, getHighestLevelForMissions, getHighestRoleForMissions, getLevelsBelow, getLocaleLong, getLocaleShort, getMetaForImage, getObject3DLibraryFile, getRolesBelowForManager, getSignedFile, getSignedImageUrlForEquipment, getSignedImageUrlForProfile, getSignedImageUrlForSpace, getSpaceIDFromUrl, getThreeJsPoiOrigin, getVisitUrl, hasObjModel, iconData, iconToDataUrl, isEmptyObject, isGaussianSplatFile, isGaussianSplatPly, isStreamedSplatFile, listFilesInFolder, mean, noEmptyValidator, numberToDateString, openDocument, openModalForVisitSwitch, parseThreeJsPlacement, poiTypeToString, pointToString, readObj, readTagArchive, removeAllFilesFromFolderS3, removeNullKeysFromObject, resolveObject3DModelSource, showScanPointsOnPlanInDiv, shuffleArray, solveThreeJsAlignment, sortAlphabeticallyOnName, stringLocaleToEnum, stringToLowercaseNoSpaces, styleButton, svgToDataUrl, tagArchiveFilePath, textValidator, translateDatePeriod, uploadBase64Image, uploadBase64ImageWithRetry, uploadFileToS3, uploadFileToS3WithProgress, uploadJsonToS3, uploadS3Object, validEmail, validateGlbFile, wait, waitUntil };
|
|
24801
25887
|
//# sourceMappingURL=smarterplan-ngx-smarterplan-core.mjs.map
|