rez-table-listing-mui 1.3.44 → 1.3.45
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/dist/index.d.ts +70 -9
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/listing/components/common/saved-filter-modal/index.tsx +517 -0
- package/src/listing/components/filter/components/attributes-filter.tsx +2 -2
- package/src/listing/components/filter/components/forms/components/Dropdown.tsx +2 -2
- package/src/listing/components/filter/components/forms/components/Filter-criteria.tsx +9 -7
- package/src/listing/components/filter/components/forms/components/Textfield.tsx +2 -4
- package/src/listing/components/filter/components/forms/components/filter-criteria-list.tsx +1 -0
- package/src/listing/components/filter/components/forms/index.tsx +23 -14
- package/src/listing/components/filter/components/forms/utils/filter-date-input-resolver.tsx +3 -3
- package/src/listing/components/filter/components/main-filter.tsx +6 -6
- package/src/listing/components/filter/components/saved-edit-filter.tsx +5 -3
- package/src/listing/components/filter/components/saved-filter.tsx +300 -124
- package/src/listing/components/filter/components/search/index.tsx +1 -0
- package/src/listing/components/filter/components/single-filter-rendering.tsx +3 -3
- package/src/listing/components/filter/index.tsx +130 -5
- package/src/listing/components/index-table.tsx +9 -0
- package/src/listing/components/login/index.tsx +3 -6
- package/src/listing/components/table-dnd.tsx +6 -0
- package/src/listing/components/table-head-dnd-cell.tsx +7 -0
- package/src/listing/components/table-head-popover.tsx +24 -3
- package/src/listing/components/table-head.tsx +10 -0
- package/src/listing/components/table-settings/components/column.tsx +85 -26
- package/src/listing/components/table-settings/components/quick-tab.tsx +395 -77
- package/src/listing/components/table-settings/components/sorting.tsx +60 -20
- package/src/listing/components/table-settings/index.tsx +12 -2
- package/src/listing/components/table.tsx +6 -0
- package/src/listing/libs/hooks/useEntityTableAPI.tsx +20 -5
- package/src/listing/libs/utils/apiColumn.ts +8 -3
- package/src/listing/libs/utils/common.ts +2 -1
- package/src/listing/libs/utils/hydrate-saved-filters.ts +2 -2
- package/src/listing/types/common.ts +1 -0
- package/src/listing/types/filter-settings.ts +8 -2
- package/src/listing/types/filter.ts +51 -3
- package/src/listing/types/table.ts +9 -0
- package/src/view/FIlterWrapper.tsx +15 -0
- package/src/view/ListingView.tsx +179 -63
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,36 @@ interface FilterOperationListProps {
|
|
|
20
20
|
code: string;
|
|
21
21
|
label: string;
|
|
22
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;
|
|
23
53
|
}
|
|
24
54
|
type FilterInputDataTypes = "text" | "select" | "multiselect" | "date" | "year" | "number";
|
|
25
55
|
interface FilterColumnsListProps {
|
|
@@ -45,7 +75,7 @@ interface FilterColumnsListProps {
|
|
|
45
75
|
searchable: string | null;
|
|
46
76
|
attribute_key: string;
|
|
47
77
|
sort_type: string | null;
|
|
48
|
-
|
|
78
|
+
data_type: FilterInputDataTypes;
|
|
49
79
|
data_source_type: string | null;
|
|
50
80
|
datasource_list: any | null;
|
|
51
81
|
visible: string;
|
|
@@ -54,6 +84,7 @@ interface FilterColumnsDataProps {
|
|
|
54
84
|
column_list: FilterColumnsListProps[];
|
|
55
85
|
operation_list: OperationMapProps;
|
|
56
86
|
saved_filter: FilterOperationListProps[];
|
|
87
|
+
shared_filter: FilterOperationListProps[];
|
|
57
88
|
}
|
|
58
89
|
interface FilterDropdownDataProps {
|
|
59
90
|
[key: string]: FilterOperationListProps[];
|
|
@@ -156,7 +187,7 @@ interface FilterStateProps {
|
|
|
156
187
|
filter_operator: string;
|
|
157
188
|
filter_value: string | string[];
|
|
158
189
|
filter_attribute_name: string | undefined;
|
|
159
|
-
|
|
190
|
+
filter_attribute_data_type: FilterInputDataTypes | undefined;
|
|
160
191
|
attribute_key?: string;
|
|
161
192
|
dropdown_list?: {
|
|
162
193
|
label?: string;
|
|
@@ -188,6 +219,7 @@ interface createSavedFilterPayload {
|
|
|
188
219
|
enterprise_id?: number;
|
|
189
220
|
user_id?: number;
|
|
190
221
|
is_default: boolean;
|
|
222
|
+
description: string | null;
|
|
191
223
|
mapped_entity_type: string;
|
|
192
224
|
status?: string;
|
|
193
225
|
entity_type: string;
|
|
@@ -212,16 +244,22 @@ interface updateSavedFilterPayload {
|
|
|
212
244
|
}
|
|
213
245
|
interface FilterFormComponentProps {
|
|
214
246
|
columnsData: FilterColumnsDataProps;
|
|
247
|
+
saved_filter?: any;
|
|
248
|
+
shared_filter?: any;
|
|
215
249
|
dropdownData: FilterDropdownDataProps;
|
|
216
250
|
tableStates: CraftTableOptionsProps;
|
|
217
251
|
editMode?: boolean;
|
|
218
252
|
setEditMode?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
219
253
|
setDeleteFilterModalOpen?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
220
|
-
|
|
254
|
+
onSaveFilterButtonClick?: () => void;
|
|
221
255
|
tabValue?: number;
|
|
222
256
|
onChangeFunction: ({ updatedFilters, filterMaster, }: onFilterChangeFunctionProps) => void;
|
|
223
257
|
filterComponentOptions?: FilterComponentOptions;
|
|
224
258
|
}
|
|
259
|
+
interface SavedFilterSharingPreference {
|
|
260
|
+
shareWithTeam?: boolean;
|
|
261
|
+
allowTeamEdit?: boolean;
|
|
262
|
+
}
|
|
225
263
|
interface FilterMasterStateProps {
|
|
226
264
|
attributes: {
|
|
227
265
|
selected: string;
|
|
@@ -231,8 +269,13 @@ interface FilterMasterStateProps {
|
|
|
231
269
|
selectedId: string;
|
|
232
270
|
selectedName: string;
|
|
233
271
|
selectedCode?: string;
|
|
272
|
+
description?: string;
|
|
273
|
+
is_shared?: boolean;
|
|
274
|
+
is_editable?: boolean;
|
|
275
|
+
is_owner?: boolean;
|
|
234
276
|
};
|
|
235
277
|
activeFilterTabIndex: number;
|
|
278
|
+
shared_filters_meta?: Record<string, SavedFilterSharingPreference>;
|
|
236
279
|
}
|
|
237
280
|
interface AttributesFilterProps {
|
|
238
281
|
columnsData: FilterColumnsDataProps;
|
|
@@ -266,6 +309,7 @@ interface FilterDataMainFilterEntityWiseCriteriaProps {
|
|
|
266
309
|
attribute_key: string;
|
|
267
310
|
element_type: FilterInputDataTypes;
|
|
268
311
|
datasource_list: any;
|
|
312
|
+
data_type: FilterInputDataTypes;
|
|
269
313
|
}
|
|
270
314
|
interface FilterDataProps {
|
|
271
315
|
mainFilter?: {
|
|
@@ -289,6 +333,8 @@ interface QuickFilterModalProps {
|
|
|
289
333
|
columnsDataLoading?: boolean;
|
|
290
334
|
quickTabAttributes?: any[];
|
|
291
335
|
quickTabAttributesLoading?: boolean;
|
|
336
|
+
columnTabAttributes?: any[];
|
|
337
|
+
columnTabAttributesLoading?: boolean;
|
|
292
338
|
sortingTabAttributes?: any[];
|
|
293
339
|
sortingTabAttributesLoading?: boolean;
|
|
294
340
|
tabsApiData?: {
|
|
@@ -297,8 +343,8 @@ interface QuickFilterModalProps {
|
|
|
297
343
|
}[];
|
|
298
344
|
tabsApiDataLoading?: boolean;
|
|
299
345
|
onSaveSettingsData?: (data: any) => void;
|
|
346
|
+
activeTab?: string;
|
|
300
347
|
}
|
|
301
|
-
type TabName = string;
|
|
302
348
|
type SortingType = "asc" | "desc";
|
|
303
349
|
type QuickTabSortingType = "asc" | "dsc" | "count_asc" | "count_dsc" | "custom";
|
|
304
350
|
interface QuickTabConfigProps {
|
|
@@ -320,7 +366,10 @@ interface ColumnItem {
|
|
|
320
366
|
value: string;
|
|
321
367
|
}
|
|
322
368
|
interface ColumnTab {
|
|
323
|
-
tab_name:
|
|
369
|
+
tab_name: {
|
|
370
|
+
label: string;
|
|
371
|
+
value: string;
|
|
372
|
+
};
|
|
324
373
|
show_list: ColumnItem[];
|
|
325
374
|
hide_list: ColumnItem[];
|
|
326
375
|
}
|
|
@@ -329,7 +378,10 @@ interface SortingConfigSortByProps {
|
|
|
329
378
|
order: SortingType;
|
|
330
379
|
}
|
|
331
380
|
interface SortingConfigTabProps {
|
|
332
|
-
tab_name:
|
|
381
|
+
tab_name: {
|
|
382
|
+
label: string;
|
|
383
|
+
value: string;
|
|
384
|
+
};
|
|
333
385
|
sortby: SortingConfigSortByProps[];
|
|
334
386
|
}
|
|
335
387
|
interface SortingConfigProps {
|
|
@@ -483,6 +535,8 @@ interface CraftTableProps<T> {
|
|
|
483
535
|
data: T[];
|
|
484
536
|
columns: CustomColumnDef<T>[];
|
|
485
537
|
tableStates: CraftTableOptionsProps;
|
|
538
|
+
filterSettingStates: craftTableFilterSettingsOptionsProps;
|
|
539
|
+
onSaveSettings?: (columnId: string) => void;
|
|
486
540
|
paginationOptions?: CraftTablePaginationProps;
|
|
487
541
|
featureOptions?: CraftTableFeatureProps;
|
|
488
542
|
nestedComponent?: React$1.ComponentType<{
|
|
@@ -497,9 +551,11 @@ interface CraftTableProps<T> {
|
|
|
497
551
|
filterOptions?: FilterOptionsProps;
|
|
498
552
|
settingsOptions?: settingsOptionsProps;
|
|
499
553
|
craftTableFilterSettingsOptions?: craftTableFilterSettingsOptionsProps;
|
|
554
|
+
activeTab?: string;
|
|
500
555
|
}
|
|
501
556
|
interface CraftTableComponentProps<T> {
|
|
502
557
|
table: Table<T>;
|
|
558
|
+
activeTab?: string;
|
|
503
559
|
featureOptions: CraftTableFeatureProps;
|
|
504
560
|
NestedComponent?: React$1.ComponentType<{
|
|
505
561
|
row: Row<T>;
|
|
@@ -508,14 +564,19 @@ interface CraftTableComponentProps<T> {
|
|
|
508
564
|
setColumnOrder: React$1.Dispatch<React$1.SetStateAction<ColumnOrderState>>;
|
|
509
565
|
isCompactTable: boolean;
|
|
510
566
|
tableStates: CraftTableOptionsProps;
|
|
567
|
+
filterSettingStates: craftTableFilterSettingsOptionsProps;
|
|
568
|
+
onSaveSettings?: (columnId: string) => void;
|
|
511
569
|
}
|
|
512
570
|
interface TableHeaderProps<T> {
|
|
513
571
|
header: Header<T, unknown>;
|
|
572
|
+
activeTab?: string;
|
|
514
573
|
featureOptions: CraftTableFeatureProps;
|
|
515
574
|
tableStates: CraftTableOptionsProps;
|
|
575
|
+
filterSettingStates: craftTableFilterSettingsOptionsProps;
|
|
576
|
+
onSaveSettings?: (columnId: string) => void;
|
|
516
577
|
}
|
|
517
578
|
|
|
518
|
-
declare function TableWrapper<T>({ data, columns, tableStates, paginationOptions, featureOptions, topbarOptions, nestedComponent, loadingOptions, customRenderFn, shouldHideColumn, emptyListComponent, filterOptions, }: CraftTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
579
|
+
declare function TableWrapper<T>({ data, columns, tableStates, filterSettingStates, onSaveSettings, paginationOptions, featureOptions, topbarOptions, nestedComponent, loadingOptions, customRenderFn, shouldHideColumn, emptyListComponent, filterOptions, activeTab, }: CraftTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
519
580
|
|
|
520
581
|
declare function useCraftTable(paginationPageSize?: number): CraftTableOptionsProps;
|
|
521
582
|
|
|
@@ -538,7 +599,7 @@ declare function TableTabs({ loading, tabsData, activeTab, onClick, tableStates,
|
|
|
538
599
|
|
|
539
600
|
declare function TableFilter({ onClose, columnsData, tableStates, onDeleteFilter, onSaveFilter, onUpdateFilter, dropdownData, onChangeFunction, filterComponentOptions, }: FilterDrawerProps): react_jsx_runtime.JSX.Element;
|
|
540
601
|
|
|
541
|
-
declare function QuickFilterSettings({ view, show, filterSettingStates, onClose, columnsData, columnsDataLoading, quickTabAttributes, quickTabAttributesLoading, sortingTabAttributes, sortingTabAttributesLoading, tabsApiData, tabsApiDataLoading, onSaveSettingsData, }: QuickFilterModalProps): react_jsx_runtime.JSX.Element;
|
|
602
|
+
declare function QuickFilterSettings({ view, show, filterSettingStates, onClose, columnsData, columnsDataLoading, quickTabAttributes, quickTabAttributesLoading, columnTabAttributes, columnTabAttributesLoading, sortingTabAttributes, sortingTabAttributesLoading, tabsApiData, tabsApiDataLoading, onSaveSettingsData, activeTab, }: QuickFilterModalProps): react_jsx_runtime.JSX.Element;
|
|
542
603
|
|
|
543
604
|
interface TableSearchProps {
|
|
544
605
|
value: string;
|
|
@@ -559,4 +620,4 @@ declare const Kanban: ({ metaData, data, isLoading, KanbanCardComponent, showSet
|
|
|
559
620
|
}) => react_jsx_runtime.JSX.Element;
|
|
560
621
|
|
|
561
622
|
export { TableFilter as CraftTableFilter, TableSearch as CraftTableSearch, QuickFilterSettings as CraftTableSettings, TableTabs as CraftTableTabs, Kanban as KanbanWrapper, TableWrapper, useCraftTable, useCraftTableFilterSettings };
|
|
562
|
-
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, FilterStateProps, OperationList, OperationOption, TableHeaderProps, TopbarOptionsProps, craftTableFilterSettingsOptionsProps, createSavedFilterPayload, deleteSavedFilterPayload, settingsOptionsProps, updateSavedFilterPayload, viewSettingsPayload };
|
|
623
|
+
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 };
|