@abp/ng.theme.basic
Version:
ABP Framework is a complete open-source infrastructure to create modern web applications by following the best practices and conventions of software development. This package is a part of the [ABP Framework](https://abp.io) and contains client-side files.
277 lines (266 loc) • 75.3 kB
JavaScript
import * as i0 from '@angular/core';
import { inject, ChangeDetectorRef, Injectable, Component, Renderer2, input, viewChildren, PLATFORM_ID, ViewEncapsulation, ChangeDetectionStrategy, InjectionToken, Injector, provideAppInitializer, makeEnvironmentProviders, NgModule } from '@angular/core';
import { SubscriptionService, RouterEvents, EnvironmentService, RoutesService, PermissionDirective, AsyncLocalizationPipe, LocalizationPipe, AbpRouteCultureUrlPipe, ToInjectorPipe, ReplaceableTemplateDirective, SafeHtmlPipe, NAVIGATE_TO_MANAGE_PROFILE, AuthService, ConfigStateService, SessionStateService, LazyLoadService, LOADING_STRATEGY, DomInsertionService, ReplaceableComponentsService, CONTENT_STRATEGY } from '@abp/ng.core';
import { fromEvent } from 'rxjs';
import { debounceTime, map } from 'rxjs/operators';
import { DOCUMENT, NgTemplateOutlet, AsyncPipe, isPlatformBrowser, NgComponentOutlet } from '@angular/common';
import { RouterLink, RouterOutlet } from '@angular/router';
import { LOGO_URL_TOKEN, LOGO_APP_NAME_TOKEN, EllipsisDirective, NavItemsService, AbpVisibleDirective, ModalComponent, ButtonComponent, ModalCloseDirective, PageAlertService, collapseWithMargin, slideFromBottom, UserMenuService, DocumentDirHandlerService } from '@abp/ng.theme.shared';
import * as i1 from '@ng-bootstrap/ng-bootstrap';
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
import { TenantBoxService, AuthWrapperService } from '@abp/ng.account.core';
import * as i1$1 from '@angular/forms';
import { FormsModule } from '@angular/forms';
import { ValidationErrorComponent as ValidationErrorComponent$1, VALIDATION_ERROR_TEMPLATE, VALIDATION_TARGET_SELECTOR, VALIDATION_INVALID_CLASSES } from '@ngx-validate/core';
class LayoutService {
constructor() {
this.subscription = inject(SubscriptionService);
this.cdRef = inject(ChangeDetectorRef);
this.document = inject(DOCUMENT);
this.isCollapsed = true;
this.logoComponentKey = "Theme.LogoComponent" /* eThemeBasicComponents.Logo */;
this.routesComponentKey = "Theme.RoutesComponent" /* eThemeBasicComponents.Routes */;
this.navItemsComponentKey = "Theme.NavItemsComponent" /* eThemeBasicComponents.NavItems */;
const subscription = this.subscription;
const routerEvents = inject(RouterEvents);
subscription.addOne(routerEvents.getNavigationEvents("End"), () => {
this.isCollapsed = true;
});
}
checkWindowWidth() {
const isSmallScreen = this.document.defaultView.innerWidth < 992;
if (isSmallScreen && this.smallScreen === false) {
this.isCollapsed = false;
setTimeout(() => {
this.isCollapsed = true;
}, 100);
}
this.smallScreen = isSmallScreen;
this.cdRef.detectChanges();
}
subscribeWindowSize() {
this.checkWindowWidth();
const resize$ = fromEvent(this.document.defaultView, 'resize').pipe(debounceTime(150));
this.subscription.addOne(resize$, () => this.checkWindowWidth());
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LayoutService }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LayoutService, decorators: [{
type: Injectable
}], ctorParameters: () => [] });
class LogoComponent {
constructor() {
this.environment = inject(EnvironmentService);
this.providedLogoUrl = inject(LOGO_URL_TOKEN, { optional: true });
this.providedAppName = inject(LOGO_APP_NAME_TOKEN, { optional: true });
}
get logoUrl() {
return (this.providedLogoUrl ?? this.environment.getEnvironment().application?.logoUrl);
}
get appName() {
return (this.providedAppName ?? this.environment.getEnvironment().application?.name);
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LogoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LogoComponent, isStandalone: true, selector: "abp-logo", ngImport: i0, template: `
<a class="navbar-brand" routerLink="/">
@if (logoUrl) {
<img [src]="logoUrl" [alt]="appName" width="100%" height="auto" />
} @else {
{{ appName }}
}
</a>
`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LogoComponent, decorators: [{
type: Component,
args: [{
selector: 'abp-logo',
template: `
<a class="navbar-brand" routerLink="/">
@if (logoUrl) {
<img [src]="logoUrl" [alt]="appName" width="100%" height="auto" />
} @else {
{{ appName }}
}
</a>
`,
standalone: true,
imports: [RouterLink],
}]
}] });
class RoutesComponent {
constructor() {
this.routesService = inject(RoutesService);
this.renderer = inject(Renderer2);
this.smallScreen = input(undefined, ...(ngDevMode ? [{ debugName: "smallScreen" }] : /* istanbul ignore next */ []));
this.childrenContainers = viewChildren('childrenContainer', ...(ngDevMode ? [{ debugName: "childrenContainers" }] : /* istanbul ignore next */ []));
this.rootDropdownExpand = {};
this.trackByFn = (_, item) => item.name;
}
isDropdown(node) {
return !node?.isLeaf || this.routesService.hasChildren(node.name);
}
closeDropdown() {
this.childrenContainers().forEach(({ nativeElement }) => {
this.renderer.addClass(nativeElement, 'd-none');
setTimeout(() => this.renderer.removeClass(nativeElement, 'd-none'), 0);
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: RoutesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: RoutesComponent, isStandalone: true, selector: "abp-routes", inputs: { smallScreen: { classPropertyName: "smallScreen", publicName: "smallScreen", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "childrenContainers", predicate: ["childrenContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<ul class=\"navbar-nav\">\r\n @for (route of routesService.visible$ | async; track $index) {\r\n <ng-container [ngTemplateOutlet]=\"isDropdown(route) ? dropdownLink : defaultLink\"\r\n [ngTemplateOutletContext]=\"{ $implicit: route }\" />\r\n }\r\n\r\n <ng-template #defaultLink let-route>\r\n <li class=\"nav-item\" *abpPermission=\"route.requiredPolicy\">\r\n <a class=\"nav-link\" [routerLink]=\"route.path | abpRouteCultureUrl\">\r\n @if (route.iconClass) {\r\n <i [class]=\"route.iconClass\"></i>\r\n }\r\n {{ route.name | abpAsyncLocalization | async }}\r\n </a>\r\n </li>\r\n </ng-template>\r\n\r\n <ng-template #dropdownLink let-route>\r\n @if (route.children?.length) {\r\n <li class=\"nav-item dropdown\" display=\"static\" *abpPermission=\"route.requiredPolicy\" (click)=\"\r\n rootDropdownExpand[route.name]\r\n ? (rootDropdownExpand[route.name] = false)\r\n : (rootDropdownExpand[route.name] = true)\">\r\n <a class=\"nav-link dropdown-toggle\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\"\r\n href=\"javascript:void(0)\">\r\n @if (route.iconClass) {\r\n <i [class]=\"route.iconClass\"></i>\r\n }\r\n {{ route.name | abpAsyncLocalization | async }}\r\n </a>\r\n <div #routeContainer class=\"dropdown-menu border-0 shadow-sm\"\r\n (click)=\"$event.preventDefault(); $event.stopPropagation()\"\r\n [class.d-block]=\"smallScreen() && rootDropdownExpand[route.name]\">\r\n <ng-container *ngTemplateOutlet=\"forTemplate; context: { $implicit: route }\" />\r\n </div>\r\n </li>\r\n }\r\n </ng-template>\r\n\r\n <ng-template #forTemplate let-route>\r\n @for (child of route.children; track $index) {\r\n <ng-template [ngTemplateOutlet]=\"child.children?.length ? dropdownChild : defaultChild\"\r\n [ngTemplateOutletContext]=\"{ $implicit: child }\" />\r\n }\r\n </ng-template>\r\n\r\n <ng-template #defaultChild let-child>\r\n @if (child.path) {\r\n <div class=\"dropdown-submenu\" *abpPermission=\"child.requiredPolicy\">\r\n <a class=\"dropdown-item\" [routerLink]=\"child.path | abpRouteCultureUrl\" (click)=\"closeDropdown()\">\r\n @if (child.iconClass) {\r\n <i [class]=\"child.iconClass\"></i>\r\n }\r\n {{ child.name | abpLocalization }}</a>\r\n </div>\r\n }\r\n </ng-template>\r\n\r\n <ng-template #dropdownChild let-child>\r\n <div class=\"dropdown-submenu\" ngbDropdown #dropdownSubmenu=\"ngbDropdown\" placement=\"right-top\" [autoClose]=\"true\"\r\n *abpPermission=\"child.requiredPolicy\">\r\n <div ngbDropdownToggle [class.dropdown-toggle]=\"false\">\r\n <a abpEllipsis=\"210px\" [abpEllipsisEnabled]=\"!smallScreen()\" role=\"button\"\r\n class=\"btn d-block text-start dropdown-toggle\">\r\n @if (child.iconClass) {\r\n <i [class]=\"child.iconClass\"></i>\r\n }\r\n {{ child.name | abpLocalization }}\r\n </a>\r\n </div>\r\n <div #childrenContainer class=\"dropdown-menu dropdown-menu-start border-0 shadow-sm\"\r\n [class.d-block]=\"smallScreen() && dropdownSubmenu.isOpen()\">\r\n <ng-container *ngTemplateOutlet=\"forTemplate; context: { $implicit: child }\" />\r\n </div>\r\n </div>\r\n </ng-template>\r\n</ul>", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: NgbDropdownModule }, { kind: "directive", type: i1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "directive", type: EllipsisDirective, selector: "[abpEllipsis]", inputs: ["abpEllipsis", "title", "abpEllipsisEnabled"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AsyncLocalizationPipe, name: "abpAsyncLocalization" }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { kind: "pipe", type: AbpRouteCultureUrlPipe, name: "abpRouteCultureUrl" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: RoutesComponent, decorators: [{
type: Component,
args: [{ selector: 'abp-routes', imports: [
NgTemplateOutlet,
AsyncPipe,
RouterLink,
NgbDropdownModule,
AsyncLocalizationPipe,
PermissionDirective,
EllipsisDirective,
LocalizationPipe,
AbpRouteCultureUrlPipe,
], template: "<ul class=\"navbar-nav\">\r\n @for (route of routesService.visible$ | async; track $index) {\r\n <ng-container [ngTemplateOutlet]=\"isDropdown(route) ? dropdownLink : defaultLink\"\r\n [ngTemplateOutletContext]=\"{ $implicit: route }\" />\r\n }\r\n\r\n <ng-template #defaultLink let-route>\r\n <li class=\"nav-item\" *abpPermission=\"route.requiredPolicy\">\r\n <a class=\"nav-link\" [routerLink]=\"route.path | abpRouteCultureUrl\">\r\n @if (route.iconClass) {\r\n <i [class]=\"route.iconClass\"></i>\r\n }\r\n {{ route.name | abpAsyncLocalization | async }}\r\n </a>\r\n </li>\r\n </ng-template>\r\n\r\n <ng-template #dropdownLink let-route>\r\n @if (route.children?.length) {\r\n <li class=\"nav-item dropdown\" display=\"static\" *abpPermission=\"route.requiredPolicy\" (click)=\"\r\n rootDropdownExpand[route.name]\r\n ? (rootDropdownExpand[route.name] = false)\r\n : (rootDropdownExpand[route.name] = true)\">\r\n <a class=\"nav-link dropdown-toggle\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\"\r\n href=\"javascript:void(0)\">\r\n @if (route.iconClass) {\r\n <i [class]=\"route.iconClass\"></i>\r\n }\r\n {{ route.name | abpAsyncLocalization | async }}\r\n </a>\r\n <div #routeContainer class=\"dropdown-menu border-0 shadow-sm\"\r\n (click)=\"$event.preventDefault(); $event.stopPropagation()\"\r\n [class.d-block]=\"smallScreen() && rootDropdownExpand[route.name]\">\r\n <ng-container *ngTemplateOutlet=\"forTemplate; context: { $implicit: route }\" />\r\n </div>\r\n </li>\r\n }\r\n </ng-template>\r\n\r\n <ng-template #forTemplate let-route>\r\n @for (child of route.children; track $index) {\r\n <ng-template [ngTemplateOutlet]=\"child.children?.length ? dropdownChild : defaultChild\"\r\n [ngTemplateOutletContext]=\"{ $implicit: child }\" />\r\n }\r\n </ng-template>\r\n\r\n <ng-template #defaultChild let-child>\r\n @if (child.path) {\r\n <div class=\"dropdown-submenu\" *abpPermission=\"child.requiredPolicy\">\r\n <a class=\"dropdown-item\" [routerLink]=\"child.path | abpRouteCultureUrl\" (click)=\"closeDropdown()\">\r\n @if (child.iconClass) {\r\n <i [class]=\"child.iconClass\"></i>\r\n }\r\n {{ child.name | abpLocalization }}</a>\r\n </div>\r\n }\r\n </ng-template>\r\n\r\n <ng-template #dropdownChild let-child>\r\n <div class=\"dropdown-submenu\" ngbDropdown #dropdownSubmenu=\"ngbDropdown\" placement=\"right-top\" [autoClose]=\"true\"\r\n *abpPermission=\"child.requiredPolicy\">\r\n <div ngbDropdownToggle [class.dropdown-toggle]=\"false\">\r\n <a abpEllipsis=\"210px\" [abpEllipsisEnabled]=\"!smallScreen()\" role=\"button\"\r\n class=\"btn d-block text-start dropdown-toggle\">\r\n @if (child.iconClass) {\r\n <i [class]=\"child.iconClass\"></i>\r\n }\r\n {{ child.name | abpLocalization }}\r\n </a>\r\n </div>\r\n <div #childrenContainer class=\"dropdown-menu dropdown-menu-start border-0 shadow-sm\"\r\n [class.d-block]=\"smallScreen() && dropdownSubmenu.isOpen()\">\r\n <ng-container *ngTemplateOutlet=\"forTemplate; context: { $implicit: child }\" />\r\n </div>\r\n </div>\r\n </ng-template>\r\n</ul>" }]
}], propDecorators: { smallScreen: [{ type: i0.Input, args: [{ isSignal: true, alias: "smallScreen", required: false }] }], childrenContainers: [{ type: i0.ViewChildren, args: ['childrenContainer', { isSignal: true }] }] } });
class NavItemsComponent {
constructor() {
this.navItems = inject(NavItemsService);
this.platformId = inject(PLATFORM_ID);
this.isBrowser = isPlatformBrowser(this.platformId);
this.trackByFn = (_, element) => element.id;
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: NavItemsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: NavItemsComponent, isStandalone: true, selector: "abp-nav-items", ngImport: i0, template: "<ul class=\"navbar-nav\">\r\n @if (isBrowser) {\r\n @for (item of navItems.items$ | async; track $index) {\r\n <ng-container *abpVisible=\"!item.visible || item.visible(item)\">\r\n <li class=\"nav-item d-flex align-items-center\" *abpPermission=\"item.requiredPolicy\">\r\n @if (item.component) {\r\n <ng-container\r\n [ngComponentOutlet]=\"item.component\"\r\n [ngComponentOutletInjector]=\"item | toInjector\"\r\n ></ng-container>\r\n } @else {\r\n <div [innerHTML]=\"item.html\" (click)=\"item.action ? item.action() : null\"></div>\r\n }\r\n </li>\r\n </ng-container>\r\n }\r\n }\r\n</ul>\r\n", dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: AbpVisibleDirective, selector: "[abpVisible]", inputs: ["abpVisible"] }, { kind: "directive", type: PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: ToInjectorPipe, name: "toInjector" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: NavItemsComponent, decorators: [{
type: Component,
args: [{ selector: 'abp-nav-items', imports: [NgComponentOutlet, AsyncPipe, AbpVisibleDirective, PermissionDirective, ToInjectorPipe], template: "<ul class=\"navbar-nav\">\r\n @if (isBrowser) {\r\n @for (item of navItems.items$ | async; track $index) {\r\n <ng-container *abpVisible=\"!item.visible || item.visible(item)\">\r\n <li class=\"nav-item d-flex align-items-center\" *abpPermission=\"item.requiredPolicy\">\r\n @if (item.component) {\r\n <ng-container\r\n [ngComponentOutlet]=\"item.component\"\r\n [ngComponentOutletInjector]=\"item | toInjector\"\r\n ></ng-container>\r\n } @else {\r\n <div [innerHTML]=\"item.html\" (click)=\"item.action ? item.action() : null\"></div>\r\n }\r\n </li>\r\n </ng-container>\r\n }\r\n }\r\n</ul>\r\n" }]
}] });
class TenantBoxComponent {
constructor() {
this.service = inject(TenantBoxService);
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TenantBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TenantBoxComponent, isStandalone: true, selector: "abp-tenant-box", providers: [TenantBoxService], ngImport: i0, template: "@if ((service.currentTenant$ | async) || { name: '' }; as currentTenant) {\r\n <div class=\"card shadow-sm rounded mb-3\">\r\n <div class=\"card-body px-5\">\r\n <div class=\"row\">\r\n <div class=\"col\">\r\n <span style=\"font-size: 0.8em\" class=\"text-uppercase text-muted\">{{\r\n 'AbpUiMultiTenancy::Tenant' | abpLocalization\r\n }}</span\r\n ><br />\r\n <h6 class=\"m-0 d-inline-block\">\r\n <i>{{ currentTenant.name || ('AbpUiMultiTenancy::NotSelected' | abpLocalization) }}</i>\r\n </h6>\r\n </div>\r\n <div class=\"col-auto\">\r\n <a\r\n id=\"AbpTenantSwitchLink\"\r\n href=\"javascript:void(0);\"\r\n class=\"btn btn-sm mt-3 btn-outline-primary\"\r\n (click)=\"service.onSwitch()\"\r\n >{{ 'AbpUiMultiTenancy::Switch' | abpLocalization }}</a\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <abp-modal [(visible)]=\"service.isModalVisible\" [busy]=\"service.modalBusy\">\r\n <ng-template #abpHeader>\r\n <h5>Switch Tenant</h5>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <form (ngSubmit)=\"service.save()\">\r\n <div class=\"mt-2\">\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"name\" class=\"form-label\">{{\r\n 'AbpUiMultiTenancy::Name' | abpLocalization\r\n }}</label>\r\n <input\r\n [(ngModel)]=\"service.name\"\r\n type=\"text\"\r\n id=\"name\"\r\n name=\"tenant\"\r\n class=\"form-control\"\r\n autofocus\r\n />\r\n </div>\r\n <p>{{ 'AbpUiMultiTenancy::SwitchTenantHint' | abpLocalization }}</p>\r\n </div>\r\n </form>\r\n </ng-template>\r\n <ng-template #abpFooter>\r\n <button abpClose type=\"button\" class=\"btn btn-outline-primary\">\r\n {{ 'AbpTenantManagement::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n type=\"abp-button\"\r\n iconClass=\"fa fa-check\"\r\n (click)=\"service.save()\"\r\n [disabled]=\"currentTenant?.name === service.name\"\r\n >\r\n <span>{{ 'AbpTenantManagement::Save' | abpLocalization }}</span>\r\n </abp-button>\r\n </ng-template>\r\n </abp-modal>\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "component", type: ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "directive", type: ModalCloseDirective, selector: "[abpClose]" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TenantBoxComponent, decorators: [{
type: Component,
args: [{ selector: 'abp-tenant-box', providers: [TenantBoxService], imports: [
AsyncPipe,
FormsModule,
ModalComponent,
LocalizationPipe,
ButtonComponent,
ModalCloseDirective,
], template: "@if ((service.currentTenant$ | async) || { name: '' }; as currentTenant) {\r\n <div class=\"card shadow-sm rounded mb-3\">\r\n <div class=\"card-body px-5\">\r\n <div class=\"row\">\r\n <div class=\"col\">\r\n <span style=\"font-size: 0.8em\" class=\"text-uppercase text-muted\">{{\r\n 'AbpUiMultiTenancy::Tenant' | abpLocalization\r\n }}</span\r\n ><br />\r\n <h6 class=\"m-0 d-inline-block\">\r\n <i>{{ currentTenant.name || ('AbpUiMultiTenancy::NotSelected' | abpLocalization) }}</i>\r\n </h6>\r\n </div>\r\n <div class=\"col-auto\">\r\n <a\r\n id=\"AbpTenantSwitchLink\"\r\n href=\"javascript:void(0);\"\r\n class=\"btn btn-sm mt-3 btn-outline-primary\"\r\n (click)=\"service.onSwitch()\"\r\n >{{ 'AbpUiMultiTenancy::Switch' | abpLocalization }}</a\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <abp-modal [(visible)]=\"service.isModalVisible\" [busy]=\"service.modalBusy\">\r\n <ng-template #abpHeader>\r\n <h5>Switch Tenant</h5>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <form (ngSubmit)=\"service.save()\">\r\n <div class=\"mt-2\">\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"name\" class=\"form-label\">{{\r\n 'AbpUiMultiTenancy::Name' | abpLocalization\r\n }}</label>\r\n <input\r\n [(ngModel)]=\"service.name\"\r\n type=\"text\"\r\n id=\"name\"\r\n name=\"tenant\"\r\n class=\"form-control\"\r\n autofocus\r\n />\r\n </div>\r\n <p>{{ 'AbpUiMultiTenancy::SwitchTenantHint' | abpLocalization }}</p>\r\n </div>\r\n </form>\r\n </ng-template>\r\n <ng-template #abpFooter>\r\n <button abpClose type=\"button\" class=\"btn btn-outline-primary\">\r\n {{ 'AbpTenantManagement::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n type=\"abp-button\"\r\n iconClass=\"fa fa-check\"\r\n (click)=\"service.save()\"\r\n [disabled]=\"currentTenant?.name === service.name\"\r\n >\r\n <span>{{ 'AbpTenantManagement::Save' | abpLocalization }}</span>\r\n </abp-button>\r\n </ng-template>\r\n </abp-modal>\r\n}\r\n" }]
}] });
class AuthWrapperComponent {
constructor() {
this.service = inject(AuthWrapperService);
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: AuthWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: AuthWrapperComponent, isStandalone: true, selector: "abp-auth-wrapper", providers: [AuthWrapperService], ngImport: i0, template: "<div class=\"row\">\r\n <div class=\"mx-auto col col-md-5\">\r\n @if ((service.isMultiTenancyEnabled$ | async) && service.isTenantBoxVisible) {\r\n <abp-tenant-box\r\n *abpReplaceableTemplate=\"{ componentKey: service.tenantBoxKey }\"\r\n ></abp-tenant-box>\r\n }\r\n\r\n <div class=\"abp-account-container\">\r\n @if (service.enableLocalLogin$ | async) {\r\n <div class=\"card mt-3 shadow-sm rounded\">\r\n <div class=\"card-body p-5\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n } @else {\r\n <div class=\"alert alert-warning\">\r\n <strong>{{ 'AbpAccount::InvalidLoginRequest' | abpLocalization }}</strong>\r\n {{ 'AbpAccount::ThereAreNoLoginSchemesConfiguredForThisClient' | abpLocalization }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "component", type: TenantBoxComponent, selector: "abp-tenant-box" }, { kind: "directive", type: ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: AuthWrapperComponent, decorators: [{
type: Component,
args: [{ selector: 'abp-auth-wrapper', providers: [AuthWrapperService], imports: [AsyncPipe, TenantBoxComponent, ReplaceableTemplateDirective, LocalizationPipe], template: "<div class=\"row\">\r\n <div class=\"mx-auto col col-md-5\">\r\n @if ((service.isMultiTenancyEnabled$ | async) && service.isTenantBoxVisible) {\r\n <abp-tenant-box\r\n *abpReplaceableTemplate=\"{ componentKey: service.tenantBoxKey }\"\r\n ></abp-tenant-box>\r\n }\r\n\r\n <div class=\"abp-account-container\">\r\n @if (service.enableLocalLogin$ | async) {\r\n <div class=\"card mt-3 shadow-sm rounded\">\r\n <div class=\"card-body p-5\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n } @else {\r\n <div class=\"alert alert-warning\">\r\n <strong>{{ 'AbpAccount::InvalidLoginRequest' | abpLocalization }}</strong>\r\n {{ 'AbpAccount::ThereAreNoLoginSchemesConfiguredForThisClient' | abpLocalization }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n" }]
}] });
class PageAlertContainerComponent {
constructor() {
this.service = inject(PageAlertService);
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PageAlertContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: PageAlertContainerComponent, isStandalone: true, selector: "abp-page-alert-container", ngImport: i0, template: "@for (alert of service.alerts$ | async; track i; let i = $index) {\r\n<div class=\"alert alert-{{ alert.type }} fade show\" [class.alert-dismissible]=\"alert.dismissible\" role=\"alert\">\r\n @if (alert.title) {\r\n <h4 class=\"alert-heading\" [innerHTML]=\"alert.title | abpSafeHtml | abpLocalization: alert.titleLocalizationParams\">\r\n </h4>\r\n }\r\n <span [innerHTML]=\"alert.message | abpSafeHtml | abpLocalization: alert.messageLocalizationParams\"></span>\r\n @if (alert.dismissible) {\r\n <button type=\"button\" class=\"btn-close\" data-dismiss=\"alert\" aria-label=\"Close\" (click)=\"service.remove(i)\"></button>\r\n }\r\n</div>\r\n}", dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { kind: "pipe", type: SafeHtmlPipe, name: "abpSafeHtml" }], encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PageAlertContainerComponent, decorators: [{
type: Component,
args: [{ selector: 'abp-page-alert-container', encapsulation: ViewEncapsulation.None, imports: [AsyncPipe, LocalizationPipe, SafeHtmlPipe], template: "@for (alert of service.alerts$ | async; track i; let i = $index) {\r\n<div class=\"alert alert-{{ alert.type }} fade show\" [class.alert-dismissible]=\"alert.dismissible\" role=\"alert\">\r\n @if (alert.title) {\r\n <h4 class=\"alert-heading\" [innerHTML]=\"alert.title | abpSafeHtml | abpLocalization: alert.titleLocalizationParams\">\r\n </h4>\r\n }\r\n <span [innerHTML]=\"alert.message | abpSafeHtml | abpLocalization: alert.messageLocalizationParams\"></span>\r\n @if (alert.dismissible) {\r\n <button type=\"button\" class=\"btn-close\" data-dismiss=\"alert\" aria-label=\"Close\" (click)=\"service.remove(i)\"></button>\r\n }\r\n</div>\r\n}" }]
}] });
class AccountLayoutComponent {
constructor() {
this.service = inject(LayoutService);
this.authWrapperKey = 'Account.AuthWrapperComponent';
}
// required for dynamic component
static { this.type = "account" /* eLayoutType.account */; }
ngAfterViewInit() {
this.service.subscribeWindowSize();
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: AccountLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: AccountLayoutComponent, isStandalone: true, selector: "abp-layout-account", providers: [LayoutService, SubscriptionService], ngImport: i0, template: "<nav\r\n class=\"navbar navbar-expand-lg navbar-dark bg-dark shadow-sm flex-column flex-md-row mb-4\"\r\n id=\"main-navbar\"\r\n style=\"min-height: 4rem\"\r\n>\r\n <div class=\"container\">\r\n <abp-logo *abpReplaceableTemplate=\"{ componentKey: service.logoComponentKey }\"></abp-logo>\r\n <button\r\n class=\"navbar-toggler\"\r\n type=\"button\"\r\n [attr.aria-expanded]=\"!service.isCollapsed\"\r\n (click)=\"service.isCollapsed = !service.isCollapsed\"\r\n >\r\n <span class=\"navbar-toggler-icon\"></span>\r\n </button>\r\n <div\r\n class=\"navbar-collapse\"\r\n [class.overflow-hidden]=\"service.smallScreen\"\r\n id=\"main-navbar-collapse\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"!service.smallScreen ? navigations : null\"></ng-container>\r\n\r\n @if (service.smallScreen) {\r\n <div\r\n [@collapseWithMargin]=\"service.isCollapsed ? 'collapsed' : 'expanded'\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"navigations\"></ng-container>\r\n </div>\r\n }\r\n\r\n <ng-template #navigations>\r\n <abp-routes\r\n *abpReplaceableTemplate=\"{\r\n componentKey: service.routesComponentKey,\r\n inputs: {\r\n smallScreen: { value: service.smallScreen }\r\n }\r\n }\"\r\n class=\"mx-auto\"\r\n [smallScreen]=\"service.smallScreen\"\r\n ></abp-routes>\r\n\r\n <abp-nav-items\r\n *abpReplaceableTemplate=\"{\r\n componentKey: service.navItemsComponentKey\r\n }\"\r\n ></abp-nav-items>\r\n </ng-template>\r\n </div>\r\n </div>\r\n</nav>\r\n\r\n<!-- [@slideFromBottom]=\"outlet.isActivated && outlet.activatedRoute?.routeConfig?.path\" TODO: throws ExpressionChangedAfterItHasBeenCheck when animation is active. It should be fixed -->\r\n<div class=\"container\">\r\n <abp-page-alert-container></abp-page-alert-container>\r\n <abp-auth-wrapper\r\n *abpReplaceableTemplate=\"{\r\n componentKey: authWrapperKey\r\n }\"\r\n >\r\n <router-outlet #outlet=\"outlet\"></router-outlet>\r\n </abp-auth-wrapper>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LogoComponent, selector: "abp-logo" }, { kind: "component", type: RoutesComponent, selector: "abp-routes", inputs: ["smallScreen"] }, { kind: "component", type: NavItemsComponent, selector: "abp-nav-items" }, { kind: "component", type: AuthWrapperComponent, selector: "abp-auth-wrapper" }, { kind: "component", type: PageAlertContainerComponent, selector: "abp-page-alert-container" }, { kind: "directive", type: ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], animations: [collapseWithMargin] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: AccountLayoutComponent, decorators: [{
type: Component,
args: [{ selector: 'abp-layout-account', animations: [collapseWithMargin], providers: [LayoutService, SubscriptionService], imports: [
NgTemplateOutlet,
LogoComponent,
RoutesComponent,
NavItemsComponent,
AuthWrapperComponent,
PageAlertContainerComponent,
ReplaceableTemplateDirective,
RouterOutlet,
], template: "<nav\r\n class=\"navbar navbar-expand-lg navbar-dark bg-dark shadow-sm flex-column flex-md-row mb-4\"\r\n id=\"main-navbar\"\r\n style=\"min-height: 4rem\"\r\n>\r\n <div class=\"container\">\r\n <abp-logo *abpReplaceableTemplate=\"{ componentKey: service.logoComponentKey }\"></abp-logo>\r\n <button\r\n class=\"navbar-toggler\"\r\n type=\"button\"\r\n [attr.aria-expanded]=\"!service.isCollapsed\"\r\n (click)=\"service.isCollapsed = !service.isCollapsed\"\r\n >\r\n <span class=\"navbar-toggler-icon\"></span>\r\n </button>\r\n <div\r\n class=\"navbar-collapse\"\r\n [class.overflow-hidden]=\"service.smallScreen\"\r\n id=\"main-navbar-collapse\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"!service.smallScreen ? navigations : null\"></ng-container>\r\n\r\n @if (service.smallScreen) {\r\n <div\r\n [@collapseWithMargin]=\"service.isCollapsed ? 'collapsed' : 'expanded'\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"navigations\"></ng-container>\r\n </div>\r\n }\r\n\r\n <ng-template #navigations>\r\n <abp-routes\r\n *abpReplaceableTemplate=\"{\r\n componentKey: service.routesComponentKey,\r\n inputs: {\r\n smallScreen: { value: service.smallScreen }\r\n }\r\n }\"\r\n class=\"mx-auto\"\r\n [smallScreen]=\"service.smallScreen\"\r\n ></abp-routes>\r\n\r\n <abp-nav-items\r\n *abpReplaceableTemplate=\"{\r\n componentKey: service.navItemsComponentKey\r\n }\"\r\n ></abp-nav-items>\r\n </ng-template>\r\n </div>\r\n </div>\r\n</nav>\r\n\r\n<!-- [@slideFromBottom]=\"outlet.isActivated && outlet.activatedRoute?.routeConfig?.path\" TODO: throws ExpressionChangedAfterItHasBeenCheck when animation is active. It should be fixed -->\r\n<div class=\"container\">\r\n <abp-page-alert-container></abp-page-alert-container>\r\n <abp-auth-wrapper\r\n *abpReplaceableTemplate=\"{\r\n componentKey: authWrapperKey\r\n }\"\r\n >\r\n <router-outlet #outlet=\"outlet\"></router-outlet>\r\n </abp-auth-wrapper>\r\n</div>\r\n" }]
}] });
class ApplicationLayoutComponent {
constructor() {
this.service = inject(LayoutService);
}
// required for dynamic component
static { this.type = "application" /* eLayoutType.application */; }
ngAfterViewInit() {
this.service.subscribeWindowSize();
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ApplicationLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ApplicationLayoutComponent, isStandalone: true, selector: "abp-layout-application", providers: [LayoutService, SubscriptionService], ngImport: i0, template: "<nav\r\n class=\"navbar navbar-expand-lg navbar-dark bg-dark shadow-sm flex-column flex-md-row mb-4\"\r\n id=\"main-navbar\"\r\n style=\"min-height: 4rem\"\r\n>\r\n <div class=\"container\">\r\n <abp-logo *abpReplaceableTemplate=\"{ componentKey: service.logoComponentKey }\"></abp-logo>\r\n <button\r\n class=\"navbar-toggler\"\r\n type=\"button\"\r\n [attr.aria-expanded]=\"!service.isCollapsed\"\r\n (click)=\"service.isCollapsed = !service.isCollapsed\"\r\n >\r\n <span class=\"navbar-toggler-icon\"></span>\r\n </button>\r\n <div\r\n class=\"navbar-collapse\"\r\n [class.overflow-hidden]=\"service.smallScreen\"\r\n id=\"main-navbar-collapse\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"!service.smallScreen ? navigations : null\"></ng-container>\r\n\r\n @if (service.smallScreen) {\r\n <div [@collapseWithMargin]=\"service.isCollapsed ? 'collapsed' : 'expanded'\">\r\n <ng-container *ngTemplateOutlet=\"navigations\"></ng-container>\r\n </div>\r\n }\r\n\r\n <ng-template #navigations>\r\n <abp-routes\r\n *abpReplaceableTemplate=\"{\r\n componentKey: service.routesComponentKey,\r\n inputs: {\r\n smallScreen: { value: service.smallScreen }\r\n }\r\n }\"\r\n class=\"mx-auto\"\r\n [smallScreen]=\"service.smallScreen\"\r\n ></abp-routes>\r\n\r\n <abp-nav-items\r\n *abpReplaceableTemplate=\"{\r\n componentKey: service.navItemsComponentKey\r\n }\"\r\n ></abp-nav-items>\r\n </ng-template>\r\n </div>\r\n </div>\r\n</nav>\r\n\r\n<!-- [@slideFromBottom]=\"outlet.isActivated && outlet.activatedRoute?.routeConfig?.path\" TODO: throws ExpressionChangedAfterItHasBeenCheck when animation is active. It should be fixed -->\r\n<div class=\"container\">\r\n <abp-page-alert-container></abp-page-alert-container>\r\n\r\n <router-outlet #outlet=\"outlet\"></router-outlet>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LogoComponent, selector: "abp-logo" }, { kind: "component", type: PageAlertContainerComponent, selector: "abp-page-alert-container" }, { kind: "component", type: RoutesComponent, selector: "abp-routes", inputs: ["smallScreen"] }, { kind: "component", type: NavItemsComponent, selector: "abp-nav-items" }, { kind: "directive", type: ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], animations: [slideFromBottom, collapseWithMargin] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ApplicationLayoutComponent, decorators: [{
type: Component,
args: [{ selector: 'abp-layout-application', animations: [slideFromBottom, collapseWithMargin], providers: [LayoutService, SubscriptionService], imports: [
NgTemplateOutlet,
LogoComponent,
PageAlertContainerComponent,
RoutesComponent,
NavItemsComponent,
ReplaceableTemplateDirective,
RouterOutlet,
], template: "<nav\r\n class=\"navbar navbar-expand-lg navbar-dark bg-dark shadow-sm flex-column flex-md-row mb-4\"\r\n id=\"main-navbar\"\r\n style=\"min-height: 4rem\"\r\n>\r\n <div class=\"container\">\r\n <abp-logo *abpReplaceableTemplate=\"{ componentKey: service.logoComponentKey }\"></abp-logo>\r\n <button\r\n class=\"navbar-toggler\"\r\n type=\"button\"\r\n [attr.aria-expanded]=\"!service.isCollapsed\"\r\n (click)=\"service.isCollapsed = !service.isCollapsed\"\r\n >\r\n <span class=\"navbar-toggler-icon\"></span>\r\n </button>\r\n <div\r\n class=\"navbar-collapse\"\r\n [class.overflow-hidden]=\"service.smallScreen\"\r\n id=\"main-navbar-collapse\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"!service.smallScreen ? navigations : null\"></ng-container>\r\n\r\n @if (service.smallScreen) {\r\n <div [@collapseWithMargin]=\"service.isCollapsed ? 'collapsed' : 'expanded'\">\r\n <ng-container *ngTemplateOutlet=\"navigations\"></ng-container>\r\n </div>\r\n }\r\n\r\n <ng-template #navigations>\r\n <abp-routes\r\n *abpReplaceableTemplate=\"{\r\n componentKey: service.routesComponentKey,\r\n inputs: {\r\n smallScreen: { value: service.smallScreen }\r\n }\r\n }\"\r\n class=\"mx-auto\"\r\n [smallScreen]=\"service.smallScreen\"\r\n ></abp-routes>\r\n\r\n <abp-nav-items\r\n *abpReplaceableTemplate=\"{\r\n componentKey: service.navItemsComponentKey\r\n }\"\r\n ></abp-nav-items>\r\n </ng-template>\r\n </div>\r\n </div>\r\n</nav>\r\n\r\n<!-- [@slideFromBottom]=\"outlet.isActivated && outlet.activatedRoute?.routeConfig?.path\" TODO: throws ExpressionChangedAfterItHasBeenCheck when animation is active. It should be fixed -->\r\n<div class=\"container\">\r\n <abp-page-alert-container></abp-page-alert-container>\r\n\r\n <router-outlet #outlet=\"outlet\"></router-outlet>\r\n</div>\r\n" }]
}] });
class EmptyLayoutComponent {
static { this.type = "empty" /* eLayoutType.empty */; }
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: EmptyLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.17", type: EmptyLayoutComponent, isStandalone: true, selector: "abp-layout-empty", ngImport: i0, template: ` <router-outlet></router-outlet> `, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: EmptyLayoutComponent, decorators: [{
type: Component,
args: [{
selector: 'abp-layout-empty',
template: ` <router-outlet></router-outlet> `,
imports: [RouterOutlet],
}]
}] });
class CurrentUserComponent {
constructor() {
this.navigateToManageProfile = inject(NAVIGATE_TO_MANAGE_PROFILE);
this.userMenu = inject(UserMenuService);
this.authService = inject(AuthService);
this.configState = inject(ConfigStateService);
this.sessionState = inject(SessionStateService);
this.document = inject(DOCUMENT);
this.currentUser$ = this.configState.getOne$('currentUser');
this.selectedTenant$ = this.sessionState.getTenant$();
this.trackByFn = (_, element) => element.id;
}
get smallScreen() {
return this.document.defaultView?.innerWidth < 992;
}
navigateToLogin() {
this.authService.navigateToLogin();
}
logout() {
this.authService.logout().subscribe();
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: CurrentUserComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: CurrentUserComponent, isStandalone: true, selector: "abp-current-user", ngImport: i0, template: "@if ((currentUser$ | async)?.isAuthenticated) {\r\n <div\r\n ngbDropdown\r\n class=\"dropdown\"\r\n #currentUserDropdown=\"ngbDropdown\"\r\n display=\"static\"\r\n >\r\n <a\r\n ngbDropdownToggle\r\n class=\"nav-link\"\r\n href=\"javascript:void(0)\"\r\n role=\"button\"\r\n id=\"dropdownMenuLink\"\r\n data-toggle=\"dropdown\"\r\n aria-haspopup=\"true\"\r\n aria-expanded=\"false\"\r\n >\r\n @if ((selectedTenant$ | async)?.name; as tenantName) {\r\n <small\r\n ><i>{{ tenantName }}</i\r\n >\\</small\r\n >\r\n }\r\n <strong>{{ (currentUser$ | async)?.userName }}</strong>\r\n </a>\r\n <div\r\n class=\"dropdown-menu dropdown-menu-end border-0 shadow-sm\"\r\n aria-labelledby=\"dropdownMenuLink\"\r\n [class.d-block]=\"smallScreen && currentUserDropdown.isOpen()\"\r\n >\r\n @for (item of userMenu.items$ | async; track $index) {\r\n <ng-container *abpVisible=\"!item.visible || item.visible(item)\">\r\n <li class=\"nav-item d-flex align-items-center\" *abpPermission=\"item.requiredPolicy\">\r\n @if (item.component) {\r\n <ng-container\r\n [ngComponentOutlet]=\"item.component\"\r\n [ngComponentOutletInjector]=\"item | toInjector\"\r\n ></ng-container>\r\n } @else {\r\n @if (item.html) {\r\n <div [innerHTML]=\"item.html\" (click)=\"item.action ? item.action() : null\"></div>\r\n } @else {\r\n @if (item.textTemplate) {\r\n <a (click)=\"item.action ? item.action() : null\" class=\"dropdown-item pointer\">\r\n @if (item.textTemplate.icon) {\r\n <i class=\"me-1 {{ item.textTemplate.icon }}\"></i>\r\n }\r\n {{ item.textTemplate.text | abpLocalization }}</a\r\n >\r\n }\r\n }\r\n }\r\n </li>\r\n </ng-container>\r\n }\r\n </div>\r\n </div>\r\n} @else {\r\n <a role=\"button\" class=\"nav-link pointer\" (click)=\"navigateToLogin()\">\r\n {{ 'AbpAccount::Login' | abpLocalization }}\r\n </a>\r\n