@mediusinc/mng-commons 0.0.1-rc.3 → 0.0.1-rc.4
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/README.md +1 -1
- package/assets/i18n/en.json +105 -0
- package/assets/i18n/sl.json +110 -0
- package/assets/templates/tableview-route.component.html +5 -0
- package/esm2020/lib/api/models/builders/query-param.builder.mjs +2 -3
- package/esm2020/lib/components/action/action.component.mjs +1 -1
- package/esm2020/lib/components/action/dialog/action-dialog.component.mjs +13 -4
- package/esm2020/lib/components/form/editor/form-editor.component.mjs +17 -15
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +28 -13
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +2 -4
- package/esm2020/lib/components/layout/app.breadcrumb.component.mjs +8 -9
- package/esm2020/lib/components/layout/app.menu.component.mjs +10 -24
- package/esm2020/lib/components/layout/app.menuitem.component.mjs +3 -5
- package/esm2020/lib/components/layout/app.topbar.component.mjs +32 -32
- package/esm2020/lib/components/tableview/route/tableview-route.abstract.component.mjs +1 -8
- package/esm2020/lib/components/tableview/tableview.component.mjs +2 -1
- package/esm2020/lib/components/tableview/tableview.component.service.mjs +1 -1
- package/esm2020/lib/config/formly.config.mjs +23 -52
- package/esm2020/lib/mng-commons.module.mjs +6 -31
- package/esm2020/lib/models/config/mng-config.model.mjs +1 -1
- package/esm2020/lib/models/descriptors/action-descriptor.model.mjs +46 -4
- package/esm2020/lib/models/descriptors/editor-descriptor.model.mjs +20 -1
- package/esm2020/lib/models/types/type.decorator.mjs +1 -2
- package/esm2020/lib/services/action.service.mjs +44 -14
- package/esm2020/lib/services/breadcrumb.service.mjs +62 -9
- package/esm2020/lib/services/configuration.service.mjs +1 -1
- package/esm2020/lib/services/menu.service.mjs +18 -7
- package/esm2020/lib/services/settings.service.mjs +46 -5
- package/esm2020/lib/utils/editor-formly.util.mjs +19 -8
- package/esm2020/lib/utils/i18n.util.mjs +29 -13
- package/esm2020/lib/utils/toast.util.mjs +26 -0
- package/esm2020/lib/utils/type.util.mjs +1 -5
- package/fesm2015/mediusinc-mng-commons.mjs +2458 -2274
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +2603 -2426
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/components/form/editor/form-editor.component.d.ts +3 -1
- package/lib/components/layout/app.breadcrumb.component.d.ts +5 -7
- package/lib/components/layout/app.menu.component.d.ts +4 -3
- package/lib/components/layout/app.topbar.component.d.ts +2 -3
- package/lib/components/tableview/route/tableview-route.abstract.component.d.ts +0 -1
- package/lib/components/tableview/tableview.component.service.d.ts +2 -0
- package/lib/config/formly.config.d.ts +6 -0
- package/lib/mng-commons.module.d.ts +0 -3
- package/lib/models/config/mng-config.model.d.ts +1 -0
- package/lib/models/descriptors/action-descriptor.model.d.ts +21 -0
- package/lib/models/descriptors/editor-descriptor.model.d.ts +7 -0
- package/lib/services/action.service.d.ts +1 -1
- package/lib/services/breadcrumb.service.d.ts +9 -3
- package/lib/services/menu.service.d.ts +9 -4
- package/lib/services/settings.service.d.ts +13 -1
- package/lib/utils/i18n.util.d.ts +5 -4
- package/lib/utils/toast.util.d.ts +12 -0
- package/mediusinc-mng-commons-0.0.1-rc.4.tgz +0 -0
- package/package.json +36 -37
- package/mediusinc-mng-commons-0.0.1-rc.3.tgz +0 -0
|
@@ -3,10 +3,12 @@ import { FormGroup } from '@angular/forms';
|
|
|
3
3
|
import { FormlyFieldConfig, FormlyFormOptions } from '@ngx-formly/core';
|
|
4
4
|
import { Message } from 'primeng/api';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
6
7
|
import { EditorDescriptor } from '../../../models/descriptors';
|
|
7
8
|
import { TemplateDirective } from '../../../directives';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
export declare class FormEditorComponent<T> implements OnInit, AfterContentInit, OnDestroy {
|
|
11
|
+
private translateService;
|
|
10
12
|
descriptor: EditorDescriptor<T>;
|
|
11
13
|
submitLoading: Observable<boolean> | boolean;
|
|
12
14
|
item?: T;
|
|
@@ -23,7 +25,7 @@ export declare class FormEditorComponent<T> implements OnInit, AfterContentInit,
|
|
|
23
25
|
formMessages: Message[];
|
|
24
26
|
submitLoading$: Observable<boolean>;
|
|
25
27
|
private subscriptions;
|
|
26
|
-
constructor();
|
|
28
|
+
constructor(translateService: TranslateService);
|
|
27
29
|
ngOnInit(): void;
|
|
28
30
|
ngAfterContentInit(): void;
|
|
29
31
|
ngOnDestroy(): void;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { OnDestroy } from '@angular/core';
|
|
2
|
-
import { Subscription } from 'rxjs';
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
3
2
|
import { MenuItem } from 'primeng/api';
|
|
4
|
-
import { AppBreadcrumbService } from '../../services
|
|
3
|
+
import { AppBreadcrumbService } from '../../services';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class AppBreadcrumbComponent implements OnDestroy {
|
|
5
|
+
export declare class AppBreadcrumbComponent implements OnInit, OnDestroy {
|
|
7
6
|
breadcrumbService: AppBreadcrumbService;
|
|
8
|
-
|
|
7
|
+
private subscriptions;
|
|
9
8
|
items: MenuItem[];
|
|
10
|
-
home: MenuItem;
|
|
11
|
-
search: string;
|
|
12
9
|
constructor(breadcrumbService: AppBreadcrumbService);
|
|
10
|
+
ngOnInit(): void;
|
|
13
11
|
ngOnDestroy(): void;
|
|
14
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<AppBreadcrumbComponent, never>;
|
|
15
13
|
static ɵcmp: i0.ɵɵComponentDeclaration<AppBreadcrumbComponent, "app-breadcrumb", never, {}, {}, never, never>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { MenuItem } from 'primeng/api';
|
|
3
|
-
import { AppSettingsService } from '../../services
|
|
3
|
+
import { AppSettingsService, MenuService } from '../../services';
|
|
4
4
|
import { AppMainComponentService } from './app.main.component.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class AppMenuComponent implements OnInit {
|
|
7
7
|
appSettings: AppSettingsService;
|
|
8
8
|
appMainService: AppMainComponentService;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
private menuService;
|
|
10
|
+
menu: MenuItem[];
|
|
11
|
+
constructor(appSettings: AppSettingsService, appMainService: AppMainComponentService, menuService: MenuService);
|
|
11
12
|
ngOnInit(): void;
|
|
12
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<AppMenuComponent, never>;
|
|
13
14
|
static ɵcmp: i0.ɵɵComponentDeclaration<AppMenuComponent, "app-menu", never, {}, {}, never, never>;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
3
2
|
import { AppSettingsService } from '../../services/settings.service';
|
|
4
3
|
import { AppMainComponentService } from './app.main.component.service';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
export declare class AppTopbarComponent implements OnInit {
|
|
7
6
|
appSettings: AppSettingsService;
|
|
8
|
-
translateService: TranslateService;
|
|
9
7
|
appMainService: AppMainComponentService;
|
|
10
8
|
languages: Array<string>;
|
|
11
|
-
|
|
9
|
+
selectedLanguage: string;
|
|
10
|
+
constructor(appSettings: AppSettingsService, appMainService: AppMainComponentService);
|
|
12
11
|
switchLanguage(language: string): void;
|
|
13
12
|
ngOnInit(): void;
|
|
14
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<AppTopbarComponent, never>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { TableviewDescriptor, ActionDescriptor } from '../../../models/descriptors';
|
|
2
2
|
import { ITableviewDataProvider } from '../../../models/providers';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare const mngTableviewRouteComponentTemplate: string;
|
|
5
4
|
export declare abstract class AMngTableviewRouteComponent<T, S> {
|
|
6
5
|
descriptor: TableviewDescriptor<T>;
|
|
7
6
|
dataProvider: ITableviewDataProvider<T, S>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ITableviewDataProvider } from '../../models/providers';
|
|
2
2
|
import { ActionDescriptor } from '../../models/descriptors';
|
|
3
|
+
import { MessageService } from 'primeng/api';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class TableviewComponentService<T, S> {
|
|
5
6
|
dataProvider?: ITableviewDataProvider<T, S>;
|
|
7
|
+
messageService?: MessageService;
|
|
6
8
|
actions: Array<ActionDescriptor<T>>;
|
|
7
9
|
constructor();
|
|
8
10
|
reloadTable(): void;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { FormlyFieldWrapperComponent } from '../components/form/formly/wrappers';
|
|
2
2
|
import { TranslateService } from '@ngx-translate/core';
|
|
3
|
+
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
4
|
+
import { Observable } from "rxjs";
|
|
3
5
|
export declare const formlyWrappersConfig: {
|
|
4
6
|
name: string;
|
|
5
7
|
component: typeof FormlyFieldWrapperComponent;
|
|
6
8
|
}[];
|
|
7
9
|
export declare const formlyTypesConfig: any[];
|
|
10
|
+
export declare function getRequiredValidationMessage(translate: TranslateService): (error: any, field: FormlyFieldConfig) => Observable<string>;
|
|
11
|
+
export declare function getMinLengthValidationMessage(translate: TranslateService): (error: any, field: FormlyFieldConfig) => Observable<string> | undefined;
|
|
12
|
+
export declare function getMaxLengthValidationMessage(translate: TranslateService): (error: any, field: FormlyFieldConfig) => Observable<string> | undefined;
|
|
13
|
+
export declare function getTextPatternValidationMessage(translate: TranslateService): (error: any, field: FormlyFieldConfig) => Observable<string> | undefined;
|
|
8
14
|
export declare const getFormlyValidationMessages: (translate: TranslateService) => any[];
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import { HttpClient } from '@angular/common/http';
|
|
3
2
|
import { InputTextModule } from 'primeng/inputtext';
|
|
4
3
|
import { MngModuleConfig } from './models/config';
|
|
5
|
-
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
6
4
|
import * as i0 from "@angular/core";
|
|
7
5
|
import * as i1 from "./directives/template.directive";
|
|
8
6
|
import * as i2 from "./pipes/property-path.pipe";
|
|
@@ -65,7 +63,6 @@ import * as i58 from "primeng/progressspinner";
|
|
|
65
63
|
import * as i59 from "primeng/tabview";
|
|
66
64
|
import * as i60 from "primeng/fieldset";
|
|
67
65
|
export declare const primeNgModules: (typeof InputTextModule)[];
|
|
68
|
-
export declare function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader;
|
|
69
66
|
export declare class MngCommonsModule {
|
|
70
67
|
static forRoot(config: MngModuleConfig): ModuleWithProviders<MngCommonsModule>;
|
|
71
68
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngCommonsModule, never>;
|
|
@@ -2,6 +2,7 @@ import { InjectionToken } from '@angular/core';
|
|
|
2
2
|
import { TranslateService } from '@ngx-translate/core';
|
|
3
3
|
export declare const MNG_MODULE_CONFIG_IT: InjectionToken<MngModuleConfig>;
|
|
4
4
|
export interface MngModuleConfig {
|
|
5
|
+
languages?: string[];
|
|
5
6
|
configuration?: {
|
|
6
7
|
projectEnvironment?: any;
|
|
7
8
|
jsonSource?: string;
|
|
@@ -27,6 +27,12 @@ export declare class ActionDescriptor<T> {
|
|
|
27
27
|
private _runConfirmationMessage?;
|
|
28
28
|
private _runConfirmationAcceptTitle?;
|
|
29
29
|
private _runConfirmationRejectTitle?;
|
|
30
|
+
protected _hasRunNotificationSuccess: boolean;
|
|
31
|
+
private _runNotificationSuccessTitle?;
|
|
32
|
+
private _runNotificationSuccessMessage?;
|
|
33
|
+
private _hasRunNotificationError;
|
|
34
|
+
private _runNotificationErrorTitle?;
|
|
35
|
+
private _runNotificationErrorMessage?;
|
|
30
36
|
constructor(model: ModelDescriptor<T>, actionName: string, parentType?: ClassType<any>, parentProperty?: string);
|
|
31
37
|
get model(): ModelDescriptor<T>;
|
|
32
38
|
get parentTypeName(): string | undefined;
|
|
@@ -50,6 +56,12 @@ export declare class ActionDescriptor<T> {
|
|
|
50
56
|
get runConfirmationMessage(): string | undefined;
|
|
51
57
|
get runConfirmationAcceptTitle(): string | undefined;
|
|
52
58
|
get runConfirmationRejectTitle(): string | undefined;
|
|
59
|
+
get hasRunNotificationSuccess(): boolean;
|
|
60
|
+
get runNotificationSuccessTitle(): string | undefined;
|
|
61
|
+
get runNotificationSuccessMessage(): string | undefined;
|
|
62
|
+
get hasRunNotificationError(): boolean;
|
|
63
|
+
get runNotificationErrorTitle(): string | undefined;
|
|
64
|
+
get runNotificationErrorMessage(): string | undefined;
|
|
53
65
|
withRunFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<T>): this;
|
|
54
66
|
withIsVisibleFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<boolean>): this;
|
|
55
67
|
withIsEnabledFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<boolean>): this;
|
|
@@ -68,15 +80,23 @@ export declare class ActionDescriptor<T> {
|
|
|
68
80
|
withClassName(className: string): this;
|
|
69
81
|
withPosition(position: ActionPositionEnum): this;
|
|
70
82
|
withRunConfirmation(icon?: string, title?: string, message?: string, acceptTitle?: string, rejectTitle?: string): this;
|
|
83
|
+
withRunNotificationSuccess(title?: string, message?: string, hasNotification?: boolean): void;
|
|
84
|
+
withRunNotificationError(title?: string, message?: string, hasNotification?: boolean): void;
|
|
71
85
|
}
|
|
72
86
|
export declare class ActionEditorDescriptor<T> extends ActionDescriptor<T> {
|
|
73
87
|
private readonly _editorDescriptor;
|
|
74
88
|
protected _editorTitle?: string;
|
|
89
|
+
private _hasFetchNotificationSuccess;
|
|
90
|
+
private _fetchNotificationSuccessTitle?;
|
|
91
|
+
private _fetchNotificationSuccessMessage?;
|
|
75
92
|
protected _fetchFunction?: (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;
|
|
76
93
|
protected _submitFunction?: (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;
|
|
77
94
|
constructor(editorDescriptor: EditorDescriptor<T>, actionName: string, parentType?: ClassType<any>, parentProperty?: string);
|
|
78
95
|
get editorTitle(): string | undefined;
|
|
79
96
|
get editorDescriptor(): EditorDescriptor<T>;
|
|
97
|
+
get hasFetchNotificationSuccess(): boolean;
|
|
98
|
+
get fetchNotificationSuccessTitle(): string | undefined;
|
|
99
|
+
get fetchNotificationSuccessMessage(): string | undefined;
|
|
80
100
|
get runFunction(): (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T>;
|
|
81
101
|
get fetchFunction(): (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;
|
|
82
102
|
get submitFunction(): ((ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>) | undefined;
|
|
@@ -84,6 +104,7 @@ export declare class ActionEditorDescriptor<T> extends ActionDescriptor<T> {
|
|
|
84
104
|
withRunFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<T>): this;
|
|
85
105
|
withFetchFunction<S>(fn: (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>): this;
|
|
86
106
|
withSubmitFunction<S>(fn: (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>): this;
|
|
107
|
+
withFetchNotificationError(title?: string, message?: string, hasNotification?: boolean): void;
|
|
87
108
|
}
|
|
88
109
|
export declare class ActionEditorDetailsDescriptor<T> extends ActionEditorDescriptor<T> {
|
|
89
110
|
constructor(editorDescriptor: EditorDescriptor<T>);
|
|
@@ -90,6 +90,9 @@ export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string |
|
|
|
90
90
|
private _datePickerMin?;
|
|
91
91
|
private _datePickerMax?;
|
|
92
92
|
private _datePickerShowTime;
|
|
93
|
+
private _maxLength?;
|
|
94
|
+
private _minLength?;
|
|
95
|
+
private _pattern?;
|
|
93
96
|
constructor(editor: EditorDescriptor<ET>, property: string);
|
|
94
97
|
get fieldType(): FieldInputDescriptor.TypeEnum;
|
|
95
98
|
get numberStep(): number | undefined;
|
|
@@ -103,6 +106,10 @@ export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string |
|
|
|
103
106
|
get datePickerMin(): Date | undefined;
|
|
104
107
|
get datePickerMax(): Date | undefined;
|
|
105
108
|
get datePickerShowTime(): boolean;
|
|
109
|
+
get maxLength(): number | undefined;
|
|
110
|
+
get minLength(): number | undefined;
|
|
111
|
+
get pattern(): string | RegExp | undefined;
|
|
112
|
+
asText(minLength?: number, maxLength?: number, pattern?: string | RegExp): this;
|
|
106
113
|
asTextarea(rows?: number): this;
|
|
107
114
|
asNumber(step?: number, min?: number, max?: number, minFractionDigits?: number, maxFractionDigits?: number): this;
|
|
108
115
|
asSwitch(): this;
|
|
@@ -78,7 +78,7 @@ export declare class ActionService {
|
|
|
78
78
|
* @param event Target table click event.
|
|
79
79
|
* @param route Currently activate route.
|
|
80
80
|
*/
|
|
81
|
-
triggerRowClickAction<T>(action: ActionDescriptor<T>, event: MngTableCellClickEvent<T>, route
|
|
81
|
+
triggerRowClickAction<T>(action: ActionDescriptor<T>, event: MngTableCellClickEvent<T>, route: ActivatedRoute): Observable<ActionTriggerResult<T, unknown, IDataProvider<T, unknown>>>;
|
|
82
82
|
/**
|
|
83
83
|
* Triggers action with optional data (item, itemId, ...) and currently activated route.
|
|
84
84
|
*
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { MenuItem } from 'primeng/api';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
2
4
|
import * as i0 from "@angular/core";
|
|
3
5
|
export declare class AppBreadcrumbService {
|
|
4
|
-
private
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
private router;
|
|
7
|
+
private translateService;
|
|
8
|
+
private readonly breadcrumbsSubject;
|
|
9
|
+
get breadcrumbs(): import("rxjs").Observable<MenuItem[]>;
|
|
10
|
+
constructor(router: Router, translateService: TranslateService);
|
|
11
|
+
private addBreadcrumb;
|
|
12
|
+
private getLabel;
|
|
7
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<AppBreadcrumbService, never>;
|
|
8
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<AppBreadcrumbService>;
|
|
9
15
|
}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { MenuItem } from "primeng/api";
|
|
1
3
|
import * as i0 from "@angular/core";
|
|
2
4
|
export declare class MenuService {
|
|
3
|
-
private
|
|
4
|
-
private
|
|
5
|
-
|
|
6
|
-
resetSource$: import("rxjs").Observable<unknown>;
|
|
5
|
+
private _menuItems;
|
|
6
|
+
private menuSourceSubject;
|
|
7
|
+
private resetSourceSubject;
|
|
7
8
|
onMenuStateChange(key: string): void;
|
|
8
9
|
reset(): void;
|
|
10
|
+
get menu$(): Observable<string>;
|
|
11
|
+
get reset$(): Observable<any>;
|
|
12
|
+
get menuItems(): MenuItem[];
|
|
13
|
+
set menuItems(value: MenuItem[]);
|
|
9
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<MenuService, never>;
|
|
10
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<MenuService>;
|
|
11
16
|
}
|
|
@@ -1,13 +1,25 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
1
2
|
import { PrimeNGConfig } from 'primeng/api';
|
|
3
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
4
|
+
import { ConfigurationService } from './configuration.service';
|
|
5
|
+
import { MngModuleConfig } from '../models/config';
|
|
2
6
|
import * as i0 from "@angular/core";
|
|
7
|
+
export declare const BROWSER_STORAGE_IT: InjectionToken<Storage>;
|
|
3
8
|
export declare class AppSettingsService {
|
|
4
9
|
private primengConfig;
|
|
10
|
+
private translate;
|
|
11
|
+
private configurationService;
|
|
12
|
+
private moduleConfig;
|
|
13
|
+
private localStorage;
|
|
5
14
|
private readonly _menuMode;
|
|
6
15
|
private readonly _colorScheme;
|
|
7
|
-
constructor(primengConfig: PrimeNGConfig);
|
|
16
|
+
constructor(primengConfig: PrimeNGConfig, translate: TranslateService, configurationService: ConfigurationService, moduleConfig: MngModuleConfig, localStorage: Storage);
|
|
8
17
|
get menuMode(): "horizontal" | "static" | "sidebar" | "slim" | "overlay";
|
|
9
18
|
get colorScheme(): "light" | "dark";
|
|
10
19
|
init(): void;
|
|
20
|
+
get applicationLanguages(): string[];
|
|
21
|
+
get applicationLanguage(): string;
|
|
22
|
+
set applicationLanguage(language: string);
|
|
11
23
|
isStatic(): boolean;
|
|
12
24
|
isOverlay(): boolean;
|
|
13
25
|
isSlim(): boolean;
|
package/lib/utils/i18n.util.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { TranslateService } from '@ngx-translate/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
3
|
+
import { ActionDescriptor, ModelDescriptor } from '../models/descriptors';
|
|
4
4
|
export declare class I18nUtil {
|
|
5
|
-
static instantActionTranslation(translate: TranslateService, action: ActionDescriptor<any>, keyPath: string, customKey?: string, item?: any, fallbackKey?: string): string | null;
|
|
5
|
+
static instantActionTranslation(translate: TranslateService, action: ActionDescriptor<any>, keyPath: string, customKey?: string, item?: any, fallbackKey?: string, functionNameKey?: string, i18nParams?: any): string | null;
|
|
6
6
|
static streamActionTranslation(translate: TranslateService, action: ActionDescriptor<any>, keyPath: string, customKey?: string, item?: any, fallbackKey?: string): Observable<string | null>;
|
|
7
7
|
static getActionTranslation(translate: TranslateService, action: ActionDescriptor<any>, keyPath: string, customKey?: string, item?: any, fallbackKey?: string, oneTime?: boolean): Observable<string | null>;
|
|
8
8
|
private static getActionKeysByPriority;
|
|
9
|
-
static getActionI18nParams(action: ActionDescriptor<any>, item: any, i18nModelName?: string): any;
|
|
10
|
-
static instantModelName(translate: TranslateService, model: ModelDescriptor<any>, singular?: boolean): string;
|
|
9
|
+
static getActionI18nParams(action: ActionDescriptor<any>, item: any, i18nModelName?: string, i18nParameters?: any, functionTitle?: string): any;
|
|
10
|
+
static instantModelName(translate: TranslateService, model: ModelDescriptor<any>, singular?: boolean): string | null;
|
|
11
11
|
static getModelName(translate: TranslateService, model: ModelDescriptor<any>, oneTime?: boolean, singular?: boolean): Observable<string | null>;
|
|
12
12
|
static getModelNameKeys(model: ModelDescriptor<any>, singular?: boolean): string[];
|
|
13
13
|
private static selectKeyByPriority;
|
|
14
|
+
private static getFunctionTitle;
|
|
14
15
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TranslateService } from "@ngx-translate/core";
|
|
2
|
+
import { ActionDescriptor } from "../models/descriptors";
|
|
3
|
+
import { TableviewComponentService } from "../components/tableview/tableview.component.service";
|
|
4
|
+
export declare class ToastUtil {
|
|
5
|
+
static actionNotificationSuccess(translationService: TranslateService, action: ActionDescriptor<any>, functionName: string, customTitleKey?: string, customMessageKey?: string, tableview?: TableviewComponentService<any, any>, item?: any): void;
|
|
6
|
+
static actionNotificationError(translationService: TranslateService, action: ActionDescriptor<any>, error: any, functionName: string, tableview?: TableviewComponentService<any, any>, item?: any): void;
|
|
7
|
+
static getFormEditorWarningMessage(translationService: TranslateService, title: string, message: string): {
|
|
8
|
+
severity: string;
|
|
9
|
+
summary: any;
|
|
10
|
+
detail: any;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,38 +1,37 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
2
|
+
"name": "@mediusinc/mng-commons",
|
|
3
|
+
"version": "0.0.1-rc.4",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^13.1.0",
|
|
6
|
+
"@angular/core": "^13.1.0",
|
|
7
|
+
"@angular/forms": "^13.1.0",
|
|
8
|
+
"@angular/router": "^13.1.0",
|
|
9
|
+
"@ngx-formly/core": "^6.0.0-next.6",
|
|
10
|
+
"@ngx-translate/core": "^14.0.0",
|
|
11
|
+
"primeng": "^13.0.0"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"reflect-metadata": "^0.1.13",
|
|
15
|
+
"tslib": "^2.3.0"
|
|
16
|
+
},
|
|
17
|
+
"module": "fesm2015/mediusinc-mng-commons.mjs",
|
|
18
|
+
"es2020": "fesm2020/mediusinc-mng-commons.mjs",
|
|
19
|
+
"esm2020": "esm2020/mediusinc-mng-commons.mjs",
|
|
20
|
+
"fesm2020": "fesm2020/mediusinc-mng-commons.mjs",
|
|
21
|
+
"fesm2015": "fesm2015/mediusinc-mng-commons.mjs",
|
|
22
|
+
"typings": "mediusinc-mng-commons.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
"./package.json": {
|
|
25
|
+
"default": "./package.json"
|
|
26
|
+
},
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./mediusinc-mng-commons.d.ts",
|
|
29
|
+
"esm2020": "./esm2020/mediusinc-mng-commons.mjs",
|
|
30
|
+
"es2020": "./fesm2020/mediusinc-mng-commons.mjs",
|
|
31
|
+
"es2015": "./fesm2015/mediusinc-mng-commons.mjs",
|
|
32
|
+
"node": "./fesm2015/mediusinc-mng-commons.mjs",
|
|
33
|
+
"default": "./fesm2020/mediusinc-mng-commons.mjs"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"sideEffects": false
|
|
37
|
+
}
|
|
Binary file
|