@trackunit/react-table 0.0.228 → 0.0.233

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/index.cjs.js CHANGED
@@ -41,24 +41,23 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
41
41
  var update__default = /*#__PURE__*/_interopDefaultLegacy(update);
42
42
 
43
43
  var defaultTranslations = {
44
- "table.actionsheet.selected": "{{count}} selected",
45
44
  "layout.actions.reset": "Reset",
46
- "table.pagination.of": "of {{count}}",
47
- "table.pagination.full": "Showing {{count}} of {{total}} results",
48
- "table.pagination.page": "Page",
49
- "table.results.plural": "{{count}} results",
50
- "table.sorting.toolip": "Adjust sorting and direction",
45
+ "table.actionsheet.selected": "{{count}} selected",
51
46
  "table.columnFilters.columns": "Columns",
52
47
  "table.columnFilters.hiddenColumnCount": "{{count}} column hidden",
53
48
  "table.columnFilters.hiddenColumnsCount": "{{count}} columns hidden",
54
49
  "table.columnFilters.title": "Visible values",
55
50
  "table.columnFilters.tooltip": "Customize visible values",
51
+ "table.error": "Something went wrong while fetching the data",
56
52
  "table.exportFileName": "exported-data",
57
53
  "table.format": "Format",
58
- "table.results.plural.capped": "{{count}}+ results",
59
54
  "table.noResults": "No results",
60
- "table.error": "Something went wrong while fetching the data",
55
+ "table.pagination.full": "Showing {{count}} of {{total}} results",
56
+ "table.pagination.of": "of {{count}}",
57
+ "table.pagination.page": "Page",
61
58
  "table.result": "{{count}} result",
59
+ "table.results.plural": "{{count}} results",
60
+ "table.results.plural.capped": "{{count}}+ results",
62
61
  "table.rowDensity.compact": "Compact",
63
62
  "table.rowDensity.spacious": "Spacious",
64
63
  "table.search.placeholder": "Search...",
@@ -67,6 +66,7 @@ var defaultTranslations = {
67
66
  "table.sorting.descending": "Descending",
68
67
  "table.sorting.label": "Sorting",
69
68
  "table.sorting.order": "Order",
69
+ "table.sorting.toolip": "Adjust sorting and direction",
70
70
  "table.spacing": "Spacing",
71
71
  "table.spacing.toolip": "Adjust row density"
72
72
  };
@@ -275,6 +275,18 @@ const ActionSheet = ({ actions, moreActions = [], selections, resetSelection, cl
275
275
  moreActions: moreActions.map(action => actionDataToMenuItem(action, dataTestId)) })] }));
276
276
  };
277
277
 
278
+ const noPagination = {
279
+ isLoading: false,
280
+ nextPage: () => { },
281
+ previousPage: () => { },
282
+ pageInfo: {
283
+ hasNextPage: false,
284
+ hasPreviousPage: false,
285
+ endCursor: null,
286
+ startCursor: null,
287
+ },
288
+ };
289
+
278
290
  /**
279
291
  * Custom hook for implementing infinite scrolling in a table.
280
292
  *
@@ -333,19 +345,19 @@ const useInfiniteScroll = (props) => {
333
345
  */
334
346
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
335
347
  const Table = (_a) => {
336
- var _b, _c;
348
+ var _b, _c, _d;
337
349
  var { rowHeight = 75 } = _a, props = __rest(_a, ["rowHeight"]);
338
350
  //we need a reference to the scrolling element for logic down below
339
351
  const tableContainerRef = React.useRef(null);
340
352
  const [t] = useTranslation();
341
353
  const { fetchMoreOnBottomReached, getVirtualItems, getTotalSize } = useInfiniteScroll({
342
- pagination: props.pagination,
354
+ pagination: props.pagination || noPagination,
343
355
  containerRef: tableContainerRef,
344
356
  rowSize: props.getRowModel().rows.length || 0,
345
357
  rowHeight,
346
358
  });
347
359
  const hasResults = props.getRowModel().rows.length > 0;
348
- return (jsxRuntime.jsxs(reactComponents.Card, { className: `flex flex-col overflow-hidden ${props.className || ""}`, dataTestId: props.dataTestId, children: [(props.headerLeftActions || props.headerRightActions) && (jsxRuntime.jsxs("div", { className: "z-default flex justify-between gap-2 p-2", children: [jsxRuntime.jsx("div", { className: "flex", children: props.headerLeftActions }), jsxRuntime.jsx("div", { className: "flex", children: props.headerRightActions })] })), jsxRuntime.jsx("div", { className: "h-full overflow-x-auto overflow-y-scroll border-b border-t border-gray-300", ref: tableContainerRef, onScroll: e => fetchMoreOnBottomReached(e.target), children: jsxRuntime.jsxs(reactTableBaseComponents.TableRoot, { style: {
360
+ return (jsxRuntime.jsxs(reactComponents.Card, { className: `flex flex-col overflow-hidden ${props.className || ""}`, dataTestId: props.dataTestId, children: [(props.headerLeftActions || props.headerRightActions) && (jsxRuntime.jsxs("div", { className: "z-default flex justify-between gap-2 p-2", children: [jsxRuntime.jsx("div", { className: "flex items-center", children: props.headerLeftActions }), jsxRuntime.jsx("div", { className: "flex items-center", children: props.headerRightActions })] })), jsxRuntime.jsx("div", { className: "h-full overflow-x-auto overflow-y-scroll border-b border-t border-gray-300", ref: tableContainerRef, onScroll: e => fetchMoreOnBottomReached(e.target), children: jsxRuntime.jsxs(reactTableBaseComponents.TableRoot, { style: {
349
361
  height: hasResults ? "auto" : "100%",
350
362
  width: "100%",
351
363
  position: "relative",
@@ -391,7 +403,7 @@ const Table = (_a) => {
391
403
  }) })) : (jsxRuntime.jsx("tbody", { className: "min-h-[400px]", children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { className: "b-0", children: (props === null || props === void 0 ? void 0 : props.loading) ? (jsxRuntime.jsx(reactComponents.Spinner, { centering: "centered", containerClassName: "absolute inset-0" })) : (props === null || props === void 0 ? void 0 : props.noDataMessage) ? (props.noDataMessage) : (jsxRuntime.jsx(reactComponents.EmptyState, { image: "SEARCH_DOCUMENT", description: t("table.noResults"), className: "absolute inset-0" })) }) }) }))] }) }), props.hideFooter ? null : (jsxRuntime.jsxs("div", { className: "flex items-center p-2", children: [jsxRuntime.jsx("div", { className: "whitespace-nowrap text-xs font-medium text-neutral-600", children: t("table.pagination.full", {
392
404
  count: props.getRowModel().rows.length,
393
405
  total: ((_c = (_b = props.pagination) === null || _b === void 0 ? void 0 : _b.pageInfo) === null || _c === void 0 ? void 0 : _c.count) || 0,
394
- }) }), props.pagination.isLoading ? (jsxRuntime.jsx("span", { className: "ml-2", children: jsxRuntime.jsx(reactComponents.Spinner, { size: "small" }) })) : null, props.footerRightActions && jsxRuntime.jsx("div", { className: "flex flex-1 justify-end", children: props.footerRightActions })] }))] }));
406
+ }) }), ((_d = props.pagination) === null || _d === void 0 ? void 0 : _d.isLoading) ? (jsxRuntime.jsx("span", { className: "ml-2", children: jsxRuntime.jsx(reactComponents.Spinner, { size: "small" }) })) : null, props.footerRightActions && jsxRuntime.jsx("div", { className: "flex flex-1 justify-end", children: props.footerRightActions })] }))] }));
395
407
  };
396
408
 
397
409
  const cvaColumnFilterGrabbable = cssClassVarianceUtilities.cvaMerge(["flex", "items-center", "justify-center"], {
@@ -544,7 +556,7 @@ const RowSpacing = ({ density, setRowDensity, onUserEvent }) => {
544
556
  densityChosen: selectedDensity,
545
557
  });
546
558
  };
547
- return (jsxRuntime.jsx(reactComponents.Tooltip, { label: t("table.spacing.toolip"), placement: "bottom", children: jsxRuntime.jsxs(reactComponents.Popover, { placement: "bottom-start", children: [jsxRuntime.jsx(reactComponents.PopoverTrigger, { children: jsxRuntime.jsx(reactComponents.Button, { prefix: jsxRuntime.jsx(reactComponents.Icon, { name: "ArrowsPointingOut", size: "small" }), variant: "ghost-neutral", size: "small", children: jsxRuntime.jsx("span", { className: "hidden sm:block", children: t("table.spacing") }) }) }), jsxRuntime.jsx(reactComponents.PopoverContent, { children: jsxRuntime.jsx(reactComponents.MenuList, { children: jsxRuntime.jsxs("div", { className: "flex flex-col justify-start", children: [jsxRuntime.jsx(DensitySelection, { onClick: () => handleClick("compact"), text: t("table.rowDensity.compact"), icon: jsxRuntime.jsx(CompactIcon, {}), isSelected: density === "compact" }), jsxRuntime.jsx(DensitySelection, { onClick: () => handleClick("spacious"), text: t("table.rowDensity.spacious"), icon: jsxRuntime.jsx(SpaciousIcon, {}), isSelected: density === "spacious" })] }) }) })] }) }));
559
+ return (jsxRuntime.jsx(reactComponents.Tooltip, { label: t("table.spacing.toolip"), placement: "bottom", dataTestId: "row-spacing", children: jsxRuntime.jsxs(reactComponents.Popover, { placement: "bottom-start", children: [jsxRuntime.jsx(reactComponents.PopoverTrigger, { children: jsxRuntime.jsx(reactComponents.Button, { prefix: jsxRuntime.jsx(reactComponents.Icon, { name: "ArrowsPointingOut", size: "small" }), variant: "ghost-neutral", size: "small", children: jsxRuntime.jsx("span", { className: "hidden sm:block", children: t("table.spacing") }) }) }), jsxRuntime.jsx(reactComponents.PopoverContent, { children: jsxRuntime.jsx(reactComponents.MenuList, { children: jsxRuntime.jsxs("div", { className: "flex flex-col justify-start", children: [jsxRuntime.jsx(DensitySelection, { onClick: () => handleClick("compact"), text: t("table.rowDensity.compact"), icon: jsxRuntime.jsx(CompactIcon, {}), isSelected: density === "compact" }), jsxRuntime.jsx(DensitySelection, { onClick: () => handleClick("spacious"), text: t("table.rowDensity.spacious"), icon: jsxRuntime.jsx(SpaciousIcon, {}), isSelected: density === "spacious" })] }) }) })] }) }));
548
560
  };
549
561
  const DensitySelection = ({ text, onClick, icon, isSelected }) => {
550
562
  return (jsxRuntime.jsxs("div", { className: "flex w-full cursor-pointer items-center p-1 hover:bg-neutral-50", onClick: onClick, children: [jsxRuntime.jsx("div", { className: "mr-1 flex", children: icon }), jsxRuntime.jsx(reactComponents.Text, { weight: "thick", children: text }), isSelected && (jsxRuntime.jsx("div", { className: "justify-endgrow flex", children: jsxRuntime.jsx(reactComponents.Icon, { name: "Check", size: "small" }) }))] }));
package/index.esm.js CHANGED
@@ -16,24 +16,23 @@ import { HTML5Backend } from 'react-dnd-html5-backend';
16
16
  import { SortOrder, validateStringAsAssetSortByProperty, validateStringAsSiteSortByProperty } from '@trackunit/react-core-contexts-api';
17
17
 
18
18
  var defaultTranslations = {
19
- "table.actionsheet.selected": "{{count}} selected",
20
19
  "layout.actions.reset": "Reset",
21
- "table.pagination.of": "of {{count}}",
22
- "table.pagination.full": "Showing {{count}} of {{total}} results",
23
- "table.pagination.page": "Page",
24
- "table.results.plural": "{{count}} results",
25
- "table.sorting.toolip": "Adjust sorting and direction",
20
+ "table.actionsheet.selected": "{{count}} selected",
26
21
  "table.columnFilters.columns": "Columns",
27
22
  "table.columnFilters.hiddenColumnCount": "{{count}} column hidden",
28
23
  "table.columnFilters.hiddenColumnsCount": "{{count}} columns hidden",
29
24
  "table.columnFilters.title": "Visible values",
30
25
  "table.columnFilters.tooltip": "Customize visible values",
26
+ "table.error": "Something went wrong while fetching the data",
31
27
  "table.exportFileName": "exported-data",
32
28
  "table.format": "Format",
33
- "table.results.plural.capped": "{{count}}+ results",
34
29
  "table.noResults": "No results",
35
- "table.error": "Something went wrong while fetching the data",
30
+ "table.pagination.full": "Showing {{count}} of {{total}} results",
31
+ "table.pagination.of": "of {{count}}",
32
+ "table.pagination.page": "Page",
36
33
  "table.result": "{{count}} result",
34
+ "table.results.plural": "{{count}} results",
35
+ "table.results.plural.capped": "{{count}}+ results",
37
36
  "table.rowDensity.compact": "Compact",
38
37
  "table.rowDensity.spacious": "Spacious",
39
38
  "table.search.placeholder": "Search...",
@@ -42,6 +41,7 @@ var defaultTranslations = {
42
41
  "table.sorting.descending": "Descending",
43
42
  "table.sorting.label": "Sorting",
44
43
  "table.sorting.order": "Order",
44
+ "table.sorting.toolip": "Adjust sorting and direction",
45
45
  "table.spacing": "Spacing",
46
46
  "table.spacing.toolip": "Adjust row density"
47
47
  };
@@ -250,6 +250,18 @@ const ActionSheet = ({ actions, moreActions = [], selections, resetSelection, cl
250
250
  moreActions: moreActions.map(action => actionDataToMenuItem(action, dataTestId)) })] }));
251
251
  };
252
252
 
253
+ const noPagination = {
254
+ isLoading: false,
255
+ nextPage: () => { },
256
+ previousPage: () => { },
257
+ pageInfo: {
258
+ hasNextPage: false,
259
+ hasPreviousPage: false,
260
+ endCursor: null,
261
+ startCursor: null,
262
+ },
263
+ };
264
+
253
265
  /**
254
266
  * Custom hook for implementing infinite scrolling in a table.
255
267
  *
@@ -308,19 +320,19 @@ const useInfiniteScroll = (props) => {
308
320
  */
309
321
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
310
322
  const Table = (_a) => {
311
- var _b, _c;
323
+ var _b, _c, _d;
312
324
  var { rowHeight = 75 } = _a, props = __rest(_a, ["rowHeight"]);
313
325
  //we need a reference to the scrolling element for logic down below
314
326
  const tableContainerRef = useRef(null);
315
327
  const [t] = useTranslation();
316
328
  const { fetchMoreOnBottomReached, getVirtualItems, getTotalSize } = useInfiniteScroll({
317
- pagination: props.pagination,
329
+ pagination: props.pagination || noPagination,
318
330
  containerRef: tableContainerRef,
319
331
  rowSize: props.getRowModel().rows.length || 0,
320
332
  rowHeight,
321
333
  });
322
334
  const hasResults = props.getRowModel().rows.length > 0;
323
- return (jsxs(Card, { className: `flex flex-col overflow-hidden ${props.className || ""}`, dataTestId: props.dataTestId, children: [(props.headerLeftActions || props.headerRightActions) && (jsxs("div", { className: "z-default flex justify-between gap-2 p-2", children: [jsx("div", { className: "flex", children: props.headerLeftActions }), jsx("div", { className: "flex", children: props.headerRightActions })] })), jsx("div", { className: "h-full overflow-x-auto overflow-y-scroll border-b border-t border-gray-300", ref: tableContainerRef, onScroll: e => fetchMoreOnBottomReached(e.target), children: jsxs(TableRoot, { style: {
335
+ return (jsxs(Card, { className: `flex flex-col overflow-hidden ${props.className || ""}`, dataTestId: props.dataTestId, children: [(props.headerLeftActions || props.headerRightActions) && (jsxs("div", { className: "z-default flex justify-between gap-2 p-2", children: [jsx("div", { className: "flex items-center", children: props.headerLeftActions }), jsx("div", { className: "flex items-center", children: props.headerRightActions })] })), jsx("div", { className: "h-full overflow-x-auto overflow-y-scroll border-b border-t border-gray-300", ref: tableContainerRef, onScroll: e => fetchMoreOnBottomReached(e.target), children: jsxs(TableRoot, { style: {
324
336
  height: hasResults ? "auto" : "100%",
325
337
  width: "100%",
326
338
  position: "relative",
@@ -366,7 +378,7 @@ const Table = (_a) => {
366
378
  }) })) : (jsx("tbody", { className: "min-h-[400px]", children: jsx("tr", { children: jsx("td", { className: "b-0", children: (props === null || props === void 0 ? void 0 : props.loading) ? (jsx(Spinner, { centering: "centered", containerClassName: "absolute inset-0" })) : (props === null || props === void 0 ? void 0 : props.noDataMessage) ? (props.noDataMessage) : (jsx(EmptyState, { image: "SEARCH_DOCUMENT", description: t("table.noResults"), className: "absolute inset-0" })) }) }) }))] }) }), props.hideFooter ? null : (jsxs("div", { className: "flex items-center p-2", children: [jsx("div", { className: "whitespace-nowrap text-xs font-medium text-neutral-600", children: t("table.pagination.full", {
367
379
  count: props.getRowModel().rows.length,
368
380
  total: ((_c = (_b = props.pagination) === null || _b === void 0 ? void 0 : _b.pageInfo) === null || _c === void 0 ? void 0 : _c.count) || 0,
369
- }) }), props.pagination.isLoading ? (jsx("span", { className: "ml-2", children: jsx(Spinner, { size: "small" }) })) : null, props.footerRightActions && jsx("div", { className: "flex flex-1 justify-end", children: props.footerRightActions })] }))] }));
381
+ }) }), ((_d = props.pagination) === null || _d === void 0 ? void 0 : _d.isLoading) ? (jsx("span", { className: "ml-2", children: jsx(Spinner, { size: "small" }) })) : null, props.footerRightActions && jsx("div", { className: "flex flex-1 justify-end", children: props.footerRightActions })] }))] }));
370
382
  };
371
383
 
372
384
  const cvaColumnFilterGrabbable = cvaMerge(["flex", "items-center", "justify-center"], {
@@ -519,7 +531,7 @@ const RowSpacing = ({ density, setRowDensity, onUserEvent }) => {
519
531
  densityChosen: selectedDensity,
520
532
  });
521
533
  };
522
- return (jsx(Tooltip, { label: t("table.spacing.toolip"), placement: "bottom", children: jsxs(Popover, { placement: "bottom-start", children: [jsx(PopoverTrigger, { children: jsx(Button, { prefix: jsx(Icon, { name: "ArrowsPointingOut", size: "small" }), variant: "ghost-neutral", size: "small", children: jsx("span", { className: "hidden sm:block", children: t("table.spacing") }) }) }), jsx(PopoverContent, { children: jsx(MenuList, { children: jsxs("div", { className: "flex flex-col justify-start", children: [jsx(DensitySelection, { onClick: () => handleClick("compact"), text: t("table.rowDensity.compact"), icon: jsx(CompactIcon, {}), isSelected: density === "compact" }), jsx(DensitySelection, { onClick: () => handleClick("spacious"), text: t("table.rowDensity.spacious"), icon: jsx(SpaciousIcon, {}), isSelected: density === "spacious" })] }) }) })] }) }));
534
+ return (jsx(Tooltip, { label: t("table.spacing.toolip"), placement: "bottom", dataTestId: "row-spacing", children: jsxs(Popover, { placement: "bottom-start", children: [jsx(PopoverTrigger, { children: jsx(Button, { prefix: jsx(Icon, { name: "ArrowsPointingOut", size: "small" }), variant: "ghost-neutral", size: "small", children: jsx("span", { className: "hidden sm:block", children: t("table.spacing") }) }) }), jsx(PopoverContent, { children: jsx(MenuList, { children: jsxs("div", { className: "flex flex-col justify-start", children: [jsx(DensitySelection, { onClick: () => handleClick("compact"), text: t("table.rowDensity.compact"), icon: jsx(CompactIcon, {}), isSelected: density === "compact" }), jsx(DensitySelection, { onClick: () => handleClick("spacious"), text: t("table.rowDensity.spacious"), icon: jsx(SpaciousIcon, {}), isSelected: density === "spacious" })] }) }) })] }) }));
523
535
  };
524
536
  const DensitySelection = ({ text, onClick, icon, isSelected }) => {
525
537
  return (jsxs("div", { className: "flex w-full cursor-pointer items-center p-1 hover:bg-neutral-50", onClick: onClick, children: [jsx("div", { className: "mr-1 flex", children: icon }), jsx(Text, { weight: "thick", children: text }), isSelected && (jsx("div", { className: "justify-endgrow flex", children: jsx(Icon, { name: "Check", size: "small" }) }))] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-table",
3
- "version": "0.0.228",
3
+ "version": "0.0.233",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
package/src/Table.d.ts CHANGED
@@ -3,7 +3,7 @@ import { Table as ReactTable, Row } from "@tanstack/react-table";
3
3
  import { CommonProps } from "@trackunit/react-components";
4
4
  import { RelayPagination } from "@trackunit/react-table-pagination";
5
5
  export interface TableProps<TData extends object> extends ReactTable<TData>, CommonProps {
6
- pagination: RelayPagination;
6
+ pagination?: RelayPagination;
7
7
  headerLeftActions?: React.ReactNode;
8
8
  headerRightActions?: React.ReactNode;
9
9
  footerRightActions?: React.ReactNode;
@@ -0,0 +1,2 @@
1
+ import { RelayPagination } from "@trackunit/react-table-pagination";
2
+ export declare const noPagination: RelayPagination;
@@ -15,8 +15,8 @@ export declare const translations: TranslationResource<TranslationKeys>;
15
15
  /**
16
16
  * Local useTranslation for this specific library
17
17
  */
18
- export declare const useTranslation: () => [TransForLibs<"table.actionsheet.selected" | "layout.actions.reset" | "table.pagination.of" | "table.pagination.full" | "table.pagination.page" | "table.results.plural" | "table.sorting.toolip" | "table.columnFilters.columns" | "table.columnFilters.hiddenColumnCount" | "table.columnFilters.hiddenColumnsCount" | "table.columnFilters.title" | "table.columnFilters.tooltip" | "table.exportFileName" | "table.format" | "table.results.plural.capped" | "table.noResults" | "table.error" | "table.result" | "table.rowDensity.compact" | "table.rowDensity.spacious" | "table.search.placeholder" | "table.searchPlaceholder" | "table.sorting.ascending" | "table.sorting.descending" | "table.sorting.label" | "table.sorting.order" | "table.spacing" | "table.spacing.toolip">, import("i18next").i18n, boolean] & {
19
- t: TransForLibs<"table.actionsheet.selected" | "layout.actions.reset" | "table.pagination.of" | "table.pagination.full" | "table.pagination.page" | "table.results.plural" | "table.sorting.toolip" | "table.columnFilters.columns" | "table.columnFilters.hiddenColumnCount" | "table.columnFilters.hiddenColumnsCount" | "table.columnFilters.title" | "table.columnFilters.tooltip" | "table.exportFileName" | "table.format" | "table.results.plural.capped" | "table.noResults" | "table.error" | "table.result" | "table.rowDensity.compact" | "table.rowDensity.spacious" | "table.search.placeholder" | "table.searchPlaceholder" | "table.sorting.ascending" | "table.sorting.descending" | "table.sorting.label" | "table.sorting.order" | "table.spacing" | "table.spacing.toolip">;
18
+ export declare const useTranslation: () => [TransForLibs<"layout.actions.reset" | "table.actionsheet.selected" | "table.columnFilters.columns" | "table.columnFilters.hiddenColumnCount" | "table.columnFilters.hiddenColumnsCount" | "table.columnFilters.title" | "table.columnFilters.tooltip" | "table.error" | "table.exportFileName" | "table.format" | "table.noResults" | "table.pagination.full" | "table.pagination.of" | "table.pagination.page" | "table.result" | "table.results.plural" | "table.results.plural.capped" | "table.rowDensity.compact" | "table.rowDensity.spacious" | "table.search.placeholder" | "table.searchPlaceholder" | "table.sorting.ascending" | "table.sorting.descending" | "table.sorting.label" | "table.sorting.order" | "table.sorting.toolip" | "table.spacing" | "table.spacing.toolip">, import("i18next").i18n, boolean] & {
19
+ t: TransForLibs<"layout.actions.reset" | "table.actionsheet.selected" | "table.columnFilters.columns" | "table.columnFilters.hiddenColumnCount" | "table.columnFilters.hiddenColumnsCount" | "table.columnFilters.title" | "table.columnFilters.tooltip" | "table.error" | "table.exportFileName" | "table.format" | "table.noResults" | "table.pagination.full" | "table.pagination.of" | "table.pagination.page" | "table.result" | "table.results.plural" | "table.results.plural.capped" | "table.rowDensity.compact" | "table.rowDensity.spacious" | "table.search.placeholder" | "table.searchPlaceholder" | "table.sorting.ascending" | "table.sorting.descending" | "table.sorting.label" | "table.sorting.order" | "table.sorting.toolip" | "table.spacing" | "table.spacing.toolip">;
20
20
  i18n: import("i18next").i18n;
21
21
  ready: boolean;
22
22
  };
package/src/types.d.ts CHANGED
@@ -3,6 +3,7 @@ export { createColumnHelper, type ColumnDef, type VisibilityState } from "@tanst
3
3
  declare module "@tanstack/react-table" {
4
4
  interface ColumnMeta<TData extends RowData, TValue> {
5
5
  alignment?: Alignment;
6
+ exportable?: boolean;
6
7
  required?: boolean;
7
8
  subHeader?: string;
8
9
  hiddenByDefault?: boolean;