@mediusinc/mng-commons 6.0.0 → 6.1.0-rc.1
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/core/action/action-parameters.model.d.ts +27 -0
- package/core/pipes/parametrize.pipe.d.ts +5 -1
- package/fesm2022/mediusinc-mng-commons-core.mjs +74 -68
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form.mjs +19 -19
- package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-api.mjs +8 -2
- package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-CCyGSxaD.mjs +30 -0
- package/fesm2022/{mediusinc-mng-commons-table-column-toggle.component-a8KG1NIX.mjs.map → mediusinc-mng-commons-table-column-toggle.component-CCyGSxaD.mjs.map} +1 -1
- package/fesm2022/{mediusinc-mng-commons-table-mediusinc-mng-commons-table-C2vrMoNL.mjs → mediusinc-mng-commons-table-mediusinc-mng-commons-table-8TdW6NCC.mjs} +59 -44
- package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-8TdW6NCC.mjs.map +1 -0
- package/fesm2022/mediusinc-mng-commons-table.mjs +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +5 -4
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +192 -161
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/package.json +2 -2
- package/table/api/descriptors/column.descriptor.d.ts +7 -1
- package/table/components/column-value/column-value.component.d.ts +5 -0
- package/table/components/table/table.component.d.ts +1 -1
- package/table/services/table-data.service.d.ts +1 -0
- package/tableview/action/components/action/action.component.d.ts +1 -1
- package/tableview/action/components/editor/action-editor.component.d.ts +2 -2
- package/tableview/action/components/editor/injector-context/action-editor-injector-context.component.d.ts +3 -2
- package/tableview/action/helpers/action-execution.d.ts +1 -1
- package/tableview/action/helpers/inject.d.ts +39 -0
- package/tableview/action/helpers/styles.d.ts +1 -1
- package/tableview/action/models/execution/action-instance.model.d.ts +1 -1
- package/tableview/action/services/view-container.service.d.ts +1 -1
- package/tableview/api/action/descriptors/action-editor-descriptor.factory.d.ts +1 -1
- package/tableview/api/action/descriptors/action-editor.descriptor.d.ts +14 -14
- package/tableview/api/action/descriptors/action.descriptor.d.ts +6 -6
- package/tableview/api/action/descriptors/editor-action-descriptor.factory.d.ts +1 -1
- package/tableview/api/action/descriptors/editor-action-editor-descriptor.factory.d.ts +1 -1
- package/tableview/api/action/descriptors/table-action-editor-descriptor.factory.d.ts +4 -4
- package/tableview/api/action/models/action-component.model.d.ts +1 -1
- package/tableview/api/action/models/action-confirmation.model.d.ts +2 -2
- package/tableview/api/action/models/action-descriptor.types.d.ts +2 -1
- package/tableview/api/action/models/execution/action-context.model.d.ts +2 -1
- package/tableview/api/action/models/execution/view-container.model.d.ts +1 -1
- package/tableview/api/editor/descriptors/field-many.descriptor.d.ts +2 -2
- package/tableview/api/editor/models/form-editor.interface.d.ts +4 -4
- package/tableview/editor/components/editor/form-editor.component.d.ts +2 -1
- package/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +2 -2
- package/tableview/index.d.ts +1 -0
- package/tableview/tableview/components/tableview/tableview.component.d.ts +5 -3
- package/version-info.json +5 -5
- package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-a8KG1NIX.mjs +0 -30
- package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-C2vrMoNL.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediusinc/mng-commons",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.1.0-rc.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/animations": "^19.0.0",
|
|
6
6
|
"@angular/common": "^19.0.0",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@angular/router": "^19.0.0",
|
|
11
11
|
"@ngx-formly/core": "~6.3.11",
|
|
12
12
|
"@ngx-translate/core": "^16.0.0",
|
|
13
|
-
"primeng": "~19.0.9"
|
|
13
|
+
"primeng": "~19.0.9 || ~19.1.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"reflect-metadata": "^0.2.2",
|
|
@@ -3,6 +3,9 @@ import { GetterFn } from '@mediusinc/mng-commons/core';
|
|
|
3
3
|
import { EnumDescriptor } from '@mediusinc/mng-commons/model';
|
|
4
4
|
import { IColumnValueComponent } from '../models/column-value.model';
|
|
5
5
|
import { ColumnDisplayTypeEnum, ColumnTypeEnum } from '../models/column.model';
|
|
6
|
+
export type ColumnComponentOpts = {
|
|
7
|
+
inputs?: Record<string, any>;
|
|
8
|
+
};
|
|
6
9
|
export type ColumnCurrencyOptsType<Property = string> = {
|
|
7
10
|
currencyProperty?: Property;
|
|
8
11
|
currency?: string;
|
|
@@ -46,6 +49,7 @@ export declare class ColumnDescriptor<ColumnModel, TableModel, ColumnValue = Col
|
|
|
46
49
|
private _currencyProperty?;
|
|
47
50
|
private _currencyDisplay?;
|
|
48
51
|
private _customComponentType?;
|
|
52
|
+
private _customComponentInputs?;
|
|
49
53
|
private _hasCopyToClipboard;
|
|
50
54
|
private _clipboardValueGetter?;
|
|
51
55
|
private _isLocalized;
|
|
@@ -68,6 +72,7 @@ export declare class ColumnDescriptor<ColumnModel, TableModel, ColumnValue = Col
|
|
|
68
72
|
get booleanYes(): string | undefined;
|
|
69
73
|
get booleanNo(): string | undefined;
|
|
70
74
|
get customComponentType(): Type<IColumnValueComponent<ColumnValue, TableModel, ColumnModel>> | undefined;
|
|
75
|
+
get customComponentInputs(): Record<string, any> | undefined;
|
|
71
76
|
get locale(): string | undefined;
|
|
72
77
|
get currencyCode(): string | undefined;
|
|
73
78
|
get currencyDisplay(): "symbol" | "code" | "name" | undefined;
|
|
@@ -135,8 +140,9 @@ export declare class ColumnDescriptor<ColumnModel, TableModel, ColumnValue = Col
|
|
|
135
140
|
* Set column display with custom component.
|
|
136
141
|
*
|
|
137
142
|
* @param customComponentType Component type to be used for display. Must implement {IColumnValueComponent}.
|
|
143
|
+
* @param opts Options for the custom component, including inputs to pass to the component.
|
|
138
144
|
*/
|
|
139
|
-
asCustomComponent(customComponentType: Type<IColumnValueComponent<ColumnValue, TableModel, ColumnModel
|
|
145
|
+
asCustomComponent(customComponentType: Type<IColumnValueComponent<ColumnValue, TableModel, ColumnModel>>, opts?: ColumnComponentOpts): this;
|
|
140
146
|
/**
|
|
141
147
|
* Sets columns display as HTML using Angular innerHTML.
|
|
142
148
|
*/
|
|
@@ -22,6 +22,11 @@ export declare class TableColumnValueComponent<T, TT> {
|
|
|
22
22
|
value: import("@angular/core").Signal<any>;
|
|
23
23
|
currency: import("@angular/core").Signal<string | undefined>;
|
|
24
24
|
hasCopyToClipboard: import("@angular/core").Signal<boolean>;
|
|
25
|
+
componentInputs: import("@angular/core").Signal<{
|
|
26
|
+
value: any;
|
|
27
|
+
item: any;
|
|
28
|
+
descriptor: ColumnDescriptor<T, TT, T>;
|
|
29
|
+
}>;
|
|
25
30
|
copyToClipboard(event: Event): void;
|
|
26
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableColumnValueComponent<any, any>, never>;
|
|
27
32
|
static ɵcmp: i0.ɵɵComponentDeclaration<TableColumnValueComponent<any, any>, "mng-table-column-value", never, { "descriptor": { "alias": "descriptor"; "required": true; "isSignal": true; }; "item": { "alias": "item"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -49,7 +49,7 @@ export declare class TableComponent<Item = any, Service = undefined, Sorts = any
|
|
|
49
49
|
rowReorder: import("@angular/core").OutputEmitterRef<TableRowReorderEvent>;
|
|
50
50
|
templates: Signal<readonly TemplateDirective[]>;
|
|
51
51
|
components: Signal<readonly ComponentDirective<any>[]>;
|
|
52
|
-
primeTable: Signal<Table | undefined>;
|
|
52
|
+
primeTable: Signal<Table<any> | undefined>;
|
|
53
53
|
captionTemplate: Signal<TemplateRef<any> | null>;
|
|
54
54
|
columnCustomLastTemplate: Signal<TemplateRef<any> | null>;
|
|
55
55
|
footerTemplate: Signal<TemplateRef<any> | null>;
|
|
@@ -19,6 +19,7 @@ export declare class TableDataService<Item> implements OnDestroy {
|
|
|
19
19
|
readonly data: Signal<Item[]>;
|
|
20
20
|
readonly count: Signal<number>;
|
|
21
21
|
readonly loading: Signal<boolean>;
|
|
22
|
+
readonly selectedItems: import("@angular/core").WritableSignal<Item[]>;
|
|
22
23
|
setDataSources(arrayItems: Signal<Item[] | undefined>, dataListResult: Signal<DataListResult<Item> | undefined>, dataProvider: Signal<ITableDataProvider<Item, any, any, any> | undefined>, manualLoading: Signal<boolean | undefined>): void;
|
|
23
24
|
fetchWithDataProvider(params: DataListParams, onErrorFn: (error: Error) => void): boolean;
|
|
24
25
|
setParams(params: DataListParams, fromQueryParams?: boolean): void;
|
|
@@ -12,7 +12,7 @@ export declare class ActionComponent<Item = any, Service = undefined> implements
|
|
|
12
12
|
private readonly translate;
|
|
13
13
|
private readonly authorization;
|
|
14
14
|
private readonly actionExecutor;
|
|
15
|
-
private readonly viewContainer
|
|
15
|
+
private readonly viewContainer;
|
|
16
16
|
action: import("@angular/core").InputSignal<ActionDescriptorInst<Item, Service, any, any, any>>;
|
|
17
17
|
item: import("@angular/core").InputSignal<Item | undefined>;
|
|
18
18
|
itemId: import("@angular/core").InputSignal<IdType | undefined>;
|
|
@@ -7,7 +7,7 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
export declare class ActionEditorComponent<T = any, S = any> {
|
|
8
8
|
readonly injContextCmpType: Type<any>;
|
|
9
9
|
readonly dialogConfig: DynamicDialogConfig<any, any> | null;
|
|
10
|
-
action: import("@angular/core").InputSignal<ActionEditorDescriptorInst<T, S, T, T, T, T>>;
|
|
10
|
+
action: import("@angular/core").InputSignal<ActionEditorDescriptorInst<T, S, T, T, T, T, undefined>>;
|
|
11
11
|
private readonly dialogData;
|
|
12
12
|
private readonly isDialog;
|
|
13
13
|
readonly parentInjector: import("@angular/core").Injector | undefined;
|
|
@@ -22,7 +22,7 @@ export declare class ActionEditorComponent<T = any, S = any> {
|
|
|
22
22
|
private itemIdFirstUpdate;
|
|
23
23
|
private itemFirstUpdate;
|
|
24
24
|
get actionEditor(): ActionEditorInjectorContextComponent<T, S> | undefined;
|
|
25
|
-
get formEditorCmp(): import("@angular/core").Signal<import("@mediusinc/mng-commons/tableview").FormEditorComponent<
|
|
25
|
+
get formEditorCmp(): import("@angular/core").Signal<import("@mediusinc/mng-commons/tableview").FormEditorComponent<T, any> | undefined> | undefined;
|
|
26
26
|
constructor();
|
|
27
27
|
onActionEditorWInjContextCmp(cmp: ActionEditorInjectorContextComponent<T, S>): void;
|
|
28
28
|
cancel(): void;
|
|
@@ -21,14 +21,14 @@ export declare class ActionEditorInjectorContextComponent<Item = any, Service =
|
|
|
21
21
|
data: import("@angular/core").InputSignal<ActionEditorInjectorContextInputData<Item, Service>>;
|
|
22
22
|
actionRun: import("@angular/core").OutputEmitterRef<Item | null | undefined>;
|
|
23
23
|
actionCancel: import("@angular/core").OutputEmitterRef<Item | null | undefined>;
|
|
24
|
-
formEditorCmp: import("@angular/core").Signal<FormEditorComponent<
|
|
24
|
+
formEditorCmp: import("@angular/core").Signal<FormEditorComponent<Item, any> | undefined>;
|
|
25
25
|
private hasTitle;
|
|
26
26
|
title: import("@angular/core").WritableSignal<string | undefined>;
|
|
27
27
|
isFormDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
28
28
|
item: import("@angular/core").WritableSignal<Item | undefined>;
|
|
29
29
|
itemId: import("@angular/core").WritableSignal<IdType | undefined>;
|
|
30
30
|
actionData: import("@angular/core").WritableSignal<ActionData | undefined>;
|
|
31
|
-
editorAction: import("@angular/core").Signal<ActionEditorDescriptorInst<Item, Service, Item, Item, Item, Item>>;
|
|
31
|
+
editorAction: import("@angular/core").Signal<ActionEditorDescriptorInst<Item, Service, Item, Item, Item, Item, undefined>>;
|
|
32
32
|
private actions;
|
|
33
33
|
toolbarLeftActions: import("@angular/core").Signal<ActionDescriptorInst<Item, any, Item, Item, Item>[]>;
|
|
34
34
|
toolbarRightActions: import("@angular/core").Signal<ActionDescriptorInst<Item, any, Item, Item, Item>[]>;
|
|
@@ -62,6 +62,7 @@ export declare class ActionEditorInjectorContextComponent<Item = any, Service =
|
|
|
62
62
|
closeWithUnsavedChangesConfirmation(callFromGuard?: boolean): Observable<boolean>;
|
|
63
63
|
private showUnsavedChangesConfirmationDialog;
|
|
64
64
|
private onEditorReset;
|
|
65
|
+
private getActionParams;
|
|
65
66
|
static ɵfac: i0.ɵɵFactoryDeclaration<ActionEditorInjectorContextComponent<any, any>, never>;
|
|
66
67
|
static ɵcmp: i0.ɵɵComponentDeclaration<ActionEditorInjectorContextComponent<any, any>, "mng-action-editor-injector-context", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; }, { "actionRun": "actionRun"; "actionCancel": "actionCancel"; }, never, never, true, never>;
|
|
67
68
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IDataProvider } from '@mediusinc/mng-commons/core';
|
|
2
2
|
import { ActionDescriptorInst, IViewContainer } from '@mediusinc/mng-commons/tableview/api';
|
|
3
3
|
import { ActionDataProviderSource } from '../models/execution/action-context.model';
|
|
4
|
-
export declare function actionExecutionSelectDataProvider<Item, Service>(action: ActionDescriptorInst<
|
|
4
|
+
export declare function actionExecutionSelectDataProvider<Item, Service>(action: ActionDescriptorInst<any>, dataProvider?: IDataProvider<Item, Service>, viewContainer?: IViewContainer<any, any> | null): {
|
|
5
5
|
dataProvider?: IDataProvider<Item, Service>;
|
|
6
6
|
source: ActionDataProviderSource;
|
|
7
7
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ModelDescriptor, TypeDescriptor } from '@mediusinc/mng-commons/model';
|
|
2
|
+
import { TableComponent } from '@mediusinc/mng-commons/table';
|
|
3
|
+
import { TableDescriptorInst } from '@mediusinc/mng-commons/table/api';
|
|
4
|
+
import { EditorDescriptorInst, IActionContext, IActionEditorContext } from '@mediusinc/mng-commons/tableview/api';
|
|
5
|
+
import { FormEditorService } from '../../editor/services/form-editor.service';
|
|
6
|
+
/**
|
|
7
|
+
* Retrieves the parent form editor service for a given action editor context. Only applicable for action editor with ParentEditorItem type defined.
|
|
8
|
+
*
|
|
9
|
+
* @param {IActionEditorContext<any, ParentItem, any, any>} ctx - The action editor context containing information about the current editor and its parent.
|
|
10
|
+
*
|
|
11
|
+
* @return {FormEditorService<ParentItem> | null} The parent form editor service if available, or null if not found.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getActionParentFormEditor<ParentItem>(ctx: IActionEditorContext<any, ParentItem, any, any>): FormEditorService<ParentItem> | null;
|
|
14
|
+
/**
|
|
15
|
+
* Retrieves the parent form editor service for a given action context and editor/model/type descriptor.
|
|
16
|
+
*
|
|
17
|
+
* @param {IActionContext<any, any, any, any>} ctx - The action context from which the parent editor is resolved.
|
|
18
|
+
* @param {EditorDescriptorInst<ParentItem> | ModelDescriptor<ParentItem> | TypeDescriptor<ParentItem>} editorType - The editor descriptor or type used to locate the parent form editor.
|
|
19
|
+
*
|
|
20
|
+
* @return {FormEditorService<ParentItem> | null} The parent form editor service instance if found, otherwise null.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getActionParentFormEditor<ParentItem>(ctx: IActionContext<any, any, any, any> | IActionEditorContext<any, any, any, any>, editorType: EditorDescriptorInst<ParentItem> | ModelDescriptor<ParentItem> | TypeDescriptor<ParentItem>): FormEditorService<ParentItem> | null;
|
|
23
|
+
/**
|
|
24
|
+
* Retrieves the form editor service associated with a given action editor context. Only applicable for action editor.
|
|
25
|
+
*
|
|
26
|
+
* @param {IActionEditorContext<Item, ParentItem, any, any>} ctx - The action editor context containing parameters and state.
|
|
27
|
+
*
|
|
28
|
+
* @return {FormEditorService<Item, ParentItem> | null} The form editor service if available, or null if not found.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getActionFormEditor<Item, ParentItem>(ctx: IActionEditorContext<Item, ParentItem, any, any>): FormEditorService<Item, ParentItem> | null;
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves the parent table associated with the given action context and table descriptor. Applies when actions are placed on table or table within tableview.
|
|
33
|
+
*
|
|
34
|
+
* @param {IActionContext<any, any, any, any>} ctx - The action context from which the table is resolved.
|
|
35
|
+
* @param {TableDescriptorInst<Item, Sorts, Filters> | ModelDescriptor<Item> | TypeDescriptor<Item>} tableType - The descriptor of the table that needs to be retrieved.
|
|
36
|
+
*
|
|
37
|
+
* @return {TableComponent<Item, Sorts, Filters> | null} The parent table associated with the action context and descriptor, or null if not found.
|
|
38
|
+
*/
|
|
39
|
+
export declare function getActionParentTable<Item, Sorts = keyof Item, Filters = keyof Item>(ctx: IActionContext<any, any, any, any>, tableType: TableDescriptorInst<Item, Sorts, Filters> | ModelDescriptor<Item> | TypeDescriptor<Item>): TableComponent<Item, Sorts, Filters> | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TableDescriptorInst } from '@mediusinc/mng-commons/table/api';
|
|
2
2
|
import { ActionDescriptorInst } from '@mediusinc/mng-commons/tableview/api';
|
|
3
|
-
export declare function calculateTableColumnActionWidth(table: TableDescriptorInst<unknown>, actions: Array<ActionDescriptorInst<
|
|
3
|
+
export declare function calculateTableColumnActionWidth(table: TableDescriptorInst<unknown>, actions: Array<ActionDescriptorInst<any>>): number;
|
|
4
4
|
export declare function getTableCellPaddingX(table: TableDescriptorInst<unknown>): number;
|
|
5
5
|
export declare function getActionButtonRoundedWidth(action: ActionDescriptorInst<any>): number;
|
|
@@ -31,7 +31,7 @@ export declare class ActionInstance<Item, Service = undefined> implements IActio
|
|
|
31
31
|
previousInstance?: IActionInstance<any, any>;
|
|
32
32
|
nextActionInstance?: IActionInstance<any, any>;
|
|
33
33
|
errorActionInstance?: IActionInstance<Item, Service>;
|
|
34
|
-
constructor(action: ActionDescriptorInst<Item>, state?: ActionInstanceStateEnum);
|
|
34
|
+
constructor(action: ActionDescriptorInst<Item, Service, any, any, any>, state?: ActionInstanceStateEnum);
|
|
35
35
|
get isRunLoading$(): Observable<boolean>;
|
|
36
36
|
get context(): ActionContext<Item, any, Service> | undefined;
|
|
37
37
|
get execution$(): Observable<Item | null | undefined>;
|
|
@@ -10,7 +10,7 @@ import * as i0 from "@angular/core";
|
|
|
10
10
|
export declare class ViewContainer<Item, Service = undefined> implements IViewContainer<Item, Service, ActionInstance<Item, Service>> {
|
|
11
11
|
dataProvider: import("@angular/core").WritableSignal<IDataProvider<Item, Service> | undefined>;
|
|
12
12
|
routeTriggeredActionInstance: import("@angular/core").WritableSignal<ActionInstance<Item, Service> | undefined>;
|
|
13
|
-
actions: import("@angular/core").WritableSignal<ActionDescriptorInst<
|
|
13
|
+
actions: import("@angular/core").WritableSignal<ActionDescriptorInst<any, any, any, any, any>[]>;
|
|
14
14
|
private _tableReloadSubject;
|
|
15
15
|
private _editorResetSubject;
|
|
16
16
|
private _editorCloseSubject;
|
|
@@ -21,4 +21,4 @@ export declare const actionEditorGetProviderCfgObj: <Model, Service>(serviceOrDa
|
|
|
21
21
|
* @param {ActionEditorDescriptorOptsType<Model, Service, FetchInput, SubmitReturn, ValidationInput>} [opts] - Optional configuration options for the ActionEditor.
|
|
22
22
|
* @return {ActionEditorDescriptorInst<Model, Service, EditorModel, FetchInput, SubmitReturn, ValidationInput>} An instance of ActionEditorDescriptor with the configured parameters.
|
|
23
23
|
*/
|
|
24
|
-
export declare function actionEditor<EditorModel, Model = EditorModel, Service = undefined, FetchInput = Model, SubmitReturn = Model, ValidationInput = Model>(actionName: string, editor: EditorDescriptorInst<EditorModel,
|
|
24
|
+
export declare function actionEditor<EditorModel, Model = EditorModel, Service = undefined, FetchInput = Model, SubmitReturn = Model, ValidationInput = Model, ParentEditorItem = undefined>(actionName: string, editor: EditorDescriptorInst<EditorModel, ParentEditorItem>, opts?: ActionEditorDescriptorOptsType<Model, Service, FetchInput, SubmitReturn, ValidationInput>): ActionEditorDescriptorInst<Model, Service, EditorModel, FetchInput, SubmitReturn, ValidationInput, ParentEditorItem>;
|
|
@@ -3,7 +3,7 @@ import { ServiceClassType, StyleSizeEnum } from '@mediusinc/mng-commons/core';
|
|
|
3
3
|
import { ModelDescriptor } from '@mediusinc/mng-commons/model';
|
|
4
4
|
import { IEditorDataProvider } from '../../editor/data-providers/editor.data-provider';
|
|
5
5
|
import { EditorDescriptorInst } from '../../editor/descriptors/editor.descriptor';
|
|
6
|
-
import { ActionNotificationType, ActionRunFnType } from '../models/action-descriptor.types';
|
|
6
|
+
import { ActionEditorRunFnType, ActionNotificationType, ActionRunFnType } from '../models/action-descriptor.types';
|
|
7
7
|
import { ActionEditorSubmitTypeEnum } from '../models/action.type';
|
|
8
8
|
import { ActionDescriptorCreateOptsParentType, ActionDescriptorInst } from './action.descriptor';
|
|
9
9
|
export type ActionEditorDescriptorConstructorOptsType<Model, Service> = ActionDescriptorCreateOptsParentType & ActionEditorDescriptorCreateOptsProviderType<Model, Service> & {
|
|
@@ -14,7 +14,7 @@ export type ActionEditorDescriptorCreateOptsProviderType<Model, Service> = {
|
|
|
14
14
|
serviceType?: ServiceClassType<Service>;
|
|
15
15
|
dataProvider?: IEditorDataProvider<Model, Service>;
|
|
16
16
|
};
|
|
17
|
-
export declare class ActionEditorDescriptorInst<Item, Service = any, EditorItem = Item, FetchInputItem = Item, SubmitReturnItem = Item, ValidationInputItem = Item> extends ActionDescriptorInst<Item, Service, EditorItem, SubmitReturnItem, ValidationInputItem> {
|
|
17
|
+
export declare class ActionEditorDescriptorInst<Item, Service = any, EditorItem = Item, FetchInputItem = Item, SubmitReturnItem = Item, ValidationInputItem = Item, ParentEditorItem = undefined> extends ActionDescriptorInst<Item, Service, EditorItem, SubmitReturnItem, ValidationInputItem> {
|
|
18
18
|
private readonly _editorDescriptor;
|
|
19
19
|
protected readonly _dataProvider?: IEditorDataProvider<Item, any>;
|
|
20
20
|
protected _editorActions: ActionDescriptorInst<any, any, EditorItem, any, EditorItem>[];
|
|
@@ -24,8 +24,8 @@ export declare class ActionEditorDescriptorInst<Item, Service = any, EditorItem
|
|
|
24
24
|
protected _fetchNotificationOnError?: ActionNotificationType | boolean;
|
|
25
25
|
protected _dialogSize: StyleSizeEnum;
|
|
26
26
|
protected _dialogClassName?: string;
|
|
27
|
-
protected _fetchFunction?:
|
|
28
|
-
protected _submitFunction?:
|
|
27
|
+
protected _fetchFunction?: ActionEditorRunFnType<Item, ParentEditorItem, Service, FetchInputItem, EditorItem>;
|
|
28
|
+
protected _submitFunction?: ActionEditorRunFnType<Item, ParentEditorItem, Service, EditorItem, SubmitReturnItem>;
|
|
29
29
|
protected _editorComponent?: Type<any>;
|
|
30
30
|
protected _resubmitEnabled?: boolean;
|
|
31
31
|
protected _resubmitRefetch: boolean;
|
|
@@ -33,7 +33,7 @@ export declare class ActionEditorDescriptorInst<Item, Service = any, EditorItem
|
|
|
33
33
|
constructor(editorDescriptor: EditorDescriptorInst<EditorItem, any>, actionName: string, cfg?: ActionEditorDescriptorConstructorOptsType<Item, Service>);
|
|
34
34
|
get editorTitle(): string | null | undefined;
|
|
35
35
|
get editorTitleParams(): any;
|
|
36
|
-
get editorDescriptor(): EditorDescriptorInst<EditorItem,
|
|
36
|
+
get editorDescriptor(): EditorDescriptorInst<EditorItem, ParentEditorItem>;
|
|
37
37
|
get dialogSize(): StyleSizeEnum;
|
|
38
38
|
get dialogClassName(): string | undefined;
|
|
39
39
|
get fetchNotificationOnSuccess(): boolean | ActionNotificationType | undefined;
|
|
@@ -42,9 +42,9 @@ export declare class ActionEditorDescriptorInst<Item, Service = any, EditorItem
|
|
|
42
42
|
get hasRunFunction(): boolean;
|
|
43
43
|
get runFunction(): ActionRunFnType<Item, Service, EditorItem, SubmitReturnItem>;
|
|
44
44
|
get hasFetchFunction(): boolean;
|
|
45
|
-
get fetchFunction():
|
|
45
|
+
get fetchFunction(): ActionEditorRunFnType<Item, ParentEditorItem, Service, FetchInputItem, EditorItem> | undefined;
|
|
46
46
|
get hasSubmitFunction(): boolean;
|
|
47
|
-
get submitFunction():
|
|
47
|
+
get submitFunction(): ActionEditorRunFnType<Item, ParentEditorItem, Service, EditorItem, SubmitReturnItem> | undefined;
|
|
48
48
|
get editorActions(): ActionDescriptorInst<any, any, EditorItem, any, EditorItem>[];
|
|
49
49
|
get editorComponent(): Type<any> | undefined;
|
|
50
50
|
get resubmitEnabled(): boolean | undefined;
|
|
@@ -53,9 +53,9 @@ export declare class ActionEditorDescriptorInst<Item, Service = any, EditorItem
|
|
|
53
53
|
withEditorTitle(title: string | null, params?: any): this;
|
|
54
54
|
withDialogSize(size?: StyleSizeEnum): this;
|
|
55
55
|
withDialogClassName(className: string): this;
|
|
56
|
-
withRunFunction(fn:
|
|
57
|
-
withFetchFunction(fn:
|
|
58
|
-
withSubmitFunction(fn:
|
|
56
|
+
withRunFunction(fn: ActionEditorRunFnType<Item, ParentEditorItem, Service, EditorItem, SubmitReturnItem>): this;
|
|
57
|
+
withFetchFunction(fn: ActionEditorRunFnType<Item, ParentEditorItem, Service, FetchInputItem, EditorItem>): this;
|
|
58
|
+
withSubmitFunction(fn: ActionEditorRunFnType<Item, ParentEditorItem, Service, EditorItem, SubmitReturnItem>): this;
|
|
59
59
|
/**
|
|
60
60
|
* Override default notifications setup. Notifications can either be overridden with custom text or turned on/off.
|
|
61
61
|
*
|
|
@@ -82,8 +82,8 @@ export declare class ActionEditorDescriptorInst<Item, Service = any, EditorItem
|
|
|
82
82
|
*/
|
|
83
83
|
withResubmit(enabled?: boolean, refetch?: boolean): this;
|
|
84
84
|
withUnsavedChangesConfirmation(unsavedChangesConfirmation?: boolean): this;
|
|
85
|
-
copyFieldsTo(descriptor: ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem>): ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem>;
|
|
86
|
-
copy(): ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem>;
|
|
85
|
+
copyFieldsTo(descriptor: ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem, ParentEditorItem>): ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem, ParentEditorItem>;
|
|
86
|
+
copy(): ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem, ParentEditorItem>;
|
|
87
87
|
}
|
|
88
88
|
export declare class ActionEditorSubmitDescriptorInst<Model, EditorModel> extends ActionDescriptorInst<Model, undefined, EditorModel, EditorModel, EditorModel> {
|
|
89
89
|
private readonly _submitType;
|
|
@@ -96,10 +96,10 @@ export declare class ActionEditorSubmitDescriptorInst<Model, EditorModel> extend
|
|
|
96
96
|
* @param editorAction
|
|
97
97
|
* @param submitType
|
|
98
98
|
*/
|
|
99
|
-
export declare function actionEditorSubmit<Model, EditorModel>(editorAction: ActionEditorDescriptorInst<Model, any, EditorModel, any, any, any>, submitType?: ActionEditorSubmitTypeEnum): ActionEditorSubmitDescriptorInst<Model, EditorModel>;
|
|
99
|
+
export declare function actionEditorSubmit<Model, EditorModel>(editorAction: ActionEditorDescriptorInst<Model, any, EditorModel, any, any, any, any>, submitType?: ActionEditorSubmitTypeEnum): ActionEditorSubmitDescriptorInst<Model, EditorModel>;
|
|
100
100
|
/**
|
|
101
101
|
* creates secondary button with text button style
|
|
102
102
|
* @param editorAction
|
|
103
103
|
* @param submitType
|
|
104
104
|
*/
|
|
105
|
-
export declare function actionEditorCancel<Model, EditorModel>(editorAction: ActionEditorDescriptorInst<Model, any, EditorModel, any, any, any>, submitType?: ActionEditorSubmitTypeEnum): ActionEditorSubmitDescriptorInst<Model, EditorModel>;
|
|
105
|
+
export declare function actionEditorCancel<Model, EditorModel>(editorAction: ActionEditorDescriptorInst<Model, any, EditorModel, any, any, any, any>, submitType?: ActionEditorSubmitTypeEnum): ActionEditorSubmitDescriptorInst<Model, EditorModel>;
|
|
@@ -41,8 +41,8 @@ export declare class ActionDescriptorInst<Item, Service = any, RunInputItem = It
|
|
|
41
41
|
protected _runConfirmation?: ActionConfirmation<Item, RunInputItem, Service>;
|
|
42
42
|
protected _runNotificationOnSuccess?: ActionNotificationType | boolean;
|
|
43
43
|
protected _runNotificationOnError?: ActionNotificationType | boolean;
|
|
44
|
-
protected _afterRunAction?: AfterRunActionType<RunReturnItem> | ((ctx: IActionContext<Item, RunInputItem, any>) => AfterRunActionType<RunReturnItem>);
|
|
45
|
-
protected _onRunErrorAction?: OnErrorActionType<RunInputItem> | ((ctx: IActionContext<Item, RunInputItem, any>) => OnErrorActionType<RunInputItem>);
|
|
44
|
+
protected _afterRunAction?: AfterRunActionType<RunReturnItem> | ((ctx: IActionContext<Item, RunInputItem, any, any>) => AfterRunActionType<RunReturnItem>);
|
|
45
|
+
protected _onRunErrorAction?: OnErrorActionType<RunInputItem> | ((ctx: IActionContext<Item, RunInputItem, any, any>) => OnErrorActionType<RunInputItem>);
|
|
46
46
|
protected _permissions?: APermissions;
|
|
47
47
|
protected _button?: IActionButtonDescriptor;
|
|
48
48
|
protected _hasItemsSelection: boolean;
|
|
@@ -69,8 +69,8 @@ export declare class ActionDescriptorInst<Item, Service = any, RunInputItem = It
|
|
|
69
69
|
get runConfirmation(): ActionConfirmation<Item, RunInputItem, Service> | undefined;
|
|
70
70
|
get runNotificationOnSuccess(): boolean | ActionNotificationType | undefined;
|
|
71
71
|
get runNotificationOnError(): boolean | ActionNotificationType | undefined;
|
|
72
|
-
get afterRunAction(): AfterRunActionType<RunReturnItem> | ((ctx: IActionContext<Item, RunInputItem, any>) => AfterRunActionType<RunReturnItem>) | undefined;
|
|
73
|
-
get onRunErrorAction(): OnErrorActionType<RunInputItem> | ((ctx: IActionContext<Item, RunInputItem, any>) => OnErrorActionType<RunInputItem>) | undefined;
|
|
72
|
+
get afterRunAction(): AfterRunActionType<RunReturnItem> | ((ctx: IActionContext<Item, RunInputItem, any, any>) => AfterRunActionType<RunReturnItem>) | undefined;
|
|
73
|
+
get onRunErrorAction(): OnErrorActionType<RunInputItem> | ((ctx: IActionContext<Item, RunInputItem, any, any>) => OnErrorActionType<RunInputItem>) | undefined;
|
|
74
74
|
get permissions(): APermissions | undefined;
|
|
75
75
|
get tableviewCategory(): string | undefined;
|
|
76
76
|
get hasItemsSelection(): boolean;
|
|
@@ -99,8 +99,8 @@ export declare class ActionDescriptorInst<Item, Service = any, RunInputItem = It
|
|
|
99
99
|
runOnSuccess?: ActionNotificationType | boolean;
|
|
100
100
|
runOnError?: ActionNotificationType | boolean;
|
|
101
101
|
} | boolean): this;
|
|
102
|
-
withAfterRunAction(action?: AfterRunActionType<RunReturnItem> | ((ctx: IActionContext<Item, RunInputItem, any>) => AfterRunActionType<RunReturnItem>)): this;
|
|
103
|
-
withOnRunErrorAction(action?: OnErrorActionType<RunInputItem> | ((ctx: IActionContext<Item, RunInputItem, any>) => OnErrorActionType<RunInputItem>)): this;
|
|
102
|
+
withAfterRunAction(action?: AfterRunActionType<RunReturnItem> | ((ctx: IActionContext<Item, RunInputItem, any, any>) => AfterRunActionType<RunReturnItem>)): this;
|
|
103
|
+
withOnRunErrorAction(action?: OnErrorActionType<RunInputItem> | ((ctx: IActionContext<Item, RunInputItem, any, any>) => OnErrorActionType<RunInputItem>)): this;
|
|
104
104
|
withPermissions(permissions: APermissions): this;
|
|
105
105
|
withTableviewCategory(category: string): this;
|
|
106
106
|
withButtonOpts(button?: IActionButtonDescriptor): this;
|
|
@@ -14,7 +14,7 @@ import { ActionDescriptorInst } from './action.descriptor';
|
|
|
14
14
|
* @param {ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight} [opts.position] - The position of action on editor.
|
|
15
15
|
* @return {ActionDescriptorInst<Model, Service, EditorModel, Model, EditorModel>} - An instance representing the configured action descriptor for the specified editor and model.
|
|
16
16
|
*/
|
|
17
|
-
export declare function actionOnEditor<Model, EditorModel, Service = undefined>(actionName: string, editor: EditorDescriptorInst<EditorModel>, opts?: {
|
|
17
|
+
export declare function actionOnEditor<Model, EditorModel, Service = undefined>(actionName: string, editor: EditorDescriptorInst<EditorModel, any>, opts?: {
|
|
18
18
|
model?: ModelDescriptor<Model>;
|
|
19
19
|
serviceProvider?: ActionProviderType<Model, Service>;
|
|
20
20
|
position?: ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight;
|
|
@@ -18,4 +18,4 @@ export declare function actionEditorOnEditor<EditorModel, ParentEditor, Model =
|
|
|
18
18
|
model?: ModelDescriptor<Model>;
|
|
19
19
|
serviceProvider?: ActionEditorProviderType<Model, Service>;
|
|
20
20
|
position?: ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight;
|
|
21
|
-
}): ActionEditorDescriptorInst<Model, Service, EditorModel, ParentEditor, EditorModel, ParentEditor>;
|
|
21
|
+
}): ActionEditorDescriptorInst<Model, Service, EditorModel, ParentEditor, EditorModel, ParentEditor, ParentEditor>;
|
|
@@ -16,11 +16,11 @@ import { ActionEditorDescriptorInst } from './action-editor.descriptor';
|
|
|
16
16
|
* @param {ActionPositionEnum.RowInline | ActionPositionEnum.RowClick} [opts.position] - The position where the action should be displayed on the table row.
|
|
17
17
|
* @return {ActionEditorDescriptorInst<Model, Service, EditorModel, TableModel, EditorModel, TableModel>} The configured action editor descriptor instance.
|
|
18
18
|
*/
|
|
19
|
-
export declare function actionEditorOnTableRow<EditorModel, TableModel, Model = EditorModel, Service = undefined>(actionName: string, editor: EditorDescriptorInst<EditorModel,
|
|
19
|
+
export declare function actionEditorOnTableRow<EditorModel, ParentEditorItem, TableModel, Model = EditorModel, Service = undefined>(actionName: string, editor: EditorDescriptorInst<EditorModel, ParentEditorItem>, table: TableDescriptorInst<TableModel, any, any>, opts?: {
|
|
20
20
|
model?: ModelDescriptor<Model>;
|
|
21
21
|
serviceProvider?: ActionEditorProviderType<Model, Service>;
|
|
22
22
|
position?: ActionPositionEnum.RowInline | ActionPositionEnum.RowClick;
|
|
23
|
-
}): ActionEditorDescriptorInst<Model, Service, EditorModel, TableModel, EditorModel, TableModel>;
|
|
23
|
+
}): ActionEditorDescriptorInst<Model, Service, EditorModel, TableModel, EditorModel, TableModel, ParentEditorItem>;
|
|
24
24
|
/**
|
|
25
25
|
* Creates and returns an action editor descriptor configured with the given parameters.
|
|
26
26
|
* This is used to define an action editor positioned relative to a table.
|
|
@@ -33,8 +33,8 @@ export declare function actionEditorOnTableRow<EditorModel, TableModel, Model =
|
|
|
33
33
|
* @param {ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight | ActionPositionEnum.TableHeader} [opts.position] - The position of the action on the table.
|
|
34
34
|
* @return {ActionEditorDescriptorInst<Model, Service, EditorModel, undefined, EditorModel, undefined>} The configured action editor descriptor instance.
|
|
35
35
|
*/
|
|
36
|
-
export declare function actionEditorOnTableTop<EditorModel, Model = EditorModel, Service = undefined>(actionName: string, editor: EditorDescriptorInst<EditorModel,
|
|
36
|
+
export declare function actionEditorOnTableTop<EditorModel, ParentEditorItem, Model = EditorModel, Service = undefined>(actionName: string, editor: EditorDescriptorInst<EditorModel, ParentEditorItem>, opts?: {
|
|
37
37
|
model?: ModelDescriptor<Model>;
|
|
38
38
|
serviceProvider?: ActionEditorProviderType<Model, Service>;
|
|
39
39
|
position?: ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight | ActionPositionEnum.TableHeader;
|
|
40
|
-
}): ActionEditorDescriptorInst<Model, Service, EditorModel, undefined, EditorModel, undefined>;
|
|
40
|
+
}): ActionEditorDescriptorInst<Model, Service, EditorModel, undefined, EditorModel, undefined, ParentEditorItem>;
|
|
@@ -2,7 +2,7 @@ import { InputSignal, OutputEmitterRef } from '@angular/core';
|
|
|
2
2
|
import { ActionData, ActionParameters, IdType } from '@mediusinc/mng-commons/core';
|
|
3
3
|
import { ActionDescriptorInst } from '../descriptors/action.descriptor';
|
|
4
4
|
export interface IActionComponent<Item = any, Service = undefined> {
|
|
5
|
-
action: InputSignal<ActionDescriptorInst<Item, Service>>;
|
|
5
|
+
action: InputSignal<ActionDescriptorInst<Item, Service, any, any, any>>;
|
|
6
6
|
item: InputSignal<Item>;
|
|
7
7
|
itemId: InputSignal<IdType>;
|
|
8
8
|
actionData: InputSignal<ActionData>;
|
|
@@ -12,5 +12,5 @@ export interface ActionConfirmation<Model, ParametersItem, Service> {
|
|
|
12
12
|
configMapFn?: ConfigurationConfigMapFn<ParametersItem>;
|
|
13
13
|
shouldShowFn?: ConfigurationShouldShowFn<Model, ParametersItem, Service>;
|
|
14
14
|
}
|
|
15
|
-
export type ConfigurationConfigMapFn<Item> = (ctx: IActionContext<any, Item, any>, confirmConfig: Confirmation) => Confirmation;
|
|
16
|
-
export type ConfigurationShouldShowFn<Item, ParametersItem, Service> = (ctx: IActionContext<Item, ParametersItem, Service>) => boolean;
|
|
15
|
+
export type ConfigurationConfigMapFn<Item> = (ctx: IActionContext<any, Item, any, any, any>, confirmConfig: Confirmation) => Confirmation;
|
|
16
|
+
export type ConfigurationShouldShowFn<Item, ParametersItem, Service> = (ctx: IActionContext<Item, ParametersItem, Service, any, any>) => boolean;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ItemOrObservable, Nullable } from '@mediusinc/mng-commons/core';
|
|
2
2
|
import { ActionContextValidation } from './execution/action-context-validation.model';
|
|
3
|
-
import { IActionContext } from './execution/action-context.model';
|
|
3
|
+
import { IActionContext, IActionEditorContext } from './execution/action-context.model';
|
|
4
4
|
export type ActionRunFnType<Item, Service = undefined, InputItem = Item, ReturnItem = Item, Return = ItemOrObservable<Nullable<ReturnItem>>> = (ctx: IActionContext<Item, InputItem, Service>) => Return;
|
|
5
|
+
export type ActionEditorRunFnType<Item, ParentItem, Service = undefined, InputItem = Item, ReturnItem = Item, Return = ItemOrObservable<Nullable<ReturnItem>>> = (ctx: IActionEditorContext<Item, ParentItem, InputItem, Service>) => Return;
|
|
5
6
|
export type ActionValidationFnType<Item, Service = undefined, InputItem = Item, Return = ItemOrObservable<boolean>> = (ctx: ActionContextValidation<Item, InputItem, Service>) => Return;
|
|
6
7
|
export type ActionNotificationType = {
|
|
7
8
|
title?: string;
|
|
@@ -10,7 +10,7 @@ import { IViewContainer } from './view-container.model';
|
|
|
10
10
|
export interface IActionContext<Item, ParametersItem, Service = undefined, Instance extends IActionInstance<Item, Service> = IActionInstance<Item, Service>, ViewContainer extends IViewContainer<Item, Service, Instance> = IViewContainer<Item, Service, Instance>> {
|
|
11
11
|
contextLongName: string;
|
|
12
12
|
instance: Instance;
|
|
13
|
-
parameters: ActionParameters<ParametersItem>;
|
|
13
|
+
parameters: ActionParameters<ParametersItem, ParametersItem, ParametersItem, ParametersItem>;
|
|
14
14
|
functionName: 'run' | 'fetch' | 'submit';
|
|
15
15
|
serviceInstance: Service;
|
|
16
16
|
dataProvider?: IDataProvider<Item, Service>;
|
|
@@ -22,3 +22,4 @@ export interface IActionContext<Item, ParametersItem, Service = undefined, Insta
|
|
|
22
22
|
execution$: Observable<Item | null | undefined>;
|
|
23
23
|
executionIsRunning$: Observable<boolean>;
|
|
24
24
|
}
|
|
25
|
+
export type IActionEditorContext<Item, ParentItem, ParametersItem, Service = undefined, Instance extends IActionInstance<Item, Service> = IActionInstance<Item, Service>, ViewContainer extends IViewContainer<Item, Service, Instance> = IViewContainer<Item, Service, Instance>> = IActionContext<Item, ParametersItem, Service, Instance, ViewContainer>;
|
|
@@ -8,7 +8,7 @@ import { IActionInstance } from './action-instance.model';
|
|
|
8
8
|
export interface IViewContainer<Item, Service, ActionInstance extends IActionInstance<Item, Service> = IActionInstance<Item, Service>> {
|
|
9
9
|
dataProvider: WritableSignal<IDataProvider<Item, Service> | undefined>;
|
|
10
10
|
routeTriggeredActionInstance: WritableSignal<ActionInstance | undefined>;
|
|
11
|
-
actions: WritableSignal<Array<ActionDescriptorInst<
|
|
11
|
+
actions: WritableSignal<Array<ActionDescriptorInst<any>>>;
|
|
12
12
|
tableReload$: Observable<TableReloadEvent>;
|
|
13
13
|
editorReset$: Observable<EditorResetEvent<Item>>;
|
|
14
14
|
editorClose$: Observable<ViewContainerEditorCloseEvent<Item>>;
|
|
@@ -43,7 +43,7 @@ export declare class FieldManyEditorDescriptor<FieldModel, EditorModel, FieldVal
|
|
|
43
43
|
constructor(property: string, tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any, EditorModel, FieldModel, FieldModel, FieldModel, FieldModel>);
|
|
44
44
|
get fieldType(): FieldManyEditorTypeEnum;
|
|
45
45
|
get fieldActions(): FieldManyEditorActionEnum[];
|
|
46
|
-
get actions(): ActionDescriptorInst<
|
|
46
|
+
get actions(): ActionDescriptorInst<any, any, any, any, any>[];
|
|
47
47
|
get tableviewDescriptor(): TableviewDescriptorInst<FieldModel, any, any, EditorModel, FieldModel, FieldModel, FieldModel, FieldModel>;
|
|
48
48
|
get tableDescriptor(): TableDescriptorInst<FieldModel, any, any>;
|
|
49
49
|
get editorForCreate(): import("@mediusinc/mng-commons/tableview/api").EditorDescriptorInst<FieldModel, EditorModel>;
|
|
@@ -51,6 +51,6 @@ export declare class FieldManyEditorDescriptor<FieldModel, EditorModel, FieldVal
|
|
|
51
51
|
get editorForUpdate(): import("@mediusinc/mng-commons/tableview/api").EditorDescriptorInst<FieldModel, EditorModel>;
|
|
52
52
|
withFieldAction(action: FieldManyEditorActionEnum): this;
|
|
53
53
|
withFieldActions(actions: FieldManyEditorActionEnum[]): this;
|
|
54
|
-
withAction(action: ActionDescriptorInst<
|
|
54
|
+
withAction(action: ActionDescriptorInst<any>): this;
|
|
55
55
|
copy(): FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel>;
|
|
56
56
|
}
|
|
@@ -28,17 +28,17 @@ export type FormEditorGetFormValueOpts = {
|
|
|
28
28
|
omitSetters?: boolean;
|
|
29
29
|
};
|
|
30
30
|
export interface IFormEditorComponent<Item, ParentItem = any> {
|
|
31
|
-
descriptor: InputSignal<EditorDescriptorInst<Item>>;
|
|
32
|
-
isFormDisabled: InputSignalWithTransform<boolean, unknown>;
|
|
33
|
-
formMessages: WritableSignal<ToastMessageOptions[]>;
|
|
34
31
|
get form(): FormGroup<{
|
|
35
32
|
[K in keyof Item]: AbstractControl<Item[K]>;
|
|
36
33
|
}>;
|
|
37
34
|
get formUnsafe(): UntypedFormGroup;
|
|
35
|
+
get formlyInitialItem(): any;
|
|
38
36
|
get formlyOptions(): FormlyFormOptions & CommonsFormlyFormOptions<Item>;
|
|
39
37
|
get formlyFields(): FormlyFieldConfig[];
|
|
40
|
-
get formlyInitialItem(): any;
|
|
41
38
|
get parent(): IFormEditorComponent<ParentItem> | undefined;
|
|
39
|
+
descriptor: InputSignal<EditorDescriptorInst<Item>>;
|
|
40
|
+
isFormDisabled: InputSignalWithTransform<boolean, unknown>;
|
|
41
|
+
formMessages: WritableSignal<ToastMessageOptions[]>;
|
|
42
42
|
submit(): void;
|
|
43
43
|
getFormValue(opts?: FormEditorGetFormValueOpts): Item;
|
|
44
44
|
resetFormModel(item?: Item, opts?: FormEditorResetFormModelOpts): void;
|
|
@@ -5,6 +5,7 @@ import { ToastMessageOptions } from 'primeng/api';
|
|
|
5
5
|
import { IdType } from '@mediusinc/mng-commons/core';
|
|
6
6
|
import { CommonsFormlyFormOptions, EditorDescriptorInst, FormEditorPatchFieldValueOpts, FormEditorResetFieldValueOpts, FormEditorResetFormModelOpts, FormEditorSetFieldValueOpts, FormEditorSubmitEvent, IFormEditorComponent } from '@mediusinc/mng-commons/tableview/api';
|
|
7
7
|
import { EditorAutoSavePreviewModel, EditorAutoSaveStatus } from '../../models/editor-auto-save-preview.model';
|
|
8
|
+
import { FormEditorService } from '../../services/form-editor.service';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
export declare class FormEditorComponent<Item = any, ParentItem = any> implements IFormEditorComponent<Item, ParentItem>, OnInit, AfterViewInit, OnDestroy {
|
|
10
11
|
private readonly destroyRef;
|
|
@@ -14,7 +15,7 @@ export declare class FormEditorComponent<Item = any, ParentItem = any> implement
|
|
|
14
15
|
private readonly commons;
|
|
15
16
|
readonly cmpTypeName = "FormEditorComponent";
|
|
16
17
|
private readonly logger;
|
|
17
|
-
|
|
18
|
+
readonly formService: FormEditorService<Item, ParentItem>;
|
|
18
19
|
private readonly commonsStorageService;
|
|
19
20
|
private readonly router;
|
|
20
21
|
private autoSaveStorageKeyCompInit;
|
|
@@ -7,8 +7,8 @@ export declare class FormlyFieldTableDialogFormComponent<T = any, ET = any> exte
|
|
|
7
7
|
private readonly injector;
|
|
8
8
|
protected readonly labelInfoTooltipDefaultIcon = "pi pi-info-circle";
|
|
9
9
|
items: import("@angular/core").WritableSignal<T[]>;
|
|
10
|
-
actions: Array<ActionDescriptorInst<
|
|
11
|
-
toolbarRightActions: Array<ActionDescriptorInst<
|
|
10
|
+
actions: Array<ActionDescriptorInst<any>>;
|
|
11
|
+
toolbarRightActions: Array<ActionDescriptorInst<any>>;
|
|
12
12
|
private isDisabledSubject;
|
|
13
13
|
private isEnabled$;
|
|
14
14
|
disableRowReorder: import("@angular/core").Signal<boolean | undefined>;
|
package/tableview/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './action/components/route/action-route.component';
|
|
|
5
5
|
export * from './action/components/table/action-table.component';
|
|
6
6
|
export * from './action/guards/unsaved-changes.guard';
|
|
7
7
|
export * from './action/helpers/i18n';
|
|
8
|
+
export * from './action/helpers/inject';
|
|
8
9
|
export * from './action/helpers/notification';
|
|
9
10
|
export * from './action/helpers/styles';
|
|
10
11
|
export * from './action/models/execution/action-context.model';
|
|
@@ -2,16 +2,18 @@ import { OnInit, Signal, TemplateRef } from '@angular/core';
|
|
|
2
2
|
import { DataListParams, TemplateDirective } from '@mediusinc/mng-commons/core';
|
|
3
3
|
import { TableLoadEvent } from '@mediusinc/mng-commons/table/api';
|
|
4
4
|
import { ActionDescriptorInst, ITableviewDataProvider, TableviewDescriptorInst } from '@mediusinc/mng-commons/tableview/api';
|
|
5
|
+
import { ActionTableComponent } from '../../../action/components/table/action-table.component';
|
|
5
6
|
import { ViewContainer } from '../../../action/services/view-container.service';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
export declare class TableviewComponent<Item = any, Service = undefined, Sorts = keyof Item, Filters extends keyof any = keyof Item> implements OnInit {
|
|
8
9
|
readonly viewContainer: ViewContainer<any, any> | null;
|
|
10
|
+
actionTable: Signal<ActionTableComponent<Item, Service, Sorts, Filters>>;
|
|
9
11
|
descriptor: import("@angular/core").InputSignal<TableviewDescriptorInst<Item, Sorts, Filters, any, any, any, any, any>>;
|
|
10
12
|
dataProvider: import("@angular/core").InputSignal<ITableviewDataProvider<Item, Service, Sorts, Filters, any, any, any, any> | undefined>;
|
|
11
13
|
actions: import("@angular/core").InputSignal<ActionDescriptorInst<any, any, any, any, any>[]>;
|
|
12
|
-
toolbarLeftActions: Signal<ActionDescriptorInst<
|
|
13
|
-
toolbarRightActions: Signal<ActionDescriptorInst<
|
|
14
|
-
tableActions: Signal<ActionDescriptorInst<
|
|
14
|
+
toolbarLeftActions: Signal<ActionDescriptorInst<any, any, any, any, any>[]>;
|
|
15
|
+
toolbarRightActions: Signal<ActionDescriptorInst<any, any, any, any, any>[]>;
|
|
16
|
+
tableActions: Signal<ActionDescriptorInst<any, any, any, any, any>[]>;
|
|
15
17
|
tableParams: import("@angular/core").WritableSignal<DataListParams<string, string> | undefined>;
|
|
16
18
|
hasItemSelectionAction: Signal<boolean>;
|
|
17
19
|
selectedItems: import("@angular/core").WritableSignal<Item[]>;
|
package/version-info.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediusinc/mng-commons",
|
|
3
|
-
"version": "6.0.
|
|
4
|
-
"tag": "v6.0.
|
|
3
|
+
"version": "6.1.0-rc.1",
|
|
4
|
+
"tag": "v6.1.0-rc.1",
|
|
5
5
|
"distance": 0,
|
|
6
|
-
"hash": "
|
|
6
|
+
"hash": "cc12421a",
|
|
7
7
|
"dirty": true,
|
|
8
|
-
"semver": "6.0.
|
|
8
|
+
"semver": "6.1.0-rc.1+0.gcc12421a.dirty",
|
|
9
9
|
"buildTimestamp": null,
|
|
10
|
-
"raw": "v6.
|
|
10
|
+
"raw": "v6.1.0-rc.1-cc12421a-dirty"
|
|
11
11
|
}
|