@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
|
@@ -11,7 +11,7 @@ import { Color, Vector3, Matrix4, Object3D, Euler, PerspectiveCamera, CylinderBu
|
|
|
11
11
|
import * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';
|
|
12
12
|
import { DateTime } from 'luxon';
|
|
13
13
|
import { Auth, Storage, API, Cache } from 'aws-amplify';
|
|
14
|
-
import * as
|
|
14
|
+
import * as i12 from '@angular/common';
|
|
15
15
|
import { CommonModule } from '@angular/common';
|
|
16
16
|
import * as FileSaver from 'file-saver';
|
|
17
17
|
import levenshtein from 'js-levenshtein';
|
|
@@ -1774,14 +1774,14 @@ class BaseUserService {
|
|
|
1774
1774
|
return this.spModule;
|
|
1775
1775
|
}
|
|
1776
1776
|
}
|
|
1777
|
-
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:
|
|
1777
|
+
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 });
|
|
1778
1778
|
BaseUserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseUserService, providedIn: "root" });
|
|
1779
1779
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseUserService, decorators: [{
|
|
1780
1780
|
type: Injectable,
|
|
1781
1781
|
args: [{
|
|
1782
1782
|
providedIn: "root",
|
|
1783
1783
|
}]
|
|
1784
|
-
}], ctorParameters: function () { return [{ type: ProfileService }, { type: MissionService }, { type: PropertyService }, { type: i1$1.Router }, { type:
|
|
1784
|
+
}], ctorParameters: function () { return [{ type: ProfileService }, { type: MissionService }, { type: PropertyService }, { type: i1$1.Router }, { type: i12.Location }, { type: i0.NgZone }, { type: i1.TranslateService }, { type: SpModule, decorators: [{
|
|
1785
1785
|
type: Inject,
|
|
1786
1786
|
args: ['SPModule']
|
|
1787
1787
|
}] }]; } });
|
|
@@ -5477,6 +5477,10 @@ class FilterService {
|
|
|
5477
5477
|
});
|
|
5478
5478
|
}
|
|
5479
5479
|
filterMeasurementsForDateRange(measurements, dateRange) {
|
|
5480
|
+
const isInvalidDate = (d) => d instanceof Date && isNaN(d.getTime());
|
|
5481
|
+
if (dateRange.every(d => d instanceof Date && isInvalidDate(d))) {
|
|
5482
|
+
return measurements;
|
|
5483
|
+
}
|
|
5480
5484
|
return measurements.filter((measure) => {
|
|
5481
5485
|
const createdAtDate = new Date(measure.comment.createdAt);
|
|
5482
5486
|
return (createdAtDate >= dateRange[0] && createdAtDate <= dateRange[1]);
|
|
@@ -8438,7 +8442,7 @@ class LoaderComponent {
|
|
|
8438
8442
|
}
|
|
8439
8443
|
}
|
|
8440
8444
|
LoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8441
|
-
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:
|
|
8445
|
+
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"] }] });
|
|
8442
8446
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LoaderComponent, decorators: [{
|
|
8443
8447
|
type: Component,
|
|
8444
8448
|
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"] }]
|
|
@@ -8493,7 +8497,7 @@ class SupportModalComponent {
|
|
|
8493
8497
|
}
|
|
8494
8498
|
}
|
|
8495
8499
|
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 });
|
|
8496
|
-
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:
|
|
8500
|
+
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 } });
|
|
8497
8501
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SupportModalComponent, decorators: [{
|
|
8498
8502
|
type: Component,
|
|
8499
8503
|
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"] }]
|
|
@@ -8540,79 +8544,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
8540
8544
|
}]
|
|
8541
8545
|
}], ctorParameters: function () { return [{ type: i1.TranslateService }]; } });
|
|
8542
8546
|
|
|
8543
|
-
const cache = {};
|
|
8544
|
-
class AvatarComponent {
|
|
8545
|
-
constructor(userService, profileService) {
|
|
8546
|
-
this.userService = userService;
|
|
8547
|
-
this.profileService = profileService;
|
|
8548
|
-
this.size = 45;
|
|
8549
|
-
this.userSub = this.userService.isChanged.subscribe((connected) => {
|
|
8550
|
-
if (connected) {
|
|
8551
|
-
this.currentUser = this.userService.cu;
|
|
8552
|
-
this.setAvatar(this.currentUser);
|
|
8553
|
-
}
|
|
8554
|
-
});
|
|
8555
|
-
}
|
|
8556
|
-
async ngOnInit() {
|
|
8557
|
-
if (this.userID) {
|
|
8558
|
-
const profile = await this.profileService.getProfile(this.userID);
|
|
8559
|
-
if (profile) {
|
|
8560
|
-
const user = new ProfileEntity(profile);
|
|
8561
|
-
this.setAvatar(user);
|
|
8562
|
-
}
|
|
8563
|
-
}
|
|
8564
|
-
else {
|
|
8565
|
-
this.currentUser = this.userService.cu;
|
|
8566
|
-
this.setAvatar(this.currentUser);
|
|
8567
|
-
}
|
|
8568
|
-
}
|
|
8569
|
-
ngOnDestroy() {
|
|
8570
|
-
if (this.userSub) {
|
|
8571
|
-
this.userSub.unsubscribe();
|
|
8572
|
-
}
|
|
8573
|
-
}
|
|
8574
|
-
async setAvatar(user) {
|
|
8575
|
-
const { id, avatar, email } = user;
|
|
8576
|
-
// If avatar is not cached, check first if we have an avatar URL to fetch
|
|
8577
|
-
// from S3. If not, retrieve it from libravatar.
|
|
8578
|
-
// TODO use in a Service to be able to change/upload freely.
|
|
8579
|
-
if (!cache.hasOwnProperty(id)) {
|
|
8580
|
-
if (!avatar && email) {
|
|
8581
|
-
const md5 = new Md5();
|
|
8582
|
-
const md5hash = md5.appendStr(email).end();
|
|
8583
|
-
const avatar = `https://seccdn.libravatar.org/avatar/${md5hash}?s=${this.size}&default=identicon`;
|
|
8584
|
-
const url = await fetch(avatar)
|
|
8585
|
-
.then((res) => res.blob())
|
|
8586
|
-
.then((blob) => {
|
|
8587
|
-
const file = new File([blob], "avatar.jpeg", {
|
|
8588
|
-
type: "image/jpeg",
|
|
8589
|
-
});
|
|
8590
|
-
return uploadFileToS3("avatars/", file, id);
|
|
8591
|
-
});
|
|
8592
|
-
await this.profileService.updateProfile({ id, avatar: url });
|
|
8593
|
-
user.avatar = url;
|
|
8594
|
-
cache[id] = avatar;
|
|
8595
|
-
}
|
|
8596
|
-
if (avatar) {
|
|
8597
|
-
// TODO generating signed urls for avatar makes NO SENSE ($$$)
|
|
8598
|
-
// Sorry got to copypaste that, but really need to get rid of
|
|
8599
|
-
cache[id] = await getSignedImageUrlForProfile(user);
|
|
8600
|
-
}
|
|
8601
|
-
}
|
|
8602
|
-
this.avatar = cache[id];
|
|
8603
|
-
}
|
|
8604
|
-
}
|
|
8605
|
-
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 });
|
|
8606
|
-
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"] });
|
|
8607
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AvatarComponent, decorators: [{
|
|
8608
|
-
type: Component,
|
|
8609
|
-
args: [{ selector: 'lib-avatar', template: `<img [src]="avatar" />`, styles: ["img{max-width:100%;max-height:100%;height:100%;width:100%;border-radius:50%}\n"] }]
|
|
8610
|
-
}], ctorParameters: function () { return [{ type: BaseUserService }, { type: ProfileService }]; }, propDecorators: { size: [{
|
|
8611
|
-
type: Input
|
|
8612
|
-
}], userID: [{
|
|
8613
|
-
type: Input
|
|
8614
|
-
}] } });
|
|
8615
|
-
|
|
8616
8547
|
/* eslint-disable class-methods-use-this */
|
|
8617
8548
|
var CacheKeys;
|
|
8618
8549
|
(function (CacheKeys) {
|
|
@@ -8682,167 +8613,76 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
8682
8613
|
}]
|
|
8683
8614
|
}], ctorParameters: function () { return []; } });
|
|
8684
8615
|
|
|
8685
|
-
|
|
8686
|
-
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
});
|
|
8698
|
-
return result;
|
|
8699
|
-
}
|
|
8700
|
-
return this.formatter.format(date);
|
|
8701
|
-
}
|
|
8702
|
-
}
|
|
8703
|
-
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 });
|
|
8704
|
-
FormatDateNumberToDigitsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormatDateNumberToDigitsPipe, name: "formatDateNumberToDigits" });
|
|
8705
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormatDateNumberToDigitsPipe, decorators: [{
|
|
8706
|
-
type: Pipe,
|
|
8707
|
-
args: [{
|
|
8708
|
-
name: 'formatDateNumberToDigits'
|
|
8709
|
-
}]
|
|
8710
|
-
}], ctorParameters: function () { return [{ type: i1$2.NgbDateParserFormatter }]; } });
|
|
8711
|
-
|
|
8712
|
-
class RangeDatePickerComponent {
|
|
8713
|
-
constructor(calendar, formatter, filterService, cacheService) {
|
|
8714
|
-
this.calendar = calendar;
|
|
8715
|
-
this.formatter = formatter;
|
|
8716
|
-
this.filterService = filterService;
|
|
8717
|
-
this.cacheService = cacheService;
|
|
8718
|
-
this.hoveredDate = null;
|
|
8719
|
-
this.isDateFilterApplied = false;
|
|
8720
|
-
this.dateChanged = false;
|
|
8721
|
-
// this.fromDate = calendar.getPrev(calendar.getToday(), "d", 30);
|
|
8722
|
-
// this.toDate = calendar.getToday();
|
|
8616
|
+
const cache = {};
|
|
8617
|
+
class AvatarComponent {
|
|
8618
|
+
constructor(userService, profileService) {
|
|
8619
|
+
this.userService = userService;
|
|
8620
|
+
this.profileService = profileService;
|
|
8621
|
+
this.size = 45;
|
|
8622
|
+
this.userSub = this.userService.isChanged.subscribe((connected) => {
|
|
8623
|
+
if (connected) {
|
|
8624
|
+
this.currentUser = this.userService.cu;
|
|
8625
|
+
this.setAvatar(this.currentUser);
|
|
8626
|
+
}
|
|
8627
|
+
});
|
|
8723
8628
|
}
|
|
8724
|
-
ngOnInit() {
|
|
8725
|
-
if (this.
|
|
8726
|
-
|
|
8727
|
-
|
|
8728
|
-
|
|
8729
|
-
|
|
8730
|
-
|
|
8731
|
-
this.toDate = this.getNgbDate(to);
|
|
8732
|
-
this.fromDate = this.getNgbDate(from);
|
|
8733
|
-
localStorage.setItem('startDate', from.toString());
|
|
8734
|
-
localStorage.setItem('endDate', to.toString());
|
|
8735
|
-
this.filterService.dateFilterUpdated([new Date(from), new Date(to)]);
|
|
8629
|
+
async ngOnInit() {
|
|
8630
|
+
if (this.userID) {
|
|
8631
|
+
const profile = await this.profileService.getProfile(this.userID);
|
|
8632
|
+
if (profile) {
|
|
8633
|
+
const user = new ProfileEntity(profile);
|
|
8634
|
+
this.setAvatar(user);
|
|
8635
|
+
}
|
|
8736
8636
|
}
|
|
8737
8637
|
else {
|
|
8738
|
-
|
|
8739
|
-
|
|
8740
|
-
// add dates to localstorage for retool urlsParams
|
|
8741
|
-
localStorage.setItem('startDate', thirtyDaysAgoDate.toString());
|
|
8742
|
-
localStorage.setItem('endDate', currentDate.toString());
|
|
8743
|
-
// updates date range dates to last 30 days ranges from today
|
|
8744
|
-
this.fromDate = this.getNgbDate(thirtyDaysAgoDate);
|
|
8745
|
-
this.toDate = this.getNgbDate(currentDate);
|
|
8746
|
-
this.filterService.dateFilterUpdated([
|
|
8747
|
-
new Date(thirtyDaysAgoDate.toString()),
|
|
8748
|
-
new Date(currentDate.toString()),
|
|
8749
|
-
]);
|
|
8638
|
+
this.currentUser = this.userService.cu;
|
|
8639
|
+
this.setAvatar(this.currentUser);
|
|
8750
8640
|
}
|
|
8751
8641
|
}
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
|
|
8755
|
-
return new NgbDate(dt.getUTCFullYear(), dt.getUTCMonth() + 1, dt.getUTCDate());
|
|
8756
|
-
}
|
|
8757
|
-
onDateSelection(date) {
|
|
8758
|
-
if (!this.fromDate && !this.toDate) {
|
|
8759
|
-
this.fromDate = date;
|
|
8760
|
-
}
|
|
8761
|
-
else if (this.fromDate &&
|
|
8762
|
-
!this.toDate &&
|
|
8763
|
-
date &&
|
|
8764
|
-
date.after(this.fromDate)) {
|
|
8765
|
-
this.toDate = date;
|
|
8766
|
-
}
|
|
8767
|
-
else {
|
|
8768
|
-
this.toDate = null;
|
|
8769
|
-
this.fromDate = date;
|
|
8642
|
+
ngOnDestroy() {
|
|
8643
|
+
if (this.userSub) {
|
|
8644
|
+
this.userSub.unsubscribe();
|
|
8770
8645
|
}
|
|
8771
|
-
this.isDateChanged();
|
|
8772
8646
|
}
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8647
|
+
async setAvatar(user) {
|
|
8648
|
+
const { id, avatar, email } = user;
|
|
8649
|
+
// If avatar is not cached, check first if we have an avatar URL to fetch
|
|
8650
|
+
// from S3. If not, retrieve it from libravatar.
|
|
8651
|
+
// TODO use in a Service to be able to change/upload freely.
|
|
8652
|
+
if (!cache.hasOwnProperty(id)) {
|
|
8653
|
+
if (!avatar && email) {
|
|
8654
|
+
const md5 = new Md5();
|
|
8655
|
+
const md5hash = md5.appendStr(email).end();
|
|
8656
|
+
const avatar = `https://seccdn.libravatar.org/avatar/${md5hash}?s=${this.size}&default=identicon`;
|
|
8657
|
+
const url = await fetch(avatar)
|
|
8658
|
+
.then((res) => res.blob())
|
|
8659
|
+
.then((blob) => {
|
|
8660
|
+
const file = new File([blob], "avatar.jpeg", {
|
|
8661
|
+
type: "image/jpeg",
|
|
8662
|
+
});
|
|
8663
|
+
return uploadFileToS3("avatars/", file, id);
|
|
8664
|
+
});
|
|
8665
|
+
await this.profileService.updateProfile({ id, avatar: url });
|
|
8666
|
+
user.avatar = url;
|
|
8667
|
+
cache[id] = avatar;
|
|
8668
|
+
}
|
|
8669
|
+
if (avatar) {
|
|
8670
|
+
// TODO generating signed urls for avatar makes NO SENSE ($$$)
|
|
8671
|
+
// Sorry got to copypaste that, but really need to get rid of
|
|
8672
|
+
cache[id] = await getSignedImageUrlForProfile(user);
|
|
8779
8673
|
}
|
|
8780
8674
|
}
|
|
8781
|
-
|
|
8782
|
-
isHovered(date) {
|
|
8783
|
-
return (this.fromDate &&
|
|
8784
|
-
!this.toDate &&
|
|
8785
|
-
this.hoveredDate &&
|
|
8786
|
-
date.after(this.fromDate) &&
|
|
8787
|
-
date.before(this.hoveredDate));
|
|
8788
|
-
}
|
|
8789
|
-
isInside(date) {
|
|
8790
|
-
return this.toDate && date.after(this.fromDate) && date.before(this.toDate);
|
|
8791
|
-
}
|
|
8792
|
-
isRange(date) {
|
|
8793
|
-
return (date.equals(this.fromDate) ||
|
|
8794
|
-
(this.toDate && date.equals(this.toDate)) ||
|
|
8795
|
-
this.isInside(date) ||
|
|
8796
|
-
this.isHovered(date));
|
|
8797
|
-
}
|
|
8798
|
-
validateInput(currentValue, input) {
|
|
8799
|
-
const parsed = this.formatter.parse(input);
|
|
8800
|
-
return parsed && this.calendar.isValid(NgbDate.from(parsed))
|
|
8801
|
-
? NgbDate.from(parsed)
|
|
8802
|
-
: currentValue;
|
|
8803
|
-
}
|
|
8804
|
-
emitRange() {
|
|
8805
|
-
if (this.fromDate && this.toDate) {
|
|
8806
|
-
const from = new Date(this.fromDate.year, this.fromDate.month - 1, this.fromDate.day);
|
|
8807
|
-
const to = new Date(this.toDate.year, this.toDate.month - 1, this.toDate.day, 23, 59);
|
|
8808
|
-
this.cacheService.putInCache(this.cacheName, {
|
|
8809
|
-
from: from.getTime(),
|
|
8810
|
-
to: to.getTime(),
|
|
8811
|
-
});
|
|
8812
|
-
this.filterService.dateFilterUpdated([from, to]);
|
|
8813
|
-
this.isDateFilterApplied = true;
|
|
8814
|
-
this.dateChanged = false;
|
|
8815
|
-
}
|
|
8816
|
-
}
|
|
8817
|
-
onClearDates() {
|
|
8818
|
-
this.fromDate = null;
|
|
8819
|
-
this.toDate = null;
|
|
8820
|
-
this.isDateFilterApplied = false;
|
|
8821
|
-
this.cacheService.removeFromCache(this.cacheName);
|
|
8822
|
-
this.filterService.dateFilterUpdated(null);
|
|
8823
|
-
}
|
|
8824
|
-
onApply() {
|
|
8825
|
-
if (this.fromDate && this.toDate) {
|
|
8826
|
-
this.emitRange();
|
|
8827
|
-
}
|
|
8828
|
-
//transform ngbDate to date objet then put dates in timestamp in localStorage to share it with Retool
|
|
8829
|
-
if (this.fromDate) {
|
|
8830
|
-
const startDate = new Date(this.fromDate.year, this.fromDate.month - 1, this.fromDate.day);
|
|
8831
|
-
localStorage.setItem('startDate', startDate.getTime().toString());
|
|
8832
|
-
console.log('test setItem from : ' + startDate.getTime().toString());
|
|
8833
|
-
}
|
|
8834
|
-
if (this.toDate) {
|
|
8835
|
-
const endDate = new Date(this.toDate.year, this.toDate.month - 1, this.toDate.day);
|
|
8836
|
-
localStorage.setItem('endDate', endDate.getTime().toString());
|
|
8837
|
-
}
|
|
8675
|
+
this.avatar = cache[id];
|
|
8838
8676
|
}
|
|
8839
8677
|
}
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type:
|
|
8678
|
+
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 });
|
|
8679
|
+
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"] });
|
|
8680
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AvatarComponent, decorators: [{
|
|
8843
8681
|
type: Component,
|
|
8844
|
-
args: [{ selector: 'lib-
|
|
8845
|
-
}], ctorParameters: function () { return [{ type:
|
|
8682
|
+
args: [{ selector: 'lib-avatar', template: `<img [src]="avatar" />`, styles: ["img{max-width:100%;max-height:100%;height:100%;width:100%;border-radius:50%}\n"] }]
|
|
8683
|
+
}], ctorParameters: function () { return [{ type: BaseUserService }, { type: ProfileService }]; }, propDecorators: { size: [{
|
|
8684
|
+
type: Input
|
|
8685
|
+
}], userID: [{
|
|
8846
8686
|
type: Input
|
|
8847
8687
|
}] } });
|
|
8848
8688
|
|
|
@@ -10599,7 +10439,9 @@ class MeasurementService {
|
|
|
10599
10439
|
comment,
|
|
10600
10440
|
poi,
|
|
10601
10441
|
};
|
|
10602
|
-
if (!!this.awsKinesisAnalytics
|
|
10442
|
+
if (!!this.awsKinesisAnalytics
|
|
10443
|
+
&& !!this.awsKinesisAnalytics.record
|
|
10444
|
+
&& this.awsKinesisAnalytics.record()) {
|
|
10603
10445
|
this.awsKinesisAnalytics.getInstance().record(
|
|
10604
10446
|
// @ts-ignore
|
|
10605
10447
|
{
|
|
@@ -10618,6 +10460,13 @@ class MeasurementService {
|
|
|
10618
10460
|
// partitionKey: "",
|
|
10619
10461
|
}, 'AWSKinesis');
|
|
10620
10462
|
}
|
|
10463
|
+
// Check if a date filter is currently applied
|
|
10464
|
+
if (this.dateFilter && this.dateFilter.length === 2) {
|
|
10465
|
+
// Update the end date of the filter to the current date to ensure the newly created measurement is included
|
|
10466
|
+
const newEndDate = new Date();
|
|
10467
|
+
const newFilter = [this.dateFilter[0], newEndDate];
|
|
10468
|
+
this.filterService.dateFilterUpdated(newFilter);
|
|
10469
|
+
}
|
|
10621
10470
|
return measurement;
|
|
10622
10471
|
}
|
|
10623
10472
|
async getModel3DForMeasurement(measurement) {
|
|
@@ -10848,7 +10697,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
10848
10697
|
}] }]; } });
|
|
10849
10698
|
|
|
10850
10699
|
class NavigationBarComponent {
|
|
10851
|
-
constructor(awsKinesisAnalyticsInjected, router, spaceService, userService, zoneService, visitService, viewerService, navigatorService, zoneChangeService) {
|
|
10700
|
+
constructor(awsKinesisAnalyticsInjected, router, spaceService, userService, zoneService, visitService, viewerService, navigatorService, zoneChangeService, baseVisibilityService) {
|
|
10852
10701
|
this.router = router;
|
|
10853
10702
|
this.spaceService = spaceService;
|
|
10854
10703
|
this.userService = userService;
|
|
@@ -10857,6 +10706,7 @@ class NavigationBarComponent {
|
|
|
10857
10706
|
this.viewerService = viewerService;
|
|
10858
10707
|
this.navigatorService = navigatorService;
|
|
10859
10708
|
this.zoneChangeService = zoneChangeService;
|
|
10709
|
+
this.baseVisibilityService = baseVisibilityService;
|
|
10860
10710
|
this.selectedLocation = null;
|
|
10861
10711
|
this.selectedFloor = null;
|
|
10862
10712
|
this.selectedZone = null;
|
|
@@ -11201,32 +11051,73 @@ class NavigationBarComponent {
|
|
|
11201
11051
|
}
|
|
11202
11052
|
return '';
|
|
11203
11053
|
}
|
|
11054
|
+
onHideClick() {
|
|
11055
|
+
this.baseVisibilityService.isChangePositionVisible.next(false);
|
|
11056
|
+
}
|
|
11204
11057
|
}
|
|
11205
|
-
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 });
|
|
11206
|
-
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 } });
|
|
11058
|
+
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 });
|
|
11059
|
+
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 } });
|
|
11207
11060
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavigationBarComponent, decorators: [{
|
|
11208
11061
|
type: Component,
|
|
11209
|
-
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
|
|
11062
|
+
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"] }]
|
|
11210
11063
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
11211
11064
|
type: Inject,
|
|
11212
11065
|
args: ['currentAwsKinesisAnalyticsService']
|
|
11213
|
-
}] }, { type: i1$1.Router }, { type: SpaceService }, { type: BaseUserService }, { type: ZoneService }, { type: VisitService }, { type: ViewerService }, { type: NavigatorService }, { type: ZoneChangeService }]; }, propDecorators: { navbarSelectMenu: [{
|
|
11066
|
+
}] }, { type: i1$1.Router }, { type: SpaceService }, { type: BaseUserService }, { type: ZoneService }, { type: VisitService }, { type: ViewerService }, { type: NavigatorService }, { type: ZoneChangeService }, { type: BaseVisibilityService }]; }, propDecorators: { navbarSelectMenu: [{
|
|
11214
11067
|
type: ViewChild,
|
|
11215
11068
|
args: ['navbarSelectMenu']
|
|
11216
11069
|
}] } });
|
|
11217
11070
|
|
|
11071
|
+
class FormatDateNumberToDigitsPipe {
|
|
11072
|
+
constructor(formatter) {
|
|
11073
|
+
this.formatter = formatter;
|
|
11074
|
+
}
|
|
11075
|
+
transform(date) {
|
|
11076
|
+
let [day, month, year] = this.formatter.format(date).split("/");
|
|
11077
|
+
if (day) {
|
|
11078
|
+
const nDate = new Date(parseInt(year), parseInt(month) - 1, parseInt(day));
|
|
11079
|
+
const result = nDate.toLocaleDateString(undefined, {
|
|
11080
|
+
year: "numeric",
|
|
11081
|
+
month: "2-digit",
|
|
11082
|
+
day: "2-digit",
|
|
11083
|
+
});
|
|
11084
|
+
return result;
|
|
11085
|
+
}
|
|
11086
|
+
return this.formatter.format(date);
|
|
11087
|
+
}
|
|
11088
|
+
}
|
|
11089
|
+
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 });
|
|
11090
|
+
FormatDateNumberToDigitsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormatDateNumberToDigitsPipe, name: "formatDateNumberToDigits" });
|
|
11091
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormatDateNumberToDigitsPipe, decorators: [{
|
|
11092
|
+
type: Pipe,
|
|
11093
|
+
args: [{
|
|
11094
|
+
name: 'formatDateNumberToDigits'
|
|
11095
|
+
}]
|
|
11096
|
+
}], ctorParameters: function () { return [{ type: i1$2.NgbDateParserFormatter }]; } });
|
|
11097
|
+
|
|
11218
11098
|
class MenuBarComponent {
|
|
11219
|
-
constructor(router, localeService, userService, navigatorService, supportService, baseVisibilityService) {
|
|
11099
|
+
constructor(router, localeService, userService, navigatorService, supportService, baseVisibilityService, calendar, formatter, filterService, cacheService) {
|
|
11220
11100
|
this.router = router;
|
|
11221
11101
|
this.localeService = localeService;
|
|
11222
11102
|
this.userService = userService;
|
|
11223
11103
|
this.navigatorService = navigatorService;
|
|
11224
11104
|
this.supportService = supportService;
|
|
11225
11105
|
this.baseVisibilityService = baseVisibilityService;
|
|
11106
|
+
this.calendar = calendar;
|
|
11107
|
+
this.formatter = formatter;
|
|
11108
|
+
this.filterService = filterService;
|
|
11109
|
+
this.cacheService = cacheService;
|
|
11226
11110
|
this.isCollapsed = true;
|
|
11227
11111
|
this.isVisitor = true;
|
|
11228
11112
|
this.isVisible = false;
|
|
11229
11113
|
this.isChangePositionVisible = false;
|
|
11114
|
+
this.hoveredDate = null;
|
|
11115
|
+
this.isDateFilterApplied = false;
|
|
11116
|
+
this.dateChanged = false;
|
|
11117
|
+
this.onSearchKeydown = (event) => {
|
|
11118
|
+
if (event.key === 'Enter')
|
|
11119
|
+
this.onSubmit();
|
|
11120
|
+
};
|
|
11230
11121
|
this.userSubscription = this.userService.isChanged.subscribe((isChanged) => {
|
|
11231
11122
|
if (isChanged) {
|
|
11232
11123
|
this.update();
|
|
@@ -11235,30 +11126,64 @@ class MenuBarComponent {
|
|
|
11235
11126
|
this.navSubscription = this.navigatorService.isVisibleChanged.subscribe((data) => {
|
|
11236
11127
|
this.isVisible = data;
|
|
11237
11128
|
});
|
|
11238
|
-
this.baseVisibilityService.isChangePositionVisible.subscribe((data) => {
|
|
11129
|
+
this.changePositionSubscription = this.baseVisibilityService.isChangePositionVisible.subscribe((data) => {
|
|
11239
11130
|
this.isChangePositionVisible = data;
|
|
11240
11131
|
});
|
|
11241
11132
|
}
|
|
11242
11133
|
ngOnInit() {
|
|
11243
11134
|
this.update();
|
|
11135
|
+
if (this.cacheName) {
|
|
11136
|
+
this.cache = this.cacheService.getFromCache(this.cacheName);
|
|
11137
|
+
}
|
|
11138
|
+
if (this.cache) {
|
|
11139
|
+
this.isDateFilterApplied = true;
|
|
11140
|
+
let { from, to } = this.cache;
|
|
11141
|
+
this.toDate = this.getNgbDate(to);
|
|
11142
|
+
this.fromDate = this.getNgbDate(from);
|
|
11143
|
+
localStorage.setItem('startDate', from.toString());
|
|
11144
|
+
localStorage.setItem('endDate', to.toString());
|
|
11145
|
+
this.filterService.dateFilterUpdated([new Date(from), new Date(to)]);
|
|
11146
|
+
}
|
|
11147
|
+
else {
|
|
11148
|
+
this.fromDate = null;
|
|
11149
|
+
this.toDate = null;
|
|
11150
|
+
localStorage.removeItem('startDate');
|
|
11151
|
+
localStorage.removeItem('endDate');
|
|
11152
|
+
this.filterService.dateFilterUpdated(null);
|
|
11153
|
+
}
|
|
11154
|
+
// This allows updating the inputs when measurement.service changes the date programmatically
|
|
11155
|
+
this.filterSubscription = this.filterService.subscribeToDataFilterUpdate((dateRange) => {
|
|
11156
|
+
if (dateRange && dateRange.length === 2) {
|
|
11157
|
+
// 1. Convert JS Date objects to NgbDate for display
|
|
11158
|
+
const from = dateRange[0].getTime();
|
|
11159
|
+
const to = dateRange[1].getTime();
|
|
11160
|
+
this.fromDate = this.getNgbDate(from);
|
|
11161
|
+
this.toDate = this.getNgbDate(to);
|
|
11162
|
+
// 2. Update local cache reference to prevent the "Apply" button from activating
|
|
11163
|
+
this.cache = { from, to };
|
|
11164
|
+
// 3. Update visual state
|
|
11165
|
+
this.isDateFilterApplied = true;
|
|
11166
|
+
this.dateChanged = false; // We consider it synchronized
|
|
11167
|
+
}
|
|
11168
|
+
else {
|
|
11169
|
+
// If the filter is cleared externally
|
|
11170
|
+
this.fromDate = null;
|
|
11171
|
+
this.toDate = null;
|
|
11172
|
+
this.isDateFilterApplied = false;
|
|
11173
|
+
this.cache = null;
|
|
11174
|
+
}
|
|
11175
|
+
});
|
|
11244
11176
|
}
|
|
11245
11177
|
ngAfterViewInit() {
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
input.addEventListener('keydown', ({ key }) => {
|
|
11249
|
-
if (key === 'Enter') {
|
|
11250
|
-
this.onSubmit();
|
|
11251
|
-
}
|
|
11252
|
-
});
|
|
11253
|
-
}
|
|
11178
|
+
this.searchInput = document.querySelector('#mainSearchBar');
|
|
11179
|
+
this.searchInput?.addEventListener('keydown', this.onSearchKeydown);
|
|
11254
11180
|
}
|
|
11255
11181
|
ngOnDestroy() {
|
|
11256
|
-
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
}
|
|
11182
|
+
this.searchInput?.removeEventListener('keydown', this.onSearchKeydown);
|
|
11183
|
+
this.userSubscription?.unsubscribe();
|
|
11184
|
+
this.navSubscription?.unsubscribe();
|
|
11185
|
+
this.changePositionSubscription?.unsubscribe();
|
|
11186
|
+
this.filterSubscription?.unsubscribe();
|
|
11262
11187
|
}
|
|
11263
11188
|
async signOut() {
|
|
11264
11189
|
await this.userService.logoutCurrentAndSignOutAuth();
|
|
@@ -11290,15 +11215,104 @@ class MenuBarComponent {
|
|
|
11290
11215
|
}
|
|
11291
11216
|
onChangePositionClick() {
|
|
11292
11217
|
this.baseVisibilityService.isChangePositionVisible.next(!this.isChangePositionVisible);
|
|
11293
|
-
|
|
11218
|
+
}
|
|
11219
|
+
getNgbDate(date) {
|
|
11220
|
+
let dt = new Date(date);
|
|
11221
|
+
dt.setMinutes(dt.getMinutes() - dt.getTimezoneOffset()); // convert to UTC
|
|
11222
|
+
return new NgbDate(dt.getUTCFullYear(), dt.getUTCMonth() + 1, dt.getUTCDate());
|
|
11223
|
+
}
|
|
11224
|
+
onDateSelection(date) {
|
|
11225
|
+
if (!this.fromDate && !this.toDate) {
|
|
11226
|
+
this.fromDate = date;
|
|
11227
|
+
}
|
|
11228
|
+
else if (this.fromDate &&
|
|
11229
|
+
!this.toDate &&
|
|
11230
|
+
date &&
|
|
11231
|
+
date.after(this.fromDate)) {
|
|
11232
|
+
this.toDate = date;
|
|
11233
|
+
}
|
|
11234
|
+
else {
|
|
11235
|
+
this.toDate = null;
|
|
11236
|
+
this.fromDate = date;
|
|
11237
|
+
}
|
|
11238
|
+
this.isDateChanged();
|
|
11239
|
+
}
|
|
11240
|
+
isDateChanged() {
|
|
11241
|
+
if (this.fromDate && this.toDate) {
|
|
11242
|
+
if (this.cache) {
|
|
11243
|
+
this.dateChanged =
|
|
11244
|
+
!this.fromDate.equals(this.getNgbDate(this.cache.from)) ||
|
|
11245
|
+
!this.toDate.equals(this.getNgbDate(this.cache.to));
|
|
11246
|
+
}
|
|
11247
|
+
}
|
|
11248
|
+
}
|
|
11249
|
+
isHovered(date) {
|
|
11250
|
+
return (this.fromDate &&
|
|
11251
|
+
!this.toDate &&
|
|
11252
|
+
this.hoveredDate &&
|
|
11253
|
+
date.after(this.fromDate) &&
|
|
11254
|
+
date.before(this.hoveredDate));
|
|
11255
|
+
}
|
|
11256
|
+
isInside(date) {
|
|
11257
|
+
return this.toDate && date.after(this.fromDate) && date.before(this.toDate);
|
|
11258
|
+
}
|
|
11259
|
+
isRange(date) {
|
|
11260
|
+
return (date.equals(this.fromDate) ||
|
|
11261
|
+
(this.toDate && date.equals(this.toDate)) ||
|
|
11262
|
+
this.isInside(date) ||
|
|
11263
|
+
this.isHovered(date));
|
|
11264
|
+
}
|
|
11265
|
+
validateInput(currentValue, input) {
|
|
11266
|
+
const parsed = this.formatter.parse(input);
|
|
11267
|
+
return parsed && this.calendar.isValid(NgbDate.from(parsed))
|
|
11268
|
+
? NgbDate.from(parsed)
|
|
11269
|
+
: currentValue;
|
|
11270
|
+
}
|
|
11271
|
+
emitRange() {
|
|
11272
|
+
if (this.fromDate && this.toDate) {
|
|
11273
|
+
const from = new Date(this.fromDate.year, this.fromDate.month - 1, this.fromDate.day);
|
|
11274
|
+
const to = new Date(this.toDate.year, this.toDate.month - 1, this.toDate.day, 23, 59);
|
|
11275
|
+
this.cacheService.putInCache(this.cacheName, {
|
|
11276
|
+
from: from.getTime(),
|
|
11277
|
+
to: to.getTime(),
|
|
11278
|
+
});
|
|
11279
|
+
this.cache = { from: from.getTime(), to: to.getTime() };
|
|
11280
|
+
this.filterService.dateFilterUpdated([from, to]);
|
|
11281
|
+
this.isDateFilterApplied = true;
|
|
11282
|
+
this.dateChanged = false;
|
|
11283
|
+
}
|
|
11284
|
+
}
|
|
11285
|
+
onClearDates() {
|
|
11286
|
+
this.fromDate = null;
|
|
11287
|
+
this.toDate = null;
|
|
11288
|
+
this.isDateFilterApplied = false;
|
|
11289
|
+
this.cache = null;
|
|
11290
|
+
this.cacheService.removeFromCache(this.cacheName);
|
|
11291
|
+
this.filterService.dateFilterUpdated(null);
|
|
11292
|
+
}
|
|
11293
|
+
onApply() {
|
|
11294
|
+
if (this.fromDate && this.toDate) {
|
|
11295
|
+
this.emitRange();
|
|
11296
|
+
}
|
|
11297
|
+
//transform ngbDate to date objet then put dates in timestamp in localStorage to share it with Retool
|
|
11298
|
+
if (this.fromDate) {
|
|
11299
|
+
const startDate = new Date(this.fromDate.year, this.fromDate.month - 1, this.fromDate.day);
|
|
11300
|
+
localStorage.setItem('startDate', startDate.getTime().toString());
|
|
11301
|
+
}
|
|
11302
|
+
if (this.toDate) {
|
|
11303
|
+
const endDate = new Date(this.toDate.year, this.toDate.month - 1, this.toDate.day);
|
|
11304
|
+
localStorage.setItem('endDate', endDate.getTime().toString());
|
|
11305
|
+
}
|
|
11294
11306
|
}
|
|
11295
11307
|
}
|
|
11296
|
-
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 });
|
|
11297
|
-
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 } });
|
|
11308
|
+
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 });
|
|
11309
|
+
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 } });
|
|
11298
11310
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MenuBarComponent, decorators: [{
|
|
11299
11311
|
type: Component,
|
|
11300
|
-
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"] }]
|
|
11301
|
-
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: LocaleService }, { type: BaseUserService }, { type: NavigatorService }, { type: SupportService }, { type: BaseVisibilityService }]; }
|
|
11312
|
+
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"] }]
|
|
11313
|
+
}], 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: [{
|
|
11314
|
+
type: Input
|
|
11315
|
+
}] } });
|
|
11302
11316
|
|
|
11303
11317
|
class NgxSmarterplanCoreModule {
|
|
11304
11318
|
static forRoot(config) {
|
|
@@ -11325,7 +11339,6 @@ NgxSmarterplanCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0"
|
|
|
11325
11339
|
MenuBarComponent,
|
|
11326
11340
|
AvatarComponent,
|
|
11327
11341
|
NavigationBarComponent,
|
|
11328
|
-
RangeDatePickerComponent,
|
|
11329
11342
|
LoaderComponent,
|
|
11330
11343
|
SupportModalComponent,
|
|
11331
11344
|
FormatDateNumberToDigitsPipe], imports: [FormsModule,
|
|
@@ -11368,7 +11381,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
11368
11381
|
MenuBarComponent,
|
|
11369
11382
|
AvatarComponent,
|
|
11370
11383
|
NavigationBarComponent,
|
|
11371
|
-
RangeDatePickerComponent,
|
|
11372
11384
|
LoaderComponent,
|
|
11373
11385
|
SupportModalComponent,
|
|
11374
11386
|
FormatDateNumberToDigitsPipe
|