@mediusinc/mng-commons 2.5.0-rc.0 → 2.6.0-rc.0
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/assets/i18n/en.json +4 -1
- package/assets/i18n/sl.json +4 -1
- package/esm2020/lib/components/action/action.component.mjs +8 -1
- package/esm2020/lib/components/action/editor/action-editor.component.mjs +196 -115
- package/esm2020/lib/components/action/models/action-execution.model.mjs +99 -10
- package/esm2020/lib/components/action/route/action-route.component.mjs +53 -35
- package/esm2020/lib/components/form/editor/form-editor.component.mjs +15 -6
- package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +4 -1
- package/esm2020/lib/components/form/formly/fields/formly-field-custom/formly-custom-field-base.model.mjs +69 -0
- package/esm2020/lib/components/form/formly/fields/formly-field-custom/formly-field-custom.component.mjs +54 -0
- package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +4 -1
- package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +4 -1
- package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +4 -1
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +5 -2
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +4 -1
- package/esm2020/lib/components/form/formly/fields/index.mjs +3 -1
- package/esm2020/lib/components/form/formly/formly.config.mjs +11 -1
- package/esm2020/lib/components/form/formly/models/formly-field.model.mjs +1 -1
- package/esm2020/lib/components/form/formly/wrappers/formly-field-no-label-wrapper/formly-field-no-label-wrapper.component.mjs +21 -3
- package/esm2020/lib/components/layout/menu-item.component.mjs +9 -11
- package/esm2020/lib/components/layout/version.component.mjs +3 -3
- package/esm2020/lib/components/tableview/table/models/index.mjs +2 -0
- package/esm2020/lib/components/tableview/table/table.component.mjs +67 -9
- package/esm2020/lib/descriptors/action/action.descriptor.mjs +13 -1
- package/esm2020/lib/descriptors/editor/field.descriptor.mjs +77 -3
- package/esm2020/lib/descriptors/table/column.descriptor.mjs +25 -1
- package/esm2020/lib/descriptors/table/table.descriptor.mjs +13 -1
- package/esm2020/lib/descriptors/types/table.type.mjs +4 -1
- package/esm2020/lib/mng-commons.module.mjs +7 -4
- package/esm2020/lib/models/config.model.mjs +1 -1
- package/esm2020/lib/models/view-container.model.mjs +1 -1
- package/esm2020/lib/services/action-executor.service.mjs +313 -190
- package/esm2020/lib/services/commons.service.mjs +8 -1
- package/esm2020/lib/services/index.mjs +3 -1
- package/esm2020/lib/services/internal/commons-init.service.mjs +5 -9
- package/esm2020/lib/services/navigation.service.mjs +6 -3
- package/esm2020/lib/services/view-container.component.service.mjs +10 -1
- package/esm2020/lib/utils/action-data-provider.util.mjs +14 -1
- package/esm2020/lib/utils/editor-formly.util.mjs +23 -3
- package/fesm2015/mediusinc-mng-commons.mjs +2541 -1807
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +2167 -1451
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/components/action/action.component.d.ts +1 -2
- package/lib/components/action/editor/action-editor.component.d.ts +19 -6
- package/lib/components/action/models/action-execution.model.d.ts +35 -6
- package/lib/components/action/route/action-route.component.d.ts +7 -4
- package/lib/components/form/editor/form-editor.component.d.ts +2 -1
- package/lib/components/form/formly/fields/formly-field-custom/formly-custom-field-base.model.d.ts +27 -0
- package/lib/components/form/formly/fields/formly-field-custom/formly-field-custom.component.d.ts +11 -0
- package/lib/components/form/formly/fields/index.d.ts +2 -0
- package/lib/components/form/formly/models/formly-field.model.d.ts +1 -0
- package/lib/components/form/formly/wrappers/formly-field-no-label-wrapper/formly-field-no-label-wrapper.component.d.ts +5 -0
- package/lib/components/layout/menu-item.component.d.ts +1 -2
- package/lib/components/layout/version.component.d.ts +1 -1
- package/lib/components/tableview/table/models/index.d.ts +6 -0
- package/lib/components/tableview/table/table.component.d.ts +16 -1
- package/lib/descriptors/action/action.descriptor.d.ts +5 -0
- package/lib/descriptors/editor/field.descriptor.d.ts +28 -1
- package/lib/descriptors/table/column.descriptor.d.ts +8 -0
- package/lib/descriptors/table/table.descriptor.d.ts +2 -0
- package/lib/descriptors/types/table.type.d.ts +3 -0
- package/lib/mng-commons.module.d.ts +15 -14
- package/lib/models/config.model.d.ts +4 -0
- package/lib/models/view-container.model.d.ts +6 -0
- package/lib/services/action-executor.service.d.ts +69 -35
- package/lib/services/commons.service.d.ts +2 -0
- package/lib/services/index.d.ts +2 -0
- package/lib/services/internal/commons-init.service.d.ts +1 -3
- package/lib/services/navigation.service.d.ts +3 -2
- package/lib/services/view-container.component.service.d.ts +7 -2
- package/lib/utils/action-data-provider.util.d.ts +8 -0
- package/package.json +3 -3
- package/scss/mng-commons-light.scss +3 -0
- package/scss/mng-overrides/_theme_multiselect.scss +20 -0
- package/scss/mng-overrides/_theme_styles.scss +1 -0
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Injector, Type } from '@angular/core';
|
|
2
2
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
3
|
import { TranslateService } from '@ngx-translate/core';
|
|
4
|
-
import { ConfirmationService } from 'primeng/api';
|
|
5
4
|
import { DialogService } from 'primeng/dynamicdialog';
|
|
6
|
-
import { Observable } from 'rxjs';
|
|
7
5
|
import { ActionContext, ActionContextValidation, ActionInstance, ActionParameters } from '../components/action/models';
|
|
8
6
|
import { MngTableCellClickEvent } from '../components/tableview/models';
|
|
9
7
|
import { IDataProvider, IEditorDataProvider } from '../data-providers';
|
|
@@ -11,7 +9,7 @@ import { ActionDescriptor, ActionEditorDescriptor } from '../descriptors/action'
|
|
|
11
9
|
import { TableDescriptor } from '../descriptors/table';
|
|
12
10
|
import { MngError } from '../models';
|
|
13
11
|
import { MngParametrizePipe } from '../pipes';
|
|
14
|
-
import {
|
|
12
|
+
import { MngCommonsService } from './commons.service';
|
|
15
13
|
import { MngErrorMapperService } from './error-mapper.service';
|
|
16
14
|
import { MngNavigationService } from './navigation.service';
|
|
17
15
|
import * as i0 from "@angular/core";
|
|
@@ -19,33 +17,36 @@ export declare class MngActionExecutorService {
|
|
|
19
17
|
private injector;
|
|
20
18
|
private router;
|
|
21
19
|
private dialogService;
|
|
22
|
-
private confirmationService;
|
|
23
20
|
private translate;
|
|
24
|
-
private
|
|
21
|
+
private mngCommons;
|
|
25
22
|
private navigationService;
|
|
26
23
|
private errorMapper;
|
|
27
24
|
private parametrize;
|
|
28
25
|
private defaultEditorDialogComponent;
|
|
29
|
-
private
|
|
30
|
-
|
|
26
|
+
private readonly debugLog;
|
|
27
|
+
private readonly instancesBufferMax;
|
|
28
|
+
private readonly _instances;
|
|
29
|
+
constructor(injector: Injector, router: Router, dialogService: DialogService, translate: TranslateService, mngCommons: MngCommonsService, navigationService: MngNavigationService, errorMapper: MngErrorMapperService, parametrize: MngParametrizePipe, defaultEditorDialogComponent: Type<any>);
|
|
30
|
+
get instances(): ActionInstance<any, any>[];
|
|
31
|
+
/**
|
|
32
|
+
* Prepares action context for usage in validation.
|
|
33
|
+
* @param action Action descriptor.
|
|
34
|
+
* @param parameters Action parameters.
|
|
35
|
+
* @param dataProvider Data provider.
|
|
36
|
+
*/
|
|
31
37
|
prepareActionContextValidation<T, S>(action: ActionDescriptor<T>, parameters: ActionParameters<T>, dataProvider?: IDataProvider<T, S>): ActionContextValidation<T, S>;
|
|
32
|
-
prepareActionContext<T, S>(instance: ActionInstance<T, S>, parameters: ActionParameters<T>, dataProvider?: IDataProvider<T, S>, previousActionInstance?: ActionInstance<unknown, unknown>): ActionContext<T, S>;
|
|
33
38
|
/**
|
|
34
|
-
*
|
|
39
|
+
* Runs action context by submitting execution results/errors to context, watching over instance results/errors, displaying notifications,
|
|
40
|
+
* running next/error action and triggering dismiss of action. Confirmation is also processed here.
|
|
35
41
|
*
|
|
36
|
-
* @param
|
|
37
|
-
* @param itemId Item id (if exists).
|
|
38
|
-
* @param dataProvider Data provider.
|
|
39
|
-
* @param sourceComponent Source component from where the context preparation was called.
|
|
40
|
-
* @param viewContainer View container/service.
|
|
41
|
-
* @param actionData Additional action data.
|
|
42
|
+
* @param ctx Action context to run.
|
|
42
43
|
*/
|
|
43
|
-
|
|
44
|
+
run<T, S>(ctx: ActionContext<T, S>): void;
|
|
44
45
|
/**
|
|
45
46
|
* Runs action context by submitting execution results/errors to context, watching over instance results/errors, displaying notifications,
|
|
46
|
-
* running next/error action and triggering dismiss of action.
|
|
47
|
+
* running next/error action and triggering dismiss of action. Confirmation
|
|
47
48
|
*
|
|
48
|
-
* @param
|
|
49
|
+
* @param ctx Action context to run.
|
|
49
50
|
* @param parameters Action parameters for context.
|
|
50
51
|
* @param dataProvider Editor data provider for context.
|
|
51
52
|
* @param instance Optional existing action instance (if non provided, new will be created).
|
|
@@ -53,9 +54,9 @@ export declare class MngActionExecutorService {
|
|
|
53
54
|
*
|
|
54
55
|
* @return Action context for submit (=run) function.
|
|
55
56
|
*/
|
|
56
|
-
|
|
57
|
+
private runWithoutConfirmation;
|
|
57
58
|
/**
|
|
58
|
-
*
|
|
59
|
+
* Prepares editor action's fetch function by creating new action context for action instance.
|
|
59
60
|
*
|
|
60
61
|
* @param action Action descriptor.
|
|
61
62
|
* @param parameters Action parameters for context.
|
|
@@ -63,17 +64,11 @@ export declare class MngActionExecutorService {
|
|
|
63
64
|
* @param instance Optional existing action instance (if non provided, new will be created).
|
|
64
65
|
* @param previousActionInstance Optional previous action instance to link in next instance.
|
|
65
66
|
*
|
|
66
|
-
* @return Action context for
|
|
67
|
-
*/
|
|
68
|
-
runEditorSave<T, S>(action: ActionEditorDescriptor<T>, parameters: ActionParameters<T>, dataProvider?: IEditorDataProvider<T, S>, instance?: ActionInstance<T, S>, previousActionInstance?: ActionInstance<unknown, unknown>): ActionContext<T, S>;
|
|
69
|
-
/**
|
|
70
|
-
* Gets service instance of data provider.
|
|
71
|
-
*
|
|
72
|
-
* @param dataProvider Data provider instance.
|
|
67
|
+
* @return Action context for fetch function.
|
|
73
68
|
*/
|
|
74
|
-
|
|
69
|
+
prepareContextForEditorFetch<T, S>(action: ActionEditorDescriptor<T>, parameters: ActionParameters<T>, dataProvider?: IEditorDataProvider<T, S>, instance?: ActionInstance<T, S>, previousActionInstance?: ActionInstance<unknown, unknown>): ActionContext<T, S>;
|
|
75
70
|
/**
|
|
76
|
-
* Runs editor action's
|
|
71
|
+
* Runs editor action's submit (=main run) function by creating new action context for action instance.
|
|
77
72
|
*
|
|
78
73
|
* @param action Action descriptor.
|
|
79
74
|
* @param parameters Action parameters for context.
|
|
@@ -81,9 +76,20 @@ export declare class MngActionExecutorService {
|
|
|
81
76
|
* @param instance Optional existing action instance (if non provided, new will be created).
|
|
82
77
|
* @param previousActionInstance Optional previous action instance to link in next instance.
|
|
83
78
|
*
|
|
84
|
-
* @return Action context for
|
|
79
|
+
* @return Action context for submit (=run) function.
|
|
80
|
+
*/
|
|
81
|
+
prepareContextForEditorSubmit<T, S>(action: ActionEditorDescriptor<T>, parameters: ActionParameters<T>, dataProvider?: IEditorDataProvider<T, S>, instance?: ActionInstance<T, S>, previousActionInstance?: ActionInstance<unknown, unknown>): ActionContext<T, S>;
|
|
82
|
+
/**
|
|
83
|
+
* Prepares action exec context for action of type editor.
|
|
84
|
+
*
|
|
85
|
+
* @param item Item instance (if exists).
|
|
86
|
+
* @param itemId Item id (if exists).
|
|
87
|
+
* @param dataProvider Data provider.
|
|
88
|
+
* @param sourceComponent Source component from where the context preparation was called.
|
|
89
|
+
* @param viewContainer View container/service.
|
|
90
|
+
* @param actionData Additional action data.
|
|
85
91
|
*/
|
|
86
|
-
|
|
92
|
+
private prepareContextForEditor;
|
|
87
93
|
/**
|
|
88
94
|
* Runs action's main run function by creating new action context for action instance.
|
|
89
95
|
*
|
|
@@ -95,7 +101,7 @@ export declare class MngActionExecutorService {
|
|
|
95
101
|
*
|
|
96
102
|
* @return Action context for run function.
|
|
97
103
|
*/
|
|
98
|
-
|
|
104
|
+
private prepareContext;
|
|
99
105
|
/**
|
|
100
106
|
* Activates action (in case of dialog, dialog will be opened).
|
|
101
107
|
*
|
|
@@ -107,13 +113,29 @@ export declare class MngActionExecutorService {
|
|
|
107
113
|
* @return Action instance - if non provided in parameters, the newly created will be returned.
|
|
108
114
|
*/
|
|
109
115
|
activateAction<T, S>(action: ActionDescriptor<T>, parameters: ActionParameters<T>, instance?: ActionInstance<T, S>, previousActionInstance?: ActionInstance<unknown, unknown>): ActionInstance<T, S>;
|
|
116
|
+
/**
|
|
117
|
+
* To be called when action editor is initialized to correctly activate action.
|
|
118
|
+
* @param action Action descriptor.
|
|
119
|
+
* @param instance Action instance (if available).
|
|
120
|
+
*/
|
|
121
|
+
onActionEditorInit<T, S>(action: ActionDescriptor<T>, instance?: ActionInstance<T, S>): ActionInstance<T, S>;
|
|
122
|
+
/**
|
|
123
|
+
* To be called when action editor cmp is being destroyed to correctly finish action.
|
|
124
|
+
* @param instance Action instance.
|
|
125
|
+
*/
|
|
126
|
+
onActionEditorDestroy<T, S>(instance?: ActionInstance<T, S>): void;
|
|
127
|
+
/**
|
|
128
|
+
* To be called when action route cmp is being destroyed to correctly finish action.
|
|
129
|
+
* @param instance Action instance.
|
|
130
|
+
*/
|
|
131
|
+
onActionRouteDestroy<T, S>(instance?: ActionInstance<T, S>): void;
|
|
110
132
|
/**
|
|
111
133
|
* Deactivates action by choosing final state, closing dialog and completing all subjects in instance and contexts.
|
|
112
134
|
*
|
|
113
135
|
* @param instance Action instance.
|
|
114
|
-
* @param
|
|
136
|
+
* @param onDestroy Marks if finish is called on component destroy lifecycle hook.
|
|
115
137
|
*/
|
|
116
|
-
|
|
138
|
+
finishAction<T, S>(instance: ActionInstance<T, S>, onDestroy?: boolean): void;
|
|
117
139
|
/**
|
|
118
140
|
* Triggers action from table row click position.
|
|
119
141
|
*
|
|
@@ -122,6 +144,8 @@ export declare class MngActionExecutorService {
|
|
|
122
144
|
* @param route Currently activate route.
|
|
123
145
|
* @param tableDescriptor Table descriptor.
|
|
124
146
|
* @param dataKeyProperty Data key property.
|
|
147
|
+
*
|
|
148
|
+
* @deprecated
|
|
125
149
|
*/
|
|
126
150
|
triggerRowClickAction<T>(action: ActionDescriptor<T>, event: MngTableCellClickEvent<T>, route?: ActivatedRoute, tableDescriptor?: TableDescriptor<T>, dataKeyProperty?: string): ActionInstance<T, unknown>;
|
|
127
151
|
/**
|
|
@@ -137,7 +161,7 @@ export declare class MngActionExecutorService {
|
|
|
137
161
|
* Deactivates on route triggered action by trying to reroute back to location where action was triggered.
|
|
138
162
|
* @param instance Action instance.
|
|
139
163
|
*/
|
|
140
|
-
|
|
164
|
+
finishActionRouteUntrigger<T, S>(instance: ActionInstance<T, S>): void;
|
|
141
165
|
/**
|
|
142
166
|
* Transform error of any type to mng error by using error mapper that could be provided by final project.
|
|
143
167
|
* @param error error of any type.
|
|
@@ -145,6 +169,16 @@ export declare class MngActionExecutorService {
|
|
|
145
169
|
* @return mapped MngError.
|
|
146
170
|
*/
|
|
147
171
|
toMngActionError(error?: any): MngError;
|
|
172
|
+
/**
|
|
173
|
+
* Creates or gets existing action instance.
|
|
174
|
+
* @param instance Action instance.
|
|
175
|
+
* @param action Action descriptor.
|
|
176
|
+
* @param parameters Action parameters.
|
|
177
|
+
* @param instanceInitialStatus Action instance initial status.
|
|
178
|
+
* @param skipInitializationFromViewContainer If initialization of instance from view container should be skipped.
|
|
179
|
+
* @private
|
|
180
|
+
*/
|
|
181
|
+
private getOrCreateInstance;
|
|
148
182
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngActionExecutorService, never>;
|
|
149
183
|
static ɵprov: i0.ɵɵInjectableDeclaration<MngActionExecutorService>;
|
|
150
184
|
}
|
|
@@ -77,6 +77,8 @@ export declare class MngCommonsService {
|
|
|
77
77
|
get userRoles(): Array<string>;
|
|
78
78
|
set userRoles(roles: Array<string>);
|
|
79
79
|
get userRoles$(): Observable<string[]>;
|
|
80
|
+
get actionsDebugLog(): boolean;
|
|
81
|
+
get actionsDebugInstances(): boolean;
|
|
80
82
|
reset(): void;
|
|
81
83
|
menuChangeActiveKey(key: string): void;
|
|
82
84
|
menuReset(): void;
|
package/lib/services/index.d.ts
CHANGED
|
@@ -3,4 +3,6 @@ export * from './configuration.service';
|
|
|
3
3
|
export * from './commons.service';
|
|
4
4
|
export * from './error-mapper.service';
|
|
5
5
|
export * from './navigation.service';
|
|
6
|
+
export * from './router.service';
|
|
7
|
+
export * from './version.service';
|
|
6
8
|
export * from './view-container.component.service';
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { TranslateService } from '@ngx-translate/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { MngCommonsService } from '../
|
|
4
|
-
import { MngConfigurationService } from '../configuration.service';
|
|
5
|
-
import { MngRouterService } from '../router.service';
|
|
3
|
+
import { MngCommonsService, MngConfigurationService, MngRouterService } from '../';
|
|
6
4
|
import * as i0 from "@angular/core";
|
|
7
5
|
export declare class MngCommonsInitService {
|
|
8
6
|
private translate;
|
|
@@ -6,8 +6,9 @@ export declare class MngNavigationService {
|
|
|
6
6
|
private location;
|
|
7
7
|
private history;
|
|
8
8
|
constructor(router: Router, location: Location);
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
getCurrentLocationFromHistory(): string | null;
|
|
10
|
+
getCurrentLocationFromUrl(): string;
|
|
11
|
+
getPreviousLocationFromHistory(): string | null;
|
|
11
12
|
back(): void;
|
|
12
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngNavigationService, never>;
|
|
13
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<MngNavigationService>;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { MessageService } from 'primeng/api';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
+
import { ActionInstance } from '../components/action/models';
|
|
3
4
|
import { IDataProvider } from '../data-providers';
|
|
4
5
|
import { ActionDescriptor } from '../descriptors/action';
|
|
5
|
-
import { IViewContainerEditor, IViewContainerTable, ViewContainerEditorCloseEvent, ViewContainerEditorResetEvent, ViewContainerTableReloadEvent } from '../models';
|
|
6
|
+
import { IViewActionRouteTriggeredContainer, IViewContainerEditor, IViewContainerTable, ViewContainerEditorCloseEvent, ViewContainerEditorResetEvent, ViewContainerTableReloadEvent } from '../models';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
/**
|
|
8
9
|
* Should be used with providers defined within component.
|
|
9
10
|
*/
|
|
10
|
-
export declare class MngViewContainerComponentService<T, S> implements IViewContainerTable<T, S>, IViewContainerEditor<T, S> {
|
|
11
|
+
export declare class MngViewContainerComponentService<T, S> implements IViewContainerTable<T, S>, IViewContainerEditor<T, S>, IViewActionRouteTriggeredContainer<T, S> {
|
|
11
12
|
private messageService;
|
|
12
13
|
private _dataProvider?;
|
|
14
|
+
private _routeTriggeredActionInstance?;
|
|
13
15
|
private actions;
|
|
14
16
|
private _tableReloadSubject;
|
|
15
17
|
private _editorResetSubject;
|
|
@@ -26,6 +28,9 @@ export declare class MngViewContainerComponentService<T, S> implements IViewCont
|
|
|
26
28
|
resetEditor(event?: ViewContainerEditorResetEvent<T> | undefined): void;
|
|
27
29
|
getEditorClose$(): Observable<ViewContainerEditorCloseEvent<T>>;
|
|
28
30
|
closeEditor(event?: ViewContainerEditorCloseEvent<T>): void;
|
|
31
|
+
getActionRouteTriggeredInstance(): ActionInstance<T, S> | undefined;
|
|
32
|
+
setActionRouteTriggeredInstance(instance: ActionInstance<T, S>): void;
|
|
33
|
+
unsetActionRouteTriggeredInstance(): void;
|
|
29
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngViewContainerComponentService<any, any>, never>;
|
|
30
35
|
static ɵprov: i0.ɵɵInjectableDeclaration<MngViewContainerComponentService<any, any>>;
|
|
31
36
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
1
2
|
import { Observable } from 'rxjs';
|
|
2
3
|
import { MediusQueryResult } from '../api/models';
|
|
3
4
|
import { ActionContext } from '../components/action/models';
|
|
5
|
+
import { IDataProvider } from '../data-providers';
|
|
4
6
|
export declare class ActionDataProviderUtil {
|
|
5
7
|
static runGetAllOrFail<T, S>(ctx: ActionContext<T, S>): Observable<MediusQueryResult<T>>;
|
|
6
8
|
static runFetchOrFail<T, S>(ctx: ActionContext<T, S>): Observable<T>;
|
|
@@ -23,4 +25,10 @@ export declare class ActionDataProviderUtil {
|
|
|
23
25
|
static runCreateDataProvider<T, S>(ctx: ActionContext<T, S>): Observable<T> | null;
|
|
24
26
|
static runUpdateDataProvider<T, S>(ctx: ActionContext<T, S>): Observable<T> | null;
|
|
25
27
|
static runDeleteDataProvider<T, S>(ctx: ActionContext<T, S>): Observable<T | null> | null;
|
|
28
|
+
/**
|
|
29
|
+
* Gets service instance of data provider.
|
|
30
|
+
*
|
|
31
|
+
* @param dataProvider Data provider instance.
|
|
32
|
+
*/
|
|
33
|
+
static getDataProviderService<T, S>(injector: Injector, dataProvider?: IDataProvider<T, S>): S | null;
|
|
26
34
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediusinc/mng-commons",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0-rc.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
+
"@angular/animations": "^15.2.6",
|
|
5
6
|
"@angular/common": "^15.2.6",
|
|
6
7
|
"@angular/core": "^15.2.6",
|
|
7
8
|
"@angular/forms": "^15.2.6",
|
|
8
|
-
"@angular/router": "^15.2.6",
|
|
9
9
|
"@angular/platform-browser": "^15.2.6",
|
|
10
|
-
"@angular/
|
|
10
|
+
"@angular/router": "^15.2.6",
|
|
11
11
|
"@ngx-formly/core": "^6.1.3",
|
|
12
12
|
"@ngx-translate/core": "^14.0.0",
|
|
13
13
|
"primeng": "~15.3.0",
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/* You can add global styles to this file, and also import other style files */
|
|
2
2
|
|
|
3
|
+
$multiselectHighlightBg: rgba(68, 72, 109, 0.12) !default;
|
|
4
|
+
$multiselectHighlightTextColor: #44486d;
|
|
5
|
+
|
|
3
6
|
// theme and layout
|
|
4
7
|
@import 'layout/default/layout-light.scss';
|
|
5
8
|
@import 'theme/default/theme-light.scss';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
|
|
3
|
+
.p-multiselect-panel {
|
|
4
|
+
.p-multiselect-items {
|
|
5
|
+
.p-multiselect-item {
|
|
6
|
+
&.p-highlight {
|
|
7
|
+
color: $multiselectHighlightTextColor;
|
|
8
|
+
background: $multiselectHighlightBg;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.p-checkbox {
|
|
12
|
+
.p-checkbox-box {
|
|
13
|
+
&.p-highlight {
|
|
14
|
+
border: $checkboxBorder;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|