rez-table-listing-mui 1.3.40 → 1.3.41
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/package.json
CHANGED
package/dist/index.d.ts
DELETED
|
@@ -1,606 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { SortingState, PaginationState, RowSelectionState, ExpandedState, ColumnPinningState, ColumnDef, Row, Table, ColumnOrderState, Header } from '@tanstack/react-table';
|
|
3
|
-
import React$1, { Dispatch, SetStateAction } from 'react';
|
|
4
|
-
import { ButtonProps } from '@mui/material';
|
|
5
|
-
|
|
6
|
-
interface onFilterChangeFunctionProps {
|
|
7
|
-
updatedFilters?: any;
|
|
8
|
-
filterMaster?: any;
|
|
9
|
-
filters?: any;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
interface OperationProps {
|
|
13
|
-
label: string;
|
|
14
|
-
value: string;
|
|
15
|
-
}
|
|
16
|
-
type OperationMapProps = {
|
|
17
|
-
[key in FilterInputDataTypes]?: OperationProps[];
|
|
18
|
-
};
|
|
19
|
-
interface FilterOperationListProps {
|
|
20
|
-
code: string;
|
|
21
|
-
label: string;
|
|
22
|
-
value: string;
|
|
23
|
-
is_shared: boolean;
|
|
24
|
-
is_editable: boolean;
|
|
25
|
-
is_owner: boolean;
|
|
26
|
-
created_by: string;
|
|
27
|
-
description: string | null;
|
|
28
|
-
}
|
|
29
|
-
interface FilterSharedListProps {
|
|
30
|
-
created_date: string;
|
|
31
|
-
entity_type: string;
|
|
32
|
-
id: string;
|
|
33
|
-
name: string;
|
|
34
|
-
status: string;
|
|
35
|
-
parent_type: string | null;
|
|
36
|
-
parent_id: string | number | null;
|
|
37
|
-
code: string;
|
|
38
|
-
created_by: string;
|
|
39
|
-
modified_by: string | null;
|
|
40
|
-
modified_date: string | null;
|
|
41
|
-
enterprise_id: number;
|
|
42
|
-
organization_id: number;
|
|
43
|
-
appcode: string | null;
|
|
44
|
-
level_id: string;
|
|
45
|
-
level_type: string;
|
|
46
|
-
mapped_entity_type: string;
|
|
47
|
-
user_id: number;
|
|
48
|
-
is_default: boolean;
|
|
49
|
-
filter_scope: string;
|
|
50
|
-
is_shared: boolean;
|
|
51
|
-
is_editable: boolean | string;
|
|
52
|
-
description: string | null;
|
|
53
|
-
}
|
|
54
|
-
type FilterInputDataTypes = "text" | "select" | "multiselect" | "date" | "year" | "number";
|
|
55
|
-
interface FilterColumnsListProps {
|
|
56
|
-
created_date: string | null;
|
|
57
|
-
entity_type: string;
|
|
58
|
-
id: string;
|
|
59
|
-
name: string;
|
|
60
|
-
status: string | null;
|
|
61
|
-
parent_type: string;
|
|
62
|
-
parent_id: string;
|
|
63
|
-
code: string | null;
|
|
64
|
-
created_by: string | null;
|
|
65
|
-
modified_by: string | null;
|
|
66
|
-
modified_date: string | null;
|
|
67
|
-
enterprise_id: string | null;
|
|
68
|
-
organization_id: string | null;
|
|
69
|
-
app_code: string | null;
|
|
70
|
-
mapped_entity_type: string;
|
|
71
|
-
menu_code: string | null;
|
|
72
|
-
table_name: string | null;
|
|
73
|
-
col_position: number;
|
|
74
|
-
sortable: string | null;
|
|
75
|
-
searchable: string | null;
|
|
76
|
-
attribute_key: string;
|
|
77
|
-
sort_type: string | null;
|
|
78
|
-
data_type: FilterInputDataTypes;
|
|
79
|
-
data_source_type: string | null;
|
|
80
|
-
datasource_list: any | null;
|
|
81
|
-
visible: string;
|
|
82
|
-
}
|
|
83
|
-
interface FilterColumnsDataProps {
|
|
84
|
-
column_list: FilterColumnsListProps[];
|
|
85
|
-
operation_list: OperationMapProps;
|
|
86
|
-
saved_filter: FilterOperationListProps[];
|
|
87
|
-
shared_filter: FilterOperationListProps[];
|
|
88
|
-
}
|
|
89
|
-
interface FilterDropdownDataProps {
|
|
90
|
-
[key: string]: FilterOperationListProps[];
|
|
91
|
-
}
|
|
92
|
-
interface FilterComponentOptionsMainFilterOptions {
|
|
93
|
-
showSaveButton?: boolean;
|
|
94
|
-
showClearAllButton?: boolean;
|
|
95
|
-
customButtons?: Array<{
|
|
96
|
-
label: string;
|
|
97
|
-
onClick: () => void;
|
|
98
|
-
} & Partial<ButtonProps>>;
|
|
99
|
-
}
|
|
100
|
-
interface FilterComponentOptionsSavedFilterOptions {
|
|
101
|
-
showBackButton?: boolean;
|
|
102
|
-
editMode?: boolean;
|
|
103
|
-
}
|
|
104
|
-
type ButtonConfig = {
|
|
105
|
-
primary: string;
|
|
106
|
-
secondary: string;
|
|
107
|
-
};
|
|
108
|
-
type ModalConfig = {
|
|
109
|
-
title?: string;
|
|
110
|
-
description?: string;
|
|
111
|
-
button?: ButtonConfig;
|
|
112
|
-
isInputField?: boolean;
|
|
113
|
-
};
|
|
114
|
-
type RecordFilterComponentProps = {
|
|
115
|
-
save: ModalConfig;
|
|
116
|
-
edit: ModalConfig;
|
|
117
|
-
delete: ModalConfig;
|
|
118
|
-
};
|
|
119
|
-
type TabType = "main" | "saved" | "attributes";
|
|
120
|
-
interface FilterComponentTabOptions {
|
|
121
|
-
mainFilter?: FilterComponentOptionsMainFilterOptions;
|
|
122
|
-
savedFilter?: FilterComponentOptionsSavedFilterOptions;
|
|
123
|
-
isSingleFilter?: boolean;
|
|
124
|
-
isSingleEntity?: boolean;
|
|
125
|
-
showFilter?: TabType;
|
|
126
|
-
}
|
|
127
|
-
type FilterComponentOptions = {
|
|
128
|
-
showTabs?: true;
|
|
129
|
-
showMainHeader?: boolean;
|
|
130
|
-
mainHeaderTitle?: string;
|
|
131
|
-
showMainFilter?: boolean;
|
|
132
|
-
showSavedFilter?: boolean;
|
|
133
|
-
showAttributesFilter?: boolean;
|
|
134
|
-
isRuleEngine?: boolean;
|
|
135
|
-
tabOptions?: FilterComponentTabOptions;
|
|
136
|
-
recordFilterComponentProps?: RecordFilterComponentProps;
|
|
137
|
-
} | {
|
|
138
|
-
showTabs?: false;
|
|
139
|
-
showMainHeader?: boolean;
|
|
140
|
-
mainHeaderTitle?: string;
|
|
141
|
-
isRuleEngine?: boolean;
|
|
142
|
-
tabOptions?: FilterComponentTabOptions;
|
|
143
|
-
recordFilterComponentProps?: RecordFilterComponentProps;
|
|
144
|
-
};
|
|
145
|
-
interface FilterDrawerProps {
|
|
146
|
-
tableStates: CraftTableOptionsProps;
|
|
147
|
-
open?: boolean;
|
|
148
|
-
onClose?: () => void;
|
|
149
|
-
onDeleteFilter?: () => void;
|
|
150
|
-
onSaveFilter?: (name: string) => void;
|
|
151
|
-
onUpdateFilter?: (name: string) => void;
|
|
152
|
-
columnsData: FilterColumnsDataProps;
|
|
153
|
-
dropdownData: FilterDropdownDataProps;
|
|
154
|
-
defaultFilters?: Array<{
|
|
155
|
-
filter_attribute: string;
|
|
156
|
-
filter_operator: string;
|
|
157
|
-
filter_value: string;
|
|
158
|
-
}>;
|
|
159
|
-
savedFilters?: Array<{
|
|
160
|
-
label: string;
|
|
161
|
-
value: string;
|
|
162
|
-
}>;
|
|
163
|
-
tableData?: {
|
|
164
|
-
entity_list: any[];
|
|
165
|
-
};
|
|
166
|
-
onChangeFunction: ({ updatedFilters, filterMaster, }: onFilterChangeFunctionProps) => void;
|
|
167
|
-
filterComponentOptions?: FilterComponentOptions;
|
|
168
|
-
}
|
|
169
|
-
interface FilterCriteria {
|
|
170
|
-
columnId: string;
|
|
171
|
-
value: string | string[];
|
|
172
|
-
type: FilterInputDataTypes | undefined;
|
|
173
|
-
operator?: string | null;
|
|
174
|
-
dropdown?: {
|
|
175
|
-
label?: string;
|
|
176
|
-
value?: string;
|
|
177
|
-
};
|
|
178
|
-
optionList?: {
|
|
179
|
-
label?: string | undefined;
|
|
180
|
-
value?: string | undefined;
|
|
181
|
-
};
|
|
182
|
-
attribute_key?: string | undefined;
|
|
183
|
-
name: string | undefined;
|
|
184
|
-
}
|
|
185
|
-
interface FilterStateProps {
|
|
186
|
-
filter_attribute: string;
|
|
187
|
-
filter_operator: string;
|
|
188
|
-
filter_value: string | string[];
|
|
189
|
-
filter_attribute_name: string | undefined;
|
|
190
|
-
filter_attribute_data_type: FilterInputDataTypes | undefined;
|
|
191
|
-
attribute_key?: string;
|
|
192
|
-
dropdown_list?: {
|
|
193
|
-
label?: string;
|
|
194
|
-
value?: string;
|
|
195
|
-
}[];
|
|
196
|
-
optionList?: {
|
|
197
|
-
label?: string | undefined;
|
|
198
|
-
value?: string | undefined;
|
|
199
|
-
};
|
|
200
|
-
filter_entity_type?: string;
|
|
201
|
-
filter_entity_name?: string;
|
|
202
|
-
datasource_list?: string | null;
|
|
203
|
-
}
|
|
204
|
-
interface OperationOption {
|
|
205
|
-
label: string;
|
|
206
|
-
value: string;
|
|
207
|
-
}
|
|
208
|
-
interface OperationList {
|
|
209
|
-
text: OperationOption[];
|
|
210
|
-
number: OperationOption[];
|
|
211
|
-
date: OperationOption[];
|
|
212
|
-
select: OperationOption[];
|
|
213
|
-
multiselect: OperationOption[];
|
|
214
|
-
year: OperationOption[];
|
|
215
|
-
}
|
|
216
|
-
interface createSavedFilterPayload {
|
|
217
|
-
name: string;
|
|
218
|
-
organization_id?: number;
|
|
219
|
-
enterprise_id?: number;
|
|
220
|
-
user_id?: number;
|
|
221
|
-
is_default: boolean;
|
|
222
|
-
description: string | null;
|
|
223
|
-
mapped_entity_type: string;
|
|
224
|
-
status?: string;
|
|
225
|
-
entity_type: string;
|
|
226
|
-
filterDetails: FilterStateProps[];
|
|
227
|
-
}
|
|
228
|
-
interface deleteSavedFilterPayload {
|
|
229
|
-
name: string;
|
|
230
|
-
is_default: boolean;
|
|
231
|
-
id: string | number;
|
|
232
|
-
status?: string;
|
|
233
|
-
entity_type: string;
|
|
234
|
-
mapped_entity_type: string;
|
|
235
|
-
}
|
|
236
|
-
interface updateSavedFilterPayload {
|
|
237
|
-
name: string;
|
|
238
|
-
is_default: boolean;
|
|
239
|
-
id: string | number;
|
|
240
|
-
status?: string;
|
|
241
|
-
entity_type: string;
|
|
242
|
-
mapped_entity_type: string;
|
|
243
|
-
filterDetails: FilterStateProps[];
|
|
244
|
-
}
|
|
245
|
-
interface FilterFormComponentProps {
|
|
246
|
-
columnsData: FilterColumnsDataProps;
|
|
247
|
-
saved_filter?: any;
|
|
248
|
-
shared_filter?: any;
|
|
249
|
-
dropdownData: FilterDropdownDataProps;
|
|
250
|
-
tableStates: CraftTableOptionsProps;
|
|
251
|
-
editMode?: boolean;
|
|
252
|
-
setEditMode?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
253
|
-
setDeleteFilterModalOpen?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
254
|
-
onSaveFilterButtonClick?: () => void;
|
|
255
|
-
tabValue?: number;
|
|
256
|
-
onChangeFunction: ({ updatedFilters, filterMaster, }: onFilterChangeFunctionProps) => void;
|
|
257
|
-
filterComponentOptions?: FilterComponentOptions;
|
|
258
|
-
}
|
|
259
|
-
interface SavedFilterSharingPreference {
|
|
260
|
-
shareWithTeam?: boolean;
|
|
261
|
-
allowTeamEdit?: boolean;
|
|
262
|
-
}
|
|
263
|
-
interface FilterMasterStateProps {
|
|
264
|
-
attributes: {
|
|
265
|
-
selected: string;
|
|
266
|
-
radio: string[];
|
|
267
|
-
};
|
|
268
|
-
saved_filters: {
|
|
269
|
-
selectedId: string;
|
|
270
|
-
selectedName: string;
|
|
271
|
-
selectedCode?: string;
|
|
272
|
-
description?: string;
|
|
273
|
-
is_shared?: boolean;
|
|
274
|
-
is_editable?: boolean;
|
|
275
|
-
is_owner?: boolean;
|
|
276
|
-
};
|
|
277
|
-
activeFilterTabIndex: number;
|
|
278
|
-
shared_filters_meta?: Record<string, SavedFilterSharingPreference>;
|
|
279
|
-
}
|
|
280
|
-
interface AttributesFilterProps {
|
|
281
|
-
columnsData: FilterColumnsDataProps;
|
|
282
|
-
tableStates: CraftTableOptionsProps;
|
|
283
|
-
dropdownData: FilterDropdownDataProps;
|
|
284
|
-
searchTerm: string;
|
|
285
|
-
setSearchTerm: React.Dispatch<React.SetStateAction<string>>;
|
|
286
|
-
tabValue?: number;
|
|
287
|
-
onChangeFunction: ({ updatedFilters, filterMaster, }: onFilterChangeFunctionProps) => void;
|
|
288
|
-
}
|
|
289
|
-
interface AttributesFilterSelectProps {
|
|
290
|
-
columnsData: FilterColumnsDataProps;
|
|
291
|
-
tableStates: CraftTableOptionsProps;
|
|
292
|
-
dropdownData: FilterDropdownDataProps;
|
|
293
|
-
searchTerm: string;
|
|
294
|
-
setSearchTerm: React.Dispatch<React.SetStateAction<string>>;
|
|
295
|
-
tabValue?: number;
|
|
296
|
-
}
|
|
297
|
-
interface viewSettingsPayload {
|
|
298
|
-
column: string;
|
|
299
|
-
sort_by: string;
|
|
300
|
-
}
|
|
301
|
-
interface FilterDataMainFilterEntityListProps {
|
|
302
|
-
value: string;
|
|
303
|
-
id: string | number;
|
|
304
|
-
label: string;
|
|
305
|
-
}
|
|
306
|
-
interface FilterDataMainFilterEntityWiseCriteriaProps {
|
|
307
|
-
id: string;
|
|
308
|
-
name: string;
|
|
309
|
-
attribute_key: string;
|
|
310
|
-
element_type: FilterInputDataTypes;
|
|
311
|
-
datasource_list: any;
|
|
312
|
-
data_type: FilterInputDataTypes;
|
|
313
|
-
}
|
|
314
|
-
interface FilterDataProps {
|
|
315
|
-
mainFilter?: {
|
|
316
|
-
entityList?: {
|
|
317
|
-
data?: FilterDataMainFilterEntityListProps[];
|
|
318
|
-
isPending?: boolean;
|
|
319
|
-
};
|
|
320
|
-
entityWiseCriteria?: {
|
|
321
|
-
data?: FilterDataMainFilterEntityWiseCriteriaProps[];
|
|
322
|
-
isPending?: boolean;
|
|
323
|
-
};
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
interface QuickFilterModalProps {
|
|
328
|
-
view?: string;
|
|
329
|
-
show?: boolean;
|
|
330
|
-
filterSettingStates: craftTableFilterSettingsOptionsProps;
|
|
331
|
-
onClose?: () => void;
|
|
332
|
-
columnsData: FilterColumnsDataProps;
|
|
333
|
-
columnsDataLoading?: boolean;
|
|
334
|
-
quickTabAttributes?: any[];
|
|
335
|
-
quickTabAttributesLoading?: boolean;
|
|
336
|
-
sortingTabAttributes?: any[];
|
|
337
|
-
sortingTabAttributesLoading?: boolean;
|
|
338
|
-
tabsApiData?: {
|
|
339
|
-
label: string;
|
|
340
|
-
value: string;
|
|
341
|
-
}[];
|
|
342
|
-
tabsApiDataLoading?: boolean;
|
|
343
|
-
onSaveSettingsData?: (data: any) => void;
|
|
344
|
-
}
|
|
345
|
-
type TabName = string;
|
|
346
|
-
type SortingType = "asc" | "desc";
|
|
347
|
-
type QuickTabSortingType = "asc" | "dsc" | "count_asc" | "count_dsc" | "custom";
|
|
348
|
-
interface QuickTabConfigProps {
|
|
349
|
-
attribute?: string;
|
|
350
|
-
sorting?: QuickTabSortingType;
|
|
351
|
-
hide_list?: {
|
|
352
|
-
label: string;
|
|
353
|
-
value: string;
|
|
354
|
-
}[];
|
|
355
|
-
show_list?: {
|
|
356
|
-
label: string;
|
|
357
|
-
value: string;
|
|
358
|
-
}[];
|
|
359
|
-
isAllSelected?: boolean;
|
|
360
|
-
isCombineOther?: boolean;
|
|
361
|
-
}
|
|
362
|
-
interface ColumnItem {
|
|
363
|
-
label: string;
|
|
364
|
-
value: string;
|
|
365
|
-
}
|
|
366
|
-
interface ColumnTab {
|
|
367
|
-
tab_name: TabName;
|
|
368
|
-
show_list: ColumnItem[];
|
|
369
|
-
hide_list: ColumnItem[];
|
|
370
|
-
}
|
|
371
|
-
interface SortingConfigSortByProps {
|
|
372
|
-
column: string;
|
|
373
|
-
order: SortingType;
|
|
374
|
-
}
|
|
375
|
-
interface SortingConfigTabProps {
|
|
376
|
-
tab_name: TabName;
|
|
377
|
-
sortby: SortingConfigSortByProps[];
|
|
378
|
-
}
|
|
379
|
-
interface SortingConfigProps {
|
|
380
|
-
isDefault?: boolean;
|
|
381
|
-
sortby?: SortingConfigSortByProps[];
|
|
382
|
-
tabs?: SortingConfigTabProps[];
|
|
383
|
-
}
|
|
384
|
-
interface ColumnTabConfigProps {
|
|
385
|
-
isDefault?: boolean;
|
|
386
|
-
show_list?: ColumnItem[];
|
|
387
|
-
hide_list?: ColumnItem[];
|
|
388
|
-
tabs?: ColumnTab[];
|
|
389
|
-
}
|
|
390
|
-
interface SettingsDataProps {
|
|
391
|
-
isDefault?: boolean;
|
|
392
|
-
show_list?: ColumnItem[];
|
|
393
|
-
hide_list?: ColumnItem[];
|
|
394
|
-
tabs?: ColumnTab[];
|
|
395
|
-
quick_tab?: QuickTabConfigProps;
|
|
396
|
-
column?: ColumnTabConfigProps;
|
|
397
|
-
sorting?: SortingConfigProps;
|
|
398
|
-
}
|
|
399
|
-
interface SavedButtonErrorProps {
|
|
400
|
-
hasError: boolean;
|
|
401
|
-
messages: {
|
|
402
|
-
type: string;
|
|
403
|
-
message: string;
|
|
404
|
-
}[];
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
interface CraftTableOptionsProps {
|
|
408
|
-
sorting: SortingState;
|
|
409
|
-
setSorting: Dispatch<SetStateAction<SortingState>>;
|
|
410
|
-
pagination: PaginationState;
|
|
411
|
-
setPagination: Dispatch<SetStateAction<PaginationState>>;
|
|
412
|
-
rowSelection: RowSelectionState;
|
|
413
|
-
setRowSelection: Dispatch<SetStateAction<RowSelectionState>>;
|
|
414
|
-
isCompactTable?: boolean;
|
|
415
|
-
setIsCompactTable?: Dispatch<SetStateAction<boolean>>;
|
|
416
|
-
expanded: ExpandedState;
|
|
417
|
-
setExpanded: Dispatch<SetStateAction<ExpandedState>>;
|
|
418
|
-
wrapColumns: Record<string, boolean>;
|
|
419
|
-
setWrapColumns: Dispatch<SetStateAction<Record<string, boolean>>>;
|
|
420
|
-
filters: FilterStateProps[];
|
|
421
|
-
setFilters: Dispatch<SetStateAction<FilterStateProps[]>>;
|
|
422
|
-
savedFilterEditValue: string | number;
|
|
423
|
-
setSavedFilterEditValue: Dispatch<SetStateAction<string | number>>;
|
|
424
|
-
filterToDelete: FilterOperationListProps | null;
|
|
425
|
-
setFilterToDelete: Dispatch<SetStateAction<FilterOperationListProps | null>>;
|
|
426
|
-
filterSelectedAttributeValue: string;
|
|
427
|
-
setFilterSelectedAttributeValue: Dispatch<SetStateAction<string>>;
|
|
428
|
-
filterMaster: FilterMasterStateProps | null;
|
|
429
|
-
setFilterMaster: Dispatch<SetStateAction<FilterMasterStateProps | null>>;
|
|
430
|
-
showTableFilter: boolean;
|
|
431
|
-
setShowTableFilter: Dispatch<SetStateAction<boolean>>;
|
|
432
|
-
showFilterOptions: boolean;
|
|
433
|
-
setShowFilterOption: Dispatch<SetStateAction<boolean>>;
|
|
434
|
-
columnPinning: ColumnPinningState;
|
|
435
|
-
setColumnPinning: Dispatch<SetStateAction<ColumnPinningState>>;
|
|
436
|
-
filterData: FilterDataProps | null;
|
|
437
|
-
setFilterData: Dispatch<SetStateAction<FilterDataProps | null>>;
|
|
438
|
-
selectedFilterEntity: FilterDataMainFilterEntityListProps | undefined;
|
|
439
|
-
setSelectedFilterEntity: Dispatch<SetStateAction<FilterDataMainFilterEntityListProps | undefined>>;
|
|
440
|
-
}
|
|
441
|
-
interface craftTableFilterSettingsOptionsProps {
|
|
442
|
-
settingsData: SettingsDataProps;
|
|
443
|
-
setSettingsData: Dispatch<SetStateAction<SettingsDataProps>>;
|
|
444
|
-
showListViewSettings: boolean;
|
|
445
|
-
setShowListViewSettings: Dispatch<SetStateAction<boolean>>;
|
|
446
|
-
quickTabStates: QuickTabConfigProps;
|
|
447
|
-
setQuickTabStates: Dispatch<SetStateAction<QuickTabConfigProps>>;
|
|
448
|
-
columnTabState: ColumnTabConfigProps;
|
|
449
|
-
setColumnTabState: Dispatch<SetStateAction<ColumnTabConfigProps>>;
|
|
450
|
-
sortingTabState: SortingConfigProps;
|
|
451
|
-
setSortingTabState: Dispatch<SetStateAction<SortingConfigProps>>;
|
|
452
|
-
saveButtonError: SavedButtonErrorProps;
|
|
453
|
-
setSaveButtonError: Dispatch<SetStateAction<SavedButtonErrorProps>>;
|
|
454
|
-
}
|
|
455
|
-
interface CraftTableFeatureProps {
|
|
456
|
-
enableSorting?: boolean;
|
|
457
|
-
enableServerSidePagination?: boolean;
|
|
458
|
-
enableServerSideSorting?: boolean;
|
|
459
|
-
enableRowSelection?: boolean;
|
|
460
|
-
enableColumnResizing?: boolean;
|
|
461
|
-
enableColumnReordering?: boolean;
|
|
462
|
-
enableColumnPinning?: boolean;
|
|
463
|
-
enableMultiColumnSorting?: boolean;
|
|
464
|
-
enableTopbar?: boolean;
|
|
465
|
-
enableWordBreakAll?: boolean;
|
|
466
|
-
stickyHeader?: boolean;
|
|
467
|
-
compactTable?: boolean;
|
|
468
|
-
striped?: boolean;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
interface CraftTablePaginationProps {
|
|
472
|
-
totalRows?: number;
|
|
473
|
-
rowsPerPageArray?: number[];
|
|
474
|
-
showPagination?: boolean;
|
|
475
|
-
paginationPosition?: "top" | "bottom";
|
|
476
|
-
paginationView?: "full" | "compact";
|
|
477
|
-
}
|
|
478
|
-
interface LoadingOptionsProps {
|
|
479
|
-
isLoading: boolean;
|
|
480
|
-
loaderText?: string;
|
|
481
|
-
loadingComponent?: React$1.ReactNode;
|
|
482
|
-
}
|
|
483
|
-
interface TopbarOptionsProps {
|
|
484
|
-
tableStates: CraftTableOptionsProps;
|
|
485
|
-
leftSideComponent?: React$1.ReactNode;
|
|
486
|
-
rightSideComponent?: React$1.ReactNode;
|
|
487
|
-
showColumnToggle?: boolean;
|
|
488
|
-
showCompactTableToggle?: boolean;
|
|
489
|
-
showChangeLayoutToggle?: boolean;
|
|
490
|
-
viewMoreToggle?: boolean;
|
|
491
|
-
showSearch?: boolean;
|
|
492
|
-
showSortingToggle?: boolean;
|
|
493
|
-
showFilterToggle?: boolean;
|
|
494
|
-
searchValue?: string;
|
|
495
|
-
onSearchChange?: (val: string) => void;
|
|
496
|
-
onFilterButtonClick?: () => void;
|
|
497
|
-
}
|
|
498
|
-
interface CustomRenderContext<T> {
|
|
499
|
-
value: unknown;
|
|
500
|
-
row: Row<T>;
|
|
501
|
-
table: Row<T>[];
|
|
502
|
-
}
|
|
503
|
-
type CustomRenderFnMap<T> = {
|
|
504
|
-
[key: string]: (ctx: CustomRenderContext<T>) => React$1.ReactNode;
|
|
505
|
-
};
|
|
506
|
-
type CustomColumnMeta = {
|
|
507
|
-
type?: "custom";
|
|
508
|
-
propName?: string;
|
|
509
|
-
[key: string]: any;
|
|
510
|
-
};
|
|
511
|
-
type CustomColumnDef<T> = ColumnDef<T> & {
|
|
512
|
-
meta?: CustomColumnMeta;
|
|
513
|
-
};
|
|
514
|
-
interface CraftTableStyleProps {
|
|
515
|
-
wrapperStyle?: React$1.CSSProperties;
|
|
516
|
-
}
|
|
517
|
-
interface FilterOptionsProps {
|
|
518
|
-
onClick?: () => void;
|
|
519
|
-
show?: boolean;
|
|
520
|
-
component: React$1.ReactNode;
|
|
521
|
-
}
|
|
522
|
-
interface settingsOptionsProps {
|
|
523
|
-
showIcon?: boolean;
|
|
524
|
-
onClick?: () => void;
|
|
525
|
-
}
|
|
526
|
-
interface CraftTableProps<T> {
|
|
527
|
-
data: T[];
|
|
528
|
-
columns: CustomColumnDef<T>[];
|
|
529
|
-
tableStates: CraftTableOptionsProps;
|
|
530
|
-
paginationOptions?: CraftTablePaginationProps;
|
|
531
|
-
featureOptions?: CraftTableFeatureProps;
|
|
532
|
-
nestedComponent?: React$1.ComponentType<{
|
|
533
|
-
row: Row<T>;
|
|
534
|
-
}>;
|
|
535
|
-
loadingOptions?: LoadingOptionsProps;
|
|
536
|
-
topbarOptions?: TopbarOptionsProps;
|
|
537
|
-
customRenderFn?: CustomRenderFnMap<T>;
|
|
538
|
-
shouldHideColumn?: (accessorKey?: string) => boolean;
|
|
539
|
-
styleOptions?: CraftTableStyleProps;
|
|
540
|
-
emptyListComponent?: React$1.ReactNode;
|
|
541
|
-
filterOptions?: FilterOptionsProps;
|
|
542
|
-
settingsOptions?: settingsOptionsProps;
|
|
543
|
-
craftTableFilterSettingsOptions?: craftTableFilterSettingsOptionsProps;
|
|
544
|
-
}
|
|
545
|
-
interface CraftTableComponentProps<T> {
|
|
546
|
-
table: Table<T>;
|
|
547
|
-
featureOptions: CraftTableFeatureProps;
|
|
548
|
-
NestedComponent?: React$1.ComponentType<{
|
|
549
|
-
row: Row<T>;
|
|
550
|
-
}>;
|
|
551
|
-
columnOrder: ColumnOrderState;
|
|
552
|
-
setColumnOrder: React$1.Dispatch<React$1.SetStateAction<ColumnOrderState>>;
|
|
553
|
-
isCompactTable: boolean;
|
|
554
|
-
tableStates: CraftTableOptionsProps;
|
|
555
|
-
}
|
|
556
|
-
interface TableHeaderProps<T> {
|
|
557
|
-
header: Header<T, unknown>;
|
|
558
|
-
featureOptions: CraftTableFeatureProps;
|
|
559
|
-
tableStates: CraftTableOptionsProps;
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
declare function TableWrapper<T>({ data, columns, tableStates, paginationOptions, featureOptions, topbarOptions, nestedComponent, loadingOptions, customRenderFn, shouldHideColumn, emptyListComponent, filterOptions, }: CraftTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
563
|
-
|
|
564
|
-
declare function useCraftTable(paginationPageSize?: number): CraftTableOptionsProps;
|
|
565
|
-
|
|
566
|
-
declare function useCraftTableFilterSettings(): craftTableFilterSettingsOptionsProps;
|
|
567
|
-
|
|
568
|
-
interface TabDataProps {
|
|
569
|
-
tab_value: string | null;
|
|
570
|
-
tab_value_count: string | number;
|
|
571
|
-
}
|
|
572
|
-
interface TableTabsProps {
|
|
573
|
-
loading?: boolean;
|
|
574
|
-
tabsData?: TabDataProps[];
|
|
575
|
-
activeTab?: string;
|
|
576
|
-
tableStates: CraftTableOptionsProps;
|
|
577
|
-
onClick: (state: string) => void;
|
|
578
|
-
columns?: any[];
|
|
579
|
-
settingsOptions?: settingsOptionsProps;
|
|
580
|
-
}
|
|
581
|
-
declare function TableTabs({ loading, tabsData, activeTab, onClick, tableStates, settingsOptions, }: TableTabsProps): react_jsx_runtime.JSX.Element;
|
|
582
|
-
|
|
583
|
-
declare function TableFilter({ onClose, columnsData, tableStates, onDeleteFilter, onSaveFilter, onUpdateFilter, dropdownData, onChangeFunction, filterComponentOptions, }: FilterDrawerProps): react_jsx_runtime.JSX.Element;
|
|
584
|
-
|
|
585
|
-
declare function QuickFilterSettings({ view, show, filterSettingStates, onClose, columnsData, columnsDataLoading, quickTabAttributes, quickTabAttributesLoading, sortingTabAttributes, sortingTabAttributesLoading, tabsApiData, tabsApiDataLoading, onSaveSettingsData, }: QuickFilterModalProps): react_jsx_runtime.JSX.Element;
|
|
586
|
-
|
|
587
|
-
interface TableSearchProps {
|
|
588
|
-
value: string;
|
|
589
|
-
onChange: (value: string) => void;
|
|
590
|
-
}
|
|
591
|
-
declare const TableSearch: ({ value, onChange, }: TableSearchProps) => JSX.Element;
|
|
592
|
-
|
|
593
|
-
declare const Kanban: ({ metaData, data, isLoading, KanbanCardComponent, showSettings, onOpenSettings, }: {
|
|
594
|
-
metaData: any;
|
|
595
|
-
data: any;
|
|
596
|
-
isLoading?: boolean;
|
|
597
|
-
KanbanCardComponent: React$1.ComponentType<{
|
|
598
|
-
key: string | number;
|
|
599
|
-
cardData: any;
|
|
600
|
-
}>;
|
|
601
|
-
showSettings: boolean;
|
|
602
|
-
onOpenSettings?: () => void;
|
|
603
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
604
|
-
|
|
605
|
-
export { TableFilter as CraftTableFilter, TableSearch as CraftTableSearch, QuickFilterSettings as CraftTableSettings, TableTabs as CraftTableTabs, Kanban as KanbanWrapper, TableWrapper, useCraftTable, useCraftTableFilterSettings };
|
|
606
|
-
export type { AttributesFilterProps, AttributesFilterSelectProps, CraftTableComponentProps, CraftTableFeatureProps, CraftTableOptionsProps, CraftTablePaginationProps, CraftTableProps, CustomRenderContext, CustomRenderFnMap, FilterColumnsDataProps, FilterColumnsListProps, FilterComponentOptions, FilterComponentOptionsMainFilterOptions, FilterComponentOptionsSavedFilterOptions, FilterCriteria, FilterDataMainFilterEntityListProps, FilterDataMainFilterEntityWiseCriteriaProps, FilterDataProps, FilterDrawerProps, FilterDropdownDataProps, FilterFormComponentProps, FilterInputDataTypes, FilterMasterStateProps, FilterOperationListProps, FilterOptionsProps, FilterSharedListProps, FilterStateProps, OperationList, OperationOption, SavedFilterSharingPreference, TableHeaderProps, TopbarOptionsProps, craftTableFilterSettingsOptionsProps, createSavedFilterPayload, deleteSavedFilterPayload, settingsOptionsProps, updateSavedFilterPayload, viewSettingsPayload };
|