@abp/ng.theme.shared 8.3.1 → 9.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component, Input, ChangeDetectionStrategy, EventEmitter, Output, ViewChild, InjectionToken, Inject, inject, DestroyRef, createComponent, ViewEncapsulation, model, input, viewChild, contentChild, output, effect, Directive, Optional, HostListener, forwardRef, HostBinding, NgModule, ChangeDetectorRef, Host, RendererFactory2, Injector, EnvironmentInjector, ApplicationRef, APP_INITIALIZER, LOCALE_ID, makeEnvironmentProviders } from '@angular/core';
2
+ import { Injectable, Component, Input, ChangeDetectionStrategy, EventEmitter, Output, ViewChild, InjectionToken, Inject, inject, DestroyRef, createComponent, ViewEncapsulation, model, input, viewChild, contentChild, output, effect, Directive, Optional, HostListener, forwardRef, HostBinding, NgModule, ChangeDetectorRef, ViewContainerRef, Renderer2, Host, RendererFactory2, Injector, EnvironmentInjector, ApplicationRef, APP_INITIALIZER, LOCALE_ID, makeEnvironmentProviders } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { formatDate, DOCUMENT, CommonModule, DatePipe } from '@angular/common';
5
5
  import { NgbDateAdapter, NgbTimeAdapter, NgbModal, NgbTooltip, NgbInputDatepickerConfig, NgbTypeaheadConfig, NgbDateParserFormatter, NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap';
@@ -10,7 +10,7 @@ import * as i2 from '@abp/ng.core';
10
10
  import { getRoutePath, SubscriptionService, PROJECTION_STRATEGY, uuid, AbstractNgModelComponent, InternetConnectionService, LocalizationModule, LocalizationService, getLocaleDirection, DomInsertionService, CONTENT_STRATEGY, SORT_COMPARE_FUNC, InternalStore, RouterEvents, AuthService, SessionStateService, ConfigStateService, HttpErrorReporterService, RoutesService, TENANT_NOT_FOUND_BY_NAME, noop, CoreModule } 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, of, from, Observable, EMPTY, BehaviorSubject } from 'rxjs';
13
+ import { fromEvent, Subscription, combineLatest, timer, ReplaySubject, Subject, distinctUntilChanged, of, from, Observable, EMPTY, BehaviorSubject } from 'rxjs';
14
14
  import * as i2$1 from '@angular/forms';
15
15
  import { NG_VALUE_ACCESSOR, FormsModule, Validators } from '@angular/forms';
16
16
  import * as i1$2 from '@swimlane/ngx-datatable';
@@ -918,15 +918,15 @@ class ToastComponent {
918
918
  }
919
919
  switch (this.toast.severity) {
920
920
  case 'success':
921
- return 'fa-check-circle';
921
+ return 'bi-check';
922
922
  case 'info':
923
- return 'fa-info-circle';
923
+ return 'bi-info-circle';
924
924
  case 'warning':
925
- return 'fa-exclamation-triangle';
925
+ return 'bi-exclamation-triangle';
926
926
  case 'error':
927
- return 'fa-times-circle';
927
+ return 'bi-shield-exclamation';
928
928
  default:
929
- return 'fa-exclamation-circle';
929
+ return 'bi-exclamation-triangle';
930
930
  }
931
931
  }
932
932
  ngOnInit() {
@@ -946,11 +946,11 @@ class ToastComponent {
946
946
  this.close();
947
947
  }
948
948
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: ToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
949
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: ToastComponent, 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=\"fa 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=\"fa fa-times\" 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:50px 1fr;gap:10px;margin:5px 0;padding:10px;border-radius:0;width:350px;-webkit-user-select:none;user-select:none;z-index:9999;border:2px solid #f0f0f0;background-color:#f0f0f0;color:#000;box-shadow:0 0 10px -5px #0006;opacity:1}.abp-toast:hover{border:2px solid rgb(227.25,227.25,227.25);background-color:#e3e3e3;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-success{border:2px solid #51a351;background-color:#51a351;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-success:hover{border:2px solid rgb(72.5348360656,145.9651639344,72.5348360656);background-color:#499249;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-info{border:2px solid #2f96b4;background-color:#2f96b4;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-info:hover{border:2px solid rgb(41.7202643172,133.1497797357,159.7797356828);background-color:#2a85a0;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-warning{border:2px solid #f89406;background-color:#f89406;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-warning:hover{border:2px solid rgb(223.1023622047,133.1417322835,5.3976377953);background-color:#df8505;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-error{border:2px solid #bd362f;background-color:#bd362f;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-error:hover{border:2px solid rgb(168.5783898305,48.1652542373,41.9216101695);background-color:#a9302a;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:36px}.abp-toast .abp-toast-content{position:relative;display:flex;align-self:center;flex-direction:column;word-break:break-word}.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:25px;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" }] }); }
949
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: ToastComponent, 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 rgb(227.25,227.25,227.25);background-color:#e3e3e3;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(65.2,179.3,89.65);background-color:#41b35a;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(59.6987179487,122.9615384615,148.8012820513);background-color:#3c7b95;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,146.6984924623,30.5);background-color:#ff931f;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(168.1170731707,11.3829268293,63.9195121951);background-color:#a80b40;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" }] }); }
950
950
  }
951
951
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: ToastComponent, decorators: [{
952
952
  type: Component,
953
- args: [{ selector: 'abp-toast', template: "<div class=\"abp-toast\" [ngClass]=\"severityClass\" (click)=\"tap()\">\r\n <div class=\"abp-toast-icon\">\r\n <i class=\"fa 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=\"fa fa-times\" 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:50px 1fr;gap:10px;margin:5px 0;padding:10px;border-radius:0;width:350px;-webkit-user-select:none;user-select:none;z-index:9999;border:2px solid #f0f0f0;background-color:#f0f0f0;color:#000;box-shadow:0 0 10px -5px #0006;opacity:1}.abp-toast:hover{border:2px solid rgb(227.25,227.25,227.25);background-color:#e3e3e3;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-success{border:2px solid #51a351;background-color:#51a351;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-success:hover{border:2px solid rgb(72.5348360656,145.9651639344,72.5348360656);background-color:#499249;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-info{border:2px solid #2f96b4;background-color:#2f96b4;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-info:hover{border:2px solid rgb(41.7202643172,133.1497797357,159.7797356828);background-color:#2a85a0;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-warning{border:2px solid #f89406;background-color:#f89406;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-warning:hover{border:2px solid rgb(223.1023622047,133.1417322835,5.3976377953);background-color:#df8505;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-error{border:2px solid #bd362f;background-color:#bd362f;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-error:hover{border:2px solid rgb(168.5783898305,48.1652542373,41.9216101695);background-color:#a9302a;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:36px}.abp-toast .abp-toast-content{position:relative;display:flex;align-self:center;flex-direction:column;word-break:break-word}.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:25px;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"] }]
953
+ args: [{ 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 rgb(227.25,227.25,227.25);background-color:#e3e3e3;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(65.2,179.3,89.65);background-color:#41b35a;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(59.6987179487,122.9615384615,148.8012820513);background-color:#3c7b95;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,146.6984924623,30.5);background-color:#ff931f;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(168.1170731707,11.3829268293,63.9195121951);background-color:#a80b40;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"] }]
954
954
  }], propDecorators: { toast: [{
955
955
  type: Input
956
956
  }], remove: [{
@@ -1012,7 +1012,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1012
1012
 
1013
1013
  /**
1014
1014
  * @deprecated use ShowPasswordDirective directive
1015
- * https://docs.abp.io/en/abp/latest/UI/Angular/Show-Password-Directive
1015
+ * https://abp.io/docs/latest/framework/ui/angular/show-password-directive
1016
1016
  */
1017
1017
  class PasswordComponent extends AbstractNgModelComponent {
1018
1018
  toggleFieldTextType() {
@@ -1461,6 +1461,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1461
1461
  `, 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"] }]
1462
1462
  }] });
1463
1463
 
1464
+ class SpinnerComponent {
1465
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1466
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SpinnerComponent, isStandalone: true, selector: "abp-spinner", ngImport: i0, template: `
1467
+ <div class="d-flex justify-content-center align-items-center border-top" style="height: 62px">
1468
+ <div class="spinner-border" role="status" id="loading">
1469
+ <span class="visually-hidden">Loading...</span>
1470
+ </div>
1471
+ </div>
1472
+ `, isInline: true }); }
1473
+ }
1474
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SpinnerComponent, decorators: [{
1475
+ type: Component,
1476
+ args: [{
1477
+ selector: 'abp-spinner',
1478
+ standalone: true,
1479
+ template: `
1480
+ <div class="d-flex justify-content-center align-items-center border-top" style="height: 62px">
1481
+ <div class="spinner-border" role="status" id="loading">
1482
+ <span class="visually-hidden">Loading...</span>
1483
+ </div>
1484
+ </div>
1485
+ `,
1486
+ }]
1487
+ }] });
1488
+
1464
1489
  class EllipsisDirective {
1465
1490
  get inlineClass() {
1466
1491
  return this.enabled && this.width;
@@ -1666,6 +1691,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1666
1691
 
1667
1692
  const defaultNgxDatatableMessages = {
1668
1693
  emptyMessage: 'AbpUi::NoDataAvailableInDatatable',
1694
+ errorMessage: 'AbpUi::ErrorLoadingDatatable',
1669
1695
  totalMessage: 'AbpUi::Total',
1670
1696
  selectedMessage: 'AbpUi::Selected',
1671
1697
  };
@@ -1678,6 +1704,8 @@ class NgxDatatableListDirective {
1678
1704
  this.destroyRef = inject(DestroyRef);
1679
1705
  this.localizationService = inject(LocalizationService);
1680
1706
  this.ngxDatatableMessages = inject(NGX_DATATABLE_MESSAGES, { optional: true });
1707
+ this.viewContainerRef = inject(ViewContainerRef);
1708
+ this.renderer = inject(Renderer2);
1681
1709
  this.setInitialValues();
1682
1710
  }
1683
1711
  ngDoCheck() {
@@ -1686,6 +1714,7 @@ class NgxDatatableListDirective {
1686
1714
  ngOnInit() {
1687
1715
  this.subscribeToPage();
1688
1716
  this.subscribeToSort();
1717
+ this.subscribeToRequestStatus();
1689
1718
  }
1690
1719
  ngOnChanges({ list }) {
1691
1720
  this.subscribeToQuery();
@@ -1695,18 +1724,62 @@ class NgxDatatableListDirective {
1695
1724
  this.table.limit = maxResultCount;
1696
1725
  this.table.offset = page;
1697
1726
  }
1727
+ subscribeToRequestStatus() {
1728
+ const requestStatus$ = this.list.requestStatus$.pipe(distinctUntilChanged());
1729
+ const { emptyMessage, errorMessage } = this.ngxDatatableMessages || defaultNgxDatatableMessages;
1730
+ requestStatus$.subscribe(status => {
1731
+ this.table.loadingIndicator = false;
1732
+ if (status === 'idle') {
1733
+ return;
1734
+ }
1735
+ if (status === 'loading') {
1736
+ this.table.messages.emptyMessage = undefined;
1737
+ this.table.loadingIndicator = true;
1738
+ this.cdRef.detectChanges();
1739
+ this.updateLoadingIndicator();
1740
+ return;
1741
+ }
1742
+ if (status === 'error') {
1743
+ this.table.messages.emptyMessage = this.localizationService.instant(errorMessage);
1744
+ this.viewContainerRef.clear();
1745
+ this.cdRef.markForCheck();
1746
+ }
1747
+ if (status === 'success') {
1748
+ this.table.messages.emptyMessage = this.localizationService.instant(emptyMessage);
1749
+ this.viewContainerRef.clear();
1750
+ }
1751
+ });
1752
+ }
1753
+ updateLoadingIndicator() {
1754
+ const body = this.table.element.querySelector('datatable-body');
1755
+ const progress = this.table.element.querySelector('datatable-progress');
1756
+ if (!body) {
1757
+ return;
1758
+ }
1759
+ if (progress) {
1760
+ this.replaceLoadingIndicator(body, progress);
1761
+ }
1762
+ }
1763
+ replaceLoadingIndicator(parent, placeholder) {
1764
+ this.viewContainerRef.clear();
1765
+ const spinnerRef = this.viewContainerRef.createComponent(SpinnerComponent);
1766
+ const spinnerElement = spinnerRef.location.nativeElement;
1767
+ this.renderer.insertBefore(parent, spinnerElement, placeholder);
1768
+ this.renderer.removeChild(parent, placeholder);
1769
+ }
1698
1770
  setInitialValues() {
1699
1771
  this.table.externalPaging = true;
1700
1772
  this.table.externalSorting = true;
1701
- const { emptyMessage, selectedMessage, totalMessage } = this.ngxDatatableMessages || defaultNgxDatatableMessages;
1773
+ const { selectedMessage, totalMessage } = this.ngxDatatableMessages || defaultNgxDatatableMessages;
1702
1774
  this.table.messages = {
1703
- emptyMessage: this.localizationService.instant(emptyMessage),
1704
1775
  totalMessage: this.localizationService.instant(totalMessage),
1705
1776
  selectedMessage: this.localizationService.instant(selectedMessage),
1706
1777
  };
1707
1778
  }
1708
1779
  subscribeToSort() {
1709
- this.table.sort.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(({ sorts: [{ prop, dir }] }) => {
1780
+ this.table.sort
1781
+ .pipe(takeUntilDestroyed(this.destroyRef))
1782
+ .subscribe(({ sorts: [{ prop, dir }] }) => {
1710
1783
  if (prop === this.list.sortKey && this.list.sortOrder === 'desc') {
1711
1784
  this.list.sortKey = '';
1712
1785
  this.list.sortOrder = '';
@@ -1887,7 +1960,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1887
1960
 
1888
1961
  const HTTP_ERROR_CONFIG = new InjectionToken('HTTP_ERROR_CONFIG');
1889
1962
  /**
1890
- @deprecated use **`CUSTOM_ERROR_HANDLERS`** injection token instead of this, see more info https://docs.abp.io/en/abp/latest/UI/Angular/HTTP-Requests
1963
+ @deprecated use **`CUSTOM_ERROR_HANDLERS`** injection token instead of this, see more info https://abp.io/docs/latest/framework/ui/angular/http-requests
1891
1964
  */
1892
1965
  const HTTP_ERROR_HANDLER = new InjectionToken('HTTP_ERROR_HANDLER');
1893
1966
  const CUSTOM_ERROR_HANDLERS = new InjectionToken('CUSTOM_ERROR_HANDLERS');
@@ -3200,5 +3273,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
3200
3273
  * Generated bundle index. Do not edit.
3201
3274
  */
3202
3275
 
3203
- 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, 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 };
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 };
3204
3277
  //# sourceMappingURL=abp-ng.theme.shared.mjs.map