@alfresco/adf-core 8.4.0-17607933312 → 8.4.0-17617861152
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/api/lib/adf-http-client.service.d.ts +8 -12
- package/fesm2022/adf-core.mjs +2 -0
- package/fesm2022/adf-core.mjs.map +1 -1
- package/fesm2022/alfresco-adf-core-api.mjs +22 -34
- package/fesm2022/alfresco-adf-core-api.mjs.map +1 -1
- package/lib/auth/interfaces/authentication-service.interface.d.ts +5 -7
- package/lib/auth/services/authentication.service.d.ts +6 -8
- package/lib/auth/services/base-authentication.service.d.ts +6 -8
- package/package.json +3 -3
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
import { Emitters as JsApiEmitters, HttpClient as JsApiHttpClient } from '@alfresco/js-api';
|
|
2
2
|
import { HttpClient } from '@angular/common/http';
|
|
3
3
|
import { RequestOptions, SecurityOptions } from './interfaces';
|
|
4
|
-
import {
|
|
4
|
+
import ee, { Emitter } from 'event-emitter';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
type EventEmitterInstance = InstanceType<typeof EventEmitter>;
|
|
7
|
-
type EventEmitterEvents = 'progress' | 'success' | 'error' | 'forbidden' | 'abort' | 'unauthorized' | string;
|
|
8
6
|
export interface Emitters {
|
|
9
|
-
readonly eventEmitter:
|
|
10
|
-
readonly apiClientEmitter:
|
|
7
|
+
readonly eventEmitter: Emitter;
|
|
8
|
+
readonly apiClientEmitter: Emitter;
|
|
11
9
|
}
|
|
12
|
-
export declare class AdfHttpClient implements JsApiHttpClient {
|
|
10
|
+
export declare class AdfHttpClient implements ee.Emitter, JsApiHttpClient {
|
|
13
11
|
private httpClient;
|
|
14
|
-
|
|
12
|
+
on: ee.EmitterMethod;
|
|
13
|
+
off: ee.EmitterMethod;
|
|
14
|
+
once: ee.EmitterMethod;
|
|
15
15
|
_disableCsrf: boolean;
|
|
16
|
+
emit: (type: string, ...args: any[]) => void;
|
|
16
17
|
get disableCsrf(): boolean;
|
|
17
18
|
set disableCsrf(disableCsrf: boolean);
|
|
18
19
|
private defaultSecurityOptions;
|
|
19
20
|
constructor(httpClient: HttpClient);
|
|
20
|
-
on(event: EventEmitterEvents, fn: (...args: any[]) => void, context?: any): this;
|
|
21
|
-
off(event: EventEmitterEvents, fn?: (...args: any[]) => void, context?: any): this;
|
|
22
|
-
once(event: EventEmitterEvents, fn: (...args: any[]) => void, context?: any): this;
|
|
23
|
-
emit(event: EventEmitterEvents, ...args: any[]): boolean;
|
|
24
21
|
setDefaultSecurityOption(options: any): void;
|
|
25
22
|
merge(...objects: any[]): any;
|
|
26
23
|
request<T = any>(url: string, options?: RequestOptions, sc?: SecurityOptions, emitters?: JsApiEmitters): Promise<T>;
|
|
@@ -69,4 +66,3 @@ export declare class AdfHttpClient implements JsApiHttpClient {
|
|
|
69
66
|
static ɵfac: i0.ɵɵFactoryDeclaration<AdfHttpClient, never>;
|
|
70
67
|
static ɵprov: i0.ɵɵInjectableDeclaration<AdfHttpClient>;
|
|
71
68
|
}
|
|
72
|
-
export {};
|
package/fesm2022/adf-core.mjs
CHANGED
|
@@ -62,6 +62,7 @@ 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
64
|
import { OAuthStorage, AuthConfig, OAuthService, OAuthErrorEvent, OAuthLogger, OAuthSuccessEvent, AUTH_CONFIG, provideOAuthClient } from 'angular-oauth2-oidc';
|
|
65
|
+
import ee from 'event-emitter';
|
|
65
66
|
import { Minimatch } from 'minimatch';
|
|
66
67
|
import { JwksValidationHandler } from 'angular-oauth2-oidc-jwks';
|
|
67
68
|
import { AuthenticationInterceptor, Authentication } from '@alfresco/adf-core/auth';
|
|
@@ -7230,6 +7231,7 @@ class BaseAuthenticationService {
|
|
|
7230
7231
|
this.onError = new ReplaySubject(1);
|
|
7231
7232
|
this.onLogin = new ReplaySubject(1);
|
|
7232
7233
|
this.onLogout = new ReplaySubject(1);
|
|
7234
|
+
ee(this);
|
|
7233
7235
|
}
|
|
7234
7236
|
/**
|
|
7235
7237
|
* Adds the auth token to an HTTP header using the 'bearer' scheme.
|