@smarterplan/ngx-smarterplan-locations 0.2.6 → 0.2.8
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/esm2020/lib/components/carousel/carousel.component.mjs +3 -3
- package/esm2020/lib/components/chevron/chevron.component.mjs +3 -3
- package/esm2020/lib/components/detail-location/detail-location.component.mjs +1 -1
- package/esm2020/lib/components/images/images.component.mjs +3 -3
- package/esm2020/lib/components/locations/map/map-popup/map-popup.component.mjs +3 -3
- package/esm2020/lib/components/locations/map/map.component.mjs +3 -3
- package/esm2020/lib/components/plans/calibration/calibration.component.mjs +55 -71
- package/esm2020/lib/components/plans/edit-plan/edit-plan.component.mjs +7 -6
- package/esm2020/lib/components/plans/plans.component.mjs +3 -3
- package/esm2020/lib/components/tab-navigation/tab-navigation.component.mjs +3 -3
- package/esm2020/lib/components/zones/add-zone/selection/selection.component.mjs +3 -3
- package/esm2020/lib/ngx-smarterplan-locations.service.mjs +1 -1
- package/esm2020/public-api.mjs +1 -1
- package/fesm2015/smarterplan-ngx-smarterplan-locations.mjs +72 -87
- package/fesm2015/smarterplan-ngx-smarterplan-locations.mjs.map +1 -1
- package/fesm2020/smarterplan-ngx-smarterplan-locations.mjs +72 -87
- package/fesm2020/smarterplan-ngx-smarterplan-locations.mjs.map +1 -1
- package/package.json +1 -1
package/esm2020/public-api.mjs
CHANGED
|
@@ -6,4 +6,4 @@ export * from './lib/ngx-smarterplan-locations.module';
|
|
|
6
6
|
// Components
|
|
7
7
|
export * from './lib/components/locations/map/map.component';
|
|
8
8
|
export * from './lib/components/tab-navigation/tab-navigation.component';
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25neC1zbWFydGVycGxhbi1sb2NhdGlvbnMvc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLHlDQUF5QyxDQUFDO0FBQ3hELGNBQWMsd0NBQXdDLENBQUM7QUFFdkQsYUFBYTtBQUViLGNBQWMsOENBQThDLENBQUM7QUFDN0QsY0FBYywwREFBMEQsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXHJcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBuZ3gtc21hcnRlcnBsYW4tbG9jYXRpb25zXHJcbiAqL1xyXG5cclxuZXhwb3J0ICogZnJvbSAnLi9saWIvbmd4LXNtYXJ0ZXJwbGFuLWxvY2F0aW9ucy5zZXJ2aWNlJztcclxuZXhwb3J0ICogZnJvbSAnLi9saWIvbmd4LXNtYXJ0ZXJwbGFuLWxvY2F0aW9ucy5tb2R1bGUnO1xyXG5cclxuLy8gQ29tcG9uZW50c1xyXG5cclxuZXhwb3J0ICogZnJvbSAnLi9saWIvY29tcG9uZW50cy9sb2NhdGlvbnMvbWFwL21hcC5jb21wb25lbnQnO1xyXG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb21wb25lbnRzL3RhYi1uYXZpZ2F0aW9uL3RhYi1uYXZpZ2F0aW9uLmNvbXBvbmVudCc7XHJcbiJdfQ==
|
|
@@ -60,10 +60,10 @@ class TabNavigationComponent {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
TabNavigationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TabNavigationComponent, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
63
|
-
TabNavigationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: TabNavigationComponent, selector: "lib-tab-navigation", inputs: { menuItems: "menuItems" }, outputs: { onGoBack: "onGoBack" }, ngImport: i0, template: "<span class=\"menu\">\n <span *ngFor=\"let item of menuItems; let index = index;\">\n <span class=\"item\" [ngClass]=\"{'current':index === menuItems.length - 1}\"\n (click)=\"onClick(item.url,item.back, index)\">{{item.label | translate}}</span> <span\n *ngIf=\"index !== menuItems.length - 1\" class=\"separator\">></span>\n </span>\n</span>\n", styles: [".item{font-size:1.35em;color:var(--smarterplan-primary);cursor:pointer}.current{color:var(--smarterplan-primary)!important;cursor:default!important;text-decoration:none!important}.separator{font-size:1.4em;margin-left:10px;margin-right:10px;color:var(--smarterplan-primary)}.item:hover{text-decoration:underline}.menu{margin-top:15px;margin-bottom:20px}\n"], directives: [{ type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i3.TranslatePipe } });
|
|
63
|
+
TabNavigationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: TabNavigationComponent, selector: "lib-tab-navigation", inputs: { menuItems: "menuItems" }, outputs: { onGoBack: "onGoBack" }, ngImport: i0, template: "<span class=\"menu\">\r\n <span *ngFor=\"let item of menuItems; let index = index;\">\r\n <span class=\"item\" [ngClass]=\"{'current':index === menuItems.length - 1}\"\r\n (click)=\"onClick(item.url,item.back, index)\">{{item.label | translate}}</span> <span\r\n *ngIf=\"index !== menuItems.length - 1\" class=\"separator\">></span>\r\n </span>\r\n</span>\r\n", styles: [".item{font-size:1.35em;color:var(--smarterplan-primary);cursor:pointer}.current{color:var(--smarterplan-primary)!important;cursor:default!important;text-decoration:none!important}.separator{font-size:1.4em;margin-left:10px;margin-right:10px;color:var(--smarterplan-primary)}.item:hover{text-decoration:underline}.menu{margin-top:15px;margin-bottom:20px}\n"], directives: [{ type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i3.TranslatePipe } });
|
|
64
64
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TabNavigationComponent, decorators: [{
|
|
65
65
|
type: Component,
|
|
66
|
-
args: [{ selector: 'lib-tab-navigation', template: "<span class=\"menu\">\n <span *ngFor=\"let item of menuItems; let index = index;\">\n <span class=\"item\" [ngClass]=\"{'current':index === menuItems.length - 1}\"\n (click)=\"onClick(item.url,item.back, index)\">{{item.label | translate}}</span> <span\n *ngIf=\"index !== menuItems.length - 1\" class=\"separator\">></span>\n </span>\n</span>\n", styles: [".item{font-size:1.35em;color:var(--smarterplan-primary);cursor:pointer}.current{color:var(--smarterplan-primary)!important;cursor:default!important;text-decoration:none!important}.separator{font-size:1.4em;margin-left:10px;margin-right:10px;color:var(--smarterplan-primary)}.item:hover{text-decoration:underline}.menu{margin-top:15px;margin-bottom:20px}\n"] }]
|
|
66
|
+
args: [{ selector: 'lib-tab-navigation', template: "<span class=\"menu\">\r\n <span *ngFor=\"let item of menuItems; let index = index;\">\r\n <span class=\"item\" [ngClass]=\"{'current':index === menuItems.length - 1}\"\r\n (click)=\"onClick(item.url,item.back, index)\">{{item.label | translate}}</span> <span\r\n *ngIf=\"index !== menuItems.length - 1\" class=\"separator\">></span>\r\n </span>\r\n</span>\r\n", styles: [".item{font-size:1.35em;color:var(--smarterplan-primary);cursor:pointer}.current{color:var(--smarterplan-primary)!important;cursor:default!important;text-decoration:none!important}.separator{font-size:1.4em;margin-left:10px;margin-right:10px;color:var(--smarterplan-primary)}.item:hover{text-decoration:underline}.menu{margin-top:15px;margin-bottom:20px}\n"] }]
|
|
67
67
|
}], ctorParameters: function () { return [{ type: i1.Router }]; }, propDecorators: { onGoBack: [{
|
|
68
68
|
type: Output
|
|
69
69
|
}], menuItems: [{
|
|
@@ -128,10 +128,10 @@ class MapPopupComponent {
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
MapPopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: MapPopupComponent, deps: [{ token: i1.Router }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
131
|
-
MapPopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: MapPopupComponent, selector: "lib-map-popup", ngImport: i0, template: "<div id=\"map-popup\">\n <div class=\"map-popup-header\" (click)=\"onClickVisitFirst()\" [style.cursor]=\"'pointer'\">\n <img [src]=\"space.annexes\" />\n </div>\n <div class=\"map-popup-details\">\n <h1 (click)=\"onClickVisitFirst()\" [style.cursor]=\"'pointer'\">{{space.name}}</h1>\n <span class=\"map-popup-address\">{{space.addresses}}</span>\n <span *ngFor=\"let visit of space.visits\" class=\"map-popup-visit\" (click)=\"onVisitClick(visit)\"\n [style.cursor]=\"'pointer'\">\u27A4 {{ visit.name ? visit.name : space.name}}</span>\n </div>\n</div>\n", styles: [".map-popup-header{height:120px;overflow:hidden;border-top-right-radius:20px;border-top-left-radius:20px}.map-popup-header img{width:100%;position:relative;top:50%;transform:translateY(-50%)}.map-popup-details{padding:5px 10px 10px;border-bottom-left-radius:20px;border-bottom-right-radius:20px;background-color:#fff;color:#000}.map-popup-details{display:flex;flex-direction:column}.map-popup-details h1{font-size:1.5rem;font-weight:700;margin-bottom:0;color:var(--smarterplan-primary)}.map-popup-address{align-self:flex-end;margin-bottom:10px}.map-popup-visit{color:var(--smarterplan-primary);font-size:1.15rem}.map-popup-visit:hover{color:var(--smarterplan-primary)}\n"], directives: [{ type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
131
|
+
MapPopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: MapPopupComponent, selector: "lib-map-popup", ngImport: i0, template: "<div id=\"map-popup\">\r\n <div class=\"map-popup-header\" (click)=\"onClickVisitFirst()\" [style.cursor]=\"'pointer'\">\r\n <img [src]=\"space.annexes\" />\r\n </div>\r\n <div class=\"map-popup-details\">\r\n <h1 (click)=\"onClickVisitFirst()\" [style.cursor]=\"'pointer'\">{{space.name}}</h1>\r\n <span class=\"map-popup-address\">{{space.addresses}}</span>\r\n <span *ngFor=\"let visit of space.visits\" class=\"map-popup-visit\" (click)=\"onVisitClick(visit)\"\r\n [style.cursor]=\"'pointer'\">\u27A4 {{ visit.name ? visit.name : space.name}}</span>\r\n </div>\r\n</div>\r\n", styles: [".map-popup-header{height:120px;overflow:hidden;border-top-right-radius:20px;border-top-left-radius:20px}.map-popup-header img{width:100%;position:relative;top:50%;transform:translateY(-50%)}.map-popup-details{padding:5px 10px 10px;border-bottom-left-radius:20px;border-bottom-right-radius:20px;background-color:#fff;color:#000}.map-popup-details{display:flex;flex-direction:column}.map-popup-details h1{font-size:1.5rem;font-weight:700;margin-bottom:0;color:var(--smarterplan-primary)}.map-popup-address{align-self:flex-end;margin-bottom:10px}.map-popup-visit{color:var(--smarterplan-primary);font-size:1.15rem}.map-popup-visit:hover{color:var(--smarterplan-primary)}\n"], directives: [{ type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
132
132
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: MapPopupComponent, decorators: [{
|
|
133
133
|
type: Component,
|
|
134
|
-
args: [{ selector: 'lib-map-popup', template: "<div id=\"map-popup\">\n <div class=\"map-popup-header\" (click)=\"onClickVisitFirst()\" [style.cursor]=\"'pointer'\">\n <img [src]=\"space.annexes\" />\n </div>\n <div class=\"map-popup-details\">\n <h1 (click)=\"onClickVisitFirst()\" [style.cursor]=\"'pointer'\">{{space.name}}</h1>\n <span class=\"map-popup-address\">{{space.addresses}}</span>\n <span *ngFor=\"let visit of space.visits\" class=\"map-popup-visit\" (click)=\"onVisitClick(visit)\"\n [style.cursor]=\"'pointer'\">\u27A4 {{ visit.name ? visit.name : space.name}}</span>\n </div>\n</div>\n", styles: [".map-popup-header{height:120px;overflow:hidden;border-top-right-radius:20px;border-top-left-radius:20px}.map-popup-header img{width:100%;position:relative;top:50%;transform:translateY(-50%)}.map-popup-details{padding:5px 10px 10px;border-bottom-left-radius:20px;border-bottom-right-radius:20px;background-color:#fff;color:#000}.map-popup-details{display:flex;flex-direction:column}.map-popup-details h1{font-size:1.5rem;font-weight:700;margin-bottom:0;color:var(--smarterplan-primary)}.map-popup-address{align-self:flex-end;margin-bottom:10px}.map-popup-visit{color:var(--smarterplan-primary);font-size:1.15rem}.map-popup-visit:hover{color:var(--smarterplan-primary)}\n"] }]
|
|
134
|
+
args: [{ selector: 'lib-map-popup', template: "<div id=\"map-popup\">\r\n <div class=\"map-popup-header\" (click)=\"onClickVisitFirst()\" [style.cursor]=\"'pointer'\">\r\n <img [src]=\"space.annexes\" />\r\n </div>\r\n <div class=\"map-popup-details\">\r\n <h1 (click)=\"onClickVisitFirst()\" [style.cursor]=\"'pointer'\">{{space.name}}</h1>\r\n <span class=\"map-popup-address\">{{space.addresses}}</span>\r\n <span *ngFor=\"let visit of space.visits\" class=\"map-popup-visit\" (click)=\"onVisitClick(visit)\"\r\n [style.cursor]=\"'pointer'\">\u27A4 {{ visit.name ? visit.name : space.name}}</span>\r\n </div>\r\n</div>\r\n", styles: [".map-popup-header{height:120px;overflow:hidden;border-top-right-radius:20px;border-top-left-radius:20px}.map-popup-header img{width:100%;position:relative;top:50%;transform:translateY(-50%)}.map-popup-details{padding:5px 10px 10px;border-bottom-left-radius:20px;border-bottom-right-radius:20px;background-color:#fff;color:#000}.map-popup-details{display:flex;flex-direction:column}.map-popup-details h1{font-size:1.5rem;font-weight:700;margin-bottom:0;color:var(--smarterplan-primary)}.map-popup-address{align-self:flex-end;margin-bottom:10px}.map-popup-visit{color:var(--smarterplan-primary);font-size:1.15rem}.map-popup-visit:hover{color:var(--smarterplan-primary)}\n"] }]
|
|
135
135
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i0.NgZone }]; } });
|
|
136
136
|
|
|
137
137
|
const iconRetinaUrl = "assets/marker-icon-2x.png";
|
|
@@ -212,10 +212,10 @@ class MapComponent {
|
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
MapComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: MapComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
215
|
-
MapComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: MapComponent, selector: "lib-map", inputs: { spaces: "spaces" }, usesOnChanges: true, ngImport: i0, template: "<div [leafletLayers]=\"layers\" [leafletOptions]=\"options\" (leafletMapReady)=\"onMapReady($event)\" id=\"map\" leaflet\n style=\"height: 500px; margin-top: 30px; z-index: 195\"></div>\n", styles: [""], directives: [{ type: i1$1.LeafletDirective, selector: "[leaflet]", inputs: ["leafletFitBoundsOptions", "leafletPanOptions", "leafletZoomOptions", "leafletZoomPanOptions", "leafletOptions", "leafletZoom", "leafletCenter", "leafletFitBounds", "leafletMaxBounds", "leafletMinZoom", "leafletMaxZoom"], outputs: ["leafletMapReady", "leafletZoomChange", "leafletCenterChange", "leafletClick", "leafletDoubleClick", "leafletMouseDown", "leafletMouseUp", "leafletMouseMove", "leafletMouseOver", "leafletMouseOut", "leafletMapMove", "leafletMapMoveStart", "leafletMapMoveEnd", "leafletMapZoom", "leafletMapZoomStart", "leafletMapZoomEnd"] }, { type: i1$1.LeafletLayersDirective, selector: "[leafletLayers]", inputs: ["leafletLayers"] }] });
|
|
215
|
+
MapComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: MapComponent, selector: "lib-map", inputs: { spaces: "spaces" }, usesOnChanges: true, ngImport: i0, template: "<div [leafletLayers]=\"layers\" [leafletOptions]=\"options\" (leafletMapReady)=\"onMapReady($event)\" id=\"map\" leaflet\r\n style=\"height: 500px; margin-top: 30px; z-index: 195\"></div>\r\n", styles: [""], directives: [{ type: i1$1.LeafletDirective, selector: "[leaflet]", inputs: ["leafletFitBoundsOptions", "leafletPanOptions", "leafletZoomOptions", "leafletZoomPanOptions", "leafletOptions", "leafletZoom", "leafletCenter", "leafletFitBounds", "leafletMaxBounds", "leafletMinZoom", "leafletMaxZoom"], outputs: ["leafletMapReady", "leafletZoomChange", "leafletCenterChange", "leafletClick", "leafletDoubleClick", "leafletMouseDown", "leafletMouseUp", "leafletMouseMove", "leafletMouseOver", "leafletMouseOut", "leafletMapMove", "leafletMapMoveStart", "leafletMapMoveEnd", "leafletMapZoom", "leafletMapZoomStart", "leafletMapZoomEnd"] }, { type: i1$1.LeafletLayersDirective, selector: "[leafletLayers]", inputs: ["leafletLayers"] }] });
|
|
216
216
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: MapComponent, decorators: [{
|
|
217
217
|
type: Component,
|
|
218
|
-
args: [{ selector: 'lib-map', template: "<div [leafletLayers]=\"layers\" [leafletOptions]=\"options\" (leafletMapReady)=\"onMapReady($event)\" id=\"map\" leaflet\n style=\"height: 500px; margin-top: 30px; z-index: 195\"></div>\n", styles: [""] }]
|
|
218
|
+
args: [{ selector: 'lib-map', template: "<div [leafletLayers]=\"layers\" [leafletOptions]=\"options\" (leafletMapReady)=\"onMapReady($event)\" id=\"map\" leaflet\r\n style=\"height: 500px; margin-top: 30px; z-index: 195\"></div>\r\n", styles: [""] }]
|
|
219
219
|
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.Injector }]; }, propDecorators: { spaces: [{
|
|
220
220
|
type: Input
|
|
221
221
|
}] } });
|
|
@@ -803,7 +803,7 @@ class CalibrationComponent {
|
|
|
803
803
|
this.setupMenuItems();
|
|
804
804
|
this.chosenPlan = this.planService.getChosenPlan();
|
|
805
805
|
if (this.chosenPlan) {
|
|
806
|
-
this.chosenPlanIsPdf = this.chosenPlan.annexe.includes(
|
|
806
|
+
this.chosenPlanIsPdf = this.chosenPlan.annexe.includes('pdf');
|
|
807
807
|
this.launchViewer();
|
|
808
808
|
setTimeout(() => {
|
|
809
809
|
this.configureCanvas().then(() => {
|
|
@@ -819,11 +819,7 @@ class CalibrationComponent {
|
|
|
819
819
|
}, 500);
|
|
820
820
|
}
|
|
821
821
|
else {
|
|
822
|
-
this.router.navigate([
|
|
823
|
-
"/dashboard/localisation",
|
|
824
|
-
this.spaceID,
|
|
825
|
-
"plans",
|
|
826
|
-
]);
|
|
822
|
+
this.router.navigate(['/dashboard/localisation', this.spaceID, 'plans']);
|
|
827
823
|
}
|
|
828
824
|
});
|
|
829
825
|
}
|
|
@@ -832,17 +828,17 @@ class CalibrationComponent {
|
|
|
832
828
|
*********************************************************************************************** */
|
|
833
829
|
setupMenuItems() {
|
|
834
830
|
this.menuItems = [
|
|
835
|
-
{ label:
|
|
831
|
+
{ label: 'Locations', url: '/localisation' },
|
|
836
832
|
{
|
|
837
833
|
label: this.currentSpace.name,
|
|
838
834
|
url: `/localisation/${this.spaceID}`,
|
|
839
835
|
},
|
|
840
836
|
{
|
|
841
|
-
label:
|
|
837
|
+
label: 'Plans',
|
|
842
838
|
url: `/localisation/${this.currentSpace.id}/plans`,
|
|
843
839
|
},
|
|
844
840
|
{
|
|
845
|
-
label:
|
|
841
|
+
label: 'Calibration',
|
|
846
842
|
url: `/localisation/${this.currentSpace.id}/plan-calibration?spaceID=${this.currentSpace.id}`,
|
|
847
843
|
},
|
|
848
844
|
];
|
|
@@ -855,7 +851,7 @@ class CalibrationComponent {
|
|
|
855
851
|
return __awaiter(this, void 0, void 0, function* () {
|
|
856
852
|
/** Get canvas */
|
|
857
853
|
if (!this.canvas) {
|
|
858
|
-
const canvas = document.querySelector(
|
|
854
|
+
const canvas = document.querySelector('#canvas');
|
|
859
855
|
this.canvas = canvas;
|
|
860
856
|
}
|
|
861
857
|
if (!this.chosenPlanIsPdf) {
|
|
@@ -888,7 +884,7 @@ class CalibrationComponent {
|
|
|
888
884
|
drawImage(url, x = 0, y = 0, icone = false) {
|
|
889
885
|
const image = new Image();
|
|
890
886
|
const size = this.canvasSize;
|
|
891
|
-
const context = this.canvas.getContext(
|
|
887
|
+
const context = this.canvas.getContext('2d');
|
|
892
888
|
/** Flip the context, for symmetry */
|
|
893
889
|
// if (this.reflectV) {
|
|
894
890
|
// context.translate(size.w, 0);
|
|
@@ -900,7 +896,7 @@ class CalibrationComponent {
|
|
|
900
896
|
// }
|
|
901
897
|
let imageWidth = size.w;
|
|
902
898
|
let imageHeight = size.h;
|
|
903
|
-
image.addEventListener(
|
|
899
|
+
image.addEventListener('load', () => {
|
|
904
900
|
if (icone) {
|
|
905
901
|
imageWidth = image.width;
|
|
906
902
|
imageHeight = image.height;
|
|
@@ -929,7 +925,8 @@ class CalibrationComponent {
|
|
|
929
925
|
const pdfjs = yield import('pdfjs-dist/build/pdf');
|
|
930
926
|
const pdfjsWorker = yield import('pdfjs-dist/build/pdf.worker.entry');
|
|
931
927
|
pdfjs.GlobalWorkerOptions.workerSrc = pdfjsWorker;
|
|
932
|
-
const pdf = yield getDocument(this.chosenPlan.filepath)
|
|
928
|
+
const pdf = yield getDocument(this.chosenPlan.filepath)
|
|
929
|
+
.promise;
|
|
933
930
|
const page = yield pdf.getPage(1);
|
|
934
931
|
const viewPortParameters = { scale: 1 };
|
|
935
932
|
const viewport = page.getViewport(viewPortParameters);
|
|
@@ -939,13 +936,13 @@ class CalibrationComponent {
|
|
|
939
936
|
console.log(size);
|
|
940
937
|
this.canvasSize = size;
|
|
941
938
|
this.canvasZoom = size.w / viewport.width;
|
|
942
|
-
const context = this.canvas.getContext(
|
|
939
|
+
const context = this.canvas.getContext('2d');
|
|
943
940
|
const renderContext = {
|
|
944
941
|
canvasContext: context,
|
|
945
942
|
viewport,
|
|
946
943
|
};
|
|
947
944
|
const renderTask = page.render(renderContext).promise;
|
|
948
|
-
renderTask.then(() => console.log(
|
|
945
|
+
renderTask.then(() => console.log('Page rendered'));
|
|
949
946
|
// const res = canvas.toDataURL();
|
|
950
947
|
// if (pdf != null) pdf.destroy();
|
|
951
948
|
// return res;
|
|
@@ -973,25 +970,28 @@ class CalibrationComponent {
|
|
|
973
970
|
// console.log(this.floors);
|
|
974
971
|
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
975
972
|
/** Move Floor mode */
|
|
976
|
-
yield sdk.Mode.moveTo(sdk.Mode.Mode.FLOORPLAN)
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
973
|
+
yield sdk.Mode.moveTo(sdk.Mode.Mode.FLOORPLAN).then((nextMode) => __awaiter(this, void 0, void 0, function* () {
|
|
974
|
+
// Move successful
|
|
975
|
+
console.log(`Arrived at new view mode ${nextMode}`);
|
|
976
|
+
/** Display the correct floor for the plan */
|
|
977
|
+
try {
|
|
978
|
+
yield this.matterportImportService.moveToFloor(this.chosenPlan.name);
|
|
979
|
+
/** When the user try to change the view mode we set it back to floorpan */
|
|
980
|
+
sdk.on(sdk.Mode.Event.CHANGE_END, (oldMode, newMode) => {
|
|
981
|
+
if (newMode !== sdk.Mode.Mode.FLOORPLAN) {
|
|
982
|
+
sdk.Mode.moveTo(sdk.Mode.Mode.FLOORPLAN, {
|
|
983
|
+
transition: 'transition.instant',
|
|
984
|
+
});
|
|
985
|
+
}
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
catch (_a) {
|
|
989
|
+
console.log('couldnot move to floor');
|
|
990
|
+
}
|
|
991
|
+
}));
|
|
984
992
|
/** We can display the matterport view now */
|
|
985
993
|
this.loading = false;
|
|
986
|
-
}),
|
|
987
|
-
/** When the user try to change the view mode we set it back to floorpan */
|
|
988
|
-
sdk.on(sdk.Mode.Event.CHANGE_END, (oldMode, newMode) => {
|
|
989
|
-
if (newMode !== sdk.Mode.Mode.FLOORPLAN) {
|
|
990
|
-
sdk.Mode.moveTo(sdk.Mode.Mode.FLOORPLAN, {
|
|
991
|
-
transition: "transition.instant",
|
|
992
|
-
});
|
|
993
|
-
}
|
|
994
|
-
});
|
|
994
|
+
}), 1000);
|
|
995
995
|
/** Update current camera pose and rotation */
|
|
996
996
|
sdk.Camera.pose.subscribe((event) => {
|
|
997
997
|
/** We update only if the user is not changing the rotation with the <input> range, to not override the <input> value */
|
|
@@ -1064,15 +1064,15 @@ class CalibrationComponent {
|
|
|
1064
1064
|
if (deltaXPlan === 0) {
|
|
1065
1065
|
// console.log("we moved along Y axis on Plan");
|
|
1066
1066
|
const deltaYPlan = this.secondMarkPlan.y - this.firstMarkPlan.y;
|
|
1067
|
-
this.calibrage.nameYAxis =
|
|
1068
|
-
this.calibrage.nameXAxis =
|
|
1067
|
+
this.calibrage.nameYAxis = 'z';
|
|
1068
|
+
this.calibrage.nameXAxis = 'x';
|
|
1069
1069
|
this.calibrage.offsetY = this.secondMarkPlan.y;
|
|
1070
1070
|
this.calibrage.scaleY = deltaYPlan / deltaZVisit;
|
|
1071
1071
|
}
|
|
1072
1072
|
else {
|
|
1073
1073
|
// console.log(" we moved along X axis on Plan");
|
|
1074
|
-
this.calibrage.nameYAxis =
|
|
1075
|
-
this.calibrage.nameXAxis =
|
|
1074
|
+
this.calibrage.nameYAxis = 'x';
|
|
1075
|
+
this.calibrage.nameXAxis = 'z';
|
|
1076
1076
|
this.calibrage.offsetX = this.secondMarkPlan.x;
|
|
1077
1077
|
this.calibrage.scaleX = deltaXPlan / deltaZVisit;
|
|
1078
1078
|
}
|
|
@@ -1116,21 +1116,13 @@ class CalibrationComponent {
|
|
|
1116
1116
|
if (navigations.length > 0) {
|
|
1117
1117
|
for (const navigation of navigations) {
|
|
1118
1118
|
const testPosition = JSON.parse(navigation.position);
|
|
1119
|
-
const positionX = this.calibrage.nameXAxis ===
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
const
|
|
1123
|
-
? testPosition.x
|
|
1124
|
-
: testPosition.z;
|
|
1125
|
-
const testX = positionX * this.calibrage.scaleX +
|
|
1126
|
-
this.calibrage.offsetX;
|
|
1127
|
-
const testY = positionY * this.calibrage.scaleY +
|
|
1128
|
-
this.calibrage.offsetY;
|
|
1119
|
+
const positionX = this.calibrage.nameXAxis === 'x' ? testPosition.x : testPosition.z;
|
|
1120
|
+
const positionY = this.calibrage.nameYAxis === 'x' ? testPosition.x : testPosition.z;
|
|
1121
|
+
const testX = positionX * this.calibrage.scaleX + this.calibrage.offsetX;
|
|
1122
|
+
const testY = positionY * this.calibrage.scaleY + this.calibrage.offsetY;
|
|
1129
1123
|
// console.log("test position GREEN", testX, testY);
|
|
1130
|
-
const transformedX = (testX - this.calibrage.offsetXPlan) /
|
|
1131
|
-
|
|
1132
|
-
const transformedY = (testY - this.calibrage.offsetYPlan) /
|
|
1133
|
-
this.calibrage.scalePlan;
|
|
1124
|
+
const transformedX = (testX - this.calibrage.offsetXPlan) / this.calibrage.scalePlan; // we are undoing the pan and zoom
|
|
1125
|
+
const transformedY = (testY - this.calibrage.offsetYPlan) / this.calibrage.scalePlan;
|
|
1134
1126
|
this.positions.push({
|
|
1135
1127
|
navID: navigation.id,
|
|
1136
1128
|
planID: this.chosenPlan.id,
|
|
@@ -1139,7 +1131,7 @@ class CalibrationComponent {
|
|
|
1139
1131
|
});
|
|
1140
1132
|
const iconSize = 30 * this.calibrage.scalePlan;
|
|
1141
1133
|
const shift = iconSize / 2;
|
|
1142
|
-
this.drawImage(
|
|
1134
|
+
this.drawImage('https://api.iconify.design/mdi:adjust.svg?color=green&height=30&width=30', transformedX - shift, transformedY - shift, true);
|
|
1143
1135
|
}
|
|
1144
1136
|
}
|
|
1145
1137
|
}
|
|
@@ -1188,12 +1180,8 @@ class CalibrationComponent {
|
|
|
1188
1180
|
})));
|
|
1189
1181
|
}
|
|
1190
1182
|
this.matterportImportService.removeFrame();
|
|
1191
|
-
this.router.navigate([
|
|
1192
|
-
|
|
1193
|
-
this.spaceID,
|
|
1194
|
-
"plans",
|
|
1195
|
-
]);
|
|
1196
|
-
alert(this.translate.instant("calibration.success"));
|
|
1183
|
+
this.router.navigate(['/dashboard/localisation', this.spaceID, 'plans']);
|
|
1184
|
+
alert(this.translate.instant('calibration.success'));
|
|
1197
1185
|
});
|
|
1198
1186
|
}
|
|
1199
1187
|
/** Reset the canvas */
|
|
@@ -1206,12 +1194,8 @@ class CalibrationComponent {
|
|
|
1206
1194
|
/** Cancel, leave */
|
|
1207
1195
|
onCancel() {
|
|
1208
1196
|
this.matterportImportService.removeFrame();
|
|
1209
|
-
this.router.navigate([
|
|
1210
|
-
|
|
1211
|
-
this.spaceID,
|
|
1212
|
-
"plans",
|
|
1213
|
-
]);
|
|
1214
|
-
alert(this.translate.instant("calibration.canceled"));
|
|
1197
|
+
this.router.navigate(['/dashboard/localisation', this.spaceID, 'plans']);
|
|
1198
|
+
alert(this.translate.instant('calibration.canceled'));
|
|
1215
1199
|
}
|
|
1216
1200
|
onFloorClick(floor) {
|
|
1217
1201
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1221,9 +1205,9 @@ class CalibrationComponent {
|
|
|
1221
1205
|
}
|
|
1222
1206
|
onActivateZoomChange() {
|
|
1223
1207
|
this.zoomCanBeChanged = !this.zoomCanBeChanged;
|
|
1224
|
-
const iframe = document.querySelector(
|
|
1208
|
+
const iframe = document.querySelector('#viewer-frame');
|
|
1225
1209
|
if (iframe) {
|
|
1226
|
-
iframe.style.zIndex = this.zoomCanBeChanged ?
|
|
1210
|
+
iframe.style.zIndex = this.zoomCanBeChanged ? '1' : '0';
|
|
1227
1211
|
}
|
|
1228
1212
|
}
|
|
1229
1213
|
}
|
|
@@ -1234,7 +1218,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImpor
|
|
|
1234
1218
|
args: [{ selector: 'lib-calibration', template: "<div class=\"row mt-3\">\r\n <div class=\"col\">\r\n <div class=\"m-3\">\r\n <lib-tab-navigation [menuItems]='menuItems'></lib-tab-navigation>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div id=\"rowCanvas\">\r\n <div #canvasDiv id=\"canvasDiv\">\r\n\r\n <div id=\"viewer-frame\" [style.pointer-events]=\"zoomCanBeChanged?'auto':'none'\">\r\n <!-- <div class=\"blur\"></div> -->\r\n </div>\r\n <canvas id=\"canvas\" [ngStyle]=\"{'opacity': (preview||loading) ? '1' : 'calc(' + opacity + '/ 100)'}\"></canvas>\r\n </div>\r\n\r\n <div class=\"calibration-tools container-fluid\" *ngIf=\"!(preview || loading)\">\r\n <h1>{{'Calibration tool' | translate}}</h1>\r\n <div class=\"tool\">\r\n <div class=\"row ms-0 me-0 legend\">\r\n <div class=\"legend-bar-indicator\" [ngStyle]=\"{'opacity': 'calc(' + (-(opacity-100)+10) + '/ 100)'}\">\r\n {{'Less' | translate}}</div>\r\n <div class=\"legend-title\">{{'Plan Opacity' | translate }}</div>\r\n <div class=\"legend-bar-indicator\" [ngStyle]=\"{'opacity': 'calc(' + (opacity+10) + '/ 100)'}\">{{'More' |\r\n translate}}</div>\r\n </div>\r\n <div class=\"row ms-0 me-0 \">\r\n <input [disabled]=\"false\" [ngModelOptions]=\"{standalone: true}\" [(ngModel)]=\"opacity\" type=\"range\"\r\n class=\"form-range\" min=\"0\" max=\"100\" value=\"50\" id=\"opacity\">\r\n </div>\r\n </div>\r\n <div class=\"tool\">\r\n <div class=\"row ms-0 me-0 \">\r\n <div class=\"label-legend\">{{'Change Visit Floor' | translate}}</div>\r\n <div ngbDropdown class=\"d-inline-block ms-3\">\r\n <button class=\"btn btn-label-file rounded-pill\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n {{currentFloor ? currentFloor.id : ('Floor' | translate) }}</button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <button ngbDropdownItem *ngFor=\"let floor of floors\" (click)=\"onFloorClick(floor)\">\r\n {{ floor.name.length > 0 ? floor.name : ('Floor ' + floor.id) }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <div class=\"tool\">\r\n <div class=\"row ms-0 me-0 \">\r\n <div class=\"tool-checkbox-container\">\r\n <div class=\"tool-checkbox-subcontainer\">\r\n <div class=\"label-legend me-3\">{{'Pan/Zoom Visit' | translate}} {{zoomCanBeChanged ? \"ON\" :\r\n \"OFF\"}}\r\n </div>\r\n <input type=\"checkbox\" (change)=\"onActivateZoomChange()\" style=\"margin-top: 5px;\">\r\n </div>\r\n <div class=\"card border-warning mb-3 mt-3\" *ngIf=\"zoomCanBeChanged\">\r\n <div class=\"card-body text-warning\">\r\n <h5 class=\"card-title\">{{\"calibration.wait-message\" | translate}}</h5>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"action\">\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill\" (click)=\"onPreview()\"\r\n [disabled]=\"zoomCanBeChanged\">{{'Preview' | translate}}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill\" (click)=\"onCancel()\">{{'Cancel' |\r\n translate}}</button>\r\n\r\n </div>\r\n\r\n </div>\r\n <div class=\"calibration-tools container-fluid\" *ngIf=\"preview\">\r\n <h1>{{'Validation' | translate}}</h1>\r\n <div class=\"action\">\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill\" (click)=\"onSave()\">{{'Validate' |\r\n translate}}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill\" (click)=\"onReset()\">{{'Reset' |\r\n translate}}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill\" (click)=\"onCancel()\">{{'Cancel' |\r\n translate}}</button>\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"calibration-tools container-fluid\" *ngIf=\"loading\">\r\n <h3>{{\"Waiting for Matterport\" | translate}}...</h3>\r\n <div class=\"d-flex justify-content-center\">\r\n <div class=\"spinner-border\" role=\"status\">\r\n <span class=\"visually-hidden\">Loading...</span>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</div>", styles: [".button-visit{display:none;height:30px;width:30px;position:absolute;background:url(https://api.iconify.design/mdi:map-marker-check.svg?color=red&height=30) no-repeat scroll 0 0 transparent;border:none}#button-visit-left{left:350px;top:550px}#button-visit-right{left:500px;top:600px}#rowCanvas{display:flex}#canvasDiv{height:100%;width:100%;position:relative}#canvas{width:100%;height:100%;opacity:.5}#viewer-frame{top:0;position:absolute;width:100%;height:100%}.calibration-tools{margin-left:20px;width:400px;background-color:#fff;z-index:11;border:1px solid var(--smarterplan-primary);padding:7px}.form-range{width:100%}.tool{margin-top:20px}.tool .legend{justify-content:space-between;position:relative;margin-bottom:5px}.tool .legend-title{font-size:1.2rem;color:var(--smarterplan-primary);margin:auto;width:100%;font-weight:700;display:flex;justify-content:center}.tool .legend-bar-indicator{width:15%!important}.tool .label-legend{color:var(--smarterplan-primary);font-size:1.1rem;max-width:55%}.tool .tool-checkbox-container{display:flex;flex-direction:column}.tool .tool-checkbox-container .tool-checkbox-subcontainer{display:flex}.blur{width:150px;height:52px;position:absolute;background-color:#1e2023;bottom:0}.symmetry{padding:5px;border:solid 2px;border-radius:10px;color:var(--smarterplan-primary);margin:25px 10px;cursor:pointer}.symmetry:hover{color:var(--smarterplan-primary)}.symmetry-row{justify-content:center}.action{margin-top:30px;display:flex;justify-content:space-evenly}h1{color:var(--smarterplan-primary);text-align:center;margin-bottom:20px}h3{color:var(--smarterplan-primary);text-align:center;margin-bottom:10px}.btn-outline-primary.disabled{background-color:var(--smarterplan-orange)!important}\n"] }]
|
|
1235
1219
|
}], ctorParameters: function () { return [{ type: i2.MatterportImportService }, { type: i2.PlanService }, { type: i1.ActivatedRoute }, { type: i1.Router }, { type: i2.ZoneService }, { type: i2.SpaceService }, { type: i2.NavigationService }, { type: i3.TranslateService }]; }, propDecorators: { canvasDiv: [{
|
|
1236
1220
|
type: ViewChild,
|
|
1237
|
-
args: [
|
|
1221
|
+
args: ['canvasDiv']
|
|
1238
1222
|
}] } });
|
|
1239
1223
|
|
|
1240
1224
|
class PlansComponent {
|
|
@@ -1446,10 +1430,10 @@ class PlansComponent {
|
|
|
1446
1430
|
}
|
|
1447
1431
|
}
|
|
1448
1432
|
PlansComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: PlansComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1.Router }, { token: i2.SpaceService }, { token: i2.PlanService }, { token: i1$2.FormBuilder }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1449
|
-
PlansComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: PlansComponent, selector: "lib-plans", ngImport: i0, template: "<div class=\"container-fluid\" *ngIf=\"currentSpace\" class=\"dashboard-tab\">\n <div class=\"m-3\">\n <lib-tab-navigation [menuItems]='menuItems' (onGoBack)=\"onGoBack()\"></lib-tab-navigation>\n </div>\n <div class=\"d-flex justify-content-center\" *ngIf=\"loading\">\n <div class=\"spinner-border\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n </div>\n <div class=\"mt-3\" *ngIf=\"!plans && !loading\">\n <h4 style=\"font-weight: bold;\">{{'No imported plans' | translate }}</h4>\n <p>{{'For import from 3D visit: go Virtual Visits => Import Images' | translate}}</p>\n </div>\n <div class=\"row ms-1\">\n <div ngbDropdown class=\"d-inline-block me-3\">\n <button class=\"btn btn-label-file rounded-pill\" id=\"dropdownBasic1\" ngbDropdownToggle>{{getChoosenPlan() ?\n getChoosenPlan().name: ('Choose Plan' | translate) }}</button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\n <button ngbDropdownItem *ngFor=\"let plan of plans\" (click)=\"onPlanClick(plan)\">{{plan.name }}\n </button>\n </div>\n </div>\n <div class=\"d-inline-block\" ngbDropdown #myDrop=\"ngbDropdown\">\n <button class=\"btn btn-label-file rounded-pill\" id=\"dropdownManual\" ngbDropdownToggle>{{'Choose action' |\n translate}}</button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownManual\">\n <button (click)=\"onCalibrateClick()\" ngbDropdownItem [disabled]=\"!getChoosenPlan()\">{{'Calibrate' |\n translate}}</button>\n <button (click)=\"onEditClick()\" ngbDropdownItem [disabled]=\"!getChoosenPlan()\">{{'Edit plan' |\n translate}}\n </button>\n <button (click)=\"onUploadClick()\" ngbDropdownItem>{{'Upload new plan' | translate}}</button>\n <button (click)=\"onDownloadClick()\" ngbDropdownItem [disabled]=\"!getChoosenPlan()\">{{'Download plan' |\n translate}}</button>\n <button (click)=\"onRemoveClick()\" ngbDropdownItem\n [disabled]=\"!getChoosenPlan() || getChoosenPlan().isImportedMatterport\">{{'Delete plan' |\n translate}}</button>\n <!-- <button (click)=\"onDownloadAsPng()\" ngbDropdownItem [disabled]=\"!getChoosenPlan()\">\n {{'Download plan as PNG' | translate}}</button> -->\n </div>\n </div>\n </div>\n <div class=\"row mt-3 ms-0\">\n <h4 *ngIf=\"fileToUpload\">{{'New plan' | translate }}</h4>\n <input class=\"hidden\" type=\"file\" id=\"upload-file\" name=\"upload-file\" accept=\"image/png, image/jpeg, .pdf, .svg\"\n ngf-max-size=\"6MB\" (change)=\"addPlan($event.target)\">\n </div>\n <div class=\"col-md-6 mt-3\" *ngIf=\"planForm\">\n <form (ngSubmit)=\"onSavePlan()\" [formGroup]=\"planForm\">\n <div class=\"mb-3 row\">\n <label class=\"col-sm-3\">{{'Name' | translate}} </label>\n <div class=\"col-sm-9\">\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\n </div>\n </div>\n <div class=\"mb-3 row\">\n <label class=\"col-sm-3\">{{'Zone' | translate}} </label>\n <div class=\"col-sm-9\">\n <select class=\"form-control\" formControlName=\"zoneID\">\n <option *ngFor=\"let zone of zones\" [ngValue]=\"zone.id\">\n {{ zone.name }}\n </option>\n </select>\n </div>\n </div>\n <div class=\"mb-3 row\">\n <label class=\"col-sm-3\">{{'Set as current plan for zone' | translate}}</label>\n <div class=\"col-sm-3\">\n <input type=\"checkbox\" [(ngModel)]=\"isCurrentPlanForZone\" [ngModelOptions]=\"{standalone: true}\">\n </div>\n </div>\n <button [disabled]=\"planForm.invalid\" type='submit' class=\"btn btn-label-file rounded-pill\">{{'Save' |\n translate}}</button>\n <button class=\"btn btn-label-file rounded-pill ms-3\" type=\"button\" (click)=\"onCancelUpload()\">{{'Cancel' |\n translate}}</button>\n </form>\n </div>\n <ul class=\"col-md-6 list-group list-group-flush\" *ngIf=\"getChoosenPlan()\">\n <li class=\"list-group-item bg-transparent\">{{'Name' | translate }} : {{getChoosenPlan().name}} </li>\n <li class=\"list-group-item bg-transparent\"> {{'Plan is ' | translate }} :\n {{getChoosenPlan().calibration ? ('Calibrated' | translate) : ('Not calibrated' | translate)}}</li>\n <li class=\"list-group-item bg-transparent\">{{'Attributed to zone ' | translate }} :\n {{getChoosenPlan().zone ? getChoosenPlan().zone.name : 'None'}}</li>\n <li class=\"list-group-item bg-transparent\">{{'Is current plan for zone ' | translate }} :\n <input type=\"checkbox\" [(ngModel)]=\"getChoosenPlan().isCurrentForZone\" (change)=\"onCurrentPlanClick()\">\n </li>\n\n </ul>\n\n <div class=\"row mt-4\">\n <div class=\"col-md-10\">\n <embed *ngIf=\"getChoosenPlan() && chosenPlanIsPdf\" [src]=\"getChoosenPlan().filepath | safeUrl\"\n type=\"application/pdf\" frameBorder=\"0\" scrolling=\"auto\" height=\"650px;\" width=\"100%\" />\n <div *ngIf=\"!chosenPlanIsPdf\" class=\"row\" style=\"height: 500px; overflow: hidden;\" id=\"canvasDiv\">\n <canvas id=\"canvas\" width=\"4096px\" height=\"4096px\">\n <!-- <img *ngIf=\"chosenPlan\" id=\"plan-image\" [src]=\"chosenPlan.filepath\" style=\"width: 100%;\"> -->\n </canvas>\n\n </div>\n </div>\n </div>\n</div>\n", styles: [".button-visit{display:none;height:30px;width:30px;position:absolute;background:url(https://api.iconify.design/mdi:map-marker-check.svg?color=red&height=30) no-repeat scroll 0 0 transparent;border:none}#button-visit-left{left:350px;top:550px}#button-visit-right{left:500px;top:600px}.hidden{visibility:hidden;width:1px;height:1px}\n"], components: [{ type: TabNavigationComponent, selector: "lib-tab-navigation", inputs: ["menuItems"], outputs: ["onGoBack"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { type: i7.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { type: i7.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1$2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i3.TranslatePipe, "safeUrl": i2.SafeUrlPipe } });
|
|
1433
|
+
PlansComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: PlansComponent, selector: "lib-plans", ngImport: i0, template: "<div class=\"container-fluid\" *ngIf=\"currentSpace\" class=\"dashboard-tab\">\r\n <div class=\"m-3\">\r\n <lib-tab-navigation [menuItems]='menuItems' (onGoBack)=\"onGoBack()\"></lib-tab-navigation>\r\n </div>\r\n <div class=\"d-flex justify-content-center\" *ngIf=\"loading\">\r\n <div class=\"spinner-border\" role=\"status\">\r\n <span class=\"visually-hidden\">Loading...</span>\r\n </div>\r\n </div>\r\n <div class=\"mt-3\" *ngIf=\"!plans && !loading\">\r\n <h4 style=\"font-weight: bold;\">{{'No imported plans' | translate }}</h4>\r\n <p>{{'For import from 3D visit: go Virtual Visits => Import Images' | translate}}</p>\r\n </div>\r\n <div class=\"row ms-1\">\r\n <div ngbDropdown class=\"d-inline-block me-3\">\r\n <button class=\"btn btn-label-file rounded-pill\" id=\"dropdownBasic1\" ngbDropdownToggle>{{getChoosenPlan() ?\r\n getChoosenPlan().name: ('Choose Plan' | translate) }}</button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <button ngbDropdownItem *ngFor=\"let plan of plans\" (click)=\"onPlanClick(plan)\">{{plan.name }}\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"d-inline-block\" ngbDropdown #myDrop=\"ngbDropdown\">\r\n <button class=\"btn btn-label-file rounded-pill\" id=\"dropdownManual\" ngbDropdownToggle>{{'Choose action' |\r\n translate}}</button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownManual\">\r\n <button (click)=\"onCalibrateClick()\" ngbDropdownItem [disabled]=\"!getChoosenPlan()\">{{'Calibrate' |\r\n translate}}</button>\r\n <button (click)=\"onEditClick()\" ngbDropdownItem [disabled]=\"!getChoosenPlan()\">{{'Edit plan' |\r\n translate}}\r\n </button>\r\n <button (click)=\"onUploadClick()\" ngbDropdownItem>{{'Upload new plan' | translate}}</button>\r\n <button (click)=\"onDownloadClick()\" ngbDropdownItem [disabled]=\"!getChoosenPlan()\">{{'Download plan' |\r\n translate}}</button>\r\n <button (click)=\"onRemoveClick()\" ngbDropdownItem\r\n [disabled]=\"!getChoosenPlan() || getChoosenPlan().isImportedMatterport\">{{'Delete plan' |\r\n translate}}</button>\r\n <!-- <button (click)=\"onDownloadAsPng()\" ngbDropdownItem [disabled]=\"!getChoosenPlan()\">\r\n {{'Download plan as PNG' | translate}}</button> -->\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-3 ms-0\">\r\n <h4 *ngIf=\"fileToUpload\">{{'New plan' | translate }}</h4>\r\n <input class=\"hidden\" type=\"file\" id=\"upload-file\" name=\"upload-file\" accept=\"image/png, image/jpeg, .pdf, .svg\"\r\n ngf-max-size=\"6MB\" (change)=\"addPlan($event.target)\">\r\n </div>\r\n <div class=\"col-md-6 mt-3\" *ngIf=\"planForm\">\r\n <form (ngSubmit)=\"onSavePlan()\" [formGroup]=\"planForm\">\r\n <div class=\"mb-3 row\">\r\n <label class=\"col-sm-3\">{{'Name' | translate}} </label>\r\n <div class=\"col-sm-9\">\r\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\r\n </div>\r\n </div>\r\n <div class=\"mb-3 row\">\r\n <label class=\"col-sm-3\">{{'Zone' | translate}} </label>\r\n <div class=\"col-sm-9\">\r\n <select class=\"form-control\" formControlName=\"zoneID\">\r\n <option *ngFor=\"let zone of zones\" [ngValue]=\"zone.id\">\r\n {{ zone.name }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class=\"mb-3 row\">\r\n <label class=\"col-sm-3\">{{'Set as current plan for zone' | translate}}</label>\r\n <div class=\"col-sm-3\">\r\n <input type=\"checkbox\" [(ngModel)]=\"isCurrentPlanForZone\" [ngModelOptions]=\"{standalone: true}\">\r\n </div>\r\n </div>\r\n <button [disabled]=\"planForm.invalid\" type='submit' class=\"btn btn-label-file rounded-pill\">{{'Save' |\r\n translate}}</button>\r\n <button class=\"btn btn-label-file rounded-pill ms-3\" type=\"button\" (click)=\"onCancelUpload()\">{{'Cancel' |\r\n translate}}</button>\r\n </form>\r\n </div>\r\n <ul class=\"col-md-6 list-group list-group-flush\" *ngIf=\"getChoosenPlan()\">\r\n <li class=\"list-group-item bg-transparent\">{{'Name' | translate }} : {{getChoosenPlan().name}} </li>\r\n <li class=\"list-group-item bg-transparent\"> {{'Plan is ' | translate }} :\r\n {{getChoosenPlan().calibration ? ('Calibrated' | translate) : ('Not calibrated' | translate)}}</li>\r\n <li class=\"list-group-item bg-transparent\">{{'Attributed to zone ' | translate }} :\r\n {{getChoosenPlan().zone ? getChoosenPlan().zone.name : 'None'}}</li>\r\n <li class=\"list-group-item bg-transparent\">{{'Is current plan for zone ' | translate }} :\r\n <input type=\"checkbox\" [(ngModel)]=\"getChoosenPlan().isCurrentForZone\" (change)=\"onCurrentPlanClick()\">\r\n </li>\r\n\r\n </ul>\r\n\r\n <div class=\"row mt-4\">\r\n <div class=\"col-md-10\">\r\n <embed *ngIf=\"getChoosenPlan() && chosenPlanIsPdf\" [src]=\"getChoosenPlan().filepath | safeUrl\"\r\n type=\"application/pdf\" frameBorder=\"0\" scrolling=\"auto\" height=\"650px;\" width=\"100%\" />\r\n <div *ngIf=\"!chosenPlanIsPdf\" class=\"row\" style=\"height: 500px; overflow: hidden;\" id=\"canvasDiv\">\r\n <canvas id=\"canvas\" width=\"4096px\" height=\"4096px\">\r\n <!-- <img *ngIf=\"chosenPlan\" id=\"plan-image\" [src]=\"chosenPlan.filepath\" style=\"width: 100%;\"> -->\r\n </canvas>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".button-visit{display:none;height:30px;width:30px;position:absolute;background:url(https://api.iconify.design/mdi:map-marker-check.svg?color=red&height=30) no-repeat scroll 0 0 transparent;border:none}#button-visit-left{left:350px;top:550px}#button-visit-right{left:500px;top:600px}.hidden{visibility:hidden;width:1px;height:1px}\n"], components: [{ type: TabNavigationComponent, selector: "lib-tab-navigation", inputs: ["menuItems"], outputs: ["onGoBack"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { type: i7.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { type: i7.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1$2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i3.TranslatePipe, "safeUrl": i2.SafeUrlPipe } });
|
|
1450
1434
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: PlansComponent, decorators: [{
|
|
1451
1435
|
type: Component,
|
|
1452
|
-
args: [{ selector: 'lib-plans', template: "<div class=\"container-fluid\" *ngIf=\"currentSpace\" class=\"dashboard-tab\">\n <div class=\"m-3\">\n <lib-tab-navigation [menuItems]='menuItems' (onGoBack)=\"onGoBack()\"></lib-tab-navigation>\n </div>\n <div class=\"d-flex justify-content-center\" *ngIf=\"loading\">\n <div class=\"spinner-border\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n </div>\n <div class=\"mt-3\" *ngIf=\"!plans && !loading\">\n <h4 style=\"font-weight: bold;\">{{'No imported plans' | translate }}</h4>\n <p>{{'For import from 3D visit: go Virtual Visits => Import Images' | translate}}</p>\n </div>\n <div class=\"row ms-1\">\n <div ngbDropdown class=\"d-inline-block me-3\">\n <button class=\"btn btn-label-file rounded-pill\" id=\"dropdownBasic1\" ngbDropdownToggle>{{getChoosenPlan() ?\n getChoosenPlan().name: ('Choose Plan' | translate) }}</button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\n <button ngbDropdownItem *ngFor=\"let plan of plans\" (click)=\"onPlanClick(plan)\">{{plan.name }}\n </button>\n </div>\n </div>\n <div class=\"d-inline-block\" ngbDropdown #myDrop=\"ngbDropdown\">\n <button class=\"btn btn-label-file rounded-pill\" id=\"dropdownManual\" ngbDropdownToggle>{{'Choose action' |\n translate}}</button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownManual\">\n <button (click)=\"onCalibrateClick()\" ngbDropdownItem [disabled]=\"!getChoosenPlan()\">{{'Calibrate' |\n translate}}</button>\n <button (click)=\"onEditClick()\" ngbDropdownItem [disabled]=\"!getChoosenPlan()\">{{'Edit plan' |\n translate}}\n </button>\n <button (click)=\"onUploadClick()\" ngbDropdownItem>{{'Upload new plan' | translate}}</button>\n <button (click)=\"onDownloadClick()\" ngbDropdownItem [disabled]=\"!getChoosenPlan()\">{{'Download plan' |\n translate}}</button>\n <button (click)=\"onRemoveClick()\" ngbDropdownItem\n [disabled]=\"!getChoosenPlan() || getChoosenPlan().isImportedMatterport\">{{'Delete plan' |\n translate}}</button>\n <!-- <button (click)=\"onDownloadAsPng()\" ngbDropdownItem [disabled]=\"!getChoosenPlan()\">\n {{'Download plan as PNG' | translate}}</button> -->\n </div>\n </div>\n </div>\n <div class=\"row mt-3 ms-0\">\n <h4 *ngIf=\"fileToUpload\">{{'New plan' | translate }}</h4>\n <input class=\"hidden\" type=\"file\" id=\"upload-file\" name=\"upload-file\" accept=\"image/png, image/jpeg, .pdf, .svg\"\n ngf-max-size=\"6MB\" (change)=\"addPlan($event.target)\">\n </div>\n <div class=\"col-md-6 mt-3\" *ngIf=\"planForm\">\n <form (ngSubmit)=\"onSavePlan()\" [formGroup]=\"planForm\">\n <div class=\"mb-3 row\">\n <label class=\"col-sm-3\">{{'Name' | translate}} </label>\n <div class=\"col-sm-9\">\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\n </div>\n </div>\n <div class=\"mb-3 row\">\n <label class=\"col-sm-3\">{{'Zone' | translate}} </label>\n <div class=\"col-sm-9\">\n <select class=\"form-control\" formControlName=\"zoneID\">\n <option *ngFor=\"let zone of zones\" [ngValue]=\"zone.id\">\n {{ zone.name }}\n </option>\n </select>\n </div>\n </div>\n <div class=\"mb-3 row\">\n <label class=\"col-sm-3\">{{'Set as current plan for zone' | translate}}</label>\n <div class=\"col-sm-3\">\n <input type=\"checkbox\" [(ngModel)]=\"isCurrentPlanForZone\" [ngModelOptions]=\"{standalone: true}\">\n </div>\n </div>\n <button [disabled]=\"planForm.invalid\" type='submit' class=\"btn btn-label-file rounded-pill\">{{'Save' |\n translate}}</button>\n <button class=\"btn btn-label-file rounded-pill ms-3\" type=\"button\" (click)=\"onCancelUpload()\">{{'Cancel' |\n translate}}</button>\n </form>\n </div>\n <ul class=\"col-md-6 list-group list-group-flush\" *ngIf=\"getChoosenPlan()\">\n <li class=\"list-group-item bg-transparent\">{{'Name' | translate }} : {{getChoosenPlan().name}} </li>\n <li class=\"list-group-item bg-transparent\"> {{'Plan is ' | translate }} :\n {{getChoosenPlan().calibration ? ('Calibrated' | translate) : ('Not calibrated' | translate)}}</li>\n <li class=\"list-group-item bg-transparent\">{{'Attributed to zone ' | translate }} :\n {{getChoosenPlan().zone ? getChoosenPlan().zone.name : 'None'}}</li>\n <li class=\"list-group-item bg-transparent\">{{'Is current plan for zone ' | translate }} :\n <input type=\"checkbox\" [(ngModel)]=\"getChoosenPlan().isCurrentForZone\" (change)=\"onCurrentPlanClick()\">\n </li>\n\n </ul>\n\n <div class=\"row mt-4\">\n <div class=\"col-md-10\">\n <embed *ngIf=\"getChoosenPlan() && chosenPlanIsPdf\" [src]=\"getChoosenPlan().filepath | safeUrl\"\n type=\"application/pdf\" frameBorder=\"0\" scrolling=\"auto\" height=\"650px;\" width=\"100%\" />\n <div *ngIf=\"!chosenPlanIsPdf\" class=\"row\" style=\"height: 500px; overflow: hidden;\" id=\"canvasDiv\">\n <canvas id=\"canvas\" width=\"4096px\" height=\"4096px\">\n <!-- <img *ngIf=\"chosenPlan\" id=\"plan-image\" [src]=\"chosenPlan.filepath\" style=\"width: 100%;\"> -->\n </canvas>\n\n </div>\n </div>\n </div>\n</div>\n", styles: [".button-visit{display:none;height:30px;width:30px;position:absolute;background:url(https://api.iconify.design/mdi:map-marker-check.svg?color=red&height=30) no-repeat scroll 0 0 transparent;border:none}#button-visit-left{left:350px;top:550px}#button-visit-right{left:500px;top:600px}.hidden{visibility:hidden;width:1px;height:1px}\n"] }]
|
|
1436
|
+
args: [{ selector: 'lib-plans', template: "<div class=\"container-fluid\" *ngIf=\"currentSpace\" class=\"dashboard-tab\">\r\n <div class=\"m-3\">\r\n <lib-tab-navigation [menuItems]='menuItems' (onGoBack)=\"onGoBack()\"></lib-tab-navigation>\r\n </div>\r\n <div class=\"d-flex justify-content-center\" *ngIf=\"loading\">\r\n <div class=\"spinner-border\" role=\"status\">\r\n <span class=\"visually-hidden\">Loading...</span>\r\n </div>\r\n </div>\r\n <div class=\"mt-3\" *ngIf=\"!plans && !loading\">\r\n <h4 style=\"font-weight: bold;\">{{'No imported plans' | translate }}</h4>\r\n <p>{{'For import from 3D visit: go Virtual Visits => Import Images' | translate}}</p>\r\n </div>\r\n <div class=\"row ms-1\">\r\n <div ngbDropdown class=\"d-inline-block me-3\">\r\n <button class=\"btn btn-label-file rounded-pill\" id=\"dropdownBasic1\" ngbDropdownToggle>{{getChoosenPlan() ?\r\n getChoosenPlan().name: ('Choose Plan' | translate) }}</button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <button ngbDropdownItem *ngFor=\"let plan of plans\" (click)=\"onPlanClick(plan)\">{{plan.name }}\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"d-inline-block\" ngbDropdown #myDrop=\"ngbDropdown\">\r\n <button class=\"btn btn-label-file rounded-pill\" id=\"dropdownManual\" ngbDropdownToggle>{{'Choose action' |\r\n translate}}</button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownManual\">\r\n <button (click)=\"onCalibrateClick()\" ngbDropdownItem [disabled]=\"!getChoosenPlan()\">{{'Calibrate' |\r\n translate}}</button>\r\n <button (click)=\"onEditClick()\" ngbDropdownItem [disabled]=\"!getChoosenPlan()\">{{'Edit plan' |\r\n translate}}\r\n </button>\r\n <button (click)=\"onUploadClick()\" ngbDropdownItem>{{'Upload new plan' | translate}}</button>\r\n <button (click)=\"onDownloadClick()\" ngbDropdownItem [disabled]=\"!getChoosenPlan()\">{{'Download plan' |\r\n translate}}</button>\r\n <button (click)=\"onRemoveClick()\" ngbDropdownItem\r\n [disabled]=\"!getChoosenPlan() || getChoosenPlan().isImportedMatterport\">{{'Delete plan' |\r\n translate}}</button>\r\n <!-- <button (click)=\"onDownloadAsPng()\" ngbDropdownItem [disabled]=\"!getChoosenPlan()\">\r\n {{'Download plan as PNG' | translate}}</button> -->\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-3 ms-0\">\r\n <h4 *ngIf=\"fileToUpload\">{{'New plan' | translate }}</h4>\r\n <input class=\"hidden\" type=\"file\" id=\"upload-file\" name=\"upload-file\" accept=\"image/png, image/jpeg, .pdf, .svg\"\r\n ngf-max-size=\"6MB\" (change)=\"addPlan($event.target)\">\r\n </div>\r\n <div class=\"col-md-6 mt-3\" *ngIf=\"planForm\">\r\n <form (ngSubmit)=\"onSavePlan()\" [formGroup]=\"planForm\">\r\n <div class=\"mb-3 row\">\r\n <label class=\"col-sm-3\">{{'Name' | translate}} </label>\r\n <div class=\"col-sm-9\">\r\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\r\n </div>\r\n </div>\r\n <div class=\"mb-3 row\">\r\n <label class=\"col-sm-3\">{{'Zone' | translate}} </label>\r\n <div class=\"col-sm-9\">\r\n <select class=\"form-control\" formControlName=\"zoneID\">\r\n <option *ngFor=\"let zone of zones\" [ngValue]=\"zone.id\">\r\n {{ zone.name }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class=\"mb-3 row\">\r\n <label class=\"col-sm-3\">{{'Set as current plan for zone' | translate}}</label>\r\n <div class=\"col-sm-3\">\r\n <input type=\"checkbox\" [(ngModel)]=\"isCurrentPlanForZone\" [ngModelOptions]=\"{standalone: true}\">\r\n </div>\r\n </div>\r\n <button [disabled]=\"planForm.invalid\" type='submit' class=\"btn btn-label-file rounded-pill\">{{'Save' |\r\n translate}}</button>\r\n <button class=\"btn btn-label-file rounded-pill ms-3\" type=\"button\" (click)=\"onCancelUpload()\">{{'Cancel' |\r\n translate}}</button>\r\n </form>\r\n </div>\r\n <ul class=\"col-md-6 list-group list-group-flush\" *ngIf=\"getChoosenPlan()\">\r\n <li class=\"list-group-item bg-transparent\">{{'Name' | translate }} : {{getChoosenPlan().name}} </li>\r\n <li class=\"list-group-item bg-transparent\"> {{'Plan is ' | translate }} :\r\n {{getChoosenPlan().calibration ? ('Calibrated' | translate) : ('Not calibrated' | translate)}}</li>\r\n <li class=\"list-group-item bg-transparent\">{{'Attributed to zone ' | translate }} :\r\n {{getChoosenPlan().zone ? getChoosenPlan().zone.name : 'None'}}</li>\r\n <li class=\"list-group-item bg-transparent\">{{'Is current plan for zone ' | translate }} :\r\n <input type=\"checkbox\" [(ngModel)]=\"getChoosenPlan().isCurrentForZone\" (change)=\"onCurrentPlanClick()\">\r\n </li>\r\n\r\n </ul>\r\n\r\n <div class=\"row mt-4\">\r\n <div class=\"col-md-10\">\r\n <embed *ngIf=\"getChoosenPlan() && chosenPlanIsPdf\" [src]=\"getChoosenPlan().filepath | safeUrl\"\r\n type=\"application/pdf\" frameBorder=\"0\" scrolling=\"auto\" height=\"650px;\" width=\"100%\" />\r\n <div *ngIf=\"!chosenPlanIsPdf\" class=\"row\" style=\"height: 500px; overflow: hidden;\" id=\"canvasDiv\">\r\n <canvas id=\"canvas\" width=\"4096px\" height=\"4096px\">\r\n <!-- <img *ngIf=\"chosenPlan\" id=\"plan-image\" [src]=\"chosenPlan.filepath\" style=\"width: 100%;\"> -->\r\n </canvas>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".button-visit{display:none;height:30px;width:30px;position:absolute;background:url(https://api.iconify.design/mdi:map-marker-check.svg?color=red&height=30) no-repeat scroll 0 0 transparent;border:none}#button-visit-left{left:350px;top:550px}#button-visit-right{left:500px;top:600px}.hidden{visibility:hidden;width:1px;height:1px}\n"] }]
|
|
1453
1437
|
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: i2.SpaceService }, { type: i2.PlanService }, { type: i1$2.FormBuilder }, { type: i3.TranslateService }]; } });
|
|
1454
1438
|
|
|
1455
1439
|
class ChevronComponent {
|
|
@@ -1460,10 +1444,10 @@ class ChevronComponent {
|
|
|
1460
1444
|
}
|
|
1461
1445
|
}
|
|
1462
1446
|
ChevronComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ChevronComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1463
|
-
ChevronComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: ChevronComponent, selector: "lib-chevron", inputs: { conditionShowing: "conditionShowing" }, ngImport: i0, template: "<div style=\"height: 30px; width: 30px;\">\n <span class=\"icon-container\" >\n <div [class]=\"conditionShowing ? 'icon-img-up' : 'icon-img-down'\"></div>\n </span>\n</div>\n", styles: [".icon-container{height:30px;width:30px}.icon-img-down{width:30px;height:100%;background:url(https://api.iconify.design/mdi-light/chevron-right.svg?width=28) no-repeat center center/contain}.icon-img-up{width:30px;height:100%;background:url(https://api.iconify.design/mdi-light/chevron-down.svg?width=28) no-repeat center center/contain}\n"] });
|
|
1447
|
+
ChevronComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: ChevronComponent, selector: "lib-chevron", inputs: { conditionShowing: "conditionShowing" }, ngImport: i0, template: "<div style=\"height: 30px; width: 30px;\">\r\n <span class=\"icon-container\" >\r\n <div [class]=\"conditionShowing ? 'icon-img-up' : 'icon-img-down'\"></div>\r\n </span>\r\n</div>\r\n", styles: [".icon-container{height:30px;width:30px}.icon-img-down{width:30px;height:100%;background:url(https://api.iconify.design/mdi-light/chevron-right.svg?width=28) no-repeat center center/contain}.icon-img-up{width:30px;height:100%;background:url(https://api.iconify.design/mdi-light/chevron-down.svg?width=28) no-repeat center center/contain}\n"] });
|
|
1464
1448
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ChevronComponent, decorators: [{
|
|
1465
1449
|
type: Component,
|
|
1466
|
-
args: [{ selector: 'lib-chevron', template: "<div style=\"height: 30px; width: 30px;\">\n <span class=\"icon-container\" >\n <div [class]=\"conditionShowing ? 'icon-img-up' : 'icon-img-down'\"></div>\n </span>\n</div>\n", styles: [".icon-container{height:30px;width:30px}.icon-img-down{width:30px;height:100%;background:url(https://api.iconify.design/mdi-light/chevron-right.svg?width=28) no-repeat center center/contain}.icon-img-up{width:30px;height:100%;background:url(https://api.iconify.design/mdi-light/chevron-down.svg?width=28) no-repeat center center/contain}\n"] }]
|
|
1450
|
+
args: [{ selector: 'lib-chevron', template: "<div style=\"height: 30px; width: 30px;\">\r\n <span class=\"icon-container\" >\r\n <div [class]=\"conditionShowing ? 'icon-img-up' : 'icon-img-down'\"></div>\r\n </span>\r\n</div>\r\n", styles: [".icon-container{height:30px;width:30px}.icon-img-down{width:30px;height:100%;background:url(https://api.iconify.design/mdi-light/chevron-right.svg?width=28) no-repeat center center/contain}.icon-img-up{width:30px;height:100%;background:url(https://api.iconify.design/mdi-light/chevron-down.svg?width=28) no-repeat center center/contain}\n"] }]
|
|
1467
1451
|
}], ctorParameters: function () { return []; }, propDecorators: { conditionShowing: [{
|
|
1468
1452
|
type: Input
|
|
1469
1453
|
}] } });
|
|
@@ -1712,10 +1696,10 @@ class CarouselComponent {
|
|
|
1712
1696
|
}
|
|
1713
1697
|
}
|
|
1714
1698
|
CarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1715
|
-
CarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: CarouselComponent, selector: "lib-carousel", inputs: { images: "images" }, outputs: { currentScan: "currentScan" }, ngImport: i0, template: "<ngb-carousel [interval]=\"5000\" *ngIf=\"images && images.length > 1\" (slide)=\"onSlide($event)\">\n <ng-template *ngFor=\"let image of images; let i = index\" ngbSlide [id]=\"'slideId_' + i\">\n <div class=\"picsum-img-wrapper\">\n <img [src]=\"image.path\" alt=\"Scan\" class=\"d-block w-100\">\n </div>\n <div class=\"carousel-caption\">\n <h3>{{image.title}}</h3>\n <p>{{image.description}}</p>\n </div>\n </ng-template>\n</ngb-carousel>\n\n<img *ngIf=\"images.length === 1\" [src]=\"images[0].path\" alt=\"Scan\" class=\"d-block w-100\">\n", styles: [""], components: [{ type: i7.NgbCarousel, selector: "ngb-carousel", inputs: ["animation", "activeId", "interval", "wrap", "keyboard", "pauseOnHover", "pauseOnFocus", "showNavigationArrows", "showNavigationIndicators"], outputs: ["slide", "slid"], exportAs: ["ngbCarousel"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.NgbSlide, selector: "ng-template[ngbSlide]", inputs: ["id"], outputs: ["slid"] }] });
|
|
1699
|
+
CarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: CarouselComponent, selector: "lib-carousel", inputs: { images: "images" }, outputs: { currentScan: "currentScan" }, ngImport: i0, template: "<ngb-carousel [interval]=\"5000\" *ngIf=\"images && images.length > 1\" (slide)=\"onSlide($event)\">\r\n <ng-template *ngFor=\"let image of images; let i = index\" ngbSlide [id]=\"'slideId_' + i\">\r\n <div class=\"picsum-img-wrapper\">\r\n <img [src]=\"image.path\" alt=\"Scan\" class=\"d-block w-100\">\r\n </div>\r\n <div class=\"carousel-caption\">\r\n <h3>{{image.title}}</h3>\r\n <p>{{image.description}}</p>\r\n </div>\r\n </ng-template>\r\n</ngb-carousel>\r\n\r\n<img *ngIf=\"images.length === 1\" [src]=\"images[0].path\" alt=\"Scan\" class=\"d-block w-100\">\r\n", styles: [""], components: [{ type: i7.NgbCarousel, selector: "ngb-carousel", inputs: ["animation", "activeId", "interval", "wrap", "keyboard", "pauseOnHover", "pauseOnFocus", "showNavigationArrows", "showNavigationIndicators"], outputs: ["slide", "slid"], exportAs: ["ngbCarousel"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.NgbSlide, selector: "ng-template[ngbSlide]", inputs: ["id"], outputs: ["slid"] }] });
|
|
1716
1700
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselComponent, decorators: [{
|
|
1717
1701
|
type: Component,
|
|
1718
|
-
args: [{ selector: 'lib-carousel', template: "<ngb-carousel [interval]=\"5000\" *ngIf=\"images && images.length > 1\" (slide)=\"onSlide($event)\">\n <ng-template *ngFor=\"let image of images; let i = index\" ngbSlide [id]=\"'slideId_' + i\">\n <div class=\"picsum-img-wrapper\">\n <img [src]=\"image.path\" alt=\"Scan\" class=\"d-block w-100\">\n </div>\n <div class=\"carousel-caption\">\n <h3>{{image.title}}</h3>\n <p>{{image.description}}</p>\n </div>\n </ng-template>\n</ngb-carousel>\n\n<img *ngIf=\"images.length === 1\" [src]=\"images[0].path\" alt=\"Scan\" class=\"d-block w-100\">\n", styles: [""] }]
|
|
1702
|
+
args: [{ selector: 'lib-carousel', template: "<ngb-carousel [interval]=\"5000\" *ngIf=\"images && images.length > 1\" (slide)=\"onSlide($event)\">\r\n <ng-template *ngFor=\"let image of images; let i = index\" ngbSlide [id]=\"'slideId_' + i\">\r\n <div class=\"picsum-img-wrapper\">\r\n <img [src]=\"image.path\" alt=\"Scan\" class=\"d-block w-100\">\r\n </div>\r\n <div class=\"carousel-caption\">\r\n <h3>{{image.title}}</h3>\r\n <p>{{image.description}}</p>\r\n </div>\r\n </ng-template>\r\n</ngb-carousel>\r\n\r\n<img *ngIf=\"images.length === 1\" [src]=\"images[0].path\" alt=\"Scan\" class=\"d-block w-100\">\r\n", styles: [""] }]
|
|
1719
1703
|
}], ctorParameters: function () { return []; }, propDecorators: { images: [{
|
|
1720
1704
|
type: Input
|
|
1721
1705
|
}], currentScan: [{
|
|
@@ -1892,10 +1876,10 @@ class SelectionComponent {
|
|
|
1892
1876
|
}
|
|
1893
1877
|
}
|
|
1894
1878
|
SelectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SelectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1895
|
-
SelectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SelectionComponent, selector: "lib-selection", outputs: { onSelectionChanged: "onSelectionChanged" }, ngImport: i0, template: "<ng-content></ng-content>\n\n<div id=\"selection\"></div>", styles: ["#selection{will-change:top,left,width,height;top:0px;left:0px;position:fixed;display:block;margin-top:0;margin-left:0;width:0px;height:0px;background:rgba(83,182,187,.3);border-radius:.15em;border:.15em solid rgba(83,182,187,.8);pointer-events:none}\n"] });
|
|
1879
|
+
SelectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SelectionComponent, selector: "lib-selection", outputs: { onSelectionChanged: "onSelectionChanged" }, ngImport: i0, template: "<ng-content></ng-content>\r\n\r\n<div id=\"selection\"></div>", styles: ["#selection{will-change:top,left,width,height;top:0px;left:0px;position:fixed;display:block;margin-top:0;margin-left:0;width:0px;height:0px;background:rgba(83,182,187,.3);border-radius:.15em;border:.15em solid rgba(83,182,187,.8);pointer-events:none}\n"] });
|
|
1896
1880
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SelectionComponent, decorators: [{
|
|
1897
1881
|
type: Component,
|
|
1898
|
-
args: [{ selector: 'lib-selection', template: "<ng-content></ng-content>\n\n<div id=\"selection\"></div>", styles: ["#selection{will-change:top,left,width,height;top:0px;left:0px;position:fixed;display:block;margin-top:0;margin-left:0;width:0px;height:0px;background:rgba(83,182,187,.3);border-radius:.15em;border:.15em solid rgba(83,182,187,.8);pointer-events:none}\n"] }]
|
|
1882
|
+
args: [{ selector: 'lib-selection', template: "<ng-content></ng-content>\r\n\r\n<div id=\"selection\"></div>", styles: ["#selection{will-change:top,left,width,height;top:0px;left:0px;position:fixed;display:block;margin-top:0;margin-left:0;width:0px;height:0px;background:rgba(83,182,187,.3);border-radius:.15em;border:.15em solid rgba(83,182,187,.8);pointer-events:none}\n"] }]
|
|
1899
1883
|
}], ctorParameters: function () { return []; }, propDecorators: { onSelectionChanged: [{
|
|
1900
1884
|
type: Output
|
|
1901
1885
|
}] } });
|
|
@@ -3056,10 +3040,10 @@ class ImagesComponent {
|
|
|
3056
3040
|
}
|
|
3057
3041
|
}
|
|
3058
3042
|
ImagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ImagesComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2.SpaceService }, { token: i2.VisitService }, { token: i2.NodeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3059
|
-
ImagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: ImagesComponent, selector: "lib-images", ngImport: i0, template: "<div class=\"container-fluid dashboard-tab col-sm-10 mb-3\" *ngIf=\"currentSpace\" >\n <div class=\"m-3\">\n <lib-tab-navigation [menuItems]='menuItems' (onGoBack)=\"onGoBack()\"></lib-tab-navigation>\n </div>\n <div class=\"d-flex justify-content-center\" *ngIf=\"loading\">\n <div class=\"spinner-border\" role=\"status\">\n <span class=\"visually-hidden\">{{'Loading' | translate}}...</span>\n </div>\n </div>\n <div ngbDropdown class=\"d-inline-block\" *ngIf=\"currentSpace.visits && currentSpace.visits.length > 0\">\n <button class=\"btn btn-label-file rounded-pill\" id=\"dropdownBasic1\" *ngIf=\"!currentVisit\"\n ngbDropdownToggle>{{'Choose 3D visit' | translate}}</button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\n <button ngbDropdownItem *ngFor=\"let visit of currentSpace.visits\" (click)=\"setVisit(visit)\"> {{ visit.name }}\n </button>\n </div>\n </div>\n <h3 *ngIf=\"currentVisit\">{{ currentVisit.name }}</h3>\n <div class=\"mt-3\" *ngIf=\"currentVisit && currentImages.length == 0 && !loading\">\n <h4>{{'No imported images' | translate }}</h4>\n <p>{{'For import: go Virtual Visits => Import Images' | translate}}</p>\n </div>\n <button *ngIf=\"currentVisit && currentImages.length > 0 && !loading\"\n class=\"btn btn-outline-primary rounded-pill no-lowercase mb-2\" (click)=\"onInventoryClick()\">\n {{'Run AI inventory on this image' | translate}}</button>\n <lib-carousel [images]=\"currentImages\" *ngIf=\"currentImages\" (currentScan)=\"setCurrentScan($event)\"></lib-carousel>\n </div>", styles: [""], components: [{ type: TabNavigationComponent, selector: "lib-tab-navigation", inputs: ["menuItems"], outputs: ["onGoBack"] }, { type: CarouselComponent, selector: "lib-carousel", inputs: ["images"], outputs: ["currentScan"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { type: i7.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { type: i7.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }], pipes: { "translate": i3.TranslatePipe } });
|
|
3043
|
+
ImagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: ImagesComponent, selector: "lib-images", ngImport: i0, template: "<div class=\"container-fluid dashboard-tab col-sm-10 mb-3\" *ngIf=\"currentSpace\" >\r\n <div class=\"m-3\">\r\n <lib-tab-navigation [menuItems]='menuItems' (onGoBack)=\"onGoBack()\"></lib-tab-navigation>\r\n </div>\r\n <div class=\"d-flex justify-content-center\" *ngIf=\"loading\">\r\n <div class=\"spinner-border\" role=\"status\">\r\n <span class=\"visually-hidden\">{{'Loading' | translate}}...</span>\r\n </div>\r\n </div>\r\n <div ngbDropdown class=\"d-inline-block\" *ngIf=\"currentSpace.visits && currentSpace.visits.length > 0\">\r\n <button class=\"btn btn-label-file rounded-pill\" id=\"dropdownBasic1\" *ngIf=\"!currentVisit\"\r\n ngbDropdownToggle>{{'Choose 3D visit' | translate}}</button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <button ngbDropdownItem *ngFor=\"let visit of currentSpace.visits\" (click)=\"setVisit(visit)\"> {{ visit.name }}\r\n </button>\r\n </div>\r\n </div>\r\n <h3 *ngIf=\"currentVisit\">{{ currentVisit.name }}</h3>\r\n <div class=\"mt-3\" *ngIf=\"currentVisit && currentImages.length == 0 && !loading\">\r\n <h4>{{'No imported images' | translate }}</h4>\r\n <p>{{'For import: go Virtual Visits => Import Images' | translate}}</p>\r\n </div>\r\n <button *ngIf=\"currentVisit && currentImages.length > 0 && !loading\"\r\n class=\"btn btn-outline-primary rounded-pill no-lowercase mb-2\" (click)=\"onInventoryClick()\">\r\n {{'Run AI inventory on this image' | translate}}</button>\r\n <lib-carousel [images]=\"currentImages\" *ngIf=\"currentImages\" (currentScan)=\"setCurrentScan($event)\"></lib-carousel>\r\n </div>", styles: [""], components: [{ type: TabNavigationComponent, selector: "lib-tab-navigation", inputs: ["menuItems"], outputs: ["onGoBack"] }, { type: CarouselComponent, selector: "lib-carousel", inputs: ["images"], outputs: ["currentScan"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { type: i7.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { type: i7.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }], pipes: { "translate": i3.TranslatePipe } });
|
|
3060
3044
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ImagesComponent, decorators: [{
|
|
3061
3045
|
type: Component,
|
|
3062
|
-
args: [{ selector: 'lib-images', template: "<div class=\"container-fluid dashboard-tab col-sm-10 mb-3\" *ngIf=\"currentSpace\" >\n <div class=\"m-3\">\n <lib-tab-navigation [menuItems]='menuItems' (onGoBack)=\"onGoBack()\"></lib-tab-navigation>\n </div>\n <div class=\"d-flex justify-content-center\" *ngIf=\"loading\">\n <div class=\"spinner-border\" role=\"status\">\n <span class=\"visually-hidden\">{{'Loading' | translate}}...</span>\n </div>\n </div>\n <div ngbDropdown class=\"d-inline-block\" *ngIf=\"currentSpace.visits && currentSpace.visits.length > 0\">\n <button class=\"btn btn-label-file rounded-pill\" id=\"dropdownBasic1\" *ngIf=\"!currentVisit\"\n ngbDropdownToggle>{{'Choose 3D visit' | translate}}</button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\n <button ngbDropdownItem *ngFor=\"let visit of currentSpace.visits\" (click)=\"setVisit(visit)\"> {{ visit.name }}\n </button>\n </div>\n </div>\n <h3 *ngIf=\"currentVisit\">{{ currentVisit.name }}</h3>\n <div class=\"mt-3\" *ngIf=\"currentVisit && currentImages.length == 0 && !loading\">\n <h4>{{'No imported images' | translate }}</h4>\n <p>{{'For import: go Virtual Visits => Import Images' | translate}}</p>\n </div>\n <button *ngIf=\"currentVisit && currentImages.length > 0 && !loading\"\n class=\"btn btn-outline-primary rounded-pill no-lowercase mb-2\" (click)=\"onInventoryClick()\">\n {{'Run AI inventory on this image' | translate}}</button>\n <lib-carousel [images]=\"currentImages\" *ngIf=\"currentImages\" (currentScan)=\"setCurrentScan($event)\"></lib-carousel>\n </div>", styles: [""] }]
|
|
3046
|
+
args: [{ selector: 'lib-images', template: "<div class=\"container-fluid dashboard-tab col-sm-10 mb-3\" *ngIf=\"currentSpace\" >\r\n <div class=\"m-3\">\r\n <lib-tab-navigation [menuItems]='menuItems' (onGoBack)=\"onGoBack()\"></lib-tab-navigation>\r\n </div>\r\n <div class=\"d-flex justify-content-center\" *ngIf=\"loading\">\r\n <div class=\"spinner-border\" role=\"status\">\r\n <span class=\"visually-hidden\">{{'Loading' | translate}}...</span>\r\n </div>\r\n </div>\r\n <div ngbDropdown class=\"d-inline-block\" *ngIf=\"currentSpace.visits && currentSpace.visits.length > 0\">\r\n <button class=\"btn btn-label-file rounded-pill\" id=\"dropdownBasic1\" *ngIf=\"!currentVisit\"\r\n ngbDropdownToggle>{{'Choose 3D visit' | translate}}</button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <button ngbDropdownItem *ngFor=\"let visit of currentSpace.visits\" (click)=\"setVisit(visit)\"> {{ visit.name }}\r\n </button>\r\n </div>\r\n </div>\r\n <h3 *ngIf=\"currentVisit\">{{ currentVisit.name }}</h3>\r\n <div class=\"mt-3\" *ngIf=\"currentVisit && currentImages.length == 0 && !loading\">\r\n <h4>{{'No imported images' | translate }}</h4>\r\n <p>{{'For import: go Virtual Visits => Import Images' | translate}}</p>\r\n </div>\r\n <button *ngIf=\"currentVisit && currentImages.length > 0 && !loading\"\r\n class=\"btn btn-outline-primary rounded-pill no-lowercase mb-2\" (click)=\"onInventoryClick()\">\r\n {{'Run AI inventory on this image' | translate}}</button>\r\n <lib-carousel [images]=\"currentImages\" *ngIf=\"currentImages\" (currentScan)=\"setCurrentScan($event)\"></lib-carousel>\r\n </div>", styles: [""] }]
|
|
3063
3047
|
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2.SpaceService }, { type: i2.VisitService }, { type: i2.NodeService }]; } });
|
|
3064
3048
|
|
|
3065
3049
|
class EditPlanComponent {
|
|
@@ -3169,9 +3153,7 @@ class EditPlanComponent {
|
|
|
3169
3153
|
this.images360 = yield this.visitService.loadImagesForSpace(currentSpace);
|
|
3170
3154
|
this.editedPlan = Object.assign({}, this.chosenPlan);
|
|
3171
3155
|
this.editedPlan.filepath = base64;
|
|
3172
|
-
console.log(event.data);
|
|
3173
3156
|
this.newZoneData = event.data.zoneData;
|
|
3174
|
-
console.log("newZoneData", this.newZoneData);
|
|
3175
3157
|
if (this.newZoneData.elements.length === 0) {
|
|
3176
3158
|
modalReference.close();
|
|
3177
3159
|
alert(this.translate.instant("edition.no-zone"));
|
|
@@ -3208,8 +3190,6 @@ class EditPlanComponent {
|
|
|
3208
3190
|
this.svgEditorIframe = svgEditor;
|
|
3209
3191
|
this.svgEditor = new svgEditor.contentWindow.SvgEditor();
|
|
3210
3192
|
yield this.svgEditor.init();
|
|
3211
|
-
// await this.svgEditor.pref(key, val);
|
|
3212
|
-
// await this.svgEditor.setConfig({ extentions: this.extensions });
|
|
3213
3193
|
yield this.svgEditor.setConfig(this.config, {
|
|
3214
3194
|
allowInitialUserOverride: true,
|
|
3215
3195
|
});
|
|
@@ -3224,12 +3204,13 @@ class EditPlanComponent {
|
|
|
3224
3204
|
this.svgEditorIframe.contentWindow.postMessage({ action: "disable-zone" }, "*");
|
|
3225
3205
|
}, 1000);
|
|
3226
3206
|
}
|
|
3207
|
+
this.svgEditor.svgCanvas.setMode('ext-panning');
|
|
3208
|
+
this.svgEditor.bottomPanel.changeZoom(50);
|
|
3227
3209
|
}
|
|
3228
3210
|
});
|
|
3229
3211
|
}
|
|
3230
3212
|
onSave(redirect) {
|
|
3231
3213
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3232
|
-
console.log("in onSave");
|
|
3233
3214
|
const imgBlob = yield new Blob([this.svgEditor.svgCanvas.getSvgString()], {
|
|
3234
3215
|
type: "image/svg+xml",
|
|
3235
3216
|
});
|
|
@@ -3331,6 +3312,8 @@ class EditPlanComponent {
|
|
|
3331
3312
|
},
|
|
3332
3313
|
});
|
|
3333
3314
|
this.svgEditor.svgCanvas.setHref(newImage, canvas.toDataURL("image/png"));
|
|
3315
|
+
this.svgEditor.svgCanvas.renameCurrentLayer(this.translate.instant("edition.plan-base"));
|
|
3316
|
+
this.svgEditor.svgCanvas.createLayer(this.translate.instant("edition.personalization"));
|
|
3334
3317
|
});
|
|
3335
3318
|
});
|
|
3336
3319
|
}
|
|
@@ -3360,6 +3343,8 @@ class EditPlanComponent {
|
|
|
3360
3343
|
},
|
|
3361
3344
|
});
|
|
3362
3345
|
this.svgEditor.svgCanvas.setHref(newImage, reader.result);
|
|
3346
|
+
this.svgEditor.svgCanvas.renameCurrentLayer(this.translate.instant("edition.plan-base"));
|
|
3347
|
+
this.svgEditor.svgCanvas.createLayer(this.translate.instant("edition.personalization"));
|
|
3363
3348
|
};
|
|
3364
3349
|
reader.readAsDataURL(imgBlob);
|
|
3365
3350
|
}
|