@mediusinc/mng-commons 0.4.3 → 0.4.6
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/esm2020/lib/config/models/mng-config.model.mjs +1 -1
- package/esm2020/lib/mng-commons.module.mjs +5 -3
- package/esm2020/lib/services/commons.service.mjs +9 -10
- package/esm2020/lib/services/configuration.service.mjs +53 -19
- package/esm2020/lib/services/internal/commons-init.provider.mjs +4 -0
- package/esm2020/lib/services/internal/commons-init.service.mjs +44 -0
- package/esm2020/lib/services/internal/index.mjs +3 -0
- package/esm2020/lib/services/providers/config-service.provider.mjs +13 -3
- package/esm2020/lib/services/providers/index.mjs +1 -2
- package/esm2020/lib/services/tokens/commons-init.token.mjs +3 -0
- package/esm2020/lib/services/tokens/index.mjs +2 -1
- package/esm2020/lib/utils/i18n.util.mjs +4 -5
- package/esm2020/public-api.mjs +3 -1
- package/fesm2015/mediusinc-mng-commons.mjs +122 -38
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +116 -36
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/config/models/mng-config.model.d.ts +1 -1
- package/lib/services/commons.service.d.ts +4 -4
- package/lib/services/configuration.service.d.ts +3 -2
- package/lib/services/internal/commons-init.provider.d.ts +3 -0
- package/lib/services/internal/commons-init.service.d.ts +16 -0
- package/lib/services/internal/index.d.ts +2 -0
- package/lib/services/providers/config-service.provider.d.ts +2 -1
- package/lib/services/providers/index.d.ts +0 -1
- package/lib/services/tokens/commons-init.token.d.ts +3 -0
- package/lib/services/tokens/index.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/esm2020/lib/services/providers/commons-init.provider.mjs +0 -4
- package/lib/services/providers/commons-init.provider.d.ts +0 -2
|
@@ -5,16 +5,16 @@ import { PrimeNGConfig } from 'primeng/api';
|
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
6
|
import { MngModuleConfig } from '../config/models';
|
|
7
7
|
import { IUser, MngMenuItem } from '../models';
|
|
8
|
-
import { MngConfigurationService } from './configuration.service';
|
|
9
8
|
import * as i0 from "@angular/core";
|
|
10
9
|
export declare class MngCommonsService {
|
|
11
10
|
private router;
|
|
12
11
|
private primengConfig;
|
|
13
12
|
private translate;
|
|
14
13
|
private titleService;
|
|
15
|
-
private configurationService;
|
|
16
14
|
private moduleConfig;
|
|
17
15
|
private localStorage;
|
|
16
|
+
private routerEventsSubscription?;
|
|
17
|
+
private translateLangChangeSubscription?;
|
|
18
18
|
private _menuMode;
|
|
19
19
|
private _menuModeSubject;
|
|
20
20
|
private _menuItems;
|
|
@@ -28,7 +28,7 @@ export declare class MngCommonsService {
|
|
|
28
28
|
private _colorScheme;
|
|
29
29
|
private _user?;
|
|
30
30
|
private userSubject;
|
|
31
|
-
constructor(router: Router, primengConfig: PrimeNGConfig, translate: TranslateService, titleService: Title,
|
|
31
|
+
constructor(router: Router, primengConfig: PrimeNGConfig, translate: TranslateService, titleService: Title, moduleConfig: MngModuleConfig, localStorage: Storage);
|
|
32
32
|
get appName(): string;
|
|
33
33
|
get appOwner(): string;
|
|
34
34
|
get appLogoLight(): string;
|
|
@@ -58,7 +58,7 @@ export declare class MngCommonsService {
|
|
|
58
58
|
get user(): IUser | undefined;
|
|
59
59
|
set user(user: IUser | undefined);
|
|
60
60
|
get user$(): Observable<IUser | undefined>;
|
|
61
|
-
|
|
61
|
+
reset(): void;
|
|
62
62
|
menuChangeActiveKey(key: string): void;
|
|
63
63
|
menuReset(): void;
|
|
64
64
|
private updateBreadcrumbs;
|
|
@@ -6,7 +6,7 @@ export declare class MngConfigurationService {
|
|
|
6
6
|
static init(httpClient: HttpClient): MngConfigurationService;
|
|
7
7
|
static get(): MngConfigurationService;
|
|
8
8
|
private projectEnvironment?;
|
|
9
|
-
private
|
|
9
|
+
private jsonSources;
|
|
10
10
|
private configuration;
|
|
11
11
|
private constructor();
|
|
12
12
|
/**
|
|
@@ -18,7 +18,8 @@ export declare class MngConfigurationService {
|
|
|
18
18
|
* Adds new config source from JSON file.
|
|
19
19
|
* @param url Url to JSON file.
|
|
20
20
|
*/
|
|
21
|
-
addJsonSource(url?: string): Observable<boolean>;
|
|
21
|
+
addJsonSource(url?: string, load?: boolean): Observable<boolean>;
|
|
22
|
+
loadJsonSources(): Observable<boolean>;
|
|
22
23
|
/**
|
|
23
24
|
* Get configuration.
|
|
24
25
|
*/
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { MngCommonsService } from '../commons.service';
|
|
4
|
+
import { MngConfigurationService } from '../configuration.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class MngCommonsInitService {
|
|
7
|
+
private translate;
|
|
8
|
+
private configurationService;
|
|
9
|
+
private mngCommons;
|
|
10
|
+
private readonly commonsInitializers;
|
|
11
|
+
private isInitialized;
|
|
12
|
+
constructor(translate: TranslateService, configurationService: MngConfigurationService, mngCommons: MngCommonsService, commonsInitializers: ReadonlyArray<() => Observable<unknown>>);
|
|
13
|
+
initialize(): Observable<void>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngCommonsInitService, [null, null, null, { optional: true; }]>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MngCommonsInitService>;
|
|
16
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
2
3
|
import { MngModuleConfig } from '../../config/models';
|
|
3
4
|
import { MngConfigurationService } from '../configuration.service';
|
|
4
5
|
export declare const mngConfigurationServiceProvider: (httpClient: HttpClient, moduleConfig: MngModuleConfig) => MngConfigurationService;
|
|
5
|
-
export declare function mngConfigJsonAppInitializerProvider(configService: MngConfigurationService, moduleConfig: MngModuleConfig): () =>
|
|
6
|
+
export declare function mngConfigJsonAppInitializerProvider(configService: MngConfigurationService, moduleConfig: MngModuleConfig): () => Observable<boolean>;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './lib/api/services';
|
|
|
3
3
|
export * from './lib/components/layout/services';
|
|
4
4
|
export * from './lib/services';
|
|
5
5
|
export * from './lib/services/providers';
|
|
6
|
+
export * from './lib/services/tokens';
|
|
6
7
|
export * from './lib/api/utils';
|
|
7
8
|
export * from './lib/utils';
|
|
8
9
|
export * from './lib/components/action';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export function mngCommonsInitializerProvider(mngCommons) {
|
|
2
|
-
return () => mngCommons.initialize();
|
|
3
|
-
}
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9ucy1pbml0LnByb3ZpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9zZXJ2aWNlcy9wcm92aWRlcnMvY29tbW9ucy1pbml0LnByb3ZpZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE1BQU0sVUFBVSw2QkFBNkIsQ0FBQyxVQUE2QjtJQUN2RSxPQUFPLEdBQUcsRUFBRSxDQUFDLFVBQVUsQ0FBQyxVQUFVLEVBQUUsQ0FBQztBQUN6QyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtNbmdDb21tb25zU2VydmljZX0gZnJvbSAnLi4vY29tbW9ucy5zZXJ2aWNlJztcblxuZXhwb3J0IGZ1bmN0aW9uIG1uZ0NvbW1vbnNJbml0aWFsaXplclByb3ZpZGVyKG1uZ0NvbW1vbnM6IE1uZ0NvbW1vbnNTZXJ2aWNlKSB7XG4gICAgcmV0dXJuICgpID0+IG1uZ0NvbW1vbnMuaW5pdGlhbGl6ZSgpO1xufVxuIl19
|