@snowpact/react-tanstack-query-table 1.4.3 → 1.5.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.cjs +12 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -13
- package/dist/index.js +1412 -1449
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -27,9 +27,9 @@ declare interface ActionCellProps<T, K> {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* Confirm content
|
|
30
|
+
* Confirm content is always a function receiving { close, confirm } helpers
|
|
31
31
|
*/
|
|
32
|
-
export declare type ActionConfirmContent =
|
|
32
|
+
export declare type ActionConfirmContent = (helpers: ConfirmHelpers) => ReactNode;
|
|
33
33
|
|
|
34
34
|
export declare type BaseAction = {
|
|
35
35
|
icon: IconComponent;
|
|
@@ -43,9 +43,6 @@ export declare type BaseAction = {
|
|
|
43
43
|
title: string;
|
|
44
44
|
content: ActionConfirmContent;
|
|
45
45
|
subtitle?: string;
|
|
46
|
-
confirmText?: string;
|
|
47
|
-
cancelText?: string;
|
|
48
|
-
hideButtons?: boolean;
|
|
49
46
|
};
|
|
50
47
|
};
|
|
51
48
|
|
|
@@ -94,21 +91,19 @@ export declare type ColumnConfigurationProps<T extends object> = {
|
|
|
94
91
|
table: Table<T>;
|
|
95
92
|
};
|
|
96
93
|
|
|
97
|
-
export declare
|
|
98
|
-
close: () => void;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export declare type ConfirmContent = ReactNode | ((helpers: ConfirmCloseHelper) => ReactNode);
|
|
94
|
+
export declare type ConfirmContent = (helpers: ConfirmHelpers) => ReactNode;
|
|
102
95
|
|
|
103
96
|
export declare type ConfirmFunction = (options: ConfirmOptions) => Promise<boolean>;
|
|
104
97
|
|
|
98
|
+
export declare interface ConfirmHelpers {
|
|
99
|
+
close: () => void;
|
|
100
|
+
confirm: () => void;
|
|
101
|
+
}
|
|
102
|
+
|
|
105
103
|
declare interface ConfirmOptions {
|
|
106
104
|
title: string;
|
|
107
105
|
subtitle?: string;
|
|
108
106
|
content: ConfirmContent;
|
|
109
|
-
confirmText?: string;
|
|
110
|
-
cancelText?: string;
|
|
111
|
-
hideButtons?: boolean;
|
|
112
107
|
}
|
|
113
108
|
|
|
114
109
|
export declare function DataTable<Data extends object>({ data, columns, isLoading, isFetching, mode, pagination: externalPagination, onPaginationChange: externalOnPaginationChange, totalCount: externalTotalCount, globalFilter: externalGlobalFilter, onGlobalFilterChange: externalOnGlobalFilterChange, enableGlobalSearch, filters, columnFilters: externalColumnFilters, onColumnFiltersChange: externalOnColumnFiltersChange, prefilters, activePrefilter, onPrefilterChange, sorting: externalSorting, onSortingChange: externalOnSortingChange, enableSorting, columnVisibility: externalColumnVisibility, onColumnVisibilityChange: externalOnColumnVisibilityChange, enableColumnConfiguration, onRowClick, activeRowId, displayTotalNumber, enableElementLabel, enablePagination, paginationSizes, enableResponsive, texts, onResetFilters, }: DataTableProps<Data>): JSX.Element;
|