@abp/ng.theme.shared 7.0.0-rc.5 → 7.0.0

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,22 +1,24 @@
1
1
  import { animation, style, animate, keyframes, trigger, state, transition, useAnimation, query } from '@angular/animations';
2
2
  import * as i0 from '@angular/core';
3
- import { Component, Input, ChangeDetectionStrategy, EventEmitter, Output, ViewChild, InjectionToken, Inject, ViewEncapsulation, Injectable, Optional, ContentChild, Directive, HostListener, HostBinding, NgModule, ComponentFactoryResolver, RendererFactory2, ApplicationRef, APP_INITIALIZER, inject, LOCALE_ID } from '@angular/core';
3
+ import { Component, Input, ChangeDetectionStrategy, EventEmitter, Output, ViewChild, InjectionToken, Inject, ViewEncapsulation, Injectable, Optional, ContentChild, Directive, HostListener, forwardRef, HostBinding, NgModule, ComponentFactoryResolver, RendererFactory2, ApplicationRef, APP_INITIALIZER, inject, LOCALE_ID } from '@angular/core';
4
4
  import * as i1 from '@angular/common';
5
5
  import { DOCUMENT, formatDate, DatePipe } from '@angular/common';
6
6
  import * as i1$1 from '@angular/router';
7
7
  import { ResolveEnd } from '@angular/router';
8
8
  import * as i2 from '@abp/ng.core';
9
- import { getRoutePath, SubscriptionService, PROJECTION_STRATEGY, uuid, LocalizationService, getLocaleDirection, HttpErrorReporterService, RouterEvents, AuthService, RoutesService, InternalStore, DomInsertionService, CONTENT_STRATEGY, CoreModule, noop, ConfigStateService } from '@abp/ng.core';
9
+ import { getRoutePath, SubscriptionService, PROJECTION_STRATEGY, uuid, AbstractNgModelComponent, LocalizationService, getLocaleDirection, HttpErrorReporterService, RouterEvents, AuthService, RoutesService, InternalStore, DomInsertionService, CONTENT_STRATEGY, CoreModule, noop, ConfigStateService } from '@abp/ng.core';
10
10
  import { __rest } from 'tslib';
11
11
  import { startWith, map, debounceTime, filter, takeUntil, distinctUntilChanged, take, catchError, switchMap } from 'rxjs/operators';
12
12
  import { fromEvent, Subscription, combineLatest, timer, ReplaySubject, Subject, BehaviorSubject, throwError, Observable, of } from 'rxjs';
13
13
  import * as i3 from '@ng-bootstrap/ng-bootstrap';
14
14
  import { NgbInputDatepickerConfig, NgbTypeaheadConfig, NgbDateParserFormatter, NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap';
15
+ import * as i2$1 from '@angular/forms';
16
+ import { NG_VALUE_ACCESSOR, Validators } from '@angular/forms';
17
+ import * as i3$1 from '@ngx-validate/core';
18
+ import { NgxValidateCoreModule, VALIDATION_BLUEPRINTS, VALIDATION_MAP_ERRORS_FN, defaultMapErrorsFn, VALIDATION_VALIDATE_ON_SUBMIT, normalizeDiacritics } from '@ngx-validate/core';
15
19
  import * as i1$2 from '@swimlane/ngx-datatable';
16
20
  import { ColumnMode, NgxDatatableModule } from '@swimlane/ngx-datatable';
17
21
  import { HttpErrorResponse } from '@angular/common/http';
18
- import { NgxValidateCoreModule, VALIDATION_BLUEPRINTS, VALIDATION_MAP_ERRORS_FN, defaultMapErrorsFn, VALIDATION_VALIDATE_ON_SUBMIT, normalizeDiacritics } from '@ngx-validate/core';
19
- import { Validators } from '@angular/forms';
20
22
 
21
23
  const bounceIn = animation([
22
24
  style({ opacity: '0', display: '{{ display }}' }),
@@ -908,6 +910,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
908
910
  type: Input
909
911
  }] } });
910
912
 
913
+ class PasswordComponent extends AbstractNgModelComponent {
914
+ constructor(injector) {
915
+ super(injector);
916
+ }
917
+ toggleFieldTextType() {
918
+ this.fieldTextType = !this.fieldTextType;
919
+ }
920
+ }
921
+ PasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PasswordComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
922
+ PasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: PasswordComponent, selector: "abp-password", inputs: { inputId: "inputId", formControlName: "formControlName" }, providers: [
923
+ {
924
+ provide: NG_VALUE_ACCESSOR,
925
+ useExisting: forwardRef(() => PasswordComponent),
926
+ multi: true,
927
+ },
928
+ ], 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 [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: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: "directive", type: i3$1.ValidationTargetDirective, selector: "[validationTarget]", exportAs: ["validationTarget"] }] });
929
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PasswordComponent, decorators: [{
930
+ type: Component,
931
+ args: [{ selector: 'abp-password', providers: [
932
+ {
933
+ provide: NG_VALUE_ACCESSOR,
934
+ useExisting: forwardRef(() => PasswordComponent),
935
+ multi: true,
936
+ },
937
+ ], 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 [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" }]
938
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { inputId: [{
939
+ type: Input
940
+ }], formControlName: [{
941
+ type: Input
942
+ }] } });
943
+
911
944
  const DEFAULT_VALIDATION_BLUEPRINTS = {
912
945
  creditCard: 'AbpValidation::ThisFieldIsNotAValidCreditCardNumber.',
913
946
  email: 'AbpValidation::ThisFieldIsNotAValidEmailAddress.',
@@ -1348,6 +1381,7 @@ class ErrorHandler {
1348
1381
  this.cfRes = injector.get(ComponentFactoryResolver);
1349
1382
  this.rendererFactory = injector.get(RendererFactory2);
1350
1383
  this.httpErrorConfig = injector.get('HTTP_ERROR_CONFIG');
1384
+ this.authService = this.injector.get(AuthService);
1351
1385
  this.listenToRestError();
1352
1386
  this.listenToRouterError();
1353
1387
  this.listenToRouterDataResolved();
@@ -1509,7 +1543,7 @@ class ErrorHandler {
1509
1543
  });
1510
1544
  }
1511
1545
  navigateToLogin() {
1512
- this.injector.get(AuthService).navigateToLogin();
1546
+ this.authService.navigateToLogin();
1513
1547
  }
1514
1548
  createErrorComponent(instance) {
1515
1549
  var _a, _b;
@@ -2052,6 +2086,7 @@ const declarationsWithExports = [
2052
2086
  ModalComponent,
2053
2087
  ToastComponent,
2054
2088
  ToastContainerComponent,
2089
+ PasswordComponent,
2055
2090
  NgxDatatableDefaultDirective,
2056
2091
  NgxDatatableListDirective,
2057
2092
  LoadingDirective,
@@ -2069,6 +2104,7 @@ BaseThemeSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", v
2069
2104
  ModalComponent,
2070
2105
  ToastComponent,
2071
2106
  ToastContainerComponent,
2107
+ PasswordComponent,
2072
2108
  NgxDatatableDefaultDirective,
2073
2109
  NgxDatatableListDirective,
2074
2110
  LoadingDirective,
@@ -2076,7 +2112,7 @@ BaseThemeSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", v
2076
2112
  NgxDatatableModule,
2077
2113
  NgxValidateCoreModule,
2078
2114
  NgbPaginationModule,
2079
- EllipsisModule], exports: [NgxDatatableModule, EllipsisModule, BreadcrumbComponent,
2115
+ EllipsisModule], exports: [NgxDatatableModule, EllipsisModule, NgxValidateCoreModule, BreadcrumbComponent,
2080
2116
  BreadcrumbItemsComponent,
2081
2117
  ButtonComponent,
2082
2118
  ConfirmationComponent,
@@ -2085,6 +2121,7 @@ BaseThemeSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", v
2085
2121
  ModalComponent,
2086
2122
  ToastComponent,
2087
2123
  ToastContainerComponent,
2124
+ PasswordComponent,
2088
2125
  NgxDatatableDefaultDirective,
2089
2126
  NgxDatatableListDirective,
2090
2127
  LoadingDirective,
@@ -2093,7 +2130,7 @@ BaseThemeSharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", v
2093
2130
  NgxDatatableModule,
2094
2131
  NgxValidateCoreModule,
2095
2132
  NgbPaginationModule,
2096
- EllipsisModule, NgxDatatableModule, EllipsisModule] });
2133
+ EllipsisModule, NgxDatatableModule, EllipsisModule, NgxValidateCoreModule] });
2097
2134
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BaseThemeSharedModule, decorators: [{
2098
2135
  type: NgModule,
2099
2136
  args: [{
@@ -2105,7 +2142,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
2105
2142
  EllipsisModule,
2106
2143
  ],
2107
2144
  declarations: [...declarationsWithExports, HttpErrorWrapperComponent],
2108
- exports: [NgxDatatableModule, EllipsisModule, ...declarationsWithExports],
2145
+ exports: [NgxDatatableModule, EllipsisModule, NgxValidateCoreModule, ...declarationsWithExports],
2109
2146
  providers: [DatePipe],
2110
2147
  }]
2111
2148
  }] });
@@ -2240,5 +2277,5 @@ function validatePassword(shouldContain) {
2240
2277
  * Generated bundle index. Do not edit.
2241
2278
  */
2242
2279
 
2243
- export { BaseThemeSharedModule, BreadcrumbComponent, BreadcrumbItemsComponent, ButtonComponent, Confirmation, ConfirmationComponent, ConfirmationService, DEFAULT_ERROR_LOCALIZATIONS, DEFAULT_ERROR_MESSAGES, DEFAULT_VALIDATION_BLUEPRINTS, DateParserFormatter, DocumentDirHandlerService, EllipsisDirective, EllipsisModule, ErrorHandler, HTTP_ERROR_CONFIG, HTTP_ERROR_HANDLER, HttpErrorWrapperComponent, LoaderBarComponent, LoadingComponent, LoadingDirective, ModalCloseDirective, ModalComponent, ModalRefService, NGX_DATATABLE_MESSAGES, NG_BOOTSTRAP_CONFIG_PROVIDERS, NavItem, NavItemsService, NgxDatatableDefaultDirective, NgxDatatableListDirective, PageAlertService, SUPPRESS_UNSAVED_CHANGES_WARNING, THEME_SHARED_APPEND_CONTENT, THEME_SHARED_ROUTE_PROVIDERS, ThemeSharedModule, ToastComponent, ToastContainerComponent, ToasterService, UserMenu, UserMenuService, bounceIn, collapse, collapseLinearWithMargin, collapseWithMargin, collapseX, collapseY, collapseYWithMargin, configureNgBootstrap, configureRoutes, defaultNgxDatatableMessages, dialogAnimation, expandX, expandY, expandYWithMargin, fadeAnimation, fadeIn, fadeInDown, fadeInLeft, fadeInRight, fadeInUp, fadeOut, fadeOutDown, fadeOutLeft, fadeOutRight, fadeOutUp, getPasswordValidators, httpErrorConfigFactory, slideFromBottom, toastInOut, validatePassword };
2280
+ export { BaseThemeSharedModule, BreadcrumbComponent, BreadcrumbItemsComponent, ButtonComponent, Confirmation, ConfirmationComponent, ConfirmationService, DEFAULT_ERROR_LOCALIZATIONS, DEFAULT_ERROR_MESSAGES, DEFAULT_VALIDATION_BLUEPRINTS, DateParserFormatter, DocumentDirHandlerService, EllipsisDirective, EllipsisModule, ErrorHandler, HTTP_ERROR_CONFIG, HTTP_ERROR_HANDLER, HttpErrorWrapperComponent, LoaderBarComponent, LoadingComponent, LoadingDirective, ModalCloseDirective, ModalComponent, ModalRefService, NGX_DATATABLE_MESSAGES, NG_BOOTSTRAP_CONFIG_PROVIDERS, NavItem, NavItemsService, NgxDatatableDefaultDirective, NgxDatatableListDirective, PageAlertService, PasswordComponent, SUPPRESS_UNSAVED_CHANGES_WARNING, THEME_SHARED_APPEND_CONTENT, THEME_SHARED_ROUTE_PROVIDERS, ThemeSharedModule, ToastComponent, ToastContainerComponent, ToasterService, UserMenu, UserMenuService, bounceIn, collapse, collapseLinearWithMargin, collapseWithMargin, collapseX, collapseY, collapseYWithMargin, configureNgBootstrap, configureRoutes, defaultNgxDatatableMessages, dialogAnimation, expandX, expandY, expandYWithMargin, fadeAnimation, fadeIn, fadeInDown, fadeInLeft, fadeInRight, fadeInUp, fadeOut, fadeOutDown, fadeOutLeft, fadeOutRight, fadeOutUp, getPasswordValidators, httpErrorConfigFactory, slideFromBottom, toastInOut, validatePassword };
2244
2281
  //# sourceMappingURL=abp-ng.theme.shared.mjs.map