@abp/ng.theme.shared 9.2.1 → 9.3.0-rc.2

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.
Files changed (27) hide show
  1. package/fesm2022/abp-ng.theme.shared.mjs +1818 -1831
  2. package/fesm2022/abp-ng.theme.shared.mjs.map +1 -1
  3. package/lib/components/breadcrumb/breadcrumb.component.d.ts +1 -1
  4. package/lib/components/breadcrumb-items/breadcrumb-items.component.d.ts +1 -1
  5. package/lib/components/button/button.component.d.ts +2 -2
  6. package/lib/components/card/card-body.component.d.ts +1 -1
  7. package/lib/components/card/card-footer.component.d.ts +1 -1
  8. package/lib/components/card/card-header.component.d.ts +1 -1
  9. package/lib/components/card/card-header.directive.d.ts +1 -1
  10. package/lib/components/card/card-img-top.directive.d.ts +1 -1
  11. package/lib/components/card/card-subtitle.directive.d.ts +1 -1
  12. package/lib/components/card/card-title.directive.d.ts +1 -1
  13. package/lib/components/card/card.component.d.ts +1 -1
  14. package/lib/components/card/card.module.d.ts +8 -2
  15. package/lib/components/checkbox/checkbox.component.d.ts +2 -2
  16. package/lib/components/confirmation/confirmation.component.d.ts +1 -1
  17. package/lib/components/form-input/form-input.component.d.ts +2 -2
  18. package/lib/components/http-error-wrapper/http-error-wrapper.component.d.ts +1 -1
  19. package/lib/components/loader-bar/loader-bar.component.d.ts +2 -2
  20. package/lib/components/loading/loading.component.d.ts +1 -1
  21. package/lib/components/modal/modal-close.directive.d.ts +1 -1
  22. package/lib/components/modal/modal.component.d.ts +2 -2
  23. package/lib/components/toast/toast.component.d.ts +1 -1
  24. package/lib/components/toast-container/toast-container.component.d.ts +1 -1
  25. package/lib/directives/loading.directive.d.ts +2 -2
  26. package/lib/theme-shared.module.d.ts +13 -13
  27. package/package.json +2 -2
@@ -1,22 +1,23 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Input, Component, ChangeDetectionStrategy, EventEmitter, ViewChild, Output, InjectionToken, Inject, inject, DestroyRef, createComponent, ViewEncapsulation, model, input, viewChild, contentChild, output, effect, HostListener, Optional, Directive, forwardRef, HostBinding, NgModule, ChangeDetectorRef, ViewContainerRef, Renderer2, Host, RendererFactory2, Injector, EnvironmentInjector, ApplicationRef, provideAppInitializer, LOCALE_ID, makeEnvironmentProviders } from '@angular/core';
2
+ import { Injectable, Input, Component, ChangeDetectionStrategy, EventEmitter, ViewChild, Output, InjectionToken, Inject, inject, DestroyRef, createComponent, ViewEncapsulation, HostListener, RendererFactory2, Injector, EnvironmentInjector, ApplicationRef, model, input, viewChild, contentChild, output, effect, Optional, Directive, forwardRef, HostBinding, NgModule, ChangeDetectorRef, ViewContainerRef, Renderer2, Host, provideAppInitializer, LOCALE_ID, makeEnvironmentProviders } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
- import { formatDate, DOCUMENT, CommonModule, DatePipe } from '@angular/common';
5
- import { NgbDateAdapter, NgbTimeAdapter, NgbModal, NgbTooltip, NgbInputDatepickerConfig, NgbTypeaheadConfig, NgbDateParserFormatter, NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap';
4
+ import { formatDate, CommonModule, DOCUMENT } from '@angular/common';
5
+ import { NgbDateAdapter, NgbTimeAdapter, NgbModal, NgbTooltip, NgbInputDatepickerConfig, NgbTypeaheadConfig, NgbDateParserFormatter } from '@ng-bootstrap/ng-bootstrap';
6
6
  import { animation, style, animate, keyframes, trigger, state, transition, useAnimation, query } from '@angular/animations';
7
7
  import * as i1$1 from '@angular/router';
8
- import { Router, ResolveEnd } from '@angular/router';
8
+ import { RouterModule, Router, ResolveEnd } from '@angular/router';
9
9
  import * as i2 from '@abp/ng.core';
10
- import { getRoutePath, SubscriptionService, PROJECTION_STRATEGY, uuid, AbstractNgModelComponent, InternetConnectionService, LocalizationModule, LocalizationService, getLocaleDirection, DomInsertionService, CONTENT_STRATEGY, SORT_COMPARE_FUNC, InternalStore, ContentProjectionService, RouterEvents, AuthService, SessionStateService, ConfigStateService, HttpErrorReporterService, RoutesService, TENANT_NOT_FOUND_BY_NAME, CoreModule } from '@abp/ng.core';
10
+ import { LocalizationPipe, getRoutePath, SubscriptionService, PROJECTION_STRATEGY, SORT_COMPARE_FUNC, InternalStore, ContentProjectionService, RouterEvents, AuthService, SessionStateService, DomInsertionService, CONTENT_STRATEGY, ConfigStateService, uuid, AbstractNgModelComponent, InternetConnectionService, LocalizationModule, LocalizationService, getLocaleDirection, HttpErrorReporterService, RoutesService, TENANT_NOT_FOUND_BY_NAME } from '@abp/ng.core';
11
11
  import { startWith, map, debounceTime, filter, takeUntil, take, switchMap } from 'rxjs/operators';
12
12
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
13
- import { fromEvent, Subscription, combineLatest, timer, ReplaySubject, Subject, distinctUntilChanged, of, from, Observable, EMPTY, BehaviorSubject } from 'rxjs';
13
+ import { fromEvent, Subscription, combineLatest, timer, ReplaySubject, Subject, BehaviorSubject, distinctUntilChanged, of, from, Observable, EMPTY } from 'rxjs';
14
+ import { HttpErrorResponse } from '@angular/common/http';
14
15
  import * as i2$1 from '@angular/forms';
15
- import { FormsModule, NG_VALUE_ACCESSOR, Validators } from '@angular/forms';
16
+ import { FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR, Validators } from '@angular/forms';
17
+ import * as i3 from '@ngx-validate/core';
18
+ import { NgxValidateCoreModule, normalizeDiacritics, VALIDATION_BLUEPRINTS, defaultMapErrorsFn, VALIDATION_MAP_ERRORS_FN, VALIDATION_VALIDATE_ON_SUBMIT } from '@ngx-validate/core';
16
19
  import * as i1$2 from '@swimlane/ngx-datatable';
17
20
  import { ColumnMode, DatatableComponent, NgxDatatableModule } from '@swimlane/ngx-datatable';
18
- import { HttpErrorResponse } from '@angular/common/http';
19
- import { normalizeDiacritics, VALIDATION_BLUEPRINTS, defaultMapErrorsFn, VALIDATION_MAP_ERRORS_FN, VALIDATION_VALIDATE_ON_SUBMIT, NgxValidateCoreModule } from '@ngx-validate/core';
20
21
 
21
22
  class DateTimeAdapter {
22
23
  fromModel(value) {
@@ -267,11 +268,11 @@ class BreadcrumbItemsComponent {
267
268
  this.items = [];
268
269
  }
269
270
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: BreadcrumbItemsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
270
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: BreadcrumbItemsComponent, isStandalone: false, selector: "abp-breadcrumb-items", inputs: { items: "items" }, ngImport: i0, template: "@if (items.length) {\r\n <ol class=\"breadcrumb\">\r\n <li class=\"breadcrumb-item\">\r\n <a routerLink=\"/\"><i class=\"fa fa-home\" aria-hidden=\"true\"></i> </a>\r\n </li>\r\n @for (item of items; track $index; let last = $last) {\r\n <li class=\"breadcrumb-item\" [class.active]=\"last\" aria-current=\"page\">\r\n <ng-container\r\n *ngTemplateOutlet=\"item.path ? linkTemplate : textTemplate; context: { $implicit: item }\"\r\n ></ng-container>\r\n </li>\r\n }\r\n </ol>\r\n}\r\n\r\n<ng-template #linkTemplate let-item>\r\n <a [routerLink]=\"item.path\"> {{ item.name | abpLocalization }}</a>\r\n</ng-template>\r\n\r\n<ng-template #textTemplate let-item>\r\n {{ item.name | abpLocalization }}\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
271
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: BreadcrumbItemsComponent, isStandalone: true, selector: "abp-breadcrumb-items", inputs: { items: "items" }, ngImport: i0, template: "@if (items.length) {\r\n <ol class=\"breadcrumb\">\r\n <li class=\"breadcrumb-item\">\r\n <a routerLink=\"/\"><i class=\"fa fa-home\" aria-hidden=\"true\"></i> </a>\r\n </li>\r\n @for (item of items; track $index; let last = $last) {\r\n <li class=\"breadcrumb-item\" [class.active]=\"last\" aria-current=\"page\">\r\n <ng-container\r\n *ngTemplateOutlet=\"item.path ? linkTemplate : textTemplate; context: { $implicit: item }\"\r\n ></ng-container>\r\n </li>\r\n }\r\n </ol>\r\n}\r\n\r\n<ng-template #linkTemplate let-item>\r\n <a [routerLink]=\"item.path\"> {{ item.name | abpLocalization }}</a>\r\n</ng-template>\r\n\r\n<ng-template #textTemplate let-item>\r\n {{ item.name | abpLocalization }}\r\n</ng-template>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
271
272
  }
272
273
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: BreadcrumbItemsComponent, decorators: [{
273
274
  type: Component,
274
- args: [{ standalone: false, selector: 'abp-breadcrumb-items', template: "@if (items.length) {\r\n <ol class=\"breadcrumb\">\r\n <li class=\"breadcrumb-item\">\r\n <a routerLink=\"/\"><i class=\"fa fa-home\" aria-hidden=\"true\"></i> </a>\r\n </li>\r\n @for (item of items; track $index; let last = $last) {\r\n <li class=\"breadcrumb-item\" [class.active]=\"last\" aria-current=\"page\">\r\n <ng-container\r\n *ngTemplateOutlet=\"item.path ? linkTemplate : textTemplate; context: { $implicit: item }\"\r\n ></ng-container>\r\n </li>\r\n }\r\n </ol>\r\n}\r\n\r\n<ng-template #linkTemplate let-item>\r\n <a [routerLink]=\"item.path\"> {{ item.name | abpLocalization }}</a>\r\n</ng-template>\r\n\r\n<ng-template #textTemplate let-item>\r\n {{ item.name | abpLocalization }}\r\n</ng-template>\r\n" }]
275
+ args: [{ selector: 'abp-breadcrumb-items', imports: [CommonModule, RouterModule, LocalizationPipe], template: "@if (items.length) {\r\n <ol class=\"breadcrumb\">\r\n <li class=\"breadcrumb-item\">\r\n <a routerLink=\"/\"><i class=\"fa fa-home\" aria-hidden=\"true\"></i> </a>\r\n </li>\r\n @for (item of items; track $index; let last = $last) {\r\n <li class=\"breadcrumb-item\" [class.active]=\"last\" aria-current=\"page\">\r\n <ng-container\r\n *ngTemplateOutlet=\"item.path ? linkTemplate : textTemplate; context: { $implicit: item }\"\r\n ></ng-container>\r\n </li>\r\n }\r\n </ol>\r\n}\r\n\r\n<ng-template #linkTemplate let-item>\r\n <a [routerLink]=\"item.path\"> {{ item.name | abpLocalization }}</a>\r\n</ng-template>\r\n\r\n<ng-template #textTemplate let-item>\r\n {{ item.name | abpLocalization }}\r\n</ng-template>\r\n" }]
275
276
  }], propDecorators: { items: [{
276
277
  type: Input
277
278
  }] } });
@@ -301,16 +302,17 @@ class BreadcrumbComponent {
301
302
  });
302
303
  }
303
304
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: BreadcrumbComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.Router }, { token: i2.RoutesService }, { token: i2.SubscriptionService }, { token: i2.RouterEvents }], target: i0.ɵɵFactoryTarget.Component }); }
304
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: BreadcrumbComponent, isStandalone: false, selector: "abp-breadcrumb", providers: [SubscriptionService], ngImport: i0, template: "<abp-breadcrumb-items [items]=\"segments\"></abp-breadcrumb-items>\r\n", dependencies: [{ kind: "component", type: BreadcrumbItemsComponent, selector: "abp-breadcrumb-items", inputs: ["items"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
305
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: BreadcrumbComponent, isStandalone: true, selector: "abp-breadcrumb", providers: [SubscriptionService], ngImport: i0, template: "<abp-breadcrumb-items [items]=\"segments\"></abp-breadcrumb-items>\r\n", dependencies: [{ kind: "component", type: BreadcrumbItemsComponent, selector: "abp-breadcrumb-items", inputs: ["items"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
305
306
  }
306
307
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: BreadcrumbComponent, decorators: [{
307
308
  type: Component,
308
- args: [{ standalone: false, selector: 'abp-breadcrumb', changeDetection: ChangeDetectionStrategy.OnPush, providers: [SubscriptionService], template: "<abp-breadcrumb-items [items]=\"segments\"></abp-breadcrumb-items>\r\n" }]
309
+ args: [{ selector: 'abp-breadcrumb', changeDetection: ChangeDetectionStrategy.OnPush, providers: [SubscriptionService], imports: [BreadcrumbItemsComponent], template: "<abp-breadcrumb-items [items]=\"segments\"></abp-breadcrumb-items>\r\n" }]
309
310
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$1.Router }, { type: i2.RoutesService }, { type: i2.SubscriptionService }, { type: i2.RouterEvents }] });
310
311
  function isAdministration(route) {
311
312
  return route.name === "AbpUiNavigation::Menu:Administration" /* eThemeSharedRouteNames.Administration */;
312
313
  }
313
314
 
315
+ /* eslint-disable @angular-eslint/no-output-native */
314
316
  class ButtonComponent {
315
317
  get icon() {
316
318
  return `${this.loading ? 'fa fa-spinner fa-spin' : this.iconClass || 'd-none'}`;
@@ -340,7 +342,7 @@ class ButtonComponent {
340
342
  }
341
343
  }
342
344
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ButtonComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
343
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: ButtonComponent, isStandalone: false, selector: "abp-button", inputs: { buttonId: "buttonId", buttonClass: "buttonClass", buttonType: "buttonType", formName: "formName", iconClass: "iconClass", loading: "loading", disabled: "disabled", attributes: "attributes" }, outputs: { click: "click", focus: "focus", blur: "blur", abpClick: "abpClick", abpFocus: "abpFocus", abpBlur: "abpBlur" }, viewQueries: [{ propertyName: "buttonRef", first: true, predicate: ["button"], descendants: true, static: true }], ngImport: i0, template: `
345
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: ButtonComponent, isStandalone: true, selector: "abp-button", inputs: { buttonId: "buttonId", buttonClass: "buttonClass", buttonType: "buttonType", formName: "formName", iconClass: "iconClass", loading: "loading", disabled: "disabled", attributes: "attributes" }, outputs: { click: "click", focus: "focus", blur: "blur", abpClick: "abpClick", abpFocus: "abpFocus", abpBlur: "abpBlur" }, viewQueries: [{ propertyName: "buttonRef", first: true, predicate: ["button"], descendants: true, static: true }], ngImport: i0, template: `
344
346
  <button
345
347
  #button
346
348
  [id]="buttonId"
@@ -354,12 +356,11 @@ class ButtonComponent {
354
356
  >
355
357
  <i [ngClass]="icon" class="me-1" aria-hidden="true"></i><ng-content></ng-content>
356
358
  </button>
357
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }] }); }
359
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
358
360
  }
359
361
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ButtonComponent, decorators: [{
360
362
  type: Component,
361
363
  args: [{
362
- standalone: false,
363
364
  selector: 'abp-button',
364
365
  template: `
365
366
  <button
@@ -376,6 +377,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
376
377
  <i [ngClass]="icon" class="me-1" aria-hidden="true"></i><ng-content></ng-content>
377
378
  </button>
378
379
  `,
380
+ imports: [CommonModule],
379
381
  }]
380
382
  }], ctorParameters: () => [{ type: i0.Renderer2 }], propDecorators: { buttonId: [{
381
383
  type: Input
@@ -459,11 +461,11 @@ class ConfirmationComponent {
459
461
  return !!(options && options.iconTemplate);
460
462
  }
461
463
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ConfirmationComponent, deps: [{ token: CONFIRMATION_ICONS }], target: i0.ɵɵFactoryTarget.Component }); }
462
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: ConfirmationComponent, isStandalone: false, selector: "abp-confirmation", ngImport: i0, template: "@if (confirmation$ | async; as data) {\r\n <div class=\"confirmation\">\r\n <div\r\n class=\"confirmation-backdrop\"\r\n (click)=\"data.options?.dismissible ? close(dismiss) : null\"\r\n ></div>\r\n <div class=\"confirmation-dialog\">\r\n @if (data.severity || isCustomIconExists(data)) {\r\n <div class=\"icon-container\" [ngClass]=\"data.severity\">\r\n @if (isIconTemplateExits(data)) {\r\n <div [outerHTML]=\"data.options.iconTemplate\"></div>\r\n } @else {\r\n <i class=\"icon\" [ngClass]=\"getIconClass(data)\"></i>\r\n }\r\n </div>\r\n }\r\n <div class=\"content\">\r\n @if (data.title) {\r\n <h1\r\n class=\"title\"\r\n [innerHTML]=\"data.title | abpLocalization: data.options?.titleLocalizationParams\"\r\n ></h1>\r\n }\r\n @if (data.message) {\r\n <p\r\n class=\"message\"\r\n [innerHTML]=\"data.message | abpLocalization: data.options?.messageLocalizationParams\"\r\n ></p>\r\n }\r\n </div>\r\n <div class=\"footer\">\r\n @if (!data?.options?.hideCancelBtn) {\r\n <button\r\n id=\"cancel\"\r\n class=\"btn btn-outline-primary me-2\"\r\n [innerHTML]=\"data.options?.cancelText || 'AbpUi::Cancel' | abpLocalization\"\r\n (click)=\"close(reject)\"\r\n ></button>\r\n }\r\n @if (!data?.options?.hideYesBtn) {\r\n <button\r\n id=\"confirm\"\r\n class=\"btn btn-primary\"\r\n [innerHTML]=\"data.options?.yesText || 'AbpUi::Yes' | abpLocalization\"\r\n (click)=\"close(confirm)\"\r\n ></button>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n}\r\n", styles: [".confirmation{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:1060}.confirmation .confirmation-backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1061!important}.confirmation .confirmation-dialog{display:flex;flex-direction:column;margin:20px auto;padding:0;width:450px;min-height:300px;z-index:1062!important}@media screen and (max-width: 500px){.confirmation .confirmation-dialog{width:90vw}}.confirmation .confirmation-dialog .icon-container{display:flex;align-items:center;justify-content:center;padding:40px 20px 10px}.confirmation .confirmation-dialog .icon-container .icon{width:100px;height:100px;stroke-width:1;font-size:80px;text-align:center}.confirmation .confirmation-dialog .content{flex-grow:1;display:block}.confirmation .confirmation-dialog .content .title{display:block;margin:0;padding:0;font-size:27px;font-weight:600;text-align:center}.confirmation .confirmation-dialog .content .message{display:block;padding:8px 20px 20px;font-size:16px;font-weight:400;text-align:center;margin-bottom:0}.confirmation .confirmation-dialog .footer{display:flex;align-items:center;justify-content:flex-end;padding:20px;width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
464
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: ConfirmationComponent, isStandalone: true, selector: "abp-confirmation", ngImport: i0, template: "@if (confirmation$ | async; as data) {\r\n <div class=\"confirmation\">\r\n <div\r\n class=\"confirmation-backdrop\"\r\n (click)=\"data.options?.dismissible ? close(dismiss) : null\"\r\n ></div>\r\n <div class=\"confirmation-dialog\">\r\n @if (data.severity || isCustomIconExists(data)) {\r\n <div class=\"icon-container\" [ngClass]=\"data.severity\">\r\n @if (isIconTemplateExits(data)) {\r\n <div [outerHTML]=\"data.options.iconTemplate\"></div>\r\n } @else {\r\n <i class=\"icon\" [ngClass]=\"getIconClass(data)\"></i>\r\n }\r\n </div>\r\n }\r\n <div class=\"content\">\r\n @if (data.title) {\r\n <h1\r\n class=\"title\"\r\n [innerHTML]=\"data.title | abpLocalization: data.options?.titleLocalizationParams\"\r\n ></h1>\r\n }\r\n @if (data.message) {\r\n <p\r\n class=\"message\"\r\n [innerHTML]=\"data.message | abpLocalization: data.options?.messageLocalizationParams\"\r\n ></p>\r\n }\r\n </div>\r\n <div class=\"footer\">\r\n @if (!data?.options?.hideCancelBtn) {\r\n <button\r\n id=\"cancel\"\r\n class=\"btn btn-outline-primary me-2\"\r\n [innerHTML]=\"data.options?.cancelText || 'AbpUi::Cancel' | abpLocalization\"\r\n (click)=\"close(reject)\"\r\n ></button>\r\n }\r\n @if (!data?.options?.hideYesBtn) {\r\n <button\r\n id=\"confirm\"\r\n class=\"btn btn-primary\"\r\n [innerHTML]=\"data.options?.yesText || 'AbpUi::Yes' | abpLocalization\"\r\n (click)=\"close(confirm)\"\r\n ></button>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n}\r\n", styles: [".confirmation{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:1060}.confirmation .confirmation-backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1061!important}.confirmation .confirmation-dialog{display:flex;flex-direction:column;margin:20px auto;padding:0;width:450px;min-height:300px;z-index:1062!important}@media screen and (max-width: 500px){.confirmation .confirmation-dialog{width:90vw}}.confirmation .confirmation-dialog .icon-container{display:flex;align-items:center;justify-content:center;padding:40px 20px 10px}.confirmation .confirmation-dialog .icon-container .icon{width:100px;height:100px;stroke-width:1;font-size:80px;text-align:center}.confirmation .confirmation-dialog .content{flex-grow:1;display:block}.confirmation .confirmation-dialog .content .title{display:block;margin:0;padding:0;font-size:27px;font-weight:600;text-align:center}.confirmation .confirmation-dialog .content .message{display:block;padding:8px 20px 20px;font-size:16px;font-weight:400;text-align:center;margin-bottom:0}.confirmation .confirmation-dialog .footer{display:flex;align-items:center;justify-content:flex-end;padding:20px;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
463
465
  }
464
466
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ConfirmationComponent, decorators: [{
465
467
  type: Component,
466
- args: [{ standalone: false, selector: 'abp-confirmation', template: "@if (confirmation$ | async; as data) {\r\n <div class=\"confirmation\">\r\n <div\r\n class=\"confirmation-backdrop\"\r\n (click)=\"data.options?.dismissible ? close(dismiss) : null\"\r\n ></div>\r\n <div class=\"confirmation-dialog\">\r\n @if (data.severity || isCustomIconExists(data)) {\r\n <div class=\"icon-container\" [ngClass]=\"data.severity\">\r\n @if (isIconTemplateExits(data)) {\r\n <div [outerHTML]=\"data.options.iconTemplate\"></div>\r\n } @else {\r\n <i class=\"icon\" [ngClass]=\"getIconClass(data)\"></i>\r\n }\r\n </div>\r\n }\r\n <div class=\"content\">\r\n @if (data.title) {\r\n <h1\r\n class=\"title\"\r\n [innerHTML]=\"data.title | abpLocalization: data.options?.titleLocalizationParams\"\r\n ></h1>\r\n }\r\n @if (data.message) {\r\n <p\r\n class=\"message\"\r\n [innerHTML]=\"data.message | abpLocalization: data.options?.messageLocalizationParams\"\r\n ></p>\r\n }\r\n </div>\r\n <div class=\"footer\">\r\n @if (!data?.options?.hideCancelBtn) {\r\n <button\r\n id=\"cancel\"\r\n class=\"btn btn-outline-primary me-2\"\r\n [innerHTML]=\"data.options?.cancelText || 'AbpUi::Cancel' | abpLocalization\"\r\n (click)=\"close(reject)\"\r\n ></button>\r\n }\r\n @if (!data?.options?.hideYesBtn) {\r\n <button\r\n id=\"confirm\"\r\n class=\"btn btn-primary\"\r\n [innerHTML]=\"data.options?.yesText || 'AbpUi::Yes' | abpLocalization\"\r\n (click)=\"close(confirm)\"\r\n ></button>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n}\r\n", styles: [".confirmation{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:1060}.confirmation .confirmation-backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1061!important}.confirmation .confirmation-dialog{display:flex;flex-direction:column;margin:20px auto;padding:0;width:450px;min-height:300px;z-index:1062!important}@media screen and (max-width: 500px){.confirmation .confirmation-dialog{width:90vw}}.confirmation .confirmation-dialog .icon-container{display:flex;align-items:center;justify-content:center;padding:40px 20px 10px}.confirmation .confirmation-dialog .icon-container .icon{width:100px;height:100px;stroke-width:1;font-size:80px;text-align:center}.confirmation .confirmation-dialog .content{flex-grow:1;display:block}.confirmation .confirmation-dialog .content .title{display:block;margin:0;padding:0;font-size:27px;font-weight:600;text-align:center}.confirmation .confirmation-dialog .content .message{display:block;padding:8px 20px 20px;font-size:16px;font-weight:400;text-align:center;margin-bottom:0}.confirmation .confirmation-dialog .footer{display:flex;align-items:center;justify-content:flex-end;padding:20px;width:100%}\n"] }]
468
+ args: [{ selector: 'abp-confirmation', imports: [CommonModule, LocalizationPipe], template: "@if (confirmation$ | async; as data) {\r\n <div class=\"confirmation\">\r\n <div\r\n class=\"confirmation-backdrop\"\r\n (click)=\"data.options?.dismissible ? close(dismiss) : null\"\r\n ></div>\r\n <div class=\"confirmation-dialog\">\r\n @if (data.severity || isCustomIconExists(data)) {\r\n <div class=\"icon-container\" [ngClass]=\"data.severity\">\r\n @if (isIconTemplateExits(data)) {\r\n <div [outerHTML]=\"data.options.iconTemplate\"></div>\r\n } @else {\r\n <i class=\"icon\" [ngClass]=\"getIconClass(data)\"></i>\r\n }\r\n </div>\r\n }\r\n <div class=\"content\">\r\n @if (data.title) {\r\n <h1\r\n class=\"title\"\r\n [innerHTML]=\"data.title | abpLocalization: data.options?.titleLocalizationParams\"\r\n ></h1>\r\n }\r\n @if (data.message) {\r\n <p\r\n class=\"message\"\r\n [innerHTML]=\"data.message | abpLocalization: data.options?.messageLocalizationParams\"\r\n ></p>\r\n }\r\n </div>\r\n <div class=\"footer\">\r\n @if (!data?.options?.hideCancelBtn) {\r\n <button\r\n id=\"cancel\"\r\n class=\"btn btn-outline-primary me-2\"\r\n [innerHTML]=\"data.options?.cancelText || 'AbpUi::Cancel' | abpLocalization\"\r\n (click)=\"close(reject)\"\r\n ></button>\r\n }\r\n @if (!data?.options?.hideYesBtn) {\r\n <button\r\n id=\"confirm\"\r\n class=\"btn btn-primary\"\r\n [innerHTML]=\"data.options?.yesText || 'AbpUi::Yes' | abpLocalization\"\r\n (click)=\"close(confirm)\"\r\n ></button>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n}\r\n", styles: [".confirmation{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:1060}.confirmation .confirmation-backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1061!important}.confirmation .confirmation-dialog{display:flex;flex-direction:column;margin:20px auto;padding:0;width:450px;min-height:300px;z-index:1062!important}@media screen and (max-width: 500px){.confirmation .confirmation-dialog{width:90vw}}.confirmation .confirmation-dialog .icon-container{display:flex;align-items:center;justify-content:center;padding:40px 20px 10px}.confirmation .confirmation-dialog .icon-container .icon{width:100px;height:100px;stroke-width:1;font-size:80px;text-align:center}.confirmation .confirmation-dialog .content{flex-grow:1;display:block}.confirmation .confirmation-dialog .content .title{display:block;margin:0;padding:0;font-size:27px;font-weight:600;text-align:center}.confirmation .confirmation-dialog .content .message{display:block;padding:8px 20px 20px;font-size:16px;font-weight:400;text-align:center;margin-bottom:0}.confirmation .confirmation-dialog .footer{display:flex;align-items:center;justify-content:flex-end;padding:20px;width:100%}\n"] }]
467
469
  }], ctorParameters: () => [{ type: undefined, decorators: [{
468
470
  type: Inject,
469
471
  args: [CONFIRMATION_ICONS]
@@ -526,11 +528,11 @@ class HttpErrorWrapperComponent {
526
528
  this.destroy();
527
529
  }
528
530
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: HttpErrorWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
529
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: HttpErrorWrapperComponent, isStandalone: false, selector: "abp-http-error-wrapper", viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: "<div\r\n #container\r\n id=\"abp-http-error-container\"\r\n class=\"error\"\r\n [style.backgroundColor]=\"backgroundColor\"\r\n>\r\n @if (!hideCloseIcon) {\r\n <button id=\"abp-close-button\" type=\"button\" class=\"btn-close me-2\" (click)=\"destroy()\"></button>\r\n }\r\n\r\n @if (!customComponent) {\r\n <div class=\"row centered\">\r\n <div class=\"col-md-12\">\r\n <div class=\"error-template\">\r\n <h1>{{ statusText }} {{ title | abpLocalization }}</h1>\r\n <div class=\"error-details\">\r\n {{ details | abpLocalization }}\r\n </div>\r\n <div class=\"error-actions\">\r\n @if (isHomeShow) {\r\n <a (click)=\"goHome()\" class=\"btn btn-primary btn-md mt-2\"\r\n ><span class=\"glyphicon glyphicon-home\"></span>\r\n {{ { key: '::Menu:Home', defaultValue: 'Home' } | abpLocalization }}\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".error{position:fixed;top:0;width:100vw;height:100vh;z-index:999999}.centered{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
531
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: HttpErrorWrapperComponent, isStandalone: true, selector: "abp-http-error-wrapper", viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: "<div\r\n #container\r\n id=\"abp-http-error-container\"\r\n class=\"error\"\r\n [style.backgroundColor]=\"backgroundColor\"\r\n>\r\n @if (!hideCloseIcon) {\r\n <button id=\"abp-close-button\" type=\"button\" class=\"btn-close me-2\" (click)=\"destroy()\"></button>\r\n }\r\n\r\n @if (!customComponent) {\r\n <div class=\"row centered\">\r\n <div class=\"col-md-12\">\r\n <div class=\"error-template\">\r\n <h1>{{ statusText }} {{ title | abpLocalization }}</h1>\r\n <div class=\"error-details\">\r\n {{ details | abpLocalization }}\r\n </div>\r\n <div class=\"error-actions\">\r\n @if (isHomeShow) {\r\n <a (click)=\"goHome()\" class=\"btn btn-primary btn-md mt-2\"\r\n ><span class=\"glyphicon glyphicon-home\"></span>\r\n {{ { key: '::Menu:Home', defaultValue: 'Home' } | abpLocalization }}\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".error{position:fixed;top:0;width:100vw;height:100vh;z-index:999999}.centered{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
530
532
  }
531
533
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: HttpErrorWrapperComponent, decorators: [{
532
534
  type: Component,
533
- args: [{ standalone: false, selector: 'abp-http-error-wrapper', template: "<div\r\n #container\r\n id=\"abp-http-error-container\"\r\n class=\"error\"\r\n [style.backgroundColor]=\"backgroundColor\"\r\n>\r\n @if (!hideCloseIcon) {\r\n <button id=\"abp-close-button\" type=\"button\" class=\"btn-close me-2\" (click)=\"destroy()\"></button>\r\n }\r\n\r\n @if (!customComponent) {\r\n <div class=\"row centered\">\r\n <div class=\"col-md-12\">\r\n <div class=\"error-template\">\r\n <h1>{{ statusText }} {{ title | abpLocalization }}</h1>\r\n <div class=\"error-details\">\r\n {{ details | abpLocalization }}\r\n </div>\r\n <div class=\"error-actions\">\r\n @if (isHomeShow) {\r\n <a (click)=\"goHome()\" class=\"btn btn-primary btn-md mt-2\"\r\n ><span class=\"glyphicon glyphicon-home\"></span>\r\n {{ { key: '::Menu:Home', defaultValue: 'Home' } | abpLocalization }}\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".error{position:fixed;top:0;width:100vw;height:100vh;z-index:999999}.centered{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}\n"] }]
535
+ args: [{ selector: 'abp-http-error-wrapper', imports: [CommonModule, LocalizationPipe], template: "<div\r\n #container\r\n id=\"abp-http-error-container\"\r\n class=\"error\"\r\n [style.backgroundColor]=\"backgroundColor\"\r\n>\r\n @if (!hideCloseIcon) {\r\n <button id=\"abp-close-button\" type=\"button\" class=\"btn-close me-2\" (click)=\"destroy()\"></button>\r\n }\r\n\r\n @if (!customComponent) {\r\n <div class=\"row centered\">\r\n <div class=\"col-md-12\">\r\n <div class=\"error-template\">\r\n <h1>{{ statusText }} {{ title | abpLocalization }}</h1>\r\n <div class=\"error-details\">\r\n {{ details | abpLocalization }}\r\n </div>\r\n <div class=\"error-actions\">\r\n @if (isHomeShow) {\r\n <a (click)=\"goHome()\" class=\"btn btn-primary btn-md mt-2\"\r\n ><span class=\"glyphicon glyphicon-home\"></span>\r\n {{ { key: '::Menu:Home', defaultValue: 'Home' } | abpLocalization }}\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".error{position:fixed;top:0;width:100vw;height:100vh;z-index:999999}.centered{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}\n"] }]
534
536
  }], propDecorators: { containerRef: [{
535
537
  type: ViewChild,
536
538
  args: ['container', { static: false }]
@@ -612,7 +614,7 @@ class LoaderBarComponent {
612
614
  this.timer = timer(this.stopDelay).subscribe(this.clearProgress);
613
615
  }
614
616
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LoaderBarComponent, deps: [{ token: i1$1.Router }, { token: i0.ChangeDetectorRef }, { token: i2.SubscriptionService }, { token: i2.HttpWaitService }, { token: i2.RouterWaitService }], target: i0.ɵɵFactoryTarget.Component }); }
615
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: LoaderBarComponent, isStandalone: false, selector: "abp-loader-bar", inputs: { isLoading: "isLoading", containerClass: "containerClass", color: "color" }, providers: [SubscriptionService], ngImport: i0, template: `
617
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: LoaderBarComponent, isStandalone: true, selector: "abp-loader-bar", inputs: { isLoading: "isLoading", containerClass: "containerClass", color: "color" }, providers: [SubscriptionService], ngImport: i0, template: `
616
618
  <div id="abp-loader-bar" [ngClass]="containerClass" [class.is-loading]="isLoading">
617
619
  <div
618
620
  class="abp-progress"
@@ -624,11 +626,11 @@ class LoaderBarComponent {
624
626
  }"
625
627
  ></div>
626
628
  </div>
627
- `, isInline: true, styles: [".abp-loader-bar{left:0;opacity:0;position:fixed;top:0;transition:opacity .4s linear .4s;z-index:99999}.abp-loader-bar.is-loading{opacity:1;transition:none}.abp-loader-bar .abp-progress{height:3px;left:0;position:fixed;top:0}.abp-loader-bar .abp-progress.progressing{transition:width .4s ease}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
629
+ `, isInline: true, styles: [".abp-loader-bar{left:0;opacity:0;position:fixed;top:0;transition:opacity .4s linear .4s;z-index:99999}.abp-loader-bar.is-loading{opacity:1;transition:none}.abp-loader-bar .abp-progress{height:3px;left:0;position:fixed;top:0}.abp-loader-bar .abp-progress.progressing{transition:width .4s ease}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
628
630
  }
629
631
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LoaderBarComponent, decorators: [{
630
632
  type: Component,
631
- args: [{ standalone: false, selector: 'abp-loader-bar', template: `
633
+ args: [{ selector: 'abp-loader-bar', template: `
632
634
  <div id="abp-loader-bar" [ngClass]="containerClass" [class.is-loading]="isLoading">
633
635
  <div
634
636
  class="abp-progress"
@@ -640,7 +642,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
640
642
  }"
641
643
  ></div>
642
644
  </div>
643
- `, providers: [SubscriptionService], styles: [".abp-loader-bar{left:0;opacity:0;position:fixed;top:0;transition:opacity .4s linear .4s;z-index:99999}.abp-loader-bar.is-loading{opacity:1;transition:none}.abp-loader-bar .abp-progress{height:3px;left:0;position:fixed;top:0}.abp-loader-bar .abp-progress.progressing{transition:width .4s ease}\n"] }]
645
+ `, providers: [SubscriptionService], imports: [CommonModule], styles: [".abp-loader-bar{left:0;opacity:0;position:fixed;top:0;transition:opacity .4s linear .4s;z-index:99999}.abp-loader-bar.is-loading{opacity:1;transition:none}.abp-loader-bar .abp-progress{height:3px;left:0;position:fixed;top:0}.abp-loader-bar .abp-progress.progressing{transition:width .4s ease}\n"] }]
644
646
  }], ctorParameters: () => [{ type: i1$1.Router }, { type: i0.ChangeDetectorRef }, { type: i2.SubscriptionService }, { type: i2.HttpWaitService }, { type: i2.RouterWaitService }], propDecorators: { isLoading: [{
645
647
  type: Input
646
648
  }], containerClass: [{
@@ -651,7 +653,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
651
653
 
652
654
  class LoadingComponent {
653
655
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
654
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: LoadingComponent, isStandalone: false, selector: "abp-loading", ngImport: i0, template: `
656
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: LoadingComponent, isStandalone: true, selector: "abp-loading", ngImport: i0, template: `
655
657
  <div class="abp-loading">
656
658
  <i class="fa fa-spinner fa-pulse abp-spinner" aria-hidden="true"></i>
657
659
  </div>
@@ -659,13 +661,22 @@ class LoadingComponent {
659
661
  }
660
662
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LoadingComponent, decorators: [{
661
663
  type: Component,
662
- args: [{ standalone: false, selector: 'abp-loading', template: `
664
+ args: [{ selector: 'abp-loading', template: `
663
665
  <div class="abp-loading">
664
666
  <i class="fa fa-spinner fa-pulse abp-spinner" aria-hidden="true"></i>
665
667
  </div>
666
- `, encapsulation: ViewEncapsulation.None, styles: [".abp-loading{position:absolute;width:100%;height:100%;top:0;left:0;z-index:1040}.abp-loading .abp-spinner{position:absolute;top:50%;left:50%;font-size:14px;-moz-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-webkit-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}\n"] }]
668
+ `, encapsulation: ViewEncapsulation.None, imports: [], styles: [".abp-loading{position:absolute;width:100%;height:100%;top:0;left:0;z-index:1040}.abp-loading .abp-spinner{position:absolute;top:50%;left:50%;font-size:14px;-moz-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-webkit-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}\n"] }]
667
669
  }] });
668
670
 
671
+ class NavItem {
672
+ constructor(props) {
673
+ Object.assign(this, props);
674
+ }
675
+ }
676
+
677
+ class UserMenu extends NavItem {
678
+ }
679
+
669
680
  class ConfirmationService {
670
681
  constructor(contentProjectionService) {
671
682
  this.contentProjectionService = contentProjectionService;
@@ -726,185 +737,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
726
737
  args: [{ providedIn: 'root' }]
727
738
  }], ctorParameters: () => [{ type: i2.ContentProjectionService }] });
728
739
 
729
- const SUPPRESS_UNSAVED_CHANGES_WARNING = new InjectionToken('SUPPRESS_UNSAVED_CHANGES_WARNING');
730
-
731
- class ModalRefService {
732
- constructor() {
733
- this.modalRefs = [];
734
- }
735
- register(modal) {
736
- this.modalRefs.push(modal);
737
- }
738
- unregister(modal) {
739
- const index = this.modalRefs.indexOf(modal);
740
- if (index > -1) {
741
- this.modalRefs.splice(index, 1);
742
- }
743
- }
744
- dismissAll(mode) {
745
- this.modalRefs.forEach(modal => modal.dismiss(mode));
746
- }
747
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ModalRefService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
748
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ModalRefService, providedIn: 'root' }); }
749
- }
750
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ModalRefService, decorators: [{
751
- type: Injectable,
752
- args: [{ providedIn: 'root' }]
753
- }] });
754
-
755
- class ModalComponent {
756
- get modalWindowRef() {
757
- return document.querySelector(`ngb-modal-window.${this.modalIdentifier}`);
740
+ class AbstractMenuService {
741
+ get items() {
742
+ return this._items$.value;
758
743
  }
759
- get isFormDirty() {
760
- return Boolean(this.modalWindowRef?.querySelector('.ng-dirty'));
744
+ get items$() {
745
+ return this._items$.asObservable();
761
746
  }
762
747
  constructor() {
763
- this.confirmationService = inject(ConfirmationService);
764
- this.modal = inject(NgbModal);
765
- this.modalRefService = inject(ModalRefService);
766
- this.suppressUnsavedChangesWarningToken = inject(SUPPRESS_UNSAVED_CHANGES_WARNING, {
767
- optional: true,
768
- });
769
- this.destroyRef = inject(DestroyRef);
770
- this.visible = model(false);
771
- this.busy = input(false, {
772
- transform: (value) => {
773
- if (this.abpSubmit() && this.abpSubmit() instanceof ButtonComponent) {
774
- this.abpSubmit().loading = value;
775
- }
776
- return value;
777
- },
778
- });
779
- this.options = input({ keyboard: true });
780
- this.suppressUnsavedChangesWarning = input(this.suppressUnsavedChangesWarningToken);
781
- this.modalContent = viewChild('modalContent');
782
- this.abpHeader = contentChild('abpHeader');
783
- this.abpBody = contentChild('abpBody');
784
- this.abpFooter = contentChild('abpFooter');
785
- this.abpSubmit = contentChild(ButtonComponent, { read: ButtonComponent });
786
- this.init = output();
787
- this.appear = output();
788
- this.disappear = output();
789
- this.isConfirmationOpen = false;
790
- this.modalIdentifier = `modal-${uuid()}`;
791
- effect(() => {
792
- this.toggle(this.visible());
793
- });
794
- }
795
- ngOnInit() {
796
- this.modalRefService.register(this);
797
- }
798
- dismiss(mode) {
799
- switch (mode) {
800
- case 'hard':
801
- this.visible.set(false);
802
- break;
803
- case 'soft':
804
- this.close();
805
- break;
806
- default:
807
- break;
808
- }
748
+ this._items$ = new BehaviorSubject([]);
749
+ this.sortItems = (a, b) => {
750
+ return this.sortFn(a, b);
751
+ };
752
+ this.sortFn = inject(SORT_COMPARE_FUNC);
809
753
  }
810
- toggle(value) {
811
- this.visible.set(value);
812
- if (!value) {
813
- this.modalRef?.dismiss();
814
- this.disappear.emit();
815
- return;
816
- }
817
- setTimeout(() => this.listen(), 0);
818
- this.modalRef = this.modal.open(this.modalContent(), {
819
- size: 'md',
820
- centered: false,
821
- keyboard: false,
822
- scrollable: true,
823
- beforeDismiss: () => {
824
- if (!this.visible())
825
- return true;
826
- this.close();
827
- return !this.visible();
828
- },
829
- ...this.options(),
830
- windowClass: `${this.options().windowClass || ''} ${this.modalIdentifier}`,
754
+ addItems(newItems) {
755
+ const items = [...this.items];
756
+ newItems.forEach(item => {
757
+ const index = items.findIndex(i => i.id === item.id);
758
+ const data = new this.baseClass(item);
759
+ if (index > -1) {
760
+ items[index] = data;
761
+ return;
762
+ }
763
+ items.push(data);
831
764
  });
832
- this.appear.emit();
765
+ items.sort(this.sortItems);
766
+ this._items$.next(items);
833
767
  }
834
- ngOnDestroy() {
835
- this.modalRefService.unregister(this);
836
- this.toggle(false);
768
+ removeItem(id) {
769
+ const index = this.items.findIndex(item => item.id === id);
770
+ if (index < 0)
771
+ return;
772
+ const items = [...this.items.slice(0, index), ...this.items.slice(index + 1)];
773
+ this._items$.next(items);
837
774
  }
838
- close() {
839
- if (this.busy())
775
+ patchItem(id, item) {
776
+ const index = this.items.findIndex(i => i.id === id);
777
+ if (index < 0)
840
778
  return;
841
- if (this.isFormDirty && !this.suppressUnsavedChangesWarning()) {
842
- if (this.isConfirmationOpen)
843
- return;
844
- this.isConfirmationOpen = true;
845
- this.confirmationService
846
- .warn('AbpUi::AreYouSureYouWantToCancelEditingWarningMessage', 'AbpUi::AreYouSure', {
847
- dismissible: false,
848
- })
849
- .subscribe((status) => {
850
- this.isConfirmationOpen = false;
851
- if (status === Confirmation.Status.confirm) {
852
- this.visible.set(false);
853
- }
854
- });
855
- }
856
- else {
857
- this.visible.set(false);
858
- }
779
+ const items = [...this.items];
780
+ items[index] = new this.baseClass({ ...items[index], ...item });
781
+ items.sort(this.sortItems);
782
+ this._items$.next(items);
859
783
  }
860
- listen() {
861
- if (this.modalWindowRef) {
862
- fromEvent(this.modalWindowRef, 'keyup')
863
- .pipe(takeUntilDestroyed(this.destroyRef), debounceTime(150), filter((key) => key && key.key === 'Escape' && this.options().keyboard))
864
- .subscribe(() => this.close());
865
- }
866
- fromEvent(window, 'beforeunload')
867
- .pipe(takeUntilDestroyed(this.destroyRef))
868
- .subscribe(event => {
869
- if (this.isFormDirty && !this.suppressUnsavedChangesWarning()) {
870
- event.preventDefault();
871
- }
872
- });
873
- this.init.emit();
784
+ }
785
+
786
+ class NavItemsService extends AbstractMenuService {
787
+ constructor() {
788
+ super(...arguments);
789
+ this.baseClass = NavItem;
874
790
  }
875
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
876
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: ModalComponent, isStandalone: false, selector: "abp-modal", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, busy: { classPropertyName: "busy", publicName: "busy", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, suppressUnsavedChangesWarning: { classPropertyName: "suppressUnsavedChangesWarning", publicName: "suppressUnsavedChangesWarning", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", init: "init", appear: "appear", disappear: "disappear" }, providers: [SubscriptionService], queries: [{ propertyName: "abpHeader", first: true, predicate: ["abpHeader"], descendants: true, isSignal: true }, { propertyName: "abpBody", first: true, predicate: ["abpBody"], descendants: true, isSignal: true }, { propertyName: "abpFooter", first: true, predicate: ["abpFooter"], descendants: true, isSignal: true }, { propertyName: "abpSubmit", first: true, predicate: ButtonComponent, descendants: true, read: ButtonComponent, isSignal: true }], viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-content></ng-content>\r\n\r\n<ng-template #modalContent let-modal>\r\n @if (abpHeader()) {\r\n <div id=\"abp-modal-header\" class=\"modal-header abp-modal-header\">\r\n <ng-container *ngTemplateOutlet=\"abpHeader()\"></ng-container>\r\n \u200B\r\n <button\r\n id=\"abp-modal-close-button\"\r\n type=\"button\"\r\n class=\"btn-sm btn-close\"\r\n aria-label=\"Close\"\r\n (click)=\"modal.dismiss()\"\r\n ></button>\r\n </div>\r\n }\r\n @if (abpBody()) {\r\n <div id=\"abp-modal-body\" class=\"modal-body\">\r\n <ng-container *ngTemplateOutlet=\"abpBody()\"></ng-container>\r\n </div>\r\n }\r\n @if (abpFooter()) {\r\n <div id=\"abp-modal-footer\" class=\"modal-footer\">\r\n <ng-container *ngTemplateOutlet=\"abpFooter()\"></ng-container>\r\n </div>\r\n }\r\n</ng-template>\r\n", styles: [".modal.show{display:block!important}.modal-backdrop{opacity:.8}.modal::-webkit-scrollbar{width:7px}.modal::-webkit-scrollbar-track{background:#ddd}.modal::-webkit-scrollbar-thumb{background:#8a8686}.modal-dialog{z-index:1050}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
791
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NavItemsService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
792
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NavItemsService, providedIn: 'root' }); }
877
793
  }
878
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ModalComponent, decorators: [{
879
- type: Component,
880
- args: [{ standalone: false, selector: 'abp-modal', providers: [SubscriptionService], template: "<ng-content></ng-content>\r\n\r\n<ng-template #modalContent let-modal>\r\n @if (abpHeader()) {\r\n <div id=\"abp-modal-header\" class=\"modal-header abp-modal-header\">\r\n <ng-container *ngTemplateOutlet=\"abpHeader()\"></ng-container>\r\n \u200B\r\n <button\r\n id=\"abp-modal-close-button\"\r\n type=\"button\"\r\n class=\"btn-sm btn-close\"\r\n aria-label=\"Close\"\r\n (click)=\"modal.dismiss()\"\r\n ></button>\r\n </div>\r\n }\r\n @if (abpBody()) {\r\n <div id=\"abp-modal-body\" class=\"modal-body\">\r\n <ng-container *ngTemplateOutlet=\"abpBody()\"></ng-container>\r\n </div>\r\n }\r\n @if (abpFooter()) {\r\n <div id=\"abp-modal-footer\" class=\"modal-footer\">\r\n <ng-container *ngTemplateOutlet=\"abpFooter()\"></ng-container>\r\n </div>\r\n }\r\n</ng-template>\r\n", styles: [".modal.show{display:block!important}.modal-backdrop{opacity:.8}.modal::-webkit-scrollbar{width:7px}.modal::-webkit-scrollbar-track{background:#ddd}.modal::-webkit-scrollbar-thumb{background:#8a8686}.modal-dialog{z-index:1050}\n"] }]
881
- }], ctorParameters: () => [] });
794
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NavItemsService, decorators: [{
795
+ type: Injectable,
796
+ args: [{ providedIn: 'root' }]
797
+ }] });
882
798
 
883
- class ModalCloseDirective {
884
- constructor(modal) {
885
- this.modal = modal;
886
- if (!modal) {
887
- console.error('Please use abpClose within an abp-modal');
888
- }
799
+ class PageAlertService {
800
+ constructor() {
801
+ this.alerts = new InternalStore([]);
802
+ this.alerts$ = this.alerts.sliceState(state => state);
889
803
  }
890
- onClick() {
891
- this.modal?.close();
804
+ show(alert) {
805
+ const newAlert = {
806
+ ...alert,
807
+ dismissible: alert.dismissible ?? true,
808
+ };
809
+ this.alerts.set([newAlert, ...this.alerts.state]);
892
810
  }
893
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ModalCloseDirective, deps: [{ token: ModalComponent, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
894
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: ModalCloseDirective, isStandalone: false, selector: "[abpClose]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
811
+ remove(index) {
812
+ const alerts = [...this.alerts.state];
813
+ alerts.splice(index, 1);
814
+ this.alerts.set(alerts);
815
+ }
816
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: PageAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
817
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: PageAlertService, providedIn: 'root' }); }
895
818
  }
896
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ModalCloseDirective, decorators: [{
897
- type: Directive,
898
- args: [{
899
- standalone: false,
900
- selector: '[abpClose]',
901
- }]
902
- }], ctorParameters: () => [{ type: ModalComponent, decorators: [{
903
- type: Optional
904
- }] }], propDecorators: { onClick: [{
905
- type: HostListener,
906
- args: ['click']
907
- }] } });
819
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: PageAlertService, decorators: [{
820
+ type: Injectable,
821
+ args: [{ providedIn: 'root' }]
822
+ }] });
908
823
 
909
824
  class ToastComponent {
910
825
  constructor() {
@@ -950,11 +865,11 @@ class ToastComponent {
950
865
  this.close();
951
866
  }
952
867
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
953
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: ToastComponent, isStandalone: false, selector: "abp-toast", inputs: { toast: "toast" }, outputs: { remove: "remove" }, ngImport: i0, template: "<div class=\"abp-toast\" [ngClass]=\"severityClass\" (click)=\"tap()\">\r\n <div class=\"abp-toast-icon\">\r\n <i class=\"bi icon\" [ngClass]=\"iconClass\" aria-hidden=\"true\"></i>\r\n </div>\r\n <div class=\"abp-toast-content\">\r\n @if (toast.options?.closable) {\r\n <button class=\"abp-toast-close-button\" (click)=\"close()\">\r\n <i class=\"bi bi-x fs-4\" aria-hidden=\"true\"></i>\r\n </button>\r\n }\r\n <div class=\"abp-toast-title\">\r\n {{ toast.title | abpLocalization: toast.options?.titleLocalizationParams }}\r\n </div>\r\n <p\r\n class=\"abp-toast-message\"\r\n [innerHTML]=\"toast.message | abpLocalization: toast.options?.messageLocalizationParams\"\r\n ></p>\r\n </div>\r\n</div>\r\n", styles: [".abp-toast{display:grid;grid-template-columns:35px 1fr;gap:5px;margin:5px 0;padding:7px;width:350px;-webkit-user-select:none;user-select:none;z-index:9999;color:#fff;border-radius:8px;font-size:14px;box-shadow:0 0 20px #4c577d05;border:2px solid #f0f0f0;background-color:#f0f0f0;color:#000;box-shadow:0 0 10px -5px #0006;opacity:1}.abp-toast:hover{border:2px solid #e4e4e4;background-color:#e4e4e4;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-success{border:2px solid #4fbf67;background-color:#4fbf67;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-success:hover{border:2px solid rgb(69.1,187.4,94.45);background-color:#45bb5e;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-info{border:2px solid #438aa7;background-color:#438aa7;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-info:hover{border:2px solid rgb(63.65,131.1,158.65);background-color:#40839f;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-warning{border:2px solid #ff9f38;background-color:#ff9f38;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-warning:hover{border:2px solid rgb(255,151.4984924623,40.45);background-color:#ff9728;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-error{border:2px solid #c00d49;background-color:#c00d49;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-error:hover{border:2px solid rgb(182.4,12.35,69.35);background-color:#b60c45;box-shadow:0 0 15px -5px #0006}.abp-toast .abp-toast-icon{display:flex;align-items:center;justify-content:center}.abp-toast .abp-toast-icon .icon{font-size:32px}.abp-toast .abp-toast-content{position:relative;display:flex;align-self:center;flex-direction:column;word-break:break-word;padding-bottom:2px}.abp-toast .abp-toast-content .abp-toast-close-button{position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:center;margin:0;padding:0 5px 0 0;width:25px;height:100%;border:none;border-radius:50%;background:transparent;color:inherit}.abp-toast .abp-toast-content .abp-toast-close-button:focus{outline:none}.abp-toast .abp-toast-content .abp-toast-title{margin:0;padding:0;font-size:1rem;font-weight:600}.abp-toast .abp-toast-content .abp-toast-message{margin:0;padding:0;max-width:240px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
868
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: ToastComponent, isStandalone: true, selector: "abp-toast", inputs: { toast: "toast" }, outputs: { remove: "remove" }, ngImport: i0, template: "<div class=\"abp-toast\" [ngClass]=\"severityClass\" (click)=\"tap()\">\r\n <div class=\"abp-toast-icon\">\r\n <i class=\"bi icon\" [ngClass]=\"iconClass\" aria-hidden=\"true\"></i>\r\n </div>\r\n <div class=\"abp-toast-content\">\r\n @if (toast.options?.closable) {\r\n <button class=\"abp-toast-close-button\" (click)=\"close()\">\r\n <i class=\"bi bi-x fs-4\" aria-hidden=\"true\"></i>\r\n </button>\r\n }\r\n <div class=\"abp-toast-title\">\r\n {{ toast.title | abpLocalization: toast.options?.titleLocalizationParams }}\r\n </div>\r\n <p\r\n class=\"abp-toast-message\"\r\n [innerHTML]=\"toast.message | abpLocalization: toast.options?.messageLocalizationParams\"\r\n ></p>\r\n </div>\r\n</div>\r\n", styles: [".abp-toast{display:grid;grid-template-columns:35px 1fr;gap:5px;margin:5px 0;padding:7px;width:350px;-webkit-user-select:none;user-select:none;z-index:9999;color:#fff;border-radius:8px;font-size:14px;box-shadow:0 0 20px #4c577d05;border:2px solid #f0f0f0;background-color:#f0f0f0;color:#000;box-shadow:0 0 10px -5px #0006;opacity:1}.abp-toast:hover{border:2px solid #e4e4e4;background-color:#e4e4e4;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-success{border:2px solid #4fbf67;background-color:#4fbf67;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-success:hover{border:2px solid rgb(69.1,187.4,94.45);background-color:#45bb5e;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-info{border:2px solid #438aa7;background-color:#438aa7;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-info:hover{border:2px solid rgb(63.65,131.1,158.65);background-color:#40839f;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-warning{border:2px solid #ff9f38;background-color:#ff9f38;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-warning:hover{border:2px solid rgb(255,151.4984924623,40.45);background-color:#ff9728;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-error{border:2px solid #c00d49;background-color:#c00d49;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-error:hover{border:2px solid rgb(182.4,12.35,69.35);background-color:#b60c45;box-shadow:0 0 15px -5px #0006}.abp-toast .abp-toast-icon{display:flex;align-items:center;justify-content:center}.abp-toast .abp-toast-icon .icon{font-size:32px}.abp-toast .abp-toast-content{position:relative;display:flex;align-self:center;flex-direction:column;word-break:break-word;padding-bottom:2px}.abp-toast .abp-toast-content .abp-toast-close-button{position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:center;margin:0;padding:0 5px 0 0;width:25px;height:100%;border:none;border-radius:50%;background:transparent;color:inherit}.abp-toast .abp-toast-content .abp-toast-close-button:focus{outline:none}.abp-toast .abp-toast-content .abp-toast-title{margin:0;padding:0;font-size:1rem;font-weight:600}.abp-toast .abp-toast-content .abp-toast-message{margin:0;padding:0;max-width:240px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
954
869
  }
955
870
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ToastComponent, decorators: [{
956
871
  type: Component,
957
- args: [{ standalone: false, selector: 'abp-toast', template: "<div class=\"abp-toast\" [ngClass]=\"severityClass\" (click)=\"tap()\">\r\n <div class=\"abp-toast-icon\">\r\n <i class=\"bi icon\" [ngClass]=\"iconClass\" aria-hidden=\"true\"></i>\r\n </div>\r\n <div class=\"abp-toast-content\">\r\n @if (toast.options?.closable) {\r\n <button class=\"abp-toast-close-button\" (click)=\"close()\">\r\n <i class=\"bi bi-x fs-4\" aria-hidden=\"true\"></i>\r\n </button>\r\n }\r\n <div class=\"abp-toast-title\">\r\n {{ toast.title | abpLocalization: toast.options?.titleLocalizationParams }}\r\n </div>\r\n <p\r\n class=\"abp-toast-message\"\r\n [innerHTML]=\"toast.message | abpLocalization: toast.options?.messageLocalizationParams\"\r\n ></p>\r\n </div>\r\n</div>\r\n", styles: [".abp-toast{display:grid;grid-template-columns:35px 1fr;gap:5px;margin:5px 0;padding:7px;width:350px;-webkit-user-select:none;user-select:none;z-index:9999;color:#fff;border-radius:8px;font-size:14px;box-shadow:0 0 20px #4c577d05;border:2px solid #f0f0f0;background-color:#f0f0f0;color:#000;box-shadow:0 0 10px -5px #0006;opacity:1}.abp-toast:hover{border:2px solid #e4e4e4;background-color:#e4e4e4;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-success{border:2px solid #4fbf67;background-color:#4fbf67;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-success:hover{border:2px solid rgb(69.1,187.4,94.45);background-color:#45bb5e;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-info{border:2px solid #438aa7;background-color:#438aa7;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-info:hover{border:2px solid rgb(63.65,131.1,158.65);background-color:#40839f;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-warning{border:2px solid #ff9f38;background-color:#ff9f38;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-warning:hover{border:2px solid rgb(255,151.4984924623,40.45);background-color:#ff9728;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-error{border:2px solid #c00d49;background-color:#c00d49;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-error:hover{border:2px solid rgb(182.4,12.35,69.35);background-color:#b60c45;box-shadow:0 0 15px -5px #0006}.abp-toast .abp-toast-icon{display:flex;align-items:center;justify-content:center}.abp-toast .abp-toast-icon .icon{font-size:32px}.abp-toast .abp-toast-content{position:relative;display:flex;align-self:center;flex-direction:column;word-break:break-word;padding-bottom:2px}.abp-toast .abp-toast-content .abp-toast-close-button{position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:center;margin:0;padding:0 5px 0 0;width:25px;height:100%;border:none;border-radius:50%;background:transparent;color:inherit}.abp-toast .abp-toast-content .abp-toast-close-button:focus{outline:none}.abp-toast .abp-toast-content .abp-toast-title{margin:0;padding:0;font-size:1rem;font-weight:600}.abp-toast .abp-toast-content .abp-toast-message{margin:0;padding:0;max-width:240px}\n"] }]
872
+ args: [{ selector: 'abp-toast', imports: [CommonModule, LocalizationPipe], template: "<div class=\"abp-toast\" [ngClass]=\"severityClass\" (click)=\"tap()\">\r\n <div class=\"abp-toast-icon\">\r\n <i class=\"bi icon\" [ngClass]=\"iconClass\" aria-hidden=\"true\"></i>\r\n </div>\r\n <div class=\"abp-toast-content\">\r\n @if (toast.options?.closable) {\r\n <button class=\"abp-toast-close-button\" (click)=\"close()\">\r\n <i class=\"bi bi-x fs-4\" aria-hidden=\"true\"></i>\r\n </button>\r\n }\r\n <div class=\"abp-toast-title\">\r\n {{ toast.title | abpLocalization: toast.options?.titleLocalizationParams }}\r\n </div>\r\n <p\r\n class=\"abp-toast-message\"\r\n [innerHTML]=\"toast.message | abpLocalization: toast.options?.messageLocalizationParams\"\r\n ></p>\r\n </div>\r\n</div>\r\n", styles: [".abp-toast{display:grid;grid-template-columns:35px 1fr;gap:5px;margin:5px 0;padding:7px;width:350px;-webkit-user-select:none;user-select:none;z-index:9999;color:#fff;border-radius:8px;font-size:14px;box-shadow:0 0 20px #4c577d05;border:2px solid #f0f0f0;background-color:#f0f0f0;color:#000;box-shadow:0 0 10px -5px #0006;opacity:1}.abp-toast:hover{border:2px solid #e4e4e4;background-color:#e4e4e4;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-success{border:2px solid #4fbf67;background-color:#4fbf67;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-success:hover{border:2px solid rgb(69.1,187.4,94.45);background-color:#45bb5e;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-info{border:2px solid #438aa7;background-color:#438aa7;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-info:hover{border:2px solid rgb(63.65,131.1,158.65);background-color:#40839f;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-warning{border:2px solid #ff9f38;background-color:#ff9f38;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-warning:hover{border:2px solid rgb(255,151.4984924623,40.45);background-color:#ff9728;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-error{border:2px solid #c00d49;background-color:#c00d49;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-error:hover{border:2px solid rgb(182.4,12.35,69.35);background-color:#b60c45;box-shadow:0 0 15px -5px #0006}.abp-toast .abp-toast-icon{display:flex;align-items:center;justify-content:center}.abp-toast .abp-toast-icon .icon{font-size:32px}.abp-toast .abp-toast-content{position:relative;display:flex;align-self:center;flex-direction:column;word-break:break-word;padding-bottom:2px}.abp-toast .abp-toast-content .abp-toast-close-button{position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:center;margin:0;padding:0 5px 0 0;width:25px;height:100%;border:none;border-radius:50%;background:transparent;color:inherit}.abp-toast .abp-toast-content .abp-toast-close-button:focus{outline:none}.abp-toast .abp-toast-content .abp-toast-title{margin:0;padding:0;font-size:1rem;font-weight:600}.abp-toast .abp-toast-content .abp-toast-message{margin:0;padding:0;max-width:240px}\n"] }]
958
873
  }], propDecorators: { toast: [{
959
874
  type: Input
960
875
  }], remove: [{
@@ -994,11 +909,11 @@ class ToastContainerComponent {
994
909
  return toast.options?.id;
995
910
  }
996
911
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ToastContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
997
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: ToastContainerComponent, isStandalone: false, selector: "abp-toast-container", inputs: { top: "top", right: "right", bottom: "bottom", left: "left", toastKey: "toastKey" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, ngImport: i0, template: "<div\r\n class=\"abp-toast-container\"\r\n [style.top]=\"top || 'auto'\"\r\n [style.right]=\"right || 'auto'\"\r\n [style.bottom]=\"bottom || 'auto'\"\r\n [style.left]=\"left || 'auto'\"\r\n [style.display]=\"toasts.length ? 'flex' : 'none'\"\r\n [@toastInOut]=\"toasts.length\"\r\n>\r\n @for (toast of toasts; track toast.options?.id) {\r\n <abp-toast\r\n [toast]=\"toast\"\r\n (remove)=\"remove($event)\"\r\n ></abp-toast>\r\n }\r\n</div>\r\n", styles: [".abp-toast-container{position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:350px;min-height:80px;z-index:1900}.abp-toast-container.new-on-top{flex-direction:column-reverse}@media only screen and (max-width: 768px){.abp-toast-container{min-width:100%}}\n"], dependencies: [{ kind: "component", type: ToastComponent, selector: "abp-toast", inputs: ["toast"], outputs: ["remove"] }], animations: [toastInOut] }); }
912
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: ToastContainerComponent, isStandalone: true, selector: "abp-toast-container", inputs: { top: "top", right: "right", bottom: "bottom", left: "left", toastKey: "toastKey" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, ngImport: i0, template: "<div\r\n class=\"abp-toast-container\"\r\n [style.top]=\"top || 'auto'\"\r\n [style.right]=\"right || 'auto'\"\r\n [style.bottom]=\"bottom || 'auto'\"\r\n [style.left]=\"left || 'auto'\"\r\n [style.display]=\"toasts.length ? 'flex' : 'none'\"\r\n [@toastInOut]=\"toasts.length\"\r\n>\r\n @for (toast of toasts; track toast.options?.id) {\r\n <abp-toast\r\n [toast]=\"toast\"\r\n (remove)=\"remove($event)\"\r\n ></abp-toast>\r\n }\r\n</div>\r\n", styles: [".abp-toast-container{position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:350px;min-height:80px;z-index:1900}.abp-toast-container.new-on-top{flex-direction:column-reverse}@media only screen and (max-width: 768px){.abp-toast-container{min-width:100%}}\n"], dependencies: [{ kind: "component", type: ToastComponent, selector: "abp-toast", inputs: ["toast"], outputs: ["remove"] }], animations: [toastInOut] }); }
998
913
  }
999
914
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ToastContainerComponent, decorators: [{
1000
915
  type: Component,
1001
- args: [{ standalone: false, selector: 'abp-toast-container', animations: [toastInOut], template: "<div\r\n class=\"abp-toast-container\"\r\n [style.top]=\"top || 'auto'\"\r\n [style.right]=\"right || 'auto'\"\r\n [style.bottom]=\"bottom || 'auto'\"\r\n [style.left]=\"left || 'auto'\"\r\n [style.display]=\"toasts.length ? 'flex' : 'none'\"\r\n [@toastInOut]=\"toasts.length\"\r\n>\r\n @for (toast of toasts; track toast.options?.id) {\r\n <abp-toast\r\n [toast]=\"toast\"\r\n (remove)=\"remove($event)\"\r\n ></abp-toast>\r\n }\r\n</div>\r\n", styles: [".abp-toast-container{position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:350px;min-height:80px;z-index:1900}.abp-toast-container.new-on-top{flex-direction:column-reverse}@media only screen and (max-width: 768px){.abp-toast-container{min-width:100%}}\n"] }]
916
+ args: [{ selector: 'abp-toast-container', animations: [toastInOut], imports: [ToastComponent], template: "<div\r\n class=\"abp-toast-container\"\r\n [style.top]=\"top || 'auto'\"\r\n [style.right]=\"right || 'auto'\"\r\n [style.bottom]=\"bottom || 'auto'\"\r\n [style.left]=\"left || 'auto'\"\r\n [style.display]=\"toasts.length ? 'flex' : 'none'\"\r\n [@toastInOut]=\"toasts.length\"\r\n>\r\n @for (toast of toasts; track toast.options?.id) {\r\n <abp-toast\r\n [toast]=\"toast\"\r\n (remove)=\"remove($event)\"\r\n ></abp-toast>\r\n }\r\n</div>\r\n", styles: [".abp-toast-container{position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:350px;min-height:80px;z-index:1900}.abp-toast-container.new-on-top{flex-direction:column-reverse}@media only screen and (max-width: 768px){.abp-toast-container{min-width:100%}}\n"] }]
1002
917
  }], propDecorators: { top: [{
1003
918
  type: Input
1004
919
  }], right: [{
@@ -1014,1760 +929,1835 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
1014
929
  args: ['window:resize', ['$event']]
1015
930
  }] } });
1016
931
 
1017
- /**
1018
- * @deprecated use ShowPasswordDirective directive
1019
- * https://abp.io/docs/latest/framework/ui/angular/show-password-directive
1020
- */
1021
- class PasswordComponent extends AbstractNgModelComponent {
1022
- toggleFieldTextType() {
1023
- this.fieldTextType = !this.fieldTextType;
932
+ class ToasterService {
933
+ setContainer() {
934
+ this.containerComponentRef = this.contentProjectionService.projectContent(PROJECTION_STRATEGY.AppendComponentToBody(ToastContainerComponent, {
935
+ toasts$: this.toasts$,
936
+ remove: this.remove,
937
+ }));
938
+ this.containerComponentRef.changeDetectorRef.detectChanges();
1024
939
  }
1025
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: PasswordComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1026
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: PasswordComponent, isStandalone: true, selector: "abp-password", inputs: { inputId: "inputId", formControlName: "formControlName" }, providers: [
1027
- {
1028
- provide: NG_VALUE_ACCESSOR,
1029
- useExisting: forwardRef(() => PasswordComponent),
1030
- multi: true,
1031
- },
1032
- ], usesInheritance: true, ngImport: i0, template: "<div class=\"input-group\" validationTarget>\r\n <input\r\n [type]=\"fieldTextType ? 'text' : 'password'\"\r\n class=\"form-control\"\r\n [id]=\"inputId\"\r\n [(ngModel)]=\"value\"\r\n />\r\n\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"toggleFieldTextType()\">\r\n <i\r\n class=\"fa\"\r\n aria-hidden=\"true\"\r\n [ngClass]=\"{\r\n 'fa-eye-slash': !fieldTextType,\r\n 'fa-eye': fieldTextType\r\n }\"\r\n ></i>\r\n </button>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
1033
- }
1034
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: PasswordComponent, decorators: [{
1035
- type: Component,
1036
- args: [{ selector: 'abp-password', imports: [CommonModule, FormsModule], providers: [
1037
- {
1038
- provide: NG_VALUE_ACCESSOR,
1039
- useExisting: forwardRef(() => PasswordComponent),
1040
- multi: true,
1041
- },
1042
- ], template: "<div class=\"input-group\" validationTarget>\r\n <input\r\n [type]=\"fieldTextType ? 'text' : 'password'\"\r\n class=\"form-control\"\r\n [id]=\"inputId\"\r\n [(ngModel)]=\"value\"\r\n />\r\n\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"toggleFieldTextType()\">\r\n <i\r\n class=\"fa\"\r\n aria-hidden=\"true\"\r\n [ngClass]=\"{\r\n 'fa-eye-slash': !fieldTextType,\r\n 'fa-eye': fieldTextType\r\n }\"\r\n ></i>\r\n </button>\r\n</div>\r\n" }]
1043
- }], propDecorators: { inputId: [{
1044
- type: Input
1045
- }], formControlName: [{
1046
- type: Input
1047
- }] } });
1048
-
1049
- class CardBodyComponent {
1050
940
  constructor() {
1051
- this.componentClass = 'card-body';
941
+ this.toasts$ = new ReplaySubject(1);
942
+ this.lastId = -1;
943
+ this.toasts = [];
944
+ /**
945
+ * Removes the toast with given id.
946
+ * @param id ID of the toast to be removed.
947
+ */
948
+ this.remove = (id) => {
949
+ this.toasts = this.toasts.filter(toast => toast.options?.id !== id);
950
+ this.toasts$.next(this.toasts);
951
+ };
952
+ this.contentProjectionService = inject(ContentProjectionService);
1052
953
  }
1053
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1054
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: CardBodyComponent, isStandalone: false, selector: "abp-card-body", inputs: { cardBodyClass: "cardBodyClass", cardBodyStyle: "cardBodyStyle" }, host: { properties: { "class": "this.componentClass" } }, ngImport: i0, template: ` <div [ngClass]="cardBodyClass" [ngStyle]="cardBodyStyle">
1055
- <ng-content></ng-content>
1056
- </div>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
1057
- }
1058
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardBodyComponent, decorators: [{
1059
- type: Component,
1060
- args: [{
1061
- standalone: false,
1062
- selector: 'abp-card-body',
1063
- template: ` <div [ngClass]="cardBodyClass" [ngStyle]="cardBodyStyle">
1064
- <ng-content></ng-content>
1065
- </div>`,
1066
- }]
1067
- }], propDecorators: { componentClass: [{
1068
- type: HostBinding,
1069
- args: ['class']
1070
- }], cardBodyClass: [{
1071
- type: Input
1072
- }], cardBodyStyle: [{
1073
- type: Input
1074
- }] } });
1075
-
1076
- class CardComponent {
1077
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1078
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: CardComponent, isStandalone: false, selector: "abp-card", inputs: { cardClass: "cardClass", cardStyle: "cardStyle" }, ngImport: i0, template: ` <div class="card" [ngClass]="cardClass" [ngStyle]="cardStyle">
1079
- <ng-content></ng-content>
1080
- </div>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
1081
- }
1082
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardComponent, decorators: [{
1083
- type: Component,
1084
- args: [{
1085
- standalone: false,
1086
- selector: 'abp-card',
1087
- template: ` <div class="card" [ngClass]="cardClass" [ngStyle]="cardStyle">
1088
- <ng-content></ng-content>
1089
- </div>`,
1090
- }]
1091
- }], propDecorators: { cardClass: [{
1092
- type: Input
1093
- }], cardStyle: [{
1094
- type: Input
1095
- }] } });
1096
-
1097
- class CardHeaderComponent {
1098
- constructor() {
1099
- this.componentClass = 'card-header';
954
+ /**
955
+ * Creates an info toast with given parameters.
956
+ * @param message Content of the toast
957
+ * @param title Title of the toast
958
+ * @param options Spesific style or structural options for individual toast
959
+ */
960
+ info(message, title, options) {
961
+ return this.show(message, title, 'info', options);
1100
962
  }
1101
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1102
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: CardHeaderComponent, isStandalone: false, selector: "abp-card-header", inputs: { cardHeaderClass: "cardHeaderClass", cardHeaderStyle: "cardHeaderStyle" }, host: { properties: { "class": "this.componentClass" } }, ngImport: i0, template: `
1103
- <div [ngClass]="cardHeaderClass" [ngStyle]="cardHeaderStyle">
1104
- <ng-content></ng-content>
1105
- </div>
1106
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
1107
- }
1108
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardHeaderComponent, decorators: [{
1109
- type: Component,
1110
- args: [{ standalone: false, selector: 'abp-card-header', template: `
1111
- <div [ngClass]="cardHeaderClass" [ngStyle]="cardHeaderStyle">
1112
- <ng-content></ng-content>
1113
- </div>
1114
- ` }]
1115
- }], propDecorators: { componentClass: [{
1116
- type: HostBinding,
1117
- args: ['class']
1118
- }], cardHeaderClass: [{
1119
- type: Input
1120
- }], cardHeaderStyle: [{
1121
- type: Input
1122
- }] } });
1123
-
1124
- class CardFooterComponent {
1125
- constructor() {
1126
- this.componentClass = 'card-footer';
963
+ /**
964
+ * Creates a success toast with given parameters.
965
+ * @param message Content of the toast
966
+ * @param title Title of the toast
967
+ * @param options Spesific style or structural options for individual toast
968
+ */
969
+ success(message, title, options) {
970
+ return this.show(message, title, 'success', options);
1127
971
  }
1128
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1129
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: CardFooterComponent, isStandalone: false, selector: "abp-card-footer", inputs: { cardFooterStyle: "cardFooterStyle", cardFooterClass: "cardFooterClass" }, host: { properties: { "class": "this.componentClass" } }, ngImport: i0, template: `
1130
- <div [ngStyle]="cardFooterStyle" [ngClass]="cardFooterClass">
1131
- <ng-content></ng-content>
1132
- </div>
1133
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
1134
- }
1135
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardFooterComponent, decorators: [{
1136
- type: Component,
1137
- args: [{ standalone: false, selector: 'abp-card-footer', template: `
1138
- <div [ngStyle]="cardFooterStyle" [ngClass]="cardFooterClass">
1139
- <ng-content></ng-content>
1140
- </div>
1141
- ` }]
1142
- }], propDecorators: { componentClass: [{
1143
- type: HostBinding,
1144
- args: ['class']
1145
- }], cardFooterStyle: [{
1146
- type: Input
1147
- }], cardFooterClass: [{
1148
- type: Input
1149
- }] } });
1150
-
1151
- class CardTitleDirective {
1152
- constructor() {
1153
- this.directiveClass = 'card-title';
972
+ /**
973
+ * Creates a warning toast with given parameters.
974
+ * @param message Content of the toast
975
+ * @param title Title of the toast
976
+ * @param options Spesific style or structural options for individual toast
977
+ */
978
+ warn(message, title, options) {
979
+ return this.show(message, title, 'warning', options);
1154
980
  }
1155
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1156
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: CardTitleDirective, isStandalone: false, selector: "abp-card-title, [abp-card-title], [abpCardTitle]", host: { properties: { "class": "this.directiveClass" } }, ngImport: i0 }); }
1157
- }
1158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardTitleDirective, decorators: [{
1159
- type: Directive,
1160
- args: [{
1161
- standalone: false,
1162
- selector: `abp-card-title, [abp-card-title], [abpCardTitle]`,
1163
- }]
1164
- }], propDecorators: { directiveClass: [{
1165
- type: HostBinding,
1166
- args: ['class']
1167
- }] } });
1168
-
1169
- class CardSubtitleDirective {
1170
- constructor() {
1171
- this.directiveClass = 'card-subtitle';
981
+ /**
982
+ * Creates an error toast with given parameters.
983
+ * @param message Content of the toast
984
+ * @param title Title of the toast
985
+ * @param options Spesific style or structural options for individual toast
986
+ */
987
+ error(message, title, options) {
988
+ return this.show(message, title, 'error', options);
1172
989
  }
1173
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardSubtitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1174
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: CardSubtitleDirective, isStandalone: false, selector: "abp-card-subtitle, [abp-card-subtitle], [abpCardSubtitle]", host: { properties: { "class": "this.directiveClass" } }, ngImport: i0 }); }
990
+ /**
991
+ * Creates a toast with given parameters.
992
+ * @param message Content of the toast
993
+ * @param title Title of the toast
994
+ * @param severity Sets color of the toast. "success", "warning" etc.
995
+ * @param options Spesific style or structural options for individual toast
996
+ */
997
+ show(message, title = undefined, severity = 'neutral', options = {}) {
998
+ if (!this.containerComponentRef)
999
+ this.setContainer();
1000
+ const id = ++this.lastId;
1001
+ this.toasts.push({
1002
+ message,
1003
+ title,
1004
+ severity,
1005
+ options: { closable: true, id, ...options },
1006
+ });
1007
+ this.toasts$.next(this.toasts);
1008
+ return id;
1009
+ }
1010
+ /**
1011
+ * Removes all open toasts at once.
1012
+ */
1013
+ clear(containerKey) {
1014
+ this.toasts = !containerKey
1015
+ ? []
1016
+ : this.toasts.filter(toast => toast.options?.containerKey !== containerKey);
1017
+ this.toasts$.next(this.toasts);
1018
+ }
1019
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ToasterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1020
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ToasterService, providedIn: 'root' }); }
1175
1021
  }
1176
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardSubtitleDirective, decorators: [{
1177
- type: Directive,
1022
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ToasterService, decorators: [{
1023
+ type: Injectable,
1178
1024
  args: [{
1179
- standalone: false,
1180
- selector: `abp-card-subtitle, [abp-card-subtitle], [abpCardSubtitle]`,
1025
+ providedIn: 'root',
1181
1026
  }]
1182
- }], propDecorators: { directiveClass: [{
1183
- type: HostBinding,
1184
- args: ['class']
1185
- }] } });
1027
+ }], ctorParameters: () => [] });
1186
1028
 
1187
- class CardImgTopDirective {
1029
+ class UserMenuService extends AbstractMenuService {
1188
1030
  constructor() {
1189
- this.directiveClass = 'card-img-top';
1031
+ super(...arguments);
1032
+ this.baseClass = UserMenu;
1190
1033
  }
1191
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardImgTopDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1192
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: CardImgTopDirective, isStandalone: false, selector: "abp-card-img-top, [abp-card-img-top], [abpCardImgTop]", host: { properties: { "class": "this.directiveClass" } }, ngImport: i0 }); }
1034
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: UserMenuService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1035
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: UserMenuService, providedIn: 'root' }); }
1193
1036
  }
1194
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardImgTopDirective, decorators: [{
1195
- type: Directive,
1196
- args: [{
1197
- standalone: false,
1198
- selector: `abp-card-img-top, [abp-card-img-top], [abpCardImgTop]`,
1199
- }]
1200
- }], propDecorators: { directiveClass: [{
1201
- type: HostBinding,
1202
- args: ['class']
1203
- }] } });
1037
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: UserMenuService, decorators: [{
1038
+ type: Injectable,
1039
+ args: [{ providedIn: 'root' }]
1040
+ }] });
1204
1041
 
1205
- class CardHeaderDirective {
1042
+ const HTTP_ERROR_CONFIG = new InjectionToken('HTTP_ERROR_CONFIG');
1043
+ /**
1044
+ @deprecated use **`CUSTOM_ERROR_HANDLERS`** injection token instead of this, see more info https://abp.io/docs/latest/framework/ui/angular/http-requests
1045
+ */
1046
+ const HTTP_ERROR_HANDLER = new InjectionToken('HTTP_ERROR_HANDLER');
1047
+ const CUSTOM_ERROR_HANDLERS = new InjectionToken('CUSTOM_ERROR_HANDLERS');
1048
+
1049
+ class CreateErrorComponentService {
1206
1050
  constructor() {
1207
- this.directiveClass = 'card-header';
1051
+ this.document = inject(DOCUMENT);
1052
+ this.rendererFactory = inject(RendererFactory2);
1053
+ this.routerEvents = inject(RouterEvents);
1054
+ this.injector = inject(Injector);
1055
+ this.envInjector = inject(EnvironmentInjector);
1056
+ this.httpErrorConfig = inject(HTTP_ERROR_CONFIG);
1057
+ this.componentRef = null;
1058
+ this.listenToRouterDataResolved();
1208
1059
  }
1209
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1210
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: CardHeaderDirective, isStandalone: false, selector: "abp-card-header, [abp-card-header], [abpCardHeader]", host: { properties: { "class": "this.directiveClass" } }, ngImport: i0 }); }
1211
- }
1212
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardHeaderDirective, decorators: [{
1213
- type: Directive,
1214
- args: [{
1215
- standalone: false,
1216
- selector: `abp-card-header, [abp-card-header], [abpCardHeader]`,
1217
- }]
1218
- }], propDecorators: { directiveClass: [{
1219
- type: HostBinding,
1220
- args: ['class']
1221
- }] } });
1060
+ listenToRouterDataResolved() {
1061
+ this.routerEvents
1062
+ .getEvents(ResolveEnd)
1063
+ .pipe(filter(() => !!this.componentRef))
1064
+ .subscribe(() => {
1065
+ this.componentRef?.destroy();
1066
+ this.componentRef = null;
1067
+ });
1068
+ }
1069
+ getErrorHostElement() {
1070
+ return this.document.body;
1071
+ }
1072
+ isCloseIconHidden() {
1073
+ return !!this.httpErrorConfig?.errorScreen?.hideCloseIcon;
1074
+ }
1075
+ canCreateCustomError(status) {
1076
+ const { component, forWhichErrors } = this.httpErrorConfig?.errorScreen || {};
1077
+ if (!component || !forWhichErrors) {
1078
+ return false;
1079
+ }
1080
+ return forWhichErrors.indexOf(status) > -1;
1081
+ }
1082
+ execute(instance) {
1083
+ const renderer = this.rendererFactory.createRenderer(null, null);
1084
+ const hostElement = this.getErrorHostElement();
1085
+ const host = renderer.selectRootElement(hostElement, true);
1086
+ this.componentRef = createComponent(HttpErrorWrapperComponent, {
1087
+ environmentInjector: this.envInjector,
1088
+ });
1089
+ for (const key in instance) {
1090
+ /* istanbul ignore else */
1091
+ if (Object.prototype.hasOwnProperty.call(this.componentRef.instance, key)) {
1092
+ this.componentRef.instance[key] = instance[key];
1093
+ }
1094
+ }
1095
+ this.componentRef.instance.hideCloseIcon = this.isCloseIconHidden();
1096
+ const appRef = this.injector.get(ApplicationRef);
1097
+ if (this.canCreateCustomError(instance.status)) {
1098
+ this.componentRef.instance.appRef = appRef;
1099
+ this.componentRef.instance.environmentInjector = this.envInjector;
1100
+ this.componentRef.instance.customComponent = this.httpErrorConfig.errorScreen?.component;
1101
+ }
1102
+ appRef.attachView(this.componentRef.hostView);
1103
+ renderer.appendChild(host, this.componentRef.hostView.rootNodes[0]);
1104
+ const destroy$ = new Subject();
1105
+ this.componentRef.instance.destroy$ = destroy$;
1106
+ destroy$.subscribe(() => {
1107
+ this.componentRef?.destroy();
1108
+ this.componentRef = null;
1109
+ });
1110
+ }
1111
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CreateErrorComponentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1112
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CreateErrorComponentService, providedIn: 'root' }); }
1113
+ }
1114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CreateErrorComponentService, decorators: [{
1115
+ type: Injectable,
1116
+ args: [{ providedIn: 'root' }]
1117
+ }], ctorParameters: () => [] });
1222
1118
 
1223
- const declarationsWithExports$1 = [
1224
- CardComponent,
1225
- CardBodyComponent,
1226
- CardHeaderComponent,
1227
- CardFooterComponent,
1228
- CardTitleDirective,
1229
- CardSubtitleDirective,
1230
- CardImgTopDirective,
1231
- CardHeaderDirective,
1232
- ];
1233
- class CardModule {
1234
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1235
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.8", ngImport: i0, type: CardModule, declarations: [CardComponent,
1236
- CardBodyComponent,
1237
- CardHeaderComponent,
1238
- CardFooterComponent,
1239
- CardTitleDirective,
1240
- CardSubtitleDirective,
1241
- CardImgTopDirective,
1242
- CardHeaderDirective], imports: [CommonModule], exports: [CardComponent,
1243
- CardBodyComponent,
1244
- CardHeaderComponent,
1245
- CardFooterComponent,
1246
- CardTitleDirective,
1247
- CardSubtitleDirective,
1248
- CardImgTopDirective,
1249
- CardHeaderDirective] }); }
1250
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardModule, imports: [CommonModule] }); }
1119
+ const DEFAULT_ERROR_MESSAGES = {
1120
+ defaultError: {
1121
+ title: 'An error has occurred!',
1122
+ details: 'Error detail not sent by server.',
1123
+ },
1124
+ defaultError401: {
1125
+ title: 'You are not authenticated!',
1126
+ details: 'You should be authenticated (sign in) in order to perform this operation.',
1127
+ },
1128
+ defaultError403: {
1129
+ title: 'You are not authorized!',
1130
+ details: 'You are not allowed to perform this operation.',
1131
+ },
1132
+ defaultError404: {
1133
+ title: 'Resource not found!',
1134
+ details: 'The resource requested could not found on the server.',
1135
+ },
1136
+ defaultError500: {
1137
+ title: 'Internal server error',
1138
+ details: 'Error detail not sent by server.',
1139
+ },
1140
+ };
1141
+ const DEFAULT_ERROR_LOCALIZATIONS = {
1142
+ defaultError: {
1143
+ title: 'AbpUi::DefaultErrorMessage',
1144
+ details: 'AbpUi::DefaultErrorMessageDetail',
1145
+ },
1146
+ defaultError401: {
1147
+ title: 'AbpUi::DefaultErrorMessage401',
1148
+ details: 'AbpUi::DefaultErrorMessage401Detail',
1149
+ },
1150
+ defaultError403: {
1151
+ title: 'AbpUi::DefaultErrorMessage403',
1152
+ details: 'AbpUi::DefaultErrorMessage403Detail',
1153
+ },
1154
+ defaultError404: {
1155
+ title: 'AbpUi::DefaultErrorMessage404',
1156
+ details: 'AbpUi::DefaultErrorMessage404Detail',
1157
+ },
1158
+ defaultError500: {
1159
+ title: 'AbpUi::500Message',
1160
+ details: 'AbpUi::DefaultErrorMessage',
1161
+ },
1162
+ };
1163
+ const CUSTOM_HTTP_ERROR_HANDLER_PRIORITY = Object.freeze({
1164
+ veryLow: -99,
1165
+ low: -9,
1166
+ normal: 0,
1167
+ high: 9,
1168
+ veryHigh: 99,
1169
+ });
1170
+ const HTTP_ERROR_STATUS = {
1171
+ '401': 'AbpUi::401Message',
1172
+ '403': 'AbpUi::403Message',
1173
+ '404': 'AbpUi::404Message',
1174
+ '500': 'AbpUi::500Message',
1175
+ };
1176
+ const HTTP_ERROR_DETAIL = {
1177
+ '401': 'AbpUi::DefaultErrorMessage401Detail',
1178
+ '403': 'AbpUi::DefaultErrorMessage403Detail',
1179
+ '404': 'AbpUi::DefaultErrorMessage404Detail',
1180
+ '500': 'AbpUi::DefaultErrorMessage',
1181
+ };
1182
+
1183
+ function getErrorFromRequestBody(body) {
1184
+ let message;
1185
+ let title;
1186
+ if (body.details) {
1187
+ message = body.details;
1188
+ title = body.message;
1189
+ }
1190
+ else if (body.message) {
1191
+ title = {
1192
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
1193
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
1194
+ };
1195
+ message = body.message;
1196
+ }
1197
+ else {
1198
+ message = {
1199
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
1200
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
1201
+ };
1202
+ title = '';
1203
+ }
1204
+ return { message, title };
1251
1205
  }
1252
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardModule, decorators: [{
1253
- type: NgModule,
1254
- args: [{
1255
- declarations: [...declarationsWithExports$1],
1256
- imports: [CommonModule],
1257
- exports: [...declarationsWithExports$1],
1258
- }]
1206
+
1207
+ class AbpFormatErrorHandlerService {
1208
+ constructor() {
1209
+ this.priority = CUSTOM_HTTP_ERROR_HANDLER_PRIORITY.high;
1210
+ this.confirmationService = inject(ConfirmationService);
1211
+ this.authService = inject(AuthService);
1212
+ this.error = undefined;
1213
+ }
1214
+ navigateToLogin() {
1215
+ return this.authService.navigateToLogin();
1216
+ }
1217
+ canHandle(error) {
1218
+ if (error instanceof HttpErrorResponse && error.headers.get('_AbpErrorFormat')) {
1219
+ this.error = error;
1220
+ return true;
1221
+ }
1222
+ return false;
1223
+ }
1224
+ execute() {
1225
+ const { message, title } = getErrorFromRequestBody(this.error?.error?.error);
1226
+ this.confirmationService
1227
+ .error(message, title, {
1228
+ hideCancelBtn: true,
1229
+ yesText: 'AbpAccount::Close',
1230
+ })
1231
+ .subscribe(() => {
1232
+ if (this.error?.status === 401) {
1233
+ this.navigateToLogin();
1234
+ }
1235
+ });
1236
+ }
1237
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AbpFormatErrorHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1238
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AbpFormatErrorHandlerService, providedIn: 'root' }); }
1239
+ }
1240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AbpFormatErrorHandlerService, decorators: [{
1241
+ type: Injectable,
1242
+ args: [{ providedIn: 'root' }]
1259
1243
  }] });
1260
1244
 
1261
- class FormCheckboxComponent extends AbstractNgModelComponent {
1245
+ class TenantResolveErrorHandlerService {
1262
1246
  constructor() {
1263
- super(...arguments);
1264
- this.labelClass = 'form-check-label';
1265
- this.checkboxClass = 'form-check-input';
1266
- this.checkboxReadonly = false;
1267
- this.checkboxBlur = new EventEmitter();
1268
- this.checkboxFocus = new EventEmitter();
1247
+ this.sessionService = inject(SessionStateService);
1248
+ this.priority = CUSTOM_HTTP_ERROR_HANDLER_PRIORITY.high;
1249
+ this.authService = inject(AuthService);
1269
1250
  }
1270
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: FormCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1271
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: FormCheckboxComponent, isStandalone: false, selector: "abp-checkbox", inputs: { label: "label", labelClass: "labelClass", checkboxId: "checkboxId", checkboxStyle: "checkboxStyle", checkboxClass: "checkboxClass", checkboxReadonly: "checkboxReadonly" }, outputs: { checkboxBlur: "checkboxBlur", checkboxFocus: "checkboxFocus" }, providers: [
1272
- {
1273
- provide: NG_VALUE_ACCESSOR,
1274
- useExisting: forwardRef(() => FormCheckboxComponent),
1275
- multi: true,
1276
- },
1277
- ], usesInheritance: true, ngImport: i0, template: `
1278
- <div class="mb-3">
1279
- <input
1280
- type="checkbox"
1281
- [(ngModel)]="value"
1282
- [id]="checkboxId"
1283
- [readonly]="checkboxReadonly"
1284
- [ngClass]="checkboxClass"
1285
- [ngStyle]="checkboxStyle"
1286
- (blur)="checkboxBlur.next()"
1287
- (focus)="checkboxFocus.next()"
1288
- />
1289
- @if (label) {
1290
- <label [ngClass]="labelClass" [for]="checkboxId">
1291
- {{ label | abpLocalization }}
1292
- </label>
1293
- }
1294
- </div>
1295
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
1251
+ isTenantResolveError(error) {
1252
+ return error instanceof HttpErrorResponse && !!error.headers.get('Abp-Tenant-Resolve-Error');
1253
+ }
1254
+ canHandle(error) {
1255
+ return this.isTenantResolveError(error);
1256
+ }
1257
+ execute() {
1258
+ this.sessionService.setTenant(null);
1259
+ this.authService.logout().subscribe();
1260
+ }
1261
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: TenantResolveErrorHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1262
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: TenantResolveErrorHandlerService, providedIn: 'root' }); }
1296
1263
  }
1297
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: FormCheckboxComponent, decorators: [{
1298
- type: Component,
1299
- args: [{
1300
- standalone: false,
1301
- selector: 'abp-checkbox',
1302
- template: `
1303
- <div class="mb-3">
1304
- <input
1305
- type="checkbox"
1306
- [(ngModel)]="value"
1307
- [id]="checkboxId"
1308
- [readonly]="checkboxReadonly"
1309
- [ngClass]="checkboxClass"
1310
- [ngStyle]="checkboxStyle"
1311
- (blur)="checkboxBlur.next()"
1312
- (focus)="checkboxFocus.next()"
1313
- />
1314
- @if (label) {
1315
- <label [ngClass]="labelClass" [for]="checkboxId">
1316
- {{ label | abpLocalization }}
1317
- </label>
1318
- }
1319
- </div>
1320
- `,
1321
- providers: [
1322
- {
1323
- provide: NG_VALUE_ACCESSOR,
1324
- useExisting: forwardRef(() => FormCheckboxComponent),
1325
- multi: true,
1326
- },
1327
- ],
1328
- }]
1329
- }], propDecorators: { label: [{
1330
- type: Input
1331
- }], labelClass: [{
1332
- type: Input
1333
- }], checkboxId: [{
1334
- type: Input
1335
- }], checkboxStyle: [{
1336
- type: Input
1337
- }], checkboxClass: [{
1338
- type: Input
1339
- }], checkboxReadonly: [{
1340
- type: Input
1341
- }], checkboxBlur: [{
1342
- type: Output
1343
- }], checkboxFocus: [{
1344
- type: Output
1345
- }] } });
1264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: TenantResolveErrorHandlerService, decorators: [{
1265
+ type: Injectable,
1266
+ args: [{ providedIn: 'root' }]
1267
+ }] });
1346
1268
 
1347
- class FormInputComponent extends AbstractNgModelComponent {
1269
+ class StatusCodeErrorHandlerService {
1348
1270
  constructor() {
1349
- super(...arguments);
1350
- this.inputReadonly = false;
1351
- this.label = '';
1352
- this.labelClass = 'form-label';
1353
- this.inputPlaceholder = '';
1354
- this.inputClass = 'form-control';
1355
- this.formBlur = new EventEmitter();
1356
- this.formFocus = new EventEmitter();
1271
+ this.confirmationService = inject(ConfirmationService);
1272
+ this.createErrorComponentService = inject(CreateErrorComponentService);
1273
+ this.authService = inject(AuthService);
1274
+ this.handledStatusCodes = [401, 403, 404, 500];
1275
+ this.priority = CUSTOM_HTTP_ERROR_HANDLER_PRIORITY.normal;
1357
1276
  }
1358
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: FormInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1359
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: FormInputComponent, isStandalone: false, selector: "abp-form-input", inputs: { inputId: "inputId", inputReadonly: "inputReadonly", label: "label", labelClass: "labelClass", inputPlaceholder: "inputPlaceholder", inputStyle: "inputStyle", inputClass: "inputClass" }, outputs: { formBlur: "formBlur", formFocus: "formFocus" }, providers: [
1360
- {
1361
- provide: NG_VALUE_ACCESSOR,
1362
- useExisting: forwardRef(() => FormInputComponent),
1363
- multi: true,
1277
+ navigateToLogin() {
1278
+ this.authService.navigateToLogin();
1279
+ }
1280
+ showConfirmation(message, title) {
1281
+ return this.confirmationService.error(message, title, {
1282
+ hideCancelBtn: true,
1283
+ yesText: 'AbpAccount::Close',
1284
+ });
1285
+ }
1286
+ showPage() {
1287
+ const key = `defaultError${this.status}`;
1288
+ const shouldRemoveDetail = [401, 404].indexOf(this.status) > -1;
1289
+ const instance = {
1290
+ title: {
1291
+ key: DEFAULT_ERROR_LOCALIZATIONS[key]?.title,
1292
+ defaultValue: DEFAULT_ERROR_MESSAGES[key]?.title,
1364
1293
  },
1365
- ], usesInheritance: true, ngImport: i0, template: `
1366
- <div class="mb-3">
1367
- @if (label) {
1368
- <label [ngClass]="labelClass" [for]="inputId">
1369
- {{ label | abpLocalization }}
1370
- </label>
1371
- }
1372
- <input
1373
- type="text"
1374
- [id]="inputId"
1375
- [placeholder]="inputPlaceholder"
1376
- [readonly]="inputReadonly"
1377
- [ngClass]="inputClass"
1378
- [ngStyle]="inputStyle"
1379
- (blur)="formBlur.next()"
1380
- (focus)="formFocus.next()"
1381
- [(ngModel)]="value"
1382
- />
1383
- </div>
1384
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
1294
+ details: {
1295
+ key: DEFAULT_ERROR_LOCALIZATIONS[key]?.details,
1296
+ defaultValue: DEFAULT_ERROR_MESSAGES[key]?.details,
1297
+ },
1298
+ status: this.status,
1299
+ };
1300
+ if (shouldRemoveDetail) {
1301
+ delete instance.details;
1302
+ }
1303
+ this.createErrorComponentService.execute(instance);
1304
+ }
1305
+ canHandle(error) {
1306
+ this.status = error?.status || 0;
1307
+ return this.handledStatusCodes.indexOf(this.status) > -1;
1308
+ }
1309
+ execute() {
1310
+ const key = `defaultError${this.status}`;
1311
+ const title = {
1312
+ key: DEFAULT_ERROR_LOCALIZATIONS[key]?.title,
1313
+ defaultValue: DEFAULT_ERROR_MESSAGES[key]?.title,
1314
+ };
1315
+ const message = {
1316
+ key: DEFAULT_ERROR_LOCALIZATIONS[key]?.details,
1317
+ defaultValue: DEFAULT_ERROR_MESSAGES[key]?.details,
1318
+ };
1319
+ const canCreateCustomError = this.createErrorComponentService.canCreateCustomError(this.status);
1320
+ switch (this.status) {
1321
+ case 401:
1322
+ case 404:
1323
+ if (canCreateCustomError) {
1324
+ this.showPage();
1325
+ break;
1326
+ }
1327
+ if (this.status === 401) {
1328
+ this.authService.navigateToLogin();
1329
+ break;
1330
+ }
1331
+ this.showConfirmation(title, message).subscribe();
1332
+ break;
1333
+ case 403:
1334
+ case 500:
1335
+ this.showPage();
1336
+ break;
1337
+ }
1338
+ }
1339
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: StatusCodeErrorHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1340
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: StatusCodeErrorHandlerService, providedIn: 'root' }); }
1385
1341
  }
1386
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: FormInputComponent, decorators: [{
1387
- type: Component,
1388
- args: [{
1389
- standalone: false,
1390
- selector: 'abp-form-input',
1391
- template: `
1392
- <div class="mb-3">
1393
- @if (label) {
1394
- <label [ngClass]="labelClass" [for]="inputId">
1395
- {{ label | abpLocalization }}
1396
- </label>
1397
- }
1398
- <input
1399
- type="text"
1400
- [id]="inputId"
1401
- [placeholder]="inputPlaceholder"
1402
- [readonly]="inputReadonly"
1403
- [ngClass]="inputClass"
1404
- [ngStyle]="inputStyle"
1405
- (blur)="formBlur.next()"
1406
- (focus)="formFocus.next()"
1407
- [(ngModel)]="value"
1408
- />
1409
- </div>
1410
- `,
1411
- providers: [
1412
- {
1413
- provide: NG_VALUE_ACCESSOR,
1414
- useExisting: forwardRef(() => FormInputComponent),
1415
- multi: true,
1416
- },
1417
- ],
1418
- }]
1419
- }], propDecorators: { inputId: [{
1420
- type: Input
1421
- }], inputReadonly: [{
1422
- type: Input
1423
- }], label: [{
1424
- type: Input
1425
- }], labelClass: [{
1426
- type: Input
1427
- }], inputPlaceholder: [{
1428
- type: Input
1429
- }], inputStyle: [{
1430
- type: Input
1431
- }], inputClass: [{
1432
- type: Input
1433
- }], formBlur: [{
1434
- type: Output
1435
- }], formFocus: [{
1436
- type: Output
1437
- }] } });
1342
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: StatusCodeErrorHandlerService, decorators: [{
1343
+ type: Injectable,
1344
+ args: [{ providedIn: 'root' }]
1345
+ }] });
1438
1346
 
1439
- class InternetConnectionStatusComponent {
1347
+ class UnknownStatusCodeErrorHandlerService {
1440
1348
  constructor() {
1441
- this.internetConnectionService = inject(InternetConnectionService);
1442
- this.isOnline = this.internetConnectionService.networkStatus;
1349
+ this.priority = CUSTOM_HTTP_ERROR_HANDLER_PRIORITY.normal;
1350
+ this.statusText = 'Unknown Error';
1351
+ this.message = '';
1352
+ this.createErrorComponentService = inject(CreateErrorComponentService);
1443
1353
  }
1444
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: InternetConnectionStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1445
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: InternetConnectionStatusComponent, isStandalone: true, selector: "abp-internet-status", ngImport: i0, template: `
1446
- @if (!isOnline()) {
1447
- <div class="status-icon">
1448
- <i
1449
- ngbTooltip="{{ 'AbpUi::InternetConnectionInfo' | abpLocalization }}"
1450
- container="body"
1451
- placement="left-top"
1452
- class="fa fa-wifi text-blinking blink"
1453
- >
1454
- </i>
1455
- </div>
1456
- }
1457
- `, isInline: true, styles: [".blink{animation:blinker .9s cubic-bezier(.5,0,1,1) infinite alternate}@keyframes blinker{0%{color:#c1c1c1}70%{color:#fa2379}to{color:#fa2379}}.text-blinking{font-size:30px}.status-icon{position:fixed;z-index:999999;top:50%;left:50%;width:30px;text-align:center;margin-left:-15px;margin-top:-15px;translate:transform(-50%,-50%)}\n"], dependencies: [{ kind: "ngmodule", type: LocalizationModule }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }, { kind: "directive", type: NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }] }); }
1354
+ canHandle(error) {
1355
+ if (error && error.status === 0 && error.statusText === this.statusText) {
1356
+ this.message = error.message;
1357
+ return true;
1358
+ }
1359
+ return false;
1360
+ }
1361
+ execute() {
1362
+ this.createErrorComponentService.execute({
1363
+ title: {
1364
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
1365
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
1366
+ },
1367
+ details: this.message,
1368
+ isHomeShow: false,
1369
+ });
1370
+ }
1371
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: UnknownStatusCodeErrorHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1372
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: UnknownStatusCodeErrorHandlerService, providedIn: 'root' }); }
1458
1373
  }
1459
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: InternetConnectionStatusComponent, decorators: [{
1460
- type: Component,
1461
- args: [{ selector: 'abp-internet-status', imports: [LocalizationModule, NgbTooltip], template: `
1462
- @if (!isOnline()) {
1463
- <div class="status-icon">
1464
- <i
1465
- ngbTooltip="{{ 'AbpUi::InternetConnectionInfo' | abpLocalization }}"
1466
- container="body"
1467
- placement="left-top"
1468
- class="fa fa-wifi text-blinking blink"
1469
- >
1470
- </i>
1471
- </div>
1472
- }
1473
- `, styles: [".blink{animation:blinker .9s cubic-bezier(.5,0,1,1) infinite alternate}@keyframes blinker{0%{color:#c1c1c1}70%{color:#fa2379}to{color:#fa2379}}.text-blinking{font-size:30px}.status-icon{position:fixed;z-index:999999;top:50%;left:50%;width:30px;text-align:center;margin-left:-15px;margin-top:-15px;translate:transform(-50%,-50%)}\n"] }]
1374
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: UnknownStatusCodeErrorHandlerService, decorators: [{
1375
+ type: Injectable,
1376
+ args: [{ providedIn: 'root' }]
1474
1377
  }] });
1475
1378
 
1476
- class SpinnerComponent {
1477
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1478
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: SpinnerComponent, isStandalone: true, selector: "abp-spinner", ngImport: i0, template: `
1479
- <div class="d-flex justify-content-center align-items-center border-top" style="height: 62px">
1480
- <div class="spinner-border" role="status" id="loading">
1481
- <span class="visually-hidden">Loading...</span>
1482
- </div>
1483
- </div>
1484
- `, isInline: true }); }
1485
- }
1486
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: SpinnerComponent, decorators: [{
1487
- type: Component,
1488
- args: [{
1489
- selector: 'abp-spinner',
1490
- standalone: true,
1491
- template: `
1492
- <div class="d-flex justify-content-center align-items-center border-top" style="height: 62px">
1493
- <div class="spinner-border" role="status" id="loading">
1494
- <span class="visually-hidden">Loading...</span>
1495
- </div>
1496
- </div>
1497
- `,
1498
- }]
1499
- }] });
1379
+ var styles = `
1380
+ .is-invalid .form-control {
1381
+ border-color: #dc3545;
1382
+ border-style: solid !important;
1383
+ padding-right: calc(1.5em + .75rem);
1384
+ background-image: url(data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e);
1385
+ background-repeat: no-repeat;
1386
+ background-position: right calc(.375em + .1875rem) center;
1387
+ background-size: calc(.75em + .375rem) calc(.75em + .375rem);
1388
+ }
1389
+
1390
+ .is-invalid .invalid-feedback,
1391
+ .is-invalid + * .invalid-feedback {
1392
+ display: block;
1393
+ }
1394
+
1395
+ .data-tables-filter {
1396
+ text-align: right;
1397
+ }
1398
+
1399
+ [dir=rtl] .data-tables-filter {
1400
+ text-align: left;
1401
+ }
1402
+
1403
+ .pointer {
1404
+ cursor: pointer;
1405
+ }
1406
+
1407
+ .navbar .dropdown-submenu a::after {
1408
+ transform: rotate(-90deg);
1409
+ position: absolute;
1410
+ right: 16px;
1411
+ top: 18px;
1412
+ }
1413
+
1414
+ .navbar .dropdown-menu {
1415
+ min-width: 215px;
1416
+ }
1417
+
1418
+ .datatable-scroll {
1419
+ margin-bottom: 5px !important;
1420
+ width: unset !important;
1421
+ }
1422
+
1423
+ .ui-table-scrollable-body::-webkit-scrollbar {
1424
+ height: 5px !important;
1425
+ width: 5px !important;
1426
+ }
1427
+
1428
+ .ui-table-scrollable-body::-webkit-scrollbar-track {
1429
+ background: #ddd;
1430
+ }
1431
+
1432
+ .ui-table-scrollable-body::-webkit-scrollbar-thumb {
1433
+ background: #8a8686;
1434
+ }
1435
+
1436
+ .abp-ellipsis-inline {
1437
+ display: inline-block;
1438
+ overflow: hidden;
1439
+ text-overflow: ellipsis;
1440
+ white-space: nowrap;
1441
+ }
1442
+
1443
+ .abp-ellipsis {
1444
+ overflow: hidden !important;
1445
+ text-overflow: ellipsis;
1446
+ white-space: nowrap;
1447
+ }
1448
+
1449
+ .ui-widget-overlay {
1450
+ z-index: 1000;
1451
+ }
1452
+
1453
+ .color-white {
1454
+ color: #FFF !important;
1455
+ }
1456
+
1457
+ .custom-checkbox > label {
1458
+ cursor: pointer;
1459
+ }
1460
+
1461
+ /* <animations */
1462
+
1463
+ .fade-in-top {
1464
+ animation: fadeInTop 0.2s ease-in-out;
1465
+ }
1466
+
1467
+ .fade-out-top {
1468
+ animation: fadeOutTop 0.2s ease-in-out;
1469
+ }
1470
+
1471
+ .abp-collapsed-height {
1472
+ -moz-transition: max-height linear 0.35s;
1473
+ -ms-transition: max-height linear 0.35s;
1474
+ -o-transition: max-height linear 0.35s;
1475
+ -webkit-transition: max-height linear 0.35s;
1476
+ overflow:hidden;
1477
+ transition:max-height 0.35s linear;
1478
+ height:auto;
1479
+ max-height: 0;
1480
+ }
1481
+
1482
+ .abp-mh-25 {
1483
+ max-height: 25vh;
1484
+ }
1485
+
1486
+ .abp-mh-50 {
1487
+ transition:max-height 0.65s linear;
1488
+ max-height: 50vh;
1489
+ }
1490
+
1491
+ .abp-mh-75 {
1492
+ transition:max-height 0.85s linear;
1493
+ max-height: 75vh;
1494
+ }
1495
+
1496
+ .abp-mh-100 {
1497
+ transition:max-height 1s linear;
1498
+ max-height: 100vh;
1499
+ }
1500
+
1501
+ [class^="sorting"] {
1502
+ opacity: .3;
1503
+ cursor: pointer;
1504
+ }
1505
+ [class^="sorting"]:before {
1506
+ right: 0.5rem;
1507
+ content: "↑";
1508
+ }
1509
+ [class^="sorting"]:after {
1510
+ right: 0.5rem;
1511
+ content: "↓";
1512
+ }
1513
+
1514
+ .sorting_desc {
1515
+ opacity: 1;
1516
+ }
1517
+ .sorting_desc:before {
1518
+ opacity: .3;
1519
+ }
1520
+
1521
+ .sorting_asc {
1522
+ opacity: 1;
1523
+ }
1524
+ .sorting_asc:after {
1525
+ opacity: .3;
1526
+ }
1527
+ .ngx-datatable.material {
1528
+ box-shadow: none;
1529
+ }
1530
+ ngb-typeahead-window, ngb-typeahead-window.dropdown-menu {
1531
+ max-height: 25em;
1532
+ overflow-y: scroll !important;
1533
+ z-index: 1050;
1534
+ }
1535
+
1536
+ .abp-modal-header {
1537
+ word-break: break-word;
1538
+ }
1539
+
1540
+
1541
+ @keyframes fadeInTop {
1542
+ from {
1543
+ transform: translateY(-5px);
1544
+ opacity: 0;
1545
+ }
1546
+
1547
+ to {
1548
+ transform: translateY(0px);
1549
+ opacity: 1;
1550
+ }
1551
+ }
1552
+
1553
+ @keyframes fadeOutTop {
1554
+ to {
1555
+ transform: translateY(-5px);
1556
+ opacity: 0;
1557
+ }
1558
+ }
1559
+
1560
+ /* </animations */
1561
+ .ngb-dp-body {
1562
+ z-index: 1055 !important;
1563
+ }
1564
+ `;
1500
1565
 
1501
- class EllipsisDirective {
1502
- get inlineClass() {
1503
- return this.enabled && this.width;
1566
+ const THEME_SHARED_APPEND_CONTENT = new InjectionToken('THEME_SHARED_APPEND_CONTENT', {
1567
+ providedIn: 'root',
1568
+ factory: () => {
1569
+ const domInsertion = inject(DomInsertionService);
1570
+ domInsertion.insertContent(CONTENT_STRATEGY.AppendStyleToHead(styles));
1571
+ },
1572
+ });
1573
+
1574
+ const defaultNgxDatatableMessages = {
1575
+ emptyMessage: 'AbpUi::NoDataAvailableInDatatable',
1576
+ errorMessage: 'AbpUi::ErrorLoadingDatatable',
1577
+ totalMessage: 'AbpUi::Total',
1578
+ selectedMessage: 'AbpUi::Selected',
1579
+ };
1580
+ const NGX_DATATABLE_MESSAGES = new InjectionToken('NGX_DATATABLE_MESSAGES');
1581
+
1582
+ const SUPPRESS_UNSAVED_CHANGES_WARNING = new InjectionToken('SUPPRESS_UNSAVED_CHANGES_WARNING');
1583
+
1584
+ class RouterErrorHandlerService {
1585
+ constructor() {
1586
+ this.routerEvents = inject(RouterEvents);
1587
+ this.httpErrorConfig = inject(HTTP_ERROR_CONFIG);
1588
+ this.createErrorComponentService = inject(CreateErrorComponentService);
1589
+ this.filterRouteErrors = (navigationError) => {
1590
+ if (!this.httpErrorConfig?.skipHandledErrorCodes) {
1591
+ return true;
1592
+ }
1593
+ return (navigationError.error?.message?.indexOf('Cannot match') > -1 &&
1594
+ this.httpErrorConfig.skipHandledErrorCodes.findIndex(code => code === 404) < 0);
1595
+ };
1504
1596
  }
1505
- get class() {
1506
- return this.enabled && !this.width;
1507
- }
1508
- get maxWidth() {
1509
- return this.enabled && this.width ? this.width || '170px' : undefined;
1510
- }
1511
- constructor(cdRef, elRef) {
1512
- this.cdRef = cdRef;
1513
- this.elRef = elRef;
1514
- this.enabled = true;
1597
+ listen() {
1598
+ this.routerEvents
1599
+ .getNavigationEvents('Error')
1600
+ .pipe(filter(this.filterRouteErrors))
1601
+ .subscribe(() => this.show404Page());
1515
1602
  }
1516
- ngAfterViewInit() {
1517
- this.title = this.title || this.elRef.nativeElement.innerText;
1518
- this.cdRef.detectChanges();
1603
+ show404Page() {
1604
+ const instance = {
1605
+ title: {
1606
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError404.title,
1607
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.title,
1608
+ },
1609
+ status: 404,
1610
+ };
1611
+ this.createErrorComponentService.execute(instance);
1519
1612
  }
1520
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: EllipsisDirective, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1521
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: EllipsisDirective, isStandalone: true, selector: "[abpEllipsis]", inputs: { width: ["abpEllipsis", "width"], title: "title", enabled: ["abpEllipsisEnabled", "enabled"] }, host: { properties: { "title": "this.title", "class.abp-ellipsis-inline": "this.inlineClass", "class.abp-ellipsis": "this.class", "style.max-width": "this.maxWidth" } }, ngImport: i0 }); }
1613
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: RouterErrorHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1614
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: RouterErrorHandlerService, providedIn: 'root' }); }
1522
1615
  }
1523
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: EllipsisDirective, decorators: [{
1524
- type: Directive,
1525
- args: [{
1526
- selector: '[abpEllipsis]',
1527
- standalone: true
1528
- }]
1529
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { width: [{
1530
- type: Input,
1531
- args: ['abpEllipsis']
1532
- }], title: [{
1533
- type: HostBinding,
1534
- args: ['title']
1535
- }, {
1536
- type: Input
1537
- }], enabled: [{
1538
- type: Input,
1539
- args: ['abpEllipsisEnabled']
1540
- }], inlineClass: [{
1541
- type: HostBinding,
1542
- args: ['class.abp-ellipsis-inline']
1543
- }], class: [{
1544
- type: HostBinding,
1545
- args: ['class.abp-ellipsis']
1546
- }], maxWidth: [{
1547
- type: HostBinding,
1548
- args: ['style.max-width']
1549
- }] } });
1616
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: RouterErrorHandlerService, decorators: [{
1617
+ type: Injectable,
1618
+ args: [{ providedIn: 'root' }]
1619
+ }] });
1550
1620
 
1551
- class LoadingDirective {
1552
- get loading() {
1553
- return this._loading;
1554
- }
1555
- set loading(newValue) {
1556
- setTimeout(() => {
1557
- if (!newValue && this.timerSubscription) {
1558
- this.timerSubscription.unsubscribe();
1559
- this.timerSubscription = null;
1560
- this._loading = newValue;
1561
- if (this.rootNode) {
1562
- this.renderer.removeChild(this.rootNode.parentElement, this.rootNode);
1563
- this.rootNode = null;
1564
- }
1565
- return;
1566
- }
1567
- this.timerSubscription = timer(this.delay)
1568
- .pipe(take(1))
1569
- .subscribe(() => {
1570
- if (!this.componentRef) {
1571
- this.componentRef = this.cdRes
1572
- .resolveComponentFactory(LoadingComponent)
1573
- .create(this.injector);
1574
- }
1575
- if (newValue && !this.rootNode) {
1576
- this.rootNode = this.componentRef.hostView.rootNodes[0];
1577
- this.targetElement?.appendChild(this.rootNode);
1578
- }
1579
- else if (this.rootNode) {
1580
- this.renderer.removeChild(this.rootNode.parentElement, this.rootNode);
1581
- this.rootNode = null;
1582
- }
1583
- this._loading = newValue;
1584
- this.timerSubscription = null;
1585
- });
1586
- }, 0);
1621
+ class AbpAuthenticationErrorHandler {
1622
+ constructor() {
1623
+ this.priority = CUSTOM_HTTP_ERROR_HANDLER_PRIORITY.veryHigh;
1624
+ this.authService = inject(AuthService);
1625
+ this.configStateService = inject(ConfigStateService);
1587
1626
  }
1588
- constructor(elRef, vcRef, cdRes, injector, renderer) {
1589
- this.elRef = elRef;
1590
- this.vcRef = vcRef;
1591
- this.cdRes = cdRes;
1592
- this.injector = injector;
1593
- this.renderer = renderer;
1594
- this.position = 'relative';
1595
- this.delay = 0;
1596
- this.rootNode = null;
1597
- this.timerSubscription = null;
1627
+ canHandle(error) {
1628
+ return error instanceof HttpErrorResponse && error.status === 401;
1598
1629
  }
1599
- ngOnInit() {
1600
- if (!this.targetElement) {
1601
- const { offsetHeight, offsetWidth } = this.elRef.nativeElement;
1602
- if (!offsetHeight && !offsetWidth && this.elRef.nativeElement.children.length) {
1603
- this.targetElement = this.elRef.nativeElement.children[0];
1604
- }
1605
- else {
1606
- this.targetElement = this.elRef.nativeElement;
1630
+ execute() {
1631
+ this.configStateService.refreshAppState().subscribe(({ currentUser }) => {
1632
+ if (!currentUser.isAuthenticated) {
1633
+ this.authService.logout({ noRedirectToLogoutUrl: true });
1607
1634
  }
1608
- }
1609
- }
1610
- ngOnDestroy() {
1611
- if (this.timerSubscription) {
1612
- this.timerSubscription.unsubscribe();
1613
- }
1635
+ });
1614
1636
  }
1615
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LoadingDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
1616
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: LoadingDirective, isStandalone: false, selector: "[abpLoading]", inputs: { loading: ["abpLoading", "loading"], targetElement: ["abpLoadingTargetElement", "targetElement"], delay: ["abpLoadingDelay", "delay"] }, host: { properties: { "style.position": "this.position" } }, ngImport: i0 }); }
1637
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AbpAuthenticationErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1638
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AbpAuthenticationErrorHandler, providedIn: 'root' }); }
1617
1639
  }
1618
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LoadingDirective, decorators: [{
1619
- type: Directive,
1620
- args: [{
1621
- standalone: false,
1622
- selector: '[abpLoading]',
1623
- }]
1624
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: i0.Renderer2 }], propDecorators: { position: [{
1625
- type: HostBinding,
1626
- args: ['style.position']
1627
- }], loading: [{
1628
- type: Input,
1629
- args: ['abpLoading']
1630
- }], targetElement: [{
1631
- type: Input,
1632
- args: ['abpLoadingTargetElement']
1633
- }], delay: [{
1634
- type: Input,
1635
- args: ['abpLoadingDelay']
1636
- }] } });
1640
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AbpAuthenticationErrorHandler, decorators: [{
1641
+ type: Injectable,
1642
+ args: [{ providedIn: 'root' }]
1643
+ }] });
1637
1644
 
1638
- class NgxDatatableDefaultDirective {
1639
- get classes() {
1640
- return `ngx-datatable ${this.class}`;
1645
+ class ModalRefService {
1646
+ constructor() {
1647
+ this.modalRefs = [];
1641
1648
  }
1642
- constructor(table, document) {
1643
- this.table = table;
1644
- this.document = document;
1645
- this.subscription = new Subscription();
1646
- this.resizeDiff = 0;
1647
- this.class = 'material bordered';
1648
- this.table.columnMode = ColumnMode.force;
1649
- this.table.footerHeight = 50;
1650
- this.table.headerHeight = 50;
1651
- this.table.rowHeight = 'auto';
1652
- this.table.scrollbarH = true;
1653
- this.table.virtualization = false;
1649
+ register(modal) {
1650
+ this.modalRefs.push(modal);
1654
1651
  }
1655
- fixHorizontalGap(scroller) {
1656
- const { body, documentElement } = this.document;
1657
- if (documentElement.scrollHeight !== documentElement.clientHeight) {
1658
- if (this.resizeDiff === 0) {
1659
- this.resizeDiff = window.innerWidth - body.offsetWidth;
1660
- scroller.scrollWidth -= this.resizeDiff;
1661
- }
1662
- }
1663
- else {
1664
- scroller.scrollWidth += this.resizeDiff;
1665
- this.resizeDiff = 0;
1652
+ unregister(modal) {
1653
+ const index = this.modalRefs.indexOf(modal);
1654
+ if (index > -1) {
1655
+ this.modalRefs.splice(index, 1);
1666
1656
  }
1667
1657
  }
1668
- fixStyleOnWindowResize() {
1669
- // avoided @HostListener('window:resize') in favor of performance
1670
- const subscription = fromEvent(window, 'resize')
1671
- .pipe(debounceTime(500))
1672
- .subscribe(() => {
1673
- const { scroller } = this.table.bodyComponent;
1674
- if (!scroller)
1675
- return;
1676
- this.fixHorizontalGap(scroller);
1677
- });
1678
- this.subscription.add(subscription);
1679
- }
1680
- ngAfterViewInit() {
1681
- this.fixStyleOnWindowResize();
1682
- }
1683
- ngOnDestroy() {
1684
- this.subscription.unsubscribe();
1658
+ dismissAll(mode) {
1659
+ this.modalRefs.forEach(modal => modal.dismiss(mode));
1685
1660
  }
1686
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NgxDatatableDefaultDirective, deps: [{ token: i1$2.DatatableComponent }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive }); }
1687
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: NgxDatatableDefaultDirective, isStandalone: true, selector: "ngx-datatable[default]", inputs: { class: "class" }, host: { properties: { "class": "this.classes" } }, exportAs: ["ngxDatatableDefault"], ngImport: i0 }); }
1661
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ModalRefService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1662
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ModalRefService, providedIn: 'root' }); }
1688
1663
  }
1689
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NgxDatatableDefaultDirective, decorators: [{
1690
- type: Directive,
1691
- args: [{
1692
- // eslint-disable-next-line @angular-eslint/directive-selector
1693
- selector: 'ngx-datatable[default]',
1694
- standalone: true,
1695
- exportAs: 'ngxDatatableDefault',
1696
- }]
1697
- }], ctorParameters: () => [{ type: i1$2.DatatableComponent }, { type: undefined, decorators: [{
1698
- type: Inject,
1699
- args: [DOCUMENT]
1700
- }] }], propDecorators: { class: [{
1701
- type: Input
1702
- }], classes: [{
1703
- type: HostBinding,
1704
- args: ['class']
1705
- }] } });
1706
-
1707
- const defaultNgxDatatableMessages = {
1708
- emptyMessage: 'AbpUi::NoDataAvailableInDatatable',
1709
- errorMessage: 'AbpUi::ErrorLoadingDatatable',
1710
- totalMessage: 'AbpUi::Total',
1711
- selectedMessage: 'AbpUi::Selected',
1712
- };
1713
- const NGX_DATATABLE_MESSAGES = new InjectionToken('NGX_DATATABLE_MESSAGES');
1664
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ModalRefService, decorators: [{
1665
+ type: Injectable,
1666
+ args: [{ providedIn: 'root' }]
1667
+ }] });
1714
1668
 
1715
- class NgxDatatableListDirective {
1716
- constructor() {
1717
- this.table = inject(DatatableComponent);
1718
- this.cdRef = inject(ChangeDetectorRef);
1719
- this.destroyRef = inject(DestroyRef);
1720
- this.localizationService = inject(LocalizationService);
1721
- this.ngxDatatableMessages = inject(NGX_DATATABLE_MESSAGES, { optional: true });
1722
- this.viewContainerRef = inject(ViewContainerRef);
1723
- this.renderer = inject(Renderer2);
1724
- this.setInitialValues();
1669
+ class ModalComponent {
1670
+ get modalWindowRef() {
1671
+ return document.querySelector(`ngb-modal-window.${this.modalIdentifier}`);
1725
1672
  }
1726
- ngDoCheck() {
1727
- this.refreshPageIfDataExist();
1673
+ get isFormDirty() {
1674
+ return Boolean(this.modalWindowRef?.querySelector('.ng-dirty'));
1675
+ }
1676
+ constructor() {
1677
+ this.confirmationService = inject(ConfirmationService);
1678
+ this.modal = inject(NgbModal);
1679
+ this.modalRefService = inject(ModalRefService);
1680
+ this.suppressUnsavedChangesWarningToken = inject(SUPPRESS_UNSAVED_CHANGES_WARNING, {
1681
+ optional: true,
1682
+ });
1683
+ this.destroyRef = inject(DestroyRef);
1684
+ this.visible = model(false);
1685
+ this.busy = input(false, {
1686
+ transform: (value) => {
1687
+ if (this.abpSubmit() && this.abpSubmit() instanceof ButtonComponent) {
1688
+ this.abpSubmit().loading = value;
1689
+ }
1690
+ return value;
1691
+ },
1692
+ });
1693
+ this.options = input({ keyboard: true });
1694
+ this.suppressUnsavedChangesWarning = input(this.suppressUnsavedChangesWarningToken);
1695
+ this.modalContent = viewChild('modalContent');
1696
+ this.abpHeader = contentChild('abpHeader');
1697
+ this.abpBody = contentChild('abpBody');
1698
+ this.abpFooter = contentChild('abpFooter');
1699
+ this.abpSubmit = contentChild(ButtonComponent, { read: ButtonComponent });
1700
+ this.init = output();
1701
+ this.appear = output();
1702
+ this.disappear = output();
1703
+ this.isConfirmationOpen = false;
1704
+ this.modalIdentifier = `modal-${uuid()}`;
1705
+ effect(() => {
1706
+ this.toggle(this.visible());
1707
+ });
1728
1708
  }
1729
1709
  ngOnInit() {
1730
- this.subscribeToPage();
1731
- this.subscribeToSort();
1732
- this.subscribeToRequestStatus();
1710
+ this.modalRefService.register(this);
1733
1711
  }
1734
- ngOnChanges({ list }) {
1735
- this.subscribeToQuery();
1736
- if (!list.firstChange)
1737
- return;
1738
- const { maxResultCount, page } = list.currentValue;
1739
- this.table.limit = maxResultCount;
1740
- this.table.offset = page;
1712
+ dismiss(mode) {
1713
+ switch (mode) {
1714
+ case 'hard':
1715
+ this.visible.set(false);
1716
+ break;
1717
+ case 'soft':
1718
+ this.close();
1719
+ break;
1720
+ default:
1721
+ break;
1722
+ }
1741
1723
  }
1742
- subscribeToRequestStatus() {
1743
- const requestStatus$ = this.list.requestStatus$.pipe(distinctUntilChanged());
1744
- const { emptyMessage, errorMessage } = this.ngxDatatableMessages || defaultNgxDatatableMessages;
1745
- requestStatus$.subscribe(status => {
1746
- this.table.loadingIndicator = false;
1747
- if (status === 'idle') {
1748
- return;
1749
- }
1750
- if (status === 'loading') {
1751
- this.table.messages.emptyMessage = undefined;
1752
- this.table.loadingIndicator = true;
1753
- this.cdRef.detectChanges();
1754
- this.updateLoadingIndicator();
1755
- return;
1756
- }
1757
- if (status === 'error') {
1758
- this.table.messages.emptyMessage = this.localizationService.instant(errorMessage);
1759
- this.viewContainerRef.clear();
1760
- this.cdRef.markForCheck();
1761
- }
1762
- if (status === 'success') {
1763
- this.table.messages.emptyMessage = this.localizationService.instant(emptyMessage);
1764
- this.viewContainerRef.clear();
1765
- }
1724
+ toggle(value) {
1725
+ this.visible.set(value);
1726
+ if (!value) {
1727
+ this.modalRef?.dismiss();
1728
+ this.disappear.emit();
1729
+ return;
1730
+ }
1731
+ setTimeout(() => this.listen(), 0);
1732
+ this.modalRef = this.modal.open(this.modalContent(), {
1733
+ size: 'md',
1734
+ centered: false,
1735
+ keyboard: false,
1736
+ scrollable: true,
1737
+ beforeDismiss: () => {
1738
+ if (!this.visible())
1739
+ return true;
1740
+ this.close();
1741
+ return !this.visible();
1742
+ },
1743
+ ...this.options(),
1744
+ windowClass: `${this.options().windowClass || ''} ${this.modalIdentifier}`,
1766
1745
  });
1746
+ this.appear.emit();
1767
1747
  }
1768
- updateLoadingIndicator() {
1769
- const body = this.table.element.querySelector('datatable-body');
1770
- const progress = this.table.element.querySelector('datatable-progress');
1771
- if (!body) {
1748
+ ngOnDestroy() {
1749
+ this.modalRefService.unregister(this);
1750
+ this.toggle(false);
1751
+ }
1752
+ close() {
1753
+ if (this.busy())
1772
1754
  return;
1755
+ if (this.isFormDirty && !this.suppressUnsavedChangesWarning()) {
1756
+ if (this.isConfirmationOpen)
1757
+ return;
1758
+ this.isConfirmationOpen = true;
1759
+ this.confirmationService
1760
+ .warn('AbpUi::AreYouSureYouWantToCancelEditingWarningMessage', 'AbpUi::AreYouSure', {
1761
+ dismissible: false,
1762
+ })
1763
+ .subscribe((status) => {
1764
+ this.isConfirmationOpen = false;
1765
+ if (status === Confirmation.Status.confirm) {
1766
+ this.visible.set(false);
1767
+ }
1768
+ });
1773
1769
  }
1774
- if (progress) {
1775
- this.replaceLoadingIndicator(body, progress);
1770
+ else {
1771
+ this.visible.set(false);
1776
1772
  }
1777
1773
  }
1778
- replaceLoadingIndicator(parent, placeholder) {
1779
- this.viewContainerRef.clear();
1780
- const spinnerRef = this.viewContainerRef.createComponent(SpinnerComponent);
1781
- const spinnerElement = spinnerRef.location.nativeElement;
1782
- this.renderer.insertBefore(parent, spinnerElement, placeholder);
1783
- this.renderer.removeChild(parent, placeholder);
1784
- }
1785
- setInitialValues() {
1786
- this.table.externalPaging = true;
1787
- this.table.externalSorting = true;
1788
- const { selectedMessage, totalMessage } = this.ngxDatatableMessages || defaultNgxDatatableMessages;
1789
- this.table.messages = {
1790
- totalMessage: this.localizationService.instant(totalMessage),
1791
- selectedMessage: this.localizationService.instant(selectedMessage),
1792
- };
1793
- }
1794
- subscribeToSort() {
1795
- this.table.sort
1774
+ listen() {
1775
+ if (this.modalWindowRef) {
1776
+ fromEvent(this.modalWindowRef, 'keyup')
1777
+ .pipe(takeUntilDestroyed(this.destroyRef), debounceTime(150), filter((key) => key && key.key === 'Escape' && this.options().keyboard))
1778
+ .subscribe(() => this.close());
1779
+ }
1780
+ fromEvent(window, 'beforeunload')
1796
1781
  .pipe(takeUntilDestroyed(this.destroyRef))
1797
- .subscribe(({ sorts: [{ prop, dir }] }) => {
1798
- if (prop === this.list.sortKey && this.list.sortOrder === 'desc') {
1799
- this.list.sortKey = '';
1800
- this.list.sortOrder = '';
1801
- this.table.sorts = [];
1802
- this.cdRef.detectChanges();
1803
- }
1804
- else {
1805
- this.list.sortKey = prop;
1806
- this.list.sortOrder = dir;
1782
+ .subscribe(event => {
1783
+ if (this.isFormDirty && !this.suppressUnsavedChangesWarning()) {
1784
+ event.preventDefault();
1807
1785
  }
1808
1786
  });
1787
+ this.init.emit();
1809
1788
  }
1810
- subscribeToPage() {
1811
- this.table.page.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(({ offset }) => {
1812
- this.setTablePage(offset);
1813
- });
1814
- }
1815
- subscribeToQuery() {
1816
- this.list.query$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
1817
- const offset = this.list.page;
1818
- if (this.table.offset !== offset)
1819
- this.table.offset = offset;
1820
- });
1821
- }
1822
- setTablePage(pageNum) {
1823
- this.list.page = pageNum;
1824
- this.table.offset = pageNum;
1825
- }
1826
- refreshPageIfDataExist() {
1827
- if (this.table.rows?.length < 1 && this.table.count > 0) {
1828
- let maxPage = Math.floor(Number(this.table.count / this.list.maxResultCount));
1829
- if (this.table.count < this.list.maxResultCount) {
1830
- this.setTablePage(0);
1831
- return;
1832
- }
1833
- if (this.table.count % this.list.maxResultCount === 0) {
1834
- maxPage -= 1;
1835
- }
1836
- if (this.list.page < maxPage) {
1837
- this.setTablePage(this.list.page);
1838
- return;
1839
- }
1840
- this.setTablePage(maxPage);
1789
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1790
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: ModalComponent, isStandalone: true, selector: "abp-modal", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, busy: { classPropertyName: "busy", publicName: "busy", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, suppressUnsavedChangesWarning: { classPropertyName: "suppressUnsavedChangesWarning", publicName: "suppressUnsavedChangesWarning", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", init: "init", appear: "appear", disappear: "disappear" }, providers: [SubscriptionService], queries: [{ propertyName: "abpHeader", first: true, predicate: ["abpHeader"], descendants: true, isSignal: true }, { propertyName: "abpBody", first: true, predicate: ["abpBody"], descendants: true, isSignal: true }, { propertyName: "abpFooter", first: true, predicate: ["abpFooter"], descendants: true, isSignal: true }, { propertyName: "abpSubmit", first: true, predicate: ButtonComponent, descendants: true, read: ButtonComponent, isSignal: true }], viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-content></ng-content>\r\n\r\n<ng-template #modalContent let-modal>\r\n @if (abpHeader()) {\r\n <div id=\"abp-modal-header\" class=\"modal-header abp-modal-header\">\r\n <ng-container *ngTemplateOutlet=\"abpHeader()\"></ng-container>\r\n \u200B\r\n <button\r\n id=\"abp-modal-close-button\"\r\n type=\"button\"\r\n class=\"btn-sm btn-close\"\r\n aria-label=\"Close\"\r\n (click)=\"modal.dismiss()\"\r\n ></button>\r\n </div>\r\n }\r\n @if (abpBody()) {\r\n <div id=\"abp-modal-body\" class=\"modal-body\">\r\n <ng-container *ngTemplateOutlet=\"abpBody()\"></ng-container>\r\n </div>\r\n }\r\n @if (abpFooter()) {\r\n <div id=\"abp-modal-footer\" class=\"modal-footer\">\r\n <ng-container *ngTemplateOutlet=\"abpFooter()\"></ng-container>\r\n </div>\r\n }\r\n</ng-template>\r\n", styles: [".modal.show{display:block!important}.modal-backdrop{opacity:.8}.modal::-webkit-scrollbar{width:7px}.modal::-webkit-scrollbar-track{background:#ddd}.modal::-webkit-scrollbar-thumb{background:#8a8686}.modal-dialog{z-index:1050}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
1791
+ }
1792
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ModalComponent, decorators: [{
1793
+ type: Component,
1794
+ args: [{ selector: 'abp-modal', providers: [SubscriptionService], imports: [CommonModule], template: "<ng-content></ng-content>\r\n\r\n<ng-template #modalContent let-modal>\r\n @if (abpHeader()) {\r\n <div id=\"abp-modal-header\" class=\"modal-header abp-modal-header\">\r\n <ng-container *ngTemplateOutlet=\"abpHeader()\"></ng-container>\r\n \u200B\r\n <button\r\n id=\"abp-modal-close-button\"\r\n type=\"button\"\r\n class=\"btn-sm btn-close\"\r\n aria-label=\"Close\"\r\n (click)=\"modal.dismiss()\"\r\n ></button>\r\n </div>\r\n }\r\n @if (abpBody()) {\r\n <div id=\"abp-modal-body\" class=\"modal-body\">\r\n <ng-container *ngTemplateOutlet=\"abpBody()\"></ng-container>\r\n </div>\r\n }\r\n @if (abpFooter()) {\r\n <div id=\"abp-modal-footer\" class=\"modal-footer\">\r\n <ng-container *ngTemplateOutlet=\"abpFooter()\"></ng-container>\r\n </div>\r\n }\r\n</ng-template>\r\n", styles: [".modal.show{display:block!important}.modal-backdrop{opacity:.8}.modal::-webkit-scrollbar{width:7px}.modal::-webkit-scrollbar-track{background:#ddd}.modal::-webkit-scrollbar-thumb{background:#8a8686}.modal-dialog{z-index:1050}\n"] }]
1795
+ }], ctorParameters: () => [] });
1796
+
1797
+ class ModalCloseDirective {
1798
+ constructor(modal) {
1799
+ this.modal = modal;
1800
+ if (!modal) {
1801
+ console.error('Please use abpClose within an abp-modal');
1841
1802
  }
1842
1803
  }
1843
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NgxDatatableListDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1844
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: NgxDatatableListDirective, isStandalone: true, selector: "ngx-datatable[list]", inputs: { list: "list" }, exportAs: ["ngxDatatableList"], usesOnChanges: true, ngImport: i0 }); }
1804
+ onClick() {
1805
+ this.modal?.close();
1806
+ }
1807
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ModalCloseDirective, deps: [{ token: ModalComponent, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
1808
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: ModalCloseDirective, isStandalone: true, selector: "[abpClose]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
1845
1809
  }
1846
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NgxDatatableListDirective, decorators: [{
1810
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ModalCloseDirective, decorators: [{
1847
1811
  type: Directive,
1848
1812
  args: [{
1849
- // eslint-disable-next-line @angular-eslint/directive-selector
1850
- selector: 'ngx-datatable[list]',
1851
- standalone: true,
1852
- exportAs: 'ngxDatatableList',
1813
+ selector: '[abpClose]',
1853
1814
  }]
1854
- }], ctorParameters: () => [], propDecorators: { list: [{
1855
- type: Input
1815
+ }], ctorParameters: () => [{ type: ModalComponent, decorators: [{
1816
+ type: Optional
1817
+ }] }], propDecorators: { onClick: [{
1818
+ type: HostListener,
1819
+ args: ['click']
1856
1820
  }] } });
1857
1821
 
1858
- class AbpVisibleDirective {
1859
- set abpVisible(value) {
1860
- this.condition$ = checkType(value);
1861
- this.subscribeToCondition();
1862
- }
1863
- constructor(viewContainerRef, templateRef) {
1864
- this.viewContainerRef = viewContainerRef;
1865
- this.templateRef = templateRef;
1866
- this.condition$ = of(false);
1867
- }
1868
- ngOnInit() {
1869
- this.updateVisibility();
1870
- }
1871
- ngOnDestroy() {
1872
- this.conditionSubscription?.unsubscribe();
1822
+ /**
1823
+ * @deprecated use ShowPasswordDirective directive
1824
+ * https://abp.io/docs/latest/framework/ui/angular/show-password-directive
1825
+ */
1826
+ class PasswordComponent extends AbstractNgModelComponent {
1827
+ toggleFieldTextType() {
1828
+ this.fieldTextType = !this.fieldTextType;
1873
1829
  }
1874
- subscribeToCondition() {
1875
- this.conditionSubscription = this.condition$.subscribe(value => {
1876
- this.isVisible = value;
1877
- this.updateVisibility();
1878
- });
1879
- }
1880
- updateVisibility() {
1881
- this.viewContainerRef.clear();
1882
- // it should be false not falsy
1883
- if (this.isVisible === false) {
1884
- return;
1885
- }
1886
- this.viewContainerRef.createEmbeddedView(this.templateRef);
1887
- }
1888
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AbpVisibleDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1889
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: AbpVisibleDirective, isStandalone: true, selector: "[abpVisible]", inputs: { abpVisible: "abpVisible" }, ngImport: i0 }); }
1890
- }
1891
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AbpVisibleDirective, decorators: [{
1892
- type: Directive,
1893
- args: [{
1894
- standalone: true,
1895
- selector: '[abpVisible]',
1896
- }]
1897
- }], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }], propDecorators: { abpVisible: [{
1898
- type: Input
1899
- }] } });
1900
- function checkType(value) {
1901
- if (value instanceof Promise) {
1902
- return from(value);
1903
- }
1904
- else if (value instanceof Observable) {
1905
- return value;
1906
- }
1907
- else if (typeof value === 'boolean') {
1908
- return of(value);
1909
- }
1910
- else if (value === undefined || value === null) {
1911
- return of(true);
1912
- }
1913
- else {
1914
- return EMPTY;
1915
- }
1916
- }
1917
-
1918
- class DisabledDirective {
1919
- constructor(ngControl) {
1920
- this.ngControl = ngControl;
1921
- this.abpDisabled = false;
1922
- }
1923
- // Related issue: https://github.com/angular/angular/issues/35330
1924
- ngOnChanges({ abpDisabled }) {
1925
- if (this.ngControl.control && abpDisabled) {
1926
- this.ngControl.control[abpDisabled.currentValue ? 'disable' : 'enable']();
1927
- }
1928
- }
1929
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: DisabledDirective, deps: [{ token: i2$1.NgControl, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
1930
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: DisabledDirective, isStandalone: true, selector: "[abpDisabled]", inputs: { abpDisabled: "abpDisabled" }, usesOnChanges: true, ngImport: i0 }); }
1931
- }
1932
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: DisabledDirective, decorators: [{
1933
- type: Directive,
1934
- args: [{
1935
- selector: '[abpDisabled]',
1936
- standalone: true,
1937
- }]
1938
- }], ctorParameters: () => [{ type: i2$1.NgControl, decorators: [{
1939
- type: Host
1940
- }] }], propDecorators: { abpDisabled: [{
1941
- type: Input
1942
- }] } });
1943
-
1944
- var eFormComponets;
1945
- (function (eFormComponets) {
1946
- eFormComponets["FormInputComponent"] = "FormInputComponent";
1947
- eFormComponets["FormCheckboxComponent"] = "FormCheckboxComponent";
1948
- })(eFormComponets || (eFormComponets = {}));
1949
-
1950
- class DocumentDirHandlerService {
1951
- constructor(injector) {
1952
- this.injector = injector;
1953
- this.dir = new BehaviorSubject('ltr');
1954
- this.dir$ = this.dir.asObservable();
1955
- this.listenToLanguageChanges();
1956
- }
1957
- listenToLanguageChanges() {
1958
- const l10n = this.injector.get(LocalizationService);
1959
- // will always listen, no need to unsubscribe
1960
- l10n.currentLang$.pipe(map(locale => getLocaleDirection(locale))).subscribe(dir => {
1961
- this.dir.next(dir);
1962
- this.setBodyDir(dir);
1963
- });
1964
- }
1965
- setBodyDir(dir) {
1966
- document.body.dir = dir;
1967
- document.dir = dir;
1968
- }
1969
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: DocumentDirHandlerService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
1970
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: DocumentDirHandlerService }); }
1830
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: PasswordComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1831
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: PasswordComponent, isStandalone: true, selector: "abp-password", inputs: { inputId: "inputId", formControlName: "formControlName" }, providers: [
1832
+ {
1833
+ provide: NG_VALUE_ACCESSOR,
1834
+ useExisting: forwardRef(() => PasswordComponent),
1835
+ multi: true,
1836
+ },
1837
+ ], usesInheritance: true, ngImport: i0, template: "<div class=\"input-group\" validationTarget>\r\n <input\r\n [type]=\"fieldTextType ? 'text' : 'password'\"\r\n class=\"form-control\"\r\n [id]=\"inputId\"\r\n [(ngModel)]=\"value\"\r\n />\r\n\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"toggleFieldTextType()\">\r\n <i\r\n class=\"fa\"\r\n aria-hidden=\"true\"\r\n [ngClass]=\"{\r\n 'fa-eye-slash': !fieldTextType,\r\n 'fa-eye': fieldTextType\r\n }\"\r\n ></i>\r\n </button>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i3.ValidationTargetDirective, selector: "[validationTarget]", exportAs: ["validationTarget"] }] }); }
1971
1838
  }
1972
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: DocumentDirHandlerService, decorators: [{
1973
- type: Injectable
1974
- }], ctorParameters: () => [{ type: i0.Injector }] });
1975
-
1976
- const HTTP_ERROR_CONFIG = new InjectionToken('HTTP_ERROR_CONFIG');
1977
- /**
1978
- @deprecated use **`CUSTOM_ERROR_HANDLERS`** injection token instead of this, see more info https://abp.io/docs/latest/framework/ui/angular/http-requests
1979
- */
1980
- const HTTP_ERROR_HANDLER = new InjectionToken('HTTP_ERROR_HANDLER');
1981
- const CUSTOM_ERROR_HANDLERS = new InjectionToken('CUSTOM_ERROR_HANDLERS');
1982
-
1983
- const DEFAULT_ERROR_MESSAGES = {
1984
- defaultError: {
1985
- title: 'An error has occurred!',
1986
- details: 'Error detail not sent by server.',
1987
- },
1988
- defaultError401: {
1989
- title: 'You are not authenticated!',
1990
- details: 'You should be authenticated (sign in) in order to perform this operation.',
1991
- },
1992
- defaultError403: {
1993
- title: 'You are not authorized!',
1994
- details: 'You are not allowed to perform this operation.',
1995
- },
1996
- defaultError404: {
1997
- title: 'Resource not found!',
1998
- details: 'The resource requested could not found on the server.',
1999
- },
2000
- defaultError500: {
2001
- title: 'Internal server error',
2002
- details: 'Error detail not sent by server.',
2003
- },
2004
- };
2005
- const DEFAULT_ERROR_LOCALIZATIONS = {
2006
- defaultError: {
2007
- title: 'AbpUi::DefaultErrorMessage',
2008
- details: 'AbpUi::DefaultErrorMessageDetail',
2009
- },
2010
- defaultError401: {
2011
- title: 'AbpUi::DefaultErrorMessage401',
2012
- details: 'AbpUi::DefaultErrorMessage401Detail',
2013
- },
2014
- defaultError403: {
2015
- title: 'AbpUi::DefaultErrorMessage403',
2016
- details: 'AbpUi::DefaultErrorMessage403Detail',
2017
- },
2018
- defaultError404: {
2019
- title: 'AbpUi::DefaultErrorMessage404',
2020
- details: 'AbpUi::DefaultErrorMessage404Detail',
2021
- },
2022
- defaultError500: {
2023
- title: 'AbpUi::500Message',
2024
- details: 'AbpUi::DefaultErrorMessage',
2025
- },
2026
- };
2027
- const CUSTOM_HTTP_ERROR_HANDLER_PRIORITY = Object.freeze({
2028
- veryLow: -99,
2029
- low: -9,
2030
- normal: 0,
2031
- high: 9,
2032
- veryHigh: 99,
2033
- });
2034
- const HTTP_ERROR_STATUS = {
2035
- '401': 'AbpUi::401Message',
2036
- '403': 'AbpUi::403Message',
2037
- '404': 'AbpUi::404Message',
2038
- '500': 'AbpUi::500Message',
2039
- };
2040
- const HTTP_ERROR_DETAIL = {
2041
- '401': 'AbpUi::DefaultErrorMessage401Detail',
2042
- '403': 'AbpUi::DefaultErrorMessage403Detail',
2043
- '404': 'AbpUi::DefaultErrorMessage404Detail',
2044
- '500': 'AbpUi::DefaultErrorMessage',
2045
- };
2046
-
2047
- var styles = `
2048
- .is-invalid .form-control {
2049
- border-color: #dc3545;
2050
- border-style: solid !important;
2051
- padding-right: calc(1.5em + .75rem);
2052
- background-image: url(data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e);
2053
- background-repeat: no-repeat;
2054
- background-position: right calc(.375em + .1875rem) center;
2055
- background-size: calc(.75em + .375rem) calc(.75em + .375rem);
2056
- }
2057
-
2058
- .is-invalid .invalid-feedback,
2059
- .is-invalid + * .invalid-feedback {
2060
- display: block;
2061
- }
2062
-
2063
- .data-tables-filter {
2064
- text-align: right;
2065
- }
2066
-
2067
- [dir=rtl] .data-tables-filter {
2068
- text-align: left;
2069
- }
2070
-
2071
- .pointer {
2072
- cursor: pointer;
2073
- }
2074
-
2075
- .navbar .dropdown-submenu a::after {
2076
- transform: rotate(-90deg);
2077
- position: absolute;
2078
- right: 16px;
2079
- top: 18px;
2080
- }
2081
-
2082
- .navbar .dropdown-menu {
2083
- min-width: 215px;
2084
- }
2085
-
2086
- .datatable-scroll {
2087
- margin-bottom: 5px !important;
2088
- width: unset !important;
2089
- }
2090
-
2091
- .ui-table-scrollable-body::-webkit-scrollbar {
2092
- height: 5px !important;
2093
- width: 5px !important;
2094
- }
2095
-
2096
- .ui-table-scrollable-body::-webkit-scrollbar-track {
2097
- background: #ddd;
2098
- }
2099
-
2100
- .ui-table-scrollable-body::-webkit-scrollbar-thumb {
2101
- background: #8a8686;
2102
- }
2103
-
2104
- .abp-ellipsis-inline {
2105
- display: inline-block;
2106
- overflow: hidden;
2107
- text-overflow: ellipsis;
2108
- white-space: nowrap;
2109
- }
2110
-
2111
- .abp-ellipsis {
2112
- overflow: hidden !important;
2113
- text-overflow: ellipsis;
2114
- white-space: nowrap;
2115
- }
2116
-
2117
- .ui-widget-overlay {
2118
- z-index: 1000;
2119
- }
2120
-
2121
- .color-white {
2122
- color: #FFF !important;
2123
- }
2124
-
2125
- .custom-checkbox > label {
2126
- cursor: pointer;
2127
- }
2128
-
2129
- /* <animations */
2130
-
2131
- .fade-in-top {
2132
- animation: fadeInTop 0.2s ease-in-out;
2133
- }
2134
-
2135
- .fade-out-top {
2136
- animation: fadeOutTop 0.2s ease-in-out;
2137
- }
2138
-
2139
- .abp-collapsed-height {
2140
- -moz-transition: max-height linear 0.35s;
2141
- -ms-transition: max-height linear 0.35s;
2142
- -o-transition: max-height linear 0.35s;
2143
- -webkit-transition: max-height linear 0.35s;
2144
- overflow:hidden;
2145
- transition:max-height 0.35s linear;
2146
- height:auto;
2147
- max-height: 0;
2148
- }
2149
-
2150
- .abp-mh-25 {
2151
- max-height: 25vh;
2152
- }
2153
-
2154
- .abp-mh-50 {
2155
- transition:max-height 0.65s linear;
2156
- max-height: 50vh;
2157
- }
2158
-
2159
- .abp-mh-75 {
2160
- transition:max-height 0.85s linear;
2161
- max-height: 75vh;
2162
- }
2163
-
2164
- .abp-mh-100 {
2165
- transition:max-height 1s linear;
2166
- max-height: 100vh;
2167
- }
2168
-
2169
- [class^="sorting"] {
2170
- opacity: .3;
2171
- cursor: pointer;
2172
- }
2173
- [class^="sorting"]:before {
2174
- right: 0.5rem;
2175
- content: "↑";
2176
- }
2177
- [class^="sorting"]:after {
2178
- right: 0.5rem;
2179
- content: "↓";
2180
- }
2181
-
2182
- .sorting_desc {
2183
- opacity: 1;
2184
- }
2185
- .sorting_desc:before {
2186
- opacity: .3;
2187
- }
2188
-
2189
- .sorting_asc {
2190
- opacity: 1;
2191
- }
2192
- .sorting_asc:after {
2193
- opacity: .3;
2194
- }
2195
- .ngx-datatable.material {
2196
- box-shadow: none;
2197
- }
2198
- ngb-typeahead-window, ngb-typeahead-window.dropdown-menu {
2199
- max-height: 25em;
2200
- overflow-y: scroll !important;
2201
- z-index: 1050;
2202
- }
2203
-
2204
- .abp-modal-header {
2205
- word-break: break-word;
2206
- }
2207
-
2208
-
2209
- @keyframes fadeInTop {
2210
- from {
2211
- transform: translateY(-5px);
2212
- opacity: 0;
2213
- }
2214
-
2215
- to {
2216
- transform: translateY(0px);
2217
- opacity: 1;
2218
- }
2219
- }
2220
-
2221
- @keyframes fadeOutTop {
2222
- to {
2223
- transform: translateY(-5px);
2224
- opacity: 0;
2225
- }
2226
- }
2227
-
2228
- /* </animations */
2229
- .ngb-dp-body {
2230
- z-index: 1055 !important;
2231
- }
2232
- `;
1839
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: PasswordComponent, decorators: [{
1840
+ type: Component,
1841
+ args: [{ selector: 'abp-password', imports: [CommonModule, FormsModule, ReactiveFormsModule, NgxValidateCoreModule], providers: [
1842
+ {
1843
+ provide: NG_VALUE_ACCESSOR,
1844
+ useExisting: forwardRef(() => PasswordComponent),
1845
+ multi: true,
1846
+ },
1847
+ ], template: "<div class=\"input-group\" validationTarget>\r\n <input\r\n [type]=\"fieldTextType ? 'text' : 'password'\"\r\n class=\"form-control\"\r\n [id]=\"inputId\"\r\n [(ngModel)]=\"value\"\r\n />\r\n\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"toggleFieldTextType()\">\r\n <i\r\n class=\"fa\"\r\n aria-hidden=\"true\"\r\n [ngClass]=\"{\r\n 'fa-eye-slash': !fieldTextType,\r\n 'fa-eye': fieldTextType\r\n }\"\r\n ></i>\r\n </button>\r\n</div>\r\n" }]
1848
+ }], propDecorators: { inputId: [{
1849
+ type: Input
1850
+ }], formControlName: [{
1851
+ type: Input
1852
+ }] } });
2233
1853
 
2234
- const THEME_SHARED_APPEND_CONTENT = new InjectionToken('THEME_SHARED_APPEND_CONTENT', {
2235
- providedIn: 'root',
2236
- factory: () => {
2237
- const domInsertion = inject(DomInsertionService);
2238
- domInsertion.insertContent(CONTENT_STRATEGY.AppendStyleToHead(styles));
2239
- },
2240
- });
1854
+ class CardBodyComponent {
1855
+ constructor() {
1856
+ this.componentClass = 'card-body';
1857
+ }
1858
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1859
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: CardBodyComponent, isStandalone: true, selector: "abp-card-body", inputs: { cardBodyClass: "cardBodyClass", cardBodyStyle: "cardBodyStyle" }, host: { properties: { "class": "this.componentClass" } }, ngImport: i0, template: ` <div [ngClass]="cardBodyClass" [ngStyle]="cardBodyStyle">
1860
+ <ng-content></ng-content>
1861
+ </div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
1862
+ }
1863
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardBodyComponent, decorators: [{
1864
+ type: Component,
1865
+ args: [{
1866
+ selector: 'abp-card-body',
1867
+ template: ` <div [ngClass]="cardBodyClass" [ngStyle]="cardBodyStyle">
1868
+ <ng-content></ng-content>
1869
+ </div>`,
1870
+ imports: [CommonModule],
1871
+ }]
1872
+ }], propDecorators: { componentClass: [{
1873
+ type: HostBinding,
1874
+ args: ['class']
1875
+ }], cardBodyClass: [{
1876
+ type: Input
1877
+ }], cardBodyStyle: [{
1878
+ type: Input
1879
+ }] } });
2241
1880
 
2242
- class NavItem {
2243
- constructor(props) {
2244
- Object.assign(this, props);
1881
+ class CardComponent {
1882
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1883
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: CardComponent, isStandalone: true, selector: "abp-card", inputs: { cardClass: "cardClass", cardStyle: "cardStyle" }, ngImport: i0, template: ` <div class="card" [ngClass]="cardClass" [ngStyle]="cardStyle">
1884
+ <ng-content></ng-content>
1885
+ </div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
1886
+ }
1887
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardComponent, decorators: [{
1888
+ type: Component,
1889
+ args: [{
1890
+ selector: 'abp-card',
1891
+ template: ` <div class="card" [ngClass]="cardClass" [ngStyle]="cardStyle">
1892
+ <ng-content></ng-content>
1893
+ </div>`,
1894
+ imports: [CommonModule],
1895
+ }]
1896
+ }], propDecorators: { cardClass: [{
1897
+ type: Input
1898
+ }], cardStyle: [{
1899
+ type: Input
1900
+ }] } });
1901
+
1902
+ class CardHeaderComponent {
1903
+ constructor() {
1904
+ this.componentClass = 'card-header';
2245
1905
  }
1906
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1907
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: CardHeaderComponent, isStandalone: true, selector: "abp-card-header", inputs: { cardHeaderClass: "cardHeaderClass", cardHeaderStyle: "cardHeaderStyle" }, host: { properties: { "class": "this.componentClass" } }, ngImport: i0, template: `
1908
+ <div [ngClass]="cardHeaderClass" [ngStyle]="cardHeaderStyle">
1909
+ <ng-content></ng-content>
1910
+ </div>
1911
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
2246
1912
  }
1913
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardHeaderComponent, decorators: [{
1914
+ type: Component,
1915
+ args: [{ selector: 'abp-card-header', template: `
1916
+ <div [ngClass]="cardHeaderClass" [ngStyle]="cardHeaderStyle">
1917
+ <ng-content></ng-content>
1918
+ </div>
1919
+ `, imports: [CommonModule] }]
1920
+ }], propDecorators: { componentClass: [{
1921
+ type: HostBinding,
1922
+ args: ['class']
1923
+ }], cardHeaderClass: [{
1924
+ type: Input
1925
+ }], cardHeaderStyle: [{
1926
+ type: Input
1927
+ }] } });
2247
1928
 
2248
- class AbstractMenuService {
2249
- get items() {
2250
- return this._items$.value;
1929
+ class CardFooterComponent {
1930
+ constructor() {
1931
+ this.componentClass = 'card-footer';
2251
1932
  }
2252
- get items$() {
2253
- return this._items$.asObservable();
1933
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1934
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: CardFooterComponent, isStandalone: true, selector: "abp-card-footer", inputs: { cardFooterStyle: "cardFooterStyle", cardFooterClass: "cardFooterClass" }, host: { properties: { "class": "this.componentClass" } }, ngImport: i0, template: `
1935
+ <div [ngStyle]="cardFooterStyle" [ngClass]="cardFooterClass">
1936
+ <ng-content></ng-content>
1937
+ </div>
1938
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
1939
+ }
1940
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardFooterComponent, decorators: [{
1941
+ type: Component,
1942
+ args: [{ selector: 'abp-card-footer', template: `
1943
+ <div [ngStyle]="cardFooterStyle" [ngClass]="cardFooterClass">
1944
+ <ng-content></ng-content>
1945
+ </div>
1946
+ `, imports: [CommonModule] }]
1947
+ }], propDecorators: { componentClass: [{
1948
+ type: HostBinding,
1949
+ args: ['class']
1950
+ }], cardFooterStyle: [{
1951
+ type: Input
1952
+ }], cardFooterClass: [{
1953
+ type: Input
1954
+ }] } });
1955
+
1956
+ class CardTitleDirective {
1957
+ constructor() {
1958
+ this.directiveClass = 'card-title';
2254
1959
  }
1960
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1961
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: CardTitleDirective, isStandalone: true, selector: "abp-card-title, [abp-card-title], [abpCardTitle]", host: { properties: { "class": "this.directiveClass" } }, ngImport: i0 }); }
1962
+ }
1963
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardTitleDirective, decorators: [{
1964
+ type: Directive,
1965
+ args: [{
1966
+ selector: `abp-card-title, [abp-card-title], [abpCardTitle]`,
1967
+ }]
1968
+ }], propDecorators: { directiveClass: [{
1969
+ type: HostBinding,
1970
+ args: ['class']
1971
+ }] } });
1972
+
1973
+ class CardSubtitleDirective {
2255
1974
  constructor() {
2256
- this._items$ = new BehaviorSubject([]);
2257
- this.sortItems = (a, b) => {
2258
- return this.sortFn(a, b);
2259
- };
2260
- this.sortFn = inject(SORT_COMPARE_FUNC);
1975
+ this.directiveClass = 'card-subtitle';
2261
1976
  }
2262
- addItems(newItems) {
2263
- const items = [...this.items];
2264
- newItems.forEach(item => {
2265
- const index = items.findIndex(i => i.id === item.id);
2266
- const data = new this.baseClass(item);
2267
- if (index > -1) {
2268
- items[index] = data;
2269
- return;
2270
- }
2271
- items.push(data);
2272
- });
2273
- items.sort(this.sortItems);
2274
- this._items$.next(items);
1977
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardSubtitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1978
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: CardSubtitleDirective, isStandalone: true, selector: "abp-card-subtitle, [abp-card-subtitle], [abpCardSubtitle]", host: { properties: { "class": "this.directiveClass" } }, ngImport: i0 }); }
1979
+ }
1980
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardSubtitleDirective, decorators: [{
1981
+ type: Directive,
1982
+ args: [{
1983
+ selector: `abp-card-subtitle, [abp-card-subtitle], [abpCardSubtitle]`,
1984
+ }]
1985
+ }], propDecorators: { directiveClass: [{
1986
+ type: HostBinding,
1987
+ args: ['class']
1988
+ }] } });
1989
+
1990
+ class CardImgTopDirective {
1991
+ constructor() {
1992
+ this.directiveClass = 'card-img-top';
2275
1993
  }
2276
- removeItem(id) {
2277
- const index = this.items.findIndex(item => item.id === id);
2278
- if (index < 0)
2279
- return;
2280
- const items = [...this.items.slice(0, index), ...this.items.slice(index + 1)];
2281
- this._items$.next(items);
1994
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardImgTopDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1995
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: CardImgTopDirective, isStandalone: true, selector: "abp-card-img-top, [abp-card-img-top], [abpCardImgTop]", host: { properties: { "class": "this.directiveClass" } }, ngImport: i0 }); }
1996
+ }
1997
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardImgTopDirective, decorators: [{
1998
+ type: Directive,
1999
+ args: [{
2000
+ selector: `abp-card-img-top, [abp-card-img-top], [abpCardImgTop]`,
2001
+ }]
2002
+ }], propDecorators: { directiveClass: [{
2003
+ type: HostBinding,
2004
+ args: ['class']
2005
+ }] } });
2006
+
2007
+ class CardHeaderDirective {
2008
+ constructor() {
2009
+ this.directiveClass = 'card-header';
2282
2010
  }
2283
- patchItem(id, item) {
2284
- const index = this.items.findIndex(i => i.id === id);
2285
- if (index < 0)
2286
- return;
2287
- const items = [...this.items];
2288
- items[index] = new this.baseClass({ ...items[index], ...item });
2289
- items.sort(this.sortItems);
2290
- this._items$.next(items);
2011
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2012
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: CardHeaderDirective, isStandalone: true, selector: "abp-card-header, [abp-card-header], [abpCardHeader]", host: { properties: { "class": "this.directiveClass" } }, ngImport: i0 }); }
2013
+ }
2014
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardHeaderDirective, decorators: [{
2015
+ type: Directive,
2016
+ args: [{
2017
+ selector: `abp-card-header, [abp-card-header], [abpCardHeader]`,
2018
+ }]
2019
+ }], propDecorators: { directiveClass: [{
2020
+ type: HostBinding,
2021
+ args: ['class']
2022
+ }] } });
2023
+
2024
+ const CARD_DIRECTIVES = [
2025
+ CardTitleDirective,
2026
+ CardSubtitleDirective,
2027
+ CardImgTopDirective,
2028
+ CardHeaderDirective,
2029
+ ];
2030
+ const CARD_COMPONENTS = [
2031
+ CardComponent,
2032
+ CardBodyComponent,
2033
+ CardHeaderComponent,
2034
+ CardFooterComponent,
2035
+ ];
2036
+ class CardModule {
2037
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2038
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.8", ngImport: i0, type: CardModule, imports: [CardComponent,
2039
+ CardBodyComponent,
2040
+ CardHeaderComponent,
2041
+ CardFooterComponent, CardTitleDirective,
2042
+ CardSubtitleDirective,
2043
+ CardImgTopDirective,
2044
+ CardHeaderDirective], exports: [CardComponent,
2045
+ CardBodyComponent,
2046
+ CardHeaderComponent,
2047
+ CardFooterComponent, CardTitleDirective,
2048
+ CardSubtitleDirective,
2049
+ CardImgTopDirective,
2050
+ CardHeaderDirective] }); }
2051
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardModule, imports: [CARD_COMPONENTS] }); }
2052
+ }
2053
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CardModule, decorators: [{
2054
+ type: NgModule,
2055
+ args: [{
2056
+ declarations: [],
2057
+ imports: [...CARD_COMPONENTS, ...CARD_DIRECTIVES],
2058
+ exports: [...CARD_COMPONENTS, ...CARD_DIRECTIVES],
2059
+ }]
2060
+ }] });
2061
+
2062
+ class FormCheckboxComponent extends AbstractNgModelComponent {
2063
+ constructor() {
2064
+ super(...arguments);
2065
+ this.labelClass = 'form-check-label';
2066
+ this.checkboxClass = 'form-check-input';
2067
+ this.checkboxReadonly = false;
2068
+ this.checkboxBlur = new EventEmitter();
2069
+ this.checkboxFocus = new EventEmitter();
2291
2070
  }
2071
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: FormCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2072
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: FormCheckboxComponent, isStandalone: true, selector: "abp-checkbox", inputs: { label: "label", labelClass: "labelClass", checkboxId: "checkboxId", checkboxStyle: "checkboxStyle", checkboxClass: "checkboxClass", checkboxReadonly: "checkboxReadonly" }, outputs: { checkboxBlur: "checkboxBlur", checkboxFocus: "checkboxFocus" }, providers: [
2073
+ {
2074
+ provide: NG_VALUE_ACCESSOR,
2075
+ useExisting: forwardRef(() => FormCheckboxComponent),
2076
+ multi: true,
2077
+ },
2078
+ ], usesInheritance: true, ngImport: i0, template: `
2079
+ <div class="mb-3">
2080
+ <input
2081
+ type="checkbox"
2082
+ [(ngModel)]="value"
2083
+ [id]="checkboxId"
2084
+ [readonly]="checkboxReadonly"
2085
+ [ngClass]="checkboxClass"
2086
+ [ngStyle]="checkboxStyle"
2087
+ (blur)="checkboxBlur.next()"
2088
+ (focus)="checkboxFocus.next()"
2089
+ />
2090
+ @if (label) {
2091
+ <label [ngClass]="labelClass" [for]="checkboxId">
2092
+ {{ label | abpLocalization }}
2093
+ </label>
2094
+ }
2095
+ </div>
2096
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
2292
2097
  }
2098
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: FormCheckboxComponent, decorators: [{
2099
+ type: Component,
2100
+ args: [{
2101
+ selector: 'abp-checkbox',
2102
+ template: `
2103
+ <div class="mb-3">
2104
+ <input
2105
+ type="checkbox"
2106
+ [(ngModel)]="value"
2107
+ [id]="checkboxId"
2108
+ [readonly]="checkboxReadonly"
2109
+ [ngClass]="checkboxClass"
2110
+ [ngStyle]="checkboxStyle"
2111
+ (blur)="checkboxBlur.next()"
2112
+ (focus)="checkboxFocus.next()"
2113
+ />
2114
+ @if (label) {
2115
+ <label [ngClass]="labelClass" [for]="checkboxId">
2116
+ {{ label | abpLocalization }}
2117
+ </label>
2118
+ }
2119
+ </div>
2120
+ `,
2121
+ providers: [
2122
+ {
2123
+ provide: NG_VALUE_ACCESSOR,
2124
+ useExisting: forwardRef(() => FormCheckboxComponent),
2125
+ multi: true,
2126
+ },
2127
+ ],
2128
+ imports: [CommonModule, FormsModule, LocalizationPipe],
2129
+ }]
2130
+ }], propDecorators: { label: [{
2131
+ type: Input
2132
+ }], labelClass: [{
2133
+ type: Input
2134
+ }], checkboxId: [{
2135
+ type: Input
2136
+ }], checkboxStyle: [{
2137
+ type: Input
2138
+ }], checkboxClass: [{
2139
+ type: Input
2140
+ }], checkboxReadonly: [{
2141
+ type: Input
2142
+ }], checkboxBlur: [{
2143
+ type: Output
2144
+ }], checkboxFocus: [{
2145
+ type: Output
2146
+ }] } });
2293
2147
 
2294
- class NavItemsService extends AbstractMenuService {
2148
+ class FormInputComponent extends AbstractNgModelComponent {
2295
2149
  constructor() {
2296
2150
  super(...arguments);
2297
- this.baseClass = NavItem;
2151
+ this.inputReadonly = false;
2152
+ this.label = '';
2153
+ this.labelClass = 'form-label';
2154
+ this.inputPlaceholder = '';
2155
+ this.inputClass = 'form-control';
2156
+ this.formBlur = new EventEmitter();
2157
+ this.formFocus = new EventEmitter();
2298
2158
  }
2299
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NavItemsService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2300
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NavItemsService, providedIn: 'root' }); }
2159
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: FormInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2160
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: FormInputComponent, isStandalone: true, selector: "abp-form-input", inputs: { inputId: "inputId", inputReadonly: "inputReadonly", label: "label", labelClass: "labelClass", inputPlaceholder: "inputPlaceholder", inputStyle: "inputStyle", inputClass: "inputClass" }, outputs: { formBlur: "formBlur", formFocus: "formFocus" }, providers: [
2161
+ {
2162
+ provide: NG_VALUE_ACCESSOR,
2163
+ useExisting: forwardRef(() => FormInputComponent),
2164
+ multi: true,
2165
+ },
2166
+ ], usesInheritance: true, ngImport: i0, template: `
2167
+ <div class="mb-3">
2168
+ @if (label) {
2169
+ <label [ngClass]="labelClass" [for]="inputId">
2170
+ {{ label | abpLocalization }}
2171
+ </label>
2172
+ }
2173
+ <input
2174
+ type="text"
2175
+ [id]="inputId"
2176
+ [placeholder]="inputPlaceholder"
2177
+ [readonly]="inputReadonly"
2178
+ [ngClass]="inputClass"
2179
+ [ngStyle]="inputStyle"
2180
+ (blur)="formBlur.next()"
2181
+ (focus)="formFocus.next()"
2182
+ [(ngModel)]="value"
2183
+ />
2184
+ </div>
2185
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
2301
2186
  }
2302
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NavItemsService, decorators: [{
2303
- type: Injectable,
2304
- args: [{ providedIn: 'root' }]
2305
- }] });
2187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: FormInputComponent, decorators: [{
2188
+ type: Component,
2189
+ args: [{
2190
+ selector: 'abp-form-input',
2191
+ template: `
2192
+ <div class="mb-3">
2193
+ @if (label) {
2194
+ <label [ngClass]="labelClass" [for]="inputId">
2195
+ {{ label | abpLocalization }}
2196
+ </label>
2197
+ }
2198
+ <input
2199
+ type="text"
2200
+ [id]="inputId"
2201
+ [placeholder]="inputPlaceholder"
2202
+ [readonly]="inputReadonly"
2203
+ [ngClass]="inputClass"
2204
+ [ngStyle]="inputStyle"
2205
+ (blur)="formBlur.next()"
2206
+ (focus)="formFocus.next()"
2207
+ [(ngModel)]="value"
2208
+ />
2209
+ </div>
2210
+ `,
2211
+ providers: [
2212
+ {
2213
+ provide: NG_VALUE_ACCESSOR,
2214
+ useExisting: forwardRef(() => FormInputComponent),
2215
+ multi: true,
2216
+ },
2217
+ ],
2218
+ imports: [CommonModule, LocalizationPipe, FormsModule],
2219
+ }]
2220
+ }], propDecorators: { inputId: [{
2221
+ type: Input
2222
+ }], inputReadonly: [{
2223
+ type: Input
2224
+ }], label: [{
2225
+ type: Input
2226
+ }], labelClass: [{
2227
+ type: Input
2228
+ }], inputPlaceholder: [{
2229
+ type: Input
2230
+ }], inputStyle: [{
2231
+ type: Input
2232
+ }], inputClass: [{
2233
+ type: Input
2234
+ }], formBlur: [{
2235
+ type: Output
2236
+ }], formFocus: [{
2237
+ type: Output
2238
+ }] } });
2306
2239
 
2307
- class PageAlertService {
2240
+ class InternetConnectionStatusComponent {
2308
2241
  constructor() {
2309
- this.alerts = new InternalStore([]);
2310
- this.alerts$ = this.alerts.sliceState(state => state);
2311
- }
2312
- show(alert) {
2313
- const newAlert = {
2314
- ...alert,
2315
- dismissible: alert.dismissible ?? true,
2316
- };
2317
- this.alerts.set([newAlert, ...this.alerts.state]);
2318
- }
2319
- remove(index) {
2320
- const alerts = [...this.alerts.state];
2321
- alerts.splice(index, 1);
2322
- this.alerts.set(alerts);
2242
+ this.internetConnectionService = inject(InternetConnectionService);
2243
+ this.isOnline = this.internetConnectionService.networkStatus;
2323
2244
  }
2324
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: PageAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2325
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: PageAlertService, providedIn: 'root' }); }
2245
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: InternetConnectionStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2246
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: InternetConnectionStatusComponent, isStandalone: true, selector: "abp-internet-status", ngImport: i0, template: `
2247
+ @if (!isOnline()) {
2248
+ <div class="status-icon">
2249
+ <i
2250
+ ngbTooltip="{{ 'AbpUi::InternetConnectionInfo' | abpLocalization }}"
2251
+ container="body"
2252
+ placement="left-top"
2253
+ class="fa fa-wifi text-blinking blink"
2254
+ >
2255
+ </i>
2256
+ </div>
2257
+ }
2258
+ `, isInline: true, styles: [".blink{animation:blinker .9s cubic-bezier(.5,0,1,1) infinite alternate}@keyframes blinker{0%{color:#c1c1c1}70%{color:#fa2379}to{color:#fa2379}}.text-blinking{font-size:30px}.status-icon{position:fixed;z-index:999999;top:50%;left:50%;width:30px;text-align:center;margin-left:-15px;margin-top:-15px;translate:transform(-50%,-50%)}\n"], dependencies: [{ kind: "ngmodule", type: LocalizationModule }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }, { kind: "directive", type: NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }] }); }
2326
2259
  }
2327
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: PageAlertService, decorators: [{
2328
- type: Injectable,
2329
- args: [{ providedIn: 'root' }]
2260
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: InternetConnectionStatusComponent, decorators: [{
2261
+ type: Component,
2262
+ args: [{ selector: 'abp-internet-status', imports: [LocalizationModule, NgbTooltip], template: `
2263
+ @if (!isOnline()) {
2264
+ <div class="status-icon">
2265
+ <i
2266
+ ngbTooltip="{{ 'AbpUi::InternetConnectionInfo' | abpLocalization }}"
2267
+ container="body"
2268
+ placement="left-top"
2269
+ class="fa fa-wifi text-blinking blink"
2270
+ >
2271
+ </i>
2272
+ </div>
2273
+ }
2274
+ `, styles: [".blink{animation:blinker .9s cubic-bezier(.5,0,1,1) infinite alternate}@keyframes blinker{0%{color:#c1c1c1}70%{color:#fa2379}to{color:#fa2379}}.text-blinking{font-size:30px}.status-icon{position:fixed;z-index:999999;top:50%;left:50%;width:30px;text-align:center;margin-left:-15px;margin-top:-15px;translate:transform(-50%,-50%)}\n"] }]
2330
2275
  }] });
2331
2276
 
2332
- class ToasterService {
2333
- setContainer() {
2334
- this.containerComponentRef = this.contentProjectionService.projectContent(PROJECTION_STRATEGY.AppendComponentToBody(ToastContainerComponent, {
2335
- toasts$: this.toasts$,
2336
- remove: this.remove,
2337
- }));
2338
- this.containerComponentRef.changeDetectorRef.detectChanges();
2339
- }
2340
- constructor() {
2341
- this.toasts$ = new ReplaySubject(1);
2342
- this.lastId = -1;
2343
- this.toasts = [];
2344
- /**
2345
- * Removes the toast with given id.
2346
- * @param id ID of the toast to be removed.
2347
- */
2348
- this.remove = (id) => {
2349
- this.toasts = this.toasts.filter(toast => toast.options?.id !== id);
2350
- this.toasts$.next(this.toasts);
2351
- };
2352
- this.contentProjectionService = inject(ContentProjectionService);
2353
- }
2354
- /**
2355
- * Creates an info toast with given parameters.
2356
- * @param message Content of the toast
2357
- * @param title Title of the toast
2358
- * @param options Spesific style or structural options for individual toast
2359
- */
2360
- info(message, title, options) {
2361
- return this.show(message, title, 'info', options);
2362
- }
2363
- /**
2364
- * Creates a success toast with given parameters.
2365
- * @param message Content of the toast
2366
- * @param title Title of the toast
2367
- * @param options Spesific style or structural options for individual toast
2368
- */
2369
- success(message, title, options) {
2370
- return this.show(message, title, 'success', options);
2277
+ class SpinnerComponent {
2278
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2279
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: SpinnerComponent, isStandalone: true, selector: "abp-spinner", ngImport: i0, template: `
2280
+ <div class="d-flex justify-content-center align-items-center border-top" style="height: 62px">
2281
+ <div class="spinner-border" role="status" id="loading">
2282
+ <span class="visually-hidden">Loading...</span>
2283
+ </div>
2284
+ </div>
2285
+ `, isInline: true }); }
2286
+ }
2287
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: SpinnerComponent, decorators: [{
2288
+ type: Component,
2289
+ args: [{
2290
+ selector: 'abp-spinner',
2291
+ template: `
2292
+ <div class="d-flex justify-content-center align-items-center border-top" style="height: 62px">
2293
+ <div class="spinner-border" role="status" id="loading">
2294
+ <span class="visually-hidden">Loading...</span>
2295
+ </div>
2296
+ </div>
2297
+ `,
2298
+ }]
2299
+ }] });
2300
+
2301
+ class EllipsisDirective {
2302
+ get inlineClass() {
2303
+ return this.enabled && this.width;
2371
2304
  }
2372
- /**
2373
- * Creates a warning toast with given parameters.
2374
- * @param message Content of the toast
2375
- * @param title Title of the toast
2376
- * @param options Spesific style or structural options for individual toast
2377
- */
2378
- warn(message, title, options) {
2379
- return this.show(message, title, 'warning', options);
2305
+ get class() {
2306
+ return this.enabled && !this.width;
2380
2307
  }
2381
- /**
2382
- * Creates an error toast with given parameters.
2383
- * @param message Content of the toast
2384
- * @param title Title of the toast
2385
- * @param options Spesific style or structural options for individual toast
2386
- */
2387
- error(message, title, options) {
2388
- return this.show(message, title, 'error', options);
2308
+ get maxWidth() {
2309
+ return this.enabled && this.width ? this.width || '170px' : undefined;
2389
2310
  }
2390
- /**
2391
- * Creates a toast with given parameters.
2392
- * @param message Content of the toast
2393
- * @param title Title of the toast
2394
- * @param severity Sets color of the toast. "success", "warning" etc.
2395
- * @param options Spesific style or structural options for individual toast
2396
- */
2397
- show(message, title = undefined, severity = 'neutral', options = {}) {
2398
- if (!this.containerComponentRef)
2399
- this.setContainer();
2400
- const id = ++this.lastId;
2401
- this.toasts.push({
2402
- message,
2403
- title,
2404
- severity,
2405
- options: { closable: true, id, ...options },
2406
- });
2407
- this.toasts$.next(this.toasts);
2408
- return id;
2311
+ constructor(cdRef, elRef) {
2312
+ this.cdRef = cdRef;
2313
+ this.elRef = elRef;
2314
+ this.enabled = true;
2409
2315
  }
2410
- /**
2411
- * Removes all open toasts at once.
2412
- */
2413
- clear(containerKey) {
2414
- this.toasts = !containerKey
2415
- ? []
2416
- : this.toasts.filter(toast => toast.options?.containerKey !== containerKey);
2417
- this.toasts$.next(this.toasts);
2316
+ ngAfterViewInit() {
2317
+ this.title = this.title || this.elRef.nativeElement.innerText;
2318
+ this.cdRef.detectChanges();
2418
2319
  }
2419
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ToasterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2420
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ToasterService, providedIn: 'root' }); }
2320
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: EllipsisDirective, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2321
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: EllipsisDirective, isStandalone: true, selector: "[abpEllipsis]", inputs: { width: ["abpEllipsis", "width"], title: "title", enabled: ["abpEllipsisEnabled", "enabled"] }, host: { properties: { "title": "this.title", "class.abp-ellipsis-inline": "this.inlineClass", "class.abp-ellipsis": "this.class", "style.max-width": "this.maxWidth" } }, ngImport: i0 }); }
2421
2322
  }
2422
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ToasterService, decorators: [{
2423
- type: Injectable,
2323
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: EllipsisDirective, decorators: [{
2324
+ type: Directive,
2424
2325
  args: [{
2425
- providedIn: 'root',
2326
+ selector: '[abpEllipsis]',
2426
2327
  }]
2427
- }], ctorParameters: () => [] });
2428
-
2429
- class UserMenu extends NavItem {
2430
- }
2431
-
2432
- class UserMenuService extends AbstractMenuService {
2433
- constructor() {
2434
- super(...arguments);
2435
- this.baseClass = UserMenu;
2436
- }
2437
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: UserMenuService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2438
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: UserMenuService, providedIn: 'root' }); }
2439
- }
2440
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: UserMenuService, decorators: [{
2441
- type: Injectable,
2442
- args: [{ providedIn: 'root' }]
2443
- }] });
2328
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { width: [{
2329
+ type: Input,
2330
+ args: ['abpEllipsis']
2331
+ }], title: [{
2332
+ type: HostBinding,
2333
+ args: ['title']
2334
+ }, {
2335
+ type: Input
2336
+ }], enabled: [{
2337
+ type: Input,
2338
+ args: ['abpEllipsisEnabled']
2339
+ }], inlineClass: [{
2340
+ type: HostBinding,
2341
+ args: ['class.abp-ellipsis-inline']
2342
+ }], class: [{
2343
+ type: HostBinding,
2344
+ args: ['class.abp-ellipsis']
2345
+ }], maxWidth: [{
2346
+ type: HostBinding,
2347
+ args: ['style.max-width']
2348
+ }] } });
2444
2349
 
2445
- class CreateErrorComponentService {
2446
- constructor() {
2447
- this.document = inject(DOCUMENT);
2448
- this.rendererFactory = inject(RendererFactory2);
2449
- this.routerEvents = inject(RouterEvents);
2450
- this.injector = inject(Injector);
2451
- this.envInjector = inject(EnvironmentInjector);
2452
- this.httpErrorConfig = inject(HTTP_ERROR_CONFIG);
2453
- this.componentRef = null;
2454
- this.listenToRouterDataResolved();
2350
+ class LoadingDirective {
2351
+ get loading() {
2352
+ return this._loading;
2455
2353
  }
2456
- listenToRouterDataResolved() {
2457
- this.routerEvents
2458
- .getEvents(ResolveEnd)
2459
- .pipe(filter(() => !!this.componentRef))
2460
- .subscribe(() => {
2461
- this.componentRef?.destroy();
2462
- this.componentRef = null;
2463
- });
2354
+ set loading(newValue) {
2355
+ setTimeout(() => {
2356
+ if (!newValue && this.timerSubscription) {
2357
+ this.timerSubscription.unsubscribe();
2358
+ this.timerSubscription = null;
2359
+ this._loading = newValue;
2360
+ if (this.rootNode) {
2361
+ this.renderer.removeChild(this.rootNode.parentElement, this.rootNode);
2362
+ this.rootNode = null;
2363
+ }
2364
+ return;
2365
+ }
2366
+ this.timerSubscription = timer(this.delay)
2367
+ .pipe(take(1))
2368
+ .subscribe(() => {
2369
+ if (!this.componentRef) {
2370
+ this.componentRef = this.cdRes
2371
+ .resolveComponentFactory(LoadingComponent)
2372
+ .create(this.injector);
2373
+ }
2374
+ if (newValue && !this.rootNode) {
2375
+ this.rootNode = this.componentRef.hostView.rootNodes[0];
2376
+ this.targetElement?.appendChild(this.rootNode);
2377
+ }
2378
+ else if (this.rootNode) {
2379
+ this.renderer.removeChild(this.rootNode.parentElement, this.rootNode);
2380
+ this.rootNode = null;
2381
+ }
2382
+ this._loading = newValue;
2383
+ this.timerSubscription = null;
2384
+ });
2385
+ }, 0);
2464
2386
  }
2465
- getErrorHostElement() {
2466
- return this.document.body;
2387
+ constructor(elRef, vcRef, cdRes, injector, renderer) {
2388
+ this.elRef = elRef;
2389
+ this.vcRef = vcRef;
2390
+ this.cdRes = cdRes;
2391
+ this.injector = injector;
2392
+ this.renderer = renderer;
2393
+ this.position = 'relative';
2394
+ this.delay = 0;
2395
+ this.rootNode = null;
2396
+ this.timerSubscription = null;
2467
2397
  }
2468
- isCloseIconHidden() {
2469
- return !!this.httpErrorConfig?.errorScreen?.hideCloseIcon;
2398
+ ngOnInit() {
2399
+ if (!this.targetElement) {
2400
+ const { offsetHeight, offsetWidth } = this.elRef.nativeElement;
2401
+ if (!offsetHeight && !offsetWidth && this.elRef.nativeElement.children.length) {
2402
+ this.targetElement = this.elRef.nativeElement.children[0];
2403
+ }
2404
+ else {
2405
+ this.targetElement = this.elRef.nativeElement;
2406
+ }
2407
+ }
2470
2408
  }
2471
- canCreateCustomError(status) {
2472
- const { component, forWhichErrors } = this.httpErrorConfig?.errorScreen || {};
2473
- if (!component || !forWhichErrors) {
2474
- return false;
2409
+ ngOnDestroy() {
2410
+ if (this.timerSubscription) {
2411
+ this.timerSubscription.unsubscribe();
2475
2412
  }
2476
- return forWhichErrors.indexOf(status) > -1;
2477
2413
  }
2478
- execute(instance) {
2479
- const renderer = this.rendererFactory.createRenderer(null, null);
2480
- const hostElement = this.getErrorHostElement();
2481
- const host = renderer.selectRootElement(hostElement, true);
2482
- this.componentRef = createComponent(HttpErrorWrapperComponent, {
2483
- environmentInjector: this.envInjector,
2484
- });
2485
- for (const key in instance) {
2486
- /* istanbul ignore else */
2487
- if (Object.prototype.hasOwnProperty.call(this.componentRef.instance, key)) {
2488
- this.componentRef.instance[key] = instance[key];
2414
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LoadingDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
2415
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: LoadingDirective, isStandalone: true, selector: "[abpLoading]", inputs: { loading: ["abpLoading", "loading"], targetElement: ["abpLoadingTargetElement", "targetElement"], delay: ["abpLoadingDelay", "delay"] }, host: { properties: { "style.position": "this.position" } }, ngImport: i0 }); }
2416
+ }
2417
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LoadingDirective, decorators: [{
2418
+ type: Directive,
2419
+ args: [{
2420
+ selector: '[abpLoading]',
2421
+ }]
2422
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: i0.Renderer2 }], propDecorators: { position: [{
2423
+ type: HostBinding,
2424
+ args: ['style.position']
2425
+ }], loading: [{
2426
+ type: Input,
2427
+ args: ['abpLoading']
2428
+ }], targetElement: [{
2429
+ type: Input,
2430
+ args: ['abpLoadingTargetElement']
2431
+ }], delay: [{
2432
+ type: Input,
2433
+ args: ['abpLoadingDelay']
2434
+ }] } });
2435
+
2436
+ class NgxDatatableDefaultDirective {
2437
+ get classes() {
2438
+ return `ngx-datatable ${this.class}`;
2439
+ }
2440
+ constructor(table, document) {
2441
+ this.table = table;
2442
+ this.document = document;
2443
+ this.subscription = new Subscription();
2444
+ this.resizeDiff = 0;
2445
+ this.class = 'material bordered';
2446
+ this.table.columnMode = ColumnMode.force;
2447
+ this.table.footerHeight = 50;
2448
+ this.table.headerHeight = 50;
2449
+ this.table.rowHeight = 'auto';
2450
+ this.table.scrollbarH = true;
2451
+ this.table.virtualization = false;
2452
+ }
2453
+ fixHorizontalGap(scroller) {
2454
+ const { body, documentElement } = this.document;
2455
+ if (documentElement.scrollHeight !== documentElement.clientHeight) {
2456
+ if (this.resizeDiff === 0) {
2457
+ this.resizeDiff = window.innerWidth - body.offsetWidth;
2458
+ scroller.scrollWidth -= this.resizeDiff;
2489
2459
  }
2490
2460
  }
2491
- this.componentRef.instance.hideCloseIcon = this.isCloseIconHidden();
2492
- const appRef = this.injector.get(ApplicationRef);
2493
- if (this.canCreateCustomError(instance.status)) {
2494
- this.componentRef.instance.appRef = appRef;
2495
- this.componentRef.instance.environmentInjector = this.envInjector;
2496
- this.componentRef.instance.customComponent = this.httpErrorConfig.errorScreen?.component;
2461
+ else {
2462
+ scroller.scrollWidth += this.resizeDiff;
2463
+ this.resizeDiff = 0;
2497
2464
  }
2498
- appRef.attachView(this.componentRef.hostView);
2499
- renderer.appendChild(host, this.componentRef.hostView.rootNodes[0]);
2500
- const destroy$ = new Subject();
2501
- this.componentRef.instance.destroy$ = destroy$;
2502
- destroy$.subscribe(() => {
2503
- this.componentRef?.destroy();
2504
- this.componentRef = null;
2505
- });
2506
2465
  }
2507
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CreateErrorComponentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2508
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CreateErrorComponentService, providedIn: 'root' }); }
2509
- }
2510
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: CreateErrorComponentService, decorators: [{
2511
- type: Injectable,
2512
- args: [{ providedIn: 'root' }]
2513
- }], ctorParameters: () => [] });
2514
-
2515
- function getErrorFromRequestBody(body) {
2516
- let message;
2517
- let title;
2518
- if (body.details) {
2519
- message = body.details;
2520
- title = body.message;
2466
+ fixStyleOnWindowResize() {
2467
+ // avoided @HostListener('window:resize') in favor of performance
2468
+ const subscription = fromEvent(window, 'resize')
2469
+ .pipe(debounceTime(500))
2470
+ .subscribe(() => {
2471
+ const { scroller } = this.table.bodyComponent;
2472
+ if (!scroller)
2473
+ return;
2474
+ this.fixHorizontalGap(scroller);
2475
+ });
2476
+ this.subscription.add(subscription);
2521
2477
  }
2522
- else if (body.message) {
2523
- title = {
2524
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
2525
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
2526
- };
2527
- message = body.message;
2478
+ ngAfterViewInit() {
2479
+ this.fixStyleOnWindowResize();
2528
2480
  }
2529
- else {
2530
- message = {
2531
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
2532
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
2533
- };
2534
- title = '';
2481
+ ngOnDestroy() {
2482
+ this.subscription.unsubscribe();
2535
2483
  }
2536
- return { message, title };
2484
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NgxDatatableDefaultDirective, deps: [{ token: i1$2.DatatableComponent }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive }); }
2485
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: NgxDatatableDefaultDirective, isStandalone: true, selector: "ngx-datatable[default]", inputs: { class: "class" }, host: { properties: { "class": "this.classes" } }, exportAs: ["ngxDatatableDefault"], ngImport: i0 }); }
2537
2486
  }
2487
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NgxDatatableDefaultDirective, decorators: [{
2488
+ type: Directive,
2489
+ args: [{
2490
+ // eslint-disable-next-line @angular-eslint/directive-selector
2491
+ selector: 'ngx-datatable[default]',
2492
+ exportAs: 'ngxDatatableDefault',
2493
+ }]
2494
+ }], ctorParameters: () => [{ type: i1$2.DatatableComponent }, { type: undefined, decorators: [{
2495
+ type: Inject,
2496
+ args: [DOCUMENT]
2497
+ }] }], propDecorators: { class: [{
2498
+ type: Input
2499
+ }], classes: [{
2500
+ type: HostBinding,
2501
+ args: ['class']
2502
+ }] } });
2538
2503
 
2539
- class AbpFormatErrorHandlerService {
2504
+ class NgxDatatableListDirective {
2540
2505
  constructor() {
2541
- this.priority = CUSTOM_HTTP_ERROR_HANDLER_PRIORITY.high;
2542
- this.confirmationService = inject(ConfirmationService);
2543
- this.authService = inject(AuthService);
2544
- this.error = undefined;
2506
+ this.table = inject(DatatableComponent);
2507
+ this.cdRef = inject(ChangeDetectorRef);
2508
+ this.destroyRef = inject(DestroyRef);
2509
+ this.localizationService = inject(LocalizationService);
2510
+ this.ngxDatatableMessages = inject(NGX_DATATABLE_MESSAGES, { optional: true });
2511
+ this.viewContainerRef = inject(ViewContainerRef);
2512
+ this.renderer = inject(Renderer2);
2513
+ this.setInitialValues();
2545
2514
  }
2546
- navigateToLogin() {
2547
- return this.authService.navigateToLogin();
2515
+ ngDoCheck() {
2516
+ this.refreshPageIfDataExist();
2548
2517
  }
2549
- canHandle(error) {
2550
- if (error instanceof HttpErrorResponse && error.headers.get('_AbpErrorFormat')) {
2551
- this.error = error;
2552
- return true;
2518
+ ngOnInit() {
2519
+ this.subscribeToPage();
2520
+ this.subscribeToSort();
2521
+ this.subscribeToRequestStatus();
2522
+ }
2523
+ ngOnChanges({ list }) {
2524
+ this.subscribeToQuery();
2525
+ if (!list.firstChange)
2526
+ return;
2527
+ const { maxResultCount, page } = list.currentValue;
2528
+ this.table.limit = maxResultCount;
2529
+ this.table.offset = page;
2530
+ }
2531
+ subscribeToRequestStatus() {
2532
+ const requestStatus$ = this.list.requestStatus$.pipe(distinctUntilChanged());
2533
+ const { emptyMessage, errorMessage } = this.ngxDatatableMessages || defaultNgxDatatableMessages;
2534
+ requestStatus$.subscribe(status => {
2535
+ this.table.loadingIndicator = false;
2536
+ if (status === 'idle') {
2537
+ return;
2538
+ }
2539
+ if (status === 'loading') {
2540
+ this.table.messages.emptyMessage = undefined;
2541
+ this.table.loadingIndicator = true;
2542
+ this.cdRef.detectChanges();
2543
+ this.updateLoadingIndicator();
2544
+ return;
2545
+ }
2546
+ if (status === 'error') {
2547
+ this.table.messages.emptyMessage = this.localizationService.instant(errorMessage);
2548
+ this.viewContainerRef.clear();
2549
+ this.cdRef.markForCheck();
2550
+ }
2551
+ if (status === 'success') {
2552
+ this.table.messages.emptyMessage = this.localizationService.instant(emptyMessage);
2553
+ this.viewContainerRef.clear();
2554
+ }
2555
+ });
2556
+ }
2557
+ updateLoadingIndicator() {
2558
+ const body = this.table.element.querySelector('datatable-body');
2559
+ const progress = this.table.element.querySelector('datatable-progress');
2560
+ if (!body) {
2561
+ return;
2562
+ }
2563
+ if (progress) {
2564
+ this.replaceLoadingIndicator(body, progress);
2553
2565
  }
2554
- return false;
2555
2566
  }
2556
- execute() {
2557
- const { message, title } = getErrorFromRequestBody(this.error?.error?.error);
2558
- this.confirmationService
2559
- .error(message, title, {
2560
- hideCancelBtn: true,
2561
- yesText: 'AbpAccount::Close',
2562
- })
2563
- .subscribe(() => {
2564
- if (this.error?.status === 401) {
2565
- this.navigateToLogin();
2567
+ replaceLoadingIndicator(parent, placeholder) {
2568
+ this.viewContainerRef.clear();
2569
+ const spinnerRef = this.viewContainerRef.createComponent(SpinnerComponent);
2570
+ const spinnerElement = spinnerRef.location.nativeElement;
2571
+ this.renderer.insertBefore(parent, spinnerElement, placeholder);
2572
+ this.renderer.removeChild(parent, placeholder);
2573
+ }
2574
+ setInitialValues() {
2575
+ this.table.externalPaging = true;
2576
+ this.table.externalSorting = true;
2577
+ const { selectedMessage, totalMessage } = this.ngxDatatableMessages || defaultNgxDatatableMessages;
2578
+ this.table.messages = {
2579
+ totalMessage: this.localizationService.instant(totalMessage),
2580
+ selectedMessage: this.localizationService.instant(selectedMessage),
2581
+ };
2582
+ }
2583
+ subscribeToSort() {
2584
+ this.table.sort
2585
+ .pipe(takeUntilDestroyed(this.destroyRef))
2586
+ .subscribe(({ sorts: [{ prop, dir }] }) => {
2587
+ if (prop === this.list.sortKey && this.list.sortOrder === 'desc') {
2588
+ this.list.sortKey = '';
2589
+ this.list.sortOrder = '';
2590
+ this.table.sorts = [];
2591
+ this.cdRef.detectChanges();
2592
+ }
2593
+ else {
2594
+ this.list.sortKey = prop;
2595
+ this.list.sortOrder = dir;
2566
2596
  }
2567
2597
  });
2568
2598
  }
2569
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AbpFormatErrorHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2570
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AbpFormatErrorHandlerService, providedIn: 'root' }); }
2571
- }
2572
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AbpFormatErrorHandlerService, decorators: [{
2573
- type: Injectable,
2574
- args: [{ providedIn: 'root' }]
2575
- }] });
2576
-
2577
- class TenantResolveErrorHandlerService {
2578
- constructor() {
2579
- this.sessionService = inject(SessionStateService);
2580
- this.priority = CUSTOM_HTTP_ERROR_HANDLER_PRIORITY.high;
2581
- this.authService = inject(AuthService);
2599
+ subscribeToPage() {
2600
+ this.table.page.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(({ offset }) => {
2601
+ this.setTablePage(offset);
2602
+ });
2582
2603
  }
2583
- isTenantResolveError(error) {
2584
- return error instanceof HttpErrorResponse && !!error.headers.get('Abp-Tenant-Resolve-Error');
2604
+ subscribeToQuery() {
2605
+ this.list.query$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
2606
+ const offset = this.list.page;
2607
+ if (this.table.offset !== offset)
2608
+ this.table.offset = offset;
2609
+ });
2585
2610
  }
2586
- canHandle(error) {
2587
- return this.isTenantResolveError(error);
2611
+ setTablePage(pageNum) {
2612
+ this.list.page = pageNum;
2613
+ this.table.offset = pageNum;
2588
2614
  }
2589
- execute() {
2590
- this.sessionService.setTenant(null);
2591
- this.authService.logout().subscribe();
2615
+ refreshPageIfDataExist() {
2616
+ if (this.table.rows?.length < 1 && this.table.count > 0) {
2617
+ let maxPage = Math.floor(Number(this.table.count / this.list.maxResultCount));
2618
+ if (this.table.count < this.list.maxResultCount) {
2619
+ this.setTablePage(0);
2620
+ return;
2621
+ }
2622
+ if (this.table.count % this.list.maxResultCount === 0) {
2623
+ maxPage -= 1;
2624
+ }
2625
+ if (this.list.page < maxPage) {
2626
+ this.setTablePage(this.list.page);
2627
+ return;
2628
+ }
2629
+ this.setTablePage(maxPage);
2630
+ }
2592
2631
  }
2593
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: TenantResolveErrorHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2594
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: TenantResolveErrorHandlerService, providedIn: 'root' }); }
2632
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NgxDatatableListDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2633
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: NgxDatatableListDirective, isStandalone: true, selector: "ngx-datatable[list]", inputs: { list: "list" }, exportAs: ["ngxDatatableList"], usesOnChanges: true, ngImport: i0 }); }
2595
2634
  }
2596
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: TenantResolveErrorHandlerService, decorators: [{
2597
- type: Injectable,
2598
- args: [{ providedIn: 'root' }]
2599
- }] });
2635
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NgxDatatableListDirective, decorators: [{
2636
+ type: Directive,
2637
+ args: [{
2638
+ // eslint-disable-next-line @angular-eslint/directive-selector
2639
+ selector: 'ngx-datatable[list]',
2640
+ exportAs: 'ngxDatatableList',
2641
+ }]
2642
+ }], ctorParameters: () => [], propDecorators: { list: [{
2643
+ type: Input
2644
+ }] } });
2600
2645
 
2601
- class StatusCodeErrorHandlerService {
2602
- constructor() {
2603
- this.confirmationService = inject(ConfirmationService);
2604
- this.createErrorComponentService = inject(CreateErrorComponentService);
2605
- this.authService = inject(AuthService);
2606
- this.handledStatusCodes = [401, 403, 404, 500];
2607
- this.priority = CUSTOM_HTTP_ERROR_HANDLER_PRIORITY.normal;
2646
+ class AbpVisibleDirective {
2647
+ set abpVisible(value) {
2648
+ this.condition$ = checkType(value);
2649
+ this.subscribeToCondition();
2650
+ }
2651
+ constructor(viewContainerRef, templateRef) {
2652
+ this.viewContainerRef = viewContainerRef;
2653
+ this.templateRef = templateRef;
2654
+ this.condition$ = of(false);
2608
2655
  }
2609
- navigateToLogin() {
2610
- this.authService.navigateToLogin();
2656
+ ngOnInit() {
2657
+ this.updateVisibility();
2611
2658
  }
2612
- showConfirmation(message, title) {
2613
- return this.confirmationService.error(message, title, {
2614
- hideCancelBtn: true,
2615
- yesText: 'AbpAccount::Close',
2659
+ ngOnDestroy() {
2660
+ this.conditionSubscription?.unsubscribe();
2661
+ }
2662
+ subscribeToCondition() {
2663
+ this.conditionSubscription = this.condition$.subscribe(value => {
2664
+ this.isVisible = value;
2665
+ this.updateVisibility();
2616
2666
  });
2617
2667
  }
2618
- showPage() {
2619
- const key = `defaultError${this.status}`;
2620
- const shouldRemoveDetail = [401, 404].indexOf(this.status) > -1;
2621
- const instance = {
2622
- title: {
2623
- key: DEFAULT_ERROR_LOCALIZATIONS[key]?.title,
2624
- defaultValue: DEFAULT_ERROR_MESSAGES[key]?.title,
2625
- },
2626
- details: {
2627
- key: DEFAULT_ERROR_LOCALIZATIONS[key]?.details,
2628
- defaultValue: DEFAULT_ERROR_MESSAGES[key]?.details,
2629
- },
2630
- status: this.status,
2631
- };
2632
- if (shouldRemoveDetail) {
2633
- delete instance.details;
2668
+ updateVisibility() {
2669
+ this.viewContainerRef.clear();
2670
+ // it should be false not falsy
2671
+ if (this.isVisible === false) {
2672
+ return;
2634
2673
  }
2635
- this.createErrorComponentService.execute(instance);
2674
+ this.viewContainerRef.createEmbeddedView(this.templateRef);
2636
2675
  }
2637
- canHandle(error) {
2638
- this.status = error?.status || 0;
2639
- return this.handledStatusCodes.indexOf(this.status) > -1;
2676
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AbpVisibleDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2677
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: AbpVisibleDirective, isStandalone: true, selector: "[abpVisible]", inputs: { abpVisible: "abpVisible" }, ngImport: i0 }); }
2678
+ }
2679
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AbpVisibleDirective, decorators: [{
2680
+ type: Directive,
2681
+ args: [{
2682
+ selector: '[abpVisible]',
2683
+ }]
2684
+ }], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }], propDecorators: { abpVisible: [{
2685
+ type: Input
2686
+ }] } });
2687
+ function checkType(value) {
2688
+ if (value instanceof Promise) {
2689
+ return from(value);
2640
2690
  }
2641
- execute() {
2642
- const key = `defaultError${this.status}`;
2643
- const title = {
2644
- key: DEFAULT_ERROR_LOCALIZATIONS[key]?.title,
2645
- defaultValue: DEFAULT_ERROR_MESSAGES[key]?.title,
2646
- };
2647
- const message = {
2648
- key: DEFAULT_ERROR_LOCALIZATIONS[key]?.details,
2649
- defaultValue: DEFAULT_ERROR_MESSAGES[key]?.details,
2650
- };
2651
- const canCreateCustomError = this.createErrorComponentService.canCreateCustomError(this.status);
2652
- switch (this.status) {
2653
- case 401:
2654
- case 404:
2655
- if (canCreateCustomError) {
2656
- this.showPage();
2657
- break;
2658
- }
2659
- if (this.status === 401) {
2660
- this.authService.navigateToLogin();
2661
- break;
2662
- }
2663
- this.showConfirmation(title, message).subscribe();
2664
- break;
2665
- case 403:
2666
- case 500:
2667
- this.showPage();
2668
- break;
2669
- }
2691
+ else if (value instanceof Observable) {
2692
+ return value;
2670
2693
  }
2671
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: StatusCodeErrorHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2672
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: StatusCodeErrorHandlerService, providedIn: 'root' }); }
2673
- }
2674
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: StatusCodeErrorHandlerService, decorators: [{
2675
- type: Injectable,
2676
- args: [{ providedIn: 'root' }]
2677
- }] });
2678
-
2679
- class UnknownStatusCodeErrorHandlerService {
2680
- constructor() {
2681
- this.priority = CUSTOM_HTTP_ERROR_HANDLER_PRIORITY.normal;
2682
- this.statusText = 'Unknown Error';
2683
- this.message = '';
2684
- this.createErrorComponentService = inject(CreateErrorComponentService);
2694
+ else if (typeof value === 'boolean') {
2695
+ return of(value);
2685
2696
  }
2686
- canHandle(error) {
2687
- if (error && error.status === 0 && error.statusText === this.statusText) {
2688
- this.message = error.message;
2689
- return true;
2690
- }
2691
- return false;
2697
+ else if (value === undefined || value === null) {
2698
+ return of(true);
2692
2699
  }
2693
- execute() {
2694
- this.createErrorComponentService.execute({
2695
- title: {
2696
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
2697
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
2698
- },
2699
- details: this.message,
2700
- isHomeShow: false,
2701
- });
2700
+ else {
2701
+ return EMPTY;
2702
2702
  }
2703
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: UnknownStatusCodeErrorHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2704
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: UnknownStatusCodeErrorHandlerService, providedIn: 'root' }); }
2705
2703
  }
2706
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: UnknownStatusCodeErrorHandlerService, decorators: [{
2707
- type: Injectable,
2708
- args: [{ providedIn: 'root' }]
2709
- }] });
2710
2704
 
2711
- class AbpAuthenticationErrorHandler {
2712
- constructor() {
2713
- this.priority = CUSTOM_HTTP_ERROR_HANDLER_PRIORITY.veryHigh;
2714
- this.authService = inject(AuthService);
2715
- this.configStateService = inject(ConfigStateService);
2716
- }
2717
- canHandle(error) {
2718
- return error instanceof HttpErrorResponse && error.status === 401;
2705
+ class DisabledDirective {
2706
+ constructor(ngControl) {
2707
+ this.ngControl = ngControl;
2708
+ this.abpDisabled = false;
2719
2709
  }
2720
- execute() {
2721
- this.configStateService.refreshAppState().subscribe(({ currentUser }) => {
2722
- if (!currentUser.isAuthenticated) {
2723
- this.authService.logout({ noRedirectToLogoutUrl: true });
2724
- }
2725
- });
2710
+ // Related issue: https://github.com/angular/angular/issues/35330
2711
+ ngOnChanges({ abpDisabled }) {
2712
+ if (this.ngControl.control && abpDisabled) {
2713
+ this.ngControl.control[abpDisabled.currentValue ? 'disable' : 'enable']();
2714
+ }
2726
2715
  }
2727
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AbpAuthenticationErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2728
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AbpAuthenticationErrorHandler, providedIn: 'root' }); }
2716
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: DisabledDirective, deps: [{ token: i2$1.NgControl, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
2717
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: DisabledDirective, isStandalone: true, selector: "[abpDisabled]", inputs: { abpDisabled: "abpDisabled" }, usesOnChanges: true, ngImport: i0 }); }
2729
2718
  }
2730
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AbpAuthenticationErrorHandler, decorators: [{
2731
- type: Injectable,
2732
- args: [{ providedIn: 'root' }]
2733
- }] });
2719
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: DisabledDirective, decorators: [{
2720
+ type: Directive,
2721
+ args: [{
2722
+ selector: '[abpDisabled]',
2723
+ }]
2724
+ }], ctorParameters: () => [{ type: i2$1.NgControl, decorators: [{
2725
+ type: Host
2726
+ }] }], propDecorators: { abpDisabled: [{
2727
+ type: Input
2728
+ }] } });
2734
2729
 
2735
- class RouterErrorHandlerService {
2736
- constructor() {
2737
- this.routerEvents = inject(RouterEvents);
2738
- this.httpErrorConfig = inject(HTTP_ERROR_CONFIG);
2739
- this.createErrorComponentService = inject(CreateErrorComponentService);
2740
- this.filterRouteErrors = (navigationError) => {
2741
- if (!this.httpErrorConfig?.skipHandledErrorCodes) {
2742
- return true;
2743
- }
2744
- return (navigationError.error?.message?.indexOf('Cannot match') > -1 &&
2745
- this.httpErrorConfig.skipHandledErrorCodes.findIndex(code => code === 404) < 0);
2746
- };
2730
+ var eFormComponets;
2731
+ (function (eFormComponets) {
2732
+ eFormComponets["FormInputComponent"] = "FormInputComponent";
2733
+ eFormComponets["FormCheckboxComponent"] = "FormCheckboxComponent";
2734
+ })(eFormComponets || (eFormComponets = {}));
2735
+
2736
+ class DocumentDirHandlerService {
2737
+ constructor(injector) {
2738
+ this.injector = injector;
2739
+ this.dir = new BehaviorSubject('ltr');
2740
+ this.dir$ = this.dir.asObservable();
2741
+ this.listenToLanguageChanges();
2747
2742
  }
2748
- listen() {
2749
- this.routerEvents
2750
- .getNavigationEvents('Error')
2751
- .pipe(filter(this.filterRouteErrors))
2752
- .subscribe(() => this.show404Page());
2743
+ listenToLanguageChanges() {
2744
+ const l10n = this.injector.get(LocalizationService);
2745
+ // will always listen, no need to unsubscribe
2746
+ l10n.currentLang$.pipe(map(locale => getLocaleDirection(locale))).subscribe(dir => {
2747
+ this.dir.next(dir);
2748
+ this.setBodyDir(dir);
2749
+ });
2753
2750
  }
2754
- show404Page() {
2755
- const instance = {
2756
- title: {
2757
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError404.title,
2758
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.title,
2759
- },
2760
- status: 404,
2761
- };
2762
- this.createErrorComponentService.execute(instance);
2751
+ setBodyDir(dir) {
2752
+ document.body.dir = dir;
2753
+ document.dir = dir;
2763
2754
  }
2764
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: RouterErrorHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2765
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: RouterErrorHandlerService, providedIn: 'root' }); }
2755
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: DocumentDirHandlerService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
2756
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: DocumentDirHandlerService }); }
2766
2757
  }
2767
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: RouterErrorHandlerService, decorators: [{
2768
- type: Injectable,
2769
- args: [{ providedIn: 'root' }]
2770
- }] });
2758
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: DocumentDirHandlerService, decorators: [{
2759
+ type: Injectable
2760
+ }], ctorParameters: () => [{ type: i0.Injector }] });
2771
2761
 
2772
2762
  class ErrorHandler {
2773
2763
  constructor(injector) {
@@ -3142,7 +3132,7 @@ function provideAbpThemeShared(...features) {
3142
3132
  return makeEnvironmentProviders(providers);
3143
3133
  }
3144
3134
 
3145
- const declarationsWithExports = [
3135
+ const THEME_SHARED_EXPORTS = [
3146
3136
  BreadcrumbComponent,
3147
3137
  BreadcrumbItemsComponent,
3148
3138
  ButtonComponent,
@@ -3156,10 +3146,19 @@ const declarationsWithExports = [
3156
3146
  ModalCloseDirective,
3157
3147
  FormInputComponent,
3158
3148
  FormCheckboxComponent,
3149
+ HttpErrorWrapperComponent,
3150
+ NgxDatatableModule,
3151
+ NgxValidateCoreModule,
3152
+ CardModule,
3153
+ DisabledDirective,
3154
+ AbpVisibleDirective,
3155
+ NgxDatatableListDirective,
3156
+ NgxDatatableDefaultDirective,
3157
+ PasswordComponent,
3159
3158
  ];
3160
3159
  class BaseThemeSharedModule {
3161
3160
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: BaseThemeSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3162
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.8", ngImport: i0, type: BaseThemeSharedModule, declarations: [BreadcrumbComponent,
3161
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.8", ngImport: i0, type: BaseThemeSharedModule, imports: [BreadcrumbComponent,
3163
3162
  BreadcrumbItemsComponent,
3164
3163
  ButtonComponent,
3165
3164
  ConfirmationComponent,
@@ -3171,24 +3170,16 @@ class BaseThemeSharedModule {
3171
3170
  LoadingDirective,
3172
3171
  ModalCloseDirective,
3173
3172
  FormInputComponent,
3174
- FormCheckboxComponent, HttpErrorWrapperComponent], imports: [CoreModule,
3173
+ FormCheckboxComponent,
3174
+ HttpErrorWrapperComponent,
3175
3175
  NgxDatatableModule,
3176
3176
  NgxValidateCoreModule,
3177
- NgbPaginationModule,
3178
- EllipsisDirective,
3179
- CardModule,
3180
- PasswordComponent,
3181
- NgxDatatableDefaultDirective,
3182
- NgxDatatableListDirective,
3183
- DisabledDirective,
3184
- AbpVisibleDirective], exports: [NgxDatatableModule,
3185
- NgxValidateCoreModule,
3186
3177
  CardModule,
3187
3178
  DisabledDirective,
3188
3179
  AbpVisibleDirective,
3189
3180
  NgxDatatableListDirective,
3190
3181
  NgxDatatableDefaultDirective,
3191
- PasswordComponent, BreadcrumbComponent,
3182
+ PasswordComponent], exports: [BreadcrumbComponent,
3192
3183
  BreadcrumbItemsComponent,
3193
3184
  ButtonComponent,
3194
3185
  ConfirmationComponent,
@@ -3200,45 +3191,41 @@ class BaseThemeSharedModule {
3200
3191
  LoadingDirective,
3201
3192
  ModalCloseDirective,
3202
3193
  FormInputComponent,
3203
- FormCheckboxComponent] }); }
3204
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: BaseThemeSharedModule, providers: [DatePipe], imports: [CoreModule,
3194
+ FormCheckboxComponent,
3195
+ HttpErrorWrapperComponent,
3196
+ NgxDatatableModule,
3197
+ NgxValidateCoreModule,
3198
+ CardModule,
3199
+ DisabledDirective,
3200
+ AbpVisibleDirective,
3201
+ NgxDatatableListDirective,
3202
+ NgxDatatableDefaultDirective,
3203
+ PasswordComponent] }); }
3204
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: BaseThemeSharedModule, imports: [BreadcrumbComponent,
3205
+ BreadcrumbItemsComponent,
3206
+ ButtonComponent,
3207
+ ConfirmationComponent,
3208
+ LoaderBarComponent,
3209
+ ModalComponent,
3210
+ ToastComponent,
3211
+ ToastContainerComponent,
3212
+ FormInputComponent,
3213
+ FormCheckboxComponent,
3214
+ HttpErrorWrapperComponent,
3205
3215
  NgxDatatableModule,
3206
3216
  NgxValidateCoreModule,
3207
- NgbPaginationModule,
3208
3217
  CardModule,
3209
- PasswordComponent, NgxDatatableModule,
3218
+ PasswordComponent,
3219
+ NgxDatatableModule,
3210
3220
  NgxValidateCoreModule,
3211
3221
  CardModule] }); }
3212
3222
  }
3213
3223
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: BaseThemeSharedModule, decorators: [{
3214
3224
  type: NgModule,
3215
3225
  args: [{
3216
- imports: [
3217
- CoreModule,
3218
- NgxDatatableModule,
3219
- NgxValidateCoreModule,
3220
- NgbPaginationModule,
3221
- EllipsisDirective,
3222
- CardModule,
3223
- PasswordComponent,
3224
- NgxDatatableDefaultDirective,
3225
- NgxDatatableListDirective,
3226
- DisabledDirective,
3227
- AbpVisibleDirective,
3228
- ],
3229
- declarations: [...declarationsWithExports, HttpErrorWrapperComponent],
3230
- exports: [
3231
- NgxDatatableModule,
3232
- NgxValidateCoreModule,
3233
- CardModule,
3234
- DisabledDirective,
3235
- AbpVisibleDirective,
3236
- NgxDatatableListDirective,
3237
- NgxDatatableDefaultDirective,
3238
- PasswordComponent,
3239
- ...declarationsWithExports,
3240
- ],
3241
- providers: [DatePipe],
3226
+ imports: [...THEME_SHARED_EXPORTS],
3227
+ declarations: [],
3228
+ exports: [...THEME_SHARED_EXPORTS],
3242
3229
  }]
3243
3230
  }] });
3244
3231
  class ThemeSharedModule {
@@ -3273,5 +3260,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
3273
3260
  * Generated bundle index. Do not edit.
3274
3261
  */
3275
3262
 
3276
- export { AbpAuthenticationErrorHandler, AbpFormatErrorHandlerService, AbpVisibleDirective, BaseThemeSharedModule, BreadcrumbComponent, BreadcrumbItemsComponent, ButtonComponent, CONFIRMATION_ICONS, CUSTOM_ERROR_HANDLERS, CUSTOM_HTTP_ERROR_HANDLER_PRIORITY, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CardHeaderDirective, CardImgTopDirective, CardModule, CardSubtitleDirective, CardTitleDirective, Confirmation, ConfirmationComponent, ConfirmationService, CreateErrorComponentService, DEFAULT_CONFIRMATION_ICONS, DEFAULT_ERROR_LOCALIZATIONS, DEFAULT_ERROR_MESSAGES, DEFAULT_HANDLERS_PROVIDERS, DEFAULT_VALIDATION_BLUEPRINTS, DateAdapter, DateParserFormatter, DateTimeAdapter, DisabledDirective, DocumentDirHandlerService, EllipsisDirective, ErrorHandler, FormCheckboxComponent, FormInputComponent, HTTP_ERROR_CONFIG, HTTP_ERROR_DETAIL, HTTP_ERROR_HANDLER, HTTP_ERROR_STATUS, HttpErrorWrapperComponent, InternetConnectionStatusComponent, LoaderBarComponent, LoadingComponent, LoadingDirective, ModalCloseDirective, ModalComponent, ModalRefService, NGX_DATATABLE_MESSAGES, NG_BOOTSTRAP_CONFIG_PROVIDERS, NavItem, NavItemsService, NgxDatatableDefaultDirective, NgxDatatableListDirective, PageAlertService, PasswordComponent, RouterErrorHandlerService, SUPPRESS_UNSAVED_CHANGES_WARNING, SpinnerComponent, StatusCodeErrorHandlerService, THEME_SHARED_APPEND_CONTENT, THEME_SHARED_ROUTE_PROVIDERS, TenantResolveErrorHandlerService, ThemeSharedFeatureKind, ThemeSharedModule, TimeAdapter, ToastComponent, ToastContainerComponent, ToasterService, UnknownStatusCodeErrorHandlerService, UserMenu, UserMenuService, bounceIn, collapse, collapseLinearWithMargin, collapseWithMargin, collapseX, collapseY, collapseYWithMargin, configureNgBootstrap, configureRoutes, defaultNgxDatatableMessages, dialogAnimation, eFormComponets, expandX, expandY, expandYWithMargin, fadeAnimation, fadeIn, fadeInDown, fadeInLeft, fadeInRight, fadeInUp, fadeOut, fadeOutDown, fadeOutLeft, fadeOutRight, fadeOutUp, getErrorFromRequestBody, getPasswordValidators, provideAbpThemeShared, slideFromBottom, tenantNotFoundProvider, toastInOut, validatePassword, withConfirmationIcon, withHttpErrorConfig, withValidateOnSubmit, withValidationBluePrint, withValidationMapErrorsFn };
3263
+ export { AbpAuthenticationErrorHandler, AbpFormatErrorHandlerService, AbpVisibleDirective, BaseThemeSharedModule, BreadcrumbComponent, BreadcrumbItemsComponent, ButtonComponent, CARD_COMPONENTS, CARD_DIRECTIVES, CONFIRMATION_ICONS, CUSTOM_ERROR_HANDLERS, CUSTOM_HTTP_ERROR_HANDLER_PRIORITY, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CardHeaderDirective, CardImgTopDirective, CardModule, CardSubtitleDirective, CardTitleDirective, Confirmation, ConfirmationComponent, ConfirmationService, CreateErrorComponentService, DEFAULT_CONFIRMATION_ICONS, DEFAULT_ERROR_LOCALIZATIONS, DEFAULT_ERROR_MESSAGES, DEFAULT_HANDLERS_PROVIDERS, DEFAULT_VALIDATION_BLUEPRINTS, DateAdapter, DateParserFormatter, DateTimeAdapter, DisabledDirective, DocumentDirHandlerService, EllipsisDirective, ErrorHandler, FormCheckboxComponent, FormInputComponent, HTTP_ERROR_CONFIG, HTTP_ERROR_DETAIL, HTTP_ERROR_HANDLER, HTTP_ERROR_STATUS, HttpErrorWrapperComponent, InternetConnectionStatusComponent, LoaderBarComponent, LoadingComponent, LoadingDirective, ModalCloseDirective, ModalComponent, ModalRefService, NGX_DATATABLE_MESSAGES, NG_BOOTSTRAP_CONFIG_PROVIDERS, NavItem, NavItemsService, NgxDatatableDefaultDirective, NgxDatatableListDirective, PageAlertService, PasswordComponent, RouterErrorHandlerService, SUPPRESS_UNSAVED_CHANGES_WARNING, SpinnerComponent, StatusCodeErrorHandlerService, THEME_SHARED_APPEND_CONTENT, THEME_SHARED_EXPORTS, THEME_SHARED_ROUTE_PROVIDERS, TenantResolveErrorHandlerService, ThemeSharedFeatureKind, ThemeSharedModule, TimeAdapter, ToastComponent, ToastContainerComponent, ToasterService, UnknownStatusCodeErrorHandlerService, UserMenu, UserMenuService, bounceIn, collapse, collapseLinearWithMargin, collapseWithMargin, collapseX, collapseY, collapseYWithMargin, configureNgBootstrap, configureRoutes, defaultNgxDatatableMessages, dialogAnimation, eFormComponets, expandX, expandY, expandYWithMargin, fadeAnimation, fadeIn, fadeInDown, fadeInLeft, fadeInRight, fadeInUp, fadeOut, fadeOutDown, fadeOutLeft, fadeOutRight, fadeOutUp, getErrorFromRequestBody, getPasswordValidators, provideAbpThemeShared, slideFromBottom, tenantNotFoundProvider, toastInOut, validatePassword, withConfirmationIcon, withHttpErrorConfig, withValidateOnSubmit, withValidationBluePrint, withValidationMapErrorsFn };
3277
3264
  //# sourceMappingURL=abp-ng.theme.shared.mjs.map