rez-table-listing-mui 1.3.43 → 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 -10
- 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 -4
- package/src/listing/types/table.ts +9 -0
- package/src/view/FIlterWrapper.tsx +15 -0
- package/src/view/ListingView.tsx +178 -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,7 +309,7 @@ interface FilterDataMainFilterEntityWiseCriteriaProps {
|
|
|
266
309
|
attribute_key: string;
|
|
267
310
|
element_type: FilterInputDataTypes;
|
|
268
311
|
datasource_list: any;
|
|
269
|
-
|
|
312
|
+
data_type: FilterInputDataTypes;
|
|
270
313
|
}
|
|
271
314
|
interface FilterDataProps {
|
|
272
315
|
mainFilter?: {
|
|
@@ -290,6 +333,8 @@ interface QuickFilterModalProps {
|
|
|
290
333
|
columnsDataLoading?: boolean;
|
|
291
334
|
quickTabAttributes?: any[];
|
|
292
335
|
quickTabAttributesLoading?: boolean;
|
|
336
|
+
columnTabAttributes?: any[];
|
|
337
|
+
columnTabAttributesLoading?: boolean;
|
|
293
338
|
sortingTabAttributes?: any[];
|
|
294
339
|
sortingTabAttributesLoading?: boolean;
|
|
295
340
|
tabsApiData?: {
|
|
@@ -298,8 +343,8 @@ interface QuickFilterModalProps {
|
|
|
298
343
|
}[];
|
|
299
344
|
tabsApiDataLoading?: boolean;
|
|
300
345
|
onSaveSettingsData?: (data: any) => void;
|
|
346
|
+
activeTab?: string;
|
|
301
347
|
}
|
|
302
|
-
type TabName = string;
|
|
303
348
|
type SortingType = "asc" | "desc";
|
|
304
349
|
type QuickTabSortingType = "asc" | "dsc" | "count_asc" | "count_dsc" | "custom";
|
|
305
350
|
interface QuickTabConfigProps {
|
|
@@ -321,7 +366,10 @@ interface ColumnItem {
|
|
|
321
366
|
value: string;
|
|
322
367
|
}
|
|
323
368
|
interface ColumnTab {
|
|
324
|
-
tab_name:
|
|
369
|
+
tab_name: {
|
|
370
|
+
label: string;
|
|
371
|
+
value: string;
|
|
372
|
+
};
|
|
325
373
|
show_list: ColumnItem[];
|
|
326
374
|
hide_list: ColumnItem[];
|
|
327
375
|
}
|
|
@@ -330,7 +378,10 @@ interface SortingConfigSortByProps {
|
|
|
330
378
|
order: SortingType;
|
|
331
379
|
}
|
|
332
380
|
interface SortingConfigTabProps {
|
|
333
|
-
tab_name:
|
|
381
|
+
tab_name: {
|
|
382
|
+
label: string;
|
|
383
|
+
value: string;
|
|
384
|
+
};
|
|
334
385
|
sortby: SortingConfigSortByProps[];
|
|
335
386
|
}
|
|
336
387
|
interface SortingConfigProps {
|
|
@@ -484,6 +535,8 @@ interface CraftTableProps<T> {
|
|
|
484
535
|
data: T[];
|
|
485
536
|
columns: CustomColumnDef<T>[];
|
|
486
537
|
tableStates: CraftTableOptionsProps;
|
|
538
|
+
filterSettingStates: craftTableFilterSettingsOptionsProps;
|
|
539
|
+
onSaveSettings?: (columnId: string) => void;
|
|
487
540
|
paginationOptions?: CraftTablePaginationProps;
|
|
488
541
|
featureOptions?: CraftTableFeatureProps;
|
|
489
542
|
nestedComponent?: React$1.ComponentType<{
|
|
@@ -498,9 +551,11 @@ interface CraftTableProps<T> {
|
|
|
498
551
|
filterOptions?: FilterOptionsProps;
|
|
499
552
|
settingsOptions?: settingsOptionsProps;
|
|
500
553
|
craftTableFilterSettingsOptions?: craftTableFilterSettingsOptionsProps;
|
|
554
|
+
activeTab?: string;
|
|
501
555
|
}
|
|
502
556
|
interface CraftTableComponentProps<T> {
|
|
503
557
|
table: Table<T>;
|
|
558
|
+
activeTab?: string;
|
|
504
559
|
featureOptions: CraftTableFeatureProps;
|
|
505
560
|
NestedComponent?: React$1.ComponentType<{
|
|
506
561
|
row: Row<T>;
|
|
@@ -509,14 +564,19 @@ interface CraftTableComponentProps<T> {
|
|
|
509
564
|
setColumnOrder: React$1.Dispatch<React$1.SetStateAction<ColumnOrderState>>;
|
|
510
565
|
isCompactTable: boolean;
|
|
511
566
|
tableStates: CraftTableOptionsProps;
|
|
567
|
+
filterSettingStates: craftTableFilterSettingsOptionsProps;
|
|
568
|
+
onSaveSettings?: (columnId: string) => void;
|
|
512
569
|
}
|
|
513
570
|
interface TableHeaderProps<T> {
|
|
514
571
|
header: Header<T, unknown>;
|
|
572
|
+
activeTab?: string;
|
|
515
573
|
featureOptions: CraftTableFeatureProps;
|
|
516
574
|
tableStates: CraftTableOptionsProps;
|
|
575
|
+
filterSettingStates: craftTableFilterSettingsOptionsProps;
|
|
576
|
+
onSaveSettings?: (columnId: string) => void;
|
|
517
577
|
}
|
|
518
578
|
|
|
519
|
-
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;
|
|
520
580
|
|
|
521
581
|
declare function useCraftTable(paginationPageSize?: number): CraftTableOptionsProps;
|
|
522
582
|
|
|
@@ -539,7 +599,7 @@ declare function TableTabs({ loading, tabsData, activeTab, onClick, tableStates,
|
|
|
539
599
|
|
|
540
600
|
declare function TableFilter({ onClose, columnsData, tableStates, onDeleteFilter, onSaveFilter, onUpdateFilter, dropdownData, onChangeFunction, filterComponentOptions, }: FilterDrawerProps): react_jsx_runtime.JSX.Element;
|
|
541
601
|
|
|
542
|
-
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;
|
|
543
603
|
|
|
544
604
|
interface TableSearchProps {
|
|
545
605
|
value: string;
|
|
@@ -560,4 +620,4 @@ declare const Kanban: ({ metaData, data, isLoading, KanbanCardComponent, showSet
|
|
|
560
620
|
}) => react_jsx_runtime.JSX.Element;
|
|
561
621
|
|
|
562
622
|
export { TableFilter as CraftTableFilter, TableSearch as CraftTableSearch, QuickFilterSettings as CraftTableSettings, TableTabs as CraftTableTabs, Kanban as KanbanWrapper, TableWrapper, useCraftTable, useCraftTableFilterSettings };
|
|
563
|
-
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 };
|