@onemrvapublic/design-system 20.7.0-develop.1 → 20.7.0-develop.11
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/fesm2022/onemrvapublic-design-system-jsonform-renderers.mjs +37 -30
- package/fesm2022/onemrvapublic-design-system-jsonform-renderers.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-layout.mjs +3 -3
- package/fesm2022/onemrvapublic-design-system-layout.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-iban.mjs +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-iban.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-phone.mjs +25 -26
- package/fesm2022/onemrvapublic-design-system-mat-input-phone.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-shared.mjs +10 -4
- package/fesm2022/onemrvapublic-design-system-shared.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system.mjs +75 -63
- package/fesm2022/onemrvapublic-design-system.mjs.map +1 -1
- package/index.d.ts +9 -10
- package/jsonform-renderers/index.d.ts +3 -2
- package/mat-input-iban/index.d.ts +1 -1
- package/mat-input-phone/index.d.ts +3 -5
- package/package.json +24 -19
- package/shared/index.d.ts +2 -2
|
@@ -604,7 +604,7 @@ class LayoutComponent {
|
|
|
604
604
|
this.isSmall = true;
|
|
605
605
|
this.id = 'main';
|
|
606
606
|
this.role = 'main';
|
|
607
|
-
this.showThemeSwitcher =
|
|
607
|
+
this.showThemeSwitcher = false;
|
|
608
608
|
this.onemrvaClass = inject(ONEMRVA_THEME_CLASS$1);
|
|
609
609
|
this.activeTheme = signal('system', ...(ngDevMode ? [{ debugName: "activeTheme" }] : []));
|
|
610
610
|
this.translateService = inject(TranslateService);
|
|
@@ -688,7 +688,7 @@ class LayoutComponent {
|
|
|
688
688
|
this.drawerService.toggle(true);
|
|
689
689
|
}
|
|
690
690
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: LayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
691
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: LayoutComponent, isStandalone: true, selector: "onemrva-layout", inputs: { logo: "logo", languages: "languages", environment: "environment", logoRedictionUrl: "logoRedictionUrl", profile: "profile", id: "id", role: "role", showThemeSwitcher: "showThemeSwitcher" }, 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 id=\"onemrva-drawer-container\"\n [hasBackdrop]=\"drawerService.hasBackdrop()\"\n autosize\n>\n <mat-drawer\n #mainDrawer\n [class]=\"drawerService.classes()\"\n mode=\"over\"\n position=\"end\"\n >\n <ng-template drawerhost></ng-template>\n </mat-drawer>\n <mat-drawer-content>\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 class=\"nav-container onemrva-layout-container flex-center g-m\">\n {{ logoRedictionUrl }}\n <img\n class=\"logo align-center clickable\"\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 @if (title?.template; as titleTpl) {\n <ng-container *ngTemplateOutlet=\"titleTpl\"></ng-container>\n }\n </div>\n\n <div style=\"flex: 1\"></div>\n\n @if (!isSmall) {\n <div\n class=\"flex-center topMenu\"\n mat-tab-nav-bar\n [tabPanel]=\"tabPanel\"\n >\n @for (e of routes?.toArray(); track $index) {\n <a\n mat-tab-link\n [routerLink]=\"e.routerLink\"\n [attr.data-ci]=\"e.dataCy\"\n [attr.data-cy]=\"e.dataCy\"\n [routerLinkActiveOptions]=\"{\n fragment: 'exact',\n matrixParams: 'exact',\n paths: 'exact',\n queryParams: 'ignored',\n }\"\n #rla=\"routerLinkActive\"\n routerLinkActive=\"mdc-tab--active\"\n [active]=\"rla.isActive || e.isRouteActive()\"\n >\n @if (e.template; as routeTemplate) {\n <ng-container\n *ngTemplateOutlet=\"routeTemplate\"\n ></ng-container>\n }\n </a>\n }\n </div>\n }\n <mat-tab-nav-panel #tabPanel></mat-tab-nav-panel>\n\n @if (showThemeSwitcher) {\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"themeSwitch\"\n [matTooltip]=\"'layout.mode.select' | translate\"\n >\n <mat-icon>{{\n activeTheme() === 'dark'\n ? 'dark_mode'\n : activeTheme() === 'light'\n ? 'light_mode'\n : 'brightness_auto'\n }}</mat-icon>\n </button>\n <mat-menu #themeSwitch>\n <button\n mat-menu-item\n [attr.aria-label]=\"'layout.mode.dark' | translate\"\n (click)=\"toggleTheme('dark')\"\n >\n <mat-icon>dark_mode</mat-icon>\n <span>{{ 'layout.mode.dark' | translate }}</span>\n </button>\n <button\n mat-menu-item\n [attr.aria-label]=\"'layout.mode.light' | translate\"\n (click)=\"toggleTheme('light')\"\n >\n <mat-icon>light_mode</mat-icon>\n <span>{{ 'layout.mode.light' | translate }}</span>\n </button>\n <button\n mat-menu-item\n [attr.aria-label]=\"'layout.mode.system' | translate\"\n (click)=\"toggleTheme('system')\"\n >\n <mat-icon>brightness_auto</mat-icon>\n <span>{{ 'layout.mode.system' | translate }}</span>\n </button>\n </mat-menu>\n }\n @if (afterNav?.template; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n }\n\n @if (profile !== null) {\n @if (!isSmall) {\n <mat-divider\n vertical\n style=\"height: 1em; align-self: center\"\n ></mat-divider>\n }\n @if (profile.isLoggedIn) {\n <onemrva-mat-avatar\n matRipple\n [matMenuTriggerFor]=\"menu\"\n initials=\"{{ profile.initials() }}\"\n color=\"accent\"\n size=\"xsmall\"\n class=\"clickable\"\n ></onemrva-mat-avatar>\n }\n @if (!profile.isLoggedIn) {\n <onemrva-mat-avatar\n matRipple\n [matMenuTriggerFor]=\"menu\"\n icon=\"account_circle\"\n color=\"\"\n size=\"xsmall\"\n class=\"clickable\"\n ></onemrva-mat-avatar>\n }\n <mat-menu #menu=\"matMenu\">\n @if (profile.isLoggedIn) {\n <div class=\"menu-header m mb-m\">\n {{ profile.firstName }} {{ profile.lastName }}\n </div>\n <mat-divider style=\"align-self: stretch\"></mat-divider>\n\n @if (loginMenu?.template; as menuLoginTpl) {\n <ng-container\n *ngTemplateOutlet=\"menuLoginTpl\"\n ></ng-container>\n }\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 } @else {\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 }\n </mat-menu>\n }\n\n @if (\n isSmall &&\n (routes?.toArray()?.length || (languages && languages.length > 1))\n ) {\n <button\n type=\"button\"\n mat-icon-button\n class=\"menu-button\"\n data-cy=\"smallDeviceMenu\"\n (click)=\"this.toggleSideNav()\"\n [attr.aria-label]=\"'layout.menu' | translate\"\n >\n <mat-icon>menu</mat-icon>\n </button>\n }\n @if (!isSmall) {\n <div class=\"flex-center\" mat-tab-nav-bar [tabPanel]=\"tabPanel\">\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 }\n <mat-menu #languageMenu>\n @for (lang of languages; track lang.code) {\n <button\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 }\n </mat-menu>\n </div>\n </mat-toolbar>\n </header>\n <ng-container>\n @if (content?.template; as tpl) {\n <div\n [id]=\"id\"\n [attr.role]=\"role\"\n class=\"onemrva-layout-content onemrva-layout-container\"\n >\n @if (leftSidenavService.items().length > 0) {\n <div class=\"container-with-nav\">\n <div class=\"left-content\">\n <onemrva-layout-left-sidenav></onemrva-layout-left-sidenav>\n </div>\n <div class=\"right-content\">\n <div class=\"content-container\">\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n </div>\n </div>\n </div>\n } @else {\n <div class=\"content-container\">\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n </div>\n }\n @if (\n environment &&\n (environment === env.LOCAL || environment === env.TEST)\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 }\n </div>\n }\n\n <footer class=\"onemrva-footer p mb text-center\">\n @if (footer?.template; as footerTpl) {\n <div class=\"onemrva-layout-container\">\n <ng-container *ngTemplateOutlet=\"footerTpl\"></ng-container>\n </div>\n }\n </footer>\n </ng-container>\n </div>\n </mat-drawer-content>\n</mat-drawer-container>\n", styles: [":host{position:relative}:host .onemrva-layout-container{width:100%;box-sizing:border-box}:host a:active{outline:none}:host router-outlet{display:block;margin-bottom:90px}:host header mat-toolbar{position:fixed;height:var(--layout-header-height);z-index:400;--mat-tab-divider-color: transparent}:host header mat-toolbar .topMenu .mat-mdc-tab-header-pagination-before,:host header mat-toolbar .topMenu .mat-mdc-tab-header-pagination-after{display:none!important}:host header mat-toolbar .logo{height:42px}:host header mat-toolbar .application-title{font-size:1.3rem;font-weight:700;height:42px;line-height:42px;color:var(--mat-sys-tertiary)}:host header mat-toolbar .mat-mdc-tab-nav-bar{text-transform:uppercase}:host .onemrva-layout-content{padding-top:var(--layout-content-padding-top);min-height:calc(100vh - 48px)}:host .onemrva-layout-content .container-with-nav{display:flex}:host .onemrva-layout-content .container-with-nav .left-content{flex:0 0 240px}@media screen and (max-width: 640px){:host .onemrva-layout-content .container-with-nav .left-content{position:absolute;z-index:10;margin-left:-240px;transition:.5s ease-in-out margin-left;overflow:hidden}:host .onemrva-layout-content .container-with-nav .left-content.open{margin-left:0}}:host .onemrva-layout-content .container-with-nav .right-content{flex:1}:host .mat-drawer-content{min-height:100vh}:host #accessibility_fab{position:fixed;bottom:16px;left:16px}: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 mat-drawer:not(.side-menu){padding:var(--double-spacer);background:var(--mat-sys-surface-container-high)}:host mat-drawer.xsmall{width:20%}:host mat-drawer.small{width:30%}:host mat-drawer.medium{width:50%}:host mat-drawer.large{width:60%}:host mat-drawer.xlarge{width:70%}:host mat-drawer.xxlarge{width:90%}@media screen and (max-width: 640px){:host mat-drawer{width:99%!important}}.mat-mdc-menu-content button.active>*{font-weight:700!important}.mat-mdc-menu-content button mat-icon{font-size:1.125rem!important;height:1.125rem;width:1.125rem}.mat-mdc-menu-content button span{font-size:14px!important}nav a.disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: MatTabNav, selector: "[mat-tab-nav-bar]", inputs: ["fitInkBarToContent", "mat-stretch-tabs", "animationDuration", "backgroundColor", "disableRipple", "color", "tabPanel"], exportAs: ["matTabNavBar", "matTabNav"] }, { kind: "component", type: MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: ["active", "disabled", "disableRipple", "tabIndex", "id"], exportAs: ["matTabLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: MatTabNavPanel, selector: "mat-tab-nav-panel", inputs: ["id"], exportAs: ["matTabNavPanel"] }, { kind: "component", type: MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: OnemrvaMatAvatarModule$1 }, { kind: "component", type: i1$1.OnemrvaMatAvatarComponent, selector: "onemrva-mat-avatar", inputs: ["id", "roundShape", "initials", "text", "icon", "src"] }, { kind: "directive", type: 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: 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: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "directive", type: DrawerHostDirective, selector: "[drawerhost]" }, { kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: OnemRvaSizeDirective$1, selector: "mat-icon[size], onemrva-mat-skeleton[size], onemrva-mat-avatar[size], button[size]", inputs: ["size"] }, { kind: "directive", type: OnemRvaColorDirective$1, selector: "onemrva-mat-selectable-box[color],div[color],onemrva-mat-avatar[color],mat-card[color],mat-toolbar[color],onemrva-mat-spinner[color],onemrva-mat-notification[color],onemrva-mat-task-list[color],onemrva-mat-sticker[color],onemrva-mat-panel[color],onemrva-mat-task[color],onemrva-mat-choice-chip[color],mat-form-field[color],button[color],mat-icon[color],mat-chip[color],mat-chip-option[color]", inputs: ["color"] }, { kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i2$1.MatDrawerContent, selector: "mat-drawer-content" }, { kind: "component", type: LayoutLeftSidenavComponent, selector: "onemrva-layout-left-sidenav", inputs: ["items"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
691
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: LayoutComponent, isStandalone: true, selector: "onemrva-layout", inputs: { logo: "logo", languages: "languages", environment: "environment", logoRedictionUrl: "logoRedictionUrl", profile: "profile", id: "id", role: "role", showThemeSwitcher: "showThemeSwitcher" }, 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 id=\"onemrva-drawer-container\"\n [hasBackdrop]=\"drawerService.hasBackdrop()\"\n autosize\n>\n <mat-drawer\n #mainDrawer\n [class]=\"drawerService.classes()\"\n mode=\"over\"\n position=\"end\"\n >\n <ng-template drawerhost></ng-template>\n </mat-drawer>\n <mat-drawer-content>\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 class=\"nav-container onemrva-layout-container flex-center g-m\">\n {{ logoRedictionUrl }}\n <img\n class=\"logo align-center clickable\"\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 @if (title?.template; as titleTpl) {\n <ng-container *ngTemplateOutlet=\"titleTpl\"></ng-container>\n }\n </div>\n\n <div style=\"flex: 1\"></div>\n\n @if (!isSmall) {\n <div\n class=\"flex-center topMenu\"\n mat-tab-nav-bar\n [tabPanel]=\"tabPanel\"\n >\n @for (e of routes?.toArray(); track $index) {\n <a\n mat-tab-link\n [routerLink]=\"e.routerLink\"\n [attr.data-ci]=\"e.dataCy\"\n [attr.data-cy]=\"e.dataCy\"\n [routerLinkActiveOptions]=\"{\n fragment: 'exact',\n matrixParams: 'exact',\n paths: 'exact',\n queryParams: 'ignored',\n }\"\n #rla=\"routerLinkActive\"\n routerLinkActive=\"mdc-tab--active\"\n [active]=\"rla.isActive || e.isRouteActive()\"\n >\n @if (e.template; as routeTemplate) {\n <ng-container\n *ngTemplateOutlet=\"routeTemplate\"\n ></ng-container>\n }\n </a>\n }\n </div>\n }\n <mat-tab-nav-panel #tabPanel></mat-tab-nav-panel>\n\n @if (showThemeSwitcher) {\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"themeSwitch\"\n [matTooltip]=\"'layout.mode.select' | translate\"\n [attr.aria-label]=\"'layout.mode.select' | translate\"\n >\n <mat-icon>{{\n activeTheme() === 'dark'\n ? 'dark_mode'\n : activeTheme() === 'light'\n ? 'light_mode'\n : 'brightness_auto'\n }}</mat-icon>\n </button>\n <mat-menu #themeSwitch>\n <button\n mat-menu-item\n [attr.aria-label]=\"'layout.mode.dark' | translate\"\n (click)=\"toggleTheme('dark')\"\n >\n <mat-icon>dark_mode</mat-icon>\n <span>{{ 'layout.mode.dark' | translate }}</span>\n </button>\n <button\n mat-menu-item\n [attr.aria-label]=\"'layout.mode.light' | translate\"\n (click)=\"toggleTheme('light')\"\n >\n <mat-icon>light_mode</mat-icon>\n <span>{{ 'layout.mode.light' | translate }}</span>\n </button>\n <button\n mat-menu-item\n [attr.aria-label]=\"'layout.mode.system' | translate\"\n (click)=\"toggleTheme('system')\"\n >\n <mat-icon>brightness_auto</mat-icon>\n <span>{{ 'layout.mode.system' | translate }}</span>\n </button>\n </mat-menu>\n }\n @if (afterNav?.template; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n }\n\n @if (profile !== null) {\n @if (!isSmall) {\n <mat-divider\n vertical\n style=\"height: 1em; align-self: center\"\n ></mat-divider>\n }\n @if (profile.isLoggedIn) {\n <onemrva-mat-avatar\n matRipple\n [matMenuTriggerFor]=\"menu\"\n initials=\"{{ profile.initials() }}\"\n color=\"accent\"\n size=\"xsmall\"\n class=\"clickable\"\n ></onemrva-mat-avatar>\n }\n @if (!profile.isLoggedIn) {\n <onemrva-mat-avatar\n matRipple\n [matMenuTriggerFor]=\"menu\"\n icon=\"account_circle\"\n color=\"\"\n size=\"xsmall\"\n class=\"clickable\"\n ></onemrva-mat-avatar>\n }\n <mat-menu #menu=\"matMenu\">\n @if (profile.isLoggedIn) {\n <div class=\"menu-header m mb-m\">\n {{ profile.firstName }} {{ profile.lastName }}\n </div>\n <mat-divider style=\"align-self: stretch\"></mat-divider>\n\n @if (loginMenu?.template; as menuLoginTpl) {\n <ng-container\n *ngTemplateOutlet=\"menuLoginTpl\"\n ></ng-container>\n }\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 } @else {\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 }\n </mat-menu>\n }\n\n @if (\n isSmall &&\n (routes?.toArray()?.length || (languages && languages.length > 1))\n ) {\n <button\n type=\"button\"\n mat-icon-button\n class=\"menu-button\"\n data-cy=\"smallDeviceMenu\"\n (click)=\"this.toggleSideNav()\"\n [attr.aria-label]=\"'layout.menu' | translate\"\n >\n <mat-icon>menu</mat-icon>\n </button>\n }\n @if (!isSmall && languages && languages.length > 1) {\n <div class=\"flex-center\" mat-tab-nav-bar [tabPanel]=\"tabPanel\">\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 }\n <mat-menu #languageMenu>\n @for (lang of languages; track lang.code) {\n <button\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 }\n </mat-menu>\n </div>\n </mat-toolbar>\n </header>\n <ng-container>\n @if (content?.template; as tpl) {\n <div\n [id]=\"id\"\n [attr.role]=\"role\"\n class=\"onemrva-layout-content onemrva-layout-container\"\n >\n @if (leftSidenavService.items().length > 0) {\n <div class=\"container-with-nav\">\n <div class=\"left-content\">\n <onemrva-layout-left-sidenav></onemrva-layout-left-sidenav>\n </div>\n <div class=\"right-content\">\n <div class=\"content-container\">\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n </div>\n </div>\n </div>\n } @else {\n <div class=\"content-container\">\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n </div>\n }\n @if (\n environment &&\n (environment === env.LOCAL || environment === env.TEST)\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 }\n </div>\n }\n\n <footer class=\"onemrva-footer p mb text-center\">\n @if (footer?.template; as footerTpl) {\n <div class=\"onemrva-layout-container\">\n <ng-container *ngTemplateOutlet=\"footerTpl\"></ng-container>\n </div>\n }\n </footer>\n </ng-container>\n </div>\n </mat-drawer-content>\n</mat-drawer-container>\n", styles: [":host{position:relative}:host .onemrva-layout-container{width:100%;box-sizing:border-box}:host a:active{outline:none}:host router-outlet{display:block;margin-bottom:90px}:host header mat-toolbar{position:fixed;height:var(--layout-header-height);z-index:400;--mat-tab-divider-color: transparent}:host header mat-toolbar .topMenu .mat-mdc-tab-header-pagination-before,:host header mat-toolbar .topMenu .mat-mdc-tab-header-pagination-after{display:none!important}:host header mat-toolbar .logo{height:42px}:host header mat-toolbar .application-title{font-size:1.3rem;font-weight:700;height:42px;line-height:42px;color:var(--mat-sys-tertiary)}:host header mat-toolbar .mat-mdc-tab-nav-bar{text-transform:uppercase}:host .onemrva-layout-content{padding-top:var(--layout-content-padding-top);min-height:calc(100vh - 48px)}:host .onemrva-layout-content .container-with-nav{display:flex}:host .onemrva-layout-content .container-with-nav .left-content{flex:0 0 240px}@media screen and (max-width: 640px){:host .onemrva-layout-content .container-with-nav .left-content{position:absolute;z-index:10;margin-left:-240px;transition:.5s ease-in-out margin-left;overflow:hidden}:host .onemrva-layout-content .container-with-nav .left-content.open{margin-left:0}}:host .onemrva-layout-content .container-with-nav .right-content{flex:1}:host .mat-drawer-content{min-height:100vh}:host #accessibility_fab{position:fixed;bottom:16px;left:16px}: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 mat-drawer:not(.side-menu){padding:var(--double-spacer);background:var(--mat-sys-surface-container-high)}:host mat-drawer.xsmall{width:20%}:host mat-drawer.small{width:30%}:host mat-drawer.medium{width:50%}:host mat-drawer.large{width:60%}:host mat-drawer.xlarge{width:70%}:host mat-drawer.xxlarge{width:90%}@media screen and (max-width: 640px){:host mat-drawer{width:99%!important}}.mat-mdc-menu-content button.active>*{font-weight:700!important}.mat-mdc-menu-content button mat-icon{font-size:1.125rem!important;height:1.125rem;width:1.125rem}.mat-mdc-menu-content button span{font-size:14px!important}nav a.disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: MatTabNav, selector: "[mat-tab-nav-bar]", inputs: ["fitInkBarToContent", "mat-stretch-tabs", "animationDuration", "backgroundColor", "disableRipple", "color", "tabPanel"], exportAs: ["matTabNavBar", "matTabNav"] }, { kind: "component", type: MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: ["active", "disabled", "disableRipple", "tabIndex", "id"], exportAs: ["matTabLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: MatTabNavPanel, selector: "mat-tab-nav-panel", inputs: ["id"], exportAs: ["matTabNavPanel"] }, { kind: "component", type: MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: OnemrvaMatAvatarModule$1 }, { kind: "component", type: i1$1.OnemrvaMatAvatarComponent, selector: "onemrva-mat-avatar", inputs: ["id", "roundShape", "initials", "text", "icon", "src"] }, { kind: "directive", type: 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: 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: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "directive", type: DrawerHostDirective, selector: "[drawerhost]" }, { kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: OnemRvaSizeDirective$1, selector: "mat-icon[size], onemrva-mat-skeleton[size], onemrva-mat-avatar[size], button[size]", inputs: ["size"] }, { kind: "directive", type: OnemRvaColorDirective$1, selector: "onemrva-mat-selectable-box[color],div[color],onemrva-mat-avatar[color],mat-card[color],mat-toolbar[color],onemrva-mat-spinner[color],onemrva-mat-notification[color],onemrva-mat-task-list[color],onemrva-mat-sticker[color],onemrva-mat-panel[color],onemrva-mat-task[color],onemrva-mat-choice-chip[color],mat-form-field[color],button[color],mat-icon[color],mat-chip[color],mat-chip-option[color]", inputs: ["color"] }, { kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i2$1.MatDrawerContent, selector: "mat-drawer-content" }, { kind: "component", type: LayoutLeftSidenavComponent, selector: "onemrva-layout-left-sidenav", inputs: ["items"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
692
692
|
}
|
|
693
693
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: LayoutComponent, decorators: [{
|
|
694
694
|
type: Component,
|
|
@@ -720,7 +720,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
720
720
|
OnemRvaColorDirective$1,
|
|
721
721
|
MatSidenavModule,
|
|
722
722
|
LayoutLeftSidenavComponent,
|
|
723
|
-
], template: "<mat-drawer-container\n id=\"onemrva-drawer-container\"\n [hasBackdrop]=\"drawerService.hasBackdrop()\"\n autosize\n>\n <mat-drawer\n #mainDrawer\n [class]=\"drawerService.classes()\"\n mode=\"over\"\n position=\"end\"\n >\n <ng-template drawerhost></ng-template>\n </mat-drawer>\n <mat-drawer-content>\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 class=\"nav-container onemrva-layout-container flex-center g-m\">\n {{ logoRedictionUrl }}\n <img\n class=\"logo align-center clickable\"\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 @if (title?.template; as titleTpl) {\n <ng-container *ngTemplateOutlet=\"titleTpl\"></ng-container>\n }\n </div>\n\n <div style=\"flex: 1\"></div>\n\n @if (!isSmall) {\n <div\n class=\"flex-center topMenu\"\n mat-tab-nav-bar\n [tabPanel]=\"tabPanel\"\n >\n @for (e of routes?.toArray(); track $index) {\n <a\n mat-tab-link\n [routerLink]=\"e.routerLink\"\n [attr.data-ci]=\"e.dataCy\"\n [attr.data-cy]=\"e.dataCy\"\n [routerLinkActiveOptions]=\"{\n fragment: 'exact',\n matrixParams: 'exact',\n paths: 'exact',\n queryParams: 'ignored',\n }\"\n #rla=\"routerLinkActive\"\n routerLinkActive=\"mdc-tab--active\"\n [active]=\"rla.isActive || e.isRouteActive()\"\n >\n @if (e.template; as routeTemplate) {\n <ng-container\n *ngTemplateOutlet=\"routeTemplate\"\n ></ng-container>\n }\n </a>\n }\n </div>\n }\n <mat-tab-nav-panel #tabPanel></mat-tab-nav-panel>\n\n @if (showThemeSwitcher) {\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"themeSwitch\"\n [matTooltip]=\"'layout.mode.select' | translate\"\n >\n <mat-icon>{{\n activeTheme() === 'dark'\n ? 'dark_mode'\n : activeTheme() === 'light'\n ? 'light_mode'\n : 'brightness_auto'\n }}</mat-icon>\n </button>\n <mat-menu #themeSwitch>\n <button\n mat-menu-item\n [attr.aria-label]=\"'layout.mode.dark' | translate\"\n (click)=\"toggleTheme('dark')\"\n >\n <mat-icon>dark_mode</mat-icon>\n <span>{{ 'layout.mode.dark' | translate }}</span>\n </button>\n <button\n mat-menu-item\n [attr.aria-label]=\"'layout.mode.light' | translate\"\n (click)=\"toggleTheme('light')\"\n >\n <mat-icon>light_mode</mat-icon>\n <span>{{ 'layout.mode.light' | translate }}</span>\n </button>\n <button\n mat-menu-item\n [attr.aria-label]=\"'layout.mode.system' | translate\"\n (click)=\"toggleTheme('system')\"\n >\n <mat-icon>brightness_auto</mat-icon>\n <span>{{ 'layout.mode.system' | translate }}</span>\n </button>\n </mat-menu>\n }\n @if (afterNav?.template; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n }\n\n @if (profile !== null) {\n @if (!isSmall) {\n <mat-divider\n vertical\n style=\"height: 1em; align-self: center\"\n ></mat-divider>\n }\n @if (profile.isLoggedIn) {\n <onemrva-mat-avatar\n matRipple\n [matMenuTriggerFor]=\"menu\"\n initials=\"{{ profile.initials() }}\"\n color=\"accent\"\n size=\"xsmall\"\n class=\"clickable\"\n ></onemrva-mat-avatar>\n }\n @if (!profile.isLoggedIn) {\n <onemrva-mat-avatar\n matRipple\n [matMenuTriggerFor]=\"menu\"\n icon=\"account_circle\"\n color=\"\"\n size=\"xsmall\"\n class=\"clickable\"\n ></onemrva-mat-avatar>\n }\n <mat-menu #menu=\"matMenu\">\n @if (profile.isLoggedIn) {\n <div class=\"menu-header m mb-m\">\n {{ profile.firstName }} {{ profile.lastName }}\n </div>\n <mat-divider style=\"align-self: stretch\"></mat-divider>\n\n @if (loginMenu?.template; as menuLoginTpl) {\n <ng-container\n *ngTemplateOutlet=\"menuLoginTpl\"\n ></ng-container>\n }\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 } @else {\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 }\n </mat-menu>\n }\n\n @if (\n isSmall &&\n (routes?.toArray()?.length || (languages && languages.length > 1))\n ) {\n <button\n type=\"button\"\n mat-icon-button\n class=\"menu-button\"\n data-cy=\"smallDeviceMenu\"\n (click)=\"this.toggleSideNav()\"\n [attr.aria-label]=\"'layout.menu' | translate\"\n >\n <mat-icon>menu</mat-icon>\n </button>\n }\n @if (!isSmall) {\n <div class=\"flex-center\" mat-tab-nav-bar [tabPanel]=\"tabPanel\">\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 }\n <mat-menu #languageMenu>\n @for (lang of languages; track lang.code) {\n <button\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 }\n </mat-menu>\n </div>\n </mat-toolbar>\n </header>\n <ng-container>\n @if (content?.template; as tpl) {\n <div\n [id]=\"id\"\n [attr.role]=\"role\"\n class=\"onemrva-layout-content onemrva-layout-container\"\n >\n @if (leftSidenavService.items().length > 0) {\n <div class=\"container-with-nav\">\n <div class=\"left-content\">\n <onemrva-layout-left-sidenav></onemrva-layout-left-sidenav>\n </div>\n <div class=\"right-content\">\n <div class=\"content-container\">\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n </div>\n </div>\n </div>\n } @else {\n <div class=\"content-container\">\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n </div>\n }\n @if (\n environment &&\n (environment === env.LOCAL || environment === env.TEST)\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 }\n </div>\n }\n\n <footer class=\"onemrva-footer p mb text-center\">\n @if (footer?.template; as footerTpl) {\n <div class=\"onemrva-layout-container\">\n <ng-container *ngTemplateOutlet=\"footerTpl\"></ng-container>\n </div>\n }\n </footer>\n </ng-container>\n </div>\n </mat-drawer-content>\n</mat-drawer-container>\n", styles: [":host{position:relative}:host .onemrva-layout-container{width:100%;box-sizing:border-box}:host a:active{outline:none}:host router-outlet{display:block;margin-bottom:90px}:host header mat-toolbar{position:fixed;height:var(--layout-header-height);z-index:400;--mat-tab-divider-color: transparent}:host header mat-toolbar .topMenu .mat-mdc-tab-header-pagination-before,:host header mat-toolbar .topMenu .mat-mdc-tab-header-pagination-after{display:none!important}:host header mat-toolbar .logo{height:42px}:host header mat-toolbar .application-title{font-size:1.3rem;font-weight:700;height:42px;line-height:42px;color:var(--mat-sys-tertiary)}:host header mat-toolbar .mat-mdc-tab-nav-bar{text-transform:uppercase}:host .onemrva-layout-content{padding-top:var(--layout-content-padding-top);min-height:calc(100vh - 48px)}:host .onemrva-layout-content .container-with-nav{display:flex}:host .onemrva-layout-content .container-with-nav .left-content{flex:0 0 240px}@media screen and (max-width: 640px){:host .onemrva-layout-content .container-with-nav .left-content{position:absolute;z-index:10;margin-left:-240px;transition:.5s ease-in-out margin-left;overflow:hidden}:host .onemrva-layout-content .container-with-nav .left-content.open{margin-left:0}}:host .onemrva-layout-content .container-with-nav .right-content{flex:1}:host .mat-drawer-content{min-height:100vh}:host #accessibility_fab{position:fixed;bottom:16px;left:16px}: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 mat-drawer:not(.side-menu){padding:var(--double-spacer);background:var(--mat-sys-surface-container-high)}:host mat-drawer.xsmall{width:20%}:host mat-drawer.small{width:30%}:host mat-drawer.medium{width:50%}:host mat-drawer.large{width:60%}:host mat-drawer.xlarge{width:70%}:host mat-drawer.xxlarge{width:90%}@media screen and (max-width: 640px){:host mat-drawer{width:99%!important}}.mat-mdc-menu-content button.active>*{font-weight:700!important}.mat-mdc-menu-content button mat-icon{font-size:1.125rem!important;height:1.125rem;width:1.125rem}.mat-mdc-menu-content button span{font-size:14px!important}nav a.disabled{pointer-events:none}\n"] }]
|
|
723
|
+
], template: "<mat-drawer-container\n id=\"onemrva-drawer-container\"\n [hasBackdrop]=\"drawerService.hasBackdrop()\"\n autosize\n>\n <mat-drawer\n #mainDrawer\n [class]=\"drawerService.classes()\"\n mode=\"over\"\n position=\"end\"\n >\n <ng-template drawerhost></ng-template>\n </mat-drawer>\n <mat-drawer-content>\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 class=\"nav-container onemrva-layout-container flex-center g-m\">\n {{ logoRedictionUrl }}\n <img\n class=\"logo align-center clickable\"\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 @if (title?.template; as titleTpl) {\n <ng-container *ngTemplateOutlet=\"titleTpl\"></ng-container>\n }\n </div>\n\n <div style=\"flex: 1\"></div>\n\n @if (!isSmall) {\n <div\n class=\"flex-center topMenu\"\n mat-tab-nav-bar\n [tabPanel]=\"tabPanel\"\n >\n @for (e of routes?.toArray(); track $index) {\n <a\n mat-tab-link\n [routerLink]=\"e.routerLink\"\n [attr.data-ci]=\"e.dataCy\"\n [attr.data-cy]=\"e.dataCy\"\n [routerLinkActiveOptions]=\"{\n fragment: 'exact',\n matrixParams: 'exact',\n paths: 'exact',\n queryParams: 'ignored',\n }\"\n #rla=\"routerLinkActive\"\n routerLinkActive=\"mdc-tab--active\"\n [active]=\"rla.isActive || e.isRouteActive()\"\n >\n @if (e.template; as routeTemplate) {\n <ng-container\n *ngTemplateOutlet=\"routeTemplate\"\n ></ng-container>\n }\n </a>\n }\n </div>\n }\n <mat-tab-nav-panel #tabPanel></mat-tab-nav-panel>\n\n @if (showThemeSwitcher) {\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"themeSwitch\"\n [matTooltip]=\"'layout.mode.select' | translate\"\n [attr.aria-label]=\"'layout.mode.select' | translate\"\n >\n <mat-icon>{{\n activeTheme() === 'dark'\n ? 'dark_mode'\n : activeTheme() === 'light'\n ? 'light_mode'\n : 'brightness_auto'\n }}</mat-icon>\n </button>\n <mat-menu #themeSwitch>\n <button\n mat-menu-item\n [attr.aria-label]=\"'layout.mode.dark' | translate\"\n (click)=\"toggleTheme('dark')\"\n >\n <mat-icon>dark_mode</mat-icon>\n <span>{{ 'layout.mode.dark' | translate }}</span>\n </button>\n <button\n mat-menu-item\n [attr.aria-label]=\"'layout.mode.light' | translate\"\n (click)=\"toggleTheme('light')\"\n >\n <mat-icon>light_mode</mat-icon>\n <span>{{ 'layout.mode.light' | translate }}</span>\n </button>\n <button\n mat-menu-item\n [attr.aria-label]=\"'layout.mode.system' | translate\"\n (click)=\"toggleTheme('system')\"\n >\n <mat-icon>brightness_auto</mat-icon>\n <span>{{ 'layout.mode.system' | translate }}</span>\n </button>\n </mat-menu>\n }\n @if (afterNav?.template; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n }\n\n @if (profile !== null) {\n @if (!isSmall) {\n <mat-divider\n vertical\n style=\"height: 1em; align-self: center\"\n ></mat-divider>\n }\n @if (profile.isLoggedIn) {\n <onemrva-mat-avatar\n matRipple\n [matMenuTriggerFor]=\"menu\"\n initials=\"{{ profile.initials() }}\"\n color=\"accent\"\n size=\"xsmall\"\n class=\"clickable\"\n ></onemrva-mat-avatar>\n }\n @if (!profile.isLoggedIn) {\n <onemrva-mat-avatar\n matRipple\n [matMenuTriggerFor]=\"menu\"\n icon=\"account_circle\"\n color=\"\"\n size=\"xsmall\"\n class=\"clickable\"\n ></onemrva-mat-avatar>\n }\n <mat-menu #menu=\"matMenu\">\n @if (profile.isLoggedIn) {\n <div class=\"menu-header m mb-m\">\n {{ profile.firstName }} {{ profile.lastName }}\n </div>\n <mat-divider style=\"align-self: stretch\"></mat-divider>\n\n @if (loginMenu?.template; as menuLoginTpl) {\n <ng-container\n *ngTemplateOutlet=\"menuLoginTpl\"\n ></ng-container>\n }\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 } @else {\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 }\n </mat-menu>\n }\n\n @if (\n isSmall &&\n (routes?.toArray()?.length || (languages && languages.length > 1))\n ) {\n <button\n type=\"button\"\n mat-icon-button\n class=\"menu-button\"\n data-cy=\"smallDeviceMenu\"\n (click)=\"this.toggleSideNav()\"\n [attr.aria-label]=\"'layout.menu' | translate\"\n >\n <mat-icon>menu</mat-icon>\n </button>\n }\n @if (!isSmall && languages && languages.length > 1) {\n <div class=\"flex-center\" mat-tab-nav-bar [tabPanel]=\"tabPanel\">\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 }\n <mat-menu #languageMenu>\n @for (lang of languages; track lang.code) {\n <button\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 }\n </mat-menu>\n </div>\n </mat-toolbar>\n </header>\n <ng-container>\n @if (content?.template; as tpl) {\n <div\n [id]=\"id\"\n [attr.role]=\"role\"\n class=\"onemrva-layout-content onemrva-layout-container\"\n >\n @if (leftSidenavService.items().length > 0) {\n <div class=\"container-with-nav\">\n <div class=\"left-content\">\n <onemrva-layout-left-sidenav></onemrva-layout-left-sidenav>\n </div>\n <div class=\"right-content\">\n <div class=\"content-container\">\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n </div>\n </div>\n </div>\n } @else {\n <div class=\"content-container\">\n <ng-container *ngTemplateOutlet=\"tpl\"></ng-container>\n </div>\n }\n @if (\n environment &&\n (environment === env.LOCAL || environment === env.TEST)\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 }\n </div>\n }\n\n <footer class=\"onemrva-footer p mb text-center\">\n @if (footer?.template; as footerTpl) {\n <div class=\"onemrva-layout-container\">\n <ng-container *ngTemplateOutlet=\"footerTpl\"></ng-container>\n </div>\n }\n </footer>\n </ng-container>\n </div>\n </mat-drawer-content>\n</mat-drawer-container>\n", styles: [":host{position:relative}:host .onemrva-layout-container{width:100%;box-sizing:border-box}:host a:active{outline:none}:host router-outlet{display:block;margin-bottom:90px}:host header mat-toolbar{position:fixed;height:var(--layout-header-height);z-index:400;--mat-tab-divider-color: transparent}:host header mat-toolbar .topMenu .mat-mdc-tab-header-pagination-before,:host header mat-toolbar .topMenu .mat-mdc-tab-header-pagination-after{display:none!important}:host header mat-toolbar .logo{height:42px}:host header mat-toolbar .application-title{font-size:1.3rem;font-weight:700;height:42px;line-height:42px;color:var(--mat-sys-tertiary)}:host header mat-toolbar .mat-mdc-tab-nav-bar{text-transform:uppercase}:host .onemrva-layout-content{padding-top:var(--layout-content-padding-top);min-height:calc(100vh - 48px)}:host .onemrva-layout-content .container-with-nav{display:flex}:host .onemrva-layout-content .container-with-nav .left-content{flex:0 0 240px}@media screen and (max-width: 640px){:host .onemrva-layout-content .container-with-nav .left-content{position:absolute;z-index:10;margin-left:-240px;transition:.5s ease-in-out margin-left;overflow:hidden}:host .onemrva-layout-content .container-with-nav .left-content.open{margin-left:0}}:host .onemrva-layout-content .container-with-nav .right-content{flex:1}:host .mat-drawer-content{min-height:100vh}:host #accessibility_fab{position:fixed;bottom:16px;left:16px}: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 mat-drawer:not(.side-menu){padding:var(--double-spacer);background:var(--mat-sys-surface-container-high)}:host mat-drawer.xsmall{width:20%}:host mat-drawer.small{width:30%}:host mat-drawer.medium{width:50%}:host mat-drawer.large{width:60%}:host mat-drawer.xlarge{width:70%}:host mat-drawer.xxlarge{width:90%}@media screen and (max-width: 640px){:host mat-drawer{width:99%!important}}.mat-mdc-menu-content button.active>*{font-weight:700!important}.mat-mdc-menu-content button mat-icon{font-size:1.125rem!important;height:1.125rem;width:1.125rem}.mat-mdc-menu-content button span{font-size:14px!important}nav a.disabled{pointer-events:none}\n"] }]
|
|
724
724
|
}], ctorParameters: () => [], propDecorators: { routes: [{
|
|
725
725
|
type: ContentChildren,
|
|
726
726
|
args: [LayoutRouteComponent]
|
|
@@ -3367,7 +3367,7 @@ class OnemrvaMatInputIbanComponent {
|
|
|
3367
3367
|
this.cd = inject(ChangeDetectorRef);
|
|
3368
3368
|
this.formBuilder = inject(FormBuilder);
|
|
3369
3369
|
this.ngControl = inject(NgControl, { optional: true });
|
|
3370
|
-
this.onChange = (
|
|
3370
|
+
this.onChange = (_value) => {
|
|
3371
3371
|
// Updated to properly notify parent form
|
|
3372
3372
|
};
|
|
3373
3373
|
this.onTouched = () => {
|
|
@@ -3671,7 +3671,6 @@ class OnemrvaMatInputPhoneComponent {
|
|
|
3671
3671
|
this.noEntriesFoundLabel = 'Not found';
|
|
3672
3672
|
this.placeholderLabel = 'Search';
|
|
3673
3673
|
this.searchAriaLabel = 'Search';
|
|
3674
|
-
this.label = 'Phone number';
|
|
3675
3674
|
this.defaultPrefix = '+32';
|
|
3676
3675
|
this.getCountry = new EventEmitter();
|
|
3677
3676
|
this.filterCtrl = new FormControl('');
|
|
@@ -3683,11 +3682,9 @@ class OnemrvaMatInputPhoneComponent {
|
|
|
3683
3682
|
this.touched = false;
|
|
3684
3683
|
this.focusMonitor = inject(FocusMonitor);
|
|
3685
3684
|
this.elementRef = inject((ElementRef));
|
|
3686
|
-
this.cd = inject(ChangeDetectorRef);
|
|
3687
3685
|
this.formBuilder = inject(FormBuilder);
|
|
3688
3686
|
this.ngControl = inject(NgControl, { optional: true });
|
|
3689
|
-
this.onChange = (
|
|
3690
|
-
//console.log('---');
|
|
3687
|
+
this.onChange = (_value) => {
|
|
3691
3688
|
};
|
|
3692
3689
|
this.onTouched = () => {
|
|
3693
3690
|
if (!this.touched) {
|
|
@@ -3726,9 +3723,9 @@ class OnemrvaMatInputPhoneComponent {
|
|
|
3726
3723
|
control.invalid &&
|
|
3727
3724
|
(control.dirty || control.touched));
|
|
3728
3725
|
// Also check internal form errors
|
|
3729
|
-
const internalErrors =
|
|
3726
|
+
const internalErrors = this.parts &&
|
|
3730
3727
|
this.parts.invalid &&
|
|
3731
|
-
(this.parts.dirty || this.parts.touched)
|
|
3728
|
+
(this.parts.dirty || this.parts.touched);
|
|
3732
3729
|
return externalErrors || internalErrors;
|
|
3733
3730
|
}
|
|
3734
3731
|
get shouldLabelFloat() {
|
|
@@ -3752,20 +3749,15 @@ class OnemrvaMatInputPhoneComponent {
|
|
|
3752
3749
|
return number || '';
|
|
3753
3750
|
}
|
|
3754
3751
|
set value(phoneNumber) {
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
}
|
|
3762
|
-
else {
|
|
3763
|
-
// Keep existing logic for parsing the phone number
|
|
3764
|
-
this.parts.setValue({
|
|
3765
|
-
countryCode: this.countryCodeField.getRawValue() || null,
|
|
3766
|
-
number: phoneNumber || null,
|
|
3767
|
-
});
|
|
3752
|
+
const incoming = phoneNumber ?? '';
|
|
3753
|
+
// If empty, clear both fields without emitting extra events
|
|
3754
|
+
if (incoming.trim() === '') {
|
|
3755
|
+
this.parts.setValue({ countryCode: '', number: '' }, { emitEvent: false });
|
|
3756
|
+
this.stateChanges.next();
|
|
3757
|
+
return;
|
|
3768
3758
|
}
|
|
3759
|
+
// Set the number field; existing subscriptions will derive country code and formatting
|
|
3760
|
+
this.numberField.setValue(incoming, { emitEvent: false });
|
|
3769
3761
|
this.stateChanges.next();
|
|
3770
3762
|
}
|
|
3771
3763
|
get disabled() {
|
|
@@ -3880,9 +3872,9 @@ class OnemrvaMatInputPhoneComponent {
|
|
|
3880
3872
|
this.numberField.setValue(number, { emitEvent: false });
|
|
3881
3873
|
this.formatPhoneNumber();
|
|
3882
3874
|
}
|
|
3883
|
-
setTimeout(() => {
|
|
3884
|
-
|
|
3885
|
-
}, 200);
|
|
3875
|
+
// setTimeout(() => {
|
|
3876
|
+
// this.number.nativeElement.focus();
|
|
3877
|
+
// }, 200);
|
|
3886
3878
|
});
|
|
3887
3879
|
});
|
|
3888
3880
|
}
|
|
@@ -3914,7 +3906,16 @@ class OnemrvaMatInputPhoneComponent {
|
|
|
3914
3906
|
this.onTouched = fn;
|
|
3915
3907
|
}
|
|
3916
3908
|
writeValue(number) {
|
|
3909
|
+
// Ignore undefined updates (e.g., unrelated JSONForms changes)
|
|
3910
|
+
if (number === undefined)
|
|
3911
|
+
return;
|
|
3912
|
+
if (number === null) {
|
|
3913
|
+
this.parts.setValue({ countryCode: '', number: '' }, { emitEvent: false });
|
|
3914
|
+
this.stateChanges.next();
|
|
3915
|
+
return;
|
|
3916
|
+
}
|
|
3917
3917
|
this.value = number;
|
|
3918
|
+
this.stateChanges.next();
|
|
3918
3919
|
}
|
|
3919
3920
|
_handleInput(control, nextElement) {
|
|
3920
3921
|
this.autoFocusNext(control, nextElement);
|
|
@@ -3949,7 +3950,7 @@ class OnemrvaMatInputPhoneComponent {
|
|
|
3949
3950
|
}
|
|
3950
3951
|
}
|
|
3951
3952
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: OnemrvaMatInputPhoneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3952
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: OnemrvaMatInputPhoneComponent, isStandalone: true, selector: "onemrva-mat-input-phone", inputs: { noEntriesFoundLabel: "noEntriesFoundLabel", placeholderLabel: "placeholderLabel", searchAriaLabel: "searchAriaLabel",
|
|
3953
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: OnemrvaMatInputPhoneComponent, isStandalone: true, selector: "onemrva-mat-input-phone", inputs: { noEntriesFoundLabel: "noEntriesFoundLabel", placeholderLabel: "placeholderLabel", searchAriaLabel: "searchAriaLabel", defaultPrefix: "defaultPrefix", value: "value", readonly: "readonly", disabled: "disabled", placeholder: "placeholder", required: "required" }, outputs: { getCountry: "getCountry" }, providers: [
|
|
3953
3954
|
{
|
|
3954
3955
|
provide: MatFormFieldControl,
|
|
3955
3956
|
useExisting: OnemrvaMatInputPhoneComponent,
|
|
@@ -3985,8 +3986,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
3985
3986
|
type: Input
|
|
3986
3987
|
}], searchAriaLabel: [{
|
|
3987
3988
|
type: Input
|
|
3988
|
-
}], label: [{
|
|
3989
|
-
type: Input
|
|
3990
3989
|
}], defaultPrefix: [{
|
|
3991
3990
|
type: Input
|
|
3992
3991
|
}], getCountry: [{
|
|
@@ -9724,8 +9723,8 @@ const directives = [
|
|
|
9724
9723
|
];
|
|
9725
9724
|
|
|
9726
9725
|
/**
|
|
9727
|
-
* Get language from local storage or browser
|
|
9728
|
-
*
|
|
9726
|
+
* Get language from local storage or browser.
|
|
9727
|
+
*
|
|
9729
9728
|
* @param translateService
|
|
9730
9729
|
* @param languages
|
|
9731
9730
|
* @param default_language
|
|
@@ -10713,14 +10712,20 @@ function onemrvaDateLuxonYearMonthProvider() {
|
|
|
10713
10712
|
];
|
|
10714
10713
|
}
|
|
10715
10714
|
|
|
10716
|
-
// import { MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
|
|
10717
|
-
// import { ONEMRVA_THEME_CLASS } from '@onemrvapublic/design-system/shared';
|
|
10718
10715
|
function onemrvaThemeProvider() {
|
|
10719
10716
|
return [
|
|
10720
10717
|
{
|
|
10721
10718
|
provide: ErrorHandler,
|
|
10722
10719
|
useClass: OnemrvaErrorHandler,
|
|
10723
10720
|
},
|
|
10721
|
+
// {
|
|
10722
|
+
// provide: CDN_URL_MODE,
|
|
10723
|
+
// useValue: CDNUrlModeOptions.PROD,
|
|
10724
|
+
// },
|
|
10725
|
+
// {
|
|
10726
|
+
// provide: LOOKUP_COUNTRY_SERVICE_URL,
|
|
10727
|
+
// useValue: 'assets/mock/countries.json',
|
|
10728
|
+
// },
|
|
10724
10729
|
{
|
|
10725
10730
|
provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
|
|
10726
10731
|
useValue: {
|
|
@@ -10926,7 +10931,14 @@ class IbanRendererComponent extends JsonFormsControl {
|
|
|
10926
10931
|
this.readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : []));
|
|
10927
10932
|
this.isUpdating = signal(false, ...(ngDevMode ? [{ debugName: "isUpdating" }] : []));
|
|
10928
10933
|
this.getEventValue = (event) => {
|
|
10929
|
-
|
|
10934
|
+
if (typeof event === 'string') {
|
|
10935
|
+
return event.replace(/\s/g, '');
|
|
10936
|
+
}
|
|
10937
|
+
if (event && typeof event.value === 'string') {
|
|
10938
|
+
return event.value.replace(/\s/g, '');
|
|
10939
|
+
}
|
|
10940
|
+
const raw = event?.target?.value;
|
|
10941
|
+
return typeof raw === 'string' ? raw.replace(/\s/g, '') : raw;
|
|
10930
10942
|
};
|
|
10931
10943
|
this.validator = (control) => {
|
|
10932
10944
|
if (this.isUpdating()) {
|
|
@@ -10958,36 +10970,14 @@ class IbanRendererComponent extends JsonFormsControl {
|
|
|
10958
10970
|
this.form.setValue(this.data);
|
|
10959
10971
|
this.form.setValidators([Validators.required, this.validator]);
|
|
10960
10972
|
}
|
|
10961
|
-
onChange(event) {
|
|
10962
|
-
const ibanValue = this.buildIbanValue(event);
|
|
10963
|
-
const modifiedEvent = {
|
|
10964
|
-
...event,
|
|
10965
|
-
target: { ...event.target, value: ibanValue },
|
|
10966
|
-
};
|
|
10967
|
-
super.onChange(modifiedEvent);
|
|
10968
|
-
}
|
|
10969
|
-
buildIbanValue(event) {
|
|
10970
|
-
let builtValue = event?.currentTarget?.innerText;
|
|
10971
|
-
if (event?.data === null) {
|
|
10972
|
-
builtValue = builtValue + event?.target?.value?.slice(0, -1);
|
|
10973
|
-
}
|
|
10974
|
-
else {
|
|
10975
|
-
builtValue =
|
|
10976
|
-
builtValue + event?.target?.value.toString().replace(/\s/g, '');
|
|
10977
|
-
if (event?.target?.value?.toString().length < 14) {
|
|
10978
|
-
builtValue = builtValue + event?.data;
|
|
10979
|
-
}
|
|
10980
|
-
}
|
|
10981
|
-
return builtValue;
|
|
10982
|
-
}
|
|
10983
10973
|
setErrorValue() {
|
|
10984
10974
|
this.isUpdating.set(true);
|
|
10985
10975
|
try {
|
|
10986
10976
|
// Get existing errors
|
|
10987
10977
|
const currentState = this.jsonFormsService.getState();
|
|
10988
|
-
console.debug('setErrorValue->Current state:', currentState);
|
|
10978
|
+
//console.debug('setErrorValue->Current state:', currentState);
|
|
10989
10979
|
const currentErrors = currentState?.jsonforms?.core?.['errors'] ?? [];
|
|
10990
|
-
console.debug('setErrorValue->Existing JSONForms errors:', currentErrors);
|
|
10980
|
+
//console.debug('setErrorValue->Existing JSONForms errors:', currentErrors);
|
|
10991
10981
|
const instancePath = JsonFormsSchemaPathUtil.extractStepKey(this.uischema?.scope);
|
|
10992
10982
|
// Add the IBAN error
|
|
10993
10983
|
const ibanError = {
|
|
@@ -10999,7 +10989,7 @@ class IbanRendererComponent extends JsonFormsControl {
|
|
|
10999
10989
|
};
|
|
11000
10990
|
// Combine IBAN errors with existing errors of jsonforms
|
|
11001
10991
|
const updatedErrors = [...currentErrors, ibanError];
|
|
11002
|
-
console.debug('setErrorValue->All errors:', updatedErrors);
|
|
10992
|
+
//console.debug('setErrorValue->All errors:', updatedErrors);
|
|
11003
10993
|
const updateAction = Actions.updateErrors(updatedErrors);
|
|
11004
10994
|
this.jsonFormsService.updateCore(updateAction);
|
|
11005
10995
|
}
|
|
@@ -11116,9 +11106,9 @@ class NissRendererComponent extends JsonFormsControl {
|
|
|
11116
11106
|
try {
|
|
11117
11107
|
// Get existing errors
|
|
11118
11108
|
const currentState = this.jsonFormsService.getState();
|
|
11119
|
-
console.debug('setErrorValue->Current state:', currentState);
|
|
11109
|
+
//console.debug('setErrorValue->Current state:', currentState);
|
|
11120
11110
|
const currentErrors = currentState?.jsonforms?.core?.['errors'] ?? [];
|
|
11121
|
-
console.debug('setErrorValue->Existing JSONForms errors:', currentErrors);
|
|
11111
|
+
//console.debug('setErrorValue->Existing JSONForms errors:', currentErrors);
|
|
11122
11112
|
const instancePath = JsonFormsSchemaPathUtil.extractStepKey(this.uischema?.scope);
|
|
11123
11113
|
// Add the SSIN errors
|
|
11124
11114
|
const ssinError = {
|
|
@@ -11130,7 +11120,7 @@ class NissRendererComponent extends JsonFormsControl {
|
|
|
11130
11120
|
};
|
|
11131
11121
|
// Combine SSIN errors with existing errors of jsonforms
|
|
11132
11122
|
const updatedErrors = [...currentErrors, ssinError];
|
|
11133
|
-
console.debug('setErrorValue->All errors:', updatedErrors);
|
|
11123
|
+
//console.debug('setErrorValue->All errors:', updatedErrors);
|
|
11134
11124
|
const updateAction = Actions.updateErrors(updatedErrors);
|
|
11135
11125
|
this.jsonFormsService.updateCore(updateAction);
|
|
11136
11126
|
}
|
|
@@ -11164,8 +11154,30 @@ const nissControlTester = rankWith(10,
|
|
|
11164
11154
|
scopeEndsWith('ssin'));
|
|
11165
11155
|
|
|
11166
11156
|
class PhoneRendererComponent extends JsonFormsControl {
|
|
11157
|
+
constructor() {
|
|
11158
|
+
super(...arguments);
|
|
11159
|
+
this.getEventValue = (event) => {
|
|
11160
|
+
return event?.target?.value;
|
|
11161
|
+
};
|
|
11162
|
+
this.validator = (control) => {
|
|
11163
|
+
const value = control.value;
|
|
11164
|
+
if (value === null || value === undefined || value === '')
|
|
11165
|
+
return null;
|
|
11166
|
+
if (typeof value !== 'string')
|
|
11167
|
+
return { phone: true };
|
|
11168
|
+
// Basic international phone validation: starts with '+' or digit, min 6 digits when spaces removed
|
|
11169
|
+
const normalized = value.replace(/\s+/g, '');
|
|
11170
|
+
const isValid = /^\+?\d{6,}$/.test(normalized);
|
|
11171
|
+
return isValid ? null : { phone: true };
|
|
11172
|
+
};
|
|
11173
|
+
}
|
|
11174
|
+
ngOnInit() {
|
|
11175
|
+
super.ngOnInit();
|
|
11176
|
+
this.form.setValue(this.data);
|
|
11177
|
+
this.form.setValidators([Validators.required, this.validator]);
|
|
11178
|
+
}
|
|
11167
11179
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: PhoneRendererComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
11168
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: PhoneRendererComponent, isStandalone: true, selector: "app-phone-renderer", usesInheritance: true, ngImport: i0, template: "@if (!hidden) {\n <mat-form-field>\n <mat-label>Phone number</mat-label>\n\n <onemrva-mat-input-phone\n [formControl]=\"form\"\n placeholder=\"+32 475 12 23 34\"\n ></onemrva-mat-input-phone>\n\n <mat-hint>hint</mat-hint>\n @if (form.invalid) {\n <mat-error>\n {{ 'input.phone.invalid' | translate }}\n </mat-error>\n }\n </mat-form-field>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: OnemrvaMatInputPhoneComponent$1, selector: "onemrva-mat-input-phone", inputs: ["noEntriesFoundLabel", "placeholderLabel", "searchAriaLabel", "
|
|
11180
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: PhoneRendererComponent, isStandalone: true, selector: "app-phone-renderer", usesInheritance: true, ngImport: i0, template: "@if (!hidden) {\n <mat-form-field>\n <mat-label>Phone number</mat-label>\n\n <onemrva-mat-input-phone\n [formControl]=\"form\"\n placeholder=\"+32 475 12 23 34\"\n ></onemrva-mat-input-phone>\n\n <mat-hint>hint</mat-hint>\n @if (form.invalid) {\n <mat-error>\n {{ 'input.phone.invalid' | translate }}\n </mat-error>\n }\n </mat-form-field>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: OnemrvaMatInputPhoneComponent$1, selector: "onemrva-mat-input-phone", inputs: ["noEntriesFoundLabel", "placeholderLabel", "searchAriaLabel", "defaultPrefix", "value", "readonly", "disabled", "placeholder", "required"], outputs: ["getCountry"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
11169
11181
|
}
|
|
11170
11182
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: PhoneRendererComponent, decorators: [{
|
|
11171
11183
|
type: Component,
|