@mediusinc/mng-commons 5.5.0-rc.0 → 5.5.0-rc.2
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/descriptors/table.descriptor.d.ts +4 -2
- package/core/directives/rerender.directive.d.ts +9 -0
- package/core/helpers/route.d.ts +25 -25
- package/core/index.d.ts +2 -0
- package/core/reactivity/effect.d.ts +16 -0
- package/esm2022/core/components/notification/notification-wrapper.component.mjs +4 -4
- package/esm2022/core/components/pages/error/error.page.component.mjs +4 -4
- package/esm2022/core/components/pages/not-found/not-found.page.component.mjs +4 -4
- package/esm2022/core/data-list/data-list-params-helpers.mjs +18 -3
- package/esm2022/core/descriptors/table.descriptor.mjs +1 -1
- package/esm2022/core/directives/component.directive.mjs +4 -4
- package/esm2022/core/directives/rerender.directive.mjs +25 -0
- package/esm2022/core/directives/template.directive.mjs +4 -4
- package/esm2022/core/index.mjs +4 -1
- package/esm2022/core/pipes/boolean.pipe.mjs +6 -6
- package/esm2022/core/pipes/class-map.pipe.mjs +4 -4
- package/esm2022/core/pipes/enum.pipe.mjs +4 -4
- package/esm2022/core/pipes/enumerate-async.pipe.mjs +4 -4
- package/esm2022/core/pipes/enumerate.pipe.mjs +4 -4
- package/esm2022/core/pipes/getter.pipe.mjs +5 -5
- package/esm2022/core/pipes/i18n-property.pipe.mjs +4 -4
- package/esm2022/core/pipes/json-path.pipe.mjs +4 -4
- package/esm2022/core/pipes/parametrize.pipe.mjs +4 -4
- package/esm2022/core/pipes/template.pipe.mjs +4 -4
- package/esm2022/core/reactivity/effect.mjs +22 -0
- package/esm2022/core/security/permission.service.mjs +4 -4
- package/esm2022/core/services/commons-init.service.mjs +4 -4
- package/esm2022/core/services/commons-router.service.mjs +4 -4
- package/esm2022/core/services/commons-storage.service.mjs +4 -4
- package/esm2022/core/services/commons.service.mjs +8 -8
- package/esm2022/filter/descriptors/filter-lookup.descriptor.mjs +32 -25
- package/esm2022/filter/descriptors/filter.descriptor.mjs +53 -1
- package/esm2022/form/components/autocomplete/autocomplete.component.mjs +4 -4
- package/esm2022/form/components/date-range/date-range.component.mjs +4 -4
- package/esm2022/form/components/dropdown/dropdown.component.mjs +4 -4
- package/esm2022/form/components/number-range/number-range.component.mjs +4 -4
- package/esm2022/form/directives/input-trim.directive.mjs +4 -4
- package/esm2022/table/api/descriptors/sort.descriptor.mjs +2 -2
- package/esm2022/table/api/descriptors/table.descriptor.mjs +32 -8
- package/esm2022/table/components/column-filter/column-filter.component.mjs +33 -40
- package/esm2022/table/components/column-value/column-value.component.mjs +6 -6
- package/esm2022/table/components/filter/filter-active-tag/filter-active-tag.component.mjs +7 -7
- package/esm2022/table/components/filter/filter-form/filter-form.component.mjs +24 -34
- package/esm2022/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.mjs +44 -45
- package/esm2022/table/components/table/table.component.mjs +114 -430
- package/esm2022/table/helpers/filters.mjs +9 -25
- package/esm2022/table/helpers/table.mjs +24 -0
- package/esm2022/table/index.mjs +2 -2
- package/esm2022/table/models/column-preferences.model.mjs +1 -1
- package/esm2022/table/models/filter.model.mjs +1 -1
- package/esm2022/table/pipes/filter-value.pipe.mjs +4 -4
- package/esm2022/table/pipes/locale-default-row-class.pipe.mjs +4 -4
- package/esm2022/table/pipes/table-column-filter-class.pipe.mjs +4 -4
- package/esm2022/table/services/table-data.service.mjs +194 -0
- package/esm2022/table/services/table-metadata.service.mjs +136 -0
- package/esm2022/table/services/table-preferences.service.mjs +142 -0
- package/esm2022/tableview/action/components/action/action.component.mjs +6 -7
- package/esm2022/tableview/action/components/editor/action-editor.component.mjs +4 -4
- package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +69 -46
- package/esm2022/tableview/action/components/localization/data-language-dropdown.component.mjs +4 -4
- package/esm2022/tableview/action/components/route/action-route.component.mjs +5 -6
- package/esm2022/tableview/action/components/table/action-table.component.mjs +4 -4
- package/esm2022/tableview/action/helpers/action-execution.mjs +25 -0
- package/esm2022/tableview/action/models/execution/action-instance.model.mjs +2 -3
- package/esm2022/tableview/action/services/action-executor.service.mjs +12 -79
- package/esm2022/tableview/action/services/component-action-executor.service.mjs +4 -4
- package/esm2022/tableview/action/services/data-provider-executor.service.mjs +4 -4
- package/esm2022/tableview/action/services/navigation.service.mjs +4 -4
- package/esm2022/tableview/action/services/root-action-executor.service.mjs +4 -4
- package/esm2022/tableview/action/services/view-container.service.mjs +4 -4
- package/esm2022/tableview/api/action/descriptors/action-confirmation.descriptor.mjs +13 -1
- package/esm2022/tableview/api/action/descriptors/action-editor.descriptor.mjs +67 -10
- package/esm2022/tableview/api/action/descriptors/action-link-descriptor.factory.mjs +2 -2
- package/esm2022/tableview/api/action/descriptors/action-link.descriptor.mjs +17 -1
- package/esm2022/tableview/api/action/descriptors/action.descriptor.mjs +32 -7
- package/esm2022/tableview/api/action/models/execution/action-instance-state.model.mjs +2 -2
- package/esm2022/tableview/api/editor/descriptors/field-base.descriptor.mjs +20 -1
- package/esm2022/tableview/api/editor/descriptors/field-many.descriptor.mjs +2 -1
- package/esm2022/tableview/api/editor/models/formly-custom-field.model.mjs +4 -4
- package/esm2022/tableview/api/tableview/descriptors/tableview.descriptor.mjs +13 -5
- package/esm2022/tableview/api/tableview/helpers/tableview-default-actions.mjs +3 -2
- package/esm2022/tableview/api/tableview/helpers/tableview-descriptor-helpers.mjs +2 -2
- package/esm2022/tableview/editor/components/editor/auto-save-status/auto-save-status.component.mjs +4 -4
- package/esm2022/tableview/editor/components/editor/form-editor.component.mjs +31 -38
- package/esm2022/tableview/editor/components/formly/constants.mjs +2 -0
- package/esm2022/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +7 -5
- package/esm2022/tableview/editor/components/formly/fields/formly-field-custom/formly-field-custom.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.mjs +7 -5
- package/esm2022/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +7 -5
- package/esm2022/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.mjs +5 -5
- package/esm2022/tableview/editor/components/formly/fields/formly-field-label/formly-field-label.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +5 -6
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +10 -6
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +11 -7
- package/esm2022/tableview/editor/components/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-type.abstract.component.mjs +6 -5
- package/esm2022/tableview/editor/components/formly/pipes/formly-field-label.pipe.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/wrappers/formly-field-no-label-wrapper/formly-field-no-label-wrapper.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +10 -5
- package/esm2022/tableview/editor/helpers/editor-autosave.mjs +2 -2
- package/esm2022/tableview/editor/services/form-editor.service.mjs +4 -4
- package/esm2022/tableview/index.mjs +1 -2
- package/esm2022/tableview/tableview/components/route/tableview-route.component.mjs +4 -4
- package/esm2022/tableview/tableview/components/tableview/tableview.component.mjs +4 -4
- package/fesm2022/mediusinc-mng-commons-core.mjs +130 -71
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-filter.mjs +83 -24
- package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form.mjs +15 -15
- package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-model.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-api.mjs +32 -8
- package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table.mjs +700 -603
- package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +165 -26
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +265 -317
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons.mjs.map +1 -1
- package/filter/descriptors/filter-lookup.descriptor.d.ts +17 -20
- package/filter/descriptors/filter.descriptor.d.ts +32 -2
- package/form/components/date-range/date-range.component.d.ts +3 -3
- package/form/components/number-range/number-range.component.d.ts +2 -2
- package/package.json +4 -4
- package/table/api/descriptors/column.descriptor.d.ts +1 -1
- package/table/api/descriptors/sort.descriptor.d.ts +2 -2
- package/table/api/descriptors/table.descriptor.d.ts +21 -7
- package/table/components/column-filter/column-filter.component.d.ts +8 -14
- package/table/components/filter/filter-active-tag/filter-active-tag.component.d.ts +5 -5
- package/table/components/filter/filter-form/filter-form.component.d.ts +10 -19
- package/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.d.ts +11 -13
- package/table/components/table/table.component.d.ts +20 -64
- package/table/helpers/filters.d.ts +4 -7
- package/table/helpers/table.d.ts +6 -0
- package/table/index.d.ts +1 -1
- package/table/models/column-preferences.model.d.ts +2 -2
- package/table/models/filter.model.d.ts +14 -2
- package/table/services/table-data.service.d.ts +36 -0
- package/table/services/table-metadata.service.d.ts +31 -0
- package/table/services/table-preferences.service.d.ts +25 -0
- package/tableview/action/components/editor/injector-context/action-editor-injector-context.component.d.ts +4 -7
- package/tableview/action/components/localization/data-language-dropdown.component.d.ts +1 -1
- package/tableview/action/helpers/action-execution.d.ts +7 -0
- package/tableview/action/models/execution/action-instance.model.d.ts +1 -2
- package/tableview/action/services/action-executor.service.d.ts +1 -2
- package/tableview/api/action/descriptors/action-confirmation.descriptor.d.ts +1 -0
- package/tableview/api/action/descriptors/action-editor.descriptor.d.ts +12 -4
- package/tableview/api/action/descriptors/action-link.descriptor.d.ts +1 -0
- package/tableview/api/action/descriptors/action.descriptor.d.ts +5 -3
- package/tableview/api/action/models/execution/action-instance-state.model.d.ts +1 -1
- package/tableview/api/editor/descriptors/field-base.descriptor.d.ts +15 -10
- package/tableview/api/editor/descriptors/field-group.descriptor.d.ts +1 -1
- package/tableview/api/tableview/descriptors/tableview.descriptor.d.ts +6 -4
- package/tableview/editor/components/editor/form-editor.component.d.ts +3 -2
- package/tableview/editor/components/formly/constants.d.ts +1 -0
- package/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.d.ts +1 -1
- package/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +1 -0
- package/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +1 -0
- package/tableview/editor/components/formly/fields/formly-field-type.abstract.component.d.ts +2 -1
- package/tableview/editor/components/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.d.ts +1 -0
- package/tableview/index.d.ts +0 -1
- package/version-info.json +5 -5
- package/esm2022/table/services/data-list.service.mjs +0 -29
- package/esm2022/tableview/action/models/execution/action-instance-state.model.mjs +0 -32
- package/table/services/data-list.service.d.ts +0 -19
- package/tableview/action/models/execution/action-instance-state.model.d.ts +0 -30
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Table, TableColumnReorderEvent, TableFilterEvent, TableLazyLoadEvent, TableRowReorderEvent } from 'primeng/table';
|
|
1
|
+
import { Signal, TemplateRef, Type } from '@angular/core';
|
|
2
|
+
import { Table, TableFilterEvent, TableLazyLoadEvent, TableRowReorderEvent } from 'primeng/table';
|
|
4
3
|
import { ComponentDirective, DataListResult, TemplateDirective } from '@mediusinc/mng-commons/core';
|
|
5
|
-
import { FilterDescriptor } from '@mediusinc/mng-commons/filter';
|
|
6
4
|
import { ColumnDescriptor, ITableDataProvider, TableCellClickEvent, TableDescriptorInst, TableLoadEvent, TableReloadEvent } from '@mediusinc/mng-commons/table/api';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { TableDataService } from '../../services/table-data.service';
|
|
6
|
+
import { TableMetadataService } from '../../services/table-metadata.service';
|
|
7
|
+
import { TablePreferencesService } from '../../services/table-preferences.service';
|
|
9
8
|
import * as i0 from "@angular/core";
|
|
10
|
-
export declare class TableComponent<Item = any, Service = undefined, Sorts = any, Filters extends keyof any = any>
|
|
9
|
+
export declare class TableComponent<Item = any, Service = undefined, Sorts = any, Filters extends keyof any = any> {
|
|
10
|
+
#private;
|
|
11
11
|
private readonly filterKeyPrepend;
|
|
12
|
-
readonly cmpTypeName = "TableComponent";
|
|
13
12
|
private readonly logger;
|
|
14
|
-
private readonly injector;
|
|
15
13
|
private readonly router;
|
|
16
14
|
private readonly route;
|
|
17
15
|
private readonly translate;
|
|
18
16
|
private readonly messageService;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
readonly dataListService: DataListService<any>;
|
|
23
|
-
private readonly defaultFilterDisplayType;
|
|
17
|
+
readonly metadata: TableMetadataService;
|
|
18
|
+
readonly prefs: TablePreferencesService;
|
|
19
|
+
readonly data: TableDataService<Item>;
|
|
24
20
|
descriptorInput: import("@angular/core").InputSignal<TableDescriptorInst<Item, Sorts, Filters>>;
|
|
25
21
|
items: import("@angular/core").InputSignal<Item[] | undefined>;
|
|
26
22
|
result: import("@angular/core").InputSignal<DataListResult<Item> | undefined>;
|
|
@@ -32,6 +28,9 @@ export declare class TableComponent<Item = any, Service = undefined, Sorts = any
|
|
|
32
28
|
selectionEnabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
33
29
|
rowReorderEnabledInput: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
34
30
|
rowReorderEnabled: Signal<boolean>;
|
|
31
|
+
expandedRowKeys: Signal<{
|
|
32
|
+
[key: string]: boolean;
|
|
33
|
+
}>;
|
|
35
34
|
columnLastMinWidth: import("@angular/core").InputSignal<number | undefined>;
|
|
36
35
|
columnsColspan: Signal<number>;
|
|
37
36
|
hasTitleDisplay: Signal<string | Type<any> | TemplateRef<any> | undefined>;
|
|
@@ -50,7 +49,7 @@ export declare class TableComponent<Item = any, Service = undefined, Sorts = any
|
|
|
50
49
|
rowReorder: import("@angular/core").OutputEmitterRef<TableRowReorderEvent>;
|
|
51
50
|
templates: Signal<readonly TemplateDirective[]>;
|
|
52
51
|
components: Signal<readonly ComponentDirective<any>[]>;
|
|
53
|
-
primeTable: Signal<Table>;
|
|
52
|
+
primeTable: Signal<Table | undefined>;
|
|
54
53
|
captionTemplate: Signal<TemplateRef<any> | null>;
|
|
55
54
|
columnCustomLastTemplate: Signal<TemplateRef<any> | null>;
|
|
56
55
|
footerTemplate: Signal<TemplateRef<any> | null>;
|
|
@@ -58,38 +57,21 @@ export declare class TableComponent<Item = any, Service = undefined, Sorts = any
|
|
|
58
57
|
isLazy: Signal<boolean>;
|
|
59
58
|
isPagination: Signal<boolean>;
|
|
60
59
|
useQueryParamsInitialized: import("@angular/core").WritableSignal<boolean>;
|
|
61
|
-
private paginationMode;
|
|
62
60
|
className: Signal<string>;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
private dataProviderSubscription?;
|
|
67
|
-
descriptor: import("@angular/core").WritableSignal<TableDescriptorInst<any, any, any>>;
|
|
68
|
-
private localstorageKey;
|
|
69
|
-
private layoutPrefsSaveCnt;
|
|
70
|
-
private layoutPreferences;
|
|
71
|
-
columns: Signal<ColumnWithPreferences[]>;
|
|
72
|
-
visibleColumns: Signal<ColumnWithPreferences[]>;
|
|
73
|
-
filterDescriptors: Signal<FilterDescriptor<any, any>[]>;
|
|
74
|
-
genericFilterDescriptor: Signal<import("@mediusinc/mng-commons/filter").FilterGenericDescriptor | undefined>;
|
|
75
|
-
private filterDescriptorsFromGeneric;
|
|
61
|
+
visibleColumns: Signal<import("@mediusinc/mng-commons/table").ColumnWithPreferences[]>;
|
|
62
|
+
areColumnsReorderable: Signal<boolean>;
|
|
63
|
+
areColumnsToggleable: Signal<boolean>;
|
|
76
64
|
hasColumnFilters: Signal<boolean>;
|
|
77
|
-
overlayWithTagFilters: Signal<
|
|
78
|
-
private defaultParams;
|
|
65
|
+
overlayWithTagFilters: Signal<import("@mediusinc/mng-commons/table").FilterMetadata[]>;
|
|
79
66
|
anyColumnVisible: Signal<boolean>;
|
|
80
67
|
hasCustomLastColumn: Signal<Type<any> | TemplateRef<any> | null>;
|
|
81
68
|
hasLastColumn: Signal<boolean | Type<any> | TemplateRef<any>>;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
globalSearchParamFromUrl: import("@angular/core").WritableSignal<{
|
|
85
|
-
value: string;
|
|
86
|
-
caseSensitive: boolean;
|
|
87
|
-
} | undefined>;
|
|
69
|
+
private lastLazyLoadEvent?;
|
|
70
|
+
private lastParamsWithDefaults?;
|
|
88
71
|
private lastQueryParams?;
|
|
89
72
|
private navigationOutOfTableInProgress;
|
|
90
73
|
private navigationInTableInProgress;
|
|
91
74
|
constructor();
|
|
92
|
-
ngOnDestroy(): void;
|
|
93
75
|
reload(): void;
|
|
94
76
|
/**
|
|
95
77
|
* @deprecated Use with `TableReloadEvent` object parameter.
|
|
@@ -105,34 +87,8 @@ export declare class TableComponent<Item = any, Service = undefined, Sorts = any
|
|
|
105
87
|
onCellClick(event: Event, col: ColumnDescriptor<any, Item>, item: Item, idx: number): void;
|
|
106
88
|
onSelectionChange(event: Array<Item>): void;
|
|
107
89
|
onRowReorder(event: TableRowReorderEvent): void;
|
|
108
|
-
/**
|
|
109
|
-
* Method is called on column resize
|
|
110
|
-
* @param element event's element
|
|
111
|
-
*/
|
|
112
|
-
onTableColumnResize({ element }: any): void;
|
|
113
90
|
private loadTableWithDataProvider;
|
|
114
91
|
private loadTableFromRouteUpdate;
|
|
115
|
-
private updatePrimeSortAndFilter;
|
|
116
|
-
private createFilterMeta;
|
|
117
|
-
private createSortMeta;
|
|
118
|
-
onColumnToggle(event: MultiSelectChangeEvent): void;
|
|
119
|
-
onColumnToggleAll(): void;
|
|
120
|
-
onColumnReorder(event: TableColumnReorderEvent): void;
|
|
121
|
-
private saveLayoutPreferences;
|
|
122
|
-
private computeDefaultDataListParams;
|
|
123
|
-
private computeColumnsWithLayout;
|
|
124
|
-
/**
|
|
125
|
-
* Reset column order and column visibility to default settings
|
|
126
|
-
*/
|
|
127
|
-
resetDefaultLayout(): void;
|
|
128
|
-
/**
|
|
129
|
-
* Compare the given params with the stored params in the DataListService.
|
|
130
|
-
*
|
|
131
|
-
* @param {DataListParams} params - The params to compare with the stored params.
|
|
132
|
-
*
|
|
133
|
-
* @return {boolean} - True if the given params match the stored params, otherwise false.
|
|
134
|
-
*/
|
|
135
|
-
private compareWithCurrentParams;
|
|
136
92
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any, any, any, any>, never>;
|
|
137
93
|
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; }; "useQueryParams": { "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>;
|
|
138
94
|
}
|
|
@@ -2,8 +2,8 @@ import { PrimeNGConfig, SelectItem } from 'primeng/api';
|
|
|
2
2
|
import { CommonsFilterMetadata, CommonsModuleConfig, CommonsSerializationConfig, FilterMatchModeExtendedType, Nullable, SingleOrArrayType } from '@mediusinc/mng-commons/core';
|
|
3
3
|
import { FilterDescriptor, FilterGenericProperty, FilterTypeEnum } from '@mediusinc/mng-commons/filter';
|
|
4
4
|
import { LookupDataProviderInst } from '@mediusinc/mng-commons/form/api';
|
|
5
|
-
import { FilterDateConfig } from '../models/filter.model';
|
|
6
|
-
export declare function
|
|
5
|
+
import { FilterDateConfig, FilterNumberConfig } from '../models/filter.model';
|
|
6
|
+
export declare function filterGenerateMatchModeOptions(primeConfig: PrimeNGConfig, descriptor: FilterDescriptor<any, any> | undefined, cmpSerCfg?: CommonsSerializationConfig): SelectItem[];
|
|
7
7
|
/**
|
|
8
8
|
* Gets the default match mode for a filter.
|
|
9
9
|
*
|
|
@@ -20,16 +20,13 @@ export declare function filterSetMetadataOnDisplayChange(filter: CommonsFilterMe
|
|
|
20
20
|
displayValue: any;
|
|
21
21
|
value: SingleOrArrayType<Nullable<string | number | boolean | Date>>;
|
|
22
22
|
caseSensitive: boolean | undefined;
|
|
23
|
-
operator?: string
|
|
23
|
+
operator?: string;
|
|
24
24
|
};
|
|
25
25
|
export declare function filterAreDatesEqual(fromDate: Date | string | number, toDate: Date | string | number, filterDateCfg?: FilterDateConfig): boolean;
|
|
26
26
|
export declare function filterApplySerializationConfigToCmp(config: CommonsModuleConfig | null, cmpSerCfg: CommonsSerializationConfig): void;
|
|
27
27
|
export declare function filterAdjustDisplayValueOnMatchModeChange(matchMode?: FilterMatchModeExtendedType, value?: any): any;
|
|
28
28
|
export declare function filterGetDateConfig(descriptor?: FilterDescriptor<any, any>, serCfg?: CommonsSerializationConfig): FilterDateConfig | undefined;
|
|
29
|
-
export declare function filterGetNumberConfig(descriptor?: FilterDescriptor<any, any>):
|
|
30
|
-
fractionsMin: number | undefined;
|
|
31
|
-
fractionsMax: number | undefined;
|
|
32
|
-
} | undefined;
|
|
29
|
+
export declare function filterGetNumberConfig(descriptor?: FilterDescriptor<any, any>): FilterNumberConfig | undefined;
|
|
33
30
|
/**
|
|
34
31
|
* Creates an array of filter descriptors from an array of generic filter properties.
|
|
35
32
|
*
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SortMeta } from 'primeng/api';
|
|
2
|
+
import { CommonsFilterMetadata, DataListParams } from '@mediusinc/mng-commons/core';
|
|
3
|
+
export declare function tableCreateFilterMeta(paramsWithDefaults?: DataListParams): {
|
|
4
|
+
[s: string]: CommonsFilterMetadata;
|
|
5
|
+
};
|
|
6
|
+
export declare function tableCreateSortMeta(paramsWithDefaults?: DataListParams): SortMeta[] | undefined;
|
package/table/index.d.ts
CHANGED
|
@@ -12,6 +12,6 @@ export * from './models/filter.model';
|
|
|
12
12
|
export * from './pipes/filter-value.pipe';
|
|
13
13
|
export * from './pipes/locale-default-row-class.pipe';
|
|
14
14
|
export * from './pipes/table-column-filter-class.pipe';
|
|
15
|
-
export * from './services/data
|
|
15
|
+
export * from './services/table-data.service';
|
|
16
16
|
export * from './services/table-feature-config.token';
|
|
17
17
|
export * from './provide';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { FilterDescriptor } from '@mediusinc/mng-commons/filter';
|
|
2
1
|
import { ColumnDescriptor, SortDescriptor } from '@mediusinc/mng-commons/table/api';
|
|
2
|
+
import { FilterMetadata } from './filter.model';
|
|
3
3
|
export interface ColumnWithPreferences {
|
|
4
4
|
id: string;
|
|
5
5
|
descriptor: ColumnDescriptor<any, any>;
|
|
6
|
-
filter?:
|
|
6
|
+
filter?: FilterMetadata;
|
|
7
7
|
sort?: SortDescriptor<any>;
|
|
8
8
|
disabled: boolean;
|
|
9
9
|
isVisible: boolean;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
import { SelectItem } from 'primeng/api';
|
|
1
2
|
import { CommonsFilterMetadata, FilterMatchModeExtendedType } from '@mediusinc/mng-commons/core';
|
|
2
3
|
import { FilterDescriptor } from '@mediusinc/mng-commons/filter';
|
|
3
|
-
export interface
|
|
4
|
+
export interface FilterMetadata {
|
|
4
5
|
descriptor: FilterDescriptor<any, any>;
|
|
6
|
+
matchModes: SelectItem[];
|
|
7
|
+
defaultMatchMode: FilterMatchModeExtendedType;
|
|
8
|
+
dateConfig?: FilterDateConfig;
|
|
9
|
+
numberConfig?: FilterNumberConfig;
|
|
10
|
+
}
|
|
11
|
+
export interface FilterState extends CommonsFilterMetadata {
|
|
12
|
+
metadata: FilterMetadata;
|
|
5
13
|
}
|
|
6
14
|
export interface FilterFormEmitEvent {
|
|
7
15
|
property: string;
|
|
@@ -10,7 +18,7 @@ export interface FilterFormEmitEvent {
|
|
|
10
18
|
caseSensitive: boolean;
|
|
11
19
|
}
|
|
12
20
|
export interface FilterActiveTagEvent {
|
|
13
|
-
filter:
|
|
21
|
+
filter: FilterState;
|
|
14
22
|
event?: Event;
|
|
15
23
|
}
|
|
16
24
|
export interface FilterDateConfig {
|
|
@@ -22,3 +30,7 @@ export interface FilterDateConfig {
|
|
|
22
30
|
showTime?: boolean;
|
|
23
31
|
showSeconds?: boolean;
|
|
24
32
|
}
|
|
33
|
+
export interface FilterNumberConfig {
|
|
34
|
+
fractionsMin?: number;
|
|
35
|
+
fractionsMax?: number;
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { OnDestroy, Signal } from '@angular/core';
|
|
2
|
+
import { SortMeta } from 'primeng/api';
|
|
3
|
+
import { CommonsFilterMetadata, DataListParams, DataListResult } from '@mediusinc/mng-commons/core';
|
|
4
|
+
import { ITableDataProvider, TablePaginationModeEnum } from '@mediusinc/mng-commons/table/api';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class TableDataService<Item> implements OnDestroy {
|
|
7
|
+
#private;
|
|
8
|
+
readonly params: Signal<DataListParams<string, string> | undefined>;
|
|
9
|
+
readonly sortMeta: Signal<SortMeta[] | undefined>;
|
|
10
|
+
readonly filterMeta: Signal<Record<string, CommonsFilterMetadata>>;
|
|
11
|
+
readonly searchMeta: Signal<{
|
|
12
|
+
value: string;
|
|
13
|
+
caseSensitive: boolean;
|
|
14
|
+
} | undefined>;
|
|
15
|
+
readonly isAllPaginationMetaInitialized: Signal<boolean>;
|
|
16
|
+
readonly paginationMode: Signal<TablePaginationModeEnum>;
|
|
17
|
+
readonly offset: Signal<number>;
|
|
18
|
+
readonly rows: Signal<number | undefined>;
|
|
19
|
+
readonly data: Signal<Item[]>;
|
|
20
|
+
readonly count: Signal<number>;
|
|
21
|
+
readonly loading: Signal<boolean>;
|
|
22
|
+
setDataSources(arrayItems: Signal<Item[] | undefined>, dataListResult: Signal<DataListResult<Item> | undefined>, dataProvider: Signal<ITableDataProvider<Item, any, any, any> | undefined>, manualLoading: Signal<boolean | undefined>): void;
|
|
23
|
+
fetchWithDataProvider(params: DataListParams, onErrorFn: (error: Error) => void): boolean;
|
|
24
|
+
setParams(params: DataListParams, fromQueryParams?: boolean): void;
|
|
25
|
+
/**
|
|
26
|
+
* Compare the given params with the stored params in the DataListService.
|
|
27
|
+
*
|
|
28
|
+
* @param {DataListParams} params - The params to compare with the stored params.
|
|
29
|
+
*
|
|
30
|
+
* @return {boolean} - True if the given params match the stored params, otherwise false.
|
|
31
|
+
*/
|
|
32
|
+
private compareWithCurrentParams;
|
|
33
|
+
ngOnDestroy(): void;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableDataService<any>, never>;
|
|
35
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TableDataService<any>>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Signal } from '@angular/core';
|
|
2
|
+
import { PrimeNGConfig } from 'primeng/api';
|
|
3
|
+
import { CommonsSerializationConfig, DataListParams } from '@mediusinc/mng-commons/core';
|
|
4
|
+
import { FilterDescriptor, FilterDisplayTypeEnum } from '@mediusinc/mng-commons/filter';
|
|
5
|
+
import { TableDescriptorInst } from '@mediusinc/mng-commons/table/api';
|
|
6
|
+
import { FilterMetadata } from '../models/filter.model';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class TableMetadataService {
|
|
9
|
+
#private;
|
|
10
|
+
static readonly cmpTypeName = "TableComponent";
|
|
11
|
+
readonly primeConfig: PrimeNGConfig;
|
|
12
|
+
readonly moduleConfig: import("@mediusinc/mng-commons/core").CommonsModuleConfig | null;
|
|
13
|
+
readonly tableModuleConfig: import("./table-feature-config.token").TableFeatureConfig | null;
|
|
14
|
+
readonly serializationCfg: CommonsSerializationConfig;
|
|
15
|
+
readonly defaultFilterDisplayType: FilterDisplayTypeEnum;
|
|
16
|
+
readonly descriptorFromSource: Signal<TableDescriptorInst<any, any, any> | undefined>;
|
|
17
|
+
readonly descriptor: Signal<TableDescriptorInst<any, any, any>>;
|
|
18
|
+
rowsPerPageOptions: Signal<number[]>;
|
|
19
|
+
readonly filterDescriptors: Signal<FilterDescriptor<any, any>[]>;
|
|
20
|
+
readonly filters: Signal<FilterMetadata[]>;
|
|
21
|
+
readonly genericFilterDescriptor: Signal<import("@mediusinc/mng-commons/filter").FilterGenericDescriptor | undefined>;
|
|
22
|
+
readonly genericFilters: Signal<FilterMetadata[]>;
|
|
23
|
+
readonly searchFields: Signal<string[]>;
|
|
24
|
+
readonly defaultParams: Signal<DataListParams<string, string>>;
|
|
25
|
+
constructor();
|
|
26
|
+
setSignalSources(descriptor: Signal<TableDescriptorInst<any, any>>, searchFields: Signal<string[] | undefined>): void;
|
|
27
|
+
setDescriptor(descriptor: TableDescriptorInst<any, any, any>): void;
|
|
28
|
+
private mapDescriptorToMetadata;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableMetadataService, never>;
|
|
30
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TableMetadataService>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MultiSelectChangeEvent } from 'primeng/multiselect';
|
|
2
|
+
import { TableColumnReorderEvent } from 'primeng/table';
|
|
3
|
+
import { TableLayoutPreferences } from '@mediusinc/mng-commons/table/api';
|
|
4
|
+
import { ColumnWithPreferences } from '../models/column-preferences.model';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class TablePreferencesService {
|
|
7
|
+
#private;
|
|
8
|
+
readonly localstorageKey: import("@angular/core").Signal<string | null>;
|
|
9
|
+
readonly layoutPreferences: import("@angular/core").Signal<TableLayoutPreferences>;
|
|
10
|
+
columnsWithPrefs: import("@angular/core").Signal<ColumnWithPreferences[]>;
|
|
11
|
+
/**
|
|
12
|
+
* Method is called on column resize
|
|
13
|
+
* @param element event's element
|
|
14
|
+
*/
|
|
15
|
+
onColumnResize({ element }: any): void;
|
|
16
|
+
onColumnToggle(event: MultiSelectChangeEvent): void;
|
|
17
|
+
onColumnToggleAll(): void;
|
|
18
|
+
onColumnReorder(event: TableColumnReorderEvent): void;
|
|
19
|
+
/**
|
|
20
|
+
* Reset column order and column visibility to default settings
|
|
21
|
+
*/
|
|
22
|
+
clearLayoutPreferences(): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TablePreferencesService, never>;
|
|
24
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TablePreferencesService>;
|
|
25
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnDestroy
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { DynamicDialogConfig } from 'primeng/dynamicdialog';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { ActionData, IDataProvider, IdType } from '@mediusinc/mng-commons/core';
|
|
@@ -7,7 +7,8 @@ import { FormEditorComponent } from '../../../../editor/components/editor/form-e
|
|
|
7
7
|
import { EditorAutoSaveStatus } from '../../../../editor/models/editor-auto-save-preview.model';
|
|
8
8
|
import { ActionInstance } from '../../../models/execution/action-instance.model';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
|
-
export declare class ActionEditorInjectorContextComponent<Item = any, Service = any> implements
|
|
10
|
+
export declare class ActionEditorInjectorContextComponent<Item = any, Service = any> implements OnDestroy, IActionEditorComponent {
|
|
11
|
+
#private;
|
|
11
12
|
protected readonly ActionActivationTriggerEnum: typeof ActionActivationTriggerEnum;
|
|
12
13
|
readonly actionEditorSubmitTypeSubmit = ActionEditorSubmitTypeEnum.Submit;
|
|
13
14
|
private readonly translate;
|
|
@@ -27,7 +28,7 @@ export declare class ActionEditorInjectorContextComponent<Item = any, Service =
|
|
|
27
28
|
item: import("@angular/core").WritableSignal<Item | undefined>;
|
|
28
29
|
itemId: import("@angular/core").WritableSignal<IdType | undefined>;
|
|
29
30
|
actionData: import("@angular/core").WritableSignal<ActionData | undefined>;
|
|
30
|
-
editorAction: import("@angular/core").
|
|
31
|
+
editorAction: import("@angular/core").Signal<ActionEditorDescriptorInst<Item, Service, Item, Item>>;
|
|
31
32
|
private actions;
|
|
32
33
|
toolbarLeftActions: import("@angular/core").Signal<ActionDescriptorInst<Item, any, Item>[]>;
|
|
33
34
|
toolbarRightActions: import("@angular/core").Signal<ActionDescriptorInst<Item, any, Item>[]>;
|
|
@@ -36,7 +37,6 @@ export declare class ActionEditorInjectorContextComponent<Item = any, Service =
|
|
|
36
37
|
private instance?;
|
|
37
38
|
private instanceStateSubscription?;
|
|
38
39
|
private instanceReactivationSubscription?;
|
|
39
|
-
private dataProvider;
|
|
40
40
|
loading: import("@angular/core").WritableSignal<boolean>;
|
|
41
41
|
private fetchExecutionSubscription?;
|
|
42
42
|
formValue: import("@angular/core").WritableSignal<Item | undefined>;
|
|
@@ -44,9 +44,6 @@ export declare class ActionEditorInjectorContextComponent<Item = any, Service =
|
|
|
44
44
|
autoSaveStatus: import("@angular/core").WritableSignal<EditorAutoSaveStatus | undefined>;
|
|
45
45
|
private submitExecutionSubscription?;
|
|
46
46
|
private lastSubmitItem?;
|
|
47
|
-
private titleSubscription?;
|
|
48
|
-
constructor();
|
|
49
|
-
ngOnInit(): void;
|
|
50
47
|
ngOnDestroy(): void;
|
|
51
48
|
onSubmit(event: FormEditorSubmitEvent<Item>): void;
|
|
52
49
|
cancel(): void;
|
|
@@ -12,7 +12,7 @@ export declare class DataLanguageDropdownComponent<T = any> implements IActionCo
|
|
|
12
12
|
enabled: import("@angular/core").InputSignal<boolean>;
|
|
13
13
|
loading: import("@angular/core").InputSignal<boolean>;
|
|
14
14
|
trigger: import("@angular/core").OutputEmitterRef<ActionParameters<T>>;
|
|
15
|
-
selectionItemsDataProvider: import("@angular/core").Signal<LookupDataProviderInst<string, any, number | typeof Symbol.iterator | "length" | "toString" | "concat" | "slice" | "indexOf" | "lastIndexOf" | "includes" | "at" | "valueOf" | "
|
|
15
|
+
selectionItemsDataProvider: import("@angular/core").Signal<LookupDataProviderInst<string, any, number | typeof Symbol.iterator | "length" | "toString" | "concat" | "slice" | "indexOf" | "lastIndexOf" | "includes" | "at" | "valueOf" | "replace" | "charAt" | "charCodeAt" | "localeCompare" | "match" | "search" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "substr" | "codePointAt" | "endsWith" | "normalize" | "repeat" | "startsWith" | "anchor" | "big" | "blink" | "bold" | "fixed" | "fontcolor" | "fontsize" | "italics" | "link" | "small" | "strike" | "sub" | "sup" | "padStart" | "padEnd" | "trimEnd" | "trimStart" | "trimLeft" | "trimRight" | "matchAll" | "replaceAll", number | typeof Symbol.iterator | "length" | "toString" | "concat" | "slice" | "indexOf" | "lastIndexOf" | "includes" | "at" | "valueOf" | "replace" | "charAt" | "charCodeAt" | "localeCompare" | "match" | "search" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "substr" | "codePointAt" | "endsWith" | "normalize" | "repeat" | "startsWith" | "anchor" | "big" | "blink" | "bold" | "fixed" | "fontcolor" | "fontsize" | "italics" | "link" | "small" | "strike" | "sub" | "sup" | "padStart" | "padEnd" | "trimEnd" | "trimStart" | "trimLeft" | "trimRight" | "matchAll" | "replaceAll", import("@mediusinc/mng-commons/core").ClassOptType<string>, import("@mediusinc/mng-commons/core").ServiceClassOptType<any>>>;
|
|
16
16
|
updateDataLocale(dataLang: string): void;
|
|
17
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<DataLanguageDropdownComponent<any>, never>;
|
|
18
18
|
static ɵcmp: i0.ɵɵComponentDeclaration<DataLanguageDropdownComponent<any>, "mng-data-language-dropdown", never, { "action": { "alias": "action"; "required": true; "isSignal": true; }; "actionData": { "alias": "actionData"; "required": true; "isSignal": true; }; "item": { "alias": "item"; "required": true; "isSignal": true; }; "itemId": { "alias": "itemId"; "required": true; "isSignal": true; }; "enabled": { "alias": "enabled"; "required": true; "isSignal": true; }; "loading": { "alias": "loading"; "required": true; "isSignal": true; }; }, { "trigger": "trigger"; }, never, never, true, never>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IDataProvider } from '@mediusinc/mng-commons/core';
|
|
2
|
+
import { ActionDescriptorInst, IViewContainer } from '@mediusinc/mng-commons/tableview/api';
|
|
3
|
+
import { ActionDataProviderSource } from '../models/execution/action-context.model';
|
|
4
|
+
export declare function actionExecutionSelectDataProvider<Item, Service>(action: ActionDescriptorInst<Item, Service>, dataProvider?: IDataProvider<Item, Service>, viewContainer?: IViewContainer<any, any> | null): {
|
|
5
|
+
dataProvider?: IDataProvider<Item, Service>;
|
|
6
|
+
source: ActionDataProviderSource;
|
|
7
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
2
2
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
3
3
|
import { ActionParameters } from '@mediusinc/mng-commons/core';
|
|
4
|
-
import { ActionDescriptorInst, ActionExecutionError, IActionEditorComponent, IActionInstance } from '@mediusinc/mng-commons/tableview/api';
|
|
4
|
+
import { ActionDescriptorInst, ActionExecutionError, ActionInstanceStateEnum, IActionEditorComponent, IActionInstance } from '@mediusinc/mng-commons/tableview/api';
|
|
5
5
|
import { ActionContext } from './action-context.model';
|
|
6
|
-
import { ActionInstanceStateEnum } from './action-instance-state.model';
|
|
7
6
|
/**
|
|
8
7
|
* Action execution instance containing data about execution state of action
|
|
9
8
|
*/
|
|
@@ -4,9 +4,8 @@ import { TranslateService } from '@ngx-translate/core';
|
|
|
4
4
|
import { ConfirmationService, MessageService } from 'primeng/api';
|
|
5
5
|
import { DialogService } from 'primeng/dynamicdialog';
|
|
6
6
|
import { ActionParameters, CommonsService, ICommonsError, IDataProvider, LoggerService, ParametrizePipe } from '@mediusinc/mng-commons/core';
|
|
7
|
-
import { ActionContextValidation, ActionDescriptorInst, ActionEditorDescriptorInst, DataProviderExecutor, IActionEditorComponent, IActionInstance } from '@mediusinc/mng-commons/tableview/api';
|
|
7
|
+
import { ActionContextValidation, ActionDescriptorInst, ActionEditorDescriptorInst, ActionInstanceStateEnum, DataProviderExecutor, IActionEditorComponent, IActionInstance } from '@mediusinc/mng-commons/tableview/api';
|
|
8
8
|
import { ActionContext } from '../models/execution/action-context.model';
|
|
9
|
-
import { ActionInstanceStateEnum } from '../models/execution/action-instance-state.model';
|
|
10
9
|
import { ActionInstance } from '../models/execution/action-instance.model';
|
|
11
10
|
import { ActionErrorMapperService } from './action-error-mapper.service';
|
|
12
11
|
import { NavigationService } from './navigation.service';
|
|
@@ -32,5 +32,6 @@ export declare class ActionConfirmationDescriptor<Model> {
|
|
|
32
32
|
get runConfirmationConfigMapFn(): ConfigurationConfigMapFn<Model> | undefined;
|
|
33
33
|
get acceptButton(): ActionButtonDescriptor;
|
|
34
34
|
get rejectButton(): ActionButtonDescriptor | undefined;
|
|
35
|
+
copy(): ActionConfirmationDescriptor<Model>;
|
|
35
36
|
}
|
|
36
37
|
export type ConfigurationConfigMapFn<Item> = (ctx: IActionContext<Item, any>, confirmConfig: Confirmation) => Confirmation;
|
|
@@ -9,6 +9,7 @@ import { IActionContext } from '../models/execution/action-context.model';
|
|
|
9
9
|
import { ActionDescriptorCreateOptsParentType, ActionDescriptorInst } from './action.descriptor';
|
|
10
10
|
export type ActionEditorDescriptorConstructorOptsType<Model, Service> = ActionDescriptorCreateOptsParentType & ActionEditorDescriptorCreateOptsProviderType<Model, Service> & {
|
|
11
11
|
model?: ModelDescriptor<Model>;
|
|
12
|
+
isTableviewMainEditor?: boolean;
|
|
12
13
|
};
|
|
13
14
|
export type ActionEditorDescriptorCreateOptsProviderType<Model, Service> = {
|
|
14
15
|
serviceType?: ServiceClassType<Service>;
|
|
@@ -17,6 +18,7 @@ export type ActionEditorDescriptorCreateOptsProviderType<Model, Service> = {
|
|
|
17
18
|
export declare class ActionEditorDescriptorInst<Item, Service = any, FetchInputItem = Item, SubmitReturnItem = Item> extends ActionDescriptorInst<Item, Service> {
|
|
18
19
|
private readonly _editorDescriptor;
|
|
19
20
|
protected readonly _dataProvider?: IEditorDataProvider<Item, any>;
|
|
21
|
+
protected readonly _isTableviewMainEditor: boolean;
|
|
20
22
|
protected _editorActions: ActionDescriptorInst<Item>[];
|
|
21
23
|
protected _editorTitle?: string | null;
|
|
22
24
|
protected _editorTitleParams?: any;
|
|
@@ -32,6 +34,7 @@ export declare class ActionEditorDescriptorInst<Item, Service = any, FetchInputI
|
|
|
32
34
|
protected _resubmitRefetch: boolean;
|
|
33
35
|
protected _unsavedChangesConfirmation: boolean;
|
|
34
36
|
constructor(editorDescriptor: EditorDescriptorInst<Item, any>, actionName: string, cfg?: ActionEditorDescriptorConstructorOptsType<Item, Service>);
|
|
37
|
+
get isTableviewMainEditor(): boolean;
|
|
35
38
|
get editorTitle(): string | null | undefined;
|
|
36
39
|
get editorTitleParams(): any;
|
|
37
40
|
get editorDescriptor(): EditorDescriptorInst<Item, any>;
|
|
@@ -44,9 +47,9 @@ export declare class ActionEditorDescriptorInst<Item, Service = any, FetchInputI
|
|
|
44
47
|
get hasRunFunction(): boolean;
|
|
45
48
|
get runFunction(): (ctx: IActionContext<Item, unknown>) => Observable<Item>;
|
|
46
49
|
get hasFetchFunction(): boolean;
|
|
47
|
-
get fetchFunction(): ((ctx: IActionContext<Item, Service
|
|
50
|
+
get fetchFunction(): ((ctx: IActionContext<Item, Service>) => Observable<Item>) | undefined;
|
|
48
51
|
get hasSubmitFunction(): boolean;
|
|
49
|
-
get submitFunction(): ((ctx: IActionContext<Item, Service
|
|
52
|
+
get submitFunction(): ((ctx: IActionContext<Item, Service>) => Observable<Item>) | undefined;
|
|
50
53
|
get editorActions(): ActionDescriptorInst<Item, any, Item>[];
|
|
51
54
|
get editorComponent(): Type<any> | undefined;
|
|
52
55
|
get resubmitEnabled(): boolean | undefined;
|
|
@@ -72,12 +75,14 @@ export declare class ActionEditorDescriptorInst<Item, Service = any, FetchInputI
|
|
|
72
75
|
*/
|
|
73
76
|
withResubmit(enabled?: boolean, refetch?: boolean): this;
|
|
74
77
|
withUnsavedChangesConfirmation(unsavedChangesConfirmation?: boolean): this;
|
|
78
|
+
copyFieldsTo(descriptor: ActionEditorDescriptorInst<Item, Service, FetchInputItem, SubmitReturnItem>): ActionEditorDescriptorInst<Item, Service, FetchInputItem, SubmitReturnItem>;
|
|
79
|
+
copy(): ActionEditorDescriptorInst<Item, Service, FetchInputItem, SubmitReturnItem>;
|
|
75
80
|
}
|
|
76
81
|
export declare class ActionEditorSubmitDescriptorInst<Model> extends ActionDescriptorInst<Model> {
|
|
77
|
-
private readonly _editorAction;
|
|
78
82
|
private readonly _submitType;
|
|
79
|
-
constructor(
|
|
83
|
+
constructor(editorActionName: string, editorActionModel: ModelDescriptor<Model> | undefined, submitType?: ActionEditorSubmitTypeEnum);
|
|
80
84
|
get submitType(): ActionEditorSubmitTypeEnum;
|
|
85
|
+
copy(): ActionEditorSubmitDescriptorInst<Model>;
|
|
81
86
|
}
|
|
82
87
|
/**
|
|
83
88
|
* creates primary action with primary button style
|
|
@@ -94,12 +99,15 @@ export declare function actionEditorCancel<Model>(editorAction: ActionEditorDesc
|
|
|
94
99
|
export declare class ActionEditorDetailsDescriptorInst<Model, Service = any> extends ActionEditorDescriptorInst<Model, Service> {
|
|
95
100
|
static readonly ACTION_NAME = "details";
|
|
96
101
|
constructor(editorDescriptor: EditorDescriptorInst<Model, any>, cfg?: ActionEditorDescriptorCreateOptsProviderType<Model, Service>);
|
|
102
|
+
copy(): ActionEditorDetailsDescriptorInst<Model, Service>;
|
|
97
103
|
}
|
|
98
104
|
export declare class ActionEditorAddDescriptorInst<Model, Service = any> extends ActionEditorDescriptorInst<Model, Service> {
|
|
99
105
|
static readonly ACTION_NAME = "add";
|
|
100
106
|
constructor(editorDescriptor: EditorDescriptorInst<Model, any>, cfg?: ActionEditorDescriptorCreateOptsProviderType<Model, Service>);
|
|
107
|
+
copy(): ActionEditorAddDescriptorInst<Model, Service>;
|
|
101
108
|
}
|
|
102
109
|
export declare class ActionEditorEditDescriptorInst<Model, Service = any> extends ActionEditorDescriptorInst<Model, Service> {
|
|
103
110
|
static readonly ACTION_NAME = "edit";
|
|
104
111
|
constructor(editorDescriptor: EditorDescriptorInst<Model, any>, cfg?: ActionEditorDescriptorCreateOptsProviderType<Model, Service>);
|
|
112
|
+
copy(): ActionEditorEditDescriptorInst<Model, Service>;
|
|
105
113
|
}
|
|
@@ -23,4 +23,5 @@ export declare class ActionLinkDescriptorInst<Model> extends ActionDescriptorIns
|
|
|
23
23
|
withReplaceUrl(replaceUrl?: boolean): this;
|
|
24
24
|
withTarget(target?: '_self' | '_blank'): this;
|
|
25
25
|
withStyleLink(isStyleLink: boolean): this;
|
|
26
|
+
copy(): ActionLinkDescriptorInst<Model>;
|
|
26
27
|
}
|
|
@@ -78,8 +78,8 @@ export declare class ActionDescriptorInst<Item, Service = any, ReturnItem = Item
|
|
|
78
78
|
get hasRunNotificationError(): boolean;
|
|
79
79
|
get runNotificationErrorTitle(): string | undefined;
|
|
80
80
|
get runNotificationErrorMessage(): string | undefined;
|
|
81
|
-
get afterRunAction(): ActionDescriptorInst<any, any, any> | ((ctx: IActionContext<Item, any
|
|
82
|
-
get onRunErrorAction(): ActionDescriptorInst<Item, any, Item> | ((ctx: IActionContext<Item, any
|
|
81
|
+
get afterRunAction(): ActionDescriptorInst<any, any, any> | ((ctx: IActionContext<Item, any>) => ActionDescriptorInst<any>) | undefined;
|
|
82
|
+
get onRunErrorAction(): ActionDescriptorInst<Item, any, Item> | ((ctx: IActionContext<Item, any>) => ActionDescriptorInst<Item>) | undefined;
|
|
83
83
|
get permissions(): APermissions | undefined;
|
|
84
84
|
get tableviewCategory(): string | undefined;
|
|
85
85
|
get hasItemsSelection(): boolean;
|
|
@@ -119,9 +119,11 @@ export declare class ActionDescriptorInst<Item, Service = any, ReturnItem = Item
|
|
|
119
119
|
withI18nBase(base: ClassType<unknown> | string): this;
|
|
120
120
|
withSubactionsAsMenu(subactionsAsMenu?: boolean): this;
|
|
121
121
|
withSubactions(...subactions: Array<ActionDescriptorInst<Item>>): this;
|
|
122
|
-
|
|
122
|
+
copyFieldsTo(descriptor: ActionDescriptorInst<Item, Service, ReturnItem>): ActionDescriptorInst<Item, Service, ReturnItem>;
|
|
123
|
+
copy(): ActionDescriptorInst<Item, Service, ReturnItem>;
|
|
123
124
|
}
|
|
124
125
|
export declare class ActionDeleteDescriptorInst<Item, Service = any> extends ActionDescriptorInst<Item, Service> {
|
|
125
126
|
static readonly ACTION_NAME = "delete";
|
|
126
127
|
constructor(model: ModelDescriptor<Item>, cfg?: ActionDescriptorCreateOptsProviderType<Item, Service>);
|
|
128
|
+
copy(): ActionDeleteDescriptorInst<Item, Service>;
|
|
127
129
|
}
|
|
@@ -20,6 +20,8 @@ export declare abstract class AGenericFieldDescriptor {
|
|
|
20
20
|
export declare abstract class AFieldDescriptor<FieldModel, EditorModel, FieldValue = FieldModel, ParentEditorModel = undefined> extends AGenericFieldDescriptor {
|
|
21
21
|
/** @ignore */ protected readonly _property: string;
|
|
22
22
|
/** @ignore */ protected _label?: string | null;
|
|
23
|
+
/** @ignore */ protected _labelInfoTooltip?: string;
|
|
24
|
+
/** @ignore */ protected _labelInfoTooltipIcon?: string;
|
|
23
25
|
/** @ignore */ protected _placeholder?: string;
|
|
24
26
|
/** @ignore */ protected _helpText?: string;
|
|
25
27
|
/** @ignore */ protected _required: boolean;
|
|
@@ -53,6 +55,8 @@ export declare abstract class AFieldDescriptor<FieldModel, EditorModel, FieldVal
|
|
|
53
55
|
get label(): string | null | undefined;
|
|
54
56
|
get placeholder(): string | undefined;
|
|
55
57
|
get helpText(): string | undefined;
|
|
58
|
+
get labelInfoTooltip(): string | undefined;
|
|
59
|
+
get labelInfoTooltipIcon(): string | undefined;
|
|
56
60
|
get required(): boolean;
|
|
57
61
|
get requiredHideLabelMarker(): boolean;
|
|
58
62
|
get disabled(): boolean;
|
|
@@ -61,15 +65,9 @@ export declare abstract class AFieldDescriptor<FieldModel, EditorModel, FieldVal
|
|
|
61
65
|
get setter(): ((item: EditorModel, value: FieldValue) => void) | undefined;
|
|
62
66
|
get validations(): FieldValidationDescriptor<any, any, any>[];
|
|
63
67
|
get asyncValidations(): FieldValidationDescriptor<any, any, any>[];
|
|
64
|
-
get requiredExpression(): string | Observable<boolean> | ((field?: FormlyFieldConfig
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
get disabledExpression(): string | Observable<boolean> | ((field?: FormlyFieldConfig<import("@ngx-formly/core").FormlyFieldProps & {
|
|
68
|
-
[additionalProperties: string]: any;
|
|
69
|
-
}> | undefined) => boolean) | undefined;
|
|
70
|
-
get hiddenExpression(): string | Observable<boolean> | ((field?: FormlyFieldConfig<import("@ngx-formly/core").FormlyFieldProps & {
|
|
71
|
-
[additionalProperties: string]: any;
|
|
72
|
-
}> | undefined) => boolean) | undefined;
|
|
68
|
+
get requiredExpression(): string | Observable<boolean> | ((field?: FormlyFieldConfig) => boolean) | undefined;
|
|
69
|
+
get disabledExpression(): string | Observable<boolean> | ((field?: FormlyFieldConfig) => boolean) | undefined;
|
|
70
|
+
get hiddenExpression(): string | Observable<boolean> | ((field?: FormlyFieldConfig) => boolean) | undefined;
|
|
73
71
|
get hiddenResetOnHide(): boolean | undefined;
|
|
74
72
|
get updateOn(): "change" | "blur" | "submit";
|
|
75
73
|
get onInit(): CommonsFormlyHookFn<FieldValue, EditorModel> | undefined;
|
|
@@ -77,7 +75,7 @@ export declare abstract class AFieldDescriptor<FieldModel, EditorModel, FieldVal
|
|
|
77
75
|
get afterContentInit(): CommonsFormlyHookFn<FieldValue, EditorModel> | undefined;
|
|
78
76
|
get afterViewInit(): CommonsFormlyHookFn<FieldValue, EditorModel> | undefined;
|
|
79
77
|
get onDestroy(): CommonsFormlyHookFn<FieldValue, EditorModel> | undefined;
|
|
80
|
-
get onValueChange(): ((field: CommonsFormlyFieldConfig<FieldValue, EditorModel
|
|
78
|
+
get onValueChange(): ((field: CommonsFormlyFieldConfig<FieldValue, EditorModel>, value: any) => void) | undefined;
|
|
81
79
|
get className(): string;
|
|
82
80
|
get fieldClassName(): string | undefined;
|
|
83
81
|
get labelClassName(): string | undefined;
|
|
@@ -90,6 +88,13 @@ export declare abstract class AFieldDescriptor<FieldModel, EditorModel, FieldVal
|
|
|
90
88
|
withLabel(label: string | null): this;
|
|
91
89
|
withPlaceholder(placeholder: string): this;
|
|
92
90
|
withHelpText(helpText: string): this;
|
|
91
|
+
/**
|
|
92
|
+
* Sets the label tooltip and optionally a custom icon for the field.
|
|
93
|
+
*
|
|
94
|
+
* @param {string} tooltip - The tooltip text to be displayed.
|
|
95
|
+
* @param {string} [customIcon] - An optional custom icon to be used for the tooltip. If not provided, the default icon is used.
|
|
96
|
+
*/
|
|
97
|
+
withLabelInfoTooltip(tooltip: string, customIcon?: string): this;
|
|
93
98
|
withRequired(required?: boolean, requiredExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>, hideLabelMarker?: boolean): this;
|
|
94
99
|
withDisabled(disabled?: boolean, disabledExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this;
|
|
95
100
|
withHidden(hiddenExpression: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>, resetOnHide?: boolean): this;
|
|
@@ -19,7 +19,7 @@ export declare abstract class AFieldGroupDescriptor<EditorModel, ParentEditorMod
|
|
|
19
19
|
get validations(): FieldValidationDescriptor<any, any, any>[];
|
|
20
20
|
get name(): string;
|
|
21
21
|
get default(): boolean;
|
|
22
|
-
get hiddenExpression(): string | Observable<boolean> | ((field?: CommonsFormlyFieldConfig<EditorModel, EditorModel
|
|
22
|
+
get hiddenExpression(): string | Observable<boolean> | ((field?: CommonsFormlyFieldConfig<EditorModel, EditorModel>) => boolean) | undefined;
|
|
23
23
|
abstract addField(field: AGenericFieldDescriptor): this;
|
|
24
24
|
abstract copy(): AFieldGroupDescriptor<EditorModel, ParentEditorModel>;
|
|
25
25
|
withTitle(title?: string | null): this;
|