@alfresco/adf-core 9.1.0-16784233431 → 9.1.0-16810702540
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.
- package/fesm2022/adf-core.mjs +265 -266
- package/fesm2022/adf-core.mjs.map +1 -1
- package/lib/auth/oidc/auth.module.d.ts +10 -13
- package/lib/auth/oidc/auth.routes.d.ts +18 -0
- package/lib/auth/oidc/public-api.d.ts +0 -1
- package/lib/core.module.d.ts +11 -0
- package/lib/testing/app-config-testing.d.ts +24 -0
- package/lib/testing/index.d.ts +1 -1
- package/lib/testing/noop-auth.module.d.ts +31 -4
- package/lib/translation/provide-i18n.d.ts +1 -1
- package/package.json +3 -3
- package/lib/auth/oidc/auth-routing.module.d.ts +0 -6
- package/lib/testing/core.testing.module.d.ts +0 -11
package/fesm2022/adf-core.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { MatTableModule, MatTableDataSource } from '@angular/material/table';
|
|
|
7
7
|
import * as i1$1 from '@ngx-translate/core';
|
|
8
8
|
import { TranslatePipe, provideTranslateService, TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
|
9
9
|
import * as i1$8 from '@angular/common/http';
|
|
10
|
-
import { HttpClient, HttpHeaders, HttpResponse,
|
|
10
|
+
import { HttpClient, HttpHeaders, HttpResponse, provideHttpClient, HTTP_INTERCEPTORS, withInterceptorsFromDi, withXsrfConfiguration } from '@angular/common/http';
|
|
11
11
|
import { ReplaySubject, BehaviorSubject, of, Subject, switchMap as switchMap$1, from, fromEvent, Observable, throwError, combineLatest, defer, EMPTY, race, forkJoin, merge } from 'rxjs';
|
|
12
12
|
import { map, distinctUntilChanged, take, switchMap, delay, catchError, skipWhile, filter, first, timeout, shareReplay, mergeMap, tap, retry, takeUntil, debounceTime, share, pairwise, buffer } from 'rxjs/operators';
|
|
13
13
|
import * as i1$4 from '@alfresco/adf-extensions';
|
|
@@ -61,14 +61,15 @@ import { RouterModule, Router, provideRouter } from '@angular/router';
|
|
|
61
61
|
import * as i2$6 from '@angular/material/checkbox';
|
|
62
62
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
63
63
|
import * as i1$a from 'angular-oauth2-oidc';
|
|
64
|
-
import { OAuthStorage, AuthConfig, OAuthService, OAuthErrorEvent, OAuthLogger, OAuthSuccessEvent, AUTH_CONFIG,
|
|
64
|
+
import { OAuthStorage, AuthConfig, OAuthService, OAuthErrorEvent, OAuthLogger, OAuthSuccessEvent, AUTH_CONFIG, provideOAuthClient } from 'angular-oauth2-oidc';
|
|
65
65
|
import ee from 'event-emitter';
|
|
66
66
|
import { Minimatch } from 'minimatch';
|
|
67
67
|
import { JwksValidationHandler } from 'angular-oauth2-oidc-jwks';
|
|
68
|
+
import { AuthenticationInterceptor, Authentication } from '@alfresco/adf-core/auth';
|
|
68
69
|
import * as i2$7 from '@angular/material/tabs';
|
|
69
70
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
70
71
|
import * as i1$b from '@angular/material/snack-bar';
|
|
71
|
-
import { MAT_SNACK_BAR_DATA, MatSnackBarModule
|
|
72
|
+
import { MAT_SNACK_BAR_DATA, MatSnackBarModule } from '@angular/material/snack-bar';
|
|
72
73
|
import * as i4$1 from '@angular/material/divider';
|
|
73
74
|
import { MatDividerModule } from '@angular/material/divider';
|
|
74
75
|
import { moveItemInArray, CdkDropList, CdkDrag, CdkDragHandle } from '@angular/cdk/drag-drop';
|
|
@@ -94,13 +95,11 @@ import { Breakpoints } from '@angular/cdk/layout';
|
|
|
94
95
|
import '@alfresco/js-api';
|
|
95
96
|
import * as i6$1 from '@angular/material/badge';
|
|
96
97
|
import { MatBadgeModule } from '@angular/material/badge';
|
|
97
|
-
import { NoopAnimationsModule, provideAnimations } from '@angular/platform-browser/animations';
|
|
98
|
-
import { AuthenticationInterceptor, Authentication } from '@alfresco/adf-core/auth';
|
|
99
98
|
import { MatGridListModule } from '@angular/material/grid-list';
|
|
100
99
|
import { MatRadioModule } from '@angular/material/radio';
|
|
101
100
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
101
|
+
import { provideAnimations } from '@angular/platform-browser/animations';
|
|
102
102
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
|
103
|
-
import { RouterTestingModule } from '@angular/router/testing';
|
|
104
103
|
import { MatSelectHarness } from '@angular/material/select/testing';
|
|
105
104
|
import { MatChipHarness, MatChipListboxHarness, MatChipGridHarness } from '@angular/material/chips/testing';
|
|
106
105
|
import { MatButtonHarness } from '@angular/material/button/testing';
|
|
@@ -10623,6 +10622,63 @@ class IdentityRoleModel {
|
|
|
10623
10622
|
* limitations under the License.
|
|
10624
10623
|
*/
|
|
10625
10624
|
|
|
10625
|
+
/*!
|
|
10626
|
+
* @license
|
|
10627
|
+
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
10628
|
+
*
|
|
10629
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10630
|
+
* you may not use this file except in compliance with the License.
|
|
10631
|
+
* You may obtain a copy of the License at
|
|
10632
|
+
*
|
|
10633
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10634
|
+
*
|
|
10635
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
10636
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10637
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10638
|
+
* See the License for the specific language governing permissions and
|
|
10639
|
+
* limitations under the License.
|
|
10640
|
+
*/
|
|
10641
|
+
/**
|
|
10642
|
+
* TokenInterceptor is an HTTP interceptor that processes HTTP requests and responses
|
|
10643
|
+
* to handle the id_token. It checks if the request URL matches the token endpoint
|
|
10644
|
+
* and processes the response to store the `id_token` in the OAuth storage if it is
|
|
10645
|
+
* not already set.
|
|
10646
|
+
* The purpose of this interceptor is to fix the missing `id_token_hint` required by the Idp to complete the logout.
|
|
10647
|
+
* `id_token_hint` is set by the `angular-oauth2-oidc` library only when the `id_token` is set in the storage.
|
|
10648
|
+
* https://github.com/manfredsteyer/angular-oauth2-oidc/blob/15.0.0/projects/lib/src/oauth-service.ts#L2555
|
|
10649
|
+
*
|
|
10650
|
+
* See the related issue: https://github.com/manfredsteyer/angular-oauth2-oidc/issues/1443
|
|
10651
|
+
*
|
|
10652
|
+
* @function intercept
|
|
10653
|
+
* @param {HttpRequest<unknown>} request - The outgoing HTTP request.
|
|
10654
|
+
* @param {HttpHandler} next - The next handler in the HTTP request chain.
|
|
10655
|
+
* @returns {Observable<HttpEvent<unknown>>} An observable of the HTTP event.
|
|
10656
|
+
*/
|
|
10657
|
+
class TokenInterceptor {
|
|
10658
|
+
constructor() {
|
|
10659
|
+
this._oauthStorage = inject(OAuthStorage);
|
|
10660
|
+
this._oauthService = inject(OAuthService);
|
|
10661
|
+
}
|
|
10662
|
+
intercept(request, next) {
|
|
10663
|
+
const tokenEndpoint = this._oauthService.tokenEndpoint;
|
|
10664
|
+
if (tokenEndpoint && request.url === tokenEndpoint) {
|
|
10665
|
+
return next.handle(request).pipe(tap((event) => {
|
|
10666
|
+
if (event instanceof HttpResponse) {
|
|
10667
|
+
if (!this._oauthService.getIdToken() && event?.body?.id_token) {
|
|
10668
|
+
this._oauthStorage.setItem('id_token', event.body.id_token);
|
|
10669
|
+
}
|
|
10670
|
+
}
|
|
10671
|
+
}));
|
|
10672
|
+
}
|
|
10673
|
+
return next.handle(request);
|
|
10674
|
+
}
|
|
10675
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TokenInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
10676
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TokenInterceptor }); }
|
|
10677
|
+
}
|
|
10678
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TokenInterceptor, decorators: [{
|
|
10679
|
+
type: Injectable
|
|
10680
|
+
}] });
|
|
10681
|
+
|
|
10626
10682
|
/*!
|
|
10627
10683
|
* @license
|
|
10628
10684
|
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
@@ -10702,75 +10758,9 @@ const OidcAuthGuard = async () => {
|
|
|
10702
10758
|
* See the License for the specific language governing permissions and
|
|
10703
10759
|
* limitations under the License.
|
|
10704
10760
|
*/
|
|
10705
|
-
const
|
|
10706
|
-
|
|
10707
|
-
|
|
10708
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: AuthRoutingModule }); }
|
|
10709
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AuthRoutingModule, providers: [provideRouter(routes)] }); }
|
|
10710
|
-
}
|
|
10711
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AuthRoutingModule, decorators: [{
|
|
10712
|
-
type: NgModule,
|
|
10713
|
-
args: [{
|
|
10714
|
-
providers: [provideRouter(routes)]
|
|
10715
|
-
}]
|
|
10716
|
-
}] });
|
|
10717
|
-
|
|
10718
|
-
/*!
|
|
10719
|
-
* @license
|
|
10720
|
-
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
10721
|
-
*
|
|
10722
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10723
|
-
* you may not use this file except in compliance with the License.
|
|
10724
|
-
* You may obtain a copy of the License at
|
|
10725
|
-
*
|
|
10726
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10727
|
-
*
|
|
10728
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
10729
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10730
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10731
|
-
* See the License for the specific language governing permissions and
|
|
10732
|
-
* limitations under the License.
|
|
10733
|
-
*/
|
|
10734
|
-
/**
|
|
10735
|
-
* TokenInterceptor is an HTTP interceptor that processes HTTP requests and responses
|
|
10736
|
-
* to handle the id_token. It checks if the request URL matches the token endpoint
|
|
10737
|
-
* and processes the response to store the `id_token` in the OAuth storage if it is
|
|
10738
|
-
* not already set.
|
|
10739
|
-
* The purpose of this interceptor is to fix the missing `id_token_hint` required by the Idp to complete the logout.
|
|
10740
|
-
* `id_token_hint` is set by the `angular-oauth2-oidc` library only when the `id_token` is set in the storage.
|
|
10741
|
-
* https://github.com/manfredsteyer/angular-oauth2-oidc/blob/15.0.0/projects/lib/src/oauth-service.ts#L2555
|
|
10742
|
-
*
|
|
10743
|
-
* See the related issue: https://github.com/manfredsteyer/angular-oauth2-oidc/issues/1443
|
|
10744
|
-
*
|
|
10745
|
-
* @function intercept
|
|
10746
|
-
* @param {HttpRequest<unknown>} request - The outgoing HTTP request.
|
|
10747
|
-
* @param {HttpHandler} next - The next handler in the HTTP request chain.
|
|
10748
|
-
* @returns {Observable<HttpEvent<unknown>>} An observable of the HTTP event.
|
|
10749
|
-
*/
|
|
10750
|
-
class TokenInterceptor {
|
|
10751
|
-
constructor() {
|
|
10752
|
-
this._oauthStorage = inject(OAuthStorage);
|
|
10753
|
-
this._oauthService = inject(OAuthService);
|
|
10754
|
-
}
|
|
10755
|
-
intercept(request, next) {
|
|
10756
|
-
const tokenEndpoint = this._oauthService.tokenEndpoint;
|
|
10757
|
-
if (tokenEndpoint && request.url === tokenEndpoint) {
|
|
10758
|
-
return next.handle(request).pipe(tap((event) => {
|
|
10759
|
-
if (event instanceof HttpResponse) {
|
|
10760
|
-
if (!this._oauthService.getIdToken() && event?.body?.id_token) {
|
|
10761
|
-
this._oauthStorage.setItem('id_token', event.body.id_token);
|
|
10762
|
-
}
|
|
10763
|
-
}
|
|
10764
|
-
}));
|
|
10765
|
-
}
|
|
10766
|
-
return next.handle(request);
|
|
10767
|
-
}
|
|
10768
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TokenInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
10769
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TokenInterceptor }); }
|
|
10770
|
-
}
|
|
10771
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TokenInterceptor, decorators: [{
|
|
10772
|
-
type: Injectable
|
|
10773
|
-
}] });
|
|
10761
|
+
const AUTH_ROUTES = [
|
|
10762
|
+
{ path: 'view/authentication-confirmation', component: AuthenticationConfirmationComponent, canActivate: [OidcAuthGuard] }
|
|
10763
|
+
];
|
|
10774
10764
|
|
|
10775
10765
|
/*!
|
|
10776
10766
|
* @license
|
|
@@ -10792,22 +10782,46 @@ const JWT_STORAGE_SERVICE = new InjectionToken('JWT_STORAGE_SERVICE', {
|
|
|
10792
10782
|
providedIn: 'root',
|
|
10793
10783
|
factory: () => inject(StorageService)
|
|
10794
10784
|
});
|
|
10795
|
-
/**
|
|
10796
|
-
* Create a Login Factory function
|
|
10797
|
-
*
|
|
10798
|
-
* @param redirectService auth redirect service
|
|
10799
|
-
* @returns a factory function
|
|
10800
|
-
*/
|
|
10801
|
-
function loginFactory(redirectService) {
|
|
10802
|
-
return () => redirectService.init();
|
|
10803
|
-
}
|
|
10804
10785
|
/**
|
|
10805
10786
|
* @returns current instance of OAuthStorage
|
|
10806
10787
|
*/
|
|
10807
10788
|
function oauthStorageFactory() {
|
|
10808
10789
|
return inject(JWT_STORAGE_SERVICE);
|
|
10809
10790
|
}
|
|
10791
|
+
/**
|
|
10792
|
+
* Provides core authentication api
|
|
10793
|
+
*
|
|
10794
|
+
* @param config Optional configuration parameters
|
|
10795
|
+
* @returns Angular providers
|
|
10796
|
+
*/
|
|
10797
|
+
function provideCoreAuth(config = { useHash: false }) {
|
|
10798
|
+
config.preventClearHashAfterLogin = config.preventClearHashAfterLogin ?? true;
|
|
10799
|
+
return [
|
|
10800
|
+
provideHttpClient(withInterceptorsFromDi(), withXsrfConfiguration({ cookieName: 'CSRF-TOKEN', headerName: 'X-CSRF-TOKEN' })),
|
|
10801
|
+
provideOAuthClient(),
|
|
10802
|
+
provideRouter(AUTH_ROUTES),
|
|
10803
|
+
{ provide: OAuthStorage, useFactory: oauthStorageFactory },
|
|
10804
|
+
AuthenticationService,
|
|
10805
|
+
{
|
|
10806
|
+
provide: AUTH_CONFIG,
|
|
10807
|
+
useFactory: authConfigFactory,
|
|
10808
|
+
deps: [AuthConfigService]
|
|
10809
|
+
},
|
|
10810
|
+
RedirectAuthService,
|
|
10811
|
+
{ provide: AuthService, useExisting: RedirectAuthService },
|
|
10812
|
+
provideAppInitializer(() => {
|
|
10813
|
+
const redirectService = inject(RedirectAuthService);
|
|
10814
|
+
return redirectService.init();
|
|
10815
|
+
}),
|
|
10816
|
+
{ provide: HTTP_INTERCEPTORS, useClass: TokenInterceptor, multi: true },
|
|
10817
|
+
{ provide: HTTP_INTERCEPTORS, useClass: AuthenticationInterceptor, multi: true },
|
|
10818
|
+
{ provide: AUTH_MODULE_CONFIG, useValue: config },
|
|
10819
|
+
{ provide: Authentication, useClass: AuthenticationService }
|
|
10820
|
+
];
|
|
10821
|
+
}
|
|
10822
|
+
/** @deprecated use `provideCoreAuth()` provider api instead */
|
|
10810
10823
|
class AuthModule {
|
|
10824
|
+
/* @deprecated use `provideCoreAuth()` provider api instead */
|
|
10811
10825
|
static forRoot(config = { useHash: false }) {
|
|
10812
10826
|
config.preventClearHashAfterLogin = config.preventClearHashAfterLogin ?? true;
|
|
10813
10827
|
return {
|
|
@@ -10816,52 +10830,13 @@ class AuthModule {
|
|
|
10816
10830
|
};
|
|
10817
10831
|
}
|
|
10818
10832
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10819
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: AuthModule
|
|
10820
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AuthModule, providers: [
|
|
10821
|
-
{ provide: OAuthStorage, useFactory: oauthStorageFactory },
|
|
10822
|
-
{ provide: AuthenticationService },
|
|
10823
|
-
{
|
|
10824
|
-
provide: AUTH_CONFIG,
|
|
10825
|
-
useFactory: authConfigFactory,
|
|
10826
|
-
deps: [AuthConfigService]
|
|
10827
|
-
},
|
|
10828
|
-
RedirectAuthService,
|
|
10829
|
-
{ provide: AuthService, useExisting: RedirectAuthService },
|
|
10830
|
-
provideAppInitializer(() => {
|
|
10831
|
-
const initializerFn = loginFactory(inject(RedirectAuthService));
|
|
10832
|
-
return initializerFn();
|
|
10833
|
-
}),
|
|
10834
|
-
{
|
|
10835
|
-
provide: HTTP_INTERCEPTORS,
|
|
10836
|
-
useClass: TokenInterceptor,
|
|
10837
|
-
multi: true
|
|
10838
|
-
}
|
|
10839
|
-
], imports: [AuthRoutingModule, OAuthModule.forRoot()] }); }
|
|
10833
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: AuthModule }); }
|
|
10834
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AuthModule, providers: [...provideCoreAuth()] }); }
|
|
10840
10835
|
}
|
|
10841
10836
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AuthModule, decorators: [{
|
|
10842
10837
|
type: NgModule,
|
|
10843
10838
|
args: [{
|
|
10844
|
-
|
|
10845
|
-
providers: [
|
|
10846
|
-
{ provide: OAuthStorage, useFactory: oauthStorageFactory },
|
|
10847
|
-
{ provide: AuthenticationService },
|
|
10848
|
-
{
|
|
10849
|
-
provide: AUTH_CONFIG,
|
|
10850
|
-
useFactory: authConfigFactory,
|
|
10851
|
-
deps: [AuthConfigService]
|
|
10852
|
-
},
|
|
10853
|
-
RedirectAuthService,
|
|
10854
|
-
{ provide: AuthService, useExisting: RedirectAuthService },
|
|
10855
|
-
provideAppInitializer(() => {
|
|
10856
|
-
const initializerFn = loginFactory(inject(RedirectAuthService));
|
|
10857
|
-
return initializerFn();
|
|
10858
|
-
}),
|
|
10859
|
-
{
|
|
10860
|
-
provide: HTTP_INTERCEPTORS,
|
|
10861
|
-
useClass: TokenInterceptor,
|
|
10862
|
-
multi: true
|
|
10863
|
-
}
|
|
10864
|
-
]
|
|
10839
|
+
providers: [...provideCoreAuth()]
|
|
10865
10840
|
}]
|
|
10866
10841
|
}] });
|
|
10867
10842
|
|
|
@@ -25028,6 +25003,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
25028
25003
|
type: Input
|
|
25029
25004
|
}] } });
|
|
25030
25005
|
|
|
25006
|
+
/*!
|
|
25007
|
+
* @license
|
|
25008
|
+
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
25009
|
+
*
|
|
25010
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
25011
|
+
* you may not use this file except in compliance with the License.
|
|
25012
|
+
* You may obtain a copy of the License at
|
|
25013
|
+
*
|
|
25014
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
25015
|
+
*
|
|
25016
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
25017
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
25018
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
25019
|
+
* See the License for the specific language governing permissions and
|
|
25020
|
+
* limitations under the License.
|
|
25021
|
+
*/
|
|
25022
|
+
class DecimalRenderMiddlewareService {
|
|
25023
|
+
constructor() {
|
|
25024
|
+
this.type = FormFieldTypes.DECIMAL;
|
|
25025
|
+
}
|
|
25026
|
+
getParsedField(field) {
|
|
25027
|
+
const allowedMaxPrecision = field.precision;
|
|
25028
|
+
const value = field.value;
|
|
25029
|
+
field.value = this.forceMaxPrecisionIfNeeded(value, allowedMaxPrecision);
|
|
25030
|
+
return field;
|
|
25031
|
+
}
|
|
25032
|
+
forceMaxPrecisionIfNeeded(value, allowedMaxPrecision) {
|
|
25033
|
+
let numberOfDecimalDigits = 0;
|
|
25034
|
+
const stringValue = typeof value === 'string' ? value : `${value}`;
|
|
25035
|
+
const numberChunks = stringValue.split('.');
|
|
25036
|
+
if (numberChunks.length === 2) {
|
|
25037
|
+
numberOfDecimalDigits = numberChunks[1].length;
|
|
25038
|
+
}
|
|
25039
|
+
if (numberOfDecimalDigits > allowedMaxPrecision) {
|
|
25040
|
+
return parseFloat(value.toString()).toFixed(allowedMaxPrecision);
|
|
25041
|
+
}
|
|
25042
|
+
return value;
|
|
25043
|
+
}
|
|
25044
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DecimalRenderMiddlewareService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
25045
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DecimalRenderMiddlewareService }); }
|
|
25046
|
+
}
|
|
25047
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DecimalRenderMiddlewareService, decorators: [{
|
|
25048
|
+
type: Injectable
|
|
25049
|
+
}] });
|
|
25050
|
+
|
|
25031
25051
|
/*!
|
|
25032
25052
|
* @license
|
|
25033
25053
|
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
@@ -25133,6 +25153,11 @@ class FormRendererComponent {
|
|
|
25133
25153
|
provide: FormRulesManager,
|
|
25134
25154
|
useFactory: formRulesManagerFactory,
|
|
25135
25155
|
deps: [Injector]
|
|
25156
|
+
},
|
|
25157
|
+
{
|
|
25158
|
+
provide: FORM_FIELD_MODEL_RENDER_MIDDLEWARE,
|
|
25159
|
+
useClass: DecimalRenderMiddlewareService,
|
|
25160
|
+
multi: true
|
|
25136
25161
|
}
|
|
25137
25162
|
], ngImport: i0, template: "<div id=\"adf-form-renderer\" class=\"{{ formDefinition.className }} adf-form-renderer\"\n [ngClass]=\"{ 'adf-readonly-form': formDefinition.readOnly }\">\n <div *ngIf=\"formDefinition.hasTabs()\">\n <div *ngIf=\"hasTabs()\" class=\"alfresco-tabs-widget\">\n <mat-tab-group [preserveContent]=\"true\">\n <mat-tab *ngFor=\"let tab of visibleTabs()\" [label]=\"tab.title | translate \">\n <ng-template matTabContent>\n <div class=\"adf-form-tab-content\">\n <ng-template *ngTemplateOutlet=\"render; context: { fieldToRender: tab.fields }\" />\n </div>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </div>\n </div>\n\n <div *ngIf=\"!formDefinition.hasTabs() && formDefinition.hasFields()\">\n <ng-template *ngTemplateOutlet=\"render; context: { fieldToRender: formDefinition.fields }\" />\n </div>\n</div>\n\n<ng-template #render let-fieldToRender=\"fieldToRender\">\n <div *ngFor=\"let currentRootElement of fieldToRender\">\n <div *ngIf=\"currentRootElement.type === 'section'\" [id]=\"'field-' + currentRootElement?.id + '-container'\" class=\"adf-container-widget\">\n <adf-form-section [field]=\"currentRootElement\" />\n </div>\n\n <div *ngIf=\"currentRootElement.type === 'container' || currentRootElement.type === 'group'\"\n [id]=\"'field-' + currentRootElement?.id + '-container'\"\n class=\"adf-container-widget\"\n [hidden]=\"!currentRootElement?.isVisible\">\n <adf-header-widget [element]=\"currentRootElement\" />\n <div *ngIf=\"currentRootElement?.form?.enableFixedSpace; else fixingTemplate\">\n <div class=\"adf-grid-list\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + getNumberOfColumns(currentRootElement) + ', 1fr)' }\"\n *ngIf=\"currentRootElement?.isExpanded\">\n <div class=\"adf-grid-list-item\"\n *ngFor=\"let field of getContainerFields(currentRootElement)\"\n [ngStyle]=\"{ 'grid-area': 'auto / auto / span ' + (field?.rowspan || 1) + ' / span ' + (field?.colspan || 1) }\">\n <adf-form-field *ngIf=\"field\" [field]=\"field\" />\n </div>\n </div>\n </div>\n\n <ng-template #fixingTemplate>\n <section class=\"adf-grid-list-column-view\" *ngIf=\"currentRootElement?.isExpanded\">\n <div class=\"adf-grid-list-single-column\"\n *ngFor=\"let column of currentRootElement?.columns\"\n [style.width.%]=\"getColumnWidth(currentRootElement)\"\n >\n <ng-container *ngFor=\"let field of column?.fields\">\n <ng-container *ngIf=\"field.type === 'section'; else formField\">\n <adf-form-section [field]=\"field\"/>\n </ng-container>\n <ng-template #formField>\n <div class=\"adf-grid-list-column-view-item\">\n <adf-form-field [field]=\"field\"/>\n </div>\n </ng-template>\n </ng-container>\n </div>\n </section>\n </ng-template>\n\n <ng-template #columnViewItem let-column=\"column\">\n <div class=\"adf-grid-list-column-view-item\" *ngFor=\"let field of column?.fields\">\n <adf-form-field *ngIf=\"field\" [field]=\"field\" />\n </div>\n </ng-template>\n </div>\n\n <div *ngIf=\"currentRootElement.type === 'dynamic-table'\" class=\"adf-container-widget\">\n <adf-form-field [field]=\"currentRootElement\" />\n </div>\n\n <div class=\"adf-container-widget\"\n *ngIf=\"currentRootElement.type === 'readonly' && currentRootElement.field.params.field.type === 'dynamic-table'\">\n <adf-form-field [field]=\"currentRootElement.field\"/>\n </div>\n </div>\n</ng-template>\n", styles: [".adf-hidden{display:none}.adf-field-list{padding:0;list-style-type:none;width:100%;height:100%}.adf-form-renderer .mat-mdc-form-field-infix{width:auto}.alfresco-tabs-widget{width:100%}.alfresco-tabs-widget .adf-form-tab-content{margin-top:1em}.alfresco-tabs-widget .adf-form-tab-group{width:100%}.alfresco-tabs-widget .mat-mdc-tab-body{margin-bottom:8em}@media (max-width: 959.9px){.alfresco-tabs-widget .mat-mdc-tab-body{margin-bottom:0}}.alfresco-tabs-widget .mat-mdc-tab-header{z-index:2;margin:0;background-color:#fff;position:absolute;width:98%;margin-left:0!important;margin-right:10px!important;top:0}.alfresco-tabs-widget .mat-mdc-tab-body-wrapper{padding-top:5%}.mat-mdc-card-content:first-child{padding-top:1em}.adf-container-widget .adf-grid-list{display:grid}.adf-container-widget .adf-grid-list-column-view{display:flex;margin-right:-1%;width:100%;gap:8px}@media (max-width: 959.9px){.adf-container-widget .adf-grid-list-column-view{display:flow}}.adf-container-widget .adf-grid-list-column-view-item{width:100%;box-sizing:border-box}.adf-container-widget .adf-grid-list-column-view .adf-radio-buttons-widget{padding-left:12px}.adf-container-widget .adf-grid-list-single-column{display:flex;flex-direction:column;flex:1 1 auto}.adf-container-widget .adf-grid-list-item{box-sizing:border-box;padding-left:3px;padding-right:3px}@media (max-width: 959.9px){.adf-container-widget .adf-grid-list-item{flex:1 0 100%}.adf-container-widget .adf-grid-list--column-view{flex-direction:column}.adf-container-widget .adf-grid-list-single-column{display:block;width:90%!important}.adf-container-widget .adf-grid-list-column-view-item{flex:1 0 auto}}.adf-container-widget mat-input-placeholder{top:1.8em}.adf-container-widget .mat-focused{width:100%}.adf-container-widget .mat-focused .mdc-text-field--focused label{color:var(--theme-primary-color)}.adf-container-widget .mat-focused label{transition:transform .15s linear;background-color:.3s cubic-bezier(.55,0,.55,.2)}.adf-container-widget .mat-focused .mat-mdc-form-field-text-prefix{color:var(--theme-primary-color)}.adf-container-widget .mat-grid-tile{overflow:visible;width:80%}.adf-container-widget adf-form-field,.adf-container-widget mat-form-field{width:100%}.adf-form-container{max-width:100%;max-height:100%}.adf-form-container .mat-mdc-card{padding:16px 24px;overflow:hidden}.adf-form-container .mat-mdc-tab-header{position:fixed;z-index:1000}.adf-form-container .mat-mdc-card-header-text{margin:0}.adf-form-container .mat-mdc-card-content{overflow:hidden;padding-top:0}.adf-form-container mat-tab-label-text{font-size:var(--theme-subheading-2-font-size);line-height:var(--theme-headline-line-height);letter-spacing:-.4px;text-align:left;color:#0000008a;text-transform:uppercase}.adf-form-container .mdc-tab-indicator .mdc-tab-indicator__content--underline{border-top-width:4px}.adf-form-container .mat-mdc-text-field-wrapper{margin:0 12px 0 0}.adf-form-title{font-size:var(--theme-title-font-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.adf-form-reload-button{position:absolute;right:12px;top:30px}.adf-form-validation-button{position:absolute;right:50px;top:39px;color:var(--theme-accent-color)}.adf-form-validation-button .adf-invalid-color{color:var(--theme-warn-color)}.adf-form-hide-button{display:none}.adf-task-title{text-align:center}.adf-form-mat-card-actions{padding-bottom:25px;padding-right:25px}.adf-form-mat-card-actions .mat-mdc-button{height:36px;border-radius:5px;width:auto;padding:0 16px;margin:0 8px;white-space:nowrap}.adf-form-mat-card-actions .mdc-button__label{min-width:58px}.adf-left-label-input-container{display:flex}.adf-left-label-input-container div:nth-child(2){flex:1}.adf-left-label-input-container .mat-mdc-floating-label{top:auto;bottom:0}.adf-left-label{line-height:64px;margin-right:15px}.adf-error-messages-container{min-height:35px}.adf-error-messages-container-visible{visibility:visible}.adf-error-messages-container-hidden{visibility:hidden}form-field{width:100%}form-field .mat-mdc-input-element{font-size:var(--theme-body-2-font-size);padding-top:8px;line-height:normal}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "directive", type: i2$7.MatTabContent, selector: "[matTabContent]" }, { kind: "component", type: i2$7.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i2$7.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: FormFieldComponent, selector: "adf-form-field", inputs: ["field"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: HeaderWidgetComponent, selector: "adf-header-widget", inputs: ["element"] }, { kind: "component", type: FormSectionComponent, selector: "adf-form-section", inputs: ["field"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
25138
25163
|
}
|
|
@@ -25143,6 +25168,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
25143
25168
|
provide: FormRulesManager,
|
|
25144
25169
|
useFactory: formRulesManagerFactory,
|
|
25145
25170
|
deps: [Injector]
|
|
25171
|
+
},
|
|
25172
|
+
{
|
|
25173
|
+
provide: FORM_FIELD_MODEL_RENDER_MIDDLEWARE,
|
|
25174
|
+
useClass: DecimalRenderMiddlewareService,
|
|
25175
|
+
multi: true
|
|
25146
25176
|
}
|
|
25147
25177
|
], imports: [
|
|
25148
25178
|
NgIf,
|
|
@@ -25171,51 +25201,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
25171
25201
|
type: Input
|
|
25172
25202
|
}] } });
|
|
25173
25203
|
|
|
25174
|
-
/*!
|
|
25175
|
-
* @license
|
|
25176
|
-
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
25177
|
-
*
|
|
25178
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
25179
|
-
* you may not use this file except in compliance with the License.
|
|
25180
|
-
* You may obtain a copy of the License at
|
|
25181
|
-
*
|
|
25182
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
25183
|
-
*
|
|
25184
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
25185
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
25186
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
25187
|
-
* See the License for the specific language governing permissions and
|
|
25188
|
-
* limitations under the License.
|
|
25189
|
-
*/
|
|
25190
|
-
class DecimalRenderMiddlewareService {
|
|
25191
|
-
constructor() {
|
|
25192
|
-
this.type = FormFieldTypes.DECIMAL;
|
|
25193
|
-
}
|
|
25194
|
-
getParsedField(field) {
|
|
25195
|
-
const allowedMaxPrecision = field.precision;
|
|
25196
|
-
const value = field.value;
|
|
25197
|
-
field.value = this.forceMaxPrecisionIfNeeded(value, allowedMaxPrecision);
|
|
25198
|
-
return field;
|
|
25199
|
-
}
|
|
25200
|
-
forceMaxPrecisionIfNeeded(value, allowedMaxPrecision) {
|
|
25201
|
-
let numberOfDecimalDigits = 0;
|
|
25202
|
-
const stringValue = typeof value === 'string' ? value : `${value}`;
|
|
25203
|
-
const numberChunks = stringValue.split('.');
|
|
25204
|
-
if (numberChunks.length === 2) {
|
|
25205
|
-
numberOfDecimalDigits = numberChunks[1].length;
|
|
25206
|
-
}
|
|
25207
|
-
if (numberOfDecimalDigits > allowedMaxPrecision) {
|
|
25208
|
-
return parseFloat(value.toString()).toFixed(allowedMaxPrecision);
|
|
25209
|
-
}
|
|
25210
|
-
return value;
|
|
25211
|
-
}
|
|
25212
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DecimalRenderMiddlewareService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
25213
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DecimalRenderMiddlewareService }); }
|
|
25214
|
-
}
|
|
25215
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DecimalRenderMiddlewareService, decorators: [{
|
|
25216
|
-
type: Injectable
|
|
25217
|
-
}] });
|
|
25218
|
-
|
|
25219
25204
|
/*!
|
|
25220
25205
|
* @license
|
|
25221
25206
|
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
@@ -32371,6 +32356,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
32371
32356
|
* See the License for the specific language governing permissions and
|
|
32372
32357
|
* limitations under the License.
|
|
32373
32358
|
*/
|
|
32359
|
+
/**
|
|
32360
|
+
* @deprecated this module is deprecated and will be removed
|
|
32361
|
+
* Use the following combination instead:
|
|
32362
|
+
* ```typescript
|
|
32363
|
+
* providers: [
|
|
32364
|
+
* provideI18N(...),
|
|
32365
|
+
* provideAppConfig(),
|
|
32366
|
+
* provideCoreAuth(...)
|
|
32367
|
+
* ]
|
|
32368
|
+
* ```
|
|
32369
|
+
*/
|
|
32374
32370
|
class CoreModule {
|
|
32375
32371
|
static forRoot() {
|
|
32376
32372
|
return {
|
|
@@ -32384,21 +32380,7 @@ class CoreModule {
|
|
|
32384
32380
|
},
|
|
32385
32381
|
defaultLanguage: 'en'
|
|
32386
32382
|
}),
|
|
32387
|
-
provideAppConfig()
|
|
32388
|
-
provideHttpClient(withInterceptorsFromDi(), withXsrfConfiguration({ cookieName: 'CSRF-TOKEN', headerName: 'X-CSRF-TOKEN' })),
|
|
32389
|
-
{ provide: HTTP_INTERCEPTORS, useClass: AuthenticationInterceptor, multi: true },
|
|
32390
|
-
{ provide: Authentication, useClass: AuthenticationService },
|
|
32391
|
-
{
|
|
32392
|
-
provide: MAT_SNACK_BAR_DEFAULT_OPTIONS,
|
|
32393
|
-
useValue: {
|
|
32394
|
-
duration: 10000
|
|
32395
|
-
}
|
|
32396
|
-
},
|
|
32397
|
-
{
|
|
32398
|
-
provide: FORM_FIELD_MODEL_RENDER_MIDDLEWARE,
|
|
32399
|
-
useClass: DecimalRenderMiddlewareService,
|
|
32400
|
-
multi: true
|
|
32401
|
-
}
|
|
32383
|
+
provideAppConfig()
|
|
32402
32384
|
]
|
|
32403
32385
|
};
|
|
32404
32386
|
}
|
|
@@ -32501,6 +32483,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
32501
32483
|
}]
|
|
32502
32484
|
}] });
|
|
32503
32485
|
|
|
32486
|
+
/*!
|
|
32487
|
+
* @license
|
|
32488
|
+
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
32489
|
+
*
|
|
32490
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
32491
|
+
* you may not use this file except in compliance with the License.
|
|
32492
|
+
* You may obtain a copy of the License at
|
|
32493
|
+
*
|
|
32494
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
32495
|
+
*
|
|
32496
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
32497
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
32498
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
32499
|
+
* See the License for the specific language governing permissions and
|
|
32500
|
+
* limitations under the License.
|
|
32501
|
+
*/
|
|
32502
|
+
class CoreStoryModule {
|
|
32503
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: CoreStoryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
32504
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: CoreStoryModule, imports: [AuthModule, i1$1.TranslateModule, CoreModule] }); }
|
|
32505
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: CoreStoryModule, providers: [provideTranslations('adf-core', 'assets/adf-core'), provideAnimations()], imports: [AuthModule.forRoot(), TranslateModule.forRoot(), CoreModule.forRoot()] }); }
|
|
32506
|
+
}
|
|
32507
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: CoreStoryModule, decorators: [{
|
|
32508
|
+
type: NgModule,
|
|
32509
|
+
args: [{
|
|
32510
|
+
imports: [AuthModule.forRoot(), TranslateModule.forRoot(), CoreModule.forRoot()],
|
|
32511
|
+
providers: [provideTranslations('adf-core', 'assets/adf-core'), provideAnimations()]
|
|
32512
|
+
}]
|
|
32513
|
+
}] });
|
|
32514
|
+
|
|
32504
32515
|
/*!
|
|
32505
32516
|
* @license
|
|
32506
32517
|
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
@@ -32602,92 +32613,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
32602
32613
|
type: Injectable,
|
|
32603
32614
|
args: [{ providedIn: 'root' }]
|
|
32604
32615
|
}] });
|
|
32605
|
-
|
|
32606
|
-
|
|
32607
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: NoopAuthModule, imports: [AuthModule, HttpClientTestingModule, RouterTestingModule] }); }
|
|
32608
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NoopAuthModule, providers: [
|
|
32609
|
-
{ provide: AppConfigService, useClass: AppConfigServiceMock },
|
|
32610
|
-
{ provide: CookieService, useClass: CookieServiceMock },
|
|
32611
|
-
{ provide: RedirectAuthService, useClass: NoopRedirectAuthService },
|
|
32612
|
-
provideAppInitializer(() => {
|
|
32613
|
-
const initializerFn = loadAppConfig(inject(AppConfigService), inject(StorageService), inject(AdfHttpClient), inject(StoragePrefixFactory));
|
|
32614
|
-
return initializerFn();
|
|
32615
|
-
}),
|
|
32616
|
-
{ provide: JWT_STORAGE_SERVICE, useClass: StorageService }
|
|
32617
|
-
], imports: [AuthModule.forRoot({ useHash: true }), HttpClientTestingModule, RouterTestingModule] }); }
|
|
32618
|
-
}
|
|
32619
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NoopAuthModule, decorators: [{
|
|
32620
|
-
type: NgModule,
|
|
32621
|
-
args: [{
|
|
32622
|
-
imports: [AuthModule.forRoot({ useHash: true }), HttpClientTestingModule, RouterTestingModule],
|
|
32623
|
-
providers: [
|
|
32624
|
-
{ provide: AppConfigService, useClass: AppConfigServiceMock },
|
|
32625
|
-
{ provide: CookieService, useClass: CookieServiceMock },
|
|
32626
|
-
{ provide: RedirectAuthService, useClass: NoopRedirectAuthService },
|
|
32627
|
-
provideAppInitializer(() => {
|
|
32628
|
-
const initializerFn = loadAppConfig(inject(AppConfigService), inject(StorageService), inject(AdfHttpClient), inject(StoragePrefixFactory));
|
|
32629
|
-
return initializerFn();
|
|
32630
|
-
}),
|
|
32631
|
-
{ provide: JWT_STORAGE_SERVICE, useClass: StorageService }
|
|
32632
|
-
]
|
|
32633
|
-
}]
|
|
32634
|
-
}] });
|
|
32635
|
-
|
|
32636
|
-
/*!
|
|
32637
|
-
* @license
|
|
32638
|
-
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
32639
|
-
*
|
|
32640
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
32641
|
-
* you may not use this file except in compliance with the License.
|
|
32642
|
-
* You may obtain a copy of the License at
|
|
32616
|
+
/**
|
|
32617
|
+
* Provides testing api for Core Auth layer
|
|
32643
32618
|
*
|
|
32644
|
-
*
|
|
32619
|
+
* Example:
|
|
32620
|
+
* ```typescript
|
|
32621
|
+
* TestBed.configureTestingModule({
|
|
32622
|
+
* providers: [provideCoreAuthTesting()]
|
|
32623
|
+
* });
|
|
32624
|
+
* ```
|
|
32645
32625
|
*
|
|
32646
|
-
*
|
|
32647
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
32648
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
32649
|
-
* See the License for the specific language governing permissions and
|
|
32650
|
-
* limitations under the License.
|
|
32626
|
+
* @returns list of Angular providers
|
|
32651
32627
|
*/
|
|
32652
|
-
|
|
32653
|
-
|
|
32654
|
-
|
|
32655
|
-
|
|
32656
|
-
|
|
32628
|
+
function provideCoreAuthTesting() {
|
|
32629
|
+
return [
|
|
32630
|
+
provideCoreAuth({ useHash: true }),
|
|
32631
|
+
{ provide: AppConfigService, useClass: AppConfigServiceMock },
|
|
32632
|
+
{ provide: CookieService, useClass: CookieServiceMock },
|
|
32633
|
+
{ provide: RedirectAuthService, useClass: NoopRedirectAuthService },
|
|
32634
|
+
provideAppConfig(),
|
|
32635
|
+
{ provide: JWT_STORAGE_SERVICE, useClass: StorageService }
|
|
32636
|
+
];
|
|
32657
32637
|
}
|
|
32658
|
-
|
|
32659
|
-
|
|
32660
|
-
|
|
32661
|
-
|
|
32662
|
-
|
|
32663
|
-
}] });
|
|
32664
|
-
|
|
32665
|
-
/*!
|
|
32666
|
-
* @license
|
|
32667
|
-
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
32668
|
-
*
|
|
32669
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
32670
|
-
* you may not use this file except in compliance with the License.
|
|
32671
|
-
* You may obtain a copy of the License at
|
|
32672
|
-
*
|
|
32673
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
32674
|
-
*
|
|
32675
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
32676
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
32677
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
32678
|
-
* See the License for the specific language governing permissions and
|
|
32679
|
-
* limitations under the License.
|
|
32680
|
-
*/
|
|
32681
|
-
class CoreStoryModule {
|
|
32682
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: CoreStoryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
32683
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: CoreStoryModule, imports: [AuthModule, i1$1.TranslateModule, CoreModule] }); }
|
|
32684
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: CoreStoryModule, providers: [provideTranslations('adf-core', 'assets/adf-core'), provideAnimations()], imports: [AuthModule.forRoot(), TranslateModule.forRoot(), CoreModule.forRoot()] }); }
|
|
32638
|
+
/* @deprecated use `provideCoreAuthTesting()` instead */
|
|
32639
|
+
class NoopAuthModule {
|
|
32640
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NoopAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
32641
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: NoopAuthModule }); }
|
|
32642
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NoopAuthModule, providers: [...provideCoreAuthTesting()] }); }
|
|
32685
32643
|
}
|
|
32686
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
32644
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NoopAuthModule, decorators: [{
|
|
32687
32645
|
type: NgModule,
|
|
32688
32646
|
args: [{
|
|
32689
|
-
|
|
32690
|
-
providers: [provideTranslations('adf-core', 'assets/adf-core'), provideAnimations()]
|
|
32647
|
+
providers: [...provideCoreAuthTesting()]
|
|
32691
32648
|
}]
|
|
32692
32649
|
}] });
|
|
32693
32650
|
|
|
@@ -33045,6 +33002,48 @@ class UnitTestingUtils {
|
|
|
33045
33002
|
}
|
|
33046
33003
|
}
|
|
33047
33004
|
|
|
33005
|
+
/*!
|
|
33006
|
+
* @license
|
|
33007
|
+
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
33008
|
+
*
|
|
33009
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
33010
|
+
* you may not use this file except in compliance with the License.
|
|
33011
|
+
* You may obtain a copy of the License at
|
|
33012
|
+
*
|
|
33013
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
33014
|
+
*
|
|
33015
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
33016
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
33017
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
33018
|
+
* See the License for the specific language governing permissions and
|
|
33019
|
+
* limitations under the License.
|
|
33020
|
+
*/
|
|
33021
|
+
/**
|
|
33022
|
+
* Provides testing api for application config.
|
|
33023
|
+
*
|
|
33024
|
+
* @param config Custom application configuration data
|
|
33025
|
+
* @returns Angular providers
|
|
33026
|
+
*/
|
|
33027
|
+
function provideAppConfigTesting(config) {
|
|
33028
|
+
config = config ?? {
|
|
33029
|
+
application: {
|
|
33030
|
+
name: 'Alfresco ADF Application',
|
|
33031
|
+
storagePrefix: 'ADF_APP'
|
|
33032
|
+
},
|
|
33033
|
+
ecmHost: 'http://{hostname}{:port}/ecm',
|
|
33034
|
+
bpmHost: 'http://{hostname}{:port}/bpm',
|
|
33035
|
+
logLevel: 'silent'
|
|
33036
|
+
};
|
|
33037
|
+
return [
|
|
33038
|
+
provideAppInitializer(() => {
|
|
33039
|
+
const service = inject(AppConfigService);
|
|
33040
|
+
service.config = config;
|
|
33041
|
+
service.status = Status.LOADED;
|
|
33042
|
+
return Promise.resolve();
|
|
33043
|
+
})
|
|
33044
|
+
];
|
|
33045
|
+
}
|
|
33046
|
+
|
|
33048
33047
|
/*!
|
|
33049
33048
|
* @license
|
|
33050
33049
|
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
@@ -33083,5 +33082,5 @@ class UnitTestingUtils {
|
|
|
33083
33082
|
* Generated bundle index. Do not edit.
|
|
33084
33083
|
*/
|
|
33085
33084
|
|
|
33086
|
-
export { ABOUT_DIRECTIVES, ADF_AMOUNT_SETTINGS, ADF_COMMENTS_SERVICE, ADF_DATETIME_FORMATS, ADF_DATE_FORMATS, AboutComponent, AboutExtensionListComponent, AboutLicenseListComponent, AboutModule, AboutPanelDirective, AboutRepositoryInfoComponent, AboutServerSettingsComponent, AboutStatusListComponent, AddNotificationStorybookComponent, AdfDateFnsAdapter, AdfDateTimeFnsAdapter, AmountCellComponent, AmountWidgetComponent, AppConfigPipe, AppConfigService, AppConfigServiceMock, AppConfigValues, AuthBearerInterceptor, AuthGuard, AuthGuardBpm, AuthGuardEcm, AuthGuardService, AuthGuardSsoRoleService, AuthModule,
|
|
33085
|
+
export { ABOUT_DIRECTIVES, ADF_AMOUNT_SETTINGS, ADF_COMMENTS_SERVICE, ADF_DATETIME_FORMATS, ADF_DATE_FORMATS, AboutComponent, AboutExtensionListComponent, AboutLicenseListComponent, AboutModule, AboutPanelDirective, AboutRepositoryInfoComponent, AboutServerSettingsComponent, AboutStatusListComponent, AddNotificationStorybookComponent, AdfDateFnsAdapter, AdfDateTimeFnsAdapter, AmountCellComponent, AmountWidgetComponent, AppConfigPipe, AppConfigService, AppConfigServiceMock, AppConfigValues, AuthBearerInterceptor, AuthGuard, AuthGuardBpm, AuthGuardEcm, AuthGuardService, AuthGuardSsoRoleService, AuthModule, AuthService, AuthenticationConfirmationComponent, AuthenticationService, AvatarComponent, BaseEvent, BaseUIEvent, BaseViewerWidgetComponent, BasicAlfrescoAuthService, BlankPageComponent, BlankPageModule, BooleanCellComponent, BpmProductVersionModel, ButtonComponent, ByPassFormRuleManager, CARD_VIEW_DIRECTIVES, CLIPBOARD_DIRECTIVES, CONTEXT_MENU_DIRECTIVES, CORE_DIRECTIVES, CORE_PIPES, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, CardItemTypeService, CardViewArrayItemComponent, CardViewArrayItemModel, CardViewBaseItemModel, CardViewBoolItemComponent, CardViewBoolItemModel, CardViewComponent, CardViewDateItemComponent, CardViewDateItemModel, CardViewDatetimeItemModel, CardViewFloatItemModel, CardViewIntItemModel, CardViewItemDispatcherComponent, CardViewItemFloatValidator, CardViewItemIntValidator, CardViewItemLengthValidator, CardViewItemLongValidator, CardViewItemMatchValidator, CardViewItemMinMaxValidator, CardViewItemPositiveIntValidator, CardViewItemPositiveLongValidator, CardViewKeyValuePairsItemComponent, CardViewKeyValuePairsItemModel, CardViewLongItemModel, CardViewMapItemComponent, CardViewMapItemModel, CardViewModule, CardViewSelectItemComponent, CardViewSelectItemModel, CardViewTextItemComponent, CardViewTextItemModel, CardViewUpdateService, CheckboxWidgetComponent, ClipboardComponent, ClipboardDirective, ClipboardModule, ClipboardService, CloseButtonPosition, ColumnsSelectorComponent, CommentListComponent, CommentListModule, CommentModel, CommentsComponent, CommentsModule, ConfirmDialogComponent, ConfirmDialogModule, ContainerColumnModel, ContainerModel, ContentAuth, ContentLinkModel, ContextMenuDirective, ContextMenuListComponent, ContextMenuModule, ContextMenuOverlayService, CookieService, CookieServiceMock, CoreModule, CoreStoryModule, CustomEmptyContentTemplateDirective, CustomLoadingContentTemplateDirective, CustomNoPermissionTemplateDirective, DATATABLE_DIRECTIVES, DEFAULT_DATE_FORMAT, DEFAULT_LANGUAGE_LIST, DEFAULT_PAGINATION, DIALOG_COMPONENT_DATA, DataCellEvent, DataCellEventModel, DataColumnComponent, DataColumnListComponent, DataRowActionEvent, DataRowActionModel, DataRowEvent, DataSorting, DataTableCellComponent, DataTableComponent, DataTableModule, DataTableRowComponent, DataTableSchema, DataTableService, DateCellComponent, DateColumnHeaderComponent, DateFnsUtils, DateTimePipe, DateTimeWidgetComponent, DateWidgetComponent, DebugAppConfigService, DecimalFieldValidator, DecimalNumberModel, DecimalNumberPipe, DecimalRenderMiddlewareService, DecimalWidgetComponent, DialogComponent, DialogSize, DirectiveModule, DisplayTextWidgetComponent, DownloadPromptActions, DownloadPromptDialogComponent, DownloadService, DropZoneDirective, DynamicChipListComponent, DynamicChipListModule, DynamicComponentMapper, DynamicComponentResolver, EXTENDIBLE_COMPONENT, EditJsonDialogComponent, EditJsonDialogModule, EmptyContentComponent, EmptyListBodyDirective, EmptyListComponent, EmptyListFooterDirective, EmptyListHeaderDirective, ErrorContentComponent, ErrorMessageModel, ErrorWidgetComponent, EventMock, FORM_FIELD_MODEL_RENDER_MIDDLEWARE, FORM_FIELD_VALIDATORS, FORM_RULES_MANAGER, FORM_SERVICE_FIELD_VALIDATORS_TOKEN, FieldStylePipe, FileSizeCellComponent, FileSizePipe, FileTypePipe, FileUtils, FixedValueFieldValidator, FormBaseComponent, FormBaseModule, FormErrorEvent, FormEvent, FormFieldComponent, FormFieldEvent, FormFieldModel, FormFieldTypes, FormModel, FormOutcomeEvent, FormOutcomeModel, FormRendererComponent, FormRenderingService, FormRulesEvent, FormRulesManager, FormService, FormSpinnerEvent, FormWidgetModel, FormatSpacePipe, FullNamePipe, HeaderComponent, HeaderFilterTemplateDirective, HeaderLayoutComponent, HeaderWidgetComponent, HighlightDirective, HighlightPipe, HighlightTransformService, HyperlinkWidgetComponent, INFO_DRAWER_DIRECTIVES, IconCellComponent, IconComponent, IconModule, IdentityGroupService, IdentityRoleModel, IdentityRoleService, IdentityUserInfoComponent, IdentityUserInfoModule, IdentityUserService, ImgViewerComponent, InfinitePaginationComponent, InfiniteSelectScrollDirective, InfoDrawerButtonsDirective, InfoDrawerComponent, InfoDrawerContentDirective, InfoDrawerLayoutComponent, InfoDrawerModule, InfoDrawerTabComponent, InfoDrawerTitleDirective, InitialUsernamePipe, InplaceFormInputComponent, InputMaskDirective, JSON_TYPE, JWT_STORAGE_SERVICE, JsonCellComponent, JsonWidgetComponent, JwtHelperService, LANDING_PAGE_TOKEN, LANGUAGE_MENU_DIRECTIVES, LAYOUT_DIRECTIVES, LOGIN_DIRECTIVES, LanguageMenuComponent, LanguageMenuModule, LanguagePickerComponent, LanguageService, LayoutContainerComponent, LoadingContentTemplateDirective, LocalizedDatePipe, LocationCellComponent, LogLevelsEnum, LogService, LoginComponent, LoginDialogComponent, LoginDialogPanelComponent, LoginErrorEvent, LoginFooterDirective, LoginHeaderDirective, LoginModule, LoginSubmitEvent, LoginSuccessEvent, LogoutDirective, MASK_DIRECTIVE, MOMENT_DATE_FORMATS, MainMenuDataTableTemplateDirective, MaterialModule, MaxLengthFieldValidator, MaxValueFieldValidator, MediaPlayerComponent, MinLengthFieldValidator, MinValueFieldValidator, ModuleListComponent, MomentDateAdapter, MultiValuePipe, MultilineTextWidgetComponentComponent, NOTIFICATION_HISTORY_DIRECTIVES, NOTIFICATION_TYPE, NavbarComponent, NavbarItemComponent, NoContentTemplateDirective, NoPermissionTemplateDirective, NoopAuthModule, NoopRedirectAuthService, NoopTranslateModule, NoopTranslationService, NotificationHistoryComponent, NotificationHistoryModule, NotificationService, NumberCellComponent, NumberFieldValidator, NumberWidgetComponent, OAuth2Service, ObjectDataColumn, ObjectDataRow, ObjectDataTableAdapter, ObjectUtils, OidcAuthGuard, OidcAuthenticationService, PAGINATION_DIRECTIVES, PDFJS_MODULE, PDFJS_VIEWER_MODULE, PackageListComponent, PageTitleService, PaginationComponent, PaginationModel, PaginationModule, PathInfo, PdfPasswordDialogComponent, PdfThumbComponent, PdfThumbListComponent, PdfViewerComponent, PipeModule, ProcessAuth, ProgressComponent, RedirectAuthService, RedirectionModel, RegExFieldValidator, RequestPaginationModel, RequiredFieldValidator, ResizableDirective, ResizeHandleDirective, SEARCH_AUTOCOMPLETE_VALUE_ACCESSOR, SEARCH_TEXT_INPUT_DIRECTIVES, STORAGE_PREFIX_FACTORY_SERVICE, SearchTextInputComponent, SearchTextModule, SearchTextStateEnum, SearchTriggerDirective, SelectFilterInputComponent, ShowHeaderMode, SidebarActionMenuComponent, SidebarMenuDirective, SidebarMenuExpandIconDirective, SidebarMenuTitleIconDirective, SidenavLayoutComponent, SidenavLayoutContentDirective, SidenavLayoutHeaderDirective, SidenavLayoutModule, SidenavLayoutNavigationDirective, SnackbarContentComponent, SnackbarContentModule, SortByCategoryMapperService, SortingPickerComponent, StartFormCustomButtonDirective, Status, StoragePrefixFactory, StorageService, StringUtils, TEMPLATE_DIRECTIVES, TOOLBAR_DIRECTIVES, TRANSLATION_PROVIDER, TabModel, TaskProcessVariableModel, TemplateModule, TextWidgetComponent, ThumbnailService, TimeAgoPipe, ToolbarComponent, ToolbarDividerComponent, ToolbarModule, ToolbarTitleComponent, TooltipCardComponent, TooltipCardDirective, TranslateLoaderService, TranslationMock, TranslationService, TruncatePipe, TxtViewerComponent, UnitTestingUtils, UnknownFormatComponent, UnknownWidgetComponent, UnsavedChangesDialogComponent, UnsavedChangesDialogModule, UnsavedChangesGuard, UploadDirective, UploadWidgetContentLinkModel, UploadWidgetContentLinkModelOptions, UrlService, User, UserAccessService, UserInfoMode, UserPreferenceValues, UserPreferencesService, VIEWER_DIRECTIVES, ValidateFormEvent, ValidateFormFieldEvent, ViewUtilService, ViewerComponent, ViewerExtensionDirective, ViewerModule, ViewerMoreActionsComponent, ViewerOpenWithComponent, ViewerRenderComponent, ViewerSidebarComponent, ViewerToolbarActionsComponent, ViewerToolbarComponent, ViewerToolbarCustomActionsComponent, WIDGET_DIRECTIVES, WidgetComponent, WidgetVisibilityService, amountColumnRows, booleanColumnRows, complexVisibilityJsonNotVisible, complexVisibilityJsonVisible, dateColumnRows, dateColumnTimeAgoRows, displayTextSchema, error, fakeForm, fakeFormChainedVisibilityJson, fakeFormCheckBoxVisibilityJson, fakeFormJson, fakeTaskProcessVariableModels, fileSizeColumnRows, formDefVisibilitiFieldDependsOnPreviousOne, formDefVisibilityFieldDependsOnNextOne, formDefinitionDropdownField, formDefinitionRequiredField, formDefinitionTwoTextFields, formModelTabs, formReadonlyTwoTextFields, formRulesManagerFactory, formTest, formValues, getDataColumnMock, headerSchema, iconColumnRows, imageColumnRows, info, isNumberValue, isOutcomeButtonVisible, jsonColumnRows, locationColumnRows, logLevels, oauthStorageFactory, predefinedTheme, provideAppConfig, provideAppConfigTesting, provideCoreAuth, provideCoreAuthTesting, provideI18N, provideLandingPage, provideTranslations, rootInitiator, searchAnimation, tabInvalidFormVisibility, tabVisibilityJsonMock, textColumnRows, transformKeyToObject, warning };
|
|
33087
33086
|
//# sourceMappingURL=adf-core.mjs.map
|