@mediusinc/mng-commons 5.1.0 → 5.2.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/esm2022/table/api/descriptors/table.descriptor.mjs +11 -1
- package/esm2022/table/components/table/table.component.mjs +15 -12
- package/esm2022/table/services/data-list.service.mjs +9 -3
- package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +7 -3
- package/esm2022/tableview/action/components/table/action-table.component.mjs +8 -3
- package/esm2022/tableview/action/models/execution/action-context.model.mjs +9 -1
- package/esm2022/tableview/action/services/action-executor.service.mjs +69 -12
- package/esm2022/tableview/api/action/descriptors/action-editor.descriptor.mjs +2 -1
- package/esm2022/tableview/api/action/descriptors/action.descriptor.mjs +1 -1
- package/esm2022/tableview/api/action/models/action-descriptor.types.mjs +1 -1
- package/esm2022/tableview/api/editor/models/form-editor.event.mjs +2 -1
- package/esm2022/tableview/api/editor/models/form-editor.interface.mjs +1 -1
- package/esm2022/tableview/api/editor/models/formly-options.model.mjs +1 -1
- package/esm2022/tableview/editor/components/editor/form-editor.component.mjs +16 -10
- package/esm2022/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +2 -6
- package/esm2022/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.mjs +2 -3
- package/esm2022/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +2 -6
- package/esm2022/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.mjs +2 -3
- package/esm2022/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +3 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +21 -9
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +17 -6
- package/esm2022/tableview/editor/components/formly/fields/formly-field-type.abstract.component.mjs +18 -3
- package/esm2022/tableview/editor/services/form-editor.service.mjs +3 -3
- package/esm2022/tableview/tableview/components/tableview/tableview.component.mjs +2 -2
- package/fesm2022/mediusinc-mng-commons-table-api.mjs +10 -0
- package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table.mjs +22 -13
- package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +2 -0
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +149 -48
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/package.json +7 -7
- package/table/api/descriptors/table.descriptor.d.ts +3 -0
- package/table/components/table/table.component.d.ts +7 -2
- package/table/services/data-list.service.d.ts +5 -2
- package/tableview/action/components/action/action.component.d.ts +1 -1
- package/tableview/action/components/editor/action-editor.component.d.ts +1 -1
- package/tableview/action/components/editor/injector-context/action-editor-injector-context.component.d.ts +7 -5
- package/tableview/action/components/localization/data-language-dropdown.component.d.ts +1 -1
- package/tableview/action/components/table/action-table.component.d.ts +8 -4
- package/tableview/action/models/execution/action-context.model.d.ts +7 -0
- package/tableview/action/services/action-executor.service.d.ts +0 -1
- package/tableview/action/services/view-container.service.d.ts +1 -1
- package/tableview/api/action/descriptors/action-editor.descriptor.d.ts +2 -2
- package/tableview/api/action/descriptors/action.descriptor.d.ts +38 -38
- package/tableview/api/action/models/action-descriptor.types.d.ts +2 -2
- package/tableview/api/editor/descriptors/field-many.descriptor.d.ts +1 -1
- package/tableview/api/editor/models/form-editor.event.d.ts +4 -0
- package/tableview/api/editor/models/form-editor.interface.d.ts +4 -1
- package/tableview/api/editor/models/formly-options.model.d.ts +4 -4
- package/tableview/editor/components/editor/form-editor.component.d.ts +6 -2
- package/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.d.ts +0 -1
- package/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.d.ts +0 -1
- package/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.d.ts +0 -1
- package/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.d.ts +0 -1
- package/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +0 -1
- package/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +3 -1
- package/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +3 -1
- package/tableview/editor/components/formly/fields/formly-field-type.abstract.component.d.ts +5 -1
- package/tableview/editor/services/form-editor.service.d.ts +2 -2
- package/tableview/tableview/components/tableview/tableview.component.d.ts +4 -4
- package/version-info.json +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediusinc/mng-commons",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0-rc.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/animations": "^17.3.0 || ^18.0.0",
|
|
6
6
|
"@angular/common": "^17.3.0 || ^18.0.0",
|
|
@@ -44,18 +44,18 @@
|
|
|
44
44
|
"esm": "./esm2022/filter/mediusinc-mng-commons-filter.mjs",
|
|
45
45
|
"default": "./fesm2022/mediusinc-mng-commons-filter.mjs"
|
|
46
46
|
},
|
|
47
|
-
"./form": {
|
|
48
|
-
"types": "./form/index.d.ts",
|
|
49
|
-
"esm2022": "./esm2022/form/mediusinc-mng-commons-form.mjs",
|
|
50
|
-
"esm": "./esm2022/form/mediusinc-mng-commons-form.mjs",
|
|
51
|
-
"default": "./fesm2022/mediusinc-mng-commons-form.mjs"
|
|
52
|
-
},
|
|
53
47
|
"./model": {
|
|
54
48
|
"types": "./model/index.d.ts",
|
|
55
49
|
"esm2022": "./esm2022/model/mediusinc-mng-commons-model.mjs",
|
|
56
50
|
"esm": "./esm2022/model/mediusinc-mng-commons-model.mjs",
|
|
57
51
|
"default": "./fesm2022/mediusinc-mng-commons-model.mjs"
|
|
58
52
|
},
|
|
53
|
+
"./form": {
|
|
54
|
+
"types": "./form/index.d.ts",
|
|
55
|
+
"esm2022": "./esm2022/form/mediusinc-mng-commons-form.mjs",
|
|
56
|
+
"esm": "./esm2022/form/mediusinc-mng-commons-form.mjs",
|
|
57
|
+
"default": "./fesm2022/mediusinc-mng-commons-form.mjs"
|
|
58
|
+
},
|
|
59
59
|
"./table": {
|
|
60
60
|
"types": "./table/index.d.ts",
|
|
61
61
|
"esm2022": "./esm2022/table/mediusinc-mng-commons-table.mjs",
|
|
@@ -39,6 +39,7 @@ export declare class TableDescriptorInst<TableModel, Sorts = keyof TableModel, F
|
|
|
39
39
|
private _rowExpandable;
|
|
40
40
|
private _rowExpandableColSpan;
|
|
41
41
|
private _rowExpandableProperty?;
|
|
42
|
+
private _rowReorderable;
|
|
42
43
|
constructor(model: ModelDescriptor<TableModel>, autoGenerated?: boolean);
|
|
43
44
|
get identifier(): string | undefined;
|
|
44
45
|
get trackProperty(): string | undefined;
|
|
@@ -68,6 +69,7 @@ export declare class TableDescriptorInst<TableModel, Sorts = keyof TableModel, F
|
|
|
68
69
|
get headerClassName(): string | undefined;
|
|
69
70
|
get isLocalized(): boolean;
|
|
70
71
|
get localizationLocaleProperty(): string | undefined;
|
|
72
|
+
get rowReorderable(): boolean;
|
|
71
73
|
get rowExpandable(): boolean;
|
|
72
74
|
get rowExpandableColSpan(): number;
|
|
73
75
|
/**
|
|
@@ -158,6 +160,7 @@ export declare class TableDescriptorInst<TableModel, Sorts = keyof TableModel, F
|
|
|
158
160
|
withLocalized(): this;
|
|
159
161
|
withLocalizationLocaleProperty(localizationLocaleProperty: string): this;
|
|
160
162
|
withRowExpandable(property?: keyof TableModel, colSpan?: number): this;
|
|
163
|
+
withRowReorderable(reordable?: boolean): this;
|
|
161
164
|
protected copyFieldsTo(obj: TableDescriptorInst<any, any, any>): void;
|
|
162
165
|
copy(): TableDescriptorInst<TableModel, Sorts, Filters>;
|
|
163
166
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnDestroy, Signal, TemplateRef, Type } from '@angular/core';
|
|
2
2
|
import { MultiSelectChangeEvent } from 'primeng/multiselect';
|
|
3
|
-
import { Table, TableColumnReorderEvent, TableLazyLoadEvent } from 'primeng/table';
|
|
3
|
+
import { Table, TableColumnReorderEvent, TableLazyLoadEvent, TableRowReorderEvent } from 'primeng/table';
|
|
4
4
|
import { ComponentDirective, DataListResult, TemplateDirective } from '@mediusinc/mng-commons/core';
|
|
5
5
|
import { ColumnDescriptor, ITableDataProvider, TableCellClickEvent, TableDescriptorInst, TableLoadEvent } from '@mediusinc/mng-commons/table/api';
|
|
6
6
|
import { ColumnWithPreferences } from '../../models/column-preferences.model';
|
|
@@ -26,7 +26,10 @@ export declare class TableComponent<Item = any, Service = undefined, Sorts = any
|
|
|
26
26
|
cellClickEnabled: import("@angular/core").InputSignal<boolean>;
|
|
27
27
|
selectionMode: import("@angular/core").InputSignal<"single" | "multiple">;
|
|
28
28
|
selectionEnabled: import("@angular/core").InputSignal<boolean>;
|
|
29
|
+
rowReorderEnabledInput: import("@angular/core").InputSignal<boolean>;
|
|
30
|
+
rowReorderEnabled: Signal<boolean>;
|
|
29
31
|
columnLastMinWidth: import("@angular/core").InputSignal<number | undefined>;
|
|
32
|
+
columnsColspan: Signal<number>;
|
|
30
33
|
captionComponent: import("@angular/core").InputSignal<Type<any> | undefined>;
|
|
31
34
|
columnCustomLastComponent: import("@angular/core").InputSignal<Type<any> | undefined>;
|
|
32
35
|
globalFilterFieldsInput: import("@angular/core").InputSignal<string[] | undefined>;
|
|
@@ -38,6 +41,7 @@ export declare class TableComponent<Item = any, Service = undefined, Sorts = any
|
|
|
38
41
|
selectionChange: import("@angular/core").OutputEmitterRef<Item[]>;
|
|
39
42
|
captionComponentInstance: import("@angular/core").OutputEmitterRef<any>;
|
|
40
43
|
columnCustomLastComponentInstance: import("@angular/core").OutputEmitterRef<any>;
|
|
44
|
+
rowReorder: import("@angular/core").OutputEmitterRef<TableRowReorderEvent>;
|
|
41
45
|
templates: Signal<readonly TemplateDirective[]>;
|
|
42
46
|
components: Signal<readonly ComponentDirective<any>[]>;
|
|
43
47
|
primeTable: Signal<Table>;
|
|
@@ -85,6 +89,7 @@ export declare class TableComponent<Item = any, Service = undefined, Sorts = any
|
|
|
85
89
|
onTableFilter(event: any): void;
|
|
86
90
|
onCellClick(event: Event, col: ColumnDescriptor<any, Item>, item: Item, idx: number): void;
|
|
87
91
|
onSelectionChange(event: Array<Item>): void;
|
|
92
|
+
onRowReorder(event: TableRowReorderEvent): void;
|
|
88
93
|
/**
|
|
89
94
|
* Method is called on column resize
|
|
90
95
|
* @param element event's element
|
|
@@ -106,5 +111,5 @@ export declare class TableComponent<Item = any, Service = undefined, Sorts = any
|
|
|
106
111
|
*/
|
|
107
112
|
resetDefaultLayout(): void;
|
|
108
113
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any, any, any, any>, never>;
|
|
109
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any, any, any, any>, "mng-table", never, { "descriptorInput": { "alias": "descriptor"; "required": true; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "result": { "alias": "result"; "required": false; "isSignal": true; }; "loadingInput": { "alias": "loading"; "required": false; "isSignal": true; }; "dataProvider": { "alias": "dataProvider"; "required": false; "isSignal": true; }; "useQueryParamsInput": { "alias": "useQueryParams"; "required": false; "isSignal": true; }; "cellClickEnabled": { "alias": "cellClickEnabled"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "selectionEnabled": { "alias": "selectionEnabled"; "required": false; "isSignal": true; }; "columnLastMinWidth": { "alias": "columnLastMinWidth"; "required": false; "isSignal": true; }; "captionComponent": { "alias": "captionComponent"; "required": false; "isSignal": true; }; "columnCustomLastComponent": { "alias": "columnCustomLastComponent"; "required": false; "isSignal": true; }; "globalFilterFieldsInput": { "alias": "globalFilterFields"; "required": false; "isSignal": true; }; }, { "tableLoad": "tableLoad"; "cellClick": "cellClick"; "selectionChange": "selectionChange"; "captionComponentInstance": "captionComponentInstance"; "columnCustomLastComponentInstance": "columnCustomLastComponentInstance"; }, ["templates"], never, true, never>;
|
|
114
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any, any, any, any>, "mng-table", never, { "descriptorInput": { "alias": "descriptor"; "required": true; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "result": { "alias": "result"; "required": false; "isSignal": true; }; "loadingInput": { "alias": "loading"; "required": false; "isSignal": true; }; "dataProvider": { "alias": "dataProvider"; "required": false; "isSignal": true; }; "useQueryParamsInput": { "alias": "useQueryParams"; "required": false; "isSignal": true; }; "cellClickEnabled": { "alias": "cellClickEnabled"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "selectionEnabled": { "alias": "selectionEnabled"; "required": false; "isSignal": true; }; "rowReorderEnabledInput": { "alias": "rowReorderEnabled"; "required": false; "isSignal": true; }; "columnLastMinWidth": { "alias": "columnLastMinWidth"; "required": false; "isSignal": true; }; "captionComponent": { "alias": "captionComponent"; "required": false; "isSignal": true; }; "columnCustomLastComponent": { "alias": "columnCustomLastComponent"; "required": false; "isSignal": true; }; "globalFilterFieldsInput": { "alias": "globalFilterFields"; "required": false; "isSignal": true; }; }, { "tableLoad": "tableLoad"; "cellClick": "cellClick"; "selectionChange": "selectionChange"; "captionComponentInstance": "captionComponentInstance"; "columnCustomLastComponentInstance": "columnCustomLastComponentInstance"; "rowReorder": "rowReorder"; }, ["templates"], never, true, never>;
|
|
110
115
|
}
|
|
@@ -7,9 +7,12 @@ export declare class DataListService<Item> {
|
|
|
7
7
|
rows: import("@angular/core").WritableSignal<number>;
|
|
8
8
|
offset: import("@angular/core").WritableSignal<number>;
|
|
9
9
|
globalFilterFields: import("@angular/core").WritableSignal<string[]>;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
private _data;
|
|
11
|
+
private _count;
|
|
12
|
+
data: import("@angular/core").Signal<Item[]>;
|
|
13
|
+
count: import("@angular/core").Signal<number>;
|
|
12
14
|
loading: import("@angular/core").WritableSignal<boolean>;
|
|
15
|
+
setData(data: Item[], count?: number): void;
|
|
13
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<DataListService<any>, never>;
|
|
14
17
|
static ɵprov: i0.ɵɵInjectableDeclaration<DataListService<any>>;
|
|
15
18
|
}
|
|
@@ -16,7 +16,7 @@ export declare class ActionComponent<Item = any, Service = undefined> implements
|
|
|
16
16
|
private actionExecutor;
|
|
17
17
|
private viewContainer;
|
|
18
18
|
private readonly destroyRef;
|
|
19
|
-
action: import("@angular/core").InputSignal<ActionDescriptorInst<Item, Service>>;
|
|
19
|
+
action: import("@angular/core").InputSignal<ActionDescriptorInst<Item, Service, Item>>;
|
|
20
20
|
item: import("@angular/core").InputSignal<Item | undefined>;
|
|
21
21
|
itemId: import("@angular/core").InputSignal<IdType | undefined>;
|
|
22
22
|
actionData: import("@angular/core").InputSignal<ActionData | 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> | null;
|
|
10
|
-
action: import("@angular/core").InputSignal<ActionEditorDescriptorInst<T, S>>;
|
|
10
|
+
action: import("@angular/core").InputSignal<ActionEditorDescriptorInst<T, S, T, T>>;
|
|
11
11
|
private readonly dialogData;
|
|
12
12
|
private readonly isDialog;
|
|
13
13
|
readonly parentInjector: import("@angular/core").Injector | undefined;
|
|
@@ -26,18 +26,19 @@ export declare class ActionEditorInjectorContextComponent<Item = any, Service =
|
|
|
26
26
|
item: import("@angular/core").WritableSignal<Item | undefined>;
|
|
27
27
|
itemId: import("@angular/core").WritableSignal<IdType | undefined>;
|
|
28
28
|
actionData: import("@angular/core").WritableSignal<ActionData | undefined>;
|
|
29
|
-
editorAction: import("@angular/core").WritableSignal<ActionEditorDescriptorInst<Item, Service>>;
|
|
29
|
+
editorAction: import("@angular/core").WritableSignal<ActionEditorDescriptorInst<Item, Service, Item, Item>>;
|
|
30
30
|
private actions;
|
|
31
|
-
toolbarLeftActions: import("@angular/core").Signal<ActionDescriptorInst<Item, any>[]>;
|
|
32
|
-
toolbarRightActions: import("@angular/core").Signal<ActionDescriptorInst<Item, any>[]>;
|
|
33
|
-
footerLeftActions: import("@angular/core").Signal<ActionDescriptorInst<Item, any>[]>;
|
|
34
|
-
footerRightActions: import("@angular/core").Signal<ActionDescriptorInst<Item, any>[]>;
|
|
31
|
+
toolbarLeftActions: import("@angular/core").Signal<ActionDescriptorInst<Item, any, Item>[]>;
|
|
32
|
+
toolbarRightActions: import("@angular/core").Signal<ActionDescriptorInst<Item, any, Item>[]>;
|
|
33
|
+
footerLeftActions: import("@angular/core").Signal<ActionDescriptorInst<Item, any, Item>[]>;
|
|
34
|
+
footerRightActions: import("@angular/core").Signal<ActionDescriptorInst<Item, any, Item>[]>;
|
|
35
35
|
private instance?;
|
|
36
36
|
private instanceStateSubscription?;
|
|
37
37
|
private instanceReactivationSubscription?;
|
|
38
38
|
private dataProvider;
|
|
39
39
|
loading: import("@angular/core").WritableSignal<boolean>;
|
|
40
40
|
private fetchExecutionSubscription?;
|
|
41
|
+
formValue: import("@angular/core").WritableSignal<Item | undefined>;
|
|
41
42
|
submitLoading: import("@angular/core").WritableSignal<boolean>;
|
|
42
43
|
private submitExecutionSubscription?;
|
|
43
44
|
private lastSubmitItem?;
|
|
@@ -50,6 +51,7 @@ export declare class ActionEditorInjectorContextComponent<Item = any, Service =
|
|
|
50
51
|
updateItemId(itemId: IdType | undefined): void;
|
|
51
52
|
updateItem(item: Item | undefined): void;
|
|
52
53
|
triggerSubmit(): void;
|
|
54
|
+
onValueChange(value: Item): void;
|
|
53
55
|
private fetchItem;
|
|
54
56
|
private setEditorEnabled;
|
|
55
57
|
private processActionInstance;
|
|
@@ -5,7 +5,7 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
export declare class DataLanguageDropdownComponent<T = any> implements IActionComponent<T> {
|
|
6
6
|
private readonly viewContainer;
|
|
7
7
|
readonly commons: CommonsService;
|
|
8
|
-
action: import("@angular/core").InputSignal<ActionDescriptorInst<T, any>>;
|
|
8
|
+
action: import("@angular/core").InputSignal<ActionDescriptorInst<T, any, T>>;
|
|
9
9
|
actionData: import("@angular/core").InputSignal<ActionData>;
|
|
10
10
|
item: import("@angular/core").InputSignal<T>;
|
|
11
11
|
itemId: import("@angular/core").InputSignal<IdType>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { QueryList, Signal, TemplateRef, Type } from '@angular/core';
|
|
2
|
+
import { TableRowReorderEvent } from 'primeng/table';
|
|
2
3
|
import { DataListResult, TemplateDirective } from '@mediusinc/mng-commons/core';
|
|
3
4
|
import { TableComponent } from '@mediusinc/mng-commons/table';
|
|
4
5
|
import { ITableDataProvider, TableCellClickEvent, TableDescriptorInst, TableLoadEvent } from '@mediusinc/mng-commons/table/api';
|
|
@@ -18,7 +19,8 @@ export declare class ActionTableComponent<Item = any, Service = undefined, Sorts
|
|
|
18
19
|
selectionMode: import("@angular/core").InputSignal<"single" | "multiple">;
|
|
19
20
|
selectionEnabled: import("@angular/core").InputSignal<boolean>;
|
|
20
21
|
globalFilterFields: import("@angular/core").InputSignal<string[] | undefined>;
|
|
21
|
-
|
|
22
|
+
rowReorderEnabled: import("@angular/core").InputSignal<boolean>;
|
|
23
|
+
actions: import("@angular/core").InputSignal<ActionDescriptorInst<any, any, any>[]>;
|
|
22
24
|
captionComponent: import("@angular/core").InputSignal<Type<any> | undefined>;
|
|
23
25
|
columnActionComponent: import("@angular/core").InputSignal<Type<any> | undefined>;
|
|
24
26
|
columnActionMinWidthInput: import("@angular/core").InputSignal<number | undefined>;
|
|
@@ -27,19 +29,21 @@ export declare class ActionTableComponent<Item = any, Service = undefined, Sorts
|
|
|
27
29
|
selectionChange: import("@angular/core").OutputEmitterRef<Item[]>;
|
|
28
30
|
captionComponentInstance: import("@angular/core").OutputEmitterRef<any>;
|
|
29
31
|
columnActionComponentInstance: import("@angular/core").OutputEmitterRef<any>;
|
|
32
|
+
rowReorder: import("@angular/core").OutputEmitterRef<TableRowReorderEvent>;
|
|
30
33
|
templates: Signal<readonly TemplateDirective[]>;
|
|
31
34
|
components: Signal<readonly QueryList<any>[]>;
|
|
32
35
|
table: Signal<TableComponent<any, any, any, any>>;
|
|
33
36
|
captionTemplate: Signal<TemplateRef<any> | null>;
|
|
34
37
|
footerTemplate: Signal<TemplateRef<any> | null>;
|
|
35
38
|
rowExpandTemplate: Signal<TemplateRef<any> | null>;
|
|
36
|
-
rowClickActions: Signal<ActionDescriptorInst<any, any>[]>;
|
|
37
|
-
rowInlineActions: Signal<ActionDescriptorInst<any, any>[]>;
|
|
39
|
+
rowClickActions: Signal<ActionDescriptorInst<any, any, any>[]>;
|
|
40
|
+
rowInlineActions: Signal<ActionDescriptorInst<any, any, any>[]>;
|
|
38
41
|
constructor();
|
|
39
42
|
reload(emitEvent?: boolean, resetParams?: boolean): void;
|
|
40
43
|
onCellClick(event: TableCellClickEvent<Item>): void;
|
|
41
44
|
onSelectionChange(items: Array<Item>): void;
|
|
45
|
+
onRowReorder(event: TableRowReorderEvent): void;
|
|
42
46
|
onActionFinish(runResult: ActionInstance<Item, Service>): void;
|
|
43
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<ActionTableComponent<any, any, any, any>, never>;
|
|
44
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ActionTableComponent<any, any, any, any>, "mng-action-table", never, { "descriptor": { "alias": "descriptor"; "required": true; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "result": { "alias": "result"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "dataProvider": { "alias": "dataProvider"; "required": false; "isSignal": true; }; "useQueryParams": { "alias": "useQueryParams"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "selectionEnabled": { "alias": "selectionEnabled"; "required": false; "isSignal": true; }; "globalFilterFields": { "alias": "globalFilterFields"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "captionComponent": { "alias": "captionComponent"; "required": false; "isSignal": true; }; "columnActionComponent": { "alias": "columnActionComponent"; "required": false; "isSignal": true; }; "columnActionMinWidthInput": { "alias": "columnActionMinWidth"; "required": false; "isSignal": true; }; }, { "tableLoad": "tableLoad"; "selectionChange": "selectionChange"; "captionComponentInstance": "captionComponentInstance"; "columnActionComponentInstance": "columnActionComponentInstance"; }, ["templates"], never, true, never>;
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ActionTableComponent<any, any, any, any>, "mng-action-table", never, { "descriptor": { "alias": "descriptor"; "required": true; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "result": { "alias": "result"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "dataProvider": { "alias": "dataProvider"; "required": false; "isSignal": true; }; "useQueryParams": { "alias": "useQueryParams"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "selectionEnabled": { "alias": "selectionEnabled"; "required": false; "isSignal": true; }; "globalFilterFields": { "alias": "globalFilterFields"; "required": false; "isSignal": true; }; "rowReorderEnabled": { "alias": "rowReorderEnabled"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "captionComponent": { "alias": "captionComponent"; "required": false; "isSignal": true; }; "columnActionComponent": { "alias": "columnActionComponent"; "required": false; "isSignal": true; }; "columnActionMinWidthInput": { "alias": "columnActionMinWidth"; "required": false; "isSignal": true; }; }, { "tableLoad": "tableLoad"; "selectionChange": "selectionChange"; "captionComponentInstance": "captionComponentInstance"; "columnActionComponentInstance": "columnActionComponentInstance"; "rowReorder": "rowReorder"; }, ["templates"], never, true, never>;
|
|
45
49
|
}
|
|
@@ -24,6 +24,7 @@ export declare class ActionContext<Item, Service = undefined> implements IAction
|
|
|
24
24
|
confirmation?: Confirmation;
|
|
25
25
|
notification?: Message;
|
|
26
26
|
runSubscription?: Subscription;
|
|
27
|
+
dataProviderSource: ActionDataProviderSource;
|
|
27
28
|
constructor(injector: Injector, instance: ActionInstance<Item, Service>, parameters: ActionParameters<Item>, functionName: 'run' | 'fetch' | 'submit', serviceInstance: Service, dataProvider?: IDataProvider<Item, Service> | undefined, viewContainer?: ViewContainer<Item, Service> | undefined, executionSubject?: ReplaySubject<Item | null | undefined>, executionIsRunningSubject?: BehaviorSubject<boolean>);
|
|
28
29
|
get execution$(): import("rxjs").Observable<Item | null | undefined>;
|
|
29
30
|
get executionIsRunning$(): import("rxjs").Observable<boolean>;
|
|
@@ -34,3 +35,9 @@ export declare class ActionContext<Item, Service = undefined> implements IAction
|
|
|
34
35
|
finish(): void;
|
|
35
36
|
isClosed(): boolean;
|
|
36
37
|
}
|
|
38
|
+
export declare enum ActionDataProviderSource {
|
|
39
|
+
Undefined = 0,
|
|
40
|
+
ViewContainer = 1,
|
|
41
|
+
Descriptor = 2,
|
|
42
|
+
ParameterOrInput = 3
|
|
43
|
+
}
|
|
@@ -91,7 +91,6 @@ export declare abstract class ActionExecutorService {
|
|
|
91
91
|
*
|
|
92
92
|
* @param action Action descriptor.
|
|
93
93
|
* @param parameters Action parameters for context run.
|
|
94
|
-
* @param dataProvider Data provider for context run.
|
|
95
94
|
* @param instance Optional existing action instance (if non provided, new will be created).
|
|
96
95
|
* @param previousActionInstance Optional previous action instance to link in next instance.
|
|
97
96
|
*
|
|
@@ -9,7 +9,7 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
export declare class ViewContainer<Item, Service = undefined> implements IViewContainer<Item, Service, ActionInstance<Item, Service>> {
|
|
10
10
|
dataProvider: import("@angular/core").WritableSignal<IDataProvider<Item, Service> | undefined>;
|
|
11
11
|
routeTriggeredActionInstance: import("@angular/core").WritableSignal<ActionInstance<Item, Service> | undefined>;
|
|
12
|
-
actions: import("@angular/core").WritableSignal<ActionDescriptorInst<Item, any>[]>;
|
|
12
|
+
actions: import("@angular/core").WritableSignal<ActionDescriptorInst<Item, any, Item>[]>;
|
|
13
13
|
private _tableReloadSubject;
|
|
14
14
|
private _editorResetSubject;
|
|
15
15
|
private _editorCloseSubject;
|
|
@@ -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> extends ActionDescriptorInst<Item, Service> {
|
|
17
|
+
export declare class ActionEditorDescriptorInst<Item, Service = any, FetchInputItem = Item, SubmitReturnItem = Item> extends ActionDescriptorInst<Item, Service> {
|
|
18
18
|
private readonly _editorDescriptor;
|
|
19
19
|
protected readonly _dataProvider?: IEditorDataProvider<Item, any>;
|
|
20
20
|
protected _editorActions: ActionDescriptorInst<Item>[];
|
|
@@ -47,7 +47,7 @@ export declare class ActionEditorDescriptorInst<Item, Service = any> extends Act
|
|
|
47
47
|
get fetchFunction(): ((ctx: IActionContext<Item, Service, import("@mediusinc/mng-commons/tableview/api").IActionInstance<Item, Service>, import("@mediusinc/mng-commons/tableview/api").IViewContainer<Item, Service, import("@mediusinc/mng-commons/tableview/api").IActionInstance<Item, Service>>>) => Observable<Item>) | undefined;
|
|
48
48
|
get hasSubmitFunction(): boolean;
|
|
49
49
|
get submitFunction(): ((ctx: IActionContext<Item, Service, import("@mediusinc/mng-commons/tableview/api").IActionInstance<Item, Service>, import("@mediusinc/mng-commons/tableview/api").IViewContainer<Item, Service, import("@mediusinc/mng-commons/tableview/api").IActionInstance<Item, Service>>>) => Observable<Item>) | undefined;
|
|
50
|
-
get editorActions(): ActionDescriptorInst<Item, any>[];
|
|
50
|
+
get editorActions(): ActionDescriptorInst<Item, any, Item>[];
|
|
51
51
|
get editorComponent(): Type<any> | undefined;
|
|
52
52
|
get resubmitEnabled(): boolean | undefined;
|
|
53
53
|
get resubmitRefetch(): boolean;
|
|
@@ -7,25 +7,25 @@ import { ActionRunFnType, ActionValidationFnType } from '../models/action-descri
|
|
|
7
7
|
import { ActionActivationTriggerEnum, ActionPositionEnum, ActionTypeEnum } from '../models/action.type';
|
|
8
8
|
import { IActionContext } from '../models/execution/action-context.model';
|
|
9
9
|
import { ActionConfirmationDescriptor } from './action-confirmation.descriptor';
|
|
10
|
-
export type ActionDescriptorCreateOptsProviderType<
|
|
10
|
+
export type ActionDescriptorCreateOptsProviderType<Item, Service> = {
|
|
11
11
|
serviceType?: ServiceClassType<Service>;
|
|
12
|
-
dataProvider?: IDataProvider<
|
|
12
|
+
dataProvider?: IDataProvider<Item, Service>;
|
|
13
13
|
};
|
|
14
14
|
export type ActionDescriptorCreateOptsParentType = {
|
|
15
15
|
parentType?: ClassType<unknown>;
|
|
16
16
|
parentProperty?: string;
|
|
17
17
|
};
|
|
18
|
-
export type ActionDescriptorConstructorOptsType<
|
|
19
|
-
model?: ModelDescriptor<
|
|
18
|
+
export type ActionDescriptorConstructorOptsType<Item, Service> = ActionDescriptorCreateOptsParentType & ActionDescriptorCreateOptsProviderType<Item, Service> & {
|
|
19
|
+
model?: ModelDescriptor<Item>;
|
|
20
20
|
};
|
|
21
|
-
export declare class ActionDescriptorInst<
|
|
22
|
-
protected readonly _model?: ModelDescriptor<
|
|
21
|
+
export declare class ActionDescriptorInst<Item, Service = any, ReturnItem = Item> implements IActionDescriptor<Item, Service> {
|
|
22
|
+
protected readonly _model?: ModelDescriptor<Item>;
|
|
23
23
|
protected readonly _actionName: string;
|
|
24
24
|
protected readonly _actionNameLong: string;
|
|
25
25
|
protected readonly _parentType?: ClassType<unknown>;
|
|
26
26
|
protected readonly _parentTypeName?: string;
|
|
27
27
|
protected readonly _parentProperty?: string;
|
|
28
|
-
protected readonly _dataProvider?: IDataProvider<
|
|
28
|
+
protected readonly _dataProvider?: IDataProvider<Item, Service>;
|
|
29
29
|
protected _i18nModelActionBaseKey?: string;
|
|
30
30
|
protected _type: ActionTypeEnum;
|
|
31
31
|
protected _activationTrigger: ActionActivationTriggerEnum;
|
|
@@ -34,27 +34,27 @@ export declare class ActionDescriptorInst<Model, Service = any> implements IActi
|
|
|
34
34
|
private _positionTableviewCategories?;
|
|
35
35
|
protected _tableviewCategory?: string;
|
|
36
36
|
protected _routeUrl: string | null;
|
|
37
|
-
protected _runFunction?: ActionRunFnType<
|
|
38
|
-
protected _isVisibleFunction?: ActionValidationFnType<
|
|
39
|
-
protected _isEnabledFunction?: ActionValidationFnType<
|
|
40
|
-
protected _runConfirmationDialogDescriptor?: ActionConfirmationDescriptor<
|
|
37
|
+
protected _runFunction?: ActionRunFnType<Item, Service, ReturnItem>;
|
|
38
|
+
protected _isVisibleFunction?: ActionValidationFnType<Item, Service>;
|
|
39
|
+
protected _isEnabledFunction?: ActionValidationFnType<Item, Service>;
|
|
40
|
+
protected _runConfirmationDialogDescriptor?: ActionConfirmationDescriptor<Item>;
|
|
41
41
|
protected _hasRunNotificationSuccess: boolean;
|
|
42
42
|
protected _runNotificationSuccessTitle?: string;
|
|
43
43
|
protected _runNotificationSuccessMessage?: string;
|
|
44
44
|
protected _hasRunNotificationError: boolean;
|
|
45
45
|
protected _runNotificationErrorTitle?: string;
|
|
46
46
|
protected _runNotificationErrorMessage?: string;
|
|
47
|
-
protected _afterRunAction?: ActionDescriptorInst<any> | ((ctx: IActionContext<
|
|
48
|
-
protected _onRunErrorAction?: ActionDescriptorInst<
|
|
47
|
+
protected _afterRunAction?: ActionDescriptorInst<any> | ((ctx: IActionContext<Item, any>) => ActionDescriptorInst<any>);
|
|
48
|
+
protected _onRunErrorAction?: ActionDescriptorInst<Item> | ((ctx: IActionContext<Item, any>) => ActionDescriptorInst<Item>);
|
|
49
49
|
protected _permissions?: APermissions;
|
|
50
50
|
protected _button: ActionButtonDescriptor;
|
|
51
51
|
protected _hasItemsSelection: boolean;
|
|
52
|
-
protected _component?: Type<IActionComponent<
|
|
52
|
+
protected _component?: Type<IActionComponent<Item>>;
|
|
53
53
|
protected _componentFromDi?: InjectionToken<Type<any>>;
|
|
54
54
|
protected _subactionsAsMenu: boolean;
|
|
55
|
-
protected _subactions: Array<ActionDescriptorInst<
|
|
56
|
-
constructor(actionName: string, cfg?: ActionDescriptorConstructorOptsType<
|
|
57
|
-
get model(): ModelDescriptor<
|
|
55
|
+
protected _subactions: Array<ActionDescriptorInst<Item>>;
|
|
56
|
+
constructor(actionName: string, cfg?: ActionDescriptorConstructorOptsType<Item, Service>);
|
|
57
|
+
get model(): ModelDescriptor<Item, import("@mediusinc/mng-commons/core").ClassOptType<Item>> | undefined;
|
|
58
58
|
get parentTypeName(): string | undefined;
|
|
59
59
|
get parentProperty(): string | undefined;
|
|
60
60
|
get i18nModelActionBaseKey(): string | undefined;
|
|
@@ -63,15 +63,15 @@ export declare class ActionDescriptorInst<Model, Service = any> implements IActi
|
|
|
63
63
|
get position(): ActionPositionEnum;
|
|
64
64
|
get level(): StyleLevelEnum;
|
|
65
65
|
get routeUrl(): string | null;
|
|
66
|
-
get dataProvider(): IDataProvider<
|
|
66
|
+
get dataProvider(): IDataProvider<Item, Service> | undefined;
|
|
67
67
|
get hasRunFunction(): boolean;
|
|
68
|
-
get runFunction(): ActionRunFnType<
|
|
69
|
-
get isVisibleFunction(): ActionValidationFnType<
|
|
70
|
-
get isEnabledFunction(): ActionValidationFnType<
|
|
68
|
+
get runFunction(): ActionRunFnType<Item, Service, ReturnItem>;
|
|
69
|
+
get isVisibleFunction(): ActionValidationFnType<Item, Service> | undefined;
|
|
70
|
+
get isEnabledFunction(): ActionValidationFnType<Item, Service> | undefined;
|
|
71
71
|
get actionName(): string;
|
|
72
72
|
get actionNameLong(): string;
|
|
73
73
|
get className(): string | undefined;
|
|
74
|
-
get runConfirmationDialogDescriptor(): ActionConfirmationDescriptor<
|
|
74
|
+
get runConfirmationDialogDescriptor(): ActionConfirmationDescriptor<Item> | undefined;
|
|
75
75
|
get hasRunConfirmation(): boolean;
|
|
76
76
|
get hasRunNotificationSuccess(): boolean;
|
|
77
77
|
get runNotificationSuccessTitle(): string | undefined;
|
|
@@ -79,50 +79,50 @@ export declare class ActionDescriptorInst<Model, Service = any> implements IActi
|
|
|
79
79
|
get hasRunNotificationError(): boolean;
|
|
80
80
|
get runNotificationErrorTitle(): string | undefined;
|
|
81
81
|
get runNotificationErrorMessage(): string | undefined;
|
|
82
|
-
get afterRunAction(): ActionDescriptorInst<any, any> | ((ctx: IActionContext<
|
|
83
|
-
get onRunErrorAction(): ActionDescriptorInst<
|
|
82
|
+
get afterRunAction(): ActionDescriptorInst<any, any, any> | ((ctx: IActionContext<Item, any, import("@mediusinc/mng-commons/tableview/api").IActionInstance<Item, any>, import("@mediusinc/mng-commons/tableview/api").IViewContainer<Item, any, import("@mediusinc/mng-commons/tableview/api").IActionInstance<Item, any>>>) => ActionDescriptorInst<any, any, any>) | undefined;
|
|
83
|
+
get onRunErrorAction(): ActionDescriptorInst<Item, any, Item> | ((ctx: IActionContext<Item, any, import("@mediusinc/mng-commons/tableview/api").IActionInstance<Item, any>, import("@mediusinc/mng-commons/tableview/api").IViewContainer<Item, any, import("@mediusinc/mng-commons/tableview/api").IActionInstance<Item, any>>>) => ActionDescriptorInst<Item, any, Item>) | undefined;
|
|
84
84
|
get permissions(): APermissions | undefined;
|
|
85
85
|
get tableviewCategory(): string | undefined;
|
|
86
86
|
get hasItemsSelection(): boolean;
|
|
87
87
|
get button(): ActionButtonDescriptor;
|
|
88
|
-
get component(): Type<IActionComponent<
|
|
88
|
+
get component(): Type<IActionComponent<Item, undefined>> | undefined;
|
|
89
89
|
get componentFromDi(): InjectionToken<Type<any>> | undefined;
|
|
90
90
|
get positionTableviewCategories(): string[] | undefined;
|
|
91
91
|
get subactionsAsMenu(): boolean;
|
|
92
|
-
get subactions(): ActionDescriptorInst<
|
|
92
|
+
get subactions(): ActionDescriptorInst<Item, any, Item>[];
|
|
93
93
|
protected setI18nModelActionBaseKey(base?: string): void;
|
|
94
|
-
withRunFunction(fn: ActionRunFnType<
|
|
95
|
-
withIsVisibleFunction(fn?: ActionValidationFnType<
|
|
96
|
-
withIsEnabledFunction(fn?: ActionValidationFnType<
|
|
94
|
+
withRunFunction(fn: ActionRunFnType<Item, Service, ReturnItem>): this;
|
|
95
|
+
withIsVisibleFunction(fn?: ActionValidationFnType<Item, Service>): this;
|
|
96
|
+
withIsEnabledFunction(fn?: ActionValidationFnType<Item, Service>): this;
|
|
97
97
|
withRouteTrigger(routeUrl: string): this;
|
|
98
98
|
withPosition(position: ActionPositionEnum): this;
|
|
99
99
|
/**
|
|
100
100
|
* creates confirmation action with default style based on action descriptor
|
|
101
101
|
*/
|
|
102
|
-
withRunConfirmation(): ActionConfirmationDescriptor<
|
|
102
|
+
withRunConfirmation(): ActionConfirmationDescriptor<Item>;
|
|
103
103
|
/**
|
|
104
104
|
* Add a configuration dialogue to action using ActionConfigurationDescriptor
|
|
105
105
|
* @param runConfirmationDialogDescriptor descriptor with customizable information for dialog
|
|
106
106
|
*/
|
|
107
|
-
withRunConfirmationDescriptor(runConfirmationDialogDescriptor?: ActionConfirmationDescriptor<
|
|
107
|
+
withRunConfirmationDescriptor(runConfirmationDialogDescriptor?: ActionConfirmationDescriptor<Item>): this;
|
|
108
108
|
withRunNotificationSuccess(title?: string, message?: string, hasNotification?: boolean): this;
|
|
109
109
|
withRunNotificationError(title?: string, message?: string, hasNotification?: boolean): this;
|
|
110
|
-
withAfterRunAction<Return, Service = any>(action?: ActionDescriptorInst<Return> | ((ctx: IActionContext<
|
|
111
|
-
withOnRunErrorAction<S = any>(action?: ActionDescriptorInst<
|
|
110
|
+
withAfterRunAction<Return, Service = any>(action?: ActionDescriptorInst<Return> | ((ctx: IActionContext<Item, Service>) => ActionDescriptorInst<Return>)): this;
|
|
111
|
+
withOnRunErrorAction<S = any>(action?: ActionDescriptorInst<Item> | ((ctx: IActionContext<Item, S>) => ActionDescriptorInst<Item>)): this;
|
|
112
112
|
withPermissions(permissions: APermissions): this;
|
|
113
113
|
withTableviewCategory(permissionsRouteType: string): this;
|
|
114
114
|
withButtonDescriptor(button: ActionButtonDescriptor): this;
|
|
115
115
|
withButton(label?: string | null, icon?: string | null, styleLevel?: StyleLevelEnum, styleText?: boolean): this;
|
|
116
116
|
withItemsSelection(hasSelection?: boolean): this;
|
|
117
|
-
withComponent(component: Type<IActionComponent<
|
|
117
|
+
withComponent(component: Type<IActionComponent<Item>>): this;
|
|
118
118
|
withComponentFromDi(injectionToken: InjectionToken<Type<any>>): this;
|
|
119
119
|
withPositionTableviewCategories(positionTableviewCategories: string[]): this;
|
|
120
120
|
withI18nBase(base: ClassType<unknown> | string): this;
|
|
121
121
|
withSubactionsAsMenu(subactionsAsMenu?: boolean): this;
|
|
122
|
-
withSubactions(...subactions: Array<ActionDescriptorInst<
|
|
123
|
-
copyTo(descriptor: ActionDescriptorInst<
|
|
122
|
+
withSubactions(...subactions: Array<ActionDescriptorInst<Item>>): this;
|
|
123
|
+
copyTo(descriptor: ActionDescriptorInst<Item, Service, ReturnItem>): ActionDescriptorInst<Item, Service, ReturnItem>;
|
|
124
124
|
}
|
|
125
|
-
export declare class ActionDeleteDescriptorInst<
|
|
125
|
+
export declare class ActionDeleteDescriptorInst<Item, Service = any> extends ActionDescriptorInst<Item, Service> {
|
|
126
126
|
static readonly ACTION_NAME = "delete";
|
|
127
|
-
constructor(model: ModelDescriptor<
|
|
127
|
+
constructor(model: ModelDescriptor<Item>, cfg?: ActionDescriptorCreateOptsProviderType<Item, Service>);
|
|
128
128
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ItemOrObservable } from '@mediusinc/mng-commons/core';
|
|
1
|
+
import { ItemOrObservable, Nullable } from '@mediusinc/mng-commons/core';
|
|
2
2
|
import { ActionContextValidation } from './execution/action-context-validation.model';
|
|
3
3
|
import { IActionContext } from './execution/action-context.model';
|
|
4
|
-
export type ActionRunFnType<Item, Service = undefined,
|
|
4
|
+
export type ActionRunFnType<Item, Service = undefined, ReturnItem = Item, Return = ItemOrObservable<Nullable<ReturnItem>>> = (ctx: IActionContext<Item, Service>) => Return;
|
|
5
5
|
export type ActionValidationFnType<Item, Service = undefined, Return = ItemOrObservable<boolean>> = (ctx: ActionContextValidation<Item, Service>) => Return;
|
|
@@ -49,7 +49,7 @@ export declare class FieldManyEditorDescriptor<FieldModel, EditorModel, FieldVal
|
|
|
49
49
|
constructor(editor: IEditorDescriptor<EditorModel, EditorModel>, property: string, tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any, EditorModel>);
|
|
50
50
|
get fieldType(): FieldManyEditorTypeEnum;
|
|
51
51
|
get fieldActions(): FieldManyEditorActionEnum[];
|
|
52
|
-
get actions(): ActionDescriptorInst<FieldModel, any>[];
|
|
52
|
+
get actions(): ActionDescriptorInst<FieldModel, any, FieldModel>[];
|
|
53
53
|
get tableviewDescriptor(): TableviewDescriptorInst<FieldModel, any, any, EditorModel>;
|
|
54
54
|
get tableDescriptor(): TableDescriptorInst<FieldModel, any, any>;
|
|
55
55
|
get editorForCreate(): import("@mediusinc/mng-commons/tableview/api").EditorDescriptorInst<FieldModel, EditorModel>;
|
|
@@ -11,6 +11,7 @@ export declare enum FormFieldEventTypeEnum {
|
|
|
11
11
|
ValueChange = "ValueChange",
|
|
12
12
|
DataProvider = "DataProvider",
|
|
13
13
|
DialogLifecycle = "DialogLifecycle",
|
|
14
|
+
RowReorder = "RowReorder",
|
|
14
15
|
Other = "Other"
|
|
15
16
|
}
|
|
16
17
|
export declare enum FormEventTypeEnum {
|
|
@@ -39,6 +40,9 @@ export interface FormFieldEventData<FieldModel, EditorModel> {
|
|
|
39
40
|
export interface FormEventData<EditorModel> {
|
|
40
41
|
eventSubtype?: string;
|
|
41
42
|
value?: EditorModel;
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated Use event's ${formComponent.getFormValue()} instead.
|
|
45
|
+
*/
|
|
42
46
|
formValue?: () => EditorModel;
|
|
43
47
|
submitValid?: boolean;
|
|
44
48
|
submitValue?: EditorModel;
|
|
@@ -24,6 +24,9 @@ export type FormEditorResetFieldValueOpts = {
|
|
|
24
24
|
onlySelf?: boolean;
|
|
25
25
|
emitEvent?: boolean;
|
|
26
26
|
};
|
|
27
|
+
export type FormEditorGetFormValueOpts = {
|
|
28
|
+
omitSetters?: boolean;
|
|
29
|
+
};
|
|
27
30
|
export interface IFormEditorComponent<Item, ParentItem = any> {
|
|
28
31
|
descriptor: InputSignal<EditorDescriptorInst<Item>>;
|
|
29
32
|
isFormDisabled: InputSignal<boolean>;
|
|
@@ -37,7 +40,7 @@ export interface IFormEditorComponent<Item, ParentItem = any> {
|
|
|
37
40
|
get formlyInitialItem(): any;
|
|
38
41
|
get parent(): IFormEditorComponent<ParentItem> | undefined;
|
|
39
42
|
submit(): void;
|
|
40
|
-
getFormValue(): Item;
|
|
43
|
+
getFormValue(opts?: FormEditorGetFormValueOpts): Item;
|
|
41
44
|
resetFormModel(item?: Item, opts?: FormEditorResetFormModelOpts): void;
|
|
42
45
|
getField(key: keyof Item): AbstractControl | null;
|
|
43
46
|
getFieldUnsafe(key: string): AbstractControl | null;
|
|
@@ -6,10 +6,10 @@ export type CommonsFormlyFormOptions<Item> = FormlyFormOptions & {
|
|
|
6
6
|
};
|
|
7
7
|
export type CommonsFormlyFormState<Item> = {
|
|
8
8
|
descriptor?: EditorDescriptorInst<Item>;
|
|
9
|
-
add
|
|
10
|
-
edit
|
|
11
|
-
disabled
|
|
12
|
-
disabled
|
|
9
|
+
add?: boolean;
|
|
10
|
+
edit?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
disabled$?: Observable<boolean>;
|
|
13
13
|
submittedOn?: number;
|
|
14
14
|
[key: string]: any;
|
|
15
15
|
};
|
|
@@ -16,6 +16,7 @@ export declare class FormEditorComponent<Item = any, ParentItem = any> implement
|
|
|
16
16
|
item: import("@angular/core").InputSignal<Item | undefined>;
|
|
17
17
|
isFormDisabled: import("@angular/core").InputSignal<boolean>;
|
|
18
18
|
formSubmit: import("@angular/core").OutputEmitterRef<FormEditorSubmitEvent<Item>>;
|
|
19
|
+
valueChange: import("@angular/core").OutputEmitterRef<Item>;
|
|
19
20
|
submitButtonElementRef: import("@angular/core").Signal<ElementRef<any> | undefined>;
|
|
20
21
|
private readonly _form;
|
|
21
22
|
private readonly _formlyStateDisabledSubject;
|
|
@@ -23,6 +24,7 @@ export declare class FormEditorComponent<Item = any, ParentItem = any> implement
|
|
|
23
24
|
private _formlyFields;
|
|
24
25
|
private _formlyInitialItem;
|
|
25
26
|
private initialItemInput;
|
|
27
|
+
private setterFields;
|
|
26
28
|
formMessages: import("@angular/core").WritableSignal<Message[]>;
|
|
27
29
|
get parent(): IFormEditorComponent<ParentItem, any> | undefined;
|
|
28
30
|
get form(): FormGroup<{
|
|
@@ -42,7 +44,9 @@ export declare class FormEditorComponent<Item = any, ParentItem = any> implement
|
|
|
42
44
|
ngOnDestroy(): void;
|
|
43
45
|
submit(): void;
|
|
44
46
|
onSubmit(event: Event): void;
|
|
45
|
-
getFormValue(
|
|
47
|
+
getFormValue(opts?: {
|
|
48
|
+
omitSetters?: boolean;
|
|
49
|
+
}): Item;
|
|
46
50
|
resetFormModel(item?: Item, opts?: FormEditorResetFormModelOpts): void;
|
|
47
51
|
getField(key: keyof Item): AbstractControl<any, any> | null;
|
|
48
52
|
getFieldUnsafe(key: string): AbstractControl<any, any> | null;
|
|
@@ -56,5 +60,5 @@ export declare class FormEditorComponent<Item = any, ParentItem = any> implement
|
|
|
56
60
|
private findFormField;
|
|
57
61
|
private isAnyFieldInvalid;
|
|
58
62
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormEditorComponent<any, any>, never>;
|
|
59
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormEditorComponent<any, any>, "mng-form-editor", never, { "descriptor": { "alias": "descriptor"; "required": true; "isSignal": true; }; "submitLoading": { "alias": "submitLoading"; "required": false; "isSignal": true; }; "item": { "alias": "item"; "required": false; "isSignal": true; }; "isFormDisabled": { "alias": "isFormDisabled"; "required": false; "isSignal": true; }; }, { "formSubmit": "formSubmit"; }, never, never, true, never>;
|
|
63
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormEditorComponent<any, any>, "mng-form-editor", never, { "descriptor": { "alias": "descriptor"; "required": true; "isSignal": true; }; "submitLoading": { "alias": "submitLoading"; "required": false; "isSignal": true; }; "item": { "alias": "item"; "required": false; "isSignal": true; }; "isFormDisabled": { "alias": "isFormDisabled"; "required": false; "isSignal": true; }; }, { "formSubmit": "formSubmit"; "valueChange": "valueChange"; }, never, never, true, never>;
|
|
60
64
|
}
|
|
@@ -3,7 +3,6 @@ import { FieldLookupDescriptor } from '@mediusinc/mng-commons/tableview/api';
|
|
|
3
3
|
import { ACommonsFormlyFieldType } from '../formly-field-type.abstract.component';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class FormlyFieldAutocompleteComponent<T, ET> extends ACommonsFormlyFieldType<T, ET, FieldLookupDescriptor<T, ET>> implements OnInit, AfterViewInit, OnDestroy {
|
|
6
|
-
private readonly destroyRef;
|
|
7
6
|
ngOnInit(): void;
|
|
8
7
|
ngAfterViewInit(): void;
|
|
9
8
|
ngOnDestroy(): void;
|
|
@@ -7,7 +7,6 @@ export declare class FormlyFieldDatepickerComponent<ET> extends ACommonsFormlyFi
|
|
|
7
7
|
dpFormControl: FormControl<any>;
|
|
8
8
|
styleClass: import("@angular/core").WritableSignal<string>;
|
|
9
9
|
private readonly moduleConfig;
|
|
10
|
-
private destroyRef;
|
|
11
10
|
private dateTimeInUtc;
|
|
12
11
|
private dateTimeWithTimezone;
|
|
13
12
|
private dateTimeWithMillis;
|
|
@@ -3,7 +3,6 @@ import { FieldLookupDescriptor } from '@mediusinc/mng-commons/tableview/api';
|
|
|
3
3
|
import { ACommonsFormlyFieldType } from '../formly-field-type.abstract.component';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class FormlyFieldDropdownComponent<T, ET> extends ACommonsFormlyFieldType<T, ET, FieldLookupDescriptor<T, ET>> implements OnInit, OnDestroy {
|
|
6
|
-
private readonly destroyRef;
|
|
7
6
|
ngOnInit(): void;
|
|
8
7
|
ngOnDestroy(): void;
|
|
9
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyFieldDropdownComponent<any, any>, never>;
|
|
@@ -8,7 +8,6 @@ export declare class FormlyFieldInputComponent<ET> extends ACommonsFormlyFieldTy
|
|
|
8
8
|
readonly NUMBER_MAX_SAFE: number;
|
|
9
9
|
readonly DESC_INPUT_TYPE_IMAGE_FILE = FieldInputTypeEnum.ImageFile;
|
|
10
10
|
readonly applicationLocale: string;
|
|
11
|
-
private readonly destroyRef;
|
|
12
11
|
private readonly formBuilder;
|
|
13
12
|
private readonly translateService;
|
|
14
13
|
iFormControl: FormControl;
|