@volosoft/abp.ng.theme.lepton-x
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.
101 lines (94 loc) • 19 kB
JavaScript
import * as i0 from '@angular/core';
import { inject, Component, NgModule } from '@angular/core';
import * as i1$2 from '@volosoft/ngx-lepton-x/layouts';
import { LpxAuthLayoutModule } from '@volosoft/ngx-lepton-x/layouts';
import * as i3 from '@abp/ng.core';
import { CoreModule } from '@abp/ng.core';
import * as i4 from '@abp/ng.theme.shared';
import { ThemeSharedModule } from '@abp/ng.theme.shared';
import { LpxContextMenuModule } from '@volosoft/ngx-lepton-x';
import * as i2$1 from '@volo/abp.ng.lepton-x.core';
import { PageAlertContainerModule } from '@volo/abp.ng.lepton-x.core';
import * as i3$1 from '@angular/router';
import * as i1 from '@angular/common';
import { AsyncPipe } from '@angular/common';
import * as i1$1 from '@ng-bootstrap/ng-bootstrap';
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
import { TenantBoxService, AuthWrapperService } from '@volo/abp.ng.account.core';
import * as i2 from '@angular/forms';
class TenantBoxComponent {
constructor() {
this.service = inject(TenantBoxService);
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: TenantBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: TenantBoxComponent, isStandalone: true, selector: "abp-tenant-box", providers: [TenantBoxService], ngImport: i0, template: "@if ((service.currentTenant$ | async) || {}; as currentTenant) {\r\n <hr />\r\n <div>\r\n <div class=\"tenant-switch-box\">\r\n <div class=\"row\">\r\n <div class=\"col pr-1 pb-2\">\r\n <h6 class=\"m0\">\r\n {{ 'AbpUiMultiTenancy::Tenant' | abpLocalization }}\r\n </h6>\r\n <i>{{\r\n currentTenant.name ||\r\n ('AbpUiMultiTenancy::NotSelected' | abpLocalization)\r\n }}</i>\r\n </div>\r\n\r\n <div class=\"col-auto pl-1\">\r\n <a\r\n id=\"abp-tenant-switch-link\"\r\n class=\"btn btn-sm btn-outline-primary float-end pointer\"\r\n (click)=\"service.onSwitch()\"\r\n href=\"javascript:void(0)\"\r\n >{{ 'AbpUiMultiTenancy::Switch' | abpLocalization }}</a\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <hr />\r\n\r\n <abp-modal\r\n [(visible)]=\"service.isModalVisible\"\r\n [busy]=\"service.modalBusy\"\r\n size=\"md\"\r\n >\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=\"form-group\">\r\n <label for=\"name\">{{\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 {{ 'AbpAccount::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 {{ 'AbpAccount::Save' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n </abp-modal>\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }, { kind: "directive", type: i3.AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { kind: "ngmodule", type: ThemeSharedModule }, { kind: "component", type: i4.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i4.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i4.ModalCloseDirective, selector: "[abpClose]" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: TenantBoxComponent, decorators: [{
type: Component,
args: [{ selector: 'abp-tenant-box', imports: [CoreModule, ThemeSharedModule, AsyncPipe], providers: [TenantBoxService], template: "@if ((service.currentTenant$ | async) || {}; as currentTenant) {\r\n <hr />\r\n <div>\r\n <div class=\"tenant-switch-box\">\r\n <div class=\"row\">\r\n <div class=\"col pr-1 pb-2\">\r\n <h6 class=\"m0\">\r\n {{ 'AbpUiMultiTenancy::Tenant' | abpLocalization }}\r\n </h6>\r\n <i>{{\r\n currentTenant.name ||\r\n ('AbpUiMultiTenancy::NotSelected' | abpLocalization)\r\n }}</i>\r\n </div>\r\n\r\n <div class=\"col-auto pl-1\">\r\n <a\r\n id=\"abp-tenant-switch-link\"\r\n class=\"btn btn-sm btn-outline-primary float-end pointer\"\r\n (click)=\"service.onSwitch()\"\r\n href=\"javascript:void(0)\"\r\n >{{ 'AbpUiMultiTenancy::Switch' | abpLocalization }}</a\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <hr />\r\n\r\n <abp-modal\r\n [(visible)]=\"service.isModalVisible\"\r\n [busy]=\"service.modalBusy\"\r\n size=\"md\"\r\n >\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=\"form-group\">\r\n <label for=\"name\">{{\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 {{ 'AbpAccount::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 {{ 'AbpAccount::Save' | abpLocalization }}\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: "19.1.8", ngImport: i0, type: AuthWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: AuthWrapperComponent, isStandalone: true, selector: "abp-auth-wrapper", providers: [AuthWrapperService], ngImport: i0, template: "<div class=\"card mx-auto\" style=\"max-width: 30rem\">\r\n <div class=\"card-body p-3 p-sm-4\">\r\n <div class=\"align-items-start d-flex justify-content-between mb-2\">\r\n <h2 class=\"lpx-main-title lpx-login-title m-0 me-auto\">\r\n {{ service.pageLabel | abpLocalization }}\r\n </h2>\r\n\r\n <div ngbDropdown class=\"dropdown btn-group ms-auto\">\r\n @if (service.defaultLanguage$ | async; as defaultLang) {\r\n <button\r\n ngbDropdownToggle\r\n type=\"button\"\r\n id=\"dropdownMenuLink\"\r\n class=\"btn btn-sm btn-light dropdown-toggle\"\r\n aria-expanded=\"false\"\r\n data-bs-toggle=\"dropdown\"\r\n >\r\n <i class=\"bi bi-translate me-1\"></i>\r\n <span class=\"ml-2\">{{ defaultLang.displayName }}</span>\r\n </button>\r\n }\r\n\r\n <ul ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\r\n <li>\r\n @for (lang of service.dropdownLanguages$ | async; track $index) {\r\n <a\r\n class=\"dropdown-item pointer\"\r\n (click)=\"service.onChangeLang(lang.cultureName)\"\r\n >\r\n {{ lang?.displayName }}\r\n </a>\r\n }\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n @if (\r\n (service.isMultiTenancyEnabled$ | async) && service.isTenantBoxVisible\r\n ) {\r\n <abp-tenant-box\r\n *abpReplaceableTemplate=\"{ componentKey: service.tenantBoxKey }\"\r\n ></abp-tenant-box>\r\n }\r\n\r\n @if (service.enableLocalLogin$ | async) {\r\n <div>\r\n <ng-content></ng-content>\r\n </div>\r\n } @else {\r\n <div class=\"alert alert-warning\">\r\n <strong>{{\r\n 'AbpAccount::InvalidLoginRequest' | abpLocalization\r\n }}</strong>\r\n {{\r\n 'AbpAccount::ThereAreNoLoginSchemesConfiguredForThisClient'\r\n | abpLocalization\r\n }}\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n\r\n<div class=\"copyright text-center my-3\">\r\n <span class=\"copyright-text\"\r\n >2023 \u00A9\r\n <a\r\n href=\"https://leptontheme.com/\"\r\n class=\"text-dark text-decoration-none\"\r\n target=\"_blank\"\r\n >LeptonX Theme</a\r\n >\r\n by\r\n <a\r\n href=\"https://abp.io/\"\r\n class=\"text-brand text-decoration-none\"\r\n target=\"_blank\"\r\n >ABP Platform</a\r\n >\r\n </span>\r\n</div>\r\n", dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: NgbDropdownModule }, { kind: "directive", type: i1$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i1$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i1$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "ngmodule", type: CoreModule }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }, { kind: "directive", type: i3.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "component", type: TenantBoxComponent, selector: "abp-tenant-box" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AuthWrapperComponent, decorators: [{
type: Component,
args: [{ selector: 'abp-auth-wrapper', imports: [AsyncPipe, NgbDropdownModule, CoreModule, TenantBoxComponent], providers: [AuthWrapperService], template: "<div class=\"card mx-auto\" style=\"max-width: 30rem\">\r\n <div class=\"card-body p-3 p-sm-4\">\r\n <div class=\"align-items-start d-flex justify-content-between mb-2\">\r\n <h2 class=\"lpx-main-title lpx-login-title m-0 me-auto\">\r\n {{ service.pageLabel | abpLocalization }}\r\n </h2>\r\n\r\n <div ngbDropdown class=\"dropdown btn-group ms-auto\">\r\n @if (service.defaultLanguage$ | async; as defaultLang) {\r\n <button\r\n ngbDropdownToggle\r\n type=\"button\"\r\n id=\"dropdownMenuLink\"\r\n class=\"btn btn-sm btn-light dropdown-toggle\"\r\n aria-expanded=\"false\"\r\n data-bs-toggle=\"dropdown\"\r\n >\r\n <i class=\"bi bi-translate me-1\"></i>\r\n <span class=\"ml-2\">{{ defaultLang.displayName }}</span>\r\n </button>\r\n }\r\n\r\n <ul ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\r\n <li>\r\n @for (lang of service.dropdownLanguages$ | async; track $index) {\r\n <a\r\n class=\"dropdown-item pointer\"\r\n (click)=\"service.onChangeLang(lang.cultureName)\"\r\n >\r\n {{ lang?.displayName }}\r\n </a>\r\n }\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n @if (\r\n (service.isMultiTenancyEnabled$ | async) && service.isTenantBoxVisible\r\n ) {\r\n <abp-tenant-box\r\n *abpReplaceableTemplate=\"{ componentKey: service.tenantBoxKey }\"\r\n ></abp-tenant-box>\r\n }\r\n\r\n @if (service.enableLocalLogin$ | async) {\r\n <div>\r\n <ng-content></ng-content>\r\n </div>\r\n } @else {\r\n <div class=\"alert alert-warning\">\r\n <strong>{{\r\n 'AbpAccount::InvalidLoginRequest' | abpLocalization\r\n }}</strong>\r\n {{\r\n 'AbpAccount::ThereAreNoLoginSchemesConfiguredForThisClient'\r\n | abpLocalization\r\n }}\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n\r\n<div class=\"copyright text-center my-3\">\r\n <span class=\"copyright-text\"\r\n >2023 \u00A9\r\n <a\r\n href=\"https://leptontheme.com/\"\r\n class=\"text-dark text-decoration-none\"\r\n target=\"_blank\"\r\n >LeptonX Theme</a\r\n >\r\n by\r\n <a\r\n href=\"https://abp.io/\"\r\n class=\"text-brand text-decoration-none\"\r\n target=\"_blank\"\r\n >ABP Platform</a\r\n >\r\n </span>\r\n</div>\r\n" }]
}] });
class AccountLayoutComponent {
constructor() {
this.authWrapperKey = 'Account.AuthWrapper';
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AccountLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: AccountLayoutComponent, isStandalone: false, selector: "abp-account-layout", ngImport: i0, template: "<lpx-auth-layout>\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></router-outlet>\r\n </abp-auth-wrapper>\r\n</lpx-auth-layout>\r\n", dependencies: [{ kind: "component", type: i1$2.AuthLayoutComponent, selector: "lpx-auth-layout" }, { kind: "component", type: i2$1.PageAlertContainerComponent, selector: "abp-page-alert-container" }, { kind: "directive", type: i3$1.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: i3.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "component", type: AuthWrapperComponent, selector: "abp-auth-wrapper" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AccountLayoutComponent, decorators: [{
type: Component,
args: [{ standalone: false, selector: 'abp-account-layout', template: "<lpx-auth-layout>\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></router-outlet>\r\n </abp-auth-wrapper>\r\n</lpx-auth-layout>\r\n" }]
}] });
class AccountLayoutModule {
/**
* @deprecated The method should not be used
*/
static forRoot(options) {
return {
ngModule: AccountLayoutModule,
providers: [],
};
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AccountLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.8", ngImport: i0, type: AccountLayoutModule, declarations: [AccountLayoutComponent], imports: [LpxAuthLayoutModule,
LpxContextMenuModule,
PageAlertContainerModule,
CoreModule,
ThemeSharedModule,
AuthWrapperComponent] }); }
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AccountLayoutModule, imports: [LpxAuthLayoutModule,
LpxContextMenuModule,
PageAlertContainerModule,
CoreModule,
ThemeSharedModule,
AuthWrapperComponent] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AccountLayoutModule, decorators: [{
type: NgModule,
args: [{
imports: [
LpxAuthLayoutModule,
LpxContextMenuModule,
PageAlertContainerModule,
CoreModule,
ThemeSharedModule,
AuthWrapperComponent,
],
declarations: [AccountLayoutComponent],
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { AccountLayoutComponent, AccountLayoutModule, AuthWrapperComponent, TenantBoxComponent };
//# sourceMappingURL=volosoft-abp.ng.theme.lepton-x-account.mjs.map