@trackunit/react-table 2.8.9 → 2.8.10

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
@@ -1624,7 +1624,7 @@ const Table = ({ rowHeight = 50, loading = false, hideFooter = false, style, ref
1624
1624
  }
1625
1625
  }) })) : (jsxRuntime.jsx("tbody", { className: cvaTBody({
1626
1626
  emptyState: !loading && (props.noDataMessage === undefined || props.noDataMessage === ""),
1627
- }), children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { className: "b-0", children: loading ? (jsxRuntime.jsx(reactComponents.Spinner, { centering: "centered", containerClassName: "absolute inset-0", "data-testid": "table-loading-spinner" })) : props.noDataMessage !== undefined && props.noDataMessage !== "" ? (props.noDataMessage) : (jsxRuntime.jsx(reactComponents.EmptyState, { className: "absolute inset-0", description: t("table.noResults"), image: "SEARCH_DOCUMENT", ...props.emptyState })) }) }) }))] }) }), hideFooter ? null : (jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2 p-2", "data-testid": "table-footer", children: [jsxRuntime.jsx("div", { className: "whitespace-nowrap text-xs font-medium text-neutral-600", children: typeof props.pagination?.pageInfo?.count === "number"
1627
+ }), children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { className: "b-0", children: loading ? (jsxRuntime.jsx(reactComponents.Spinner, { centering: "centered", containerClassName: "absolute inset-0", "data-testid": "table-loading-spinner" })) : props.noDataMessage !== undefined && props.noDataMessage !== "" ? (props.noDataMessage) : (jsxRuntime.jsx(reactComponents.EmptyState, { className: "absolute inset-0", description: t("table.noResults"), image: "SEARCH_DOCUMENT", ...props.emptyState })) }) }) }))] }) }), hideFooter ? null : (jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2 p-2", "data-testid": "table-footer", children: [jsxRuntime.jsx("div", { className: "whitespace-nowrap text-xs font-medium text-neutral-600", children: loading && !hasResults ? (jsxRuntime.jsx(reactComponents.SkeletonLabel, { "data-testid": "table-footer-count-loading", flexibleWidth: false, textSize: "text-xs", width: "9rem" })) : typeof props.pagination?.pageInfo?.count === "number"
1628
1628
  ? t(props.pagination.pageInfo.isCountCapped ? "table.pagination.full.capped" : "table.pagination.full", {
1629
1629
  count: props.getRowModel().rows.length,
1630
1630
  total: props.pagination.pageInfo.count,
@@ -1632,7 +1632,7 @@ const Table = ({ rowHeight = 50, loading = false, hideFooter = false, style, ref
1632
1632
  : t(props.pagination?.pageInfo?.hasNextPage ? "table.pagination.full.capped" : "table.pagination.full", {
1633
1633
  count: props.getRowModel().rows.length,
1634
1634
  total: props.getRowModel().rows.length,
1635
- }) }), props.pagination?.isLoading ? (jsxRuntime.jsx("span", { children: jsxRuntime.jsx(reactComponents.Spinner, { size: "small" }) })) : null, sharedUtils.nonNullable(props.footerRightActions) ? (jsxRuntime.jsx(reactComponents.HorizontalOverflowScroller, { className: "ml-auto w-auto min-w-0", children: jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: props.footerRightActions }) })) : null] }))] }));
1635
+ }) }), props.pagination?.isLoading && hasResults ? (jsxRuntime.jsx("span", { children: jsxRuntime.jsx(reactComponents.Spinner, { size: "small" }) })) : null, sharedUtils.nonNullable(props.footerRightActions) ? (jsxRuntime.jsx(reactComponents.HorizontalOverflowScroller, { className: "ml-auto w-auto min-w-0", children: jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: props.footerRightActions }) })) : null] }))] }));
1636
1636
  };
1637
1637
  const cvaTBody = cssClassVarianceUtilities.cva({
1638
1638
  base: ["min-h-[40dvh]"],
package/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { registerTranslations, useNamespaceTranslation, NamespaceTrans } from '@trackunit/i18n-library-translation';
3
- import { Icon, MenuItem, Button, Tooltip, useOverflowItems, MoreMenu, MenuContent, Spacer, usePersistedState, useDebounce, Text, cvaInteractableItem, Popover, PopoverTrigger, IconButton, PopoverContent, cvaMenuList, cvaMenu, useBidirectionalScroll, noPagination, Card, HorizontalOverflowScroller, Spinner, EmptyState } from '@trackunit/react-components';
3
+ import { Icon, MenuItem, Button, Tooltip, useOverflowItems, MoreMenu, MenuContent, Spacer, usePersistedState, useDebounce, Text, cvaInteractableItem, Popover, PopoverTrigger, IconButton, PopoverContent, cvaMenuList, cvaMenu, useBidirectionalScroll, noPagination, Card, HorizontalOverflowScroller, Spinner, EmptyState, SkeletonLabel } from '@trackunit/react-components';
4
4
  import { Link } from '@tanstack/react-router';
5
5
  import { objectValues, VISIBLE_ONLY_COLUMN_VISIBILITY_KEY, objectKeys, nonNullable, objectEntries } from '@trackunit/shared-utils';
6
6
  import { useMemo, Children, cloneElement, useCallback, useRef, useState, useEffect, createElement } from 'react';
@@ -1623,7 +1623,7 @@ const Table = ({ rowHeight = 50, loading = false, hideFooter = false, style, ref
1623
1623
  }
1624
1624
  }) })) : (jsx("tbody", { className: cvaTBody({
1625
1625
  emptyState: !loading && (props.noDataMessage === undefined || props.noDataMessage === ""),
1626
- }), children: jsx("tr", { children: jsx("td", { className: "b-0", children: loading ? (jsx(Spinner, { centering: "centered", containerClassName: "absolute inset-0", "data-testid": "table-loading-spinner" })) : props.noDataMessage !== undefined && props.noDataMessage !== "" ? (props.noDataMessage) : (jsx(EmptyState, { className: "absolute inset-0", description: t("table.noResults"), image: "SEARCH_DOCUMENT", ...props.emptyState })) }) }) }))] }) }), hideFooter ? null : (jsxs("div", { className: "flex flex-wrap items-center gap-2 p-2", "data-testid": "table-footer", children: [jsx("div", { className: "whitespace-nowrap text-xs font-medium text-neutral-600", children: typeof props.pagination?.pageInfo?.count === "number"
1626
+ }), children: jsx("tr", { children: jsx("td", { className: "b-0", children: loading ? (jsx(Spinner, { centering: "centered", containerClassName: "absolute inset-0", "data-testid": "table-loading-spinner" })) : props.noDataMessage !== undefined && props.noDataMessage !== "" ? (props.noDataMessage) : (jsx(EmptyState, { className: "absolute inset-0", description: t("table.noResults"), image: "SEARCH_DOCUMENT", ...props.emptyState })) }) }) }))] }) }), hideFooter ? null : (jsxs("div", { className: "flex flex-wrap items-center gap-2 p-2", "data-testid": "table-footer", children: [jsx("div", { className: "whitespace-nowrap text-xs font-medium text-neutral-600", children: loading && !hasResults ? (jsx(SkeletonLabel, { "data-testid": "table-footer-count-loading", flexibleWidth: false, textSize: "text-xs", width: "9rem" })) : typeof props.pagination?.pageInfo?.count === "number"
1627
1627
  ? t(props.pagination.pageInfo.isCountCapped ? "table.pagination.full.capped" : "table.pagination.full", {
1628
1628
  count: props.getRowModel().rows.length,
1629
1629
  total: props.pagination.pageInfo.count,
@@ -1631,7 +1631,7 @@ const Table = ({ rowHeight = 50, loading = false, hideFooter = false, style, ref
1631
1631
  : t(props.pagination?.pageInfo?.hasNextPage ? "table.pagination.full.capped" : "table.pagination.full", {
1632
1632
  count: props.getRowModel().rows.length,
1633
1633
  total: props.getRowModel().rows.length,
1634
- }) }), props.pagination?.isLoading ? (jsx("span", { children: jsx(Spinner, { size: "small" }) })) : null, nonNullable(props.footerRightActions) ? (jsx(HorizontalOverflowScroller, { className: "ml-auto w-auto min-w-0", children: jsx("div", { className: "flex items-center gap-2", children: props.footerRightActions }) })) : null] }))] }));
1634
+ }) }), props.pagination?.isLoading && hasResults ? (jsx("span", { children: jsx(Spinner, { size: "small" }) })) : null, nonNullable(props.footerRightActions) ? (jsx(HorizontalOverflowScroller, { className: "ml-auto w-auto min-w-0", children: jsx("div", { className: "flex items-center gap-2", children: props.footerRightActions }) })) : null] }))] }));
1635
1635
  };
1636
1636
  const cvaTBody = cva({
1637
1637
  base: ["min-h-[40dvh]"],
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry.js","sourceRoot":"","sources":["../../../../../libs/react/table/migrations/entry.ts"],"names":[],"mappings":"","sourcesContent":["export {};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-table",
3
- "version": "2.8.9",
3
+ "version": "2.8.10",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {