@onecx/angular-integration-interface 4.13.1 → 4.14.0
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2020/index.mjs +13 -0
- package/esm2020/lib/api/constants.mjs +3 -0
- package/esm2020/lib/api/iauth.service.mjs +2 -0
- package/esm2020/lib/api/injection-tokens.mjs +6 -0
- package/esm2020/lib/model/config-key.model.mjs +27 -0
- package/esm2020/lib/services/app-state.service.mjs +45 -0
- package/esm2020/lib/services/configuration.service.mjs +79 -0
- package/esm2020/lib/services/portal-message.service.mjs +44 -0
- package/esm2020/lib/services/remote-components.service.mjs +18 -0
- package/esm2020/lib/services/theme.service.mjs +48 -0
- package/esm2020/lib/services/user.service.mjs +71 -0
- package/esm2020/onecx-angular-integration-interface.mjs +5 -0
- package/fesm2015/onecx-angular-integration-interface.mjs +33 -4
- package/fesm2015/onecx-angular-integration-interface.mjs.map +1 -1
- package/fesm2020/onecx-angular-integration-interface.mjs +321 -0
- package/fesm2020/onecx-angular-integration-interface.mjs.map +1 -0
- package/index.d.ts +10 -0
- package/lib/api/constants.d.ts +2 -0
- package/lib/api/iauth.service.d.ts +17 -0
- package/lib/api/injection-tokens.d.ts +18 -0
- package/lib/model/config-key.model.d.ts +25 -0
- package/lib/services/app-state.service.d.ts +26 -0
- package/lib/services/configuration.service.d.ts +21 -0
- package/lib/services/portal-message.service.d.ts +30 -0
- package/lib/services/remote-components.service.d.ts +9 -0
- package/lib/services/theme.service.d.ts +18 -0
- package/lib/services/user.service.d.ts +17 -0
- package/package.json +1 -1
@@ -0,0 +1,21 @@
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
2
|
+
import { OnDestroy } from '@angular/core';
|
3
|
+
import { Config, ConfigurationTopic } from '@onecx/integration-interface';
|
4
|
+
import { CONFIG_KEY } from '../model/config-key.model';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
export declare class ConfigurationService implements OnDestroy {
|
7
|
+
private http;
|
8
|
+
private defaultConfig?;
|
9
|
+
config$: ConfigurationTopic;
|
10
|
+
constructor(http: HttpClient, defaultConfig?: {
|
11
|
+
[key: string]: string;
|
12
|
+
} | undefined);
|
13
|
+
ngOnDestroy(): void;
|
14
|
+
init(): Promise<boolean>;
|
15
|
+
get isInitialized(): Promise<void>;
|
16
|
+
getProperty(key: CONFIG_KEY): string | undefined;
|
17
|
+
setProperty(key: string, val: string): Promise<void>;
|
18
|
+
getConfig(): Config | undefined;
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationService, [null, { optional: true; }]>;
|
20
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ConfigurationService>;
|
21
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { TranslateService } from '@ngx-translate/core';
|
2
|
+
import { MessageTopic } from '@onecx/integration-interface';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export type Message = {
|
5
|
+
summaryKey?: string;
|
6
|
+
summaryParameters?: object;
|
7
|
+
detailKey?: string;
|
8
|
+
detailParameters?: object;
|
9
|
+
id?: any;
|
10
|
+
key?: string;
|
11
|
+
life?: number;
|
12
|
+
sticky?: boolean;
|
13
|
+
closable?: boolean;
|
14
|
+
data?: any;
|
15
|
+
icon?: string;
|
16
|
+
contentStyleClass?: string;
|
17
|
+
styleClass?: string;
|
18
|
+
};
|
19
|
+
export declare class PortalMessageService {
|
20
|
+
private translateService;
|
21
|
+
constructor(translateService: TranslateService);
|
22
|
+
message$: MessageTopic;
|
23
|
+
success(msg: Message): void;
|
24
|
+
info(msg: Message): void;
|
25
|
+
error(msg: Message): void;
|
26
|
+
warning(msg: Message): void;
|
27
|
+
private addTranslated;
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PortalMessageService, never>;
|
29
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PortalMessageService>;
|
30
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
2
|
+
import { RemoteComponentsTopic } from '@onecx/integration-interface';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class RemoteComponentsService implements OnDestroy {
|
5
|
+
remoteComponents$: RemoteComponentsTopic;
|
6
|
+
ngOnDestroy(): void;
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RemoteComponentsService, never>;
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RemoteComponentsService>;
|
9
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
2
|
+
import { OnDestroy } from '@angular/core';
|
3
|
+
import { CurrentThemeTopic, Theme } from '@onecx/integration-interface';
|
4
|
+
import { ConfigurationService } from './configuration.service';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
export declare class ThemeService implements OnDestroy {
|
7
|
+
private configService;
|
8
|
+
private http;
|
9
|
+
baseUrlV1: string;
|
10
|
+
currentTheme$: CurrentThemeTopic;
|
11
|
+
constructor(configService: ConfigurationService, http: HttpClient);
|
12
|
+
getThemeHref(themeId: string): string;
|
13
|
+
loadAndApplyTheme(themeName: string): import("rxjs").Observable<Theme>;
|
14
|
+
apply(theme: Theme): Promise<void>;
|
15
|
+
ngOnDestroy(): void;
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
|
18
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
2
|
+
import { BehaviorSubject } from 'rxjs';
|
3
|
+
import { UserProfileTopic } from '@onecx/integration-interface';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class UserService implements OnDestroy {
|
6
|
+
profile$: UserProfileTopic;
|
7
|
+
permissions$: BehaviorSubject<string[]>;
|
8
|
+
lang$: BehaviorSubject<string>;
|
9
|
+
private permissionsTopic$;
|
10
|
+
constructor();
|
11
|
+
ngOnDestroy(): void;
|
12
|
+
hasPermission(permissionKey: string): boolean;
|
13
|
+
private determineLanguage;
|
14
|
+
private extractPermissions;
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserService, never>;
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UserService>;
|
17
|
+
}
|