rez-table-listing-mui 1.0.36 → 1.0.38
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 +69 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/App.tsx +77 -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/index-table.tsx +5 -2
- 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 +336 -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 +319 -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/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,51 @@ interface FilterMasterStateProps {
|
|
|
89
89
|
activeFilterTabIndex: number;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
type TabName = string;
|
|
93
|
+
type SortingType = "asc" | "desc";
|
|
94
|
+
type QuickTabSortingType = "asc" | "dsc" | "count_asc" | "count_dsc" | "custom";
|
|
95
|
+
interface QuickTabConfigProps {
|
|
96
|
+
attribute?: string;
|
|
97
|
+
sorting?: QuickTabSortingType;
|
|
98
|
+
hide_list?: string[];
|
|
99
|
+
show_list?: string[];
|
|
100
|
+
isAllSelected?: boolean;
|
|
101
|
+
isCombineOther?: boolean;
|
|
102
|
+
}
|
|
103
|
+
interface ColumnItem {
|
|
104
|
+
label: string;
|
|
105
|
+
value: string;
|
|
106
|
+
}
|
|
107
|
+
interface ColumnTab {
|
|
108
|
+
tab_name: TabName;
|
|
109
|
+
show_list: ColumnItem[];
|
|
110
|
+
hide_list: ColumnItem[];
|
|
111
|
+
}
|
|
112
|
+
interface SortingConfigSortByProps {
|
|
113
|
+
column: string;
|
|
114
|
+
order: SortingType;
|
|
115
|
+
}
|
|
116
|
+
interface SortingConfigTabProps {
|
|
117
|
+
tab_name: TabName;
|
|
118
|
+
sortby: SortingConfigSortByProps[];
|
|
119
|
+
}
|
|
120
|
+
interface SortingConfigProps {
|
|
121
|
+
isDefault?: boolean;
|
|
122
|
+
sortby?: SortingConfigSortByProps[];
|
|
123
|
+
tabs?: SortingConfigTabProps[];
|
|
124
|
+
}
|
|
125
|
+
interface ColumnTabConfigProps {
|
|
126
|
+
isDefault?: boolean;
|
|
127
|
+
show_list?: ColumnItem[];
|
|
128
|
+
hide_list?: ColumnItem[];
|
|
129
|
+
tabs?: ColumnTab[];
|
|
130
|
+
}
|
|
131
|
+
interface SettingsDataProps {
|
|
132
|
+
quick_tab?: QuickTabConfigProps;
|
|
133
|
+
column?: ColumnTabConfigProps;
|
|
134
|
+
sorting?: SortingConfigProps;
|
|
135
|
+
}
|
|
136
|
+
|
|
92
137
|
interface CraftTableOptionsProps {
|
|
93
138
|
sorting: SortingState;
|
|
94
139
|
setSorting: Dispatch<SetStateAction<SortingState>>;
|
|
@@ -115,6 +160,18 @@ interface CraftTableOptionsProps {
|
|
|
115
160
|
showTableFilter: boolean;
|
|
116
161
|
setShowTableFilter: Dispatch<SetStateAction<boolean>>;
|
|
117
162
|
}
|
|
163
|
+
interface craftTableFilterSettingsOptionsProps {
|
|
164
|
+
settingsData: SettingsDataProps;
|
|
165
|
+
setSettingsData: Dispatch<SetStateAction<SettingsDataProps>>;
|
|
166
|
+
showListViewSettings: boolean;
|
|
167
|
+
setShowListViewSettings: Dispatch<SetStateAction<boolean>>;
|
|
168
|
+
quickTabStates: QuickTabConfigProps;
|
|
169
|
+
setQuickTabStates: Dispatch<SetStateAction<QuickTabConfigProps>>;
|
|
170
|
+
columnTabState: ColumnTabConfigProps;
|
|
171
|
+
setColumnTabState: Dispatch<SetStateAction<ColumnTabConfigProps>>;
|
|
172
|
+
sortingTabState: SortingConfigProps;
|
|
173
|
+
setSortingTabState: Dispatch<SetStateAction<SortingConfigProps>>;
|
|
174
|
+
}
|
|
118
175
|
interface CraftTableFeatureProps {
|
|
119
176
|
enableSorting?: boolean;
|
|
120
177
|
enableServerSidePagination?: boolean;
|
|
@@ -178,9 +235,14 @@ interface CraftTableStyleProps {
|
|
|
178
235
|
wrapperStyle?: React.CSSProperties;
|
|
179
236
|
}
|
|
180
237
|
interface FilterOptionsProps {
|
|
238
|
+
onClick?: () => void;
|
|
181
239
|
show?: boolean;
|
|
182
240
|
component: React.ReactNode;
|
|
183
241
|
}
|
|
242
|
+
interface settingsOptionsProps {
|
|
243
|
+
showIcon?: boolean;
|
|
244
|
+
onClick?: () => void;
|
|
245
|
+
}
|
|
184
246
|
interface CraftTableProps<T> {
|
|
185
247
|
data: T[];
|
|
186
248
|
columns: CustomColumnDef<T>[];
|
|
@@ -197,6 +259,8 @@ interface CraftTableProps<T> {
|
|
|
197
259
|
styleOptions?: CraftTableStyleProps;
|
|
198
260
|
emptyListComponent?: React.ReactNode;
|
|
199
261
|
filterOptions?: FilterOptionsProps;
|
|
262
|
+
settingsOptions?: settingsOptionsProps;
|
|
263
|
+
craftTableFilterSettingsOptions?: craftTableFilterSettingsOptionsProps;
|
|
200
264
|
}
|
|
201
265
|
interface CraftTableComponentProps<T> {
|
|
202
266
|
table: Table<T>;
|
|
@@ -225,14 +289,16 @@ interface TabDataProps {
|
|
|
225
289
|
}
|
|
226
290
|
interface TableTabsProps {
|
|
227
291
|
loading?: boolean;
|
|
228
|
-
tabsData
|
|
292
|
+
tabsData?: TabDataProps[];
|
|
229
293
|
activeTab?: string;
|
|
230
294
|
tableStates: CraftTableOptionsProps;
|
|
231
295
|
onClick: (state: string) => void;
|
|
296
|
+
columns?: any[];
|
|
297
|
+
settingsOptions?: settingsOptionsProps;
|
|
232
298
|
}
|
|
233
|
-
declare function TableTabs({ loading, tabsData, activeTab, onClick, tableStates, }: TableTabsProps): react_jsx_runtime.JSX.Element;
|
|
299
|
+
declare function TableTabs({ loading, tabsData, activeTab, onClick, tableStates, settingsOptions, }: TableTabsProps): react_jsx_runtime.JSX.Element;
|
|
234
300
|
|
|
235
301
|
declare function TableFilter({ onClose, columnsData, tableStates, onDeleteFilter, onSaveFilter, onUpdateFilter, dropdownData, }: FilterDrawerProps): react_jsx_runtime.JSX.Element;
|
|
236
302
|
|
|
237
303
|
export { TableFilter as CraftTableFilter, TableTabs as CraftTableTabs, TableWrapper, useCraftTable };
|
|
238
|
-
export type { CraftTableComponentProps, CraftTableFeatureProps, CraftTableOptionsProps, CraftTablePaginationProps, CraftTableProps, CustomRenderContext, CustomRenderFnMap, TableHeaderProps, TopbarOptionsProps };
|
|
304
|
+
export type { CraftTableComponentProps, CraftTableFeatureProps, CraftTableOptionsProps, CraftTablePaginationProps, CraftTableProps, CustomRenderContext, CustomRenderFnMap, FilterOptionsProps, TableHeaderProps, TopbarOptionsProps, craftTableFilterSettingsOptionsProps, settingsOptionsProps };
|