@onemrvapublic/design-system 18.1.3 → 18.2.0-develop.1
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/esm2022/layout/src/components/layout/layout.component.mjs +11 -4
- package/esm2022/mat-input-country/src/onemrva-mat-input-country.component.mjs +3 -3
- package/esm2022/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.mjs +3 -3
- package/esm2022/mat-input-phone/src/onemrva-mat-input-phone.component.mjs +3 -3
- package/esm2022/shared/index.mjs +13 -11
- package/esm2022/shared/src/lib/adapters/date.adapter.mjs +62 -0
- package/esm2022/shared/src/lib/adapters/index.mjs +2 -0
- package/esm2022/shared/src/lib/components/index.mjs +2 -0
- package/esm2022/shared/src/lib/constants/CDNUrlModeOptions.mjs +6 -0
- package/esm2022/shared/src/lib/constants/cdn.mjs +3 -0
- package/esm2022/shared/src/lib/constants/constants.mjs +6 -0
- package/esm2022/shared/src/lib/constants/date.format.mjs +12 -0
- package/esm2022/shared/src/lib/constants/index.mjs +5 -0
- package/esm2022/shared/src/lib/decorators/index.mjs +2 -0
- package/esm2022/shared/src/lib/helpers/index.mjs +2 -0
- package/esm2022/shared/src/lib/helpers/translation-helper.mjs +30 -0
- package/esm2022/shared/src/lib/loaders/index.mjs +3 -0
- package/esm2022/shared/src/lib/loaders/onemrva-translate-cdn-loader.mjs +15 -0
- package/esm2022/shared/src/lib/loaders/onemrva-translate-http-loader.mjs +30 -0
- package/esm2022/shared/src/lib/services/cdn.service.mjs +28 -68
- package/esm2022/shared/src/lib/services/country-cdn.service.mjs +72 -0
- package/esm2022/shared/src/lib/services/country-lookup.service.mjs +38 -0
- package/esm2022/shared/src/lib/services/index.mjs +3 -2
- package/esm2022/shared/src/lib/shared.datepicker.module.mjs +3 -3
- package/esm2022/shared/src/lib/validators/bank-account.validator.utils.mjs +45 -0
- package/esm2022/shared/src/lib/validators/index.mjs +3 -0
- package/fesm2022/onemrvapublic-design-system-layout.mjs +10 -3
- package/fesm2022/onemrvapublic-design-system-layout.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-country.mjs +2 -2
- package/fesm2022/onemrvapublic-design-system-mat-input-country.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-enterprise-number.mjs +2 -2
- package/fesm2022/onemrvapublic-design-system-mat-input-enterprise-number.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-phone.mjs +2 -2
- package/fesm2022/onemrvapublic-design-system-mat-input-phone.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-shared.mjs +591 -490
- package/fesm2022/onemrvapublic-design-system-shared.mjs.map +1 -1
- package/layout/src/components/layout/layout.component.scss +1 -1
- package/mat-input-country/src/onemrva-mat-input-country.component.d.ts +2 -2
- package/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.d.ts +2 -2
- package/mat-input-phone/src/onemrva-mat-input-phone.component.d.ts +2 -2
- package/package.json +1 -1
- package/shared/index.d.ts +12 -10
- package/shared/src/lib/adapters/index.d.ts +1 -0
- package/shared/src/lib/components/index.d.ts +1 -0
- package/shared/src/lib/{constants.d.ts → constants/constants.d.ts} +1 -0
- package/shared/src/lib/constants/index.d.ts +4 -0
- package/shared/src/lib/decorators/index.d.ts +1 -0
- package/shared/src/lib/helpers/index.d.ts +1 -0
- package/shared/src/lib/helpers/translation-helper.d.ts +2 -0
- package/shared/src/lib/loaders/index.d.ts +2 -0
- package/shared/src/lib/loaders/onemrva-translate-cdn-loader.d.ts +14 -0
- package/shared/src/lib/loaders/onemrva-translate-http-loader.d.ts +14 -0
- package/shared/src/lib/services/cdn.service.d.ts +7 -86
- package/shared/src/lib/services/country-cdn.service.d.ts +89 -0
- package/shared/src/lib/services/{commonCountryLookup.service.d.ts → country-lookup.service.d.ts} +1 -1
- package/shared/src/lib/services/index.d.ts +2 -1
- package/shared/src/lib/validators/index.d.ts +2 -0
- package/esm2022/shared/src/lib/CDNUrlModeOptions.mjs +0 -6
- package/esm2022/shared/src/lib/OnemrvaDateAdapter.mjs +0 -62
- package/esm2022/shared/src/lib/constants.mjs +0 -5
- package/esm2022/shared/src/lib/date.format.mjs +0 -12
- package/esm2022/shared/src/lib/injectionTokens.mjs +0 -3
- package/esm2022/shared/src/lib/services/commonCountryLookup.service.mjs +0 -38
- package/esm2022/shared/src/lib/validators/bankAccountValidator.utils.mjs +0 -45
- /package/shared/src/lib/{OnemrvaDateAdapter.d.ts → adapters/date.adapter.d.ts} +0 -0
- /package/shared/src/lib/{CDNUrlModeOptions.d.ts → constants/CDNUrlModeOptions.d.ts} +0 -0
- /package/shared/src/lib/{injectionTokens.d.ts → constants/cdn.d.ts} +0 -0
- /package/shared/src/lib/{date.format.d.ts → constants/date.format.d.ts} +0 -0
- /package/shared/src/lib/validators/{bankAccountValidator.utils.d.ts → bank-account.validator.utils.d.ts} +0 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { map, startWith } from 'rxjs/operators';
|
|
3
|
+
import { combineLatestWith, from } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "./cdn.service";
|
|
6
|
+
import * as i2 from "@ngx-translate/core";
|
|
7
|
+
export class OnemRvaCDNCountryService {
|
|
8
|
+
constructor(cdnService, translateService) {
|
|
9
|
+
this.cdnService = cdnService;
|
|
10
|
+
this.translateService = translateService;
|
|
11
|
+
}
|
|
12
|
+
getCountries() {
|
|
13
|
+
return this.cdnService.fetch('/json/countries.json').pipe(combineLatestWith(from(this.translateService.onLangChange).pipe(startWith(this.translateService.currentLang))), map(([response]) => {
|
|
14
|
+
return response
|
|
15
|
+
.slice()
|
|
16
|
+
.map(country => {
|
|
17
|
+
const translatedName = this.getTranslatedCountryName(country, this.translateService.currentLang);
|
|
18
|
+
return { ...country, name: translatedName };
|
|
19
|
+
})
|
|
20
|
+
.sort((a, b) => {
|
|
21
|
+
const fa = a.name.toLowerCase(), fb = b.name.toLowerCase();
|
|
22
|
+
if (fa < fb) {
|
|
23
|
+
return -1;
|
|
24
|
+
}
|
|
25
|
+
if (fa > fb) {
|
|
26
|
+
return 1;
|
|
27
|
+
}
|
|
28
|
+
return 0;
|
|
29
|
+
});
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
getCountriesByZone(zone) {
|
|
33
|
+
return this.getCountries().pipe(map(countries => {
|
|
34
|
+
return countries.filter(country => country.zone === zone);
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
getTranslatedCountryName(country, languageCode = this.translateService.currentLang) {
|
|
38
|
+
if (languageCode === 'fr' ||
|
|
39
|
+
languageCode === 'nl' ||
|
|
40
|
+
languageCode === 'de') {
|
|
41
|
+
if (country.translations[languageCode] !== undefined)
|
|
42
|
+
return country.translations[languageCode];
|
|
43
|
+
}
|
|
44
|
+
return country.name;
|
|
45
|
+
}
|
|
46
|
+
findCountryFromCode(code) {
|
|
47
|
+
return this.getCountries().pipe(map(countries => {
|
|
48
|
+
return countries.find((country) => country.code.toLowerCase() === code.toLowerCase());
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
findCountryFromVIESCode(code) {
|
|
52
|
+
return this.getCountriesByZone('EU').pipe(map(countries => {
|
|
53
|
+
return countries.find((country) => country.pattern.substring(0, 2) === code.substring(0, 2));
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
findCountryFromPrefix(number) {
|
|
57
|
+
return this.getCountries().pipe(map(countries => {
|
|
58
|
+
return countries.find((country) => {
|
|
59
|
+
return (country.dial_code === number.substring(0, country.dial_code.length));
|
|
60
|
+
});
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: OnemRvaCDNCountryService, deps: [{ token: i1.OnemRvaCDNService }, { token: i2.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
64
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: OnemRvaCDNCountryService, providedIn: 'root' }); }
|
|
65
|
+
}
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: OnemRvaCDNCountryService, decorators: [{
|
|
67
|
+
type: Injectable,
|
|
68
|
+
args: [{
|
|
69
|
+
providedIn: 'root',
|
|
70
|
+
}]
|
|
71
|
+
}], ctorParameters: () => [{ type: i1.OnemRvaCDNService }, { type: i2.TranslateService }] });
|
|
72
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY291bnRyeS1jZG4uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL29uZW1ydmEvZGVzaWduLXN5c3RlbS9zaGFyZWQvc3JjL2xpYi9zZXJ2aWNlcy9jb3VudHJ5LWNkbi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLEdBQUcsRUFBRSxTQUFTLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUVoRCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsSUFBSSxFQUFFLE1BQU0sTUFBTSxDQUFDOzs7O0FBb0IvQyxNQUFNLE9BQU8sd0JBQXdCO0lBQ25DLFlBQ1UsVUFBNkIsRUFDN0IsZ0JBQWtDO1FBRGxDLGVBQVUsR0FBVixVQUFVLENBQW1CO1FBQzdCLHFCQUFnQixHQUFoQixnQkFBZ0IsQ0FBa0I7SUFDekMsQ0FBQztJQUVHLFlBQVk7UUFDakIsT0FBTyxJQUFJLENBQUMsVUFBVSxDQUFDLEtBQUssQ0FBQyxzQkFB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ICAgc3RhcnRXaXRoKHRoaXMudHJhbnNsYXRlU2VydmljZS5jdXJyZW50TGFuZyksXG4gICAgICAgICksXG4gICAgICApLFxuICAgICAgbWFwKChbcmVzcG9uc2VdKSA9PiB7XG4gICAgICAgIHJldHVybiAocmVzcG9uc2UgYXMgT25lbXJ2YU1hdGVyaWFsQ291bnRyeVtdKVxuICAgICAgICAgIC5zbGljZSgpXG4gICAgICAgICAgLm1hcChjb3VudHJ5ID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHRyYW5zbGF0ZWROYW1lID0gdGhpcy5nZXRUcmFuc2xhdGVkQ291bnRyeU5hbWUoXG4gICAgICAgICAgICAgIGNvdW50cnksXG4gICAgICAgICAgICAgIHRoaXMudHJhbnNsYXRlU2VydmljZS5jdXJyZW50TGFuZyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICByZXR1cm4geyAuLi5jb3VudHJ5LCBuYW1lOiB0cmFuc2xhdGVkTmFtZSB9O1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLnNvcnQoKGEsIGIpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IGZhID0gYS5uYW1lLnRvTG93ZXJDYXNlKCksXG4gICAgICAgICAgICAgIGZiID0gYi5uYW1lLnRvTG93ZXJDYXNlKCk7XG5cbiAgICAgICAgICAgIGlmIChmYSA8IGZiKSB7XG4gICAgICAgICAgICAgIHJldHVybiAtMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChmYSA+IGZiKSB7XG4gICAgICAgICAgICAgIHJldHVybiAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgfSk7XG4gICAgICB9KSxcbiAgICApO1xuICB9XG5cbiAgcHVibGljIGdldENvdW50cmllc0J5Wm9uZSh6b25lOiBzdHJpbmcpIHtcbiAgICByZXR1cm4gdGhpcy5nZXRDb3VudHJpZXMoKS5waXBlKFxuICAgICAgbWFwKGNvdW50cmllcyA9PiB7XG4gIC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cbiAgICByZXR1cm4gdGhpcy5nZXRDb3VudHJpZXNCeVpvbmUoJ0VVJykucGlwZShcbiAgICAgIG1hcChjb3VudHJpZXMgPT4ge1xuICAgICAgICByZXR1cm4gY291bnRyaWVzLmZpbmQoXG4gICAgICAgICAgKGNvdW50cnk6IE9uZW1ydmFNYXRlcmlhbENvdW50cnkpID0+XG4gICAgICAgICAgICBjb3VudHJ5LnBhdHRlcm4uc3Vic3RyaW5nKDAsIDIpID09PSBjb2RlLnN1YnN0cmluZygwLCAyKSxcbiAgICAgICAgKTtcbiAgICAgIH0pLFxuICAgICk7XG4gIH1cblxuICBwdWJsaWMgZmluZENvdW50cnlGcm9tUHJlZml4KG51bWJlcjogYW55KSB7XG4gICAgcmV0dXJuIHRoaXMuZ2V0Q291bnRyaWVzKCkucGlwZShcbiAgICAgIG1hcChjb3VudHJpZXMgPT4ge1xuICAgICAgICByZXR1cm4gY291bnRyaWVzLmZpbmQoKGNvdW50cnk6IE9uZW1ydmFNYXRlcmlhbENvdW50cnkpID0+IHtcbiAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgY291bnRyeS5kaWFsX2NvZGUgPT09IG51bWJlci5zdWJzdHJpbmcoMCwgY291bnRyeS5kaWFsX2NvZGUubGVuZ3RoKVxuICAgICAgICAgICk7XG4gICAgICAgIH0pO1xuICAgICAgfSksXG4gICAgKTtcbiAgfVxufVxuIl19
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { map, ReplaySubject, skip, distinctUntilChanged, } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common/http";
|
|
5
|
+
export class CommonCountryLookupService {
|
|
6
|
+
constructor(http) {
|
|
7
|
+
this.http = http;
|
|
8
|
+
this.commonCountryServiceURL = 'http://services/lookupwpptservice/rest/lookup/getLookups?class=be.fgov.onerva.lookup.wppt.persistence.model.common.Country';
|
|
9
|
+
this._countries$ = new ReplaySubject(1);
|
|
10
|
+
this._customersInitialized = false;
|
|
11
|
+
}
|
|
12
|
+
getCountries(refresh = false) {
|
|
13
|
+
if (refresh || !this._customersInitialized) {
|
|
14
|
+
this._customersInitialized = true;
|
|
15
|
+
this.http
|
|
16
|
+
.get(this.commonCountryServiceURL)
|
|
17
|
+
.subscribe(countries => {
|
|
18
|
+
this._countries$.next(countries);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return this._countries$.pipe(skip(+refresh), distinctUntilChanged());
|
|
22
|
+
}
|
|
23
|
+
getCountryByCode(code) {
|
|
24
|
+
return this._countries$.pipe(map(countries => {
|
|
25
|
+
const country = countries.find(country => country.code === code);
|
|
26
|
+
return country || null;
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: CommonCountryLookupService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
30
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: CommonCountryLookupService, providedIn: 'root' }); }
|
|
31
|
+
}
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: CommonCountryLookupService, decorators: [{
|
|
33
|
+
type: Injectable,
|
|
34
|
+
args: [{
|
|
35
|
+
providedIn: 'root',
|
|
36
|
+
}]
|
|
37
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
38
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY291bnRyeS1sb29rdXAuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL29uZW1ydmEvZGVzaWduLXN5c3RlbS9zaGFyZWQvc3JjL2xp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nRyeSA9IGNvdW50cmllcy5maW5kKGNvdW50cnkgPT4gY291bnRyeS5jb2RlID09PSBjb2RlKTtcblxuICAgICAgICByZXR1cm4gY291bnRyeSB8fCBudWxsO1xuICAgICAgfSksXG4gICAgKTtcbiAgfVxufVxuIl19
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './country-lookup.service';
|
|
2
2
|
export * from './cdn.service';
|
|
3
|
-
|
|
3
|
+
export * from './country-cdn.service';
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9vbmVtcnZhL2Rlc2lnbi1zeXN0ZW0vc2hhcmVkL3NyYy9saWIvc2VydmljZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYywwQkFBMEIsQ0FBQztBQUN6QyxjQUFjLGVBQWUsQ0FBQztBQUM5QixjQUFjLHVCQUF1QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9jb3VudHJ5LWxvb2t1cC5zZXJ2aWNlJztcbmV4cG9ydCAqIGZyb20gJy4vY2RuLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9jb3VudHJ5LWNkbi5zZXJ2aWNlJztcbiJdfQ==
|
|
@@ -4,8 +4,8 @@ import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
|
4
4
|
import { LuxonDateModule } from '@angular/material-luxon-adapter';
|
|
5
5
|
import { of } from 'rxjs';
|
|
6
6
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
7
|
-
import { OnemrvaDateAdapter } from './
|
|
8
|
-
import { ONEMRVA_FORMAT } from './date.format';
|
|
7
|
+
import { OnemrvaDateAdapter } from './adapters/date.adapter';
|
|
8
|
+
import { ONEMRVA_FORMAT } from './constants/date.format';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
function translateDatepicker(translateService, adapter) {
|
|
11
11
|
return () => {
|
|
@@ -80,4 +80,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImpor
|
|
|
80
80
|
],
|
|
81
81
|
}]
|
|
82
82
|
}] });
|
|
83
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
83
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hhcmVkLmRhdGVwaWNrZXIubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvb25lbXJ2YS9kZXNpZ24tc3lzdGVtL3NoYXJlZC9zcmMvbGliL3NoYXJlZC5kYXRlcGlja2VyLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsZUFBZSxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMxRCxPQUFPLEVBQ0wsV0FBVyxFQUNYLGdCQUFnQixFQUNoQixlQUFlLEVBQ2YsbUJBQW1CLEdBQ3BCLE1BQU0sd0JBQXdCLENBQUM7QUFDaEMsT0FBTyxFQUFFLGVBQWUsRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ3hFLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUNsRSxPQUFPLEVBQWMsRUFBRSxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQ3RDLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLDhCQUE4QixDQUFDO0FBQ25FLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzdELE9BQU8sRUFBRSxjQ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zOiBbXSxcbiAgaW1wb3J0czogW1xuICAgIE1hdERhdGVwaWNrZXJNb2R1bGUsXG4gICAgVHJhbnNsYXRlTW9kdWxlLFxuICAgIE1hdE5hdGl2ZURhdGVNb2R1bGUsXG4gICAgTHV4b25EYXRlTW9kdWxlLFxuICBdLFxuICBleHBvcnRzOiBbXSxcbiAgcHJvdmlkZXJzOiBbXG4gICAge1xuICAgICAgcHJvdmlkZTogTUFUX0RBVEVfTE9DQUxFLFxuICAgICAgdXNlVmFsdWU6ICdmcicsXG4gICAgfSxcbiAgICB7XG4gICAgICBwcm92aWRlOiBEYXRlQWRhcHRlcixcbiAgICAgIHVzZUNsYXNzOiBPbmVtcnZhRGF0ZUFkYXB0ZXIsXG4gICAgfSxcbiAgICB7XG4gICAgICBwcm92aWRlOiBNQVRfREFURV9GT1JNQVRTLFxuICAgICAgdXNlVmFsdWU6IE9ORU1SVkFfRk9STUFULFxuICAgIH0sXG4gICAge1xuICAgICAgcHJvdmlkZTogQVBQX0lOSVRJQUxJWkVSLFxuICAgICAgdXNlRmFjdG9yeTogdHJhbnNsYXRlRGF0ZXBpY2tlcixcbiAgICAgIGRlcHM6IFtUcmFuc2xhdGVTZXJ2aWNlLCBEYXRlQWRhcHRlcjxhbnk+XSxcbiAgICAgIG11bHRpOiB0cnVlLFxuICAgIH0sXG4gIF0sXG59KVxuZXhwb3J0IGNsYXNzIE9uZW1ydmFEYXRlcGlja2VyU2hhcmVkTW9kdWxlIHt9XG4iXX0=
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { validateIBAN, electronicFormatIBAN, countrySpecs, ValidationErrorsIBAN, } from 'ibantools';
|
|
2
|
+
export const IBAN_SUPPORTED_COUNTRIES = Object.keys(countrySpecs);
|
|
3
|
+
const internValidateIban = (iban = '') => {
|
|
4
|
+
return validateIBAN(electronicFormatIBAN(iban) || undefined);
|
|
5
|
+
};
|
|
6
|
+
// const getMappedCodes = (errorCodes: ValidationErrorsIBAN[], value?: any) => {
|
|
7
|
+
// const mappedCodes = errorCodes.map(code => ValidationErrorsIBAN[code]);
|
|
8
|
+
//
|
|
9
|
+
// if (mappedCodes.length > 0) {
|
|
10
|
+
// const listCodes: Record<string, any> = {};
|
|
11
|
+
//
|
|
12
|
+
// mappedCodes.forEach((code: string) => {
|
|
13
|
+
// listCodes[code] = { value };
|
|
14
|
+
// });
|
|
15
|
+
//
|
|
16
|
+
// return listCodes as ValidationErrors;
|
|
17
|
+
// }
|
|
18
|
+
//
|
|
19
|
+
// return null;
|
|
20
|
+
// };
|
|
21
|
+
export const bankAccountValidator = () => {
|
|
22
|
+
return (control) => {
|
|
23
|
+
let finalErrorCodes;
|
|
24
|
+
if (typeof control.getRawValue() === 'string') {
|
|
25
|
+
const { valid: _valid, errorCodes } = internValidateIban(control.value);
|
|
26
|
+
finalErrorCodes = errorCodes;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
const countryCodeValue = control.value !== null ? control.value['countryCode'] : '';
|
|
30
|
+
const bankNumber = control.value !== null ? control.value['bban'] : '';
|
|
31
|
+
const { valid: _valid, errorCodes } = internValidateIban(`${countryCodeValue}${bankNumber}`);
|
|
32
|
+
finalErrorCodes = errorCodes;
|
|
33
|
+
}
|
|
34
|
+
if (finalErrorCodes.length === 0) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
const validationErrors = {};
|
|
38
|
+
finalErrorCodes.forEach(errCode => {
|
|
39
|
+
const key = ValidationErrorsIBAN[errCode];
|
|
40
|
+
validationErrors[key] = { value: control.getRawValue() };
|
|
41
|
+
});
|
|
42
|
+
return validationErrors;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFuay1hY2NvdW50LnZhbGlkYXRvci51dGlscy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3Rz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Bjb25zdCB2YWxpZGF0aW9uRXJyb3JzOiBSZWNvcmQ8c3RyaW5nLCB7IHZhbHVlOiBhbnkgfT4gPSB7fTtcbiAgICBmaW5hbEVycm9yQ29kZXMuZm9yRWFjaChlcnJDb2RlID0+IHtcbiAgICAgIGNvbnN0IGtleSA9IFZhbGlkYXRpb25FcnJvcnNJQkFOW2VyckNvZGVdO1xuXG4gICAgICB2YWxpZGF0aW9uRXJyb3JzW2tleV0gPSB7IHZhbHVlOiBjb250cm9sLmdldFJhd1ZhbHVlKCkgfTtcbiAgICB9KTtcblxuICAgIHJldHVybiB2YWxpZGF0aW9uRXJyb3JzO1xuICB9O1xufTtcbiJdfQ==
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from './onemrva-validators';
|
|
2
|
+
export * from './bank-account.validator.utils';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9vbmVtcnZhL2Rlc2lnbi1zeXN0ZW0vc2hhcmVkL3NyYy9saWIvdmFsaWRhdG9ycy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHNCQUFzQixDQUFDO0FBQ3JDLGNBQWMsZ0NBQWdDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL29uZW1ydmEtdmFsaWRhdG9ycyc7XG5leHBvcnQgKiBmcm9tICcuL2JhbmstYWNjb3VudC52YWxpZGF0b3IudXRpbHMnO1xuIl19
|
|
@@ -413,7 +413,14 @@ class LayoutComponent {
|
|
|
413
413
|
this.isSmall = true;
|
|
414
414
|
this.id = 'main';
|
|
415
415
|
this.role = 'main';
|
|
416
|
-
|
|
416
|
+
if (this.languages.length === 0) {
|
|
417
|
+
this.translateService.getLangs().forEach(value => {
|
|
418
|
+
this.languages.push({
|
|
419
|
+
code: value,
|
|
420
|
+
label: value.toUpperCase(),
|
|
421
|
+
});
|
|
422
|
+
});
|
|
423
|
+
}
|
|
417
424
|
}
|
|
418
425
|
ngOnInit() {
|
|
419
426
|
this.selectedIndex = this.languages.findIndex(l => l.code === this.translateService.currentLang);
|
|
@@ -478,11 +485,11 @@ class LayoutComponent {
|
|
|
478
485
|
this.drawer.open();
|
|
479
486
|
}
|
|
480
487
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: LayoutComponent, deps: [{ token: i1$2.TranslateService }, { token: i0.ChangeDetectorRef }, { token: i2.BreakpointObserver }, { token: DOCUMENT }, { token: OnemrvaDrawerService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
481
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.5", type: LayoutComponent, selector: "onemrva-layout", inputs: { logo: "logo", languages: "languages", environment: "environment", logoRedictionUrl: "logoRedictionUrl", profile: "profile", id: "id", role: "role" }, outputs: { login: "login", logout: "logout" }, queries: [{ propertyName: "title", first: true, predicate: LayoutTitleComponent, descendants: true }, { propertyName: "loginMenu", first: true, predicate: LayoutLoginMenuComponent, descendants: true }, { propertyName: "content", first: true, predicate: LayoutContentComponent, descendants: true }, { propertyName: "afterNav", first: true, predicate: LayoutAfterNavComponent, descendants: true }, { propertyName: "footer", first: true, predicate: LayoutFooterComponent, descendants: true }, { propertyName: "routes", predicate: LayoutRouteComponent }], viewQueries: [{ propertyName: "drawer", first: true, predicate: MatDrawer, descendants: true, static: true }, { propertyName: "drawerHost", first: true, predicate: DrawerHostDirective, descendants: true, static: true }], ngImport: i0, template: "<mat-drawer-container\n class=\"example-container\"\n [hasBackdrop]=\"drawerService.hasBackdrop\"\n autosize\n>\n <div class=\"app-content\">\n <header>\n <mat-toolbar class=\"mat-elevation-z4\">\n <div class=\"environment\" [class]=\"environment\">\n {{ environment }}\n </div>\n <div\n [class.onemrva-layout-container]=\"!fluid\"\n class=\"nav-container flex-center\"\n >\n {{ logoRedictionUrl }}\n <img\n class=\"logo\"\n [src]=\"logo\"\n [attr.data-cy]=\"\n 'onemrva_logo_' + currentLanguage.toLocaleLowerCase()\n \"\n alt=\"Logo ONEM/RVA\"\n [routerLink]=\"\n logoRedictionUrl !== null ? logoRedictionUrl : undefined\n \"\n [ngStyle]=\"{\n cursor: logoRedictionUrl !== null ? 'pointer' : 'default',\n }\"\n />\n <div\n class=\"application-title\"\n [ngClass]=\"{ 'small-screen': isSmall }\"\n >\n <ng-container *ngIf=\"title?.template as titleTpl\">\n <ng-container *ngTemplateOutlet=\"titleTpl\"></ng-container>\n </ng-container>\n </div>\n\n <div style=\"flex: 1\"></div>\n <div\n class=\"flex-center\"\n mat-tab-nav-bar\n [tabPanel]=\"tabPanel\"\n *ngIf=\"!isSmall\"\n >\n <ng-container *ngFor=\"let e of routes?.toArray(); let i = index\">\n <a\n mat-tab-link\n [routerLink]=\"e.routerLink\"\n [routerLinkActiveOptions]=\"{ exact: !e.hasSubroutes() }\"\n #rla=\"routerLinkActive\"\n routerLinkActive=\"mdc-tab--active\"\n [active]=\"rla.isActive || e.isRouteActive()\"\n >\n <ng-container *ngIf=\"e.template as routeTemplate\">\n <ng-container *ngTemplateOutlet=\"routeTemplate\">\n </ng-container>\n </ng-container>\n </a>\n </ng-container>\n </div>\n\n <mat-tab-nav-panel #tabPanel></mat-tab-nav-panel>\n\n <ng-container *ngIf=\"afterNav?.template as tpl\">\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"profile !== null\">\n <mat-divider\n vertical\n style=\"height: 1em; align-self: center\"\n *ngIf=\"!isSmall\"\n ></mat-divider>\n <onemrva-mat-avatar\n matRipple\n *ngIf=\"profile.isLoggedIn\"\n [matMenuTriggerFor]=\"menu\"\n initials=\"{{ profile.initials() }}\"\n color=\"accent\"\n size=\"extrasmall\"\n class=\"clickable\"\n ></onemrva-mat-avatar>\n\n <onemrva-mat-avatar\n matRipple\n *ngIf=\"!profile.isLoggedIn\"\n [matMenuTriggerFor]=\"menu\"\n icon=\"account_circle\"\n color=\"\"\n size=\"extrasmall\"\n class=\"clickable\"\n ></onemrva-mat-avatar>\n <mat-menu #menu=\"matMenu\">\n <ng-container *ngIf=\"profile.isLoggedIn; else notConnected\">\n <p class=\"accountName\">\n {{ profile.firstName }} {{ profile.lastName }}\n </p>\n <mat-divider style=\"align-self: stretch\"></mat-divider>\n\n <ng-container *ngIf=\"loginMenu?.template as menuLoginTpl\">\n <ng-container *ngTemplateOutlet=\"menuLoginTpl\"></ng-container>\n </ng-container>\n\n <button\n type=\"button\"\n class=\"mat-mdc-menu-item\"\n mat-menu-item\n data-cy=\"logoutButton\"\n (click)=\"doLogout()\"\n [attr.aria-label]=\"'layout.logout' | translate\"\n >\n <mat-icon>logout</mat-icon>\n {{ 'layout.logout' | translate }}\n </button>\n </ng-container>\n <ng-template #notConnected>\n <button\n type=\"button\"\n mat-menu-item\n data-cy=\"loginButton\"\n (click)=\"doLogin()\"\n [attr.aria-label]=\"'layout.login' | translate\"\n >\n <mat-icon>login</mat-icon>\n {{ 'layout.login' | translate }}\n </button>\n </ng-template>\n </mat-menu>\n </ng-container>\n <ng-container\n *ngIf=\"\n isSmall &&\n (routes?.toArray()?.length || (languages && languages.length > 1))\n \"\n >\n <button\n type=\"button\"\n mat-icon-button\n class=\"menu-button\"\n data-cy=\"smallDeviceMenu\"\n (click)=\"toggleSideNav()\"\n [attr.aria-label]=\"'layout.menu' | translate\"\n >\n <mat-icon>menu</mat-icon>\n </button>\n </ng-container>\n <div\n class=\"flex-center\"\n mat-tab-nav-bar\n [tabPanel]=\"tabPanel\"\n *ngIf=\"!isSmall\"\n >\n <a\n [matMenuTriggerFor]=\"languageMenu\"\n data-cy=\"languageMenu\"\n [attr.aria-label]=\"'language.selection' | translate\"\n mat-tab-link\n >\n {{ currentLanguage }}\n <mat-icon style=\"width: 16px\">expand_more</mat-icon>\n </a>\n </div>\n <mat-menu #languageMenu>\n <button\n *ngFor=\"let lang of languages\"\n type=\"button\"\n class=\"mat-mdc-menu-item\"\n mat-menu-item\n [attr.data-cy]=\"'language_' + lang.code\"\n (click)=\"changeLanguage(lang.code)\"\n [attr.aria-label]=\"lang.label\"\n >\n {{ lang.label }}\n </button>\n </mat-menu>\n </div>\n </mat-toolbar>\n </header>\n <ng-container>\n <div\n [id]=\"id\"\n [attr.role]=\"role\"\n [class.onemrva-layout-container]=\"!fluid\"\n class=\"onemrva-layout-content\"\n *ngIf=\"content?.template as tpl\"\n >\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n\n <ng-container\n *ngIf=\"\n environment &&\n (environment === env.LOCAL || environment === env.TEST)\n \"\n >\n <button\n id=\"accessibility_fab\"\n mat-fab\n color=\"accent\"\n aria-label=\"Accessibility check\"\n matTooltip=\"Accessibility check\"\n onclick=\"(function() {var _p='//openfed.github.io/AccessibilityCheck/build/';var _i=function(s,cb) {var sc=document.createElement('script');sc.onload = function() {sc.onload = null;sc.onreadystatechange = null;cb.call(this);};sc.onreadystatechange = function(){if(/^(complete|loaded)$/.test(this.readyState) === true){sc.onreadystatechange = null;sc.onload();}};sc.src=s;if (document.head) {document.head.appendChild(sc);} else {document.getElementsByTagName('head')[0].appendChild(sc);}}; var options={path:_p};_i(_p+'HTMLCS.js',function(){HTMLCSAuditor.run('WCAG2AA',null,options);});})();\"\n >\n <mat-icon>accessibility</mat-icon>\n </button>\n </ng-container>\n </div>\n\n <footer class=\"onemrva-footer\" *ngIf=\"footer?.template as footer\">\n <div [class.onemrva-layout-container]=\"!fluid\">\n <ng-container *ngTemplateOutlet=\"footer\"></ng-container>\n </div>\n </footer>\n </ng-container>\n </div>\n\n <mat-drawer\n class=\"onemrva-drawer mobile-menu-sidebar\"\n mode=\"over\"\n position=\"end\"\n >\n <ng-template drawerhost></ng-template>\n </mat-drawer>\n</mat-drawer-container>\n", styles: [".mat-mdc-tab-nav-bar .mat-mdc-tab-header{height:42px!important}.logo{align-self:center;cursor:pointer}.application-title{font-size:1.3rem;font-weight:700;height:42px;line-height:42px}:host .mat-toolbar{background:#fff;position:fixed;top:0;height:90px;z-index:400}.accountName{margin:16px;line-height:16px;font-weight:700}:host{position:relative}:host router-outlet{display:block;margin-bottom:90px}:host .environment{position:fixed;top:0;left:0;z-index:24000;width:60px;height:50px;padding:15px 20px;font-weight:700;font-size:16px;border-radius:0 0 100%;color:#fff;display:none}:host .environment.LOCAL{background:transparent linear-gradient(90deg,#de2174,#eb142a) 0 0 no-repeat padding-box;display:block}:host .environment.TEST{background-color:#36c;display:block}:host .environment.VAL{background-color:#093;display:block}:host a:active{outline:none}.s-menu .s-menu-languages{display:flex}.s-menu .s-menu-item.active{font-weight:700!important}.s-menu .s-menu-item:hover{cursor:pointer;font-weight:700}.onemrva-layout-content{min-height:calc(100vh - 195px)}.onemrva-footer{text-align:center;padding:9.5px;margin-top:16px}onemrva-mat-avatar.clickable{cursor:pointer}.mat-mdc-menu-content button.active>*{font-weight:700!important}.mat-mdc-menu-content button mat-icon{font-size:18px!important;height:18px;width:18px}.mat-mdc-menu-content button span{font-size:14px!important}#accessibility_fab{position:fixed;bottom:16px;left:16px}nav a.disabled{pointer-events:none}.menu-close-button{float:right}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i6$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i1$1.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i1$1.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i6.MatTabNav, selector: "[mat-tab-nav-bar]", inputs: ["fitInkBarToContent", "mat-stretch-tabs", "animationDuration", "backgroundColor", "disableRipple", "color", "tabPanel"], exportAs: ["matTabNavBar", "matTabNav"] }, { kind: "component", type: i6.MatTabNavPanel, selector: "mat-tab-nav-panel", inputs: ["id"], exportAs: ["matTabNavPanel"] }, { kind: "component", type: i6.MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: ["active", "disabled", "disableRipple", "tabIndex", "id"], exportAs: ["matTabLink"] }, { kind: "component", type: i10.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i10.MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }, { kind: "component", type: i3.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i13.OnemrvaMatAvatarComponent, selector: "onemrva-mat-avatar", inputs: ["id", "roundShape", "initials", "icon", "src", "size", "color"] }, { kind: "directive", type: i14.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i15.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: DrawerHostDirective, selector: "[drawerhost]" }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }] }); }
|
|
488
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.5", type: LayoutComponent, selector: "onemrva-layout", inputs: { logo: "logo", languages: "languages", environment: "environment", logoRedictionUrl: "logoRedictionUrl", profile: "profile", id: "id", role: "role" }, outputs: { login: "login", logout: "logout" }, queries: [{ propertyName: "title", first: true, predicate: LayoutTitleComponent, descendants: true }, { propertyName: "loginMenu", first: true, predicate: LayoutLoginMenuComponent, descendants: true }, { propertyName: "content", first: true, predicate: LayoutContentComponent, descendants: true }, { propertyName: "afterNav", first: true, predicate: LayoutAfterNavComponent, descendants: true }, { propertyName: "footer", first: true, predicate: LayoutFooterComponent, descendants: true }, { propertyName: "routes", predicate: LayoutRouteComponent }], viewQueries: [{ propertyName: "drawer", first: true, predicate: MatDrawer, descendants: true, static: true }, { propertyName: "drawerHost", first: true, predicate: DrawerHostDirective, descendants: true, static: true }], ngImport: i0, template: "<mat-drawer-container\n class=\"example-container\"\n [hasBackdrop]=\"drawerService.hasBackdrop\"\n autosize\n>\n <div class=\"app-content\">\n <header>\n <mat-toolbar class=\"mat-elevation-z4\">\n <div class=\"environment\" [class]=\"environment\">\n {{ environment }}\n </div>\n <div\n [class.onemrva-layout-container]=\"!fluid\"\n class=\"nav-container flex-center\"\n >\n {{ logoRedictionUrl }}\n <img\n class=\"logo\"\n [src]=\"logo\"\n [attr.data-cy]=\"\n 'onemrva_logo_' + currentLanguage.toLocaleLowerCase()\n \"\n alt=\"Logo ONEM/RVA\"\n [routerLink]=\"\n logoRedictionUrl !== null ? logoRedictionUrl : undefined\n \"\n [ngStyle]=\"{\n cursor: logoRedictionUrl !== null ? 'pointer' : 'default',\n }\"\n />\n <div\n class=\"application-title\"\n [ngClass]=\"{ 'small-screen': isSmall }\"\n >\n <ng-container *ngIf=\"title?.template as titleTpl\">\n <ng-container *ngTemplateOutlet=\"titleTpl\"></ng-container>\n </ng-container>\n </div>\n\n <div style=\"flex: 1\"></div>\n <div\n class=\"flex-center\"\n mat-tab-nav-bar\n [tabPanel]=\"tabPanel\"\n *ngIf=\"!isSmall\"\n >\n <ng-container *ngFor=\"let e of routes?.toArray(); let i = index\">\n <a\n mat-tab-link\n [routerLink]=\"e.routerLink\"\n [routerLinkActiveOptions]=\"{ exact: !e.hasSubroutes() }\"\n #rla=\"routerLinkActive\"\n routerLinkActive=\"mdc-tab--active\"\n [active]=\"rla.isActive || e.isRouteActive()\"\n >\n <ng-container *ngIf=\"e.template as routeTemplate\">\n <ng-container *ngTemplateOutlet=\"routeTemplate\">\n </ng-container>\n </ng-container>\n </a>\n </ng-container>\n </div>\n\n <mat-tab-nav-panel #tabPanel></mat-tab-nav-panel>\n\n <ng-container *ngIf=\"afterNav?.template as tpl\">\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"profile !== null\">\n <mat-divider\n vertical\n style=\"height: 1em; align-self: center\"\n *ngIf=\"!isSmall\"\n ></mat-divider>\n <onemrva-mat-avatar\n matRipple\n *ngIf=\"profile.isLoggedIn\"\n [matMenuTriggerFor]=\"menu\"\n initials=\"{{ profile.initials() }}\"\n color=\"accent\"\n size=\"extrasmall\"\n class=\"clickable\"\n ></onemrva-mat-avatar>\n\n <onemrva-mat-avatar\n matRipple\n *ngIf=\"!profile.isLoggedIn\"\n [matMenuTriggerFor]=\"menu\"\n icon=\"account_circle\"\n color=\"\"\n size=\"extrasmall\"\n class=\"clickable\"\n ></onemrva-mat-avatar>\n <mat-menu #menu=\"matMenu\">\n <ng-container *ngIf=\"profile.isLoggedIn; else notConnected\">\n <p class=\"accountName\">\n {{ profile.firstName }} {{ profile.lastName }}\n </p>\n <mat-divider style=\"align-self: stretch\"></mat-divider>\n\n <ng-container *ngIf=\"loginMenu?.template as menuLoginTpl\">\n <ng-container *ngTemplateOutlet=\"menuLoginTpl\"></ng-container>\n </ng-container>\n\n <button\n type=\"button\"\n class=\"mat-mdc-menu-item\"\n mat-menu-item\n data-cy=\"logoutButton\"\n (click)=\"doLogout()\"\n [attr.aria-label]=\"'layout.logout' | translate\"\n >\n <mat-icon>logout</mat-icon>\n {{ 'layout.logout' | translate }}\n </button>\n </ng-container>\n <ng-template #notConnected>\n <button\n type=\"button\"\n mat-menu-item\n data-cy=\"loginButton\"\n (click)=\"doLogin()\"\n [attr.aria-label]=\"'layout.login' | translate\"\n >\n <mat-icon>login</mat-icon>\n {{ 'layout.login' | translate }}\n </button>\n </ng-template>\n </mat-menu>\n </ng-container>\n <ng-container\n *ngIf=\"\n isSmall &&\n (routes?.toArray()?.length || (languages && languages.length > 1))\n \"\n >\n <button\n type=\"button\"\n mat-icon-button\n class=\"menu-button\"\n data-cy=\"smallDeviceMenu\"\n (click)=\"toggleSideNav()\"\n [attr.aria-label]=\"'layout.menu' | translate\"\n >\n <mat-icon>menu</mat-icon>\n </button>\n </ng-container>\n <div\n class=\"flex-center\"\n mat-tab-nav-bar\n [tabPanel]=\"tabPanel\"\n *ngIf=\"!isSmall\"\n >\n <a\n [matMenuTriggerFor]=\"languageMenu\"\n data-cy=\"languageMenu\"\n [attr.aria-label]=\"'language.selection' | translate\"\n mat-tab-link\n >\n {{ currentLanguage }}\n <mat-icon style=\"width: 16px\">expand_more</mat-icon>\n </a>\n </div>\n <mat-menu #languageMenu>\n <button\n *ngFor=\"let lang of languages\"\n type=\"button\"\n class=\"mat-mdc-menu-item\"\n mat-menu-item\n [attr.data-cy]=\"'language_' + lang.code\"\n (click)=\"changeLanguage(lang.code)\"\n [attr.aria-label]=\"lang.label\"\n >\n {{ lang.label }}\n </button>\n </mat-menu>\n </div>\n </mat-toolbar>\n </header>\n <ng-container>\n <div\n [id]=\"id\"\n [attr.role]=\"role\"\n [class.onemrva-layout-container]=\"!fluid\"\n class=\"onemrva-layout-content\"\n *ngIf=\"content?.template as tpl\"\n >\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n\n <ng-container\n *ngIf=\"\n environment &&\n (environment === env.LOCAL || environment === env.TEST)\n \"\n >\n <button\n id=\"accessibility_fab\"\n mat-fab\n color=\"accent\"\n aria-label=\"Accessibility check\"\n matTooltip=\"Accessibility check\"\n onclick=\"(function() {var _p='//openfed.github.io/AccessibilityCheck/build/';var _i=function(s,cb) {var sc=document.createElement('script');sc.onload = function() {sc.onload = null;sc.onreadystatechange = null;cb.call(this);};sc.onreadystatechange = function(){if(/^(complete|loaded)$/.test(this.readyState) === true){sc.onreadystatechange = null;sc.onload();}};sc.src=s;if (document.head) {document.head.appendChild(sc);} else {document.getElementsByTagName('head')[0].appendChild(sc);}}; var options={path:_p};_i(_p+'HTMLCS.js',function(){HTMLCSAuditor.run('WCAG2AA',null,options);});})();\"\n >\n <mat-icon>accessibility</mat-icon>\n </button>\n </ng-container>\n </div>\n\n <footer class=\"onemrva-footer\" *ngIf=\"footer?.template as footer\">\n <div [class.onemrva-layout-container]=\"!fluid\">\n <ng-container *ngTemplateOutlet=\"footer\"></ng-container>\n </div>\n </footer>\n </ng-container>\n </div>\n\n <mat-drawer\n class=\"onemrva-drawer mobile-menu-sidebar\"\n mode=\"over\"\n position=\"end\"\n >\n <ng-template drawerhost></ng-template>\n </mat-drawer>\n</mat-drawer-container>\n", styles: [".mat-mdc-tab-nav-bar .mat-mdc-tab-header{height:42px!important}.logo{align-self:center;cursor:pointer}.application-title{font-size:1.3rem;font-weight:700;height:42px;line-height:42px}:host .mat-toolbar{background:#fff;position:fixed;top:0;height:90px;z-index:400}.accountName{margin:16px;line-height:16px;font-weight:700}:host{position:relative}:host router-outlet{display:block;margin-bottom:90px}:host .environment{position:fixed;top:0;left:0;z-index:24000;width:60px;height:50px;padding:15px 20px;font-weight:700;font-size:16px;border-radius:0 0 100%;color:#fff;display:none}:host .environment.LOCAL{background:transparent linear-gradient(90deg,#de2174,#eb142a) 0 0 no-repeat padding-box;display:block}:host .environment.TEST{background-color:#36c;display:block}:host .environment.VAL{background-color:#093;display:block}:host a:active{outline:none}.s-menu .s-menu-languages{display:flex}.s-menu .s-menu-item.active{font-weight:700!important}.s-menu .s-menu-item:hover{cursor:pointer;font-weight:700}.onemrva-layout-content{padding-top:120px;min-height:calc(100vh - 195px)}.onemrva-footer{text-align:center;padding:9.5px;margin-top:16px}onemrva-mat-avatar.clickable{cursor:pointer}.mat-mdc-menu-content button.active>*{font-weight:700!important}.mat-mdc-menu-content button mat-icon{font-size:18px!important;height:18px;width:18px}.mat-mdc-menu-content button span{font-size:14px!important}#accessibility_fab{position:fixed;bottom:16px;left:16px}nav a.disabled{pointer-events:none}.menu-close-button{float:right}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i6$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i1$1.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i1$1.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i6.MatTabNav, selector: "[mat-tab-nav-bar]", inputs: ["fitInkBarToContent", "mat-stretch-tabs", "animationDuration", "backgroundColor", "disableRipple", "color", "tabPanel"], exportAs: ["matTabNavBar", "matTabNav"] }, { kind: "component", type: i6.MatTabNavPanel, selector: "mat-tab-nav-panel", inputs: ["id"], exportAs: ["matTabNavPanel"] }, { kind: "component", type: i6.MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: ["active", "disabled", "disableRipple", "tabIndex", "id"], exportAs: ["matTabLink"] }, { kind: "component", type: i10.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i10.MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }, { kind: "component", type: i3.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i13.OnemrvaMatAvatarComponent, selector: "onemrva-mat-avatar", inputs: ["id", "roundShape", "initials", "icon", "src", "size", "color"] }, { kind: "directive", type: i14.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i15.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: DrawerHostDirective, selector: "[drawerhost]" }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }] }); }
|
|
482
489
|
}
|
|
483
490
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: LayoutComponent, decorators: [{
|
|
484
491
|
type: Component,
|
|
485
|
-
args: [{ selector: 'onemrva-layout', template: "<mat-drawer-container\n class=\"example-container\"\n [hasBackdrop]=\"drawerService.hasBackdrop\"\n autosize\n>\n <div class=\"app-content\">\n <header>\n <mat-toolbar class=\"mat-elevation-z4\">\n <div class=\"environment\" [class]=\"environment\">\n {{ environment }}\n </div>\n <div\n [class.onemrva-layout-container]=\"!fluid\"\n class=\"nav-container flex-center\"\n >\n {{ logoRedictionUrl }}\n <img\n class=\"logo\"\n [src]=\"logo\"\n [attr.data-cy]=\"\n 'onemrva_logo_' + currentLanguage.toLocaleLowerCase()\n \"\n alt=\"Logo ONEM/RVA\"\n [routerLink]=\"\n logoRedictionUrl !== null ? logoRedictionUrl : undefined\n \"\n [ngStyle]=\"{\n cursor: logoRedictionUrl !== null ? 'pointer' : 'default',\n }\"\n />\n <div\n class=\"application-title\"\n [ngClass]=\"{ 'small-screen': isSmall }\"\n >\n <ng-container *ngIf=\"title?.template as titleTpl\">\n <ng-container *ngTemplateOutlet=\"titleTpl\"></ng-container>\n </ng-container>\n </div>\n\n <div style=\"flex: 1\"></div>\n <div\n class=\"flex-center\"\n mat-tab-nav-bar\n [tabPanel]=\"tabPanel\"\n *ngIf=\"!isSmall\"\n >\n <ng-container *ngFor=\"let e of routes?.toArray(); let i = index\">\n <a\n mat-tab-link\n [routerLink]=\"e.routerLink\"\n [routerLinkActiveOptions]=\"{ exact: !e.hasSubroutes() }\"\n #rla=\"routerLinkActive\"\n routerLinkActive=\"mdc-tab--active\"\n [active]=\"rla.isActive || e.isRouteActive()\"\n >\n <ng-container *ngIf=\"e.template as routeTemplate\">\n <ng-container *ngTemplateOutlet=\"routeTemplate\">\n </ng-container>\n </ng-container>\n </a>\n </ng-container>\n </div>\n\n <mat-tab-nav-panel #tabPanel></mat-tab-nav-panel>\n\n <ng-container *ngIf=\"afterNav?.template as tpl\">\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"profile !== null\">\n <mat-divider\n vertical\n style=\"height: 1em; align-self: center\"\n *ngIf=\"!isSmall\"\n ></mat-divider>\n <onemrva-mat-avatar\n matRipple\n *ngIf=\"profile.isLoggedIn\"\n [matMenuTriggerFor]=\"menu\"\n initials=\"{{ profile.initials() }}\"\n color=\"accent\"\n size=\"extrasmall\"\n class=\"clickable\"\n ></onemrva-mat-avatar>\n\n <onemrva-mat-avatar\n matRipple\n *ngIf=\"!profile.isLoggedIn\"\n [matMenuTriggerFor]=\"menu\"\n icon=\"account_circle\"\n color=\"\"\n size=\"extrasmall\"\n class=\"clickable\"\n ></onemrva-mat-avatar>\n <mat-menu #menu=\"matMenu\">\n <ng-container *ngIf=\"profile.isLoggedIn; else notConnected\">\n <p class=\"accountName\">\n {{ profile.firstName }} {{ profile.lastName }}\n </p>\n <mat-divider style=\"align-self: stretch\"></mat-divider>\n\n <ng-container *ngIf=\"loginMenu?.template as menuLoginTpl\">\n <ng-container *ngTemplateOutlet=\"menuLoginTpl\"></ng-container>\n </ng-container>\n\n <button\n type=\"button\"\n class=\"mat-mdc-menu-item\"\n mat-menu-item\n data-cy=\"logoutButton\"\n (click)=\"doLogout()\"\n [attr.aria-label]=\"'layout.logout' | translate\"\n >\n <mat-icon>logout</mat-icon>\n {{ 'layout.logout' | translate }}\n </button>\n </ng-container>\n <ng-template #notConnected>\n <button\n type=\"button\"\n mat-menu-item\n data-cy=\"loginButton\"\n (click)=\"doLogin()\"\n [attr.aria-label]=\"'layout.login' | translate\"\n >\n <mat-icon>login</mat-icon>\n {{ 'layout.login' | translate }}\n </button>\n </ng-template>\n </mat-menu>\n </ng-container>\n <ng-container\n *ngIf=\"\n isSmall &&\n (routes?.toArray()?.length || (languages && languages.length > 1))\n \"\n >\n <button\n type=\"button\"\n mat-icon-button\n class=\"menu-button\"\n data-cy=\"smallDeviceMenu\"\n (click)=\"toggleSideNav()\"\n [attr.aria-label]=\"'layout.menu' | translate\"\n >\n <mat-icon>menu</mat-icon>\n </button>\n </ng-container>\n <div\n class=\"flex-center\"\n mat-tab-nav-bar\n [tabPanel]=\"tabPanel\"\n *ngIf=\"!isSmall\"\n >\n <a\n [matMenuTriggerFor]=\"languageMenu\"\n data-cy=\"languageMenu\"\n [attr.aria-label]=\"'language.selection' | translate\"\n mat-tab-link\n >\n {{ currentLanguage }}\n <mat-icon style=\"width: 16px\">expand_more</mat-icon>\n </a>\n </div>\n <mat-menu #languageMenu>\n <button\n *ngFor=\"let lang of languages\"\n type=\"button\"\n class=\"mat-mdc-menu-item\"\n mat-menu-item\n [attr.data-cy]=\"'language_' + lang.code\"\n (click)=\"changeLanguage(lang.code)\"\n [attr.aria-label]=\"lang.label\"\n >\n {{ lang.label }}\n </button>\n </mat-menu>\n </div>\n </mat-toolbar>\n </header>\n <ng-container>\n <div\n [id]=\"id\"\n [attr.role]=\"role\"\n [class.onemrva-layout-container]=\"!fluid\"\n class=\"onemrva-layout-content\"\n *ngIf=\"content?.template as tpl\"\n >\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n\n <ng-container\n *ngIf=\"\n environment &&\n (environment === env.LOCAL || environment === env.TEST)\n \"\n >\n <button\n id=\"accessibility_fab\"\n mat-fab\n color=\"accent\"\n aria-label=\"Accessibility check\"\n matTooltip=\"Accessibility check\"\n onclick=\"(function() {var _p='//openfed.github.io/AccessibilityCheck/build/';var _i=function(s,cb) {var sc=document.createElement('script');sc.onload = function() {sc.onload = null;sc.onreadystatechange = null;cb.call(this);};sc.onreadystatechange = function(){if(/^(complete|loaded)$/.test(this.readyState) === true){sc.onreadystatechange = null;sc.onload();}};sc.src=s;if (document.head) {document.head.appendChild(sc);} else {document.getElementsByTagName('head')[0].appendChild(sc);}}; var options={path:_p};_i(_p+'HTMLCS.js',function(){HTMLCSAuditor.run('WCAG2AA',null,options);});})();\"\n >\n <mat-icon>accessibility</mat-icon>\n </button>\n </ng-container>\n </div>\n\n <footer class=\"onemrva-footer\" *ngIf=\"footer?.template as footer\">\n <div [class.onemrva-layout-container]=\"!fluid\">\n <ng-container *ngTemplateOutlet=\"footer\"></ng-container>\n </div>\n </footer>\n </ng-container>\n </div>\n\n <mat-drawer\n class=\"onemrva-drawer mobile-menu-sidebar\"\n mode=\"over\"\n position=\"end\"\n >\n <ng-template drawerhost></ng-template>\n </mat-drawer>\n</mat-drawer-container>\n", styles: [".mat-mdc-tab-nav-bar .mat-mdc-tab-header{height:42px!important}.logo{align-self:center;cursor:pointer}.application-title{font-size:1.3rem;font-weight:700;height:42px;line-height:42px}:host .mat-toolbar{background:#fff;position:fixed;top:0;height:90px;z-index:400}.accountName{margin:16px;line-height:16px;font-weight:700}:host{position:relative}:host router-outlet{display:block;margin-bottom:90px}:host .environment{position:fixed;top:0;left:0;z-index:24000;width:60px;height:50px;padding:15px 20px;font-weight:700;font-size:16px;border-radius:0 0 100%;color:#fff;display:none}:host .environment.LOCAL{background:transparent linear-gradient(90deg,#de2174,#eb142a) 0 0 no-repeat padding-box;display:block}:host .environment.TEST{background-color:#36c;display:block}:host .environment.VAL{background-color:#093;display:block}:host a:active{outline:none}.s-menu .s-menu-languages{display:flex}.s-menu .s-menu-item.active{font-weight:700!important}.s-menu .s-menu-item:hover{cursor:pointer;font-weight:700}.onemrva-layout-content{min-height:calc(100vh - 195px)}.onemrva-footer{text-align:center;padding:9.5px;margin-top:16px}onemrva-mat-avatar.clickable{cursor:pointer}.mat-mdc-menu-content button.active>*{font-weight:700!important}.mat-mdc-menu-content button mat-icon{font-size:18px!important;height:18px;width:18px}.mat-mdc-menu-content button span{font-size:14px!important}#accessibility_fab{position:fixed;bottom:16px;left:16px}nav a.disabled{pointer-events:none}.menu-close-button{float:right}\n"] }]
|
|
492
|
+
args: [{ selector: 'onemrva-layout', template: "<mat-drawer-container\n class=\"example-container\"\n [hasBackdrop]=\"drawerService.hasBackdrop\"\n autosize\n>\n <div class=\"app-content\">\n <header>\n <mat-toolbar class=\"mat-elevation-z4\">\n <div class=\"environment\" [class]=\"environment\">\n {{ environment }}\n </div>\n <div\n [class.onemrva-layout-container]=\"!fluid\"\n class=\"nav-container flex-center\"\n >\n {{ logoRedictionUrl }}\n <img\n class=\"logo\"\n [src]=\"logo\"\n [attr.data-cy]=\"\n 'onemrva_logo_' + currentLanguage.toLocaleLowerCase()\n \"\n alt=\"Logo ONEM/RVA\"\n [routerLink]=\"\n logoRedictionUrl !== null ? logoRedictionUrl : undefined\n \"\n [ngStyle]=\"{\n cursor: logoRedictionUrl !== null ? 'pointer' : 'default',\n }\"\n />\n <div\n class=\"application-title\"\n [ngClass]=\"{ 'small-screen': isSmall }\"\n >\n <ng-container *ngIf=\"title?.template as titleTpl\">\n <ng-container *ngTemplateOutlet=\"titleTpl\"></ng-container>\n </ng-container>\n </div>\n\n <div style=\"flex: 1\"></div>\n <div\n class=\"flex-center\"\n mat-tab-nav-bar\n [tabPanel]=\"tabPanel\"\n *ngIf=\"!isSmall\"\n >\n <ng-container *ngFor=\"let e of routes?.toArray(); let i = index\">\n <a\n mat-tab-link\n [routerLink]=\"e.routerLink\"\n [routerLinkActiveOptions]=\"{ exact: !e.hasSubroutes() }\"\n #rla=\"routerLinkActive\"\n routerLinkActive=\"mdc-tab--active\"\n [active]=\"rla.isActive || e.isRouteActive()\"\n >\n <ng-container *ngIf=\"e.template as routeTemplate\">\n <ng-container *ngTemplateOutlet=\"routeTemplate\">\n </ng-container>\n </ng-container>\n </a>\n </ng-container>\n </div>\n\n <mat-tab-nav-panel #tabPanel></mat-tab-nav-panel>\n\n <ng-container *ngIf=\"afterNav?.template as tpl\">\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"profile !== null\">\n <mat-divider\n vertical\n style=\"height: 1em; align-self: center\"\n *ngIf=\"!isSmall\"\n ></mat-divider>\n <onemrva-mat-avatar\n matRipple\n *ngIf=\"profile.isLoggedIn\"\n [matMenuTriggerFor]=\"menu\"\n initials=\"{{ profile.initials() }}\"\n color=\"accent\"\n size=\"extrasmall\"\n class=\"clickable\"\n ></onemrva-mat-avatar>\n\n <onemrva-mat-avatar\n matRipple\n *ngIf=\"!profile.isLoggedIn\"\n [matMenuTriggerFor]=\"menu\"\n icon=\"account_circle\"\n color=\"\"\n size=\"extrasmall\"\n class=\"clickable\"\n ></onemrva-mat-avatar>\n <mat-menu #menu=\"matMenu\">\n <ng-container *ngIf=\"profile.isLoggedIn; else notConnected\">\n <p class=\"accountName\">\n {{ profile.firstName }} {{ profile.lastName }}\n </p>\n <mat-divider style=\"align-self: stretch\"></mat-divider>\n\n <ng-container *ngIf=\"loginMenu?.template as menuLoginTpl\">\n <ng-container *ngTemplateOutlet=\"menuLoginTpl\"></ng-container>\n </ng-container>\n\n <button\n type=\"button\"\n class=\"mat-mdc-menu-item\"\n mat-menu-item\n data-cy=\"logoutButton\"\n (click)=\"doLogout()\"\n [attr.aria-label]=\"'layout.logout' | translate\"\n >\n <mat-icon>logout</mat-icon>\n {{ 'layout.logout' | translate }}\n </button>\n </ng-container>\n <ng-template #notConnected>\n <button\n type=\"button\"\n mat-menu-item\n data-cy=\"loginButton\"\n (click)=\"doLogin()\"\n [attr.aria-label]=\"'layout.login' | translate\"\n >\n <mat-icon>login</mat-icon>\n {{ 'layout.login' | translate }}\n </button>\n </ng-template>\n </mat-menu>\n </ng-container>\n <ng-container\n *ngIf=\"\n isSmall &&\n (routes?.toArray()?.length || (languages && languages.length > 1))\n \"\n >\n <button\n type=\"button\"\n mat-icon-button\n class=\"menu-button\"\n data-cy=\"smallDeviceMenu\"\n (click)=\"toggleSideNav()\"\n [attr.aria-label]=\"'layout.menu' | translate\"\n >\n <mat-icon>menu</mat-icon>\n </button>\n </ng-container>\n <div\n class=\"flex-center\"\n mat-tab-nav-bar\n [tabPanel]=\"tabPanel\"\n *ngIf=\"!isSmall\"\n >\n <a\n [matMenuTriggerFor]=\"languageMenu\"\n data-cy=\"languageMenu\"\n [attr.aria-label]=\"'language.selection' | translate\"\n mat-tab-link\n >\n {{ currentLanguage }}\n <mat-icon style=\"width: 16px\">expand_more</mat-icon>\n </a>\n </div>\n <mat-menu #languageMenu>\n <button\n *ngFor=\"let lang of languages\"\n type=\"button\"\n class=\"mat-mdc-menu-item\"\n mat-menu-item\n [attr.data-cy]=\"'language_' + lang.code\"\n (click)=\"changeLanguage(lang.code)\"\n [attr.aria-label]=\"lang.label\"\n >\n {{ lang.label }}\n </button>\n </mat-menu>\n </div>\n </mat-toolbar>\n </header>\n <ng-container>\n <div\n [id]=\"id\"\n [attr.role]=\"role\"\n [class.onemrva-layout-container]=\"!fluid\"\n class=\"onemrva-layout-content\"\n *ngIf=\"content?.template as tpl\"\n >\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n\n <ng-container\n *ngIf=\"\n environment &&\n (environment === env.LOCAL || environment === env.TEST)\n \"\n >\n <button\n id=\"accessibility_fab\"\n mat-fab\n color=\"accent\"\n aria-label=\"Accessibility check\"\n matTooltip=\"Accessibility check\"\n onclick=\"(function() {var _p='//openfed.github.io/AccessibilityCheck/build/';var _i=function(s,cb) {var sc=document.createElement('script');sc.onload = function() {sc.onload = null;sc.onreadystatechange = null;cb.call(this);};sc.onreadystatechange = function(){if(/^(complete|loaded)$/.test(this.readyState) === true){sc.onreadystatechange = null;sc.onload();}};sc.src=s;if (document.head) {document.head.appendChild(sc);} else {document.getElementsByTagName('head')[0].appendChild(sc);}}; var options={path:_p};_i(_p+'HTMLCS.js',function(){HTMLCSAuditor.run('WCAG2AA',null,options);});})();\"\n >\n <mat-icon>accessibility</mat-icon>\n </button>\n </ng-container>\n </div>\n\n <footer class=\"onemrva-footer\" *ngIf=\"footer?.template as footer\">\n <div [class.onemrva-layout-container]=\"!fluid\">\n <ng-container *ngTemplateOutlet=\"footer\"></ng-container>\n </div>\n </footer>\n </ng-container>\n </div>\n\n <mat-drawer\n class=\"onemrva-drawer mobile-menu-sidebar\"\n mode=\"over\"\n position=\"end\"\n >\n <ng-template drawerhost></ng-template>\n </mat-drawer>\n</mat-drawer-container>\n", styles: [".mat-mdc-tab-nav-bar .mat-mdc-tab-header{height:42px!important}.logo{align-self:center;cursor:pointer}.application-title{font-size:1.3rem;font-weight:700;height:42px;line-height:42px}:host .mat-toolbar{background:#fff;position:fixed;top:0;height:90px;z-index:400}.accountName{margin:16px;line-height:16px;font-weight:700}:host{position:relative}:host router-outlet{display:block;margin-bottom:90px}:host .environment{position:fixed;top:0;left:0;z-index:24000;width:60px;height:50px;padding:15px 20px;font-weight:700;font-size:16px;border-radius:0 0 100%;color:#fff;display:none}:host .environment.LOCAL{background:transparent linear-gradient(90deg,#de2174,#eb142a) 0 0 no-repeat padding-box;display:block}:host .environment.TEST{background-color:#36c;display:block}:host .environment.VAL{background-color:#093;display:block}:host a:active{outline:none}.s-menu .s-menu-languages{display:flex}.s-menu .s-menu-item.active{font-weight:700!important}.s-menu .s-menu-item:hover{cursor:pointer;font-weight:700}.onemrva-layout-content{padding-top:120px;min-height:calc(100vh - 195px)}.onemrva-footer{text-align:center;padding:9.5px;margin-top:16px}onemrva-mat-avatar.clickable{cursor:pointer}.mat-mdc-menu-content button.active>*{font-weight:700!important}.mat-mdc-menu-content button mat-icon{font-size:18px!important;height:18px;width:18px}.mat-mdc-menu-content button span{font-size:14px!important}#accessibility_fab{position:fixed;bottom:16px;left:16px}nav a.disabled{pointer-events:none}.menu-close-button{float:right}\n"] }]
|
|
486
493
|
}], ctorParameters: () => [{ type: i1$2.TranslateService }, { type: i0.ChangeDetectorRef }, { type: i2.BreakpointObserver }, { type: Document, decorators: [{
|
|
487
494
|
type: Inject,
|
|
488
495
|
args: [DOCUMENT]
|