@bsol-oss/react-datatable5 12.0.0-beta.50 → 12.0.0-beta.51
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
CHANGED
|
@@ -282,6 +282,7 @@ interface DataTableServerProps<TData extends DataResponse = DataResponse<unknown
|
|
|
282
282
|
query: UseQueryResult<TData>;
|
|
283
283
|
url: string;
|
|
284
284
|
translate: UseTranslationResponse<any, any>;
|
|
285
|
+
tableLabel: DataTableLabel;
|
|
285
286
|
}
|
|
286
287
|
/**
|
|
287
288
|
* DataTableServer will create a context to hold all values to
|
|
@@ -294,7 +295,7 @@ interface DataTableServerProps<TData extends DataResponse = DataResponse<unknown
|
|
|
294
295
|
*
|
|
295
296
|
* @link https://tanstack.com/table/latest/docs/guide/column-defs
|
|
296
297
|
*/
|
|
297
|
-
declare function DataTableServer<TData extends DataResponse = DataResponse<unknown>>({ columns, enableRowSelection, enableMultiRowSelection, enableSubRowSelection, columnOrder, columnFilters, columnVisibility, density, globalFilter, pagination, sorting, rowSelection, setPagination, setSorting, setColumnFilters, setRowSelection, setGlobalFilter, setColumnOrder, setDensity, setColumnVisibility, query, url, translate, children, }: DataTableServerProps<TData>): react_jsx_runtime.JSX.Element;
|
|
298
|
+
declare function DataTableServer<TData extends DataResponse = DataResponse<unknown>>({ columns, enableRowSelection, enableMultiRowSelection, enableSubRowSelection, columnOrder, columnFilters, columnVisibility, density, globalFilter, pagination, sorting, rowSelection, setPagination, setSorting, setColumnFilters, setRowSelection, setGlobalFilter, setColumnOrder, setDensity, setColumnVisibility, query, url, translate, children, tableLabel, }: DataTableServerProps<TData>): react_jsx_runtime.JSX.Element;
|
|
298
299
|
|
|
299
300
|
interface TableControlsProps {
|
|
300
301
|
totalText?: string;
|
package/dist/index.js
CHANGED
|
@@ -2915,7 +2915,20 @@ function DataTable({ columns, data, enableRowSelection = true, enableMultiRowSel
|
|
|
2915
2915
|
*
|
|
2916
2916
|
* @link https://tanstack.com/table/latest/docs/guide/column-defs
|
|
2917
2917
|
*/
|
|
2918
|
-
function DataTableServer({ columns, enableRowSelection = true, enableMultiRowSelection = true, enableSubRowSelection = true, columnOrder, columnFilters, columnVisibility, density, globalFilter, pagination, sorting, rowSelection, setPagination, setSorting, setColumnFilters, setRowSelection, setGlobalFilter, setColumnOrder, setDensity, setColumnVisibility, query, url, translate, children,
|
|
2918
|
+
function DataTableServer({ columns, enableRowSelection = true, enableMultiRowSelection = true, enableSubRowSelection = true, columnOrder, columnFilters, columnVisibility, density, globalFilter, pagination, sorting, rowSelection, setPagination, setSorting, setColumnFilters, setRowSelection, setGlobalFilter, setColumnOrder, setDensity, setColumnVisibility, query, url, translate, children, tableLabel = {
|
|
2919
|
+
view: "View",
|
|
2920
|
+
edit: "Edit",
|
|
2921
|
+
filterButtonText: "Filter",
|
|
2922
|
+
filterTitle: "Filter",
|
|
2923
|
+
filterReset: "Reset",
|
|
2924
|
+
filterClose: "Close",
|
|
2925
|
+
reloadTooltip: "Reload",
|
|
2926
|
+
reloadButtonText: "Reload",
|
|
2927
|
+
resetSelection: "Reset Selection",
|
|
2928
|
+
resetSorting: "Reset Sorting",
|
|
2929
|
+
rowCountText: "Row Count",
|
|
2930
|
+
hasErrorText: "Has Error",
|
|
2931
|
+
}, }) {
|
|
2919
2932
|
const table = reactTable.useReactTable({
|
|
2920
2933
|
_features: [DensityFeature],
|
|
2921
2934
|
data: (query.data?.data ?? []),
|
|
@@ -2985,6 +2998,7 @@ function DataTableServer({ columns, enableRowSelection = true, enableMultiRowSel
|
|
|
2985
2998
|
columnVisibility,
|
|
2986
2999
|
setColumnVisibility,
|
|
2987
3000
|
data: query.data?.data ?? [],
|
|
3001
|
+
tableLabel,
|
|
2988
3002
|
}, children: jsxRuntime.jsx(DataTableServerContext.Provider, { value: { url, query }, children: children }) }));
|
|
2989
3003
|
}
|
|
2990
3004
|
|
package/dist/index.mjs
CHANGED
|
@@ -2895,7 +2895,20 @@ function DataTable({ columns, data, enableRowSelection = true, enableMultiRowSel
|
|
|
2895
2895
|
*
|
|
2896
2896
|
* @link https://tanstack.com/table/latest/docs/guide/column-defs
|
|
2897
2897
|
*/
|
|
2898
|
-
function DataTableServer({ columns, enableRowSelection = true, enableMultiRowSelection = true, enableSubRowSelection = true, columnOrder, columnFilters, columnVisibility, density, globalFilter, pagination, sorting, rowSelection, setPagination, setSorting, setColumnFilters, setRowSelection, setGlobalFilter, setColumnOrder, setDensity, setColumnVisibility, query, url, translate, children,
|
|
2898
|
+
function DataTableServer({ columns, enableRowSelection = true, enableMultiRowSelection = true, enableSubRowSelection = true, columnOrder, columnFilters, columnVisibility, density, globalFilter, pagination, sorting, rowSelection, setPagination, setSorting, setColumnFilters, setRowSelection, setGlobalFilter, setColumnOrder, setDensity, setColumnVisibility, query, url, translate, children, tableLabel = {
|
|
2899
|
+
view: "View",
|
|
2900
|
+
edit: "Edit",
|
|
2901
|
+
filterButtonText: "Filter",
|
|
2902
|
+
filterTitle: "Filter",
|
|
2903
|
+
filterReset: "Reset",
|
|
2904
|
+
filterClose: "Close",
|
|
2905
|
+
reloadTooltip: "Reload",
|
|
2906
|
+
reloadButtonText: "Reload",
|
|
2907
|
+
resetSelection: "Reset Selection",
|
|
2908
|
+
resetSorting: "Reset Sorting",
|
|
2909
|
+
rowCountText: "Row Count",
|
|
2910
|
+
hasErrorText: "Has Error",
|
|
2911
|
+
}, }) {
|
|
2899
2912
|
const table = useReactTable({
|
|
2900
2913
|
_features: [DensityFeature],
|
|
2901
2914
|
data: (query.data?.data ?? []),
|
|
@@ -2965,6 +2978,7 @@ function DataTableServer({ columns, enableRowSelection = true, enableMultiRowSel
|
|
|
2965
2978
|
columnVisibility,
|
|
2966
2979
|
setColumnVisibility,
|
|
2967
2980
|
data: query.data?.data ?? [],
|
|
2981
|
+
tableLabel,
|
|
2968
2982
|
}, children: jsx(DataTableServerContext.Provider, { value: { url, query }, children: children }) }));
|
|
2969
2983
|
}
|
|
2970
2984
|
|
|
@@ -2,6 +2,7 @@ import { ReactNode } from "react";
|
|
|
2
2
|
import { UseQueryResult } from "@tanstack/react-query";
|
|
3
3
|
import { ColumnDef, ColumnFiltersState, ColumnOrderState, OnChangeFn, PaginationState, RowSelectionState, SortingState, VisibilityState } from "@tanstack/react-table";
|
|
4
4
|
import { DensityState } from "./controls/DensityFeature";
|
|
5
|
+
import { DataTableLabel } from "./context/DataTableContext";
|
|
5
6
|
import { DataResponse } from "./useDataTableServer";
|
|
6
7
|
import { UseTranslationResponse } from "react-i18next";
|
|
7
8
|
export interface DataTableServerProps<TData extends DataResponse = DataResponse<unknown>> {
|
|
@@ -36,6 +37,7 @@ export interface DataTableServerProps<TData extends DataResponse = DataResponse<
|
|
|
36
37
|
query: UseQueryResult<TData>;
|
|
37
38
|
url: string;
|
|
38
39
|
translate: UseTranslationResponse<any, any>;
|
|
40
|
+
tableLabel: DataTableLabel;
|
|
39
41
|
}
|
|
40
42
|
/**
|
|
41
43
|
* DataTableServer will create a context to hold all values to
|
|
@@ -48,4 +50,4 @@ export interface DataTableServerProps<TData extends DataResponse = DataResponse<
|
|
|
48
50
|
*
|
|
49
51
|
* @link https://tanstack.com/table/latest/docs/guide/column-defs
|
|
50
52
|
*/
|
|
51
|
-
export declare function DataTableServer<TData extends DataResponse = DataResponse<unknown>>({ columns, enableRowSelection, enableMultiRowSelection, enableSubRowSelection, columnOrder, columnFilters, columnVisibility, density, globalFilter, pagination, sorting, rowSelection, setPagination, setSorting, setColumnFilters, setRowSelection, setGlobalFilter, setColumnOrder, setDensity, setColumnVisibility, query, url, translate, children, }: DataTableServerProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export declare function DataTableServer<TData extends DataResponse = DataResponse<unknown>>({ columns, enableRowSelection, enableMultiRowSelection, enableSubRowSelection, columnOrder, columnFilters, columnVisibility, density, globalFilter, pagination, sorting, rowSelection, setPagination, setSorting, setColumnFilters, setRowSelection, setGlobalFilter, setColumnOrder, setDensity, setColumnVisibility, query, url, translate, children, tableLabel, }: DataTableServerProps<TData>): import("react/jsx-runtime").JSX.Element;
|