@smarterplan/ngx-smarterplan-core 1.2.50 → 1.2.52
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/esm2020/lib/components/menu-bar/menu-bar.component.mjs +167 -30
- package/esm2020/lib/components/menu-bar/navigation-bar/navigation-bar.component.mjs +15 -10
- package/esm2020/lib/ngx-smarterplan-core.module.mjs +1 -4
- package/esm2020/lib/services/filter.service.mjs +5 -1
- package/esm2020/lib/services/models/measurement.service.mjs +11 -2
- package/fesm2015/smarterplan-ngx-smarterplan-core.mjs +277 -263
- package/fesm2015/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/fesm2020/smarterplan-ngx-smarterplan-core.mjs +268 -256
- package/fesm2020/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/lib/components/menu-bar/menu-bar.component.d.ts +33 -2
- package/lib/components/menu-bar/navigation-bar/navigation-bar.component.d.ts +4 -1
- package/lib/ngx-smarterplan-core.module.d.ts +9 -10
- package/package.json +1 -1
- package/esm2020/lib/components/menu-bar/range-date-picker/range-date-picker.component.mjs +0 -147
- package/lib/components/menu-bar/range-date-picker/range-date-picker.component.d.ts +0 -35
|
@@ -12,7 +12,7 @@ import { Color, Vector3, Matrix4, Object3D, Euler, PerspectiveCamera, CylinderBu
|
|
|
12
12
|
import * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';
|
|
13
13
|
import { DateTime } from 'luxon';
|
|
14
14
|
import { Auth, Storage, API, Cache } from 'aws-amplify';
|
|
15
|
-
import * as
|
|
15
|
+
import * as i12 from '@angular/common';
|
|
16
16
|
import { CommonModule } from '@angular/common';
|
|
17
17
|
import * as FileSaver from 'file-saver';
|
|
18
18
|
import levenshtein from 'js-levenshtein';
|
|
@@ -1874,7 +1874,7 @@ class BaseUserService {
|
|
|
1874
1874
|
return this.spModule;
|
|
1875
1875
|
}
|
|
1876
1876
|
}
|
|
1877
|
-
BaseUserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseUserService, deps: [{ token: ProfileService }, { token: MissionService }, { token: PropertyService }, { token: i1$1.Router }, { token:
|
|
1877
|
+
BaseUserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseUserService, deps: [{ token: ProfileService }, { token: MissionService }, { token: PropertyService }, { token: i1$1.Router }, { token: i12.Location }, { token: i0.NgZone }, { token: i1.TranslateService }, { token: 'SPModule' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1878
1878
|
BaseUserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseUserService, providedIn: "root" });
|
|
1879
1879
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseUserService, decorators: [{
|
|
1880
1880
|
type: Injectable,
|
|
@@ -1882,7 +1882,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1882
1882
|
providedIn: "root",
|
|
1883
1883
|
}]
|
|
1884
1884
|
}], ctorParameters: function () {
|
|
1885
|
-
return [{ type: ProfileService }, { type: MissionService }, { type: PropertyService }, { type: i1$1.Router }, { type:
|
|
1885
|
+
return [{ type: ProfileService }, { type: MissionService }, { type: PropertyService }, { type: i1$1.Router }, { type: i12.Location }, { type: i0.NgZone }, { type: i1.TranslateService }, { type: SpModule, decorators: [{
|
|
1886
1886
|
type: Inject,
|
|
1887
1887
|
args: ['SPModule']
|
|
1888
1888
|
}] }];
|
|
@@ -5716,6 +5716,10 @@ class FilterService {
|
|
|
5716
5716
|
});
|
|
5717
5717
|
}
|
|
5718
5718
|
filterMeasurementsForDateRange(measurements, dateRange) {
|
|
5719
|
+
const isInvalidDate = (d) => d instanceof Date && isNaN(d.getTime());
|
|
5720
|
+
if (dateRange.every(d => d instanceof Date && isInvalidDate(d))) {
|
|
5721
|
+
return measurements;
|
|
5722
|
+
}
|
|
5719
5723
|
return measurements.filter((measure) => {
|
|
5720
5724
|
const createdAtDate = new Date(measure.comment.createdAt);
|
|
5721
5725
|
return (createdAtDate >= dateRange[0] && createdAtDate <= dateRange[1]);
|
|
@@ -8878,7 +8882,7 @@ class LoaderComponent {
|
|
|
8878
8882
|
}
|
|
8879
8883
|
}
|
|
8880
8884
|
LoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8881
|
-
LoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", 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%;animation:sk-circleFadeDelay 1.2s infinite ease-in-out both}.sk-fading-circle .sk-circle2{transform:rotate(30deg)}.sk-fading-circle .sk-circle3{transform:rotate(60deg)}.sk-fading-circle .sk-circle4{transform:rotate(90deg)}.sk-fading-circle .sk-circle5{transform:rotate(120deg)}.sk-fading-circle .sk-circle6{transform:rotate(150deg)}.sk-fading-circle .sk-circle7{transform:rotate(180deg)}.sk-fading-circle .sk-circle8{transform:rotate(210deg)}.sk-fading-circle .sk-circle9{transform:rotate(240deg)}.sk-fading-circle .sk-circle10{transform:rotate(270deg)}.sk-fading-circle .sk-circle11{transform:rotate(300deg)}.sk-fading-circle .sk-circle12{transform:rotate(330deg)}.sk-fading-circle .sk-circle2:before{animation-delay:-1.1s}.sk-fading-circle .sk-circle3:before{animation-delay:-1s}.sk-fading-circle .sk-circle4:before{animation-delay:-.9s}.sk-fading-circle .sk-circle5:before{animation-delay:-.8s}.sk-fading-circle .sk-circle6:before{animation-delay:-.7s}.sk-fading-circle .sk-circle7:before{animation-delay:-.6s}.sk-fading-circle .sk-circle8:before{animation-delay:-.5s}.sk-fading-circle .sk-circle9:before{animation-delay:-.4s}.sk-fading-circle .sk-circle10:before{animation-delay:-.3s}.sk-fading-circle .sk-circle11:before{animation-delay:-.2s}.sk-fading-circle .sk-circle12:before{animation-delay:-.1s}@keyframes sk-circleFadeDelay{0%,39%,to{opacity:0}40%{opacity:1}}\n"], directives: [{ type:
|
|
8885
|
+
LoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", 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%;animation:sk-circleFadeDelay 1.2s infinite ease-in-out both}.sk-fading-circle .sk-circle2{transform:rotate(30deg)}.sk-fading-circle .sk-circle3{transform:rotate(60deg)}.sk-fading-circle .sk-circle4{transform:rotate(90deg)}.sk-fading-circle .sk-circle5{transform:rotate(120deg)}.sk-fading-circle .sk-circle6{transform:rotate(150deg)}.sk-fading-circle .sk-circle7{transform:rotate(180deg)}.sk-fading-circle .sk-circle8{transform:rotate(210deg)}.sk-fading-circle .sk-circle9{transform:rotate(240deg)}.sk-fading-circle .sk-circle10{transform:rotate(270deg)}.sk-fading-circle .sk-circle11{transform:rotate(300deg)}.sk-fading-circle .sk-circle12{transform:rotate(330deg)}.sk-fading-circle .sk-circle2:before{animation-delay:-1.1s}.sk-fading-circle .sk-circle3:before{animation-delay:-1s}.sk-fading-circle .sk-circle4:before{animation-delay:-.9s}.sk-fading-circle .sk-circle5:before{animation-delay:-.8s}.sk-fading-circle .sk-circle6:before{animation-delay:-.7s}.sk-fading-circle .sk-circle7:before{animation-delay:-.6s}.sk-fading-circle .sk-circle8:before{animation-delay:-.5s}.sk-fading-circle .sk-circle9:before{animation-delay:-.4s}.sk-fading-circle .sk-circle10:before{animation-delay:-.3s}.sk-fading-circle .sk-circle11:before{animation-delay:-.2s}.sk-fading-circle .sk-circle12:before{animation-delay:-.1s}@keyframes sk-circleFadeDelay{0%,39%,to{opacity:0}40%{opacity:1}}\n"], directives: [{ type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
8882
8886
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LoaderComponent, decorators: [{
|
|
8883
8887
|
type: Component,
|
|
8884
8888
|
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%;animation:sk-circleFadeDelay 1.2s infinite ease-in-out both}.sk-fading-circle .sk-circle2{transform:rotate(30deg)}.sk-fading-circle .sk-circle3{transform:rotate(60deg)}.sk-fading-circle .sk-circle4{transform:rotate(90deg)}.sk-fading-circle .sk-circle5{transform:rotate(120deg)}.sk-fading-circle .sk-circle6{transform:rotate(150deg)}.sk-fading-circle .sk-circle7{transform:rotate(180deg)}.sk-fading-circle .sk-circle8{transform:rotate(210deg)}.sk-fading-circle .sk-circle9{transform:rotate(240deg)}.sk-fading-circle .sk-circle10{transform:rotate(270deg)}.sk-fading-circle .sk-circle11{transform:rotate(300deg)}.sk-fading-circle .sk-circle12{transform:rotate(330deg)}.sk-fading-circle .sk-circle2:before{animation-delay:-1.1s}.sk-fading-circle .sk-circle3:before{animation-delay:-1s}.sk-fading-circle .sk-circle4:before{animation-delay:-.9s}.sk-fading-circle .sk-circle5:before{animation-delay:-.8s}.sk-fading-circle .sk-circle6:before{animation-delay:-.7s}.sk-fading-circle .sk-circle7:before{animation-delay:-.6s}.sk-fading-circle .sk-circle8:before{animation-delay:-.5s}.sk-fading-circle .sk-circle9:before{animation-delay:-.4s}.sk-fading-circle .sk-circle10:before{animation-delay:-.3s}.sk-fading-circle .sk-circle11:before{animation-delay:-.2s}.sk-fading-circle .sk-circle12:before{animation-delay:-.1s}@keyframes sk-circleFadeDelay{0%,39%,to{opacity:0}40%{opacity:1}}\n"] }]
|
|
@@ -8939,7 +8943,7 @@ class SupportModalComponent {
|
|
|
8939
8943
|
}
|
|
8940
8944
|
}
|
|
8941
8945
|
SupportModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SupportModalComponent, deps: [{ token: SupportService }, { token: i1$2.NgbActiveModal }, { token: i3.FormBuilder }, { token: BaseUserService }, { token: ValidatorsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
8942
|
-
SupportModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", 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"], components: [{ type: LoaderComponent, selector: "lib-loader", inputs: ["useLogo", "color"] }], directives: [{ type: i1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type:
|
|
8946
|
+
SupportModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", 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"], components: [{ type: LoaderComponent, selector: "lib-loader", inputs: ["useLogo", "color"] }], directives: [{ type: i1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { 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]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i12.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "translate": i1.TranslatePipe } });
|
|
8943
8947
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SupportModalComponent, decorators: [{
|
|
8944
8948
|
type: Component,
|
|
8945
8949
|
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"] }]
|
|
@@ -8986,83 +8990,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
8986
8990
|
}]
|
|
8987
8991
|
}], ctorParameters: function () { return [{ type: i1.TranslateService }]; } });
|
|
8988
8992
|
|
|
8989
|
-
const cache = {};
|
|
8990
|
-
class AvatarComponent {
|
|
8991
|
-
constructor(userService, profileService) {
|
|
8992
|
-
this.userService = userService;
|
|
8993
|
-
this.profileService = profileService;
|
|
8994
|
-
this.size = 45;
|
|
8995
|
-
this.userSub = this.userService.isChanged.subscribe((connected) => {
|
|
8996
|
-
if (connected) {
|
|
8997
|
-
this.currentUser = this.userService.cu;
|
|
8998
|
-
this.setAvatar(this.currentUser);
|
|
8999
|
-
}
|
|
9000
|
-
});
|
|
9001
|
-
}
|
|
9002
|
-
ngOnInit() {
|
|
9003
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
9004
|
-
if (this.userID) {
|
|
9005
|
-
const profile = yield this.profileService.getProfile(this.userID);
|
|
9006
|
-
if (profile) {
|
|
9007
|
-
const user = new ProfileEntity(profile);
|
|
9008
|
-
this.setAvatar(user);
|
|
9009
|
-
}
|
|
9010
|
-
}
|
|
9011
|
-
else {
|
|
9012
|
-
this.currentUser = this.userService.cu;
|
|
9013
|
-
this.setAvatar(this.currentUser);
|
|
9014
|
-
}
|
|
9015
|
-
});
|
|
9016
|
-
}
|
|
9017
|
-
ngOnDestroy() {
|
|
9018
|
-
if (this.userSub) {
|
|
9019
|
-
this.userSub.unsubscribe();
|
|
9020
|
-
}
|
|
9021
|
-
}
|
|
9022
|
-
setAvatar(user) {
|
|
9023
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
9024
|
-
const { id, avatar, email } = user;
|
|
9025
|
-
// If avatar is not cached, check first if we have an avatar URL to fetch
|
|
9026
|
-
// from S3. If not, retrieve it from libravatar.
|
|
9027
|
-
// TODO use in a Service to be able to change/upload freely.
|
|
9028
|
-
if (!cache.hasOwnProperty(id)) {
|
|
9029
|
-
if (!avatar && email) {
|
|
9030
|
-
const md5 = new Md5();
|
|
9031
|
-
const md5hash = md5.appendStr(email).end();
|
|
9032
|
-
const avatar = `https://seccdn.libravatar.org/avatar/${md5hash}?s=${this.size}&default=identicon`;
|
|
9033
|
-
const url = yield fetch(avatar)
|
|
9034
|
-
.then((res) => res.blob())
|
|
9035
|
-
.then((blob) => {
|
|
9036
|
-
const file = new File([blob], "avatar.jpeg", {
|
|
9037
|
-
type: "image/jpeg",
|
|
9038
|
-
});
|
|
9039
|
-
return uploadFileToS3("avatars/", file, id);
|
|
9040
|
-
});
|
|
9041
|
-
yield this.profileService.updateProfile({ id, avatar: url });
|
|
9042
|
-
user.avatar = url;
|
|
9043
|
-
cache[id] = avatar;
|
|
9044
|
-
}
|
|
9045
|
-
if (avatar) {
|
|
9046
|
-
// TODO generating signed urls for avatar makes NO SENSE ($$$)
|
|
9047
|
-
// Sorry got to copypaste that, but really need to get rid of
|
|
9048
|
-
cache[id] = yield getSignedImageUrlForProfile(user);
|
|
9049
|
-
}
|
|
9050
|
-
}
|
|
9051
|
-
this.avatar = cache[id];
|
|
9052
|
-
});
|
|
9053
|
-
}
|
|
9054
|
-
}
|
|
9055
|
-
AvatarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AvatarComponent, deps: [{ token: BaseUserService }, { token: ProfileService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9056
|
-
AvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AvatarComponent, selector: "lib-avatar", inputs: { size: "size", userID: "userID" }, ngImport: i0, template: `<img [src]="avatar" />`, isInline: true, styles: ["img{max-width:100%;max-height:100%;height:100%;width:100%;border-radius:50%}\n"] });
|
|
9057
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AvatarComponent, decorators: [{
|
|
9058
|
-
type: Component,
|
|
9059
|
-
args: [{ selector: 'lib-avatar', template: `<img [src]="avatar" />`, styles: ["img{max-width:100%;max-height:100%;height:100%;width:100%;border-radius:50%}\n"] }]
|
|
9060
|
-
}], ctorParameters: function () { return [{ type: BaseUserService }, { type: ProfileService }]; }, propDecorators: { size: [{
|
|
9061
|
-
type: Input
|
|
9062
|
-
}], userID: [{
|
|
9063
|
-
type: Input
|
|
9064
|
-
}] } });
|
|
9065
|
-
|
|
9066
8993
|
/* eslint-disable class-methods-use-this */
|
|
9067
8994
|
var CacheKeys;
|
|
9068
8995
|
(function (CacheKeys) {
|
|
@@ -9132,167 +9059,80 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
9132
9059
|
}]
|
|
9133
9060
|
}], ctorParameters: function () { return []; } });
|
|
9134
9061
|
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
});
|
|
9148
|
-
return result;
|
|
9149
|
-
}
|
|
9150
|
-
return this.formatter.format(date);
|
|
9151
|
-
}
|
|
9152
|
-
}
|
|
9153
|
-
FormatDateNumberToDigitsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormatDateNumberToDigitsPipe, deps: [{ token: i1$2.NgbDateParserFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
9154
|
-
FormatDateNumberToDigitsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormatDateNumberToDigitsPipe, name: "formatDateNumberToDigits" });
|
|
9155
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormatDateNumberToDigitsPipe, decorators: [{
|
|
9156
|
-
type: Pipe,
|
|
9157
|
-
args: [{
|
|
9158
|
-
name: 'formatDateNumberToDigits'
|
|
9159
|
-
}]
|
|
9160
|
-
}], ctorParameters: function () { return [{ type: i1$2.NgbDateParserFormatter }]; } });
|
|
9161
|
-
|
|
9162
|
-
class RangeDatePickerComponent {
|
|
9163
|
-
constructor(calendar, formatter, filterService, cacheService) {
|
|
9164
|
-
this.calendar = calendar;
|
|
9165
|
-
this.formatter = formatter;
|
|
9166
|
-
this.filterService = filterService;
|
|
9167
|
-
this.cacheService = cacheService;
|
|
9168
|
-
this.hoveredDate = null;
|
|
9169
|
-
this.isDateFilterApplied = false;
|
|
9170
|
-
this.dateChanged = false;
|
|
9171
|
-
// this.fromDate = calendar.getPrev(calendar.getToday(), "d", 30);
|
|
9172
|
-
// this.toDate = calendar.getToday();
|
|
9062
|
+
const cache = {};
|
|
9063
|
+
class AvatarComponent {
|
|
9064
|
+
constructor(userService, profileService) {
|
|
9065
|
+
this.userService = userService;
|
|
9066
|
+
this.profileService = profileService;
|
|
9067
|
+
this.size = 45;
|
|
9068
|
+
this.userSub = this.userService.isChanged.subscribe((connected) => {
|
|
9069
|
+
if (connected) {
|
|
9070
|
+
this.currentUser = this.userService.cu;
|
|
9071
|
+
this.setAvatar(this.currentUser);
|
|
9072
|
+
}
|
|
9073
|
+
});
|
|
9173
9074
|
}
|
|
9174
9075
|
ngOnInit() {
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
this.fromDate = this.getNgbDate(from);
|
|
9183
|
-
localStorage.setItem('startDate', from.toString());
|
|
9184
|
-
localStorage.setItem('endDate', to.toString());
|
|
9185
|
-
this.filterService.dateFilterUpdated([new Date(from), new Date(to)]);
|
|
9186
|
-
}
|
|
9187
|
-
else {
|
|
9188
|
-
const currentDate = new Date().getTime(); //get current timestamp
|
|
9189
|
-
const thirtyDaysAgoDate = currentDate - 30 * 24 * 60 * 60 * 1000; //substract 30 days in miliseconds from the current timestamp
|
|
9190
|
-
// add dates to localstorage for retool urlsParams
|
|
9191
|
-
localStorage.setItem('startDate', thirtyDaysAgoDate.toString());
|
|
9192
|
-
localStorage.setItem('endDate', currentDate.toString());
|
|
9193
|
-
// updates date range dates to last 30 days ranges from today
|
|
9194
|
-
this.fromDate = this.getNgbDate(thirtyDaysAgoDate);
|
|
9195
|
-
this.toDate = this.getNgbDate(currentDate);
|
|
9196
|
-
this.filterService.dateFilterUpdated([
|
|
9197
|
-
new Date(thirtyDaysAgoDate.toString()),
|
|
9198
|
-
new Date(currentDate.toString()),
|
|
9199
|
-
]);
|
|
9200
|
-
}
|
|
9201
|
-
}
|
|
9202
|
-
getNgbDate(date) {
|
|
9203
|
-
let dt = new Date(date);
|
|
9204
|
-
dt.setMinutes(dt.getMinutes() - dt.getTimezoneOffset()); // convert to UTC
|
|
9205
|
-
return new NgbDate(dt.getUTCFullYear(), dt.getUTCMonth() + 1, dt.getUTCDate());
|
|
9206
|
-
}
|
|
9207
|
-
onDateSelection(date) {
|
|
9208
|
-
if (!this.fromDate && !this.toDate) {
|
|
9209
|
-
this.fromDate = date;
|
|
9210
|
-
}
|
|
9211
|
-
else if (this.fromDate &&
|
|
9212
|
-
!this.toDate &&
|
|
9213
|
-
date &&
|
|
9214
|
-
date.after(this.fromDate)) {
|
|
9215
|
-
this.toDate = date;
|
|
9216
|
-
}
|
|
9217
|
-
else {
|
|
9218
|
-
this.toDate = null;
|
|
9219
|
-
this.fromDate = date;
|
|
9220
|
-
}
|
|
9221
|
-
this.isDateChanged();
|
|
9222
|
-
}
|
|
9223
|
-
isDateChanged() {
|
|
9224
|
-
if (this.fromDate && this.toDate) {
|
|
9225
|
-
if (this.cache) {
|
|
9226
|
-
this.dateChanged =
|
|
9227
|
-
!this.fromDate.equals(this.getNgbDate(this.cache.from)) ||
|
|
9228
|
-
!this.toDate.equals(this.getNgbDate(this.cache.to));
|
|
9076
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9077
|
+
if (this.userID) {
|
|
9078
|
+
const profile = yield this.profileService.getProfile(this.userID);
|
|
9079
|
+
if (profile) {
|
|
9080
|
+
const user = new ProfileEntity(profile);
|
|
9081
|
+
this.setAvatar(user);
|
|
9082
|
+
}
|
|
9229
9083
|
}
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
this.hoveredDate &&
|
|
9236
|
-
date.after(this.fromDate) &&
|
|
9237
|
-
date.before(this.hoveredDate));
|
|
9238
|
-
}
|
|
9239
|
-
isInside(date) {
|
|
9240
|
-
return this.toDate && date.after(this.fromDate) && date.before(this.toDate);
|
|
9241
|
-
}
|
|
9242
|
-
isRange(date) {
|
|
9243
|
-
return (date.equals(this.fromDate) ||
|
|
9244
|
-
(this.toDate && date.equals(this.toDate)) ||
|
|
9245
|
-
this.isInside(date) ||
|
|
9246
|
-
this.isHovered(date));
|
|
9247
|
-
}
|
|
9248
|
-
validateInput(currentValue, input) {
|
|
9249
|
-
const parsed = this.formatter.parse(input);
|
|
9250
|
-
return parsed && this.calendar.isValid(NgbDate.from(parsed))
|
|
9251
|
-
? NgbDate.from(parsed)
|
|
9252
|
-
: currentValue;
|
|
9084
|
+
else {
|
|
9085
|
+
this.currentUser = this.userService.cu;
|
|
9086
|
+
this.setAvatar(this.currentUser);
|
|
9087
|
+
}
|
|
9088
|
+
});
|
|
9253
9089
|
}
|
|
9254
|
-
|
|
9255
|
-
if (this.
|
|
9256
|
-
|
|
9257
|
-
const to = new Date(this.toDate.year, this.toDate.month - 1, this.toDate.day, 23, 59);
|
|
9258
|
-
this.cacheService.putInCache(this.cacheName, {
|
|
9259
|
-
from: from.getTime(),
|
|
9260
|
-
to: to.getTime(),
|
|
9261
|
-
});
|
|
9262
|
-
this.filterService.dateFilterUpdated([from, to]);
|
|
9263
|
-
this.isDateFilterApplied = true;
|
|
9264
|
-
this.dateChanged = false;
|
|
9090
|
+
ngOnDestroy() {
|
|
9091
|
+
if (this.userSub) {
|
|
9092
|
+
this.userSub.unsubscribe();
|
|
9265
9093
|
}
|
|
9266
9094
|
}
|
|
9267
|
-
|
|
9268
|
-
this
|
|
9269
|
-
|
|
9270
|
-
|
|
9271
|
-
|
|
9272
|
-
|
|
9273
|
-
|
|
9274
|
-
|
|
9275
|
-
|
|
9276
|
-
|
|
9277
|
-
|
|
9278
|
-
|
|
9279
|
-
|
|
9280
|
-
|
|
9281
|
-
|
|
9282
|
-
|
|
9283
|
-
|
|
9284
|
-
|
|
9285
|
-
|
|
9286
|
-
|
|
9287
|
-
|
|
9095
|
+
setAvatar(user) {
|
|
9096
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9097
|
+
const { id, avatar, email } = user;
|
|
9098
|
+
// If avatar is not cached, check first if we have an avatar URL to fetch
|
|
9099
|
+
// from S3. If not, retrieve it from libravatar.
|
|
9100
|
+
// TODO use in a Service to be able to change/upload freely.
|
|
9101
|
+
if (!cache.hasOwnProperty(id)) {
|
|
9102
|
+
if (!avatar && email) {
|
|
9103
|
+
const md5 = new Md5();
|
|
9104
|
+
const md5hash = md5.appendStr(email).end();
|
|
9105
|
+
const avatar = `https://seccdn.libravatar.org/avatar/${md5hash}?s=${this.size}&default=identicon`;
|
|
9106
|
+
const url = yield fetch(avatar)
|
|
9107
|
+
.then((res) => res.blob())
|
|
9108
|
+
.then((blob) => {
|
|
9109
|
+
const file = new File([blob], "avatar.jpeg", {
|
|
9110
|
+
type: "image/jpeg",
|
|
9111
|
+
});
|
|
9112
|
+
return uploadFileToS3("avatars/", file, id);
|
|
9113
|
+
});
|
|
9114
|
+
yield this.profileService.updateProfile({ id, avatar: url });
|
|
9115
|
+
user.avatar = url;
|
|
9116
|
+
cache[id] = avatar;
|
|
9117
|
+
}
|
|
9118
|
+
if (avatar) {
|
|
9119
|
+
// TODO generating signed urls for avatar makes NO SENSE ($$$)
|
|
9120
|
+
// Sorry got to copypaste that, but really need to get rid of
|
|
9121
|
+
cache[id] = yield getSignedImageUrlForProfile(user);
|
|
9122
|
+
}
|
|
9123
|
+
}
|
|
9124
|
+
this.avatar = cache[id];
|
|
9125
|
+
});
|
|
9288
9126
|
}
|
|
9289
9127
|
}
|
|
9290
|
-
|
|
9291
|
-
|
|
9292
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type:
|
|
9128
|
+
AvatarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AvatarComponent, deps: [{ token: BaseUserService }, { token: ProfileService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9129
|
+
AvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AvatarComponent, selector: "lib-avatar", inputs: { size: "size", userID: "userID" }, ngImport: i0, template: `<img [src]="avatar" />`, isInline: true, styles: ["img{max-width:100%;max-height:100%;height:100%;width:100%;border-radius:50%}\n"] });
|
|
9130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AvatarComponent, decorators: [{
|
|
9293
9131
|
type: Component,
|
|
9294
|
-
args: [{ selector: 'lib-
|
|
9295
|
-
}], ctorParameters: function () { return [{ type:
|
|
9132
|
+
args: [{ selector: 'lib-avatar', template: `<img [src]="avatar" />`, styles: ["img{max-width:100%;max-height:100%;height:100%;width:100%;border-radius:50%}\n"] }]
|
|
9133
|
+
}], ctorParameters: function () { return [{ type: BaseUserService }, { type: ProfileService }]; }, propDecorators: { size: [{
|
|
9134
|
+
type: Input
|
|
9135
|
+
}], userID: [{
|
|
9296
9136
|
type: Input
|
|
9297
9137
|
}] } });
|
|
9298
9138
|
|
|
@@ -11177,7 +11017,9 @@ class MeasurementService {
|
|
|
11177
11017
|
comment,
|
|
11178
11018
|
poi,
|
|
11179
11019
|
};
|
|
11180
|
-
if (!!this.awsKinesisAnalytics
|
|
11020
|
+
if (!!this.awsKinesisAnalytics
|
|
11021
|
+
&& !!this.awsKinesisAnalytics.record
|
|
11022
|
+
&& this.awsKinesisAnalytics.record()) {
|
|
11181
11023
|
this.awsKinesisAnalytics.getInstance().record(
|
|
11182
11024
|
// @ts-ignore
|
|
11183
11025
|
{
|
|
@@ -11196,6 +11038,13 @@ class MeasurementService {
|
|
|
11196
11038
|
// partitionKey: "",
|
|
11197
11039
|
}, 'AWSKinesis');
|
|
11198
11040
|
}
|
|
11041
|
+
// Check if a date filter is currently applied
|
|
11042
|
+
if (this.dateFilter && this.dateFilter.length === 2) {
|
|
11043
|
+
// Update the end date of the filter to the current date to ensure the newly created measurement is included
|
|
11044
|
+
const newEndDate = new Date();
|
|
11045
|
+
const newFilter = [this.dateFilter[0], newEndDate];
|
|
11046
|
+
this.filterService.dateFilterUpdated(newFilter);
|
|
11047
|
+
}
|
|
11199
11048
|
return measurement;
|
|
11200
11049
|
});
|
|
11201
11050
|
}
|
|
@@ -11458,7 +11307,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
11458
11307
|
} });
|
|
11459
11308
|
|
|
11460
11309
|
class NavigationBarComponent {
|
|
11461
|
-
constructor(awsKinesisAnalyticsInjected, router, spaceService, userService, zoneService, visitService, viewerService, navigatorService, zoneChangeService) {
|
|
11310
|
+
constructor(awsKinesisAnalyticsInjected, router, spaceService, userService, zoneService, visitService, viewerService, navigatorService, zoneChangeService, baseVisibilityService) {
|
|
11462
11311
|
this.router = router;
|
|
11463
11312
|
this.spaceService = spaceService;
|
|
11464
11313
|
this.userService = userService;
|
|
@@ -11467,6 +11316,7 @@ class NavigationBarComponent {
|
|
|
11467
11316
|
this.viewerService = viewerService;
|
|
11468
11317
|
this.navigatorService = navigatorService;
|
|
11469
11318
|
this.zoneChangeService = zoneChangeService;
|
|
11319
|
+
this.baseVisibilityService = baseVisibilityService;
|
|
11470
11320
|
this.selectedLocation = null;
|
|
11471
11321
|
this.selectedFloor = null;
|
|
11472
11322
|
this.selectedZone = null;
|
|
@@ -11830,34 +11680,75 @@ class NavigationBarComponent {
|
|
|
11830
11680
|
}
|
|
11831
11681
|
return '';
|
|
11832
11682
|
}
|
|
11683
|
+
onHideClick() {
|
|
11684
|
+
this.baseVisibilityService.isChangePositionVisible.next(false);
|
|
11685
|
+
}
|
|
11833
11686
|
}
|
|
11834
|
-
NavigationBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavigationBarComponent, deps: [{ token: 'currentAwsKinesisAnalyticsService' }, { token: i1$1.Router }, { token: SpaceService }, { token: BaseUserService }, { token: ZoneService }, { token: VisitService }, { token: ViewerService }, { token: NavigatorService }, { token: ZoneChangeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11835
|
-
NavigationBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", 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\">\r\n <select class=\"form-control flex-fill location select-menu\" [(ngModel)]=\"selectedLocation\"\r\n (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 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 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 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 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 <!-- <select class=\"form-control flex-fill\">\r\n <option i18n>{{'Favorites' | translate}}</option>\r\n </select> -->\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\">\r\n\r\n <div class=\"outer_circle w-auto m-1\">\r\n <button id='btn-icon' [disabled]=\"!selectedLocation || !selectedModel3d || !canGo()\"\r\n (click)=\"goTo()\"></button>\r\n </div>\r\n <button (click)=\"goTo()\" class=\"btn rounded-pill btn-3d w-auto m-1\"\r\n [disabled]=\"!selectedLocation || !selectedModel3d || !canGo()\">{{'3D visit' | translate}}</button>\r\n\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}.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}.btn-3d:active:hover:not([disabled]){color:var(--smarterplan-secondary)}.btn-3d[disabled]:hover{color:#fff}.navbar-toggler{margin-right:1em}.select-menu{max-width:inherit}#btn-icon{width:30px;height:30px;background:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22utf-8%22%3F%3E%0D%3C!-- Generator%3A Adobe Illustrator 25.2.0%2C SVG Export Plug-In . SVG Version%3A 6.00 Build 0) --%3E%0D%3Csvg version%3D%221.1%22 id%3D%22Calque_1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 x%3D%220px%22 y%3D%220px%22%0D%09 viewBox%3D%220 0 60 60%22 style%3D%22enable-background%3Anew 0 0 60 60%3B%22 xml%3Aspace%3D%22preserve%22%3E%0D%3Cstyle type%3D%22text%2Fcss%22%3E%0D%09.st0%7Bfill%3A%23565656%3B%7D%0D%3C%2Fstyle%3E%0D%3Cg%3E%0D%09%3Cpath class%3D%22st0%22 d%3D%22M43.9%2C32.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%2C0-0.4%2C0.1-0.6%2C0.2l-12.8%2C8%0D%09%09c-0.3%2C0.2-0.5%2C0.5-0.5%2C0.9v14.4c0%2C0.4%2C0.2%2C0.7%2C0.5%2C0.9l12.8%2C8c0.3%2C0.2%2C0.8%2C0.2%2C1.1%2C0l12.8-8C43.7%2C32.8%2C43.9%2C32.5%2C43.9%2C32.1z%0D%09%09 M28.9%2C38.2l-10.7-6.7v-12l10.7%2C6.7V38.2z M30%2C24.4l-10.8-6.8L30%2C10.9l10.8%2C6.8L30%2C24.4z M41.8%2C31.5l-10.7%2C6.7v-12l10.7-6.7V31.5z%22%0D%09%09%2F%3E%0D%09%3Cpath class%3D%22st0%22 d%3D%22M56.1%2C29.3l-10.3-6.8v2l1.4%2C1v0l0.8%2C0.5l0%2C0l7%2C4.8c0.3%2C0.2%2C0.4%2C0.5%2C0.4%2C0.8c0%2C0.3-0.2%2C0.6-0.4%2C0.8l-6.8%2C4.7%0D%09%09l0%2C0l-0.9%2C0.7v0l-2.9%2C2v0l-13.8%2C9.6c-0.3%2C0.2-0.8%2C0.2-1.1%2C0l-14.2-9.8l-2.6-1.8v0L5%2C32.4c-0.3-0.2-0.4-0.5-0.4-0.8%0D%09%09c0-0.3%2C0.2-0.6%2C0.4-0.8l0%2C0l7.3-5l0%2C0l0.5-0.3v0l1.4-1v-2L3.9%2C29.3c-0.8%2C0.5-1.2%2C1.4-1.2%2C2.4c0%2C0.9%2C0.5%2C1.8%2C1.2%2C2.4l8.8%2C6.1v0%0D%09%09l4.5%2C3.1l11.2%2C7.7c1%2C0.7%2C2.3%2C0.7%2C3.3%2C0l13.7-9.5l1.9-1.3v0l8.8-6.1c0.8-0.5%2C1.2-1.4%2C1.2-2.4S56.9%2C29.8%2C56.1%2C29.3z%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\");border:none;vertical-align:middle}#btn-icon:hover{background:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22utf-8%22%3F%3E%0D%3C!-- Generator%3A Adobe Illustrator 25.2.0%2C SVG Export Plug-In . SVG Version%3A 6.00 Build 0) --%3E%0D%3Csvg version%3D%221.1%22 id%3D%22Calque_1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 x%3D%220px%22 y%3D%220px%22%0D%09 viewBox%3D%220 0 60 60%22 style%3D%22enable-background%3Anew 0 0 60 60%3B%22 xml%3Aspace%3D%22preserve%22%3E%0D%3Cstyle type%3D%22text%2Fcss%22%3E%0D%09.st0%7Bfill%3A%234BA4A8%3B%7D%0D%3C%2Fstyle%3E%0D%3Cg%3E%0D%09%3Cpath class%3D%22st0%22 d%3D%22M43.9%2C32.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%2C0-0.4%2C0.1-0.6%2C0.2l-12.8%2C8%0D%09%09c-0.3%2C0.2-0.5%2C0.5-0.5%2C0.9v14.4c0%2C0.4%2C0.2%2C0.7%2C0.5%2C0.9l12.8%2C8c0.3%2C0.2%2C0.8%2C0.2%2C1.1%2C0l12.8-8C43.7%2C32.8%2C43.9%2C32.5%2C43.9%2C32.1z%0D%09%09 M28.9%2C38.2l-10.7-6.7v-12l10.7%2C6.7V38.2z M30%2C24.4l-10.8-6.8L30%2C10.9l10.8%2C6.8L30%2C24.4z M41.8%2C31.5l-10.7%2C6.7v-12l10.7-6.7V31.5z%22%0D%09%09%2F%3E%0D%09%3Cpath class%3D%22st0%22 d%3D%22M56.1%2C29.3l-10.3-6.8v2l1.4%2C1v0l0.8%2C0.5l0%2C0l7%2C4.8c0.3%2C0.2%2C0.4%2C0.5%2C0.4%2C0.8c0%2C0.3-0.2%2C0.6-0.4%2C0.8l-6.8%2C4.7%0D%09%09l0%2C0l-0.9%2C0.7v0l-2.9%2C2v0l-13.8%2C9.6c-0.3%2C0.2-0.8%2C0.2-1.1%2C0l-14.2-9.8l-2.6-1.8v0L5%2C32.4c-0.3-0.2-0.4-0.5-0.4-0.8%0D%09%09c0-0.3%2C0.2-0.6%2C0.4-0.8l0%2C0l7.3-5l0%2C0l0.5-0.3v0l1.4-1v-2L3.9%2C29.3c-0.8%2C0.5-1.2%2C1.4-1.2%2C2.4c0%2C0.9%2C0.5%2C1.8%2C1.2%2C2.4l8.8%2C6.1v0%0D%09%09l4.5%2C3.1l11.2%2C7.7c1%2C0.7%2C2.3%2C0.7%2C3.3%2C0l13.7-9.5l1.9-1.3v0l8.8-6.1c0.8-0.5%2C1.2-1.4%2C1.2-2.4S56.9%2C29.8%2C56.1%2C29.3z%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\")}#btn-icon[disabled]:hover{background:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22utf-8%22%3F%3E%0D%3C!-- Generator%3A Adobe Illustrator 25.2.0%2C SVG Export Plug-In . SVG Version%3A 6.00 Build 0) --%3E%0D%3Csvg version%3D%221.1%22 id%3D%22Calque_1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 x%3D%220px%22 y%3D%220px%22%0D%09 viewBox%3D%220 0 60 60%22 style%3D%22enable-background%3Anew 0 0 60 60%3B%22 xml%3Aspace%3D%22preserve%22%3E%0D%3Cstyle type%3D%22text%2Fcss%22%3E%0D%09.st0%7Bfill%3A%23565656%3B%7D%0D%3C%2Fstyle%3E%0D%3Cg%3E%0D%09%3Cpath class%3D%22st0%22 d%3D%22M43.9%2C32.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%2C0-0.4%2C0.1-0.6%2C0.2l-12.8%2C8%0D%09%09c-0.3%2C0.2-0.5%2C0.5-0.5%2C0.9v14.4c0%2C0.4%2C0.2%2C0.7%2C0.5%2C0.9l12.8%2C8c0.3%2C0.2%2C0.8%2C0.2%2C1.1%2C0l12.8-8C43.7%2C32.8%2C43.9%2C32.5%2C43.9%2C32.1z%0D%09%09 M28.9%2C38.2l-10.7-6.7v-12l10.7%2C6.7V38.2z M30%2C24.4l-10.8-6.8L30%2C10.9l10.8%2C6.8L30%2C24.4z M41.8%2C31.5l-10.7%2C6.7v-12l10.7-6.7V31.5z%22%0D%09%09%2F%3E%0D%09%3Cpath class%3D%22st0%22 d%3D%22M56.1%2C29.3l-10.3-6.8v2l1.4%2C1v0l0.8%2C0.5l0%2C0l7%2C4.8c0.3%2C0.2%2C0.4%2C0.5%2C0.4%2C0.8c0%2C0.3-0.2%2C0.6-0.4%2C0.8l-6.8%2C4.7%0D%09%09l0%2C0l-0.9%2C0.7v0l-2.9%2C2v0l-13.8%2C9.6c-0.3%2C0.2-0.8%2C0.2-1.1%2C0l-14.2-9.8l-2.6-1.8v0L5%2C32.4c-0.3-0.2-0.4-0.5-0.4-0.8%0D%09%09c0-0.3%2C0.2-0.6%2C0.4-0.8l0%2C0l7.3-5l0%2C0l0.5-0.3v0l1.4-1v-2L3.9%2C29.3c-0.8%2C0.5-1.2%2C1.4-1.2%2C2.4c0%2C0.9%2C0.5%2C1.8%2C1.2%2C2.4l8.8%2C6.1v0%0D%09%09l4.5%2C3.1l11.2%2C7.7c1%2C0.7%2C2.3%2C0.7%2C3.3%2C0l13.7-9.5l1.9-1.3v0l8.8-6.1c0.8-0.5%2C1.2-1.4%2C1.2-2.4S56.9%2C29.8%2C56.1%2C29.3z%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\")}.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"], directives: [{ type: i1$2.NgbNavbar, selector: ".navbar" }, { type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1.TranslatePipe } });
|
|
11687
|
+
NavigationBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavigationBarComponent, deps: [{ token: 'currentAwsKinesisAnalyticsService' }, { token: i1$1.Router }, { token: SpaceService }, { token: BaseUserService }, { token: ZoneService }, { token: VisitService }, { token: ViewerService }, { token: NavigatorService }, { token: ZoneChangeService }, { token: BaseVisibilityService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11688
|
+
NavigationBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", 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 location select-menu\" [(ngModel)]=\"selectedLocation\"\r\n (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 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 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 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 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 <!-- <select class=\"form-control flex-fill\">\r\n <option i18n>{{'Favorites' | translate}}</option>\r\n </select> -->\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\">\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}.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,%3C%3Fxml version%3D%221.0%22 encoding%3D%22utf-8%22%3F%3E%0D%3C!-- Generator%3A Adobe Illustrator 25.2.0%2C SVG Export Plug-In . SVG Version%3A 6.00 Build 0) --%3E%0D%3Csvg version%3D%221.1%22 id%3D%22Calque_1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 x%3D%220px%22 y%3D%220px%22%0D%09 viewBox%3D%220 0 60 60%22 style%3D%22enable-background%3Anew 0 0 60 60%3B%22 xml%3Aspace%3D%22preserve%22%3E%0D%3Cstyle type%3D%22text%2Fcss%22%3E%0D%09.st0%7Bfill%3A%23565656%3B%7D%0D%3C%2Fstyle%3E%0D%3Cg%3E%0D%09%3Cpath class%3D%22st0%22 d%3D%22M43.9%2C32.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%2C0-0.4%2C0.1-0.6%2C0.2l-12.8%2C8%0D%09%09c-0.3%2C0.2-0.5%2C0.5-0.5%2C0.9v14.4c0%2C0.4%2C0.2%2C0.7%2C0.5%2C0.9l12.8%2C8c0.3%2C0.2%2C0.8%2C0.2%2C1.1%2C0l12.8-8C43.7%2C32.8%2C43.9%2C32.5%2C43.9%2C32.1z%0D%09%09 M28.9%2C38.2l-10.7-6.7v-12l10.7%2C6.7V38.2z M30%2C24.4l-10.8-6.8L30%2C10.9l10.8%2C6.8L30%2C24.4z M41.8%2C31.5l-10.7%2C6.7v-12l10.7-6.7V31.5z%22%0D%09%09%2F%3E%0D%09%3Cpath class%3D%22st0%22 d%3D%22M56.1%2C29.3l-10.3-6.8v2l1.4%2C1v0l0.8%2C0.5l0%2C0l7%2C4.8c0.3%2C0.2%2C0.4%2C0.5%2C0.4%2C0.8c0%2C0.3-0.2%2C0.6-0.4%2C0.8l-6.8%2C4.7%0D%09%09l0%2C0l-0.9%2C0.7v0l-2.9%2C2v0l-13.8%2C9.6c-0.3%2C0.2-0.8%2C0.2-1.1%2C0l-14.2-9.8l-2.6-1.8v0L5%2C32.4c-0.3-0.2-0.4-0.5-0.4-0.8%0D%09%09c0-0.3%2C0.2-0.6%2C0.4-0.8l0%2C0l7.3-5l0%2C0l0.5-0.3v0l1.4-1v-2L3.9%2C29.3c-0.8%2C0.5-1.2%2C1.4-1.2%2C2.4c0%2C0.9%2C0.5%2C1.8%2C1.2%2C2.4l8.8%2C6.1v0%0D%09%09l4.5%2C3.1l11.2%2C7.7c1%2C0.7%2C2.3%2C0.7%2C3.3%2C0l13.7-9.5l1.9-1.3v0l8.8-6.1c0.8-0.5%2C1.2-1.4%2C1.2-2.4S56.9%2C29.8%2C56.1%2C29.3z%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\");border:none;vertical-align:middle;fill:var(--smarterplan-primary)}.btn-3d:hover:enabled .icon-go-to-3d{background:url(\"data:image/svg+xml,%3Csvg width%3D%2260%22 height%3D%2260%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 version%3D%221.1%22 xml%3Aspace%3D%22preserve%22%3E %3Cg%3E %3Ctitle%3ELayer 1%3C%2Ftitle%3E %3Cg id%3D%22svg_1%22%3E %3Cpath class%3D%22st0%22 d%3D%22m43.9%2C32.1l0%2C-14.4c0%2C-0.4 -0.2%2C-0.7 -0.5%2C-0.9l-12.8%2C-8c-0.2%2C-0.1 -0.4%2C-0.2 -0.6%2C-0.2c-0.2%2C0 -0.4%2C0.1 -0.6%2C0.2l-12.8%2C8c-0.3%2C0.2 -0.5%2C0.5 -0.5%2C0.9l0%2C14.4c0%2C0.4 0.2%2C0.7 0.5%2C0.9l12.8%2C8c0.3%2C0.2 0.8%2C0.2 1.1%2C0l12.8%2C-8c0.4%2C-0.2 0.6%2C-0.5 0.6%2C-0.9zm-15%2C6.1l-10.7%2C-6.7l0%2C-12l10.7%2C6.7l0%2C12zm1.1%2C-13.8l-10.8%2C-6.8l10.8%2C-6.7l10.8%2C6.8l-10.8%2C6.7zm11.8%2C7.1l-10.7%2C6.7l0%2C-12l10.7%2C-6.7l0%2C12z%22 fill%3D%22%23ffffff%22 id%3D%22svg_2%22%2F%3E %3Cpath class%3D%22st0%22 d%3D%22m56.1%2C29.3l-10.3%2C-6.8l0%2C2l1.4%2C1l0%2C0l0.8%2C0.5l0%2C0l7%2C4.8c0.3%2C0.2 0.4%2C0.5 0.4%2C0.8c0%2C0.3 -0.2%2C0.6 -0.4%2C0.8l-6.8%2C4.7l0%2C0l-0.9%2C0.7l0%2C0l-2.9%2C2l0%2C0l-13.8%2C9.6c-0.3%2C0.2 -0.8%2C0.2 -1.1%2C0l-14.2%2C-9.8l-2.6%2C-1.8l0%2C0l-7.7%2C-5.4c-0.3%2C-0.2 -0.4%2C-0.5 -0.4%2C-0.8c0%2C-0.3 0.2%2C-0.6 0.4%2C-0.8l0%2C0l7.3%2C-5l0%2C0l0.5%2C-0.3l0%2C0l1.4%2C-1l0%2C-2l-10.3%2C6.8c-0.8%2C0.5 -1.2%2C1.4 -1.2%2C2.4c0%2C0.9 0.5%2C1.8 1.2%2C2.4l8.8%2C6.1l0%2C0l4.5%2C3.1l11.2%2C7.7c1%2C0.7 2.3%2C0.7 3.3%2C0l13.7%2C-9.5l1.9%2C-1.3l0%2C0l8.8%2C-6.1c0.8%2C-0.5 1.2%2C-1.4 1.2%2C-2.4s-0.4%2C-1.9 -1.2%2C-2.4z%22 fill%3D%22%23ffffff%22 id%3D%22svg_3%22%2F%3E %3C%2Fg%3E %3C%2Fg%3E%3C%2Fsvg%3E\")}.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"], directives: [{ type: i1$2.NgbNavbar, selector: ".navbar" }, { type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i12.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1.TranslatePipe } });
|
|
11836
11689
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavigationBarComponent, decorators: [{
|
|
11837
11690
|
type: Component,
|
|
11838
|
-
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\">\r\n <select class=\"form-control flex-fill location select-menu\" [(ngModel)]=\"selectedLocation\"\r\n (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 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 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 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 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 <!-- <select class=\"form-control flex-fill\">\r\n <option i18n>{{'Favorites' | translate}}</option>\r\n </select> -->\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\">\r\n
|
|
11691
|
+
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 location select-menu\" [(ngModel)]=\"selectedLocation\"\r\n (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 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 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 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 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 <!-- <select class=\"form-control flex-fill\">\r\n <option i18n>{{'Favorites' | translate}}</option>\r\n </select> -->\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\">\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}.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,%3C%3Fxml version%3D%221.0%22 encoding%3D%22utf-8%22%3F%3E%0D%3C!-- Generator%3A Adobe Illustrator 25.2.0%2C SVG Export Plug-In . SVG Version%3A 6.00 Build 0) --%3E%0D%3Csvg version%3D%221.1%22 id%3D%22Calque_1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 x%3D%220px%22 y%3D%220px%22%0D%09 viewBox%3D%220 0 60 60%22 style%3D%22enable-background%3Anew 0 0 60 60%3B%22 xml%3Aspace%3D%22preserve%22%3E%0D%3Cstyle type%3D%22text%2Fcss%22%3E%0D%09.st0%7Bfill%3A%23565656%3B%7D%0D%3C%2Fstyle%3E%0D%3Cg%3E%0D%09%3Cpath class%3D%22st0%22 d%3D%22M43.9%2C32.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%2C0-0.4%2C0.1-0.6%2C0.2l-12.8%2C8%0D%09%09c-0.3%2C0.2-0.5%2C0.5-0.5%2C0.9v14.4c0%2C0.4%2C0.2%2C0.7%2C0.5%2C0.9l12.8%2C8c0.3%2C0.2%2C0.8%2C0.2%2C1.1%2C0l12.8-8C43.7%2C32.8%2C43.9%2C32.5%2C43.9%2C32.1z%0D%09%09 M28.9%2C38.2l-10.7-6.7v-12l10.7%2C6.7V38.2z M30%2C24.4l-10.8-6.8L30%2C10.9l10.8%2C6.8L30%2C24.4z M41.8%2C31.5l-10.7%2C6.7v-12l10.7-6.7V31.5z%22%0D%09%09%2F%3E%0D%09%3Cpath class%3D%22st0%22 d%3D%22M56.1%2C29.3l-10.3-6.8v2l1.4%2C1v0l0.8%2C0.5l0%2C0l7%2C4.8c0.3%2C0.2%2C0.4%2C0.5%2C0.4%2C0.8c0%2C0.3-0.2%2C0.6-0.4%2C0.8l-6.8%2C4.7%0D%09%09l0%2C0l-0.9%2C0.7v0l-2.9%2C2v0l-13.8%2C9.6c-0.3%2C0.2-0.8%2C0.2-1.1%2C0l-14.2-9.8l-2.6-1.8v0L5%2C32.4c-0.3-0.2-0.4-0.5-0.4-0.8%0D%09%09c0-0.3%2C0.2-0.6%2C0.4-0.8l0%2C0l7.3-5l0%2C0l0.5-0.3v0l1.4-1v-2L3.9%2C29.3c-0.8%2C0.5-1.2%2C1.4-1.2%2C2.4c0%2C0.9%2C0.5%2C1.8%2C1.2%2C2.4l8.8%2C6.1v0%0D%09%09l4.5%2C3.1l11.2%2C7.7c1%2C0.7%2C2.3%2C0.7%2C3.3%2C0l13.7-9.5l1.9-1.3v0l8.8-6.1c0.8-0.5%2C1.2-1.4%2C1.2-2.4S56.9%2C29.8%2C56.1%2C29.3z%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\");border:none;vertical-align:middle;fill:var(--smarterplan-primary)}.btn-3d:hover:enabled .icon-go-to-3d{background:url(\"data:image/svg+xml,%3Csvg width%3D%2260%22 height%3D%2260%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 version%3D%221.1%22 xml%3Aspace%3D%22preserve%22%3E %3Cg%3E %3Ctitle%3ELayer 1%3C%2Ftitle%3E %3Cg id%3D%22svg_1%22%3E %3Cpath class%3D%22st0%22 d%3D%22m43.9%2C32.1l0%2C-14.4c0%2C-0.4 -0.2%2C-0.7 -0.5%2C-0.9l-12.8%2C-8c-0.2%2C-0.1 -0.4%2C-0.2 -0.6%2C-0.2c-0.2%2C0 -0.4%2C0.1 -0.6%2C0.2l-12.8%2C8c-0.3%2C0.2 -0.5%2C0.5 -0.5%2C0.9l0%2C14.4c0%2C0.4 0.2%2C0.7 0.5%2C0.9l12.8%2C8c0.3%2C0.2 0.8%2C0.2 1.1%2C0l12.8%2C-8c0.4%2C-0.2 0.6%2C-0.5 0.6%2C-0.9zm-15%2C6.1l-10.7%2C-6.7l0%2C-12l10.7%2C6.7l0%2C12zm1.1%2C-13.8l-10.8%2C-6.8l10.8%2C-6.7l10.8%2C6.8l-10.8%2C6.7zm11.8%2C7.1l-10.7%2C6.7l0%2C-12l10.7%2C-6.7l0%2C12z%22 fill%3D%22%23ffffff%22 id%3D%22svg_2%22%2F%3E %3Cpath class%3D%22st0%22 d%3D%22m56.1%2C29.3l-10.3%2C-6.8l0%2C2l1.4%2C1l0%2C0l0.8%2C0.5l0%2C0l7%2C4.8c0.3%2C0.2 0.4%2C0.5 0.4%2C0.8c0%2C0.3 -0.2%2C0.6 -0.4%2C0.8l-6.8%2C4.7l0%2C0l-0.9%2C0.7l0%2C0l-2.9%2C2l0%2C0l-13.8%2C9.6c-0.3%2C0.2 -0.8%2C0.2 -1.1%2C0l-14.2%2C-9.8l-2.6%2C-1.8l0%2C0l-7.7%2C-5.4c-0.3%2C-0.2 -0.4%2C-0.5 -0.4%2C-0.8c0%2C-0.3 0.2%2C-0.6 0.4%2C-0.8l0%2C0l7.3%2C-5l0%2C0l0.5%2C-0.3l0%2C0l1.4%2C-1l0%2C-2l-10.3%2C6.8c-0.8%2C0.5 -1.2%2C1.4 -1.2%2C2.4c0%2C0.9 0.5%2C1.8 1.2%2C2.4l8.8%2C6.1l0%2C0l4.5%2C3.1l11.2%2C7.7c1%2C0.7 2.3%2C0.7 3.3%2C0l13.7%2C-9.5l1.9%2C-1.3l0%2C0l8.8%2C-6.1c0.8%2C-0.5 1.2%2C-1.4 1.2%2C-2.4s-0.4%2C-1.9 -1.2%2C-2.4z%22 fill%3D%22%23ffffff%22 id%3D%22svg_3%22%2F%3E %3C%2Fg%3E %3C%2Fg%3E%3C%2Fsvg%3E\")}.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"] }]
|
|
11839
11692
|
}], ctorParameters: function () {
|
|
11840
11693
|
return [{ type: undefined, decorators: [{
|
|
11841
11694
|
type: Inject,
|
|
11842
11695
|
args: ['currentAwsKinesisAnalyticsService']
|
|
11843
|
-
}] }, { type: i1$1.Router }, { type: SpaceService }, { type: BaseUserService }, { type: ZoneService }, { type: VisitService }, { type: ViewerService }, { type: NavigatorService }, { type: ZoneChangeService }];
|
|
11696
|
+
}] }, { type: i1$1.Router }, { type: SpaceService }, { type: BaseUserService }, { type: ZoneService }, { type: VisitService }, { type: ViewerService }, { type: NavigatorService }, { type: ZoneChangeService }, { type: BaseVisibilityService }];
|
|
11844
11697
|
}, propDecorators: { navbarSelectMenu: [{
|
|
11845
11698
|
type: ViewChild,
|
|
11846
11699
|
args: ['navbarSelectMenu']
|
|
11847
11700
|
}] } });
|
|
11848
11701
|
|
|
11702
|
+
class FormatDateNumberToDigitsPipe {
|
|
11703
|
+
constructor(formatter) {
|
|
11704
|
+
this.formatter = formatter;
|
|
11705
|
+
}
|
|
11706
|
+
transform(date) {
|
|
11707
|
+
let [day, month, year] = this.formatter.format(date).split("/");
|
|
11708
|
+
if (day) {
|
|
11709
|
+
const nDate = new Date(parseInt(year), parseInt(month) - 1, parseInt(day));
|
|
11710
|
+
const result = nDate.toLocaleDateString(undefined, {
|
|
11711
|
+
year: "numeric",
|
|
11712
|
+
month: "2-digit",
|
|
11713
|
+
day: "2-digit",
|
|
11714
|
+
});
|
|
11715
|
+
return result;
|
|
11716
|
+
}
|
|
11717
|
+
return this.formatter.format(date);
|
|
11718
|
+
}
|
|
11719
|
+
}
|
|
11720
|
+
FormatDateNumberToDigitsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormatDateNumberToDigitsPipe, deps: [{ token: i1$2.NgbDateParserFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
11721
|
+
FormatDateNumberToDigitsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormatDateNumberToDigitsPipe, name: "formatDateNumberToDigits" });
|
|
11722
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormatDateNumberToDigitsPipe, decorators: [{
|
|
11723
|
+
type: Pipe,
|
|
11724
|
+
args: [{
|
|
11725
|
+
name: 'formatDateNumberToDigits'
|
|
11726
|
+
}]
|
|
11727
|
+
}], ctorParameters: function () { return [{ type: i1$2.NgbDateParserFormatter }]; } });
|
|
11728
|
+
|
|
11849
11729
|
class MenuBarComponent {
|
|
11850
|
-
constructor(router, localeService, userService, navigatorService, supportService, baseVisibilityService) {
|
|
11730
|
+
constructor(router, localeService, userService, navigatorService, supportService, baseVisibilityService, calendar, formatter, filterService, cacheService) {
|
|
11851
11731
|
this.router = router;
|
|
11852
11732
|
this.localeService = localeService;
|
|
11853
11733
|
this.userService = userService;
|
|
11854
11734
|
this.navigatorService = navigatorService;
|
|
11855
11735
|
this.supportService = supportService;
|
|
11856
11736
|
this.baseVisibilityService = baseVisibilityService;
|
|
11737
|
+
this.calendar = calendar;
|
|
11738
|
+
this.formatter = formatter;
|
|
11739
|
+
this.filterService = filterService;
|
|
11740
|
+
this.cacheService = cacheService;
|
|
11857
11741
|
this.isCollapsed = true;
|
|
11858
11742
|
this.isVisitor = true;
|
|
11859
11743
|
this.isVisible = false;
|
|
11860
11744
|
this.isChangePositionVisible = false;
|
|
11745
|
+
this.hoveredDate = null;
|
|
11746
|
+
this.isDateFilterApplied = false;
|
|
11747
|
+
this.dateChanged = false;
|
|
11748
|
+
this.onSearchKeydown = (event) => {
|
|
11749
|
+
if (event.key === 'Enter')
|
|
11750
|
+
this.onSubmit();
|
|
11751
|
+
};
|
|
11861
11752
|
this.userSubscription = this.userService.isChanged.subscribe((isChanged) => {
|
|
11862
11753
|
if (isChanged) {
|
|
11863
11754
|
this.update();
|
|
@@ -11866,30 +11757,66 @@ class MenuBarComponent {
|
|
|
11866
11757
|
this.navSubscription = this.navigatorService.isVisibleChanged.subscribe((data) => {
|
|
11867
11758
|
this.isVisible = data;
|
|
11868
11759
|
});
|
|
11869
|
-
this.baseVisibilityService.isChangePositionVisible.subscribe((data) => {
|
|
11760
|
+
this.changePositionSubscription = this.baseVisibilityService.isChangePositionVisible.subscribe((data) => {
|
|
11870
11761
|
this.isChangePositionVisible = data;
|
|
11871
11762
|
});
|
|
11872
11763
|
}
|
|
11873
11764
|
ngOnInit() {
|
|
11874
11765
|
this.update();
|
|
11766
|
+
if (this.cacheName) {
|
|
11767
|
+
this.cache = this.cacheService.getFromCache(this.cacheName);
|
|
11768
|
+
}
|
|
11769
|
+
if (this.cache) {
|
|
11770
|
+
this.isDateFilterApplied = true;
|
|
11771
|
+
let { from, to } = this.cache;
|
|
11772
|
+
this.toDate = this.getNgbDate(to);
|
|
11773
|
+
this.fromDate = this.getNgbDate(from);
|
|
11774
|
+
localStorage.setItem('startDate', from.toString());
|
|
11775
|
+
localStorage.setItem('endDate', to.toString());
|
|
11776
|
+
this.filterService.dateFilterUpdated([new Date(from), new Date(to)]);
|
|
11777
|
+
}
|
|
11778
|
+
else {
|
|
11779
|
+
this.fromDate = null;
|
|
11780
|
+
this.toDate = null;
|
|
11781
|
+
localStorage.removeItem('startDate');
|
|
11782
|
+
localStorage.removeItem('endDate');
|
|
11783
|
+
this.filterService.dateFilterUpdated(null);
|
|
11784
|
+
}
|
|
11785
|
+
// This allows updating the inputs when measurement.service changes the date programmatically
|
|
11786
|
+
this.filterSubscription = this.filterService.subscribeToDataFilterUpdate((dateRange) => {
|
|
11787
|
+
if (dateRange && dateRange.length === 2) {
|
|
11788
|
+
// 1. Convert JS Date objects to NgbDate for display
|
|
11789
|
+
const from = dateRange[0].getTime();
|
|
11790
|
+
const to = dateRange[1].getTime();
|
|
11791
|
+
this.fromDate = this.getNgbDate(from);
|
|
11792
|
+
this.toDate = this.getNgbDate(to);
|
|
11793
|
+
// 2. Update local cache reference to prevent the "Apply" button from activating
|
|
11794
|
+
this.cache = { from, to };
|
|
11795
|
+
// 3. Update visual state
|
|
11796
|
+
this.isDateFilterApplied = true;
|
|
11797
|
+
this.dateChanged = false; // We consider it synchronized
|
|
11798
|
+
}
|
|
11799
|
+
else {
|
|
11800
|
+
// If the filter is cleared externally
|
|
11801
|
+
this.fromDate = null;
|
|
11802
|
+
this.toDate = null;
|
|
11803
|
+
this.isDateFilterApplied = false;
|
|
11804
|
+
this.cache = null;
|
|
11805
|
+
}
|
|
11806
|
+
});
|
|
11875
11807
|
}
|
|
11876
11808
|
ngAfterViewInit() {
|
|
11877
|
-
|
|
11878
|
-
|
|
11879
|
-
|
|
11880
|
-
if (key === 'Enter') {
|
|
11881
|
-
this.onSubmit();
|
|
11882
|
-
}
|
|
11883
|
-
});
|
|
11884
|
-
}
|
|
11809
|
+
var _a;
|
|
11810
|
+
this.searchInput = document.querySelector('#mainSearchBar');
|
|
11811
|
+
(_a = this.searchInput) === null || _a === void 0 ? void 0 : _a.addEventListener('keydown', this.onSearchKeydown);
|
|
11885
11812
|
}
|
|
11886
11813
|
ngOnDestroy() {
|
|
11887
|
-
|
|
11888
|
-
|
|
11889
|
-
|
|
11890
|
-
|
|
11891
|
-
|
|
11892
|
-
|
|
11814
|
+
var _a, _b, _c, _d, _e;
|
|
11815
|
+
(_a = this.searchInput) === null || _a === void 0 ? void 0 : _a.removeEventListener('keydown', this.onSearchKeydown);
|
|
11816
|
+
(_b = this.userSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
11817
|
+
(_c = this.navSubscription) === null || _c === void 0 ? void 0 : _c.unsubscribe();
|
|
11818
|
+
(_d = this.changePositionSubscription) === null || _d === void 0 ? void 0 : _d.unsubscribe();
|
|
11819
|
+
(_e = this.filterSubscription) === null || _e === void 0 ? void 0 : _e.unsubscribe();
|
|
11893
11820
|
}
|
|
11894
11821
|
signOut() {
|
|
11895
11822
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -11925,15 +11852,104 @@ class MenuBarComponent {
|
|
|
11925
11852
|
}
|
|
11926
11853
|
onChangePositionClick() {
|
|
11927
11854
|
this.baseVisibilityService.isChangePositionVisible.next(!this.isChangePositionVisible);
|
|
11928
|
-
|
|
11855
|
+
}
|
|
11856
|
+
getNgbDate(date) {
|
|
11857
|
+
let dt = new Date(date);
|
|
11858
|
+
dt.setMinutes(dt.getMinutes() - dt.getTimezoneOffset()); // convert to UTC
|
|
11859
|
+
return new NgbDate(dt.getUTCFullYear(), dt.getUTCMonth() + 1, dt.getUTCDate());
|
|
11860
|
+
}
|
|
11861
|
+
onDateSelection(date) {
|
|
11862
|
+
if (!this.fromDate && !this.toDate) {
|
|
11863
|
+
this.fromDate = date;
|
|
11864
|
+
}
|
|
11865
|
+
else if (this.fromDate &&
|
|
11866
|
+
!this.toDate &&
|
|
11867
|
+
date &&
|
|
11868
|
+
date.after(this.fromDate)) {
|
|
11869
|
+
this.toDate = date;
|
|
11870
|
+
}
|
|
11871
|
+
else {
|
|
11872
|
+
this.toDate = null;
|
|
11873
|
+
this.fromDate = date;
|
|
11874
|
+
}
|
|
11875
|
+
this.isDateChanged();
|
|
11876
|
+
}
|
|
11877
|
+
isDateChanged() {
|
|
11878
|
+
if (this.fromDate && this.toDate) {
|
|
11879
|
+
if (this.cache) {
|
|
11880
|
+
this.dateChanged =
|
|
11881
|
+
!this.fromDate.equals(this.getNgbDate(this.cache.from)) ||
|
|
11882
|
+
!this.toDate.equals(this.getNgbDate(this.cache.to));
|
|
11883
|
+
}
|
|
11884
|
+
}
|
|
11885
|
+
}
|
|
11886
|
+
isHovered(date) {
|
|
11887
|
+
return (this.fromDate &&
|
|
11888
|
+
!this.toDate &&
|
|
11889
|
+
this.hoveredDate &&
|
|
11890
|
+
date.after(this.fromDate) &&
|
|
11891
|
+
date.before(this.hoveredDate));
|
|
11892
|
+
}
|
|
11893
|
+
isInside(date) {
|
|
11894
|
+
return this.toDate && date.after(this.fromDate) && date.before(this.toDate);
|
|
11895
|
+
}
|
|
11896
|
+
isRange(date) {
|
|
11897
|
+
return (date.equals(this.fromDate) ||
|
|
11898
|
+
(this.toDate && date.equals(this.toDate)) ||
|
|
11899
|
+
this.isInside(date) ||
|
|
11900
|
+
this.isHovered(date));
|
|
11901
|
+
}
|
|
11902
|
+
validateInput(currentValue, input) {
|
|
11903
|
+
const parsed = this.formatter.parse(input);
|
|
11904
|
+
return parsed && this.calendar.isValid(NgbDate.from(parsed))
|
|
11905
|
+
? NgbDate.from(parsed)
|
|
11906
|
+
: currentValue;
|
|
11907
|
+
}
|
|
11908
|
+
emitRange() {
|
|
11909
|
+
if (this.fromDate && this.toDate) {
|
|
11910
|
+
const from = new Date(this.fromDate.year, this.fromDate.month - 1, this.fromDate.day);
|
|
11911
|
+
const to = new Date(this.toDate.year, this.toDate.month - 1, this.toDate.day, 23, 59);
|
|
11912
|
+
this.cacheService.putInCache(this.cacheName, {
|
|
11913
|
+
from: from.getTime(),
|
|
11914
|
+
to: to.getTime(),
|
|
11915
|
+
});
|
|
11916
|
+
this.cache = { from: from.getTime(), to: to.getTime() };
|
|
11917
|
+
this.filterService.dateFilterUpdated([from, to]);
|
|
11918
|
+
this.isDateFilterApplied = true;
|
|
11919
|
+
this.dateChanged = false;
|
|
11920
|
+
}
|
|
11921
|
+
}
|
|
11922
|
+
onClearDates() {
|
|
11923
|
+
this.fromDate = null;
|
|
11924
|
+
this.toDate = null;
|
|
11925
|
+
this.isDateFilterApplied = false;
|
|
11926
|
+
this.cache = null;
|
|
11927
|
+
this.cacheService.removeFromCache(this.cacheName);
|
|
11928
|
+
this.filterService.dateFilterUpdated(null);
|
|
11929
|
+
}
|
|
11930
|
+
onApply() {
|
|
11931
|
+
if (this.fromDate && this.toDate) {
|
|
11932
|
+
this.emitRange();
|
|
11933
|
+
}
|
|
11934
|
+
//transform ngbDate to date objet then put dates in timestamp in localStorage to share it with Retool
|
|
11935
|
+
if (this.fromDate) {
|
|
11936
|
+
const startDate = new Date(this.fromDate.year, this.fromDate.month - 1, this.fromDate.day);
|
|
11937
|
+
localStorage.setItem('startDate', startDate.getTime().toString());
|
|
11938
|
+
}
|
|
11939
|
+
if (this.toDate) {
|
|
11940
|
+
const endDate = new Date(this.toDate.year, this.toDate.month - 1, this.toDate.day);
|
|
11941
|
+
localStorage.setItem('endDate', endDate.getTime().toString());
|
|
11942
|
+
}
|
|
11929
11943
|
}
|
|
11930
11944
|
}
|
|
11931
|
-
MenuBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MenuBarComponent, deps: [{ token: i1$1.Router }, { token: LocaleService }, { token: BaseUserService }, { token: NavigatorService }, { token: SupportService }, { token: BaseVisibilityService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11932
|
-
MenuBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: MenuBarComponent, selector: "lib-menu-bar", 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 flex-wrap justify-content-start align-items-start align-items-md-center\">\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\" (click)=\"onSubmit()\">{{'Search' |\r\n translate}}</button>\r\n </div>\r\n <lib-range-date-picker cacheName=\"mainDate\"></lib-range-date-picker>\r\n <div class=\"change-position-button align-self-end pb-2 align-self-md-center pb-md-0 flex-nowrap\">\r\n <input type=\"checkbox\" class=\"btn-check\" id=\"btn-check-outlined\" autocomplete=\"off\">\r\n <label class=\"link-primary cursor-pointer\" (click)=\"onChangePositionClick()\" for=\"btn-check-outlined\">{{\r\n (isChangePositionVisible ? \"Hide\" : \"Move to\") | translate }}</label>\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 #969696}.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{background-color:#fff;color:var(--smarterplan-primary);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;max-width:300px;align-items:stretch;justify-items:start}.search-button-container .search-button{width:auto;border-radius:1rem!important}.search-button-container .btn{width:fit-content}.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}@media (min-width: 1200px){.navbar-brand img{height:100px}.profile_pic{height:60px;width:60px;margin:15px}.search-button-container{max-width:600px}}@media (min-width: 992px) and (max-width: 1199.98px){.navbar-brand img{height:80px}.profile_pic{height:50px;width:50px;margin:12px}.search-button-container{max-width:500px}}@media (min-width: 768px) and (max-width: 991.98px){.navbar-brand img{height:60px}.profile_pic{height:40px;width:40px;margin:10px}.search-button-container{max-width:400px}}@media (max-width: 767.98px){.navbar-brand img{height:50px}.profile_pic{height:30px;width:30px;margin:8px}.search-button-container{max-width:200px}}.form-container{margin:.5rem 0}.navbar-collapse.show{display:flex;padding-bottom:.5rem}\n"], components: [{ type: AvatarComponent, selector: "lib-avatar", inputs: ["size", "userID"] }, { type: RangeDatePickerComponent, selector: "lib-range-date-picker", inputs: ["cacheName"] }, { type: NavigationBarComponent, selector: "lib-navigation-bar" }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$2.NgbNavbar, selector: ".navbar" }, { type: i1$1.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i1$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i1$2.NgbCollapse, selector: "[ngbCollapse]", inputs: ["animation", "ngbCollapse"], outputs: ["ngbCollapseChange", "shown", "hidden"], exportAs: ["ngbCollapse"] }, { type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }], pipes: { "translate": i1.TranslatePipe } });
|
|
11945
|
+
MenuBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MenuBarComponent, deps: [{ token: i1$1.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 });
|
|
11946
|
+
MenuBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", 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\" data-icon=\"ion:checkmark\" data-width=\"15\" data-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 #969696}.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"], components: [{ type: AvatarComponent, selector: "lib-avatar", inputs: ["size", "userID"] }, { type: NavigationBarComponent, selector: "lib-navigation-bar" }], directives: [{ type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$2.NgbNavbar, selector: ".navbar" }, { type: i1$1.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i1$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i1$2.NgbCollapse, selector: "[ngbCollapse]", inputs: ["animation", "ngbCollapse"], outputs: ["ngbCollapseChange", "shown", "hidden"], exportAs: ["ngbCollapse"] }, { type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1$2.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["autoClose", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }], pipes: { "translate": i1.TranslatePipe, "formatDateNumberToDigits": FormatDateNumberToDigitsPipe } });
|
|
11933
11947
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MenuBarComponent, decorators: [{
|
|
11934
11948
|
type: Component,
|
|
11935
|
-
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 flex-wrap justify-content-start align-items-start align-items-md-center\">\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\" (click)=\"onSubmit()\">{{'Search' |\r\n translate}}</button>\r\n </div>\r\n <lib-range-date-picker cacheName=\"mainDate\"></lib-range-date-picker>\r\n <div class=\"change-position-button align-self-end pb-2 align-self-md-center pb-md-0 flex-nowrap\">\r\n <input type=\"checkbox\" class=\"btn-check\" id=\"btn-check-outlined\" autocomplete=\"off\">\r\n <label class=\"link-primary cursor-pointer\" (click)=\"onChangePositionClick()\" for=\"btn-check-outlined\">{{\r\n (isChangePositionVisible ? \"Hide\" : \"Move to\") | translate }}</label>\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 #969696}.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{background-color:#fff;color:var(--smarterplan-primary);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;max-width:300px;align-items:stretch;justify-items:start}.search-button-container .search-button{width:auto;border-radius:1rem!important}.search-button-container .btn{width:fit-content}.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}@media (min-width: 1200px){.navbar-brand img{height:100px}.profile_pic{height:60px;width:60px;margin:15px}.search-button-container{max-width:600px}}@media (min-width: 992px) and (max-width: 1199.98px){.navbar-brand img{height:80px}.profile_pic{height:50px;width:50px;margin:12px}.search-button-container{max-width:500px}}@media (min-width: 768px) and (max-width: 991.98px){.navbar-brand img{height:60px}.profile_pic{height:40px;width:40px;margin:10px}.search-button-container{max-width:400px}}@media (max-width: 767.98px){.navbar-brand img{height:50px}.profile_pic{height:30px;width:30px;margin:8px}.search-button-container{max-width:200px}}.form-container{margin:.5rem 0}.navbar-collapse.show{display:flex;padding-bottom:.5rem}\n"] }]
|
|
11936
|
-
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: LocaleService }, { type: BaseUserService }, { type: NavigatorService }, { type: SupportService }, { type: BaseVisibilityService }]; }
|
|
11949
|
+
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\" data-icon=\"ion:checkmark\" data-width=\"15\" data-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 #969696}.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"] }]
|
|
11950
|
+
}], ctorParameters: function () { return [{ type: i1$1.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: [{
|
|
11951
|
+
type: Input
|
|
11952
|
+
}] } });
|
|
11937
11953
|
|
|
11938
11954
|
class NgxSmarterplanCoreModule {
|
|
11939
11955
|
static forRoot(config) {
|
|
@@ -11960,7 +11976,6 @@ NgxSmarterplanCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0"
|
|
|
11960
11976
|
MenuBarComponent,
|
|
11961
11977
|
AvatarComponent,
|
|
11962
11978
|
NavigationBarComponent,
|
|
11963
|
-
RangeDatePickerComponent,
|
|
11964
11979
|
LoaderComponent,
|
|
11965
11980
|
SupportModalComponent,
|
|
11966
11981
|
FormatDateNumberToDigitsPipe], imports: [FormsModule,
|
|
@@ -12003,7 +12018,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
12003
12018
|
MenuBarComponent,
|
|
12004
12019
|
AvatarComponent,
|
|
12005
12020
|
NavigationBarComponent,
|
|
12006
|
-
RangeDatePickerComponent,
|
|
12007
12021
|
LoaderComponent,
|
|
12008
12022
|
SupportModalComponent,
|
|
12009
12023
|
FormatDateNumberToDigitsPipe
|