rez-table-listing-mui 1.2.18 → 1.3.0
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 +63 -1
- 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 +2 -3
- package/src/kanban/index.tsx +24 -21
- package/src/listing/components/common/loader/loader.tsx +1 -0
- package/src/listing/components/filter/components/attributes-filter.tsx +3 -91
- package/src/listing/components/filter/components/forms/components/Date.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 +31 -82
- package/src/listing/components/filter/components/forms/components/Multi-Select.tsx +2 -2
- package/src/listing/components/filter/components/forms/components/Select.tsx +2 -2
- package/src/listing/components/filter/components/forms/components/Textfield.tsx +2 -2
- package/src/listing/components/filter/components/forms/components/empty-list.tsx +17 -0
- package/src/listing/components/filter/components/forms/components/filter-criteria-entity-list.tsx +92 -0
- package/src/listing/components/filter/components/forms/components/filter-criteria-list.tsx +104 -0
- package/src/listing/components/filter/components/forms/components/styles.tsx +2 -1
- package/src/listing/components/filter/components/forms/index.tsx +238 -174
- package/src/listing/components/filter/components/main-filter.tsx +6 -14
- package/src/listing/components/filter/components/saved-edit-filter.tsx +0 -31
- package/src/listing/components/filter/components/saved-filter.tsx +0 -22
- package/src/listing/components/filter/index.tsx +162 -130
- package/src/listing/components/filter/style.ts +20 -3
- package/src/listing/libs/hooks/useCraftTable.tsx +9 -0
- package/src/listing/libs/hooks/useEntityTableAPI.tsx +25 -0
- package/src/listing/libs/utils/apiColumn.ts +27 -1
- package/src/listing/libs/utils/common.ts +1 -1
- package/src/listing/libs/utils/deep-merge-objects.ts +18 -0
- package/src/listing/types/common.ts +0 -2
- package/src/listing/types/filter.ts +54 -7
- package/src/listing/types/table-options.ts +8 -0
- package/src/view/FIlterWrapper.tsx +45 -6
package/dist/index.d.ts
CHANGED
|
@@ -56,6 +56,26 @@ interface FilterColumnsDataProps {
|
|
|
56
56
|
interface FilterDropdownDataProps {
|
|
57
57
|
[key: string]: FilterOperationListProps[];
|
|
58
58
|
}
|
|
59
|
+
interface FilterComponentOptionsMainFilterOptions {
|
|
60
|
+
showSaveButton?: boolean;
|
|
61
|
+
showClearAllButton?: boolean;
|
|
62
|
+
}
|
|
63
|
+
type FilterComponentOptions = {
|
|
64
|
+
showMainHeader?: boolean;
|
|
65
|
+
showTabs?: true;
|
|
66
|
+
showMainFilter?: boolean;
|
|
67
|
+
showSavedFilter?: boolean;
|
|
68
|
+
showAttributesFilter?: boolean;
|
|
69
|
+
tabOptions?: {
|
|
70
|
+
mainFilter?: FilterComponentOptionsMainFilterOptions;
|
|
71
|
+
};
|
|
72
|
+
} | {
|
|
73
|
+
showMainHeader?: boolean;
|
|
74
|
+
showTabs?: false;
|
|
75
|
+
tabOptions?: {
|
|
76
|
+
mainFilter?: FilterComponentOptionsMainFilterOptions;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
59
79
|
interface FilterDrawerProps {
|
|
60
80
|
tableStates: CraftTableOptionsProps;
|
|
61
81
|
open?: boolean;
|
|
@@ -78,11 +98,26 @@ interface FilterDrawerProps {
|
|
|
78
98
|
entity_list: any[];
|
|
79
99
|
};
|
|
80
100
|
onChangeFunction: ({ updatedFilters, filterMaster, }: onFilterChangeFunctionProps) => void;
|
|
101
|
+
filterComponentOptions?: FilterComponentOptions;
|
|
81
102
|
}
|
|
82
103
|
interface FilterStateProps {
|
|
83
104
|
filter_attribute: string;
|
|
84
105
|
filter_operator: string;
|
|
85
106
|
filter_value: string | string[];
|
|
107
|
+
id: string | number;
|
|
108
|
+
name: string | undefined;
|
|
109
|
+
data_type: FilterInputDataTypes | undefined;
|
|
110
|
+
attribute_key?: string;
|
|
111
|
+
dropdown_list?: {
|
|
112
|
+
label?: string;
|
|
113
|
+
value?: string;
|
|
114
|
+
}[];
|
|
115
|
+
optionList?: {
|
|
116
|
+
label?: string | undefined;
|
|
117
|
+
value?: string | undefined;
|
|
118
|
+
};
|
|
119
|
+
filter_entity_type?: string;
|
|
120
|
+
filter_entity_name?: string;
|
|
86
121
|
}
|
|
87
122
|
interface FilterMasterStateProps {
|
|
88
123
|
attributes: {
|
|
@@ -95,6 +130,29 @@ interface FilterMasterStateProps {
|
|
|
95
130
|
};
|
|
96
131
|
activeFilterTabIndex: number;
|
|
97
132
|
}
|
|
133
|
+
interface FilterDataMainFilterEntityListProps {
|
|
134
|
+
value: string;
|
|
135
|
+
id: string | number;
|
|
136
|
+
label: string;
|
|
137
|
+
}
|
|
138
|
+
interface FilterDataMainFilterEntityWiseCriteriaProps {
|
|
139
|
+
id: string;
|
|
140
|
+
name: string;
|
|
141
|
+
attribute_key: string;
|
|
142
|
+
element_type: FilterInputDataTypes;
|
|
143
|
+
}
|
|
144
|
+
interface FilterDataProps {
|
|
145
|
+
mainFilter?: {
|
|
146
|
+
entityList?: {
|
|
147
|
+
data?: FilterDataMainFilterEntityListProps[];
|
|
148
|
+
isPending?: boolean;
|
|
149
|
+
};
|
|
150
|
+
entityWiseCriteria?: {
|
|
151
|
+
data?: FilterDataMainFilterEntityWiseCriteriaProps[];
|
|
152
|
+
isPending?: boolean;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
}
|
|
98
156
|
|
|
99
157
|
interface QuickFilterModalProps {
|
|
100
158
|
view?: string;
|
|
@@ -192,6 +250,10 @@ interface CraftTableOptionsProps {
|
|
|
192
250
|
setShowFilterOption: Dispatch<SetStateAction<boolean>>;
|
|
193
251
|
columnPinning: ColumnPinningState;
|
|
194
252
|
setColumnPinning: Dispatch<SetStateAction<ColumnPinningState>>;
|
|
253
|
+
filterData: FilterDataProps | null;
|
|
254
|
+
setFilterData: Dispatch<SetStateAction<FilterDataProps | null>>;
|
|
255
|
+
selectedFilterEntity: FilterDataMainFilterEntityListProps | undefined;
|
|
256
|
+
setSelectedFilterEntity: Dispatch<SetStateAction<FilterDataMainFilterEntityListProps | undefined>>;
|
|
195
257
|
}
|
|
196
258
|
interface craftTableFilterSettingsOptionsProps {
|
|
197
259
|
settingsData: SettingsDataProps;
|
|
@@ -335,7 +397,7 @@ interface TableTabsProps {
|
|
|
335
397
|
}
|
|
336
398
|
declare function TableTabs({ loading, tabsData, activeTab, onClick, tableStates, settingsOptions, }: TableTabsProps): react_jsx_runtime.JSX.Element;
|
|
337
399
|
|
|
338
|
-
declare function TableFilter({ onClose, columnsData, tableStates, onDeleteFilter, onSaveFilter, onUpdateFilter, dropdownData, onChangeFunction, }: FilterDrawerProps): react_jsx_runtime.JSX.Element;
|
|
400
|
+
declare function TableFilter({ onClose, columnsData, tableStates, onDeleteFilter, onSaveFilter, onUpdateFilter, dropdownData, onChangeFunction, filterComponentOptions, }: FilterDrawerProps): react_jsx_runtime.JSX.Element;
|
|
339
401
|
|
|
340
402
|
declare function QuickFilterSettings({ view, show, filterSettingStates, onClose, columnsData, columnsDataLoading, tabsApiData, tabsApiDataLoading, onSaveSettingsData, }: QuickFilterModalProps): react_jsx_runtime.JSX.Element;
|
|
341
403
|
|