@mediusinc/mng-commons 7.0.0-rc.0 → 7.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/index.d.ts +8 -8
- package/fesm2022/mediusinc-mng-commons-core.mjs +2 -6
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-filter.mjs +20 -0
- package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form.mjs +94 -11
- package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-api.mjs +0 -2
- package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
- package/fesm2022/{mediusinc-mng-commons-table-column-toggle.component-Dvenjj9n.mjs → mediusinc-mng-commons-table-column-toggle.component-0Dtv48mq.mjs} +2 -2
- package/fesm2022/{mediusinc-mng-commons-table-column-toggle.component-Dvenjj9n.mjs.map → mediusinc-mng-commons-table-column-toggle.component-0Dtv48mq.mjs.map} +1 -1
- package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-BsAwyXiN.mjs +2417 -0
- package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-BsAwyXiN.mjs.map +1 -0
- package/fesm2022/mediusinc-mng-commons-table.mjs +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +16 -3
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +43 -47
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/filter/index.d.ts +16 -3
- package/form/index.d.ts +48 -6
- package/i18n/en.json +5 -2
- package/i18n/sl.json +5 -2
- package/package.json +1 -1
- package/table/api/index.d.ts +2 -2
- package/table/index.d.ts +161 -126
- package/tableview/api/index.d.ts +1 -3
- package/tableview/index.d.ts +24 -33
- package/version-info.json +5 -5
- package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-DFcdSUCN.mjs +0 -2142
- package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-DFcdSUCN.mjs.map +0 -1
package/table/index.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import * as primeng_api from 'primeng/api';
|
|
2
2
|
import { SelectItem, SortMeta, MessageService, ToastMessageOptions } from 'primeng/api';
|
|
3
3
|
import * as _angular_core from '@angular/core';
|
|
4
|
-
import { OnDestroy, Signal, TemplateRef,
|
|
4
|
+
import { OnDestroy, Signal, TemplateRef, PipeTransform, InjectionToken, Provider } from '@angular/core';
|
|
5
5
|
import * as _mediusinc_mng_commons_core from '@mediusinc/mng-commons/core';
|
|
6
|
-
import { FilterMatchModeExtendedType,
|
|
6
|
+
import { FilterMatchModeExtendedType, FilterState, FilterMatchMode, ILookupDataProvider, TemplateDirective, DataListParams, DataListResult, CommonsSerializationConfig, CommonsModuleConfig, CommonsFeature } from '@mediusinc/mng-commons/core';
|
|
7
7
|
import * as _mediusinc_mng_commons_filter from '@mediusinc/mng-commons/filter';
|
|
8
8
|
import { FilterDescriptor, FilterLookupTypeEnum, FilterTypeEnum, FilterLookupDescriptor, FilterGenericDescriptor, FilterDisplayTypeEnum, FilterGenericProperty } from '@mediusinc/mng-commons/filter';
|
|
9
|
-
import { ColumnDisplayTypeEnum, ColumnDescriptor, TablePaginationModeEnum, ITableDataProvider, TableDescriptorInst, SortDescriptor, TableLayoutPreferences, TableLoadEvent, TableCellClickEvent, TableReloadEvent } from '@mediusinc/mng-commons/table/api';
|
|
10
9
|
import { ModelDescriptor } from '@mediusinc/mng-commons/model';
|
|
10
|
+
import { ColumnDisplayTypeEnum, ColumnDescriptor, TablePaginationModeEnum, ITableDataProvider, TableDescriptorInst, SortDescriptor, TableLayoutPreferences, TableLoadEvent, TableCellClickEvent, TableReloadEvent } from '@mediusinc/mng-commons/table/api';
|
|
11
11
|
import { NgForm } from '@angular/forms';
|
|
12
12
|
import { Popover } from 'primeng/popover';
|
|
13
13
|
import * as _mediusinc_mng_commons_table from '@mediusinc/mng-commons/table';
|
|
14
|
-
import { TableColumnReorderEvent, TableRowReorderEvent,
|
|
14
|
+
import { Table, TableColumnReorderEvent, TableRowReorderEvent, TableLazyLoadEvent, TableFilterEvent } from 'primeng/table';
|
|
15
15
|
import { PrimeNG } from 'primeng/config';
|
|
16
16
|
import { MultiSelectChangeEvent } from 'primeng/multiselect';
|
|
17
17
|
import { LookupDataProviderInst } from '@mediusinc/mng-commons/form/api';
|
|
18
18
|
import { TranslateService } from '@ngx-translate/core';
|
|
19
19
|
import { ReplaySubject, Observable } from 'rxjs';
|
|
20
20
|
|
|
21
|
-
interface
|
|
21
|
+
interface FilterConfig {
|
|
22
22
|
descriptor: FilterDescriptor<any, any>;
|
|
23
23
|
matchModes: SelectItem[];
|
|
24
24
|
defaultMatchMode: FilterMatchModeExtendedType;
|
|
25
25
|
dateConfig?: FilterDateConfig;
|
|
26
26
|
numberConfig?: FilterNumberConfig;
|
|
27
27
|
}
|
|
28
|
-
interface
|
|
29
|
-
|
|
28
|
+
interface FilterStateWithConfig extends FilterState {
|
|
29
|
+
config: FilterConfig;
|
|
30
30
|
}
|
|
31
31
|
interface FilterFormEmitEvent {
|
|
32
32
|
property: string;
|
|
@@ -35,7 +35,7 @@ interface FilterFormEmitEvent {
|
|
|
35
35
|
caseSensitive: boolean;
|
|
36
36
|
}
|
|
37
37
|
interface FilterActiveTagEvent {
|
|
38
|
-
filter:
|
|
38
|
+
filter: FilterStateWithConfig;
|
|
39
39
|
event?: Event;
|
|
40
40
|
}
|
|
41
41
|
interface FilterDateConfig {
|
|
@@ -52,81 +52,71 @@ interface FilterNumberConfig {
|
|
|
52
52
|
fractionsMax?: number;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
declare class FilterService {
|
|
56
|
+
#private;
|
|
57
|
+
readonly state: _angular_core.Signal<FilterState | undefined>;
|
|
58
|
+
readonly isActive: _angular_core.Signal<boolean>;
|
|
59
|
+
constructor();
|
|
60
|
+
setConfig(config: FilterConfig): void;
|
|
61
|
+
setMatchMode(displayMatchMode: FilterMatchModeExtendedType): void;
|
|
62
|
+
toggleCaseSensitivity(): void;
|
|
63
|
+
clear(): void;
|
|
64
|
+
setDisplayValue(displayValue: any): void;
|
|
65
|
+
setState(state?: FilterState): void;
|
|
66
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FilterService, never>;
|
|
67
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FilterService>;
|
|
68
|
+
}
|
|
69
|
+
|
|
55
70
|
/**
|
|
56
71
|
* Cannot be on push change detection strategy because of filter updates triggered from route which causes to force update values in force metadata
|
|
57
72
|
* and these must be propagated through to this component and beyond to primeNG.
|
|
58
73
|
*/
|
|
59
|
-
declare class
|
|
74
|
+
declare class TableFilterComponent implements OnDestroy {
|
|
75
|
+
#private;
|
|
60
76
|
readonly lookupTypeDropdown: FilterLookupTypeEnum;
|
|
61
77
|
readonly lookupTypeAutocomplete: FilterLookupTypeEnum;
|
|
62
78
|
readonly FilterTypeEnum: typeof FilterTypeEnum;
|
|
63
79
|
readonly FilterMatchMode: typeof FilterMatchMode;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
private readonly
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
isFilterSet: _angular_core.Signal<boolean>;
|
|
79
|
-
isInputDisabled: _angular_core.Signal<boolean>;
|
|
80
|
-
overlayVisible: _angular_core.WritableSignal<boolean>;
|
|
81
|
-
isMultiselect: _angular_core.Signal<boolean>;
|
|
82
|
-
private overlaySubscription?;
|
|
83
|
-
private overlay;
|
|
84
|
-
private scrollHandler?;
|
|
85
|
-
private documentClickListener;
|
|
86
|
-
private documentResizeListener;
|
|
87
|
-
private resetSubscription?;
|
|
88
|
-
private selfClick?;
|
|
89
|
-
private overlayEventListener;
|
|
90
|
-
private readonly window;
|
|
91
|
-
private numericValueFromModelChange;
|
|
92
|
-
private dateDebounceSubject;
|
|
80
|
+
protected readonly filter: FilterService;
|
|
81
|
+
readonly config: _angular_core.InputSignal<FilterConfig>;
|
|
82
|
+
readonly model: _angular_core.InputSignal<ModelDescriptor<any>>;
|
|
83
|
+
readonly showFilterIcon: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
84
|
+
readonly showTitleAsPlaceholder: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
85
|
+
protected readonly descriptorAsLookup: _angular_core.Signal<FilterLookupDescriptor<any, any, any, any, string | number | symbol, string | number | symbol> | undefined>;
|
|
86
|
+
private readonly icon;
|
|
87
|
+
protected readonly matchModes: _angular_core.Signal<primeng_api.SelectItem<any>[]>;
|
|
88
|
+
protected readonly isInputDisabled: _angular_core.Signal<boolean>;
|
|
89
|
+
protected readonly overlayVisible: _angular_core.WritableSignal<boolean>;
|
|
90
|
+
protected readonly isMultiselect: _angular_core.Signal<boolean>;
|
|
91
|
+
protected readonly placeholderKey: _angular_core.Signal<string>;
|
|
92
|
+
protected readonly booleanOptions: BooleanFilterDropdownItem[];
|
|
93
|
+
protected readonly noFilterLabel: _angular_core.WritableSignal<any>;
|
|
93
94
|
constructor();
|
|
94
95
|
ngOnDestroy(): void;
|
|
95
|
-
onTextModelChange(event: Event): void;
|
|
96
|
-
onTextInputEnterKeyDown(event: Event): void;
|
|
97
|
-
onNumericModelChange(value: number | null): void;
|
|
98
|
-
onNumericInputKeyDown(event: KeyboardEvent): void;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
autocompleteFilter(value: any): void;
|
|
102
|
-
dropdownFilter(value: any): void;
|
|
103
|
-
onMatchModeChange(displayMatchMode: FilterMatchModeExtendedType): void;
|
|
104
|
-
onMatchModeKeyDown(event: KeyboardEvent): void;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
private bindDocumentResizeListener;
|
|
120
|
-
private unbindDocumentResizeListener;
|
|
121
|
-
private bindScrollListener;
|
|
122
|
-
private unbindScrollListener;
|
|
123
|
-
private hideOverlay;
|
|
124
|
-
private onOverlayHide;
|
|
125
|
-
private updateFilterOnDisplayValueChange;
|
|
126
|
-
private initFilterConstraint;
|
|
127
|
-
private setFilterConstraint;
|
|
128
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableColumnFilterComponent, never>;
|
|
129
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TableColumnFilterComponent, "mng-table-column-filter", never, { "metadata": { "alias": "metadata"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
96
|
+
protected onTextModelChange(event: Event): void;
|
|
97
|
+
protected onTextInputEnterKeyDown(event: Event): void;
|
|
98
|
+
protected onNumericModelChange(value: number | null): void;
|
|
99
|
+
protected onNumericInputKeyDown(event: KeyboardEvent): void;
|
|
100
|
+
protected onDateFilterModelChange(value: Date | Date[] | null): void;
|
|
101
|
+
protected booleanFilter(value: any): void;
|
|
102
|
+
protected autocompleteFilter(value: any): void;
|
|
103
|
+
protected dropdownFilter(value: any): void;
|
|
104
|
+
protected onMatchModeChange(displayMatchMode: FilterMatchModeExtendedType): void;
|
|
105
|
+
protected onMatchModeKeyDown(event: KeyboardEvent): void;
|
|
106
|
+
protected onCaseSensitivityToggle(): void;
|
|
107
|
+
protected clear(): void;
|
|
108
|
+
protected toggleMenu(event: Event): void;
|
|
109
|
+
protected onToggleButtonKeyDown(event: KeyboardEvent): void;
|
|
110
|
+
protected onEscape(): void;
|
|
111
|
+
protected onContentClick(): void;
|
|
112
|
+
protected onOverlayAnimationStart(event: any): void;
|
|
113
|
+
protected onOverlayAnimationEnd(event: any): void;
|
|
114
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableFilterComponent, never>;
|
|
115
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TableFilterComponent, "mng-table-filter", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; "model": { "alias": "model"; "required": true; "isSignal": true; }; "showFilterIcon": { "alias": "showFilterIcon"; "required": false; "isSignal": true; }; "showTitleAsPlaceholder": { "alias": "showTitleAsPlaceholder"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
116
|
+
}
|
|
117
|
+
interface BooleanFilterDropdownItem {
|
|
118
|
+
label: string;
|
|
119
|
+
value: boolean;
|
|
130
120
|
}
|
|
131
121
|
|
|
132
122
|
declare class TableColumnValueComponent<T, TT> {
|
|
@@ -164,13 +154,14 @@ declare class TableColumnValueComponent<T, TT> {
|
|
|
164
154
|
declare class TableFilterActiveTagComponent {
|
|
165
155
|
readonly FilterMatchMode: typeof FilterMatchMode;
|
|
166
156
|
model: _angular_core.InputSignal<ModelDescriptor<any>>;
|
|
167
|
-
filter: _angular_core.InputSignal<
|
|
157
|
+
filter: _angular_core.InputSignal<FilterStateWithConfig>;
|
|
168
158
|
edit: _angular_core.OutputEmitterRef<FilterActiveTagEvent>;
|
|
169
159
|
remove: _angular_core.OutputEmitterRef<FilterActiveTagEvent>;
|
|
170
160
|
label: _angular_core.Signal<string>;
|
|
171
161
|
matchMode: _angular_core.Signal<string | undefined>;
|
|
172
162
|
matchModeSymbol: _angular_core.Signal<string>;
|
|
173
163
|
value: _angular_core.Signal<any>;
|
|
164
|
+
protected isActive: _angular_core.Signal<boolean>;
|
|
174
165
|
onRemove(event: Event): void;
|
|
175
166
|
onEdit(event: Event): void;
|
|
176
167
|
private getPropertyLabelKey;
|
|
@@ -186,17 +177,17 @@ declare class TableFilterFormComponent {
|
|
|
186
177
|
private readonly elementRef;
|
|
187
178
|
private readonly translate;
|
|
188
179
|
title: _angular_core.InputSignal<string | undefined>;
|
|
189
|
-
metadata: _angular_core.InputSignal<
|
|
180
|
+
metadata: _angular_core.InputSignal<FilterConfig[]>;
|
|
190
181
|
genericDescriptor: _angular_core.InputSignal<FilterGenericDescriptor | undefined>;
|
|
191
182
|
model: _angular_core.InputSignal<ModelDescriptor<any>>;
|
|
192
|
-
filter: _angular_core.InputSignal<
|
|
183
|
+
filter: _angular_core.InputSignal<FilterStateWithConfig | undefined>;
|
|
193
184
|
overlay: _angular_core.InputSignal<Popover | undefined>;
|
|
194
185
|
disabledProperties: _angular_core.InputSignal<string[]>;
|
|
195
186
|
enableCaseSensitive: _angular_core.InputSignal<boolean>;
|
|
196
187
|
propertySearch: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
197
188
|
apply: _angular_core.OutputEmitterRef<FilterFormEmitEvent>;
|
|
198
189
|
propertyOptionsWithTranslations: _angular_core.Signal<PropertyModel[]>;
|
|
199
|
-
selectedFilterMetadata: _angular_core.Signal<
|
|
190
|
+
selectedFilterMetadata: _angular_core.Signal<FilterConfig | undefined>;
|
|
200
191
|
genericValueDataProvider: _angular_core.Signal<ILookupDataProvider<string, any, any, "field"> | undefined>;
|
|
201
192
|
selectedDescriptorAsLookup: _angular_core.Signal<FilterLookupDescriptor<any, any, any, any, string | number | symbol, string | number | symbol> | undefined>;
|
|
202
193
|
isEdit: _angular_core.Signal<boolean>;
|
|
@@ -227,12 +218,19 @@ interface PropertyModel {
|
|
|
227
218
|
disabled: boolean;
|
|
228
219
|
}
|
|
229
220
|
|
|
230
|
-
|
|
221
|
+
type NameType$1 = 'title' | 'titleRowRight';
|
|
222
|
+
declare class TableHeaderWithFiltersTemplateDirective extends TemplateDirective<NameType$1> {
|
|
223
|
+
readonly name: _angular_core.InputSignal<NameType$1>;
|
|
224
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableHeaderWithFiltersTemplateDirective, never>;
|
|
225
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TableHeaderWithFiltersTemplateDirective, "[mngTableHeaderWithFiltersTemplate]", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
declare class TableHeaderWithFiltersComponent {
|
|
231
229
|
private static readonly SEARCH_WORD_LIMIT_MAX;
|
|
232
|
-
private readonly primeTable;
|
|
233
230
|
private readonly tableData;
|
|
234
231
|
private readonly tableConfig;
|
|
235
|
-
|
|
232
|
+
readonly defaultFilterDisplayType: FilterDisplayTypeEnum;
|
|
233
|
+
metadata: _angular_core.InputSignal<FilterConfig[]>;
|
|
236
234
|
genericFilterDescriptor: _angular_core.InputSignal<FilterGenericDescriptor | undefined>;
|
|
237
235
|
model: _angular_core.InputSignal<ModelDescriptor<any>>;
|
|
238
236
|
enableSearch: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
@@ -244,15 +242,23 @@ declare class TableFilterOverlayWithTagComponent {
|
|
|
244
242
|
enableCaseSensitive: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
245
243
|
private filterOverlay;
|
|
246
244
|
private filterFormComponent;
|
|
247
|
-
templates: Signal<readonly
|
|
245
|
+
templates: Signal<readonly TableHeaderWithFiltersTemplateDirective[]>;
|
|
248
246
|
titleTemplate: Signal<TemplateRef<any> | null>;
|
|
249
|
-
|
|
250
|
-
|
|
247
|
+
titleRowRightTemplate: Signal<TemplateRef<any> | null>;
|
|
248
|
+
overlayFormMetadata: Signal<FilterConfig[]>;
|
|
249
|
+
directInputMetadata: Signal<FilterConfig[]>;
|
|
250
|
+
overlayFormFilters: Signal<{
|
|
251
|
+
[p: string]: FilterStateWithConfig;
|
|
251
252
|
}>;
|
|
252
|
-
|
|
253
|
-
activeFilters: Signal<
|
|
253
|
+
showOverlayFilterFormButton: Signal<boolean>;
|
|
254
|
+
activeFilters: Signal<FilterStateWithConfig[]>;
|
|
254
255
|
activeFilterProperties: Signal<string[]>;
|
|
255
|
-
filterEdit: _angular_core.WritableSignal<
|
|
256
|
+
filterEdit: _angular_core.WritableSignal<FilterStateWithConfig | undefined>;
|
|
257
|
+
protected unsetRequiredFilters: Signal<{
|
|
258
|
+
matchMode: string;
|
|
259
|
+
displayMatchMode: string;
|
|
260
|
+
config: FilterConfig;
|
|
261
|
+
}[]>;
|
|
256
262
|
searchValue: Signal<string | undefined>;
|
|
257
263
|
searchCaseSensitive: Signal<boolean | undefined>;
|
|
258
264
|
searchWordLimitMaxError: _angular_core.WritableSignal<boolean>;
|
|
@@ -272,15 +278,16 @@ declare class TableFilterOverlayWithTagComponent {
|
|
|
272
278
|
private getInitialFilters;
|
|
273
279
|
private updatePrimeTableFilter;
|
|
274
280
|
private updatePrimeTableGlobalFilter;
|
|
275
|
-
|
|
276
|
-
static
|
|
281
|
+
protected readonly FilterTypeEnum: typeof FilterTypeEnum;
|
|
282
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableHeaderWithFiltersComponent, never>;
|
|
283
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TableHeaderWithFiltersComponent, "mng-table-header-with-filters", never, { "metadata": { "alias": "metadata"; "required": true; "isSignal": true; }; "genericFilterDescriptor": { "alias": "genericFilterDescriptor"; "required": false; "isSignal": true; }; "model": { "alias": "model"; "required": true; "isSignal": true; }; "enableSearch": { "alias": "enableSearch"; "required": false; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; "searchLimitWordMax": { "alias": "searchLimitWordMax"; "required": false; "isSignal": true; }; "enableCaseSensitive": { "alias": "enableCaseSensitive"; "required": false; "isSignal": true; }; }, {}, ["templates"], never, true, never>;
|
|
277
284
|
}
|
|
278
285
|
|
|
279
286
|
declare class TableDataService<Item> implements OnDestroy {
|
|
280
287
|
#private;
|
|
281
288
|
readonly params: Signal<DataListParams<string, string> | undefined>;
|
|
282
289
|
readonly sortMeta: Signal<SortMeta[] | undefined>;
|
|
283
|
-
readonly
|
|
290
|
+
readonly filterStates: Signal<Record<string, FilterState>>;
|
|
284
291
|
readonly searchMeta: Signal<{
|
|
285
292
|
value: string;
|
|
286
293
|
caseSensitive: boolean;
|
|
@@ -294,8 +301,15 @@ declare class TableDataService<Item> implements OnDestroy {
|
|
|
294
301
|
readonly loading: Signal<boolean>;
|
|
295
302
|
readonly selectedItems: _angular_core.WritableSignal<Item[]>;
|
|
296
303
|
setDataSources(arrayItems: Signal<Item[] | undefined>, dataListResult: Signal<DataListResult<Item> | undefined>, dataProvider: Signal<ITableDataProvider<Item, any, any, any> | undefined>, manualLoading: Signal<boolean | undefined>): void;
|
|
304
|
+
setPrimeTable(cmp?: Table<Item>): void;
|
|
297
305
|
fetchWithDataProvider(params: DataListParams, onErrorFn: (error: Error) => void): boolean;
|
|
298
306
|
setParams(params: DataListParams, fromQueryParams?: boolean): void;
|
|
307
|
+
/**
|
|
308
|
+
* Updates primeNG component with new filters and triggers data reload (if lazy load) or inline filtering.
|
|
309
|
+
* @param key Filter's key
|
|
310
|
+
* @param filter Filter's metadata
|
|
311
|
+
*/
|
|
312
|
+
updatePrimeFilter(key: string, filter: FilterState | undefined): void;
|
|
299
313
|
/**
|
|
300
314
|
* Compare the given params with the stored params in the DataListService.
|
|
301
315
|
*
|
|
@@ -321,15 +335,15 @@ declare class TableMetadataService {
|
|
|
321
335
|
readonly descriptor: Signal<TableDescriptorInst<any, any, any>>;
|
|
322
336
|
rowsPerPageOptions: Signal<number[]>;
|
|
323
337
|
readonly filterDescriptors: Signal<FilterDescriptor<any, any>[]>;
|
|
324
|
-
readonly filters: Signal<
|
|
338
|
+
readonly filters: Signal<FilterConfig[]>;
|
|
325
339
|
readonly genericFilterDescriptor: Signal<_mediusinc_mng_commons_filter.FilterGenericDescriptor | undefined>;
|
|
326
|
-
readonly genericFilters: Signal<
|
|
340
|
+
readonly genericFilters: Signal<FilterConfig[]>;
|
|
327
341
|
readonly searchFields: Signal<string[]>;
|
|
328
342
|
readonly defaultParams: Signal<DataListParams<string, string>>;
|
|
329
343
|
constructor();
|
|
330
344
|
setSignalSources(descriptor: Signal<TableDescriptorInst<any, any>>, searchFields: Signal<string[] | undefined>): void;
|
|
331
345
|
setDescriptor(descriptor: TableDescriptorInst<any, any, any>): void;
|
|
332
|
-
private
|
|
346
|
+
private mapFilterDescriptorToMetadata;
|
|
333
347
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableMetadataService, never>;
|
|
334
348
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<TableMetadataService>;
|
|
335
349
|
}
|
|
@@ -337,7 +351,7 @@ declare class TableMetadataService {
|
|
|
337
351
|
interface ColumnWithPreferences {
|
|
338
352
|
id: string;
|
|
339
353
|
descriptor: ColumnDescriptor<any, any>;
|
|
340
|
-
filter?:
|
|
354
|
+
filter?: FilterConfig;
|
|
341
355
|
sort?: SortDescriptor<any>;
|
|
342
356
|
disabled: boolean;
|
|
343
357
|
isVisible: boolean;
|
|
@@ -366,9 +380,38 @@ declare class TablePreferencesService {
|
|
|
366
380
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<TablePreferencesService>;
|
|
367
381
|
}
|
|
368
382
|
|
|
369
|
-
|
|
383
|
+
interface ITable<Item = any> {
|
|
384
|
+
metadata: TableMetadataService;
|
|
385
|
+
prefs: TablePreferencesService;
|
|
386
|
+
data: TableDataService<Item>;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
type TableTemplateContext = {
|
|
390
|
+
data: any[];
|
|
391
|
+
totalCount: number;
|
|
392
|
+
table: ITable;
|
|
393
|
+
};
|
|
394
|
+
type TableRowTemplateContext = TableTemplateContext & {
|
|
395
|
+
item: any;
|
|
396
|
+
index: number;
|
|
397
|
+
};
|
|
398
|
+
type TableColumnTemplateContext = TableTemplateContext & {
|
|
399
|
+
property: string;
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
type NameType = 'columnCustomLast' | 'footer' | 'rowExpandContent' | 'columnHeader' | 'headerTitleRowRight' | 'headerTitle' | 'header';
|
|
403
|
+
type ContextType<Name extends NameType> = Name extends 'columnCustomLast' | 'rowExpandContent' ? TableRowTemplateContext : Name extends 'columnHeader' ? TableColumnTemplateContext : TableTemplateContext;
|
|
404
|
+
declare class TableTemplateDirective<Name extends NameType = NameType> extends TemplateDirective<Name, ContextType<Name>> {
|
|
405
|
+
readonly name: _angular_core.InputSignal<Name>;
|
|
406
|
+
static ngTemplateContextGuard<Name extends NameType>(dir: TableTemplateDirective<Name>, ctx: any): ctx is ContextType<Name>;
|
|
407
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableTemplateDirective<any>, never>;
|
|
408
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TableTemplateDirective<any>, "[mngTableTemplate]", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
declare class TableComponent<Item = any, Service = undefined, Sorts = any, Filters extends keyof any = any> implements ITable<Item> {
|
|
370
412
|
#private;
|
|
371
413
|
private readonly filterKeyPrepend;
|
|
414
|
+
protected readonly FilterTypeEnum: typeof FilterTypeEnum;
|
|
372
415
|
private readonly logger;
|
|
373
416
|
private readonly router;
|
|
374
417
|
private readonly route;
|
|
@@ -393,10 +436,8 @@ declare class TableComponent<Item = any, Service = undefined, Sorts = any, Filte
|
|
|
393
436
|
}>;
|
|
394
437
|
columnLastMinWidth: _angular_core.InputSignal<number | undefined>;
|
|
395
438
|
columnsColspan: Signal<number>;
|
|
396
|
-
hasTitleDisplay: Signal<string |
|
|
397
|
-
isCaptionVisible: Signal<string | boolean |
|
|
398
|
-
captionComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
399
|
-
columnCustomLastComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
439
|
+
hasTitleDisplay: Signal<string | TemplateRef<TableTemplateContext> | undefined>;
|
|
440
|
+
isCaptionVisible: Signal<string | boolean | TemplateRef<TableTemplateContext> | undefined>;
|
|
400
441
|
globalFilterFieldsInput: _angular_core.InputSignal<string[] | undefined>;
|
|
401
442
|
private cellClickSubject;
|
|
402
443
|
isCellClickObserved: _angular_core.WritableSignal<boolean>;
|
|
@@ -404,27 +445,27 @@ declare class TableComponent<Item = any, Service = undefined, Sorts = any, Filte
|
|
|
404
445
|
tableLoad: _angular_core.OutputEmitterRef<TableLoadEvent>;
|
|
405
446
|
cellClick: _angular_core.OutputRef<TableCellClickEvent<Item>>;
|
|
406
447
|
selectionChange: _angular_core.OutputEmitterRef<Item[]>;
|
|
407
|
-
captionComponentInstance: _angular_core.OutputEmitterRef<any>;
|
|
408
|
-
columnCustomLastComponentInstance: _angular_core.OutputEmitterRef<any>;
|
|
409
448
|
rowReorder: _angular_core.OutputEmitterRef<TableRowReorderEvent>;
|
|
410
|
-
templates:
|
|
411
|
-
|
|
412
|
-
primeTable: Signal<Table<
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
449
|
+
readonly templates: _angular_core.InputSignal<TableTemplateDirective<"columnCustomLast" | "footer" | "rowExpandContent" | "columnHeader" | "headerTitleRowRight" | "headerTitle" | "header">[]>;
|
|
450
|
+
readonly contentTemplates: Signal<readonly TableTemplateDirective<"columnCustomLast" | "footer" | "rowExpandContent" | "columnHeader" | "headerTitleRowRight" | "headerTitle" | "header">[]>;
|
|
451
|
+
readonly primeTable: Signal<Table<Item> | undefined>;
|
|
452
|
+
headerTemplate: Signal<TemplateRef<TableTemplateContext> | null>;
|
|
453
|
+
headerTitleTemplate: Signal<TemplateRef<TableTemplateContext> | null>;
|
|
454
|
+
titleRowRightTemplate: Signal<TemplateRef<TableTemplateContext> | null>;
|
|
455
|
+
columnCustomLastTemplate: Signal<TemplateRef<TableRowTemplateContext> | null>;
|
|
456
|
+
footerTemplate: Signal<TemplateRef<TableTemplateContext> | null>;
|
|
457
|
+
rowExpandTemplate: Signal<TemplateRef<TableRowTemplateContext> | null>;
|
|
458
|
+
columnHeaderTemplate: Signal<TemplateRef<TableColumnTemplateContext> | null>;
|
|
417
459
|
isLazy: Signal<boolean>;
|
|
418
460
|
isPagination: Signal<boolean>;
|
|
419
|
-
useQueryParamsInitialized: _angular_core.WritableSignal<boolean>;
|
|
420
461
|
className: Signal<string>;
|
|
421
462
|
visibleColumns: Signal<_mediusinc_mng_commons_table.ColumnWithPreferences[]>;
|
|
422
463
|
areColumnsReorderable: Signal<boolean>;
|
|
423
464
|
areColumnsToggleable: Signal<boolean>;
|
|
424
465
|
hasColumnFilters: Signal<boolean>;
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
hasLastColumn: Signal<boolean |
|
|
466
|
+
tableHeaderFilters: Signal<_mediusinc_mng_commons_table.FilterConfig[]>;
|
|
467
|
+
protected requiredFiltersMissing: Signal<boolean>;
|
|
468
|
+
hasLastColumn: Signal<boolean | TemplateRef<TableRowTemplateContext>>;
|
|
428
469
|
private lastLazyLoadEvent?;
|
|
429
470
|
private lastParamsWithDefaults?;
|
|
430
471
|
private navigationOutOfTableInProgress;
|
|
@@ -439,7 +480,7 @@ declare class TableComponent<Item = any, Service = undefined, Sorts = any, Filte
|
|
|
439
480
|
private loadTableWithDataProvider;
|
|
440
481
|
private loadTableFromRouteUpdate;
|
|
441
482
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableComponent<any, any, any, any>, never>;
|
|
442
|
-
static ɵcmp: _angular_core.ɵɵ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; }; "
|
|
483
|
+
static ɵcmp: _angular_core.ɵɵ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; }; "globalFilterFieldsInput": { "alias": "globalFilterFields"; "required": false; "isSignal": true; }; "templates": { "alias": "templates"; "required": false; "isSignal": true; }; }, { "tableLoad": "tableLoad"; "cellClick": "cellClick"; "selectionChange": "selectionChange"; "rowReorder": "rowReorder"; }, ["contentTemplates"], never, true, never>;
|
|
443
484
|
}
|
|
444
485
|
|
|
445
486
|
declare function filterGenerateMatchModeOptions(primeConfig: PrimeNG, descriptor: FilterDescriptor<any, any> | undefined, cmpSerCfg?: CommonsSerializationConfig): SelectItem[];
|
|
@@ -452,15 +493,8 @@ declare function filterGenerateMatchModeOptions(primeConfig: PrimeNG, descriptor
|
|
|
452
493
|
* @return {FilterMatchModeExtendedType} The default match mode for the filter.
|
|
453
494
|
*/
|
|
454
495
|
declare function filterGetDefaultMatchMode(descriptor?: FilterDescriptor<any, any>, matchModes?: SelectItem[]): FilterMatchModeExtendedType;
|
|
455
|
-
declare function
|
|
456
|
-
declare function
|
|
457
|
-
displayMatchMode: string;
|
|
458
|
-
matchMode: string;
|
|
459
|
-
displayValue: any;
|
|
460
|
-
value: SingleOrArrayType<Nullable<string | number | boolean | Date>>;
|
|
461
|
-
caseSensitive: boolean | undefined;
|
|
462
|
-
operator?: string;
|
|
463
|
-
};
|
|
496
|
+
declare function filterSetStateOnChange(filter: FilterState, matchMode?: FilterMatchModeExtendedType, value?: any, filterType?: FilterTypeEnum, filterDateCfg?: FilterDateConfig): FilterState;
|
|
497
|
+
declare function filterSetStateOnDisplayChange(filter: FilterState | undefined, displayMatchMode: FilterMatchModeExtendedType, displayValue: any, filterType?: FilterTypeEnum, filterDateCfg?: FilterDateConfig): FilterState;
|
|
464
498
|
declare function filterAreDatesEqual(fromDate: Date | string | number, toDate: Date | string | number, filterDateCfg?: FilterDateConfig): boolean;
|
|
465
499
|
declare function filterApplySerializationConfigToCmp(config: CommonsModuleConfig | null, cmpSerCfg: CommonsSerializationConfig): void;
|
|
466
500
|
declare function filterAdjustDisplayValueOnMatchModeChange(matchMode?: FilterMatchModeExtendedType, value?: any): any;
|
|
@@ -473,6 +507,7 @@ declare function filterGetNumberConfig(descriptor?: FilterDescriptor<any, any>):
|
|
|
473
507
|
* @param {LookupDataProviderInst<string, any, any, 'field'>} [valueLookup] - The lookup data provider for value suggestions.
|
|
474
508
|
*/
|
|
475
509
|
declare function createFilterDescriptorsFromGeneric(properties: FilterGenericProperty[], valueLookup?: LookupDataProviderInst<string, any, any, 'field'>): FilterDescriptor<any, any>[] | [];
|
|
510
|
+
declare function isFilterValueBlank(value: any): boolean;
|
|
476
511
|
|
|
477
512
|
/**
|
|
478
513
|
* Generates and displays a notification for a table-related error with localized error messages and details.
|
|
@@ -516,10 +551,10 @@ declare class LocaleDefaultRowClassPipe<T> implements PipeTransform {
|
|
|
516
551
|
static ɵpipe: _angular_core.ɵɵPipeDeclaration<LocaleDefaultRowClassPipe<any>, "mngLocaleDefaultRowClass", true>;
|
|
517
552
|
}
|
|
518
553
|
|
|
519
|
-
declare class
|
|
554
|
+
declare class TableFilterClassPipe implements PipeTransform {
|
|
520
555
|
transform(value: unknown, filter: FilterDescriptor<any, any> | undefined, isEnabled: boolean): string;
|
|
521
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
522
|
-
static ɵpipe: _angular_core.ɵɵPipeDeclaration<
|
|
556
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableFilterClassPipe, never>;
|
|
557
|
+
static ɵpipe: _angular_core.ɵɵPipeDeclaration<TableFilterClassPipe, "mngTableFilterClass", true>;
|
|
523
558
|
}
|
|
524
559
|
|
|
525
560
|
interface TableFeatureConfig {
|
|
@@ -541,5 +576,5 @@ declare function withTable(config?: TableFeatureConfig): CommonsFeature;
|
|
|
541
576
|
*/
|
|
542
577
|
declare function provideTableChild(config?: TableFeatureConfig): Provider[];
|
|
543
578
|
|
|
544
|
-
export { COMMONS_TABLE_FEATURE_CONFIG_IT, FilterValuePipe, LocaleDefaultRowClassPipe,
|
|
545
|
-
export type { ColumnWithPreferences, FilterActiveTagEvent, FilterDateConfig, FilterFormEmitEvent,
|
|
579
|
+
export { COMMONS_TABLE_FEATURE_CONFIG_IT, FilterService, FilterValuePipe, LocaleDefaultRowClassPipe, TableColumnValueComponent, TableComponent, TableDataService, TableFilterActiveTagComponent, TableFilterClassPipe, TableFilterComponent, TableFilterFormComponent, TableHeaderWithFiltersComponent, TableTemplateDirective, createFilterDescriptorsFromGeneric, filterAdjustDisplayValueOnMatchModeChange, filterApplySerializationConfigToCmp, filterAreDatesEqual, filterGenerateMatchModeOptions, filterGetDateConfig, filterGetDefaultMatchMode, filterGetNumberConfig, filterSetStateOnChange, filterSetStateOnDisplayChange, generateTableLayoutPrefsKey, isFilterValueBlank, provideTableChild, tableNotificationError, withTable };
|
|
580
|
+
export type { ColumnWithPreferences, FilterActiveTagEvent, FilterConfig, FilterDateConfig, FilterFormEmitEvent, FilterNumberConfig, FilterStateWithConfig, ITable, TableFeatureConfig };
|
package/tableview/api/index.d.ts
CHANGED
|
@@ -169,7 +169,7 @@ declare enum FieldGroupTypeEnum {
|
|
|
169
169
|
type FieldConfig = object;
|
|
170
170
|
interface FieldLookupConfig extends FieldConfig {
|
|
171
171
|
table?: {
|
|
172
|
-
|
|
172
|
+
headerTitleComponent?: Type<any>;
|
|
173
173
|
columnActionComponent?: Type<any>;
|
|
174
174
|
};
|
|
175
175
|
}
|
|
@@ -1380,8 +1380,6 @@ declare class FormFieldEventComponentSubtype {
|
|
|
1380
1380
|
}
|
|
1381
1381
|
declare class FormFieldEventDialogSubtype {
|
|
1382
1382
|
static readonly VISIBILITY = "Dialog.Visibility";
|
|
1383
|
-
static readonly TABLE_CAPTION_COMPONENT_INSTANCE = "Dialog.MngTable.CaptionComponentInstance";
|
|
1384
|
-
static readonly TABLE_COLUMN_ACTIONS_COMPONENT_INSTANCE = "Dialog.MngTable.ColumnActionsComponentInstance";
|
|
1385
1383
|
}
|
|
1386
1384
|
interface FormFieldEventData<FieldModel, EditorModel> {
|
|
1387
1385
|
eventSubtype?: string;
|