rez-table-listing-mui 1.0.37 → 1.0.39
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 +100 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/App.tsx +82 -27
- package/src/components/common/confirm-modal/index.tsx +8 -3
- package/src/components/filter/components/forms/components/Date.tsx +109 -161
- package/src/components/filter/components/forms/components/Filter-criteria.tsx +12 -55
- package/src/components/filter/components/forms/index.tsx +1 -1
- package/src/components/filter/components/saved-filter.tsx +6 -3
- package/src/components/filter/index.tsx +1 -1
- package/src/components/filter/style.ts +0 -1
- package/src/components/index-table.tsx +5 -2
- package/src/components/index.scss +2 -0
- package/src/components/login/index.tsx +1 -1
- package/src/components/search/index.tsx +31 -6
- package/src/components/table-head-popover.tsx +1 -1
- package/src/components/table-settings/common/draggable-listitem.tsx +66 -0
- package/src/components/table-settings/common/listing-values.tsx +117 -0
- package/src/components/table-settings/components/column.tsx +332 -0
- package/src/components/table-settings/components/custom-button.tsx +15 -0
- package/src/components/table-settings/components/custom-dialog.tsx +27 -0
- package/src/components/table-settings/components/quick-tab.tsx +335 -0
- package/src/components/table-settings/components/sorting.tsx +619 -0
- package/src/components/table-settings/components/toggle-button-switch.tsx +45 -0
- package/src/components/table-settings/constants.ts +12 -0
- package/src/components/table-settings/index.tsx +133 -0
- package/src/components/table-settings/style.ts +115 -0
- package/src/components/table-settings/tabs/horizontal/index.tsx +21 -0
- package/src/components/table-settings/tabs/styles.ts +67 -0
- package/src/components/table-settings/tabs/vertical/custom-tab-panel.tsx +29 -0
- package/src/components/table-settings/tabs/vertical/index.tsx +38 -0
- package/src/components/tabs/index.tsx +30 -36
- package/src/index.ts +1 -0
- package/src/libs/hooks/useCraftTableFilterSettings.tsx +176 -0
- package/src/libs/hooks/useEntityTableAPI.tsx +82 -1
- package/src/libs/utils/apiColumn.ts +25 -0
- package/src/libs/utils/common.ts +2 -2
- package/src/types/common.ts +6 -0
- package/src/types/filter-settings.ts +97 -0
- package/src/types/filter.ts +6 -0
- package/src/types/table-options.ts +19 -0
- package/src/types/table.ts +10 -1
- package/.env.uat +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -89,6 +89,82 @@ interface FilterMasterStateProps {
|
|
|
89
89
|
activeFilterTabIndex: number;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
interface QuickFilterModalProps {
|
|
93
|
+
show?: boolean;
|
|
94
|
+
filterSettingStates: craftTableFilterSettingsOptionsProps;
|
|
95
|
+
onClose?: () => void;
|
|
96
|
+
columnsData: FilterColumnsDataProps;
|
|
97
|
+
tabsApiData?: string[];
|
|
98
|
+
tabsApiDataLoading?: boolean;
|
|
99
|
+
}
|
|
100
|
+
type TabName = string;
|
|
101
|
+
type SortingType = "asc" | "desc";
|
|
102
|
+
type QuickTabSortingType = "asc" | "dsc" | "count_asc" | "count_dsc" | "custom";
|
|
103
|
+
interface QuickTabConfigProps {
|
|
104
|
+
attribute?: string;
|
|
105
|
+
sorting?: QuickTabSortingType;
|
|
106
|
+
hide_list?: string[];
|
|
107
|
+
show_list?: string[];
|
|
108
|
+
isAllSelected?: boolean;
|
|
109
|
+
isCombineOther?: boolean;
|
|
110
|
+
}
|
|
111
|
+
interface ColumnItem {
|
|
112
|
+
label: string;
|
|
113
|
+
value: string;
|
|
114
|
+
}
|
|
115
|
+
interface ColumnTab {
|
|
116
|
+
tab_name: TabName;
|
|
117
|
+
show_list: ColumnItem[];
|
|
118
|
+
hide_list: ColumnItem[];
|
|
119
|
+
}
|
|
120
|
+
interface SortingConfigSortByProps {
|
|
121
|
+
column: string;
|
|
122
|
+
order: SortingType;
|
|
123
|
+
}
|
|
124
|
+
interface SortingConfigTabProps {
|
|
125
|
+
tab_name: TabName;
|
|
126
|
+
sortby: SortingConfigSortByProps[];
|
|
127
|
+
}
|
|
128
|
+
interface SortingConfigProps {
|
|
129
|
+
isDefault?: boolean;
|
|
130
|
+
sortby?: SortingConfigSortByProps[];
|
|
131
|
+
tabs?: SortingConfigTabProps[];
|
|
132
|
+
}
|
|
133
|
+
interface ColumnTabConfigProps {
|
|
134
|
+
isDefault?: boolean;
|
|
135
|
+
show_list?: ColumnItem[];
|
|
136
|
+
hide_list?: ColumnItem[];
|
|
137
|
+
tabs?: ColumnTab[];
|
|
138
|
+
}
|
|
139
|
+
interface SettingsSortingProps {
|
|
140
|
+
filterSettingStates: craftTableFilterSettingsOptionsProps;
|
|
141
|
+
columnsData: FilterColumnsDataProps;
|
|
142
|
+
}
|
|
143
|
+
interface SettingsQuickTabStateProps {
|
|
144
|
+
attribute?: string;
|
|
145
|
+
sorting?: string;
|
|
146
|
+
hide_list: string[];
|
|
147
|
+
show_list: string[];
|
|
148
|
+
isAllSelected?: boolean;
|
|
149
|
+
isCombineOther?: boolean;
|
|
150
|
+
}
|
|
151
|
+
interface SettingsQuickTabProps {
|
|
152
|
+
filterSettingStates: craftTableFilterSettingsOptionsProps;
|
|
153
|
+
columnsData: FilterColumnsDataProps;
|
|
154
|
+
tabsApiData?: string[];
|
|
155
|
+
tabsApiDataLoading?: boolean;
|
|
156
|
+
}
|
|
157
|
+
interface SettingsDataProps {
|
|
158
|
+
quick_tab?: QuickTabConfigProps;
|
|
159
|
+
column?: ColumnTabConfigProps;
|
|
160
|
+
sorting?: SortingConfigProps;
|
|
161
|
+
}
|
|
162
|
+
interface ToggleButtonTabsProps {
|
|
163
|
+
label: string;
|
|
164
|
+
value: boolean;
|
|
165
|
+
isDisabled: boolean;
|
|
166
|
+
}
|
|
167
|
+
|
|
92
168
|
interface CraftTableOptionsProps {
|
|
93
169
|
sorting: SortingState;
|
|
94
170
|
setSorting: Dispatch<SetStateAction<SortingState>>;
|
|
@@ -115,6 +191,18 @@ interface CraftTableOptionsProps {
|
|
|
115
191
|
showTableFilter: boolean;
|
|
116
192
|
setShowTableFilter: Dispatch<SetStateAction<boolean>>;
|
|
117
193
|
}
|
|
194
|
+
interface craftTableFilterSettingsOptionsProps {
|
|
195
|
+
settingsData: SettingsDataProps;
|
|
196
|
+
setSettingsData: Dispatch<SetStateAction<SettingsDataProps>>;
|
|
197
|
+
showListViewSettings: boolean;
|
|
198
|
+
setShowListViewSettings: Dispatch<SetStateAction<boolean>>;
|
|
199
|
+
quickTabStates: QuickTabConfigProps;
|
|
200
|
+
setQuickTabStates: Dispatch<SetStateAction<QuickTabConfigProps>>;
|
|
201
|
+
columnTabState: ColumnTabConfigProps;
|
|
202
|
+
setColumnTabState: Dispatch<SetStateAction<ColumnTabConfigProps>>;
|
|
203
|
+
sortingTabState: SortingConfigProps;
|
|
204
|
+
setSortingTabState: Dispatch<SetStateAction<SortingConfigProps>>;
|
|
205
|
+
}
|
|
118
206
|
interface CraftTableFeatureProps {
|
|
119
207
|
enableSorting?: boolean;
|
|
120
208
|
enableServerSidePagination?: boolean;
|
|
@@ -178,9 +266,14 @@ interface CraftTableStyleProps {
|
|
|
178
266
|
wrapperStyle?: React.CSSProperties;
|
|
179
267
|
}
|
|
180
268
|
interface FilterOptionsProps {
|
|
269
|
+
onClick?: () => void;
|
|
181
270
|
show?: boolean;
|
|
182
271
|
component: React.ReactNode;
|
|
183
272
|
}
|
|
273
|
+
interface settingsOptionsProps {
|
|
274
|
+
showIcon?: boolean;
|
|
275
|
+
onClick?: () => void;
|
|
276
|
+
}
|
|
184
277
|
interface CraftTableProps<T> {
|
|
185
278
|
data: T[];
|
|
186
279
|
columns: CustomColumnDef<T>[];
|
|
@@ -197,6 +290,8 @@ interface CraftTableProps<T> {
|
|
|
197
290
|
styleOptions?: CraftTableStyleProps;
|
|
198
291
|
emptyListComponent?: React.ReactNode;
|
|
199
292
|
filterOptions?: FilterOptionsProps;
|
|
293
|
+
settingsOptions?: settingsOptionsProps;
|
|
294
|
+
craftTableFilterSettingsOptions?: craftTableFilterSettingsOptionsProps;
|
|
200
295
|
}
|
|
201
296
|
interface CraftTableComponentProps<T> {
|
|
202
297
|
table: Table<T>;
|
|
@@ -225,14 +320,16 @@ interface TabDataProps {
|
|
|
225
320
|
}
|
|
226
321
|
interface TableTabsProps {
|
|
227
322
|
loading?: boolean;
|
|
228
|
-
tabsData
|
|
323
|
+
tabsData?: TabDataProps[];
|
|
229
324
|
activeTab?: string;
|
|
230
325
|
tableStates: CraftTableOptionsProps;
|
|
231
326
|
onClick: (state: string) => void;
|
|
327
|
+
columns?: any[];
|
|
328
|
+
settingsOptions?: settingsOptionsProps;
|
|
232
329
|
}
|
|
233
|
-
declare function TableTabs({ loading, tabsData, activeTab, onClick, tableStates, }: TableTabsProps): react_jsx_runtime.JSX.Element;
|
|
330
|
+
declare function TableTabs({ loading, tabsData, activeTab, onClick, tableStates, settingsOptions, }: TableTabsProps): react_jsx_runtime.JSX.Element;
|
|
234
331
|
|
|
235
332
|
declare function TableFilter({ onClose, columnsData, tableStates, onDeleteFilter, onSaveFilter, onUpdateFilter, dropdownData, }: FilterDrawerProps): react_jsx_runtime.JSX.Element;
|
|
236
333
|
|
|
237
334
|
export { TableFilter as CraftTableFilter, TableTabs as CraftTableTabs, TableWrapper, useCraftTable };
|
|
238
|
-
export type { CraftTableComponentProps, CraftTableFeatureProps, CraftTableOptionsProps, CraftTablePaginationProps, CraftTableProps, CustomRenderContext, CustomRenderFnMap, TableHeaderProps, TopbarOptionsProps };
|
|
335
|
+
export type { ColumnTabConfigProps, CraftTableComponentProps, CraftTableFeatureProps, CraftTableOptionsProps, CraftTablePaginationProps, CraftTableProps, CustomRenderContext, CustomRenderFnMap, FilterOptionsProps, QuickFilterModalProps, QuickTabConfigProps, QuickTabSortingType, SettingsDataProps, SettingsQuickTabProps, SettingsQuickTabStateProps, SettingsSortingProps, SortingConfigProps, SortingConfigSortByProps, TableHeaderProps, ToggleButtonTabsProps, TopbarOptionsProps, craftTableFilterSettingsOptionsProps, settingsOptionsProps };
|